`

hbase的安装与配置【伪分布式】

    博客分类:
  • java
阅读更多
1、查找对应hadoop版本的hbase
网址:
http://hbase.apache.org/book/configuration.html#basic.prerequisites
最新版本:hbase-0.98.3可适应hadoop版本:2.3.0


2、下载解压

3、修改Java环境变量

vi conf/hbase-env.sh
 export JAVA_HOME=/usr/java/jdk1.6.0_31/



4、SSH端口不是默认22端口,需要修改HBASE的端口

vi conf/hbase-env.sh
export HBASE_SSH_OPTS="-p 222"


5、修改hbase-site.xml配置
<configuration>
 <property>
    <name>hbase.rootdir</name>
    <value>file:///usr/xxxx/tmp/hbase</value>
  </property>
  <property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>/usr/xxxx/tmp/zookeeper</value>
  </property>
<property>
    <name>hbase.cluster.distributed</name>
    <value>true</value>
  </property>
</configuration>




6、启动和停止
$ ./bin/start-hbase.sh
$ ./bin/stop-hbase.sh

7、操作示例
Connect to your running HBase via the shell.

$ ./bin/hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version: 0.90.0, r1001068, Fri Sep 24 13:55:42 PDT 2010

hbase(main):001:0> 
Type help and then <RETURN> to see a listing of shell commands and options. Browse at least the paragraphs at the end of the help emission for the gist of how variables and command arguments are entered into the HBase shell; in particular note how table names, rows, and columns, etc., must be quoted.

Create a table named test with a single column family named cf. Verify its creation by listing all tables and then insert some values.

hbase(main):003:0> create 'test', 'cf'
0 row(s) in 1.2200 seconds
hbase(main):003:0> list 'test'
..
1 row(s) in 0.0550 seconds
hbase(main):004:0> put 'test', 'row1', 'cf:a', 'value1'
0 row(s) in 0.0560 seconds
hbase(main):005:0> put 'test', 'row2', 'cf:b', 'value2'
0 row(s) in 0.0370 seconds
hbase(main):006:0> put 'test', 'row3', 'cf:c', 'value3'
0 row(s) in 0.0450 seconds
Above we inserted 3 values, one at a time. The first insert is at row1, column cf:a with a value of value1. Columns in HBase are comprised of a column family prefix -- cf in this example -- followed by a colon and then a column qualifier suffix (a in this case).

Verify the data insert by running a scan of the table as follows

hbase(main):007:0> scan 'test'
ROW        COLUMN+CELL
row1       column=cf:a, timestamp=1288380727188, value=value1
row2       column=cf:b, timestamp=1288380738440, value=value2
row3       column=cf:c, timestamp=1288380747365, value=value3
3 row(s) in 0.0590 seconds
Get a single row

hbase(main):008:0> get 'test', 'row1'
COLUMN      CELL
cf:a        timestamp=1288380727188, value=value1
1 row(s) in 0.0400 seconds
Now, disable and drop your table. This will clean up all done above.

hbase(main):012:0> disable 'test'
0 row(s) in 1.0930 seconds
hbase(main):013:0> drop 'test'
0 row(s) in 0.0770 seconds 
Exit the shell by typing exit.

hbase(main):014:0> exit
分享到:
评论

相关推荐

    Hadoop2.7.5-HBase1.2.6伪分布式安装

    本文将详细介绍如何在本地环境中进行Hadoop2.7.5与HBase1.2.6的伪分布式安装,这是一个适合初学者入门的实践教程。 Hadoop是Apache基金会的一个开源项目,主要由HDFS(Hadoop Distributed File System)和MapReduce...

    Hadoop2.7.5-HBase1.2.6伪分布式安装文档

    ### Hadoop2.7.5-HBase1.2.6伪分布式安装知识点解析 #### 一、概述 本文档详细介绍了如何在Linux环境下搭建Hadoop2.7.5与HBase1.2.6的伪分布式环境。伪分布式是指所有服务(如NameNode、DataNode等)都在同一台机器...

    分布式数据库HBase安装配置与实践.doc

    2. **HBase配置** HBase有三种运行模式:单机模式、伪分布式模式和完全分布式模式。对于学习和初步实践,我们关注单机模式和伪分布式模式。 - **伪分布式模式配置** 在这个模式下,HBase和Hadoop运行在同一台...

    Hbase 安装与基本使用

    HBase是一种分布式、基于列族的NoSQL数据库,由Apache Hadoop项目开发,设计用于处理大规模数据集。本文将深入探讨HBase的安装过程以及基本使用方法,旨在帮助初学者快速上手。 **一、HBase简介** HBase是Google ...

    大数据技术基础实验报告-HBase安装配置和应用实践.doc

    - HBase有三种运行模式:单机模式、伪分布式模式和分布式模式。实验中主要讨论前两种。 - 在配置之前,确保已安装JDK、Hadoop(对于单机模式可选),并且配置了SSH。 - 对于单机模式配置: - 修改`/usr/local/...

    hadoop2.6及hbase0.96伪分布式安装配置文件

    在IT领域,Hadoop和...总之,Hadoop 2.6和Hbase 0.96的伪分布式安装涉及多个步骤,包括环境设置、配置文件修改、服务启动以及验证。熟悉这些步骤和配置文件将帮助你有效地搭建和管理Hadoop和HBase的开发或测试环境。

    nosql实验一-HBase的安装与配置.docx

    在本次实验中,我们将学习如何在Linux环境下,以伪分布式的方式安装和配置HBase,以及验证其安装是否成功。 一、实验目标 1. 掌握HBase的伪分布式安装过程。 2. 验证HBase的安装是否成功。 3. 使用Web UI管理界面...

    【大数据211】HBase伪分布式运行环境(2023.3.27).pdf

    在开始搭建HBase伪分布式运行环境之前,需要准备以下三个安装文件:hadoop-3.3.4.tar.gz、jdk-8u341-linux-x64.tar.gz和hbase-2.4.16-bin.tar.gz。将这些文件上传至虚拟机中,并解压到任一目录,如/opt或/usr、/root...

    分布式数据库HBase安装配置与实践.docx

    2. 修改/hbase-site.xml文件,设置hbase.rootdir为HDFS上的存储路径,hbase.cluster.distributed为true以启用分布式模式,同时配置hbase.zookeeper.quorum为ZooKeeper的地址(在伪分布式模式中通常设为localhost)。...

    Windows7下eclipse调试Fedora虚拟机的hadoop+hbase伪分布式

    三、Fedora服务器Hbase配置安装过程 在Fedora服务器上安装HBase,首先确保已经安装了Hadoop,因为HBase是建立在Hadoop之上的分布式数据库。下载HBase的对应版本,同样配置环境变量,接着修改HBase的配置文件(如...

    伪分布式+hadoop+hive+hbase

    ### 伪分布式环境下的Hadoop、Hive及HBase安装与配置 #### 一、概述 在当前的大数据处理环境中,Hadoop、Hive以及HBase等技术框架扮演着极其重要的角色。为了更好地理解这些技术如何协同工作,本文将详细介绍在一个...

    Hadoop伪分布式安装及配置参考步骤.docx

    Hadoop伪分布式安装及配置参考步骤 Hadoop是一种分布式系统基础架构,由Apache基金会开发,能够对大量数据进行分布式处理和存储。用户可以轻松地在Hadoop集群上开发和运行处理海量数据的应用程序。Hadoop具有高可靠...

    分布式数据库HBase安装配置与实践.pdf

    5. HBase配置 - 伪分布式模式配置: - 配置hbase-env.sh:设置JAVA_HOME和HBASE_CLASSPATH,以及开启HBase管理ZooKeeper。 - 配置hbase-site.xml:指定HBase数据在HDFS上的存储路径,并将hbase.cluster....

    Hadoop技术-HBase安装与配置.pptx

    本文将深入探讨HBase的运行模式以及如何在伪分布式模式下进行安装和配置。 首先,理解HBase的运行模式至关重要。HBase有三种主要的运行模式: 1. **单机模式**:在这种模式下,所有的HBase进程,包括Master、...

    Hbase的安装过程及基本操作

    对于更真实的环境模拟,可以配置Hbase在伪分布式模式下运行。设置`hbase.cluster.distributed`为`true`,并确保Hadoop也在伪分布式模式下运行。 10. **Hbase Java API实践**: 要使用Java与Hbase交互,首先创建一...

    hbase安装与使用

    本文主要介绍如何在 Linux 环境下安装和配置 HBase 版本 0.98.3,并且针对不同的运行模式(本地模式、伪分布式模式、完全分布式模式)进行详细介绍。 #### 安装前提 1. **JDK 安装**:HBase 需要 JDK 1.6 或更高...

    hadoop2.4.1伪分布式搭建

    hadoop2.4.1伪分布式搭建 包含网络配置修改 无密码登录

    hadopp伪分布式配置

    在进行Hadoop伪分布式配置时,确保所有配置文件中的参数都与你的系统设置相匹配,避免出现启动失败或数据丢失等问题。此外,定期检查日志文件以获取任何潜在的错误信息,有助于及时解决问题。在学习和使用过程中,...

Global site tag (gtag.js) - Google Analytics