Posts tagged ‘HBase’

Apache Hadoop 生态圈成员介绍

  • Common: 一组分布文件系统和通用 I/O 组件与接口(序列化、Java RPC 和持久化数据结构)。
  • Avro: 一种支持高效、跨语言的 RPC 以及永久存储数据的序列化系统。
  • MapReduce: 分布式数据处理模型和执行环境、运行于大型商用机集群。
  • HDFS: 分布式文件系统,运行于大型商用机集群。
  • Pig: 一种数据流语言和运行环境,用以检索非常大的数据集。Pig 运行在 MapReduce 和 HDFS 的集群上。
  • Hive: 一个分布式、按列存储的数据仓库。 Hive 管理 HDFS 中存储的数据,并提供基于 SQL 的查询语言(由运行时引擎翻译成 MapReduce作业)用以查询数据。
  • HBase: 一个分布式、按列存储的数据仓库。HBase 使用 HDFS 作为底层存储,同时支持 MapReduce 的批量式计算和点查询(随机读取)。
  • ZooKeeper: 一个分布式、高可用的协调服务。ZooKeeper 提供分布式锁之类的基本服务用于构建分布式应用。
  • Sqoop: 在数据库和 HDFS 之间高效传输数据的工具。

关系型数据库与 MapReduce 的比较

  传统关系型数据库 MapReduce
数据大小 GB PB
访问 交互式和批处理 批处理
更新 多次读写 一次写入多次读取
结构 静态模式 动态模式
完整性
横向扩展 非线性 线性

HBase Shell Help

HBase Shell, version 0.90.4, r1150278, Sun Jul 24 15:53:29 PDT 2011
Type 'help "COMMAND"', (e.g. 'help "get"' -- the quotes are necessary) for help on a specific command.
Commands are grouped. Type 'help "COMMAND_GROUP"', (e.g. 'help "general"') for help on a command group.

COMMAND GROUPS:
  Group name: general
  Commands: status, version

  Group name: ddl
  Commands: alter, create, describe, disable, drop, enable, exists, is_disabled, is_enabled, list

  Group name: dml
  Commands: count, delete, deleteall, get, get_counter, incr, put, scan, truncate

  Group name: tools
  Commands: assign, balance_switch, balancer, close_region, compact, flush, major_compact, move, split, unassign, zk_dump

  Group name: replication
  Commands: add_peer, disable_peer, enable_peer, remove_peer, start_replication, stop_replication

SHELL USAGE:
Quote all names in HBase Shell such as table and column names.  Commas delimit
command parameters.  Type <RETURN> after entering a command to run it.
Dictionaries of configuration used in the creation and alteration of tables are
Ruby Hashes. They look like this:

  {'key1' => 'value1', 'key2' => 'value2', ...}

and are opened and closed with curley-braces.  Key/values are delimited by the
'=>' character combination.  Usually keys are predefined constants such as
NAME, VERSIONS, COMPRESSION, etc.  Constants do not need to be quoted.  Type
'Object.constants' to see a (messy) list of all constants in the environment.

If you are using binary keys or values and need to enter them in the shell, use
double-quote'd hexadecimal representation. For example:

  hbase> get 't1', "key\x03\x3f\xcd"
  hbase> get 't1', "key\003\023\011"
  hbase> put 't1', "test\xef\xff", 'f1:', "\x01\x33\x40"

The HBase shell is the (J)Ruby IRB with the above HBase-specific commands added.
For more on the HBase Shell, see http://hbase.apache.org/docs/current/book.html

HBase 简介

HBase 是 Hadoop 数据库. 想象它是一个超快的可靠的大型数据仓库.

何时使用 HBase

当需要随机、实时地读写访问大型数据的时候,可以使用 HBase. 该项目的目标就是托管超大型的表——数十亿行*数百万列 ——位于硬件集群之上。HBase 是开源的、分布式的、版本化的、面向列的仓库。它是山寨谷歌的 BigTable(一个分布式的结构化存储系统),创始人为Chang et al.就像 BigTable 依靠 Google File System 提供分布式存储,HBase 基于 Hadoop 和 HDFS 提供了类似于 BigTable 的功能。