0

I read https://hadoop.apache.org/docs/r2.4.1/hadoop-project-dist/hadoop-hdfs/hdfs-default.xml and want my datanode to run on port 9300.

My https-site.xml is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<configuration>
  <property>
    <name>dfs.replication</name>
    <value>1</value>
  </property>
  <property>
    <name>dfs.datanode.address</name>
    <value>0.0.0.0:9300</value>
  </property>
  <property>
    <name>dfs.datanode.http.address</name>
    <value>0.0.0.0:9201</value>
  </property>
  <property>
    <name>dfs.datanode.ipc.address</name>
    <value>0.0.0.0:9202</value>
  </property>
  <property>
    <name>dfs.datanode.ipc.address</name>
    <value>0.0.0.0:9202</value>
  </property>
</configuration>

However, these properties were not obeyed by hdfs. They are still using the default ports.

Jennys-MacBook-Pro:sbin jennylian$ jps
56177 RemoteMavenServer36
60737 DataNode
61300 Jps
60630 NameNode
31862 GradleDaemon
56471 GradleDaemon
56201 GradleDaemon
1065
56206 GradleDaemon
60878 SecondaryNameNode
Jennys-MacBook-Pro:sbin jennylian$ netstat -a - p | grep 9001
Jennys-MacBook-Pro:sbin jennylian$ lsof -i -n -P | grep 60737
lsof: WARNING: can't stat() nfs file system /System/Volumes/Data/home/bin
      Output information may be incomplete.
      assuming "dev=1a00002d" from mount table
java      60737 jennylian  320u  IPv4 0xb622558b083c60d5      0t0  TCP *:9866 (LISTEN)
java      60737 jennylian  322u  IPv4 0xb622558b083c4ba5      0t0  TCP 127.0.0.1:62733 (LISTEN)
java      60737 jennylian  446u  IPv4 0xb622558af8aa810d      0t0  TCP *:9864 (LISTEN)
java      60737 jennylian  447u  IPv4 0xb622558af8aa8ba5      0t0  TCP *:9867 (LISTEN)
java      60737 jennylian  457u  IPv4 0xb622558af8a9963d      0t0  TCP 127.0.0.1:62734->127.0.0.1:9000 (ESTABLISHED)

How do I override these ports? Thanks, Jenny

Jenny Lian
  • 79
  • 4

0 Answers0