Hakuna MapData! » Doubts Resolving

Recreating HBase table without violating region starting keys

| Posted in Doubts Resolving, Troubleshooting |


Today, I was using completebulkload to load larger amount of data into HBase. To keep this process well-balanced over the entire cluster (and thus faster), I was loading data into a table with pre-created regions. Since my bulkloading process failed in the middle a couple of times due to some misconfiguration, I needed to truncate the table each time.

I have noticed that a command like

hbase(main):017:0> truncate 'table'

will disable, drop and recreate the table with the same name settings (number of column familiers, compression, ttl, blocksize etc), but it does not maintain the region boundaries.

Why put is better than copyFromLocal when coping files to HDFS?

| Posted in Doubts Resolving |


When you type hadoop fs, you may find following options quite similar:

akawa@hadoop:~$ hadoop fs
Usage: hadoop fs [generic options]
       [-copyFromLocal < localsrc > ... < dst >]
       [-put < localsrc > ... < dst >]

HDFS Shell Guide

Let’s have a quick look at the offical HDFS Shell Guide to find out the differences between them (descriptions bellow are slightly edited to make them more compact):