Source:
<code>public void testTagsAddition() throws Throwable { final TableName exportTable = TableName.valueOf(name.getMethodName()); TableDescriptor desc = TableDescriptorBuilder .newBuilder(exportTable) .setColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(FAMILYA) .setMaxVersions(5) .setKeepDeletedCells(KeepDeletedCells.TRUE) .build()) .setCoprocessor(MetadataController.class.getName()) .build(); UTIL.getAdmin().createTable(desc); Table exportT = UTIL.getConnection().getTable(exportTable); Put p = new Put(ROW1); p.addColumn(FAMILYA, QUAL, now, QUAL); exportT.put(p); Delete d = new Delete(ROW1, now+3); d.setAttribute(TEST_ATTR, Bytes.toBytes(TEST_TAG)); exportT.delete(d); String[] args = new String[] { "-D" + ExportUtils.RAW_SCAN + "=true", "-Dhbase.client.rpc.codec=org.apache.hadoop.hbase.codec.KeyValueCodecWithTags", exportTable.getNameAsString(), FQ_OUTPUT_DIR, "1000", }; assertTrue(runExport(args)); final TableName importTable = TableName.valueOf("importWithTestTagsAddition"); TableDescriptor importTableDesc = TableDescriptorBuilder .newBuilder(importTable) .setColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(FAMILYA) .setMaxVersions(5) .setKeepDeletedCells(KeepDeletedCells.TRUE) .build()) .setCoprocessor(MetadataController.class.getName()) .build(); UTIL.getAdmin().createTable(importTableDesc); args = new String[] { "-Dhbase.client.rpc.codec=org.apache.hadoop.hbase.codec.KeyValueCodecWithTags", importTable.getNameAsString(), FQ_OUTPUT_DIR }; assertTrue(runImport(args)); <START> assertTagExists(exportTable); <END> assertTagExists(importTable); }</code><technical_language>assertTagExists(exportTable) moved right importTable is defined? ensure create importTable, exportTable tag available. strong point, upto you</technical_language>

Target:
public void testTagsAddition() throws Throwable { final TableName exportTable = TableName.valueOf(name.getMethodName()); TableDescriptor desc = TableDescriptorBuilder .newBuilder(exportTable) .setColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(FAMILYA) .setMaxVersions(5) .setKeepDeletedCells(KeepDeletedCells.TRUE) .build()) .setCoprocessor(MetadataController.class.getName()) .build(); UTIL.getAdmin().createTable(desc); Table exportT = UTIL.getConnection().getTable(exportTable); Put p = new Put(ROW1); p.addColumn(FAMILYA, QUAL, now, QUAL); exportT.put(p); Delete d = new Delete(ROW1, now+3); d.setAttribute(TEST_ATTR, Bytes.toBytes(TEST_TAG)); exportT.delete(d); String[] args = new String[] { "-D" + ExportUtils.RAW_SCAN + "=true", "-Dhbase.client.rpc.codec=org.apache.hadoop.hbase.codec.KeyValueCodecWithTags", exportTable.getNameAsString(), FQ_OUTPUT_DIR, "1000", }; assertTrue(runExport(args)); assertTagExists(exportTable); final TableName importTable = TableName.valueOf("importWithTestTagsAddition"); TableDescriptor importTableDesc = TableDescriptorBuilder .newBuilder(importTable) .setColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(FAMILYA) .setMaxVersions(5) .setKeepDeletedCells(KeepDeletedCells.TRUE) .build()) .setCoprocessor(MetadataController.class.getName()) .build(); UTIL.getAdmin().createTable(importTableDesc); args = new String[] { "-Dhbase.client.rpc.codec=org.apache.hadoop.hbase.codec.KeyValueCodecWithTags", importTable.getNameAsString(), FQ_OUTPUT_DIR }; assertTrue(runImport(args)); assertTagExists(importTable); }