anmolanmol1234 commented on code in PR #7265:
URL: https://github.com/apache/hadoop/pull/7265#discussion_r1910302591


##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsBlobClient.java:
##########
@@ -359,6 +375,34 @@ public AbfsRestOperation listPath(final String 
relativePath, final boolean recur
     return op;
   }
 
+  private void fixAtomicEntriesInListResults(final AbfsRestOperation op,
+                                             final TracingContext 
tracingContext) throws AzureBlobFileSystemException {
+    /*
+     * Crashed HBase log rename recovery is done by Filesystem.getFileStatus 
and
+     * Filesystem.listStatus.
+     */
+    if (tracingContext == null
+            || tracingContext.getOpType() != FSOperationType.LISTSTATUS
+            || op == null || op.getResult() == null
+            || op.getResult().getStatusCode() != HTTP_OK) {
+      return;
+    }
+    BlobListResultSchema listResultSchema
+            = (BlobListResultSchema) op.getResult().getListResultSchema();
+    if (listResultSchema == null) {
+      return;
+    }
+    List<BlobListResultEntrySchema> filteredEntries = new ArrayList<>();
+    for (BlobListResultEntrySchema entry : listResultSchema.paths()) {
+      if (!takeListPathAtomicRenameKeyAction(entry.path(),
+              (int) (long) entry.contentLength(), tracingContext)) {

Review Comment:
   double casting is not needed, we can use something like :-
   Long longValue = 12345L;
   int intValue = longValue.intValue(); 



-- 
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