—Learn HBase

Advertisements

 

REPORT THIS AD

—Learn HBase

Welcome to Apache HBase blog.

 

March 2, 2013

Uncategorized

53 Comments

HBase shell commands

As told in HBase introduction, HBase provides Extensible jruby-based (JIRB) shell as a feature to execute some commands(each command represents one functionality).

HBase shell commands are mainly categorized into 6 parts

1) General  HBase shell commands

statusShow cluster status. Can be ‘summary’, ‘simple’, or ‘detailed’. The
default is ‘summary’.

 

hbase> status
hbase> status ‘simple’
hbase> status ‘summary’
hbase> status ‘detailed’

versionOutput this HBase versionUsage:

 

hbase> version

whoamiShow the current hbase user.Usage:

 

hbase> whoami

2) Tables Management commands

alterAlter column family schema; pass table name and a dictionary
specifying new column family schema. Dictionaries are described
on the main help command output. Dictionary must include name
of column family to alter.For example, to change or add the ‘f1’ column family in table ‘t1’ from
current value to keep a maximum of 5 cell VERSIONS, do:

 

hbase> alter ‘t1’, NAME => ‘f1’, VERSIONS => 5

You can operate on several column families:

hbase> alter ‘t1’, ‘f1’, {NAME => ‘f2’, IN_MEMORY => true}, {NAME => ‘f3’, VERSIONS => 5}

To delete the ‘f1’ column family in table ‘t1’, use one of:hbase> alter ‘t1’, NAME => ‘f1’, METHOD => ‘delete’
hbase> alter ‘t1’, ‘delete’ => ‘f1’

You can also change table-scope attributes like MAX_FILESIZE, READONLY,
MEMSTORE_FLUSHSIZE, DEFERRED_LOG_FLUSH, etc. These can be put at the end;
for example, to change the max size of a region to 128MB, do:

hbase> alter ‘t1’, MAX_FILESIZE => ‘134217728’

You can add a table coprocessor by setting a table coprocessor attribute:

hbase> alter ‘t1’,
‘coprocessor’=>’hdfs:///foo.jar|com.foo.FooRegionObserver|1001|arg1=1,arg2=2’

Since you can have multiple coprocessors configured for a table, a
sequence number will be automatically appended to the attribute name
to uniquely identify it.

The coprocessor attribute must match the pattern below in order for
the framework to understand how to load the coprocessor classes:

[coprocessor jar file location] | class name | [priority] | [arguments]

You can also set configuration settings specific to this table or column family:

hbase> alter ‘t1’, CONFIGURATION => {‘hbase.hregion.scan.loadColumnFamiliesOnDemand’ => ‘true’}
hbase> alter ‘t1’, {NAME => ‘f2’, CONFIGURATION => {‘hbase.hstore.blockingStoreFiles’ => ’10’}}

You can also remove a table-scope attribute:

hbase> alter ‘t1’, METHOD => ‘table_att_unset’, NAME => ‘MAX_FILESIZE’

hbase> alter ‘t1’, METHOD => ‘table_att_unset’, NAME => ‘coprocessor$1’

There could be more than one alteration in one command:

hbase> alter ‘t1’, { NAME => ‘f1’, VERSIONS => 3 },
{ MAX_FILESIZE => ‘134217728’ }, { METHOD => ‘delete’, NAME => ‘f2’ },
OWNER => ‘johndoe’, METADATA => { ‘mykey’ => ‘myvalue’ }

createCreate table; pass table name, a dictionary of specifications per
column family, and optionally a dictionary of table configuration.

 

hbase> create ‘t1’, {NAME => ‘f1’, VERSIONS => 5}
hbase> create ‘t1’, {NAME => ‘f1’}, {NAME => ‘f2’}, {NAME => ‘f3’}
hbase> # The above in shorthand would be the following:
hbase> create ‘t1’, ‘f1’, ‘f2’, ‘f3’
hbase> create ‘t1’, {NAME => ‘f1’, VERSIONS => 1, TTL => 2592000, BLOCKCACHE => true}
hbase> create ‘t1’, {NAME => ‘f1’, CONFIGURATION => {‘hbase.hstore.blockingStoreFiles’ => ’10’}}

