[
https://issues.apache.org/jira/browse/HDDS-1391?focusedWorklogId=282969&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-282969
]
ASF GitHub Bot logged work on HDDS-1391:
----------------------------------------
Author: ASF GitHub Bot
Created on: 25/Jul/19 22:42
Start Date: 25/Jul/19 22:42
Worklog Time Spent: 10m
Work Description: arp7 commented on pull request #1033: HDDS-1391 : Add
ability in OM to serve delta updates through an API.
URL: https://github.com/apache/hadoop/pull/1033#discussion_r307528281
##########
File path:
hadoop-hdds/common/src/main/java/org/apache/hadoop/utils/db/RDBStore.java
##########
@@ -327,6 +329,44 @@ public CodecRegistry getCodecRegistry() {
return codecRegistry;
}
+ @Override
+ public DBUpdatesWrapper getUpdatesSince(long sequenceNumber)
+ throws SequenceNumberNotFoundException {
+
+ DBUpdatesWrapper dbUpdatesWrapper = new DBUpdatesWrapper();
+ try {
+ TransactionLogIterator transactionLogIterator =
+ db.getUpdatesSince(sequenceNumber);
+
+ boolean flag = true;
+
+ while (transactionLogIterator.isValid()) {
+ TransactionLogIterator.BatchResult result =
+ transactionLogIterator.getBatch();
+ long currSequenceNumber = result.sequenceNumber();
+ if (flag && currSequenceNumber > 1 + sequenceNumber) {
+ throw new SequenceNumberNotFoundException("Unable to read data from"
+
+ " RocksDB wal to get delta updates. It may have already been" +
+ "flushed to SSTs.");
+ }
+ flag = false;
+ if (currSequenceNumber == sequenceNumber) {
+ transactionLogIterator.next();
+ continue;
+ }
+ WriteBatch writeBatch = result.writeBatch();
+ byte[] writeBatchData = writeBatch.data();
Review comment:
Nitpick: we can avoid temporary variables writeBatch and writeBatchData.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 282969)
Time Spent: 3h 40m (was: 3.5h)
> Add ability in OM to serve delta updates through an API.
> --------------------------------------------------------
>
> Key: HDDS-1391
> URL: https://issues.apache.org/jira/browse/HDDS-1391
> Project: Hadoop Distributed Data Store
> Issue Type: Sub-task
> Components: Ozone Manager
> Reporter: Aravindan Vijayan
> Assignee: Aravindan Vijayan
> Priority: Major
> Labels: pull-request-available
> Fix For: 0.5.0
>
> Time Spent: 3h 40m
> Remaining Estimate: 0h
>
> Added an RPC end point to serve the set of updates in OM RocksDB from a given
> sequence number.
> This will be used by Recon (HDDS-1105) to push the data to all the tasks that
> will keep their aggregate data up to date.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]