Class TestStoreFileWriter
java.lang.Object
org.apache.hadoop.hbase.regionserver.TestStoreFileWriter
Store file writer does not do any compaction. Each cell written to either the live or historical
file. Regular (i.e., not-raw) scans that reads the latest put cells scans only live files. To
ensure the correctness of store file writer, we need to verify that live files includes all live
cells. This test indirectly verify this as follows. The test creates two tables, each with one
region and one store. The dual file writing (live vs historical) is configured on only one of the
tables. The test generates exact set of mutations on both tables. These mutations include all
types of cells and these cells are written to multiple files using multiple memstore flushes.
After writing all cells, the test first verify that both tables return the same set of cells for
regular and raw scans. Then the same verification is done after tables are minor and finally
major compacted. The test also verifies that flushes do not generate historical files and the
historical files are generated only when historical file generation is enabled (by the config
hbase.enable.historical.compaction.files).
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate final org.apache.hadoop.conf.Configurationprivate intprivate ArrayList<ArrayList<ArrayList<TestStoreFileWriter.CellInfo>>>org.apache.hadoop.hbase.KeepDeletedCellsintbooleanprivate final byte[][]private final Randomprivate org.apache.hadoop.hbase.regionserver.HRegion[]private final intprivate org.apache.hadoop.hbase.TableName[]private final HBaseTestingUtil -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate org.apache.hadoop.hbase.client.ScancreateScan(boolean raw) private voidcreateTable(int index, boolean enableDualFileWriter) static Collection<Object[]>data()private voiddeleteColumns(int rowCount) private voiddeleteColumnVersions(int rowCount) private voiddeleteRows(int rowCount) private voiddeleteRowVersions(int rowCount) private voiddeleteSingleRowVersion(int row, long timestamp) private voidprivate longgetNewTimestamp(long timestamp) private LonggetRowTimestamp(int row) private voidinsertRows(int rowCount) private voidscanAndCompare(boolean raw) voidsetUp()voidtearDown()voidprivate void
-
Field Details
-
CLASS_RULE
-
ROW_NUM
- See Also:
-
RANDOM
-
testUtil
-
regions
-
qualifiers
-
insertedCells
-
tableName
-
conf
-
flushCount
-
keepDeletedCells
-
maxVersions
-
newVersionBehavior
-
-
Constructor Details
-
TestStoreFileWriter
public TestStoreFileWriter()
-
-
Method Details
-
data
-
createTable
- Throws:
IOException
-
setUp
- Throws:
Exception
-
tearDown
- Throws:
Exception
-
testCompactedFiles
- Throws:
Exception
-
verifyCells
- Throws:
Exception
-
flushRegion
- Throws:
Exception
-
getRowTimestamp
-
getNewTimestamp
- Throws:
Exception
-
insertRows
- Throws:
Exception
-
deleteRows
- Throws:
Exception
-
deleteSingleRowVersion
- Throws:
IOException
-
deleteRowVersions
- Throws:
Exception
-
deleteColumns
- Throws:
Exception
-
deleteColumnVersions
- Throws:
Exception
-
createScan
-
scanAndCompare
- Throws:
Exception
-