You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Dinesh Chitlangia (JIRA)" <ji...@apache.org> on 2018/10/01 21:13:00 UTC
[jira] [Comment Edited] (HDDS-558) When creating keys, the
creationTime and modificationTime should ideally be the same
[ https://issues.apache.org/jira/browse/HDDS-558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16634640#comment-16634640 ]
Dinesh Chitlangia edited comment on HDDS-558 at 10/1/18 9:12 PM:
-----------------------------------------------------------------
[~nmaheshwari] - Thank you for working on this issue. Overall it LGTM.
Minor comments:
# Please add integration test to check that creationTime and modificationTime is same when creating a key. This will ensure that in future, if any one modified the implementation, the test failure will force them to correct it.
# Replace the comment
{noformat}
// HDDS-558 creationTime and modificationTime should be same while creating a key{noformat}
with
{noformat}
//creationTime and modificationTime should be same while creating a key{noformat}
Typically, we try to avoid mentioning Jira ID in the code.
was (Author: dineshchitlangia):
[~nmaheshwari] - Thank you for working on this issue.
Minor comments:
# Please add integration test to check that creationTime and modificationTime is same when creating a key. This will ensure that in future, if any one modified the implementation, the test failure will force them to correct it.
# Replace the comment
{noformat}
// HDDS-558 creationTime and modificationTime should be same while creating a key{noformat}
with
{noformat}
//creationTime and modificationTime should be same while creating a key{noformat}
Typically, we try to avoid mentioning Jira ID in the code.
> When creating keys, the creationTime and modificationTime should ideally be the same
> ------------------------------------------------------------------------------------
>
> Key: HDDS-558
> URL: https://issues.apache.org/jira/browse/HDDS-558
> Project: Hadoop Distributed Data Store
> Issue Type: Bug
> Components: Ozone Client, Ozone Manager
> Reporter: Dinesh Chitlangia
> Assignee: Namit Maheshwari
> Priority: Major
> Labels: newbie
> Attachments: HDDS-558.001.patch
>
>
> Steps to replicate:
> # Start ozone
> # Create Volume and Bucket or use existing ones
> # Create Key
> # List Keys for that bucket or just get key info
> We will see that the creationTime and ModificationTime has a minor difference.
>
> {noformat}
> hadoop@fdaf56d9e9d8:~$ ./bin/ozone sh key put /rvol/rbucket/rkey sample.orc
> hadoop@fdaf56d9e9d8:~$ ./bin/ozone sh key list /rvol/rbucket
> [ {
> "version" : 0,
> "md5hash" : null,
> "createdOn" : "Wed, 26 Sep 2018 20:29:10 GMT",
> "modifiedOn" : "Wed, 26 Sep 2018 20:29:12 GMT",
> "size" : 2262690,
> "keyName" : "rkey"
> } ]{noformat}
> Potential fix area : KeyManagerImpl#commitKey
> {code:java}
> keyInfo = new OmKeyInfo.Builder()
> .setVolumeName(args.getVolumeName())
> .setBucketName(args.getBucketName())
> .setKeyName(args.getKeyName())
> .setOmKeyLocationInfos(Collections.singletonList(
> new OmKeyLocationInfoGroup(0, locations)))
> .setCreationTime(Time.now())
> .setModificationTime(Time.now())
> .setDataSize(size)
> .setReplicationType(type)
> .setReplicationFactor(factor)
> .build();
> {code}
> For setting, both these values, we are getting current time and thus the minor difference.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org