hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Work logged] (HDDS-1863) Freon RandomKeyGenerator even if keySize is set to 0, it returns some random data to key
Date Thu, 08 Aug 2019 21:52:00 GMT

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

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

                Author: ASF GitHub Bot
            Created on: 08/Aug/19 21:51
            Start Date: 08/Aug/19 21:51
    Worklog Time Spent: 10m 
      Work Description: xiaoyuyao commented on pull request #1167: HDDS-1863. Freon RandomKeyGenerator
even if keySize is set to 0, it returns some random data to key.
URL: https://github.com/apache/hadoop/pull/1167#discussion_r312258419
 
 

 ##########
 File path: hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/RandomKeyGenerator.java
 ##########
 @@ -263,9 +262,7 @@ public Void call() throws Exception {
     // Compute the common initial digest for all keys without their UUID
     if (validateWrites) {
       commonInitialMD = DigestUtils.getDigest(DIGEST_ALGORITHM);
-      int uuidLength = UUID.randomUUID().toString().length();
-      keySize = Math.max(uuidLength, keySize);
-      for (long nrRemaining = keySize - uuidLength; nrRemaining > 0;
+      for (long nrRemaining = keySize; nrRemaining > 0;
 
 Review comment:
   LGTM, +1. 
 
----------------------------------------------------------------
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:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 291593)
    Time Spent: 3h 40m  (was: 3.5h)

> Freon RandomKeyGenerator even if keySize is set to 0, it returns some random data to
key
> ----------------------------------------------------------------------------------------
>
>                 Key: HDDS-1863
>                 URL: https://issues.apache.org/jira/browse/HDDS-1863
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>            Reporter: Bharat Viswanadham
>            Assignee: Bharat Viswanadham
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 3h 40m
>  Remaining Estimate: 0h
>
>  
> {code:java}
> ***************************************************
> Status: Success
> Git Base Revision: e97acb3bd8f3befd27418996fa5d4b50bf2e17bf
> Number of Volumes created: 1
> Number of Buckets created: 1
> Number of Keys added: 1
> Ratis replication factor: THREE
> Ratis replication type: STAND_ALONE
> Average Time spent in volume creation: 00:00:00,002
> Average Time spent in bucket creation: 00:00:00,000
> Average Time spent in key creation: 00:00:00,002
> Average Time spent in key write: 00:00:00,101
> Total bytes written: 0
> Total Execution time: 00:00:05,699
>  
> {code}
> ***************************************************
> [root@ozoneha-2 ozone-0.5.0-SNAPSHOT]# bin/ozone sh key list /vol-0-28271/bucket-0-95211
> [
> {   "version" : 0,   "md5hash" : null,   "createdOn" : "Fri, 26 Jul 2019 01:02:08
GMT",   "modifiedOn" : "Fri, 26 Jul 2019 01:02:09 GMT",   "size" : 36,   "keyName" : "key-0-98235",
  "type" : null }
> ]
>  
> This is because of the below code in RandomKeyGenerator:
> {code:java}
> for (long nrRemaining = keySize - randomValue.length;
>  nrRemaining > 0; nrRemaining -= bufferSize) {
>  int curSize = (int) Math.min(bufferSize, nrRemaining);
>  os.write(keyValueBuffer, 0, curSize);
> }
> os.write(randomValue);
> os.close();{code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

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


Mime
View raw message