[ 
https://issues.apache.org/jira/browse/HDDS-1624?focusedWorklogId=253974&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-253974
 ]

ASF GitHub Bot logged work on HDDS-1624:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 04/Jun/19 19:22
            Start Date: 04/Jun/19 19:22
    Worklog Time Spent: 10m 
      Work Description: avijayanhwx commented on pull request #882: HDDS-1624 : 
Refactor operations inside the bucket lock in OM key write.
URL: https://github.com/apache/hadoop/pull/882#discussion_r290457364
 
 

 ##########
 File path: 
hadoop-hdds/common/src/test/java/org/apache/hadoop/utils/db/TestTypedRDBTableStore.java
 ##########
 @@ -316,4 +316,22 @@ public void 
testTypedTableWithCacheWithFewDeletedOperationType()
 
     }
   }
+
+  @Test
+  public void testIsExist() throws Exception {
+    try (Table<String, String> testTable = createTypedTable(
+        "Eighth")) {
+      String key =
+          RandomStringUtils.random(10);
+      String value = RandomStringUtils.random(10);
+      testTable.put(key, value);
+      Assert.assertTrue(testTable.isExist(key));
+
+      String invalidKey = key + RandomStringUtils.random(1);
+      Assert.assertFalse(testTable.isExist(invalidKey));
 
 Review comment:
   Addressed
 
----------------------------------------------------------------
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: 253974)
    Time Spent: 3.5h  (was: 3h 20m)

> Refactor operations inside the bucket lock in OM key write.
> -----------------------------------------------------------
>
>                 Key: HDDS-1624
>                 URL: https://issues.apache.org/jira/browse/HDDS-1624
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>          Components: Ozone Manager
>            Reporter: Aravindan Vijayan
>            Assignee: Aravindan Vijayan
>            Priority: Critical
>              Labels: pull-request-available
>             Fix For: 0.5.0
>
>          Time Spent: 3.5h
>  Remaining Estimate: 0h
>
> There are a few steps that are done inside the OM bucket lock that are lock 
> invariant and can be done outside the lock. This patch refactors those steps. 
> It also adds an isExist API in the metadata store so that we dont need to 
> deserialize the byte[] to Object while doing a simple _table.get(key) != 
> null_ check. 
> On applying the patch, the OM + SCM (With dummy datanodes) write performance 
> improves by around 3 - 6x based on number of existing keys in the OM RocksDB. 
> Thanks to [~nandakumar131] who helped with this patch. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to