Table configuration options can be put at the end.

describeDescribe the named table.

 

hbase> describe ‘t1’

disableStart disable of named table

 

hbase> disable ‘t1’

disable_allDisable all of tables matching the given regex

 

hbase> disable_all ‘t.*’

is_disabledverifies Is named table disabled

 

hbase> is_disabled ‘t1’

drop Drop the named table. Table must first be disabled

 

hbase> drop ‘t1’

drop_allDrop all of the tables matching the given regex

 

hbase> drop_all ‘t.*’

enableStart enable of named table

 

hbase> enable ‘t1’

enable_allEnable all of the tables matching the given regex

 

hbase> enable_all ‘t.*’

is_enabledverifies Is named table enabled

 

hbase> is_enabled ‘t1’

existsDoes the named table exist

 

hbase> exists ‘t1’

listList all tables in hbase. Optional regular expression parameter could
be used to filter the output

 

hbase> list
hbase> list ‘abc.*’

show_filtersShow all the filters in hbase.

 

hbase> show_filters

alter_statusGet the status of the alter command. Indicates the number of regions of the table that have received the updated schema Pass table name.

 

hbase> alter_status ‘t1’

alter_asyncAlter column family schema, does not wait for all regions to receive the
schema changes. Pass table name and a dictionary specifying new column
family schema. Dictionaries are described on the main help command output.
Dictionary must include name of column family to alter.

 

To change or add the ‘f1’ column family in table ‘t1’ from defaults
to instead keep a maximum of 5 cell VERSIONS, do:hbase> alter_async ‘t1’, NAME => ‘f1’, VERSIONS => 5To delete the ‘f1’ column family in table ‘t1’, do:

hbase> alter_async ‘t1’, NAME => ‘f1’, METHOD => ‘delete’or a shorter version:hbase> alter_async ‘t1’, ‘delete’ => ‘f1’

You can also change table-scope attributes like MAX_FILESIZE
MEMSTORE_FLUSHSIZE, READONLY, and DEFERRED_LOG_FLUSH.

For example, to change the max size of a family to 128MB, do:

hbase> alter ‘t1’, METHOD => ‘table_att’, MAX_FILESIZE => ‘134217728’

There could be more than one alteration in one command:

hbase> alter ‘t1’, {NAME => ‘f1’}, {NAME => ‘f2’, METHOD => ‘delete’}

To check if all the regions have been updated, use alter_status <table_name>

 

3) Data Manipulation commands  

countCount the number of rows in a table. Return value is the number of rows.
This operation may take a LONG time (Run ‘$HADOOP_HOME/bin/hadoop jar
hbase.jar rowcount’ to run a counting mapreduce job). Current count is shown
every 1000 rows by default. Count interval may be optionally specified. Scan
caching is enabled on count scans by default. Default cache size is 10 rows.
If your rows are small in size, you may want to increase this
parameter. Examples:hbase> count ‘t1’
hbase> count ‘t1’, INTERVAL => 100000
hbase> count ‘t1’, CACHE => 1000
hbase> count ‘t1’, INTERVAL => 10, CACHE => 1000

 

The same commands also can be run on a table reference. Suppose you had a reference
t to table ‘t1’, the corresponding commands would be:hbase> t.count
hbase> t.count INTERVAL => 100000
hbase> t.count CACHE => 1000
hbase> t.count INTERVAL => 10, CACHE => 1000

deletePut a delete cell value at specified table/row/column and optionally
timestamp coordinates. Deletes must match the deleted cell’s
coordinates exactly. When scanning, a delete cell suppresses older
versions. To delete a cell from ‘t1’ at row ‘r1’ under column ‘c1’
marked with the time ‘ts1’, do:

 

hbase> delete ‘t1’, ‘r1’, ‘c1’, ts1

The same command can also be run on a table reference. Suppose you had a reference
t to table ‘t1’, the corresponding command would be:hbase> t.delete ‘r1’, ‘c1’, ts1

