Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public OzoneManagerServiceProviderImpl(
ReconOMMetadataManager omMetadataManager,
ReconTaskController reconTaskController,
ReconUtils reconUtils,
OzoneManagerProtocol ozoneManagerClient) throws IOException {
OzoneManagerProtocol ozoneManagerClient) {

String ozoneManagerHttpAddress = configuration.get(OMConfigKeys
.OZONE_OM_HTTP_ADDRESS_KEY);
Expand Down Expand Up @@ -224,7 +224,6 @@ DBCheckpoint getOzoneManagerDBSnapshot() {
reconUtils.untarCheckpointFile(targetFile, untarredDbDir);
FileUtils.deleteQuietly(targetFile);

// TODO Create Checkpoint based on OM DB type.
// Currently, OM DB type is not configurable. Hence, defaulting to
// RocksDB.
return new RocksDBCheckpoint(untarredDbDir);
Expand Down Expand Up @@ -278,14 +277,17 @@ void getAndApplyDeltaUpdatesFromOM(
if (null != dbUpdates) {
RDBStore rocksDBStore = (RDBStore)omMetadataManager.getStore();
RocksDB rocksDB = rocksDBStore.getDb();
LOG.debug("Number of updates received from OM : " +
LOG.debug("Number of updates received from OM : {}",
dbUpdates.getData().size());
for (byte[] data : dbUpdates.getData()) {
try (WriteBatch writeBatch = new WriteBatch(data)) {
writeBatch.iterate(omdbUpdatesHandler);
RDBBatchOperation rdbBatchOperation =
new RDBBatchOperation(writeBatch);
rdbBatchOperation.commit(rocksDB, new WriteOptions());
try (RDBBatchOperation rdbBatchOperation =
new RDBBatchOperation(writeBatch)) {
try (WriteOptions wOpts = new WriteOptions()) {
rdbBatchOperation.commit(rocksDB, wOpts);
}
}
}
}
}
Expand Down