Skip to content

HBASE-23584 : Descrease rpc getFileStatus count when open a storefile - #958

Closed
HuiHang-Yu wants to merge 8 commits into
apache:masterfrom
HuiHang-Yu:master
Closed

HBASE-23584 : Descrease rpc getFileStatus count when open a storefile#958
HuiHang-Yu wants to merge 8 commits into
apache:masterfrom
HuiHang-Yu:master

Conversation

@HuiHang-Yu

Copy link
Copy Markdown

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec3m 48sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-0 ⚠️test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚mvninstall5m 57smaster passed
+1 💚compile1m 0smaster passed
+1 💚checkstyle1m 30smaster passed
+1 💚shadedjars5m 4sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 37smaster passed
+0 🆗spotbugs4m 47sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs4m 44smaster passed
_ Patch Compile Tests _
+1 💚mvninstall5m 37sthe patch passed
+1 💚compile1m 10sthe patch passed
+1 💚javac1m 10sthe patch passed
-1 ❌checkstyle1m 59shbase-server: The patch generated 2 new + 15 unchanged - 0 fixed = 17 total (was 15)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚shadedjars5m 46spatch has no errors when building our shaded downstream artifacts.
+1 💚hadoopcheck17m 20sPatch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 💚javadoc0m 35sthe patch passed
+1 💚findbugs4m 24sthe patch passed
_ Other Tests _
+1 💚unit163m 57shbase-server in the patch passed.
+1 💚asflicense0m 27sThe patch does not generate ASF License warnings.
230m 50s
SubsystemReport/Notes
DockerClient=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/1/artifact/out/Dockerfile
GITHUB PR#958
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux 6a8953508ce1 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-958/out/precommit/personality/provided.sh
git revisionmaster / 4b6ce0f
Default Java1.8.0_181
checkstylehttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/1/artifact/out/diff-checkstyle-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/1/testReport/
Max. process+thread count4524 (vs. ulimit of 10000)
modulesC: hbase-server U: hbase-server
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/1/console
versionsgit=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@saintstacksaintstack left a comment

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.

I like idea of a cache of status. When does it get invalidated?

Thanks for the patch.

