의사 분산 Hadoop 클러스터를 기반으로 의사 분산 HBASE 클러스터 구축


머리말

이 기사의 목적은 의사 분산 형 Hadoop 클러스터를 기반으로 의사 분산 형 HBASE 클러스터를 구축하고, 의사 분산 형 Hadoop 클러스터 환경 자습서를 구축하여 Baidu Smart Cloud Server를 기반으로 의사 분산 형 Hadoop 클러스터를 구축하는 것입니다.

운영 환경

1 、 CentOS / 7.9 x86_64 (64 비트)

2 、 jdk-8u281-linux-x64

3 、 hadoop-2.7.6

4 、 hbase-2.2.0

HBASE 압축 해제

cd /software/
tar -zxvf /download/hbase-2.2.0-bin.tar.gz
mv hbase-2.2.0/ hbase

HBASE 구성

시스템 변수 구성

vi /etc/profile

파일 끝에서 삽입을 누르고 다음을 입력하십시오.

#hbase
export HBASE_HOME=/software/hbase
export PATH=$HBASE_HOME/bin:$PATH

esc를 눌러 wd를 입력하고 Enter를 누르십시오.

검사 결과

hbase version

성공하면 결과는 다음과 같습니다.
여기에 사진 설명 삽입

hbase-env.sh 파일 구성

cd hbase/conf/
vi hbase-env.sh
export JAVA_HOME=/software/jdk
export HBASE_CLASSPATH=/software/hbase/conf
export HBASE_MANAGES_ZK=true

esc를 눌러 wd를 입력하고 Enter를 누르십시오.

hbase-site.xml 구성

cd hbase/conf/
vi hbase-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
/**
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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>hbase.master</name>
    <value>localhost</value>
</property>
 <property>
     <name>hbase.rootdir</name>
     <value>hdfs://localhost:9000/hbase</value>
 </property>
 <property>
     <name>hbase.cluster.distributed</name>
     <value>true</value>
 </property>
 <property>
     <name>hbase.zookeeper.quorum</name>
     <value>localhost</value>
 </property>
 <property>
     <name>hbase.zookeeper.property.dataDir</name>
     <value>/software/data/tmp/zookeeper-hbase</value>
 </property>
</configuration>

esc를 눌러 wd를 입력하고 Enter를 누르십시오.

mkdir -p /software/data/tmp/zookeeper-hbase

regionservers 파일 구성

vi regionservers

파일 내용을 다음과 같이 수정하십시오.

localhost 

클러스터 시작

HBASE를 시작하기 전에 Hadoop을 시작해야
여기에 사진 설명 삽입
하며, 그림과 같이 jps 확인 하여 다음 단계로 진행할 수 있습니다 .

cd /software/hbase/bin/
./start-hbase.sh

그림과 같이 시작이 성공했습니다.
여기에 사진 설명 삽입

클러스터 webUI 인터페이스보기

http://IP:16010/master-status

성공하면 그림과 같습니다.
여기에 사진 설명 삽입

HBASE 클러스터에 대한 첫 경험

클라이언트 시작

hbase shell

기존 테이블보기

list

결과는 다음과 같습니다.
여기에 사진 설명 삽입

컬럼 클러스터 mycf를 사용하여 테이블 tb 생성

create 'tb','mycf'  

검사 결과

list

결과는 다음과 같습니다.
여기에 사진 설명 삽입

추천

출처blog.csdn.net/qq_44843672/article/details/114242174