{"id":455,"date":"2019-08-07T12:25:21","date_gmt":"2019-08-07T04:25:21","guid":{"rendered":"https:\/\/nj.transwarp.cn:8180\/?p=455"},"modified":"2024-10-21T18:20:36","modified_gmt":"2024-10-21T10:20:36","slug":"tdh%e9%9b%86%e7%be%a4%e9%85%8d%e7%bd%ae%e5%86%85%e5%a4%96%e7%bd%91%e5%8f%8c%e7%bd%91%e5%8d%a1%ef%bc%8c%e5%a4%96%e7%bd%91%e9%9b%86%e7%be%a4%e5%a4%96%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%a6%82%e4%bd%95","status":"publish","type":"post","link":"https:\/\/kbwp.transwarp.cn\/?p=455","title":{"rendered":"TDH\u96c6\u7fa4\u914d\u7f6e\u5185\u5916\u7f51\u53cc\u7f51\u5361\u4e0b\u5916\u7f51\u670d\u52a1\u5668\u5982\u4f55\u8bbf\u95ee\u5185\u7f51\u7684HDFS"},"content":{"rendered":"<h3>\u6982\u8981\u63cf\u8ff0<\/h3>\n<hr \/>\n<p>\u672c\u6587\u7ae0\u9002\u7528\u573a\u666f\u4e3a\uff1a<br \/>\n1\u3001\u96c6\u7fa4\u914d\u7f6e\u4e86\u5185\u5916\u7f51\u53cc\u7f51\u5361\uff1b<br \/>\n2\u3001HDFS\u5b89\u88c5\u5728\u5185\u7f51\u5361\u7f51\u7edc\uff1b<br \/>\n3\u3001\u5916\u7f51\u4e2d\u7684\u96c6\u7fa4\u5916\u5176\u4ed6\u673a\u5668\uff0c\u9700\u8981\u8bbf\u95ee\u5b89\u88c5\u5728\u5185\u7f51\u7f51\u5361\u4e0a\u7684HDFS\uff1b<\/p>\n<h3>\u8be6\u7ec6\u8bf4\u660e<\/h3>\n<hr \/>\n<h4>\u914d\u7f6e\u524d\u9700\u8981\u786e\u4fdd\uff1a<\/h4>\n<ol>\n<li>\u4e24\u4e2anamenode\u8282\u70b9\u5fc5\u987b\u90fd\u8981\u6709\u5916\u7f51\u7f51\u5361<\/li>\n<li>\u96c6\u7fa4\u5916\u670d\u52a1\u5668\u7684\u65f6\u949f\u4e0eTDH\u7684\u7cfb\u7edf\u65f6\u95f4\u4fdd\u6301\u4e00\u81f4<\/li>\n<li>\u96c6\u7fa4\u5916\u670d\u52a1\u5668\u9700\u8981\u914d\u7f6eJAVA_HOME<br \/>\n<em>\u53ef\u53c2\u89c1<a href=\"\/?p=475\" title=\"\u5982\u4f55\u914d\u7f6eJAVA_HOME\">\u5982\u4f55\u914d\u7f6eJAVA_HOME<\/a><\/em><\/li>\n<\/ol>\n<h4>\u914d\u7f6e\u65b9\u6cd5<\/h4>\n<h5>\u4e00. \u914d\u7f6e HDFS \u53c2\u6570<\/h5>\n<p>1\u3001 \u767b\u5f55 <strong>Manager<\/strong> \u9875\u9762 (<a href=\"http:\/\/manager_ip:8180\">http:\/\/manager_ip:8180<\/a>)<\/p>\n<p>2\u3001\u70b9\u51fb <strong>HDFS<\/strong> \u7ec4\u4ef6\uff0c\u5e76\u70b9\u51fb <strong>\u914d\u7f6e<\/strong> \u6309\u94ae\u8fdb\u5165HDFS\u7ec4\u4ef6\u7684\u914d\u7f6e\u53c2\u6570\u9875\u9762<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2019\/08\/image-1565167678218.png\" alt=\"file\" \/><\/p>\n<p>3\u3001\u70b9\u51fb\u9875\u9762\u53f3\u8fb9\u7684 <strong>\u6dfb\u52a0\u81ea\u5b9a\u4e49\u53c2\u6570<\/strong> \u6309\u94ae\uff0c\u6dfb\u52a0\u5982\u4e0b\u81ea\u5b9a\u4e49\u53c2\u6570\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: center;\">\u5c5e\u6027<\/th>\n<th style=\"text-align: center;\">\u503c<\/th>\n<th style=\"text-align: center;\">\u914d\u7f6e\u6587\u4ef6<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: center;\">dfs.namenode.http-bind-host<\/td>\n<td style=\"text-align: center;\">0.0.0.0<\/td>\n<td style=\"text-align: center;\">hdfs-site.xml<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">dfs.namenode.https-bind-host<\/td>\n<td style=\"text-align: center;\">0.0.0.0<\/td>\n<td style=\"text-align: center;\">hdfs-site.xml<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">dfs.namenode.rpc-bind-host<\/td>\n<td style=\"text-align: center;\">0.0.0.0<\/td>\n<td style=\"text-align: center;\">hdfs-site.xml<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">dfs.namenode.servicerpc-bind-host<\/td>\n<td style=\"text-align: center;\">0.0.0.0<\/td>\n<td style=\"text-align: center;\">hdfs-site.xml<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">dfs.client.use.datanode.hostname<\/td>\n<td style=\"text-align: center;\">true<\/td>\n<td style=\"text-align: center;\">hdfs-site.xml<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">dfs.datanode.use.datanode.hostname<\/td>\n<td style=\"text-align: center;\">true<\/td>\n<td style=\"text-align: center;\">hdfs-site.xml<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>4\u3001\u53c2\u6570\u6dfb\u52a0\u5b8c\u6210\u540e\uff0c\u70b9\u51fb <strong>\u66f4\u591a\u64cd\u4f5c<\/strong> &gt; <strong>\u914d\u7f6e\u670d\u52a1<\/strong> <\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2019\/08\/image-1565168630558.png\" alt=\"file\" \/><\/p>\n<p>5\u3001\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u5c06 <strong>namenode.use.wildcard<\/strong> \u53c2\u6570\u503c\u4fee\u6539\u4e3a <strong>true<\/strong> \uff08<em>\u82e5\u5df2\u7ecf\u662ftrue\u5219\u65e0\u9700\u4fee\u6539<\/em>\uff09<\/p>\n<blockquote>\n<p>\u9ad8\u7248\u672c\u5df2\u5e9f\u5f03\u8be5\u53c2\u6570<\/p>\n<\/blockquote>\n<p>6\u3001\u91cd\u542f <strong>HDFS<\/strong> \u670d\u52a1\uff1a<\/p>\n<h5>\u4e8c. \u4e0b\u8f7dTDH-Client\u5de5\u5177\u81f3\u5916\u7f51\u96c6\u7fa4\u5916\u670d\u52a1\u5668\uff0c\u5e76\u4fee\u6539hosts\u6587\u4ef6<\/h5>\n<p>1\u3001\u5728 <strong>Manager<\/strong> \u9875\u9762\uff0c\u70b9\u51fb <strong>\u7ba1\u7406<\/strong> &gt; <strong>\u4e0b\u8f7d\u5ba2\u6237\u7aef<\/strong>\uff0c\u4e0b\u8f7d <strong>tdh-client.tar<\/strong> \u5ba2\u6237\u7aef\uff0c\u5e76\u5c06\u8be5\u5ba2\u6237\u7aef\u5de5\u5177\u4e0a\u4f20\u5230\u5916\u7f51\u96c6\u7fa4\u5916\u670d\u52a1\u5668<\/p>\n<p>2\u3001\u5728\u5916\u7f51\u670d\u52a1\u5668\u4e0a\uff0c\u5c06TDH\u5ba2\u6237\u7aef\u89e3\u538b\u90e8\u7f72\u5230\u5230\u5e0c\u671b\u7684\u76ee\u5f55\uff1a<\/p>\n<pre><code class=\"language-shell\"># tar xvf tdh-client.tar<\/code><\/pre>\n<p>3\u3001\u89e3\u538b\u540e\uff0c\u4fee\u6539TDH-Client\/hosts\u6587\u4ef6\uff0c\u5c06\u5185\u7f51\u7f51\u5361hosts\u4fe1\u606f\u6ce8\u91ca\u6389\uff0c\u6dfb\u52a0\u4e24\u4e2anamenode\u8282\u70b9\u7684\u5916\u7f51\u7f51\u5361\u4fe1\u606f\uff0c\u4f8b\u5982\uff1a<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2019\/08\/hosts.png\" alt=\"\" \/><\/p>\n<p>4\u3001\u5c06\u5916\u7f51\u670d\u52a1\u5668\u7684\u672c\u673aip\u548chostname\u4fe1\u606f\u5199\u5165\/etc\/hosts\u6587\u4ef6\uff08<em>\u82e5\u5df2\u6709\u5219\u65e0\u9700\u91cd\u590d\u5199\u5165<\/em>\uff09<\/p>\n<h5>\u4e09. \u9a8c\u8bc1\u662f\u5426\u6210\u529f\u8bbf\u95ee\u5185\u7f51\u5b89\u88c5\u7684HDFS<\/h5>\n<p>\u5728\u5916\u7f51\u670d\u52a1\u5668\u4e0a\uff0c\u6267\u884c <strong>source TDH-Client\/init.sh<\/strong> \u540e\uff0c\u5373\u53ef\u6b63\u5e38\u8bbf\u95ee\u5185\u7f51\u5b89\u88c5\u7684HDFS.<\/p>\n<pre><code class=\"language-shell\">[root@bryan1 Bryan]#  source TDH-Client\/init.sh\nAlready have all hostname in TDH Cluster.\nInit done!\n[root@bryan1 Bryan]# hadoop fs -ls \/\n2019-08-07 17:50:03,339 INFO util.KerberosUtil: Using principal pattern: HTTP\/_HOST\nFound 7 items\ndrwx--x--x   - hbase hbase           0 2019-08-07 15:37 \/hyperbase1\ndrwx--x--x   - hive  hive            0 2019-04-27 18:33 \/inceptor1\ndrwx--x--x   - hive  hive            0 2019-04-27 18:38 \/slipstream1\ndrwx--x--x   - hive  hive            0 2019-04-27 18:41 \/slipstreamstudio1\ndrwxrwxrwt   - hdfs  hadoop          0 2019-04-27 18:15 \/tmp\ndrwxrwxrwt   - hdfs  hadoop          0 2019-04-27 18:15 \/user\ndrwxr-xr-x   - hdfs  hbase           0 2019-04-27 18:16 \/yarn1\n[root@bryan1 Bryan]#<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981\u63cf\u8ff0 \u672c\u6587\u7ae0\u9002\u7528\u573a\u666f\u4e3a\uff1a 1\u3001\u96c6\u7fa4\u914d\u7f6e\u4e86\u5185\u5916\u7f51\u53cc\u7f51\u5361\uff1b 2\u3001HDFS\u5b89\u88c5\u5728\u5185\u7f51\u5361\u7f51\u7edc\uff1b 3\u3001\u5916\u7f51\u4e2d\u7684\u96c6\u7fa4\u5916 ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/kbwp.transwarp.cn\/?p=455\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":20,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,38,1],"tags":[],"class_list":["post-455","post","type-post","status-publish","format-standard","hentry","category-installation","category-configuration","category-uncategorized"],"acf":[],"_links":{"self":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/455","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=455"}],"version-history":[{"count":4,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/455\/revisions"}],"predecessor-version":[{"id":14518,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/455\/revisions\/14518"}],"wp:attachment":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}