adoroszlai commented on code in PR #6221:
URL: https://github.com/apache/ozone/pull/6221#discussion_r1499811220


##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java:
##########
@@ -2261,9 +2260,12 @@ public List<OzoneFileStatus> listStatus(OmKeyArgs args, 
boolean recursive,
         ListStatusRequest.newBuilder()
             .setKeyArgs(keyArgs)
             .setRecursive(recursive)
-            .setStartKey(startKey)
             .setNumEntries(numEntries);
 
+    if (startKey != null) {
+      listStatusRequestBuilder.setStartKey(startKey);

Review Comment:
   `startKey` is required for `ListStatusRequest`.  So now we get the following 
instead of `NullPointerException`:
   
   ```
   com.google.protobuf.UninitializedMessageException: Message missing required 
fields: startKey
        at 
com.google.protobuf.AbstractMessage$Builder.newUninitializedMessageException(AbstractMessage.java:770)
        at 
org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos$ListStatusRequest$Builder.build(OzoneManagerProtocolProtos.java)
        at 
org.apache.hadoop.ozone.om.protocolPB.OzoneManagerProtocolClientSideTranslatorPB.listStatus(OzoneManagerProtocolClientSideTranslatorPB.java:2274)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to