public class StoreFileInfo {
private static final Logger LOG = LoggerFactory.getLogger(StoreFileInfo.class);

private FileStatus localStatus;

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.

I like idea of caching status. When does it get invalidated?

@HuiHang-YuHuiHang-YuDec 24, 2019

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Now it will be updated when reopened only because hfile will not be modified after writen i think . Is there some scenarios fileStatus will be modified?

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.

Not that I can think of.

private RegionCoprocessorHost coprocessorHost;

// timestamp on when the file was created, is 0 and ignored for reference or link files
// the before timestamp is shown as above ! Now i change to use the createdTimestamp of reference or link files , will it create some problem later ?

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.

Where is 'above'. Comments don't usually refer to 'i' since code is product of many. What is the problem this will create and if you don't know what it might be, why change i?

// HFileLink
in = new FSDataInputStreamWrapper(fs, this.link, doDropBehind, readahead);
status = this.link.getFileStatus(fs);
// status = this.link.getFileStatus(fs);

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.

Remove rather than comment-out.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Oh my fault ! I will remove it later !

*/
public FileStatus getReferencedFileStatus(final FileSystem fs) throws IOException {
FileStatus status;
if(this.localStatus !=null) return this.localStatus;

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.

Need parens as per convention in the code that surrounds this. Needs space after the '='.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

ok

public class StoreFileInfo {
private static final Logger LOG = LoggerFactory.getLogger(StoreFileInfo.class);

private FileStatus localStatus;

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.

Does it need to be volatile? Will StoreFileInfo be accessed by many threads? Can it be final/created on construction?

return link.getFileStatus(fs);
this.localStatus = link.getFileStatus(fs);
status = this.localStatus;
return status;

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.

This code is repeated. Put it into a method?

} else {
status = fs.getFileStatus(initialPath);
this.localStatus = fs.getFileStatus(initialPath);
status = this.localStatus;

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.

Three times.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

That's a good idea !

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 22sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-0 ⚠️test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚mvninstall6m 4smaster passed
+1 💚compile1m 0smaster passed
+1 💚checkstyle1m 31smaster passed
+1 💚shadedjars5m 1sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 38smaster passed
+0 🆗spotbugs5m 39sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs5m 32smaster passed
_ Patch Compile Tests _
+1 💚mvninstall6m 13sthe patch passed
+1 💚compile0m 58sthe patch passed
+1 💚javac0m 58sthe patch passed
-1 ❌checkstyle1m 28shbase-server: The patch generated 2 new + 15 unchanged - 0 fixed = 17 total (was 15)
-1 ❌whitespace0m 0sThe patch has 1 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply
+1 💚shadedjars5m 27spatch has no errors when building our shaded downstream artifacts.
+1 💚hadoopcheck21m 48sPatch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 💚javadoc0m 36sthe patch passed
+1 💚findbugs4m 56sthe patch passed
_ Other Tests _
-1 ❌unit166m 10shbase-server in the patch failed.
+1 💚asflicense0m 29sThe patch does not generate ASF License warnings.
236m 21s
ReasonTests
Failed junit testshadoop.hbase.quotas.TestClusterScopeQuotaThrottle
SubsystemReport/Notes
DockerClient=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/2/artifact/out/Dockerfile
GITHUB PR#958
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux 4e40f8e19f73 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-958/out/precommit/personality/provided.sh
git revisionmaster / fc15ea7
Default Java1.8.0_181
checkstylehttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/2/artifact/out/diff-checkstyle-hbase-server.txt
whitespacehttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/2/artifact/out/whitespace-eol.txt
unithttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/2/artifact/out/patch-unit-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/2/testReport/
Max. process+thread count4483 (vs. ulimit of 10000)
modulesC: hbase-server U: hbase-server
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/2/console
versionsgit=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 5sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-0 ⚠️test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚mvninstall5m 31smaster passed
+1 💚compile0m 55smaster passed
+1 💚checkstyle1m 20smaster passed
+1 💚shadedjars4m 36sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 38smaster passed
+0 🆗spotbugs4m 27sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs4m 24smaster passed
_ Patch Compile Tests _
+1 💚mvninstall4m 59sthe patch passed
+1 💚compile0m 56sthe patch passed
+1 💚javac0m 56sthe patch passed
-1 ❌checkstyle1m 18shbase-server: The patch generated 2 new + 15 unchanged - 0 fixed = 17 total (was 15)
-1 ❌whitespace0m 0sThe patch has 1 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply
+1 💚shadedjars4m 40spatch has no errors when building our shaded downstream artifacts.
+1 💚hadoopcheck15m 43sPatch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 💚javadoc0m 36sthe patch passed
+1 💚findbugs4m 29sthe patch passed
_ Other Tests _
-1 ❌unit283m 45shbase-server in the patch failed.
+1 💚asflicense0m 30sThe patch does not generate ASF License warnings.
342m 0s
ReasonTests
Failed junit testshadoop.hbase.client.TestSnapshotTemporaryDirectoryWithRegionReplicas
SubsystemReport/Notes
DockerClient=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/3/artifact/out/Dockerfile
GITHUB PR#958
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux 486d9d1e4400 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-958/out/precommit/personality/provided.sh
git revisionmaster / ee19008
Default Java1.8.0_181
checkstylehttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/3/artifact/out/diff-checkstyle-hbase-server.txt
whitespacehttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/3/artifact/out/whitespace-eol.txt
unithttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/3/artifact/out/patch-unit-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/3/testReport/
Max. process+thread count4900 (vs. ulimit of 10000)
modulesC: hbase-server U: hbase-server
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/3/console
versionsgit=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

private RegionCoprocessorHost coprocessorHost;

// timestamp on when the file was created, is 0 and ignored for reference or link files
// change to use the createdTimestamp of reference or link files , will it create some problem later ?

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.

Is this comment correct? The createTimeStamp is gotten once only on construction. YOu are not changing the behavior that I can see. Should createTimestamp be made final as in private final long createdTimestamp?

@HuiHang-YuHuiHang-YuJan 2, 2020

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It is not necessary to make createdTimestamp to be final i think .

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.

Its good to mark data members final if your intent is that they are not ever to change. It helps the compiler and it helps the dev reading the code later.

FileStatus fStatus = fs.getFileStatus(initialPath);
this.createdTimestamp = fStatus.getModificationTime();
this.size = fStatus.getLen();
this.createdTimestamp = this.getFileStatus().getModificationTime();

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.

Generally, we do not put the 'this.' in front of local method invocation.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I will remove it .

*/
public FileStatus getReferencedFileStatus(final FileSystem fs) throws IOException {
FileStatus status;
if(this.localStatus != null) {return this.localStatus;}

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.

Do you think multiple threads will come in h ere at same time? Maybe it would be better to make localStatus be final and assign it on construction of this StoreFileInfo? If so, change name localStatus to status?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

LocalStatus will be assigned when storeFileInfo construction is invoked . Will it be some problem happend when multiple threads will come in here at the same time ? So it is not necessary to make localstatus to be final and volatile i think .

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.

If so, make it final then we are explicit that it does not change during life time of a StoreFileInfo instance and we are clear about its thread safety. If done in constructor, you don't need this null check then either?

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.

Couldn't you simplify this method if you fetched status on construction (using the bulk of this method but taking it private/internal?)?

}
}

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.

Seems like there is a little space added. Could you please remove it?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Sorry for my fault !

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 5sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-0 ⚠️test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚mvninstall5m 27smaster passed
+1 💚compile0m 56smaster passed
+1 💚checkstyle1m 21smaster passed
+1 💚shadedjars4m 36sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 38smaster passed
+0 🆗spotbugs4m 19sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs4m 17smaster passed
_ Patch Compile Tests _
+1 💚mvninstall5m 2sthe patch passed
+1 💚compile0m 55sthe patch passed
+1 💚javac0m 55sthe patch passed
-1 ❌checkstyle1m 18shbase-server: The patch generated 2 new + 15 unchanged - 0 fixed = 17 total (was 15)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚shadedjars4m 41spatch has no errors when building our shaded downstream artifacts.
+1 💚hadoopcheck15m 46sPatch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 💚javadoc0m 35sthe patch passed
+1 💚findbugs4m 32sthe patch passed
_ Other Tests _
+1 💚unit158m 2shbase-server in the patch passed.
+1 💚asflicense0m 35sThe patch does not generate ASF License warnings.
216m 18s
SubsystemReport/Notes
DockerClient=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/4/artifact/out/Dockerfile
GITHUB PR#958
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux e2b44a1a7a1b 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-958/out/precommit/personality/provided.sh
git revisionmaster / 2a4bd05
Default Java1.8.0_181
checkstylehttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/4/artifact/out/diff-checkstyle-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/4/testReport/
Max. process+thread count4526 (vs. ulimit of 10000)
modulesC: hbase-server U: hbase-server
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/4/console
versionsgit=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 3sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-0 ⚠️test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚mvninstall5m 32smaster passed
+1 💚compile0m 57smaster passed
+1 💚checkstyle1m 19smaster passed
+1 💚shadedjars4m 35sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 37smaster passed
+0 🆗spotbugs4m 27sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs4m 24smaster passed
_ Patch Compile Tests _
-1 ❌mvninstall2m 28sroot in the patch failed.
-1 ❌compile0m 38shbase-server in the patch failed.
-1 ❌javac0m 38shbase-server in the patch failed.
-1 ❌checkstyle1m 15shbase-server: The patch generated 2 new + 15 unchanged - 0 fixed = 17 total (was 15)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
-1 ❌shadedjars3m 27spatch has 20 errors when building our shaded downstream artifacts.
-1 ❌hadoopcheck1m 48sThe patch causes 20 errors with Hadoop v2.8.5.
-1 ❌hadoopcheck3m 41sThe patch causes 20 errors with Hadoop v2.9.2.
-1 ❌hadoopcheck5m 37sThe patch causes 20 errors with Hadoop v3.1.2.
+1 💚javadoc0m 33sthe patch passed
-1 ❌findbugs0m 37shbase-server in the patch failed.
_ Other Tests _
-1 ❌unit0m 39shbase-server in the patch failed.
+1 💚asflicense0m 12sThe patch does not generate ASF License warnings.
35m 12s
SubsystemReport/Notes
DockerClient=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/5/artifact/out/Dockerfile
GITHUB PR#958
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
unameLinux 17267e7d85f3 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-958/out/precommit/personality/provided.sh
git revisionmaster / ccfbdad
Default Java1.8.0_181
mvninstallhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/5/artifact/out/patch-mvninstall-root.txt
compilehttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/5/artifact/out/patch-compile-hbase-server.txt
javachttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/5/artifact/out/patch-compile-hbase-server.txt
checkstylehttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/5/artifact/out/diff-checkstyle-hbase-server.txt
shadedjarshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/5/artifact/out/patch-shadedjars.txt
hadoopcheckhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/5/artifact/out/patch-javac-2.8.5.txt
hadoopcheckhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/5/artifact/out/patch-javac-2.9.2.txt
hadoopcheckhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/5/artifact/out/patch-javac-3.1.2.txt
findbugshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/5/artifact/out/patch-findbugs-hbase-server.txt
unithttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/5/artifact/out/patch-unit-hbase-server.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/5/testReport/
Max. process+thread count93 (vs. ulimit of 10000)
modulesC: hbase-server U: hbase-server
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/5/console
versionsgit=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

private RegionCoprocessorHost coprocessorHost;

// timestamp on when the file was created, is 0 and ignored for reference or link files
// change to use the createdTimestamp of reference or link files , will it create some problem later ?

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.

Its good to mark data members final if your intent is that they are not ever to change. It helps the compiler and it helps the dev reading the code later.

FileStatus fStatus = fs.getFileStatus(initialPath);
this.createdTimestamp = fStatus.getModificationTime();
this.size = fStatus.getLen();
this.createdTimestamp = getFileStatus().getModificationTime();

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.

Seems odd that we set modification time to created but that is not of your making; it was there before you came along (perhaps only modification 'works' or this is more trustworthy than create time...)

*/
public FileStatus getReferencedFileStatus(final FileSystem fs) throws IOException {
FileStatus status;
if(this.localStatus != null) {return this.localStatus;}

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.

Couldn't you simplify this method if you fetched status on construction (using the bulk of this method but taking it private/internal?)?

initialize localStatus on construction
@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 0sDocker mode activated.
-1 ❌patch0m 3s#958 does not apply to master. Rebase required? Wrong Branch? See https://yetus.apache.org/documentation/in-progress/precommit-patchnames for help.
SubsystemReport/Notes
GITHUB PR#958
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/6/console
versionsgit=2.17.1
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

2 similar comments
@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 0sDocker mode activated.
-1 ❌patch0m 3s#958 does not apply to master. Rebase required? Wrong Branch? See https://yetus.apache.org/documentation/in-progress/precommit-patchnames for help.
SubsystemReport/Notes
GITHUB PR#958
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/6/console
versionsgit=2.17.1
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 0sDocker mode activated.
-1 ❌patch0m 3s#958 does not apply to master. Rebase required? Wrong Branch? See https://yetus.apache.org/documentation/in-progress/precommit-patchnames for help.
SubsystemReport/Notes
GITHUB PR#958
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/6/console
versionsgit=2.17.1
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@HuiHang-Yu@Apache-HBase@saintstack@HorizonNet