[ https://issues.apache.org/jira/browse/HDDS-1391?focusedWorklogId=282987&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-282987 ]
ASF GitHub Bot logged work on HDDS-1391: ---------------------------------------- Author: ASF GitHub Bot Created on: 25/Jul/19 23:13 Start Date: 25/Jul/19 23:13 Worklog Time Spent: 10m Work Description: avijayanhwx 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_r307536091 ########## File path: hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManager.java ########## @@ -1395,8 +1397,41 @@ public void testDBKeyMayExist() throws Exception { RDBStore rdbStore = (RDBStore) cluster.getOzoneManager() .getMetadataManager().getStore(); RocksDB db = rdbStore.getDb(); - UserGroupInformation ugi = UserGroupInformation.getCurrentUser(); + OmKeyInfo keyInfo = getNewOmKeyInfo(); + OmKeyInfoCodec omKeyInfoCodec = new OmKeyInfoCodec(); + + db.put(StringUtils.getBytesUtf16("OMKey1"), + omKeyInfoCodec.toPersistedFormat(keyInfo)); + + StringBuilder sb = new StringBuilder(); + Assert.assertTrue(db.keyMayExist(StringUtils.getBytesUtf16("OMKey1"), + sb)); + Assert.assertTrue(sb.length() > 0); + } + + + @Test + public void testGetOMDBUpdates() throws IOException { + + DBUpdatesRequest dbUpdatesRequest = + DBUpdatesRequest.newBuilder().setSequenceNumber(0).build(); + + DBUpdatesWrapper dbUpdates = + cluster.getOzoneManager().getDBUpdates(dbUpdatesRequest); + Assert.assertTrue(dbUpdates.getData().isEmpty()); + + //Write data to OM. + OmKeyInfo keyInfo = getNewOmKeyInfo(); + Assert.assertNotNull(keyInfo); + dbUpdates = + cluster.getOzoneManager().getDBUpdates(dbUpdatesRequest); + Assert.assertFalse(dbUpdates.getData().isEmpty()); Review comment: Yes, that will be difficult. The only way to do is that is to write a custom Iterator handler for RocksDB which we have done in org.apache.hadoop.ozone.recon.tasks.OMDBUpdatesHandler. The tests in org.apache.hadoop.ozone.recon.tasks.TestOMDBUpdatesHandler cover the data correctness use cases. ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 282987) Time Spent: 4h (was: 3h 50m) > 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: 4h > 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: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org