예제 설정

예제 설정 (Example Configurations)

실제 분산 클러스터에서 HBase를 구성하는 예시를 보여주는 페이지예요. hbase-site.xml, regionservers, hbase-env.sh 파일이 어떤 모습인지 확인하는 데 도움이 됩니다.

출처: 문서

본문

기본 분산 HBase 설치 (Basic Distributed HBase Install)

분산형 10노드 클러스터의 기본 설정 예제를 보여드릴게요.

  • 이 예제에서 노드 이름은 example0, example1 등이며 example9까지 있어요.
  • HBase Master와 HDFS NameNode는 example0 노드에서 실행돼요.
  • RegionServer는 example1-example9 노드에서 실행돼요.
  • 3노드 ZooKeeper 앙상블이 example1, example2, example3에서 기본 포트로 실행돼요.
  • ZooKeeper 데이터는 /export/zookeeper 디렉터리에 영속화돼요.

아래에서는 HBase conf 디렉터리에 있는 주요 설정 파일 — hbase-site.xml, regionservers, hbase-env.sh — 의 예시 모습을 보여드릴게요.

hbase-site.xml

hbase.zookeeper.quorum example1,example2,example3 The directory shared by RegionServers. hbase.zookeeper.property.dataDir /export/zookeeper Property from ZooKeeper config zoo.cfg. The directory where the snapshot is stored. hbase.rootdir hdfs://example0:9000/hbase The directory shared by RegionServers. hbase.cluster.distributed true The mode the cluster will be in. Possible values are false: standalone and pseudo-distributed setups with managed ZooKeeper true: fully-distributed with unmanaged ZooKeeper Quorum (see hbase-env.sh)

regionservers

이 파일에는 RegionServer를 실행할 노드들을 나열해요. 우리 경우에는 example1-example9 노드들이에요.

example1 example2 example3 example4 example5 example6 example7 example8 example9

hbase-env.sh

다음은 hbase-env.sh 파일에서 JAVA_HOME 환경 변수(HBase에 필수)를 설정하고 힙을 기본값 1 GB 대신 4 GB로 설정하는 방법을 보여줘요. 이 예제를 복사해서 붙여 넣는다면 반드시 JAVA_HOME을 자신의 환경에 맞게 조정하세요.

The java implementation to use.

export JAVA_HOME=/usr/java/jdk1.8.0/

The maximum amount of heap to use. Default is left to JVM default.

export HBASE_HEAPSIZE=4G

rsync로 conf 디렉터리의 내용을 클러스터의 모든 노드에 복사하세요.

더 알아보기 (Learn more)