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
Modifier and TypeClassDescriptionprotected static enum
Enum for map metrics.(package private) static class
A mapper that just writes out KeyValues.protected static class
A mapper that writes outMutation
to be directly applied to a running HBase instance. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.mapreduce.Job
createSubmittableJob
(String[] args) Sets up the actual job.getTableNameList
(String[] tables) static void
Main entry point.int
(package private) void
private void
Print usageMethods 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
-
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:
run
in interfaceorg.apache.hadoop.util.Tool
- Throws:
Exception
-