2014년 6월 6일 금요일

하둡 EC2 설정

hadoop 인스턴스는 기본적으로 내부통신을 한다. 따라서 EC2에서는 public이 아닌 private아이피 및 도메인을 호스트로 등록해야한다.

172.31.2.139 ip-172-31-2-139.ap-southeast-1.compute.internal hadoop01
172.31.2.138 ip-172-31-2-138.ap-southeast-1.compute.internal hadoop02
172.31.2.140 ip-172-31-2-140.ap-southeast-1.compute.internal hadoop03

ssh를 통해 클라이언트의 public키를 서버의 authorizedkeys에 등록하는 절차는 이 내부통신과 아무런 관련이 없는건가? 정작 authorizedkeys에 public key를 append했는데 public ip뿐만아니라 private ip로도 ssh로그인이 된다. 또한 네임노드에서 각 데이터노드로의 단방향SSH통신에만 publickey를 authorizedkey에 append해놨다. 근데 core-site.xml에 'fs.default.name'에 지정된 밸류를 식별하여 데이터노드는 네임노드와 하트비트를 하고 네임노드에 블록 리포트를 보낸다. 데이터노드에서 네임노드로 ssh통신이 안되는데 어떻게 되는건지 모르겠다.

core-site.xml
<property>
  <name>fs.default.name</name>
  <value>hdfs://hadoop01:9000</value>
  <description>The name of the default file system.  A URI whose
  scheme and authority determine the FileSystem implementation.  The
  uri's scheme determines the config property (fs.SCHEME.impl) naming
  the FileSystem implementation class.  The uri's authority is used to
  determine the host, port, etc. for a filesystem.</description>
</property>
<property>
  <name>hadoop.tmp.dir</name>
  <value>/home/hadoop/hadoop-data</value>
  <description>A base for other temporary directories.</description>
</property>

hdfs-site.xml
<property>
  <name>dfs.replication</name>
  <value>2</value>
  <description>Default block replication.
  The actual number of replications can be specified when the file is created.
  The default is used if replication is not specified in create time.
  </description>
</property>
<property>
  <name>dfs.http.address</name>
  <value>hadoop01:50070</value>
  <description>
    The address and the base port where the dfs namenode web ui will listen on.
    If the port is 0 then the server will start on a free port.
  </description>
</property>
<property>
  <name>dfs.secondary.http.address</name>
  <value>hadoop02:50090</value>
  <description>
    The secondary namenode http server address and port.
    If the port is 0 then the server will start on a free port.
  </description>
</property>

mapred-site.xml
<property>
  <name>mapred.job.tracker</name>
  <value>hadoop01:9001</value>
  <description>The host and port that the MapReduce job tracker runs
  at.  If "local", then jobs are run in-process as a single map
  and reduce task.
  </description>
</property>

댓글 없음 :

댓글 쓰기