deleteallDelete all cells in a given row; pass a table name, row, and optionally
a column and timestamp. Examples:hbase> deleteall ‘t1’, ‘r1’
hbase> deleteall ‘t1’, ‘r1’, ‘c1’
hbase> deleteall ‘t1’, ‘r1’, ‘c1’, ts1

 

The same commands also can be run on a table reference. Suppose you had a reference
t to table ‘t1’, the corresponding command would be:hbase> t.deleteall ‘r1’
hbase> t.deleteall ‘r1’, ‘c1’
hbase> t.deleteall ‘r1’, ‘c1’, ts1

getGet row or cell contents; pass table name, row, and optionally
a dictionary of column(s), timestamp, timerange and versions. Examples:

 

hbase> get ‘t1’, ‘r1’
hbase> get ‘t1’, ‘r1’, {TIMERANGE => [ts1, ts2]}
hbase> get ‘t1’, ‘r1’, {COLUMN => ‘c1’}
hbase> get ‘t1’, ‘r1’, {COLUMN => [‘c1’, ‘c2’, ‘c3’]}
hbase> get ‘t1’, ‘r1’, {COLUMN => ‘c1’, TIMESTAMP => ts1}
hbase> get ‘t1’, ‘r1’, {COLUMN => ‘c1’, TIMERANGE => [ts1, ts2], VERSIONS => 4}
hbase> get ‘t1’, ‘r1’, {COLUMN => ‘c1’, TIMESTAMP => ts1, VERSIONS => 4}
hbase> get ‘t1’, ‘r1’, {FILTER => “ValueFilter(=, ‘binary:abc’)”}
hbase> get ‘t1’, ‘r1’, ‘c1’
hbase> get ‘t1’, ‘r1’, ‘c1’, ‘c2’
hbase> get ‘t1’, ‘r1’, [‘c1’, ‘c2’]

Besides the default ‘toStringBinary’ format, ‘get’ also supports custom formatting by
column. A user can define a FORMATTER by adding it to the column name in the get
specification. The FORMATTER can be stipulated:1. either as a org.apache.hadoop.hbase.util.Bytes method name (e.g, toInt, toString)
2. or as a custom class followed by method name: e.g. ‘c(MyFormatterClass).format’.Example formatting cf:qualifier1 and cf:qualifier2 both as Integers:
hbase> get ‘t1’, ‘r1’ {COLUMN => [‘cf:qualifier1:toInt’,
‘cf:qualifier2:c(org.apache.hadoop.hbase.util.Bytes).toInt’] }

Note that you can specify a FORMATTER by column only (cf:qualifer). You cannot specify
a FORMATTER for all columns of a column family.The same commands also can be run on a reference to a table (obtained via get_table or
create_table). Suppose you had a reference t to table ‘t1’, the corresponding commands
would be:

hbase> t.get ‘r1’
hbase> t.get ‘r1’, {TIMERANGE => [ts1, ts2]}
hbase> t.get ‘r1’, {COLUMN => ‘c1’}
hbase> t.get ‘r1’, {COLUMN => [‘c1’, ‘c2’, ‘c3’]}
hbase> t.get ‘r1’, {COLUMN => ‘c1’, TIMESTAMP => ts1}
hbase> t.get ‘r1’, {COLUMN => ‘c1’, TIMERANGE => [ts1, ts2], VERSIONS => 4}
hbase> t.get ‘r1’, {COLUMN => ‘c1’, TIMESTAMP => ts1, VERSIONS => 4}
hbase> t.get ‘r1’, {FILTER => “ValueFilter(=, ‘binary:abc’)”}
hbase> t.get ‘r1’, ‘c1’
hbase> t.get ‘r1’, ‘c1’, ‘c2’
hbase> t.get ‘r1’, [‘c1’, ‘c2’]

get_counterReturn a counter cell value at specified table/row/column coordinates.
A cell cell should be managed with atomic increment function oh HBase
and the data should be binary encoded. Example:

 

hbase> get_counter ‘t1’, ‘r1’, ‘c1’

The same commands also can be run on a table reference. Suppose you had a reference
t to table ‘t1’, the corresponding command would be:

hbase> t.get_counter ‘r1’, ‘c1’

