Class CopyTable
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.hbase.mapreduce.CopyTable
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
,org.apache.hadoop.util.Tool
@Public
public class CopyTable
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
Tool used to copy a table to another one which can be on a different setup. It is also
configurable with a start and time as well as a specification of the region server implementation
if different from the local cluster.
-
Field Summary
Modifier and TypeFieldDescription(package private) boolean
(package private) int
(package private) boolean
(package private) org.apache.hadoop.fs.Path
(package private) int
(package private) String
(package private) long
(package private) String
private static final String
private static final org.slf4j.Logger
(package private) static final String
(package private) String
(package private) boolean
(package private) static boolean
(package private) String
(package private) String
(package private) long
(package private) String
(package private) String
(package private) int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.mapreduce.Job
createSubmittableJob
(String[] args) Sets up the actual job.private boolean
doCommandLine
(String[] args) private org.apache.hadoop.fs.Path
generateUniqTempDir
(boolean withDirCreated) private void
initCopyTableMapperReducerJob
(org.apache.hadoop.mapreduce.Job job, Scan scan) static void
Main entry point.private static void
printUsage
(String errorMsg) int
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
-
LOG
-
NAME
- See Also:
-
startTime
long startTime -
endTime
long endTime -
batch
int batch -
cacheRow
int cacheRow -
versions
int versions -
tableName
-
startRow
-
stopRow
-
dstTableName
-
peerAddress
-
families
-
allCells
boolean allCells -
shuffle
-
bulkload
boolean bulkload -
bulkloadDir
org.apache.hadoop.fs.Path bulkloadDir -
readingSnapshot
boolean readingSnapshot -
snapshot
-
JOB_NAME_CONF_KEY
- See Also:
-
-
Constructor Details
-
CopyTable
public CopyTable()
-
-
Method Details
-
generateUniqTempDir
- Throws:
IOException
-
initCopyTableMapperReducerJob
private void initCopyTableMapperReducerJob(org.apache.hadoop.mapreduce.Job job, Scan scan) throws IOException - 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.
-
printUsage
-
doCommandLine
-
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
-