Class RocksDBSstFileWriter
java.lang.Object
com.linkedin.davinci.store.rocksdb.RocksDBSstFileWriter
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected static final intprotected static final intprotected static final Stringprotected static final StringThis field is being stored during offset checkpointing inStoreIngestionTask.
- 
Constructor SummaryConstructorsConstructorDescriptionRocksDBSstFileWriter(String storeName, int partitionId, String dbDir, org.rocksdb.EnvOptions envOptions, org.rocksdb.Options options, String fullPathForTempSSTFileDir, boolean isRMD, RocksDBServerConfig rocksDBServerConfig) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()protected org.rocksdb.CheckpointcreateCheckpoint(org.rocksdb.RocksDB rocksDB) longvoidingestSSTFiles(org.rocksdb.RocksDB rocksDB, List<org.rocksdb.ColumnFamilyHandle> columnFamilyHandleList) voidvoidput(byte[] key, ByteBuffer valueBuffer) sync()Closes currentSSTFileWriter, update lastCheckPointedSSTFileNum with the current SST file number, validates checksum on this SST file and return updated checkpointingInfo with this lastCheckPointedSSTFileNum.boolean
- 
Field Details- 
ROCKSDB_LAST_FINISHED_SST_FILE_NOThis field is being stored during offset checkpointing inStoreIngestionTask. With the field, RocksDB could recover properly during restart. Essentially, during recovery, this class will remove all the un-committed files afterROCKSDB_LAST_FINISHED_SST_FILE_NO, and start a new file with no:ROCKSDB_LAST_FINISHED_SST_FILE_NO+ 1. With this way, we could achieve exact-once ingestion, which is required bySstFileWriter.- See Also:
 
- 
ROCKSDB_LAST_FINISHED_RMD_SST_FILE_NO- See Also:
 
- 
DEFAULT_COLUMN_FAMILY_INDEXprotected static final int DEFAULT_COLUMN_FAMILY_INDEX- See Also:
 
- 
REPLICATION_METADATA_COLUMN_FAMILY_INDEXprotected static final int REPLICATION_METADATA_COLUMN_FAMILY_INDEX- See Also:
 
 
- 
- 
Constructor Details- 
RocksDBSstFileWriterpublic RocksDBSstFileWriter(String storeName, int partitionId, String dbDir, org.rocksdb.EnvOptions envOptions, org.rocksdb.Options options, String fullPathForTempSSTFileDir, boolean isRMD, RocksDBServerConfig rocksDBServerConfig) 
 
- 
- 
Method Details- 
createCheckpointprotected org.rocksdb.Checkpoint createCheckpoint(org.rocksdb.RocksDB rocksDB) 
- 
getLastCheckPointedSSTFileNum
- 
put- Throws:
- org.rocksdb.RocksDBException
 
- 
open
- 
closepublic void close()
- 
syncCloses currentSSTFileWriter, update lastCheckPointedSSTFileNum with the current SST file number, validates checksum on this SST file and return updated checkpointingInfo with this lastCheckPointedSSTFileNum.
- 
validateBatchIngestionpublic boolean validateBatchIngestion()
- 
ingestSSTFilespublic void ingestSSTFiles(org.rocksdb.RocksDB rocksDB, List<org.rocksdb.ColumnFamilyHandle> columnFamilyHandleList) 
- 
getRecordNumInAllSSTFilespublic long getRecordNumInAllSSTFiles()
 
-