incrIncrements a cell ‘value’ at specified table/row/column coordinates.
To increment a cell value in table ‘t1’ at row ‘r1’ under column
‘c1’ by 1 (can be omitted) or 10 do:

 

hbase> incr ‘t1’, ‘r1’, ‘c1’
hbase> incr ‘t1’, ‘r1’, ‘c1’, 1
hbase> incr ‘t1’, ‘r1’, ‘c1’, 10

The same commands also can be run on a table reference. Suppose you had a reference
t to table ‘t1’, the corresponding command would be:hbase> t.incr ‘r1’, ‘c1’
hbase> t.incr ‘r1’, ‘c1’, 1
hbase> t.incr ‘r1’, ‘c1’, 10

putPut a cell ‘value’ at specified table/row/column and optionally
timestamp coordinates. To put a cell value into table ‘t1’ at
row ‘r1’ under column ‘c1’ marked with the time ‘ts1’, do:

 

hbase> put ‘t1’, ‘r1’, ‘c1’, ‘value’, ts1

The same commands also can be run on a table reference. Suppose you had a reference
t to table ‘t1’, the corresponding command would be:

hbase> t.put ‘r1’, ‘c1’, ‘value’, ts1

scanScan a table; pass table name and optionally a dictionary of scanner
specifications. Scanner specifications may include one or more of:
TIMERANGE, FILTER, LIMIT, STARTROW, STOPROW, TIMESTAMP, MAXLENGTH,
or COLUMNS, CACHEIf no columns are specified, all columns will be scanned.
To scan all members of a column family, leave the qualifier empty as in
‘col_family:’.The filter can be specified in two ways:
1. Using a filterString – more information on this is available in the
Filter Language document attached to the HBASE-4176 JIRA
2. Using the entire package name of the filter.Some examples:hbase> scan ‘.META.’
hbase> scan ‘.META.’, {COLUMNS => ‘info:regioninfo’}
hbase> scan ‘t1’, {COLUMNS => [‘c1’, ‘c2’], LIMIT => 10, STARTROW => ‘xyz’}
hbase> scan ‘t1’, {COLUMNS => ‘c1’, TIMERANGE => [1303668804, 1303668904]}
hbase> scan ‘t1’, {FILTER => “(PrefixFilter (‘row2’) AND
(QualifierFilter (>=, ‘binary:xyz’))) AND (TimestampsFilter ( 123, 456))”}
hbase> scan ‘t1’, {FILTER =>
org.apache.hadoop.hbase.filter.ColumnPaginationFilter.new(1, 0)}

 

For experts, there is an additional option — CACHE_BLOCKS — which
switches block caching for the scanner on (true) or off (false). By
default it is enabled. Examples:hbase> scan ‘t1’, {COLUMNS => [‘c1’, ‘c2’], CACHE_BLOCKS => false}

Also for experts, there is an advanced option — RAW — which instructs the
scanner to return all cells (including delete markers and uncollected deleted
cells). This option cannot be combined with requesting specific COLUMNS.
Disabled by default. Example:

hbase> scan ‘t1’, {RAW => true, VERSIONS => 10}

Besides the default ‘toStringBinary’ format, ‘scan’ supports custom formatting
by column. A user can define a FORMATTER by adding it to the column name in
the scan specification. The FORMATTER can be stipulated:

1. either as a org.apache.hadoop.hbase.util.Bytes method name (e.g, toInt, toString)
2. or as a custom class followed by method name: e.g. ‘c(MyFormatterClass).format’.

Example formatting cf:qualifier1 and cf:qualifier2 both as Integers:
hbase> scan ‘t1’, {COLUMNS => [‘cf:qualifier1:toInt’,
‘cf:qualifier2:c(org.apache.hadoop.hbase.util.Bytes).toInt’] }

Note that you can specify a FORMATTER by column only (cf:qualifer). You cannot
specify a FORMATTER for all columns of a column family.

Scan can also be used directly from a table, by first getting a reference to a
table, like such:

hbase> t = get_table ‘t’
hbase> t.scan

Note in the above situation, you can still provide all the filtering, columns,
options, etc as described above.

