You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "mingchao zhao (Jira)" <ji...@apache.org> on 2022/07/12 10:50:00 UTC

[jira] [Updated] (HDDS-6955) Fix NPE in createStreamKey when replicationConfig is not set

     [ https://issues.apache.org/jira/browse/HDDS-6955?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

mingchao zhao updated HDDS-6955:
--------------------------------
    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

PR merged, Thanks [~ckj]!

> Fix NPE in createStreamKey when replicationConfig is not set
> ------------------------------------------------------------
>
>                 Key: HDDS-6955
>                 URL: https://issues.apache.org/jira/browse/HDDS-6955
>             Project: Apache Ozone
>          Issue Type: Sub-task
>            Reporter: Kaijie Chen
>            Assignee: Kaijie Chen
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: 3559_review.patch
>
>
> createStreamKey() will throws NPE when replication config is not specified.
> {noformat}
> $ ./ozone sh key put /vol1/bucket1/key1 ~/ft_local/ozone-1.3.0-SNAPSHOT.tar.gz 
> java.lang.NullPointerException
>         at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:889)        at org.apache.hadoop.hdds.scm.client.HddsClientUtils.checkNotNull(HddsClientUtils.java:223)
>         at org.apache.hadoop.ozone.client.rpc.RpcClient.createStreamKey(RpcClient.java:1199)        at org.apache.hadoop.ozone.client.OzoneBucket.createStreamKey(OzoneBucket.java:617)        at org.apache.hadoop.ozone.shell.keys.PutKeyHandler.execute(PutKeyHandler.java:120)
>         at org.apache.hadoop.ozone.shell.Handler.call(Handler.java:98)
>         at org.apache.hadoop.ozone.shell.Handler.call(Handler.java:44)
>         at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
>         at picocli.CommandLine.access$1300(CommandLine.java:145)
>         at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
>         at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
>         at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
>         at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:2172)
>         at picocli.CommandLine.parseWithHandlers(CommandLine.java:2550)
>         at picocli.CommandLine.parseWithHandler(CommandLine.java:2485)
>         at org.apache.hadoop.hdds.cli.GenericCli.execute(GenericCli.java:96)        at org.apache.hadoop.ozone.shell.OzoneShell.lambda$execute$0(OzoneShell.java:55)
>         at org.apache.hadoop.hdds.tracing.TracingUtil.executeInNewSpan(TracingUtil.java:159)
>         at org.apache.hadoop.ozone.shell.OzoneShell.execute(OzoneShell.java:53)
>         at org.apache.hadoop.hdds.cli.GenericCli.run(GenericCli.java:87)
>         at org.apache.hadoop.ozone.shell.OzoneShell.main(OzoneShell.java:47)
> {noformat}
>  
> It works fine if replication config is specified.
> {noformat}
> $ ./ozone sh key put /vol1/bucket1/key1 ~/ft_local/ozone-1.3.0-SNAPSHOT.tar.gz --replication THREE --type RATIS{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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