/** * Main entry point. * * @param args The command line parameters. * @throws Exception When running the job fails. */ public static void main(String[] args) throws Exception { int ret = ToolRunner.run(HBaseConfiguration.create(), new CopyTable(), args); System.exit(ret); }
private boolean runCopy(String[] args) throws Exception { int status = ToolRunner.run(new Configuration(TEST_UTIL.getConfiguration()), new CopyTable(), args); return status == 0; }
private void doCopyTableTest(boolean bulkload) throws Exception { final TableName tableName1 = TableName.valueOf(name.getMethodName() + "1"); final TableName tableName2 = TableName.valueOf(name.getMethodName() + "2"); final byte[] FAMILY = Bytes.toBytes("family"); final byte[] COLUMN1 = Bytes.toBytes("c1"); try (Table t1 = TEST_UTIL.createTable(tableName1, FAMILY); Table t2 = TEST_UTIL.createTable(tableName2, FAMILY)) { // put rows into the first table loadData(t1, FAMILY, COLUMN1); CopyTable copy = new CopyTable(); int code; if (bulkload) { code = ToolRunner.run(new Configuration(TEST_UTIL.getConfiguration()), copy, new String[] { "--new.name=" + tableName2.getNameAsString(), "--bulkload", tableName1.getNameAsString() }); } else { code = ToolRunner.run(new Configuration(TEST_UTIL.getConfiguration()), copy, new String[] { "--new.name=" + tableName2.getNameAsString(), tableName1.getNameAsString() }); } assertEquals("copy job failed", 0, code); // verify the data was copied into table 2 verifyRows(t2, FAMILY, COLUMN1); } finally { TEST_UTIL.deleteTable(tableName1); TEST_UTIL.deleteTable(tableName2); } }
t1.put(p); CopyTable copy = new CopyTable(); assertEquals(0, ToolRunner.run(new Configuration(TEST_UTIL.getConfiguration()), copy, new String[]{"--new.name=" + tableName2, "--startrow=\\x01row1",
CopyTable copy = new CopyTable();
/** * Main entry point. * * @param args The command line parameters. * @throws Exception When running the job fails. */ public static void main(String[] args) throws Exception { int ret = ToolRunner.run(HBaseConfiguration.create(), new CopyTable(), args); System.exit(ret); }
/** * Main entry point. * * @param args The command line parameters. * @throws Exception When running the job fails. */ public static void main(String[] args) throws Exception { int ret = ToolRunner.run(HBaseConfiguration.create(), new CopyTable(), args); System.exit(ret); }
/** * Main entry point. * * @param args The command line parameters. * @throws Exception When running the job fails. */ public static void main(String[] args) throws Exception { int ret = ToolRunner.run(new CopyTable(HBaseConfiguration.create()), args); System.exit(ret); }
private boolean runCopy(String[] args) throws Exception { int status = ToolRunner.run(new Configuration(TEST_UTIL.getConfiguration()), new CopyTable(), args); return status == 0; } }
private boolean runCopy(String[] args) throws Exception { int status = ToolRunner.run(new Configuration(TEST_UTIL.getConfiguration()), new CopyTable(), args); return status == 0; } }
CopyTable copy = new CopyTable();
CopyTable copy = new CopyTable();
t1.put(p); CopyTable copy = new CopyTable(); assertEquals( 0,
t1.put(p); CopyTable copy = new CopyTable(); assertEquals( 0,