truncateDisables, drops and recreates the specified table.
Examples:
hbase>truncate ‘t1’

4) HBase surgery tools

assignAssign a region. Use with caution. If region already assigned,
this command will do a force reassign. For experts only.
Examples:
hbase> assign ‘REGION_NAME’
balancerTrigger the cluster balancer. Returns true if balancer ran and was able to
tell the region servers to unassign all the regions to balance (the re-assignment itself is async).
Otherwise false (Will not run if regions in transition).
Examples:
hbase> balancer
balance_switchEnable/Disable balancer. Returns previous balancer state.
Examples:

 

hbase> balance_switch true
hbase> balance_switch false

close_regionClose a single region. Ask the master to close a region out on the cluster
or if ‘SERVER_NAME’ is supplied, ask the designated hosting regionserver to
close the region directly. Closing a region, the master expects ‘REGIONNAME’
to be a fully qualified region name. When asking the hosting regionserver to
directly close a region, you pass the regions’ encoded name only. A region
name looks like this:TestTable,0094429456,1289497600452.527db22f95c8a9e0116f0cc13c680396.The trailing period is part of the regionserver name. A region’s encoded name
is the hash at the end of a region name; e.g. 527db22f95c8a9e0116f0cc13c680396
(without the period). A ‘SERVER_NAME’ is its host, port plus startcode. For
example: host187.example.com,60020,1289493121758 (find servername in master ui
or when you do detailed status in shell). This command will end up running
close on the region hosting regionserver. The close is done without the
master’s involvement (It will not know of the close). Once closed, region will
stay closed. Use assign to reopen/reassign. Use unassign or move to assign
the region elsewhere on cluster. Use with caution. For experts only.
Examples:hbase> close_region ‘REGIONNAME’
hbase> close_region ‘REGIONNAME’, ‘SERVER_NAME’
compactCompact all regions in passed table or pass a region row
to compact an individual region. You can also compact a single column
family within a region.
Examples:
Compact all regions in a table:
hbase> compact ‘t1’
Compact an entire region:
hbase> compact ‘r1’
Compact only a column family within a region:
hbase> compact ‘r1’, ‘c1’
Compact a column family within a table:
hbase> compact ‘t1’, ‘c1’
flushFlush all regions in passed table or pass a region row to
flush an individual region. For example:hbase> flush ‘TABLENAME’
hbase> flush ‘REGIONNAME’
major_compactRun major compaction on passed table or pass a region row
to major compact an individual region. To compact a single
column family within a region specify the region name
followed by the column family name.
Examples:
Compact all regions in a table:
hbase> major_compact ‘t1’
Compact an entire region:
hbase> major_compact ‘r1’
Compact a single column family within a region:
hbase> major_compact ‘r1’, ‘c1’
Compact a single column family within a table:
hbase> major_compact ‘t1’, ‘c1’
moveMove a region. Optionally specify target regionserver else we choose one
at random. NOTE: You pass the encoded region name, not the region name so
this command is a little different to the others. The encoded region name
is the hash suffix on region names: e.g. if the region name were
TestTable,0094429456,1289497600452.527db22f95c8a9e0116f0cc13c680396. then
the encoded region name portion is 527db22f95c8a9e0116f0cc13c680396
A server name is its host, port plus startcode. For example:
host187.example.com,60020,1289493121758
Examples:hbase> move ‘ENCODED_REGIONNAME’
hbase> move ‘ENCODED_REGIONNAME’, ‘SERVER_NAME’
splitSplit entire table or pass a region to split individual region. With the
second parameter, you can specify an explicit split key for the region.
Examples:
split ‘tableName’
split ‘regionName’ # format: ‘tableName,startKey,id’
split ‘tableName’, ‘splitKey’
split ‘regionName’, ‘splitKey’
unassignUnassign a region. Unassign will close region in current location and then
reopen it again. Pass ‘true’ to force the unassignment (‘force’ will clear
all in-memory state in master before the reassign. If results in
double assignment use hbck -fix to resolve. To be used by experts).
Use with caution. For expert use only. Examples:hbase> unassign ‘REGIONNAME’
hbase> unassign ‘REGIONNAME’, true
hlog_rollRoll the log writer. That is, start writing log messages to a new file.
The name of the regionserver should be given as the parameter. A
‘server_name’ is the host, port plus startcode of a regionserver. For
example: host187.example.com,60020,1289493121758 (find servername in
master ui or when you do detailed status in shell)

 

