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

Hanisha Koneru commented on HDDS-155:
-------------------------------------

Thanks for working on this [~bharatviswa]. 

# Can we create a new KeyUtils file instead of modifying the current one. This 
would help a lot with integration.
# We should also have a new package for {{keyvalue}} under o.a.h.o.container. 
All the KeyValue ContainerType specific classes should go under this package. 
The new KeyUtils can also be migrated to this package. We should probably track 
this in a new Jira.
# {{KeyValueContainerUtil}} constructor is not used.
# In {{KeyValueContainer#close()}} and {{KeyValueContainer#update()}}, we are 
calling {{createContainerFile()}} and {{createCheckSumFile()}}. But the 
containerFile and checksumFile already exist and the rename from corresponding 
tmp files would fail.
# In {{KeyValueContainer#create()}}, 3rd null check should be for scmId.
{code}Preconditions.checkNotNull(volumeSet, "scmId cannot be null");{code}
# The following set of code is repeated multiple times. Since we have the 
information in Container, we could have getContainerFile and 
getContainerChecksumFile methods inside Container.
And KVContainerLocationUtil can be used when we only have the metadataPath and 
not the container object.
{code}File containerMetaDataPath = new File(containerData
    .getMetadataPath());
File containerFile = KeyValueContainerLocationUtil.getContainerFile(
    containerMetaDataPath, containerName);
File containerCheckSumFile = KeyValueContainerLocationUtil
    .getContainerCheckSumFile(containerMetaDataPath, containerName);
{code}
# In {{TestKeyValueContainer}}, 
** typo in {{testDelteOpenContainer}}
** {{testUpdateContainerInvalidMetadata}} - Should we not be allowed to update 
the value for an existing key in containerData#metadata?
# A few NITs:
** {{Storage#CONTAINER_SUBDIR_PREFIX}} -> containerDir
** In {{KeyValueContainer}}, can we change the {{CONTAINER_ALREADY_EXISTS}} 
message to something like "Container creation failed because ContainerFile 
already exists”.
** In {{KeyValueContainer}} line 348 : "Update a closed container" -> "Updating 
a closed container"

> Implement KeyValueContainer and adopt new disk layout for the containers
> ------------------------------------------------------------------------
>
>                 Key: HDDS-155
>                 URL: https://issues.apache.org/jira/browse/HDDS-155
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Bharat Viswanadham
>            Assignee: Bharat Viswanadham
>            Priority: Major
>             Fix For: 0.2.1
>
>         Attachments: HDDS-155-HDDS-48.00.patch, HDDS-155-HDDS-48.01.patch, 
> HDDS-155-HDDS-48.02.patch
>
>
> This Jira is to add following:
>  # Implement Container Interface
>  # Use new directory layout proposed in the design document.
>  a. Data location (chunks)
>  b. Meta location (DB and .container files)



--
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