Class TestCellBasedImportExport2
java.lang.Object
org.apache.hadoop.hbase.mapreduce.TestCellBasedImportExport2
Tests the table import and table export MR job functionality
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classThis listens to theTestCellBasedImportExport2.TableWALActionListener.visitLogEntryBeforeWrite(RegionInfo, WALKey, WALEdit)to identify that an entry is written to the Write Ahead Log for the given table. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate static final Stringprivate final org.apache.hadoop.hbase.TableNameprivate static final byte[]private static final Stringprivate static final byte[]private static final Stringprivate static Stringprivate final org.apache.hadoop.hbase.TableNameprivate static final org.slf4j.Loggerfinal org.junit.rules.TestNameprivate static final longprivate static final Stringprivate static final byte[]private static final byte[]private static final byte[]private static final byte[]protected static final HBaseTestingUtility -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidvoidannounce()static voidvoidcleanup()private intgetCount(org.apache.hadoop.hbase.client.Table table, org.apache.hadoop.hbase.filter.Filter filter) Count the number of keyvalues in the specified table for the given timerangeprotected booleanRuns an export job with the specified command line argsprotected voidrunExportMain(String[] args) (package private) booleanRuns an import job with the specified command line argsvoidTest addFilterAndArguments method of Import This method set couple parameters into Configurationvoidvoidtest main method.voidvoidTest export scanner batchingvoidTest import data from 0.94 exported filevoidtest main method.voidTest map method of ImportervoidTest export hbase:meta tablevoidTest simple replication case with column mappingvoidvoidCreate a simple table, run an Export Job on it, Import with filtering on, verify counts, attempt with invalid values.void
-
Field Details
-
CLASS_RULE
-
LOG
-
UTIL
-
ROW1
-
ROW2
-
ROW3
-
FAMILYA_STRING
- See Also:
-
FAMILYB_STRING
- See Also:
-
FAMILYA
-
FAMILYB
-
QUAL
-
OUTPUT_DIR
- See Also:
-
FQ_OUTPUT_DIR
-
EXPORT_BATCH_SIZE
- See Also:
-
now
-
EXPORT_TABLE
-
IMPORT_TABLE
-
name
-
-
Constructor Details
-
TestCellBasedImportExport2
public TestCellBasedImportExport2()
-
-
Method Details
-
beforeClass
- Throws:
Throwable
-
afterClass
- Throws:
Throwable
-
announce
-
cleanup
- Throws:
Throwable
-
runExport
Runs an export job with the specified command line args- Returns:
- true if job completed successfully
- Throws:
Throwable
-
runExportMain
- Throws:
Throwable
-
runImport
Runs an import job with the specified command line args- Returns:
- true if job completed successfully
- Throws:
Throwable
-
testSimpleCase
Test simple replication case with column mapping- Throws:
Throwable
-
testMetaExport
Test export hbase:meta table- Throws:
Throwable
-
testImport94Table
Test import data from 0.94 exported file- Throws:
Throwable
-
testExportScannerBatching
Test export scanner batching- Throws:
Throwable
-
testWithDeletes
- Throws:
Throwable
-
testWithMultipleDeleteFamilyMarkersOfSameRowSameFamily
- Throws:
Throwable
-
testWithFilter
Create a simple table, run an Export Job on it, Import with filtering on, verify counts, attempt with invalid values.- Throws:
Throwable
-
getCount
private int getCount(org.apache.hadoop.hbase.client.Table table, org.apache.hadoop.hbase.filter.Filter filter) throws IOException Count the number of keyvalues in the specified table for the given timerange- Throws:
IOException
-
testImportMain
test main method. Import should print help and call System.exit- Throws:
Throwable
-
testExportScan
- Throws:
Exception
-
testExportMain
test main method. Export should print help and call System.exit- Throws:
Throwable
-
testKeyValueImporter
Test map method of Importer- Throws:
Throwable
-
testAddFilterAndArguments
Test addFilterAndArguments method of Import This method set couple parameters into Configuration- Throws:
IOException
-
testDurability
- Throws:
Throwable
-