hbase>hlog_roll

zk_dumpDump status of HBase cluster as seen by ZooKeeper. Example:
hbase>zk_dump
 

5) Cluster replication tools

add_peerAdd a peer cluster to replicate to, the id must be a short and
the cluster key is composed like this:
hbase.zookeeper.quorum:hbase.zookeeper.property.clientPort:zookeeper.znode.parent
This gives a full path for HBase to connect to another cluster.
Examples:hbase> add_peer ‘1’, “server1.cie.com:2181:/hbase”
hbase> add_peer ‘2’, “zk1,zk2,zk3:2182:/hbase-prod”
remove_peerStops the specified replication stream and deletes all the meta
information kept about it. Examples:

 

hbase> remove_peer ‘1’

list_peersList all replication peer clusters.
hbase> list_peers
enable_peerRestarts the replication to the specified peer cluster,
continuing from where it was disabled.Examples:

 

hbase> enable_peer ‘1’

disable_peerStops the replication stream to the specified cluster, but still
keeps track of new edits to replicate.Examples:

 

hbase> disable_peer ‘1’

start_replicationRestarts all the replication features. The state in which each
stream starts in is undetermined.
WARNING:
start/stop replication is only meant to be used in critical load situations.
Examples:

 

hbase> start_replication

stop_replicationStops all the replication features. The state in which each
stream stops in is undetermined.
WARNING:
start/stop replication is only meant to be used in critical load situations.
Examples:

 

hbase> stop_replication

6) Security tools

grantGrant users specific rights.
Syntax : grantpermissions is either zero or more letters from the set “RWXCA”.
READ(‘R’), WRITE(‘W’), EXEC(‘X’), CREATE(‘C’), ADMIN(‘A’)For example:hbase> grant ‘bobsmith’, ‘RWXCA’
hbase> grant ‘bobsmith’, ‘RW’, ‘t1’, ‘f1’, ‘col1’
revokeRevoke a user’s access rights.
Syntax : revoke
For example:

 

hbase> revoke ‘bobsmith’, ‘t1’, ‘f1’, ‘col1’

user_permissionShow all permissions for the particular user.
Syntax : user_permission
For example:hbase> user_permission
hbase> user_permission ‘table1’

Advertisements

 

REPORT THIS AD

Share this:

 

← Previous post

Advertisements

 

REPORT THIS AD

 

Recent Posts

Recent Comments

 Veerendra Nath Jasth… on HBase shell commands
 nickvt on HBase shell commands

Archives

Categories

Meta

Advertisements

 

REPORT THIS AD

