[
https://issues.apache.org/jira/browse/HDDS-3659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723499#comment-17723499
]
Sumit Agrawal commented on HDDS-3659:
-------------------------------------
[~umamaheswararao] This is working as I tested, so closing the issue now.
First time with Replication Factor: THREE
{code:java}
sumitagrawal@sumitagrawal-MBP16 bin % ./ozone sh key put -r THREE -t RATIS
/myvol/mybucket/NOTICE.txt ozone
2023-05-17 20:23:49,563 WARN util.NativeCodeLoader
(NativeCodeLoader.java:<clinit>(60)) - Unable to load native-hadoop library for
your platform... using builtin-java classes where applicable
2023-05-17 20:23:51,007 WARN impl.MetricsConfig
(MetricsConfig.java:loadFirst(136)) - Cannot locate configuration: tried
hadoop-metrics2-xceiverclientmetrics.properties,hadoop-metrics2.properties
2023-05-17 20:23:51,126 INFO impl.MetricsSystemImpl
(MetricsSystemImpl.java:startTimer(378)) - Scheduled Metric snapshot period at
10 second(s).
2023-05-17 20:23:51,126 INFO impl.MetricsSystemImpl
(MetricsSystemImpl.java:start(191)) - XceiverClientMetrics metrics system
started
2023-05-17 20:23:51,445 INFO metrics.MetricRegistries
(MetricRegistriesLoader.java:load(64)) - Loaded MetricRegistries class
org.apache.ratis.metrics.impl.MetricRegistriesImpl
sumitagrawal@sumitagrawal-MBP16 bin % ./ozone sh key info
/myvol/mybucket/NOTICE.txt
2023-05-17 20:24:01,185 WARN util.NativeCodeLoader
(NativeCodeLoader.java:<clinit>(60)) - Unable to load native-hadoop library for
your platform... using builtin-java classes where applicable
{
"volumeName" : "myvol",
"bucketName" : "mybucket",
"name" : "NOTICE.txt",
"dataSize" : 13436,
"creationTime" : "2023-05-17T14:53:50.427Z",
"modificationTime" : "2023-05-17T14:53:52.440Z",
"replicationConfig" : {
"replicationFactor" : "THREE",
"requiredNodes" : 3,
"replicationType" : "RATIS"
},
"metadata" : { },
"ozoneKeyLocations" : [ {
"containerID" : 1,
"localID" : 111677748019200001,
"length" : 13436,
"offset" : 0,
"keyOffset" : 0
} ]
}{code}
Overwrite with Replication Factor: ONE
{code:java}
sumitagrawal@sumitagrawal-MBP16 bin % ./ozone sh key put -r ONE -t RATIS
/myvol/mybucket/NOTICE.txt ozone
2023-05-17 20:24:35,579 WARN util.NativeCodeLoader
(NativeCodeLoader.java:<clinit>(60)) - Unable to load native-hadoop library for
your platform... using builtin-java classes where applicable
2023-05-17 20:24:36,752 WARN impl.MetricsConfig
(MetricsConfig.java:loadFirst(136)) - Cannot locate configuration: tried
hadoop-metrics2-xceiverclientmetrics.properties,hadoop-metrics2.properties
2023-05-17 20:24:36,868 INFO impl.MetricsSystemImpl
(MetricsSystemImpl.java:startTimer(378)) - Scheduled Metric snapshot period at
10 second(s).
2023-05-17 20:24:36,868 INFO impl.MetricsSystemImpl
(MetricsSystemImpl.java:start(191)) - XceiverClientMetrics metrics system
started
2023-05-17 20:24:37,180 INFO metrics.MetricRegistries
(MetricRegistriesLoader.java:load(64)) - Loaded MetricRegistries class
org.apache.ratis.metrics.impl.MetricRegistriesImpl
sumitagrawal@sumitagrawal-MBP16 bin % ./ozone sh key info
/myvol/mybucket/NOTICE.txt
2023-05-17 20:24:42,651 WARN util.NativeCodeLoader
(NativeCodeLoader.java:<clinit>(60)) - Unable to load native-hadoop library for
your platform... using builtin-java classes where applicable
{
"volumeName" : "myvol",
"bucketName" : "mybucket",
"name" : "NOTICE.txt",
"dataSize" : 13436,
"creationTime" : "2023-05-17T14:53:50.427Z",
"modificationTime" : "2023-05-17T14:54:37.792Z",
"replicationConfig" : {
"replicationFactor" : "ONE",
"requiredNodes" : 1,
"replicationType" : "RATIS"
},
"metadata" : { },
"ozoneKeyLocations" : [ {
"containerID" : 2,
"localID" : 111677748019200002,
"length" : 13436,
"offset" : 0,
"keyOffset" : 0
} ]
} {code}
> Overwrite an existed key with different factor or type won't update the
> OmKeyInfo
> ---------------------------------------------------------------------------------
>
> Key: HDDS-3659
> URL: https://issues.apache.org/jira/browse/HDDS-3659
> Project: Apache Ozone
> Issue Type: Bug
> Components: Ozone Manager
> Affects Versions: 1.0.0
> Reporter: Baolong Mao
> Assignee: HuangTao
> Priority: Critical
>
> Here is the reproduce process. Put three replication, then with one
> replication and/or STAND_ALONE type , the replicationFactor of the output is
> 3 and type is still RATIS. Vice versa, put one replication first, the
> replicationFactor is always going to be 1.
> # bin/ozone sh volume create myvol
> # bin/ozone sh bucket create /myvol/mybucket
> # bin/ozone sh key put -r THREE /myvol/mybucket/NOTICE.txt NOTICE.txt
> # bin/ozone sh key info /myvol/mybucket/NOTICE.txt
> {code:json}
> {
> "volumeName" : "myvol",
> "bucketName" : "mybucket",
> "name" : "NOTICE.txt",
> "dataSize" : 17540,
> "creationTime" : "2020-08-09T00:36:25.593Z",
> "modificationTime" : "2020-08-09T00:36:28.149Z",
> "replicationType" : "RATIS",
> "replicationFactor" : 3,
> "ozoneKeyLocations" : [ {
> "containerID" : 1,
> "localID" : 104656626357960709,
> "length" : 17540,
> "offset" : 0
> } ],
> "metadata" : { },
> "fileEncryptionInfo" : null
> }{code}
> # bin/ozone sh key put -r ONE -t STAND_ALONE /myvol/mybucket/NOTICE.txt
> NOTICE.txt
> # bin/ozone sh key info /myvol/mybucket/NOTICE.txt
> {code:json}
> {
> "volumeName" : "myvol",
> "bucketName" : "mybucket",
> "name" : "NOTICE.txt",
> "dataSize" : 17540,
> "creationTime" : "2020-08-09T00:36:25.593Z",
> "modificationTime" : "2020-08-09T00:38:05.381Z",
> "replicationType" : "RATIS",
> "replicationFactor" : 3,
> "ozoneKeyLocations" : [ {
> "containerID" : 5,
> "localID" : 104656632737693702,
> "length" : 17540,
> "offset" : 0
> } ],
> "metadata" : { },
> "fileEncryptionInfo" : null
> }{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]