Posted by
GitBox on
Nov 19, 2020; 6:23am
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/GitHub-carbondata-VenuReddy2103-opened-a-new-pull-request-4010-CARBONDATA-4050-Avoid-redundant-RPC-cr-tp103268p103278.html
jackylk commented on a change in pull request #4010:
URL:
https://github.com/apache/carbondata/pull/4010#discussion_r526620493##########
File path: core/src/main/java/org/apache/carbondata/core/datastore/filesystem/AbstractDFSCarbonFile.java
##########
@@ -541,7 +547,10 @@ public boolean createNewLockFile() throws IOException {
@Override
public String[] getLocations() throws IOException {
BlockLocation[] blkLocations;
- FileStatus fileStatus = fileSystem.getFileStatus(path);
+ FileStatus fileStatus = this.fileStatus;
+ if (fileStatus == null) {
+ fileStatus = fileSystem.getFileStatus(path);
Review comment:
one file status is got, we can cache it in the class field member
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[hidden email]