53 comments

  1. Vimal said:August 16, 20139:06 am

     

    Excellent content .. Thanks

    Reply ↓

  2. Sarav said:December 1, 20137:12 pm

     

    excellent COmpilation

    Reply ↓

  3. Pingback: [转]HBase Shell commands(HBase Shell 命令) -超级用户

  4. faraz said:January 13, 20146:21 am

     

    USER=”root”
    PASSWORD=”abc1234″
    db=faraz
    table=tree
    mysqldump -u$USER -p$PASSWORD $db $table > /tmp/tablename.sql
    mysql -u$USER -p$PASSWORD $db -e “truncate table $table”

    this script is truncating the single table of a database named as faraz, but i wana truncate multiple tables, what syntax i need to use ?????

    Reply ↓

    • Dinesh Sakote said:June 9, 20169:14 pm

       

      in the line
      hbase> get ‘t1’, ‘r1’ {COLUMN => [‘cf:qualifier1:toInt’,
      ‘cf:qualifier2:c(org.apache.hadoop.hbase.util.Bytes).toInt’] }

      A ‘,’ is missing after ‘r1’

      Reply ↓

  5. Pritesh said:March 30, 201411:33 am

     

    As we had configured HBase 0.94.1 pseudo Distributed mode Hadoop 1.0.3 & It’s working fine but when tried put operation once data is stored into one row with column family.then for next row when we tried to store for next Data it overwrites the previous data. & we have to create new object of put every time for each file which does’t seem Feasible. so we would like to know how to insert record automatically in next row in hbase?

    Reply ↓

    • Abhishek said:February 9, 20155:02 pm

       

      you might not be using unique rowkey. It the rowkey is same the latest data will overwrite.

      Reply ↓

  6. rajeshhcu32 said:March 30, 20143:23 pm

     

    Hi Pritesh, If you want to do puts in bulk, you can prepare list of puts and do put all together. If you feel its difficult just ask the same question at HBase user mailing list(user@hbase.apache.org).
    Thanks.

    Reply ↓

  7. OpenKB said:May 20, 20146:06 pm

     

    Nice reference. I will try to build my tests on all hbase shell commands also.

    Reply ↓

  8. Bin said:July 16, 20147:40 pm

     

    Nice post.
    I’m wondering why you specify both the timestamp and versions during get
    t.get ‘r1′, {COLUMN => ‘c1′, TIMESTAMP => ts1, VERSIONS => 4}
    Since TIMESTAMP has been set to ts1, it is obvious that only (up to) one version can match and so, VERSIONS => 4 will be useless.
    Instead, use following to get multiple versions of cells back
    t.get ‘r1′, {COLUMN => ‘c1′, VERSIONS => 4}

    Reply ↓

  9. Jahid said:July 22, 20147:11 pm

     

    Nice post.Great

    Reply ↓

  10. Pingback: HBase tables from Hive | Kevin's Blog

  11. Johnk120 said:September 3, 20149:00 pm

     

    Hey very cool blog!! Guy.. Beautiful.. Wonderful.. I will bookmark your website and take the feeds additionallyKI am satisfied to search out numerous useful information right here in the publish, we want develop more techniques on this regard, thank you for sharing dcdkdcekgfda

    Reply ↓

  12. Pingback: Getting started with distributed HBase and Zookeeper | Cyber Frontier Labs

  13. Naveen said:September 30, 201411:47 am

     

    any command for renaming a table

    Reply ↓

  14. Pingback: A binary rowkey in HBase shell | I love green and blue

  15. Sandip Adkar said:January 16, 201511:42 am

     

    Nice one!! Helped lot

    Reply ↓

  16. Ramkumar said:May 22, 20155:09 pm

     

    great job. thanks. do we have similar compilation for other hadoop projects or other nosql databases?
    thanks

    Reply ↓

  17. prabu said:July 26, 201511:36 am

     

    How to rename the column ?

    Reply ↓

  18. yenumulasudhirkumar said:August 24, 20156:10 am

     

    This content is already there in help command in hbase shell…Any thing new?

    Reply ↓

    Leave a ReplyCancel reply

     

    Fill in your details below or click an icon to log in:

    •  
    •  
    •  
    •  

     

    Very good understanding of hbase. I believe, i am having now after reading your blog.

    Thanks for supporting open source tools.

    Reply ↓

  19. Pingback: Emerging technologies relating to big data | IT Technologies

  20. Navdeep Singh said:January 20, 20165:41 am

     

    what is habse shell command to add column to existing hbase table safely.

    Reply ↓

  21. SRIHARI said:January 28, 20166:25 pm

     

    THANK U SIR….REALLY USEFUL SIR

    Reply ↓

  22. rajeev sinha said:February 2, 20161:52 am

     

    I am very new findthe topicinteresting and useful

    Reply ↓

  23. kiran said:April 7, 201612:49 am

     

    Really nice

    Reply ↓

  24. srikanth kulkarni said:April 11, 20165:08 pm

     

    Thank you!

    Reply ↓

  25. KV said:July 5, 20166:17 pm

     

    Great article.

    Reply ↓

  26. Pingback: HBase入门精要–百闻不如一Run | 神刀安全网

  27. paresh said:August 23, 201612:49 pm

     

    awesome material for learning hbase

    Reply ↓

  28. ankitbaldua said:October 12, 201610:36 am

     

    Great Compilation

    Reply ↓

  29. ankitbaldua said:October 12, 201610:44 am

     

    Reblogged this on Big Data – Baldua and commented:
    Great Compilation of HBASE Shell Commands

    Reply ↓

  30. Umesh patil said:October 19, 201610:32 am

     

    I m try to insert a large data in hbase1.2.2 in a single node cluster but it get stuck takes to time after that it shows an exception that could not found location which location it does mean. I checked hbase gui the write request stop at 294 but it does not write the whole data.. Plz help.. why its happening

    Reply ↓

  31. Piyush said:November 11, 20161:21 pm

     

    awesome contents together at on place.. perfectly done !!

    Reply ↓

  32. Pingback: HBase as primary NoSql Hadoop storage – Diving into Hadoop

  33. Pingback: #onenote# hbase – Think Note

  34. Pingback: HBase shell commands – Bhavesh Gadoya

  35. Learn hadoop big data training courses said:April 20, 20175:23 am

     

    Hi,
    I must appreciate you for providing such a valuable content for us. This is one amazing piece of article. Helped a lot in increasing my knowledge on Hadoop.
    Thanks,
    Jeswika,
    Learn hadoop big data training courses

    Reply ↓

  36. sarika said:April 24, 20175:30 am

     

    Thanks so much for writing this article. This is probably the best one by far. Easy to understand and educate myself on blog commenting and how the best way to go about it. Thanks a lot really appreciate you sharing this with us.

    Reply ↓

  37. DineshKumar said:April 28, 20175:03 am

     

    In Hadoop we have option to format name node. Similarly do we have option to format HBase?

    Reply ↓

    • rajeshhcu32 said:July 26, 201710:24 am

       

      Yes. You can use $HBASE_HOME/bin/hbase clean –cleanAll
      It will clean both hdfs and zookeeper data related to HBase.

      Reply ↓

  38. siva said:May 7, 20172:27 am

     

    really gr8 work bro thanks alot….
    i tried many materials to understand small thing they give pages and pages of story.

    Reply ↓

  39. Nagesh Kumar said:June 12, 201712:28 pm

     

    Thank you for sharing the information here. Its much informative and really i got some valid information. You have posted the amazing article on Hbase

    Reply ↓

  40. Leviya said:July 25, 20174:33 am

     

    Thank you somuch for the information. The information you provided is very helpful for Hbase Learners.

    Reply ↓

  41. johnybasha said:August 8, 201711:23 am

     

    Very elaborated and useful information.

    Reply ↓

  42. Naresh Kumar said:November 14, 20176:25 am

     

    Appreciate your work, very informative blog on HBase. I just wanted to share information about HBase Online Training. Hope it helps community here.

    Reply ↓

  43. tiandee said:December 11, 20178:16 am

     

    thank you

    Reply ↓

  44. Ayush said:April 6, 20182:33 pm

     

    Thank you for sharing the very helpful information.

    Could you please help us to understand the the timestamp values in Hbase.

    For example : hbase> scan ‘t1’, {COLUMNS => ‘c1’, TIMERANGE => [1303668804, 1303668904]}

    In above command, 1303668804, 1303668904 are used to set the time range, but these numbers are not interpret able directly to normal timestamp like 01012018153023 (DDMMYYYYHHMMSS).

    Thanks in advance…

    Reply ↓

  45. nickvt said:May 27, 20187:59 am

     

    Reblogged this on 码练 and commented:
    Great content!

    Reply ↓

  46. Veerendra Nath Jasthi said:July 5, 20182:58 pm

     

    how can i get the entire column family data if there are multiple cf ?

    Reply ↓

  47. Pingback: HBase学习与实践(基础部分) – 前端开发,JQUERY特效,全栈开发,vue开发

  48. spark geeks said:November 14, 20196:11 am

     

    Thanks for the very detail commands. I would like to share HBase commands cheat sheet full list. I hope It helps HBase community here.

    Reply ↓

  49. spark geeks said:November 14, 20196:15 am

     

    Very good article on HBase commands. Please check HBase shell commands cheat sheet and provide you command on this age.

    Reply ↓

Blog at WordPress.com.

:)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值