hadoopクラスタには2つのネームノードがあります。
以下は、良い状態を返すネームノードの1つの良い例です。
最初のネームノードマシンIP -92.3.44.2
curl -v http://92.3.44.2:50070/jmx?qry=Hadoop:service=NameNode,name=NameNodeStatus
* About to connect() to 92.3.44.2 port 50070 (#0)
* Trying 92.3.44.2...
* Connected to 92.3.44.2 (92.3.44.2) port 50070 (#0)
> GET /jmx?qry=Hadoop:service=NameNode,name=NameNodeStatus HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 92.3.44.2:50070
> Accept: */*
>
< HTTP/1.1 200 OK
< Cache-Control: no-cache
< Expires: Mon, 27 Jan 2020 15:39:57 GMT
< Date: Mon, 27 Jan 2020 15:39:57 GMT
< Pragma: no-cache
< Expires: Mon, 27 Jan 2020 15:39:57 GMT
< Date: Mon, 27 Jan 2020 15:39:57 GMT
< Pragma: no-cache
< Content-Type: application/json; charset=utf-8
< X-FRAME-OPTIONS: SAMEORIGIN
< Access-Control-Allow-Methods: GET
< Access-Control-Allow-Origin: *
< Transfer-Encoding: chunked
< Server: Jetty(6.1.26.hwx)
<
{
"beans" : [ {
"name" : "Hadoop:service=NameNode,name=NameNodeStatus",
"modelerType" : "org.apache.hadoop.hdfs.server.namenode.NameNode",
"State" : "active",
"NNRole" : "NameNode",
"HostAndPort" : "namenode.kuku.com:8020",
"SecurityEnabled" : false,
"LastHATransitionTime" : 1579019610100,
"BytesWithFutureGenerationStamps" : 0,
"SlowPeersReport" : null,
"SlowDisksReport" : null
} ]
* Connection #0 to host 92.3.44.2 left intact
しかし、2番目のネームノードでは画像が異なります。
はい
curl -v http://92.3.44.3:50070/jmx?qry=Hadoop:service=NameNode,name=NameNodeStatus
* About to connect() to 92.3.44.3 port 50070 (#0)
* Trying 92.3.44.3...
* Connected to 92.3.44.2 (92.3.44.2) port 50070 (#0)
> GET /jmx?qry=Hadoop:service=NameNode,name=NameNodeStatus HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 92.3.44.2:50070
> Accept: */*
>
カールコマンドが停止したことがわかります。
カールがかかった理由を確認するには?