Copilot commented on code in PR #7181:
URL: https://github.com/apache/hbase/pull/7181#discussion_r2243084170
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/tool/BulkLoadHFilesTool.java:
##########
@@ -962,7 +962,9 @@ private Map<LoadQueueItem, ByteBuffer>
performBulkLoad(AsyncClusterConnection co
throws IOException {
int count = 0;
-
fsDelegationToken.acquireDelegationToken(queue.peek().getFilePath().getFileSystem(getConf()));
+ Path path = queue.peek().getFilePath();
+ FileSystem fs =
path.getFileSystem(getConf()).resolvePath(path).getFileSystem(getConf());
Review Comment:
This line calls getFileSystem(getConf()) twice, which may involve redundant
operations. Consider storing the first FileSystem instance in a variable and
reusing it for the resolvePath call.
```suggestion
FileSystem initialFs = path.getFileSystem(getConf());
FileSystem fs = initialFs.resolvePath(path).getFileSystem(getConf());
```
--
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]