Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ public final class OzoneManagerProtocolClientSideTranslatorPB
private OmTransport transport;
private ThreadLocal<S3Auth> threadLocalS3Auth
= new ThreadLocal<>();

private boolean s3AuthCheck;

public static final int BLOCK_ALLOCATION_RETRY_COUNT = 5;
Expand Down Expand Up @@ -1033,7 +1032,7 @@ public ListKeysLightResult listKeysLight(String volumeName,
reqBuilder.setBucketName(bucketName);
reqBuilder.setCount(maxKeys);

if (StringUtils.isNotEmpty(startKey)) {
if (startKey != null) {
Comment thread
ivanzlenko marked this conversation as resolved.
reqBuilder.setStartKey(startKey);
}

Expand Down Expand Up @@ -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);
Comment thread
ivanzlenko marked this conversation as resolved.
Outdated
}

if (allowPartialPrefixes) {
listStatusRequestBuilder.setAllowPartialPrefix(allowPartialPrefixes);
}
Expand Down Expand Up @@ -2297,9 +2299,12 @@ public List<OzoneFileStatusLight> listStatusLight(OmKeyArgs args,
ListStatusRequest.newBuilder()
.setKeyArgs(keyArgs)
.setRecursive(recursive)
.setStartKey(startKey)
.setNumEntries(numEntries);

if (startKey != null) {
listStatusRequestBuilder.setStartKey(startKey);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is also a ListStatusRequest, I think we need to set "" in else branch here, too.


if (allowPartialPrefixes) {
listStatusRequestBuilder.setAllowPartialPrefix(allowPartialPrefixes);
}
Expand Down