Class WALPlayer
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.hbase.mapreduce.WALPlayer
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable,org.apache.hadoop.util.Tool
@Public
public class WALPlayer
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
A tool to replay WAL files as a M/R job. The WAL can be replayed for a set of tables or all
tables, and a time range can be provided (in milliseconds). The WAL is filtered to the passed set
of tables and the output can optionally be mapped to another set of tables. WAL replay can also
generate HFiles for later bulk importing, in that case the WAL is replayed for a single table
only.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static enumEnum for map metrics.(package private) static classA mapper that just writes out KeyValues.protected static classA mapper that writes outMutationto be directly applied to a running HBase instance. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.mapreduce.JobcreateSubmittableJob(String[] args) Sets up the actual job.private static RegionLocatorgetRegionLocator(TableName tableName, org.apache.hadoop.conf.Configuration conf, Connection conn) getTableNameList(String[] tables) static voidMain entry point.int(package private) voidprivate voidPrint usageMethods inherited from class org.apache.hadoop.conf.Configured
getConf, setConfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
-
Field Details
-
LOG
-
NAME
- See Also:
-
BULK_OUTPUT_CONF_KEY
- See Also:
-
TABLES_KEY
- See Also:
-
TABLE_MAP_KEY
- See Also:
-
INPUT_FILES_SEPARATOR_KEY
- See Also:
-
IGNORE_MISSING_FILES
- See Also:
-
MULTI_TABLES_SUPPORT
- See Also:
-
tableSeparator
- See Also:
-
JOB_NAME_CONF_KEY
- See Also:
-
-
Constructor Details
-
WALPlayer
public WALPlayer() -
WALPlayer
-
-
Method Details
-
setupTime
- Throws:
IOException
-
createSubmittableJob
Sets up the actual job.- Parameters:
args- The command line parameters.- Returns:
- The newly created job.
- Throws:
IOException- When setting up the job fails.
-
getTableNameList
-
usage
Print usage- Parameters:
errorMsg- Error message. Can be null.
-
main
Main entry point.- Parameters:
args- The command line parameters.- Throws:
Exception- When running the job fails.
-
run
- Specified by:
runin interfaceorg.apache.hadoop.util.Tool- Throws:
Exception
-
getRegionLocator
private static RegionLocator getRegionLocator(TableName tableName, org.apache.hadoop.conf.Configuration conf, Connection conn) throws IOException - Throws:
IOException
-