[ 
https://issues.apache.org/jira/browse/HDDS-936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16724507#comment-16724507
 ] 

Dinesh Chitlangia commented on HDDS-936:
----------------------------------------

[~saruntek] thanks for working on this. I have a few suggestions:
 # All new files that we add to the code base require the Apache License text. 
You can look up any existing java files and copy the license text to your 
source files.
 # Add package-info file for the src package org.apache.hadoop.fsck.
 # BlockIdDetails.java
 ## Add javadoc for the class
 ## Add private access specifier for bucketName, blockVol, keyName
 ## Add a parametrized constructor to include all 3 members. You can use this 
in ContainerMapper to instantiate.
 # ContainerMapper.java
 ## Add javadoc for the class
 ## Remove stale comment {{//import java.util.Set;}}
 ## Remove commented code:
{code:java}
/*  System.out.println("Container ID " + 
keyLocation.getBlockID().getContainerID()+ " " + "KeyInfo: volume Name " + 
keyInfo.getVolumeName()
          + " Bucket Name " + keyInfo.getBucketName() + " Key Name" +
          keyInfo.getKeyName()  +
          "Version is " + keyLocation.getCreateVersion() ); */{code}
## Use parametrized constructor to replace
{code:java}
BlockIdDetails blockIdDetails = new BlockIdDetails();
Map<Long, BlockIdDetails> innerMap = new HashMap<>();

long containerID = keyLocation.getBlockID().getContainerID();
long blockID = keyLocation.getBlockID().getLocalID();
blockIdDetails.setBucketName(keyInfo.getBucketName());
blockIdDetails.setBlockVol(keyInfo.getVolumeName());
blockIdDetails.setKeyName(keyInfo.getKeyName());{code}
with
{code:java}
Map<Long, BlockIdDetails> innerMap = new HashMap<>(); long containerID = 
keyLocation.getBlockID().getContainerID(); long blockID = 
keyLocation.getBlockID().getLocalID();
BlockIdDetails blockIdDetails = new BlockIdDetails(keyInfo.getBucketName(),
keyInfo.getVolumeName(),keyInfo.getKeyName());
{code}

 # It will be nice to add unit test for the feature

Also, I suspect there are checkstyles issues that will come up once Jenkins 
will run.

 

If you need any help with above, please do not hesitate to reach out to me.

> Need a tool to map containers to ozone objects
> ----------------------------------------------
>
>                 Key: HDDS-936
>                 URL: https://issues.apache.org/jira/browse/HDDS-936
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>          Components: Ozone Manager
>            Reporter: Jitendra Nath Pandey
>            Assignee: sarun singla
>            Priority: Major
>         Attachments: HDDS-936.00.patch
>
>
> Ozone should have a tool to get list of objects that a container contains. 



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to