Package org.apache.hadoop.hbase.tool
Class BulkLoadHFilesTool
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.hbase.tool.LoadIncrementalHFiles
org.apache.hadoop.hbase.tool.BulkLoadHFilesTool
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
,BulkLoadHFiles
,org.apache.hadoop.util.Tool
@LimitedPrivate("Tools")
public class BulkLoadHFilesTool
extends LoadIncrementalHFiles
implements BulkLoadHFiles
The implementation for
BulkLoadHFiles
, and also can be executed from command line as a
tool.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.tool.LoadIncrementalHFiles
LoadIncrementalHFiles.LoadQueueItem
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.tool.BulkLoadHFiles
BulkLoadHFiles.LoadQueueItem
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.tool.LoadIncrementalHFiles
ALWAYS_COPY_FILES, CREATE_TABLE_CONF_KEY, FAIL_IF_NEED_SPLIT_HFILE, IGNORE_UNMATCHED_CF_CONF_KEY, MAX_FILES_PER_REGION_PER_FAMILY, RETRY_ON_IO_EXCEPTION, TMP_DIR
Fields inherited from interface org.apache.hadoop.hbase.tool.BulkLoadHFiles
ALWAYS_COPY_FILES, ASSIGN_SEQ_IDS, BULK_LOAD_HFILES_BY_FAMILY, CREATE_TABLE_CONF_KEY, IGNORE_UNMATCHED_CF_CONF_KEY, MAX_FILES_PER_REGION_PER_FAMILY, RETRY_ON_IO_EXCEPTION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionPerform a bulk load of the given directory into the given pre-existing table.Perform a bulk load of the given directory into the given pre-existing table.private Map<BulkLoadHFiles.LoadQueueItem,
ByteBuffer> static void
Methods inherited from class org.apache.hadoop.hbase.tool.LoadIncrementalHFiles
buildClientServiceCallable, bulkLoadPhase, disableReplication, doBulkLoad, doBulkLoad, doBulkLoad, groupOrSplit, inferBoundaries, initialize, loadHFileQueue, loadHFileQueue, prepareHFileQueue, prepareHFileQueue, prepareHFileQueue, run, run, run, run, setBulkToken, setClusterIds, splitStoreFile, tryAtomicRegionLoad, tryAtomicRegionLoad
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
BulkLoadHFilesTool
-
-
Method Details
-
convert
-
bulkLoad
public Map<BulkLoadHFiles.LoadQueueItem,ByteBuffer> bulkLoad(TableName tableName, Map<byte[], List<org.apache.hadoop.fs.Path>> family2Files) throws TableNotFoundException, IOExceptionDescription copied from interface:BulkLoadHFiles
Perform a bulk load of the given directory into the given pre-existing table.- Specified by:
bulkLoad
in interfaceBulkLoadHFiles
- Parameters:
tableName
- the table to load intofamily2Files
- map of family to List of hfiles- Throws:
TableNotFoundException
- if table does not yet existIOException
-
bulkLoad
public Map<BulkLoadHFiles.LoadQueueItem,ByteBuffer> bulkLoad(TableName tableName, org.apache.hadoop.fs.Path dir) throws TableNotFoundException, IOException Description copied from interface:BulkLoadHFiles
Perform a bulk load of the given directory into the given pre-existing table.- Specified by:
bulkLoad
in interfaceBulkLoadHFiles
- Parameters:
tableName
- the table to load intodir
- the directory that was provided as the output path of a job usingHFileOutputFormat
- Throws:
TableNotFoundException
- if table does not yet existIOException
-
main
- Throws:
Exception
-