Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 8 commits into from

Conversation

HuiHang-Yu
Copy link

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 3m 48s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-0 ⚠️ test4tests 0m 0s The 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 💚 mvninstall 5m 57s master passed
+1 💚 compile 1m 0s master passed
+1 💚 checkstyle 1m 30s master passed
+1 💚 shadedjars 5m 4s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 37s master passed
+0 🆗 spotbugs 4m 47s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 4m 44s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 5m 37s the patch passed
+1 💚 compile 1m 10s the patch passed
+1 💚 javac 1m 10s the patch passed
-1 ❌ checkstyle 1m 59s hbase-server: The patch generated 2 new + 15 unchanged - 0 fixed = 17 total (was 15)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 shadedjars 5m 46s patch has no errors when building our shaded downstream artifacts.
+1 💚 hadoopcheck 17m 20s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 💚 javadoc 0m 35s the patch passed
+1 💚 findbugs 4m 24s the patch passed
_ Other Tests _
+1 💚 unit 163m 57s hbase-server in the patch passed.
+1 💚 asflicense 0m 27s The patch does not generate ASF License warnings.
230m 50s
Subsystem Report/Notes
Docker Client=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 Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 6a8953508ce1 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-958/out/precommit/personality/provided.sh
git revision master / 4b6ce0f
Default Java 1.8.0_181
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/1/artifact/out/diff-checkstyle-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/1/testReport/
Max. process+thread count 4524 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/1/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@saintstack saintstack left a comment

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.

@@ -51,6 +51,7 @@
public class StoreFileInfo {
private static final Logger LOG = LoggerFactory.getLogger(StoreFileInfo.class);

private FileStatus localStatus;
Copy link
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?

Copy link
Author

@HuiHang-Yu HuiHang-Yu Dec 24, 2019

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

@@ -108,6 +109,7 @@
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
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?

@@ -296,7 +297,7 @@ ReaderContext createReaderContext(boolean doDropBehind, long readahead, ReaderTy
if (this.link != null) {
// HFileLink
in = new FSDataInputStreamWrapper(fs, this.link, doDropBehind, readahead);
status = this.link.getFileStatus(fs);
// status = this.link.getFileStatus(fs);
Copy link
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
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 !

@@ -370,13 +372,16 @@ private HDFSBlocksDistribution computeHDFSBlocksDistributionInternal(final FileS
*/
public FileStatus getReferencedFileStatus(final FileSystem fs) throws IOException {
FileStatus status;
if(this.localStatus !=null) return this.localStatus;
Copy link
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
Author

Choose a reason for hiding this comment

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

ok

@@ -51,6 +51,7 @@
public class StoreFileInfo {
private static final Logger LOG = LoggerFactory.getLogger(StoreFileInfo.class);

private FileStatus localStatus;
Copy link
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
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?

} catch (FileNotFoundException ex) {
// try the other location
exToThrow = ex;
}
}
throw exToThrow;
} else {
status = fs.getFileStatus(initialPath);
this.localStatus = fs.getFileStatus(initialPath);
status = this.localStatus;
Copy link
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
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

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 22s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-0 ⚠️ test4tests 0m 0s The 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 💚 mvninstall 6m 4s master passed
+1 💚 compile 1m 0s master passed
+1 💚 checkstyle 1m 31s master passed
+1 💚 shadedjars 5m 1s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 38s master passed
+0 🆗 spotbugs 5m 39s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 5m 32s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 6m 13s the patch passed
+1 💚 compile 0m 58s the patch passed
+1 💚 javac 0m 58s the patch passed
-1 ❌ checkstyle 1m 28s hbase-server: The patch generated 2 new + 15 unchanged - 0 fixed = 17 total (was 15)
-1 ❌ whitespace 0m 0s The 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 💚 shadedjars 5m 27s patch has no errors when building our shaded downstream artifacts.
+1 💚 hadoopcheck 21m 48s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 💚 javadoc 0m 36s the patch passed
+1 💚 findbugs 4m 56s the patch passed
_ Other Tests _
-1 ❌ unit 166m 10s hbase-server in the patch failed.
+1 💚 asflicense 0m 29s The patch does not generate ASF License warnings.
236m 21s
Reason Tests
Failed junit tests hadoop.hbase.quotas.TestClusterScopeQuotaThrottle
Subsystem Report/Notes
Docker Client=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 Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 4e40f8e19f73 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-958/out/precommit/personality/provided.sh
git revision master / fc15ea7
Default Java 1.8.0_181
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/2/artifact/out/diff-checkstyle-hbase-server.txt
whitespace https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/2/artifact/out/whitespace-eol.txt
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/2/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/2/testReport/
Max. process+thread count 4483 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/2/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 5s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-0 ⚠️ test4tests 0m 0s The 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 💚 mvninstall 5m 31s master passed
+1 💚 compile 0m 55s master passed
+1 💚 checkstyle 1m 20s master passed
+1 💚 shadedjars 4m 36s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 38s master passed
+0 🆗 spotbugs 4m 27s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 4m 24s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 4m 59s the patch passed
+1 💚 compile 0m 56s the patch passed
+1 💚 javac 0m 56s the patch passed
-1 ❌ checkstyle 1m 18s hbase-server: The patch generated 2 new + 15 unchanged - 0 fixed = 17 total (was 15)
-1 ❌ whitespace 0m 0s The 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 💚 shadedjars 4m 40s patch has no errors when building our shaded downstream artifacts.
+1 💚 hadoopcheck 15m 43s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 💚 javadoc 0m 36s the patch passed
+1 💚 findbugs 4m 29s the patch passed
_ Other Tests _
-1 ❌ unit 283m 45s hbase-server in the patch failed.
+1 💚 asflicense 0m 30s The patch does not generate ASF License warnings.
342m 0s
Reason Tests
Failed junit tests hadoop.hbase.client.TestSnapshotTemporaryDirectoryWithRegionReplicas
Subsystem Report/Notes
Docker Client=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 Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 486d9d1e4400 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-958/out/precommit/personality/provided.sh
git revision master / ee19008
Default Java 1.8.0_181
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/3/artifact/out/diff-checkstyle-hbase-server.txt
whitespace https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/3/artifact/out/whitespace-eol.txt
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/3/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/3/testReport/
Max. process+thread count 4900 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/3/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@@ -107,7 +108,7 @@

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

Copy link
Author

@HuiHang-Yu HuiHang-Yu Jan 2, 2020

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

/**
* Get the {@link FileStatus} of the file referenced by this StoreFileInfo
* @param fs The current file system to use.
* @return The {@link FileStatus} of the file referenced by this StoreFileInfo
*/
public FileStatus getReferencedFileStatus(final FileSystem fs) throws IOException {
FileStatus status;
if(this.localStatus != null) {return this.localStatus;}
Copy link
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
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
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
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?)?

@@ -362,21 +360,23 @@ private HDFSBlocksDistribution computeHDFSBlocksDistributionInternal(final FileS
return FSUtils.computeHDFSBlocksDistribution(fs, status, 0, status.getLen());
}
}

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

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 5s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-0 ⚠️ test4tests 0m 0s The 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 💚 mvninstall 5m 27s master passed
+1 💚 compile 0m 56s master passed
+1 💚 checkstyle 1m 21s master passed
+1 💚 shadedjars 4m 36s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 38s master passed
+0 🆗 spotbugs 4m 19s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 4m 17s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 5m 2s the patch passed
+1 💚 compile 0m 55s the patch passed
+1 💚 javac 0m 55s the patch passed
-1 ❌ checkstyle 1m 18s hbase-server: The patch generated 2 new + 15 unchanged - 0 fixed = 17 total (was 15)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 shadedjars 4m 41s patch has no errors when building our shaded downstream artifacts.
+1 💚 hadoopcheck 15m 46s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 💚 javadoc 0m 35s the patch passed
+1 💚 findbugs 4m 32s the patch passed
_ Other Tests _
+1 💚 unit 158m 2s hbase-server in the patch passed.
+1 💚 asflicense 0m 35s The patch does not generate ASF License warnings.
216m 18s
Subsystem Report/Notes
Docker Client=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 Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux e2b44a1a7a1b 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-958/out/precommit/personality/provided.sh
git revision master / 2a4bd05
Default Java 1.8.0_181
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/4/artifact/out/diff-checkstyle-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/4/testReport/
Max. process+thread count 4526 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/4/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 3s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-0 ⚠️ test4tests 0m 0s The 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 💚 mvninstall 5m 32s master passed
+1 💚 compile 0m 57s master passed
+1 💚 checkstyle 1m 19s master passed
+1 💚 shadedjars 4m 35s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 37s master passed
+0 🆗 spotbugs 4m 27s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 4m 24s master passed
_ Patch Compile Tests _
-1 ❌ mvninstall 2m 28s root in the patch failed.
-1 ❌ compile 0m 38s hbase-server in the patch failed.
-1 ❌ javac 0m 38s hbase-server in the patch failed.
-1 ❌ checkstyle 1m 15s hbase-server: The patch generated 2 new + 15 unchanged - 0 fixed = 17 total (was 15)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
-1 ❌ shadedjars 3m 27s patch has 20 errors when building our shaded downstream artifacts.
-1 ❌ hadoopcheck 1m 48s The patch causes 20 errors with Hadoop v2.8.5.
-1 ❌ hadoopcheck 3m 41s The patch causes 20 errors with Hadoop v2.9.2.
-1 ❌ hadoopcheck 5m 37s The patch causes 20 errors with Hadoop v3.1.2.
+1 💚 javadoc 0m 33s the patch passed
-1 ❌ findbugs 0m 37s hbase-server in the patch failed.
_ Other Tests _
-1 ❌ unit 0m 39s hbase-server in the patch failed.
+1 💚 asflicense 0m 12s The patch does not generate ASF License warnings.
35m 12s
Subsystem Report/Notes
Docker Client=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 Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 17267e7d85f3 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-958/out/precommit/personality/provided.sh
git revision master / ccfbdad
Default Java 1.8.0_181
mvninstall https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/5/artifact/out/patch-mvninstall-root.txt
compile https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/5/artifact/out/patch-compile-hbase-server.txt
javac https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/5/artifact/out/patch-compile-hbase-server.txt
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/5/artifact/out/diff-checkstyle-hbase-server.txt
shadedjars https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/5/artifact/out/patch-shadedjars.txt
hadoopcheck https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/5/artifact/out/patch-javac-2.8.5.txt
hadoopcheck https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/5/artifact/out/patch-javac-2.9.2.txt
hadoopcheck https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/5/artifact/out/patch-javac-3.1.2.txt
findbugs https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/5/artifact/out/patch-findbugs-hbase-server.txt
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/5/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/5/testReport/
Max. process+thread count 93 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/5/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@@ -107,7 +108,7 @@

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

/**
* Get the {@link FileStatus} of the file referenced by this StoreFileInfo
* @param fs The current file system to use.
* @return The {@link FileStatus} of the file referenced by this StoreFileInfo
*/
public FileStatus getReferencedFileStatus(final FileSystem fs) throws IOException {
FileStatus status;
if(this.localStatus != null) {return this.localStatus;}
Copy link
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

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 0s Docker mode activated.
-1 ❌ patch 0m 3s #958 does not apply to master. Rebase required? Wrong Branch? See https://yetus.apache.org/documentation/in-progress/precommit-patchnames for help.
Subsystem Report/Notes
GITHUB PR #958
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/6/console
versions git=2.17.1
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

2 similar comments
@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 0s Docker mode activated.
-1 ❌ patch 0m 3s #958 does not apply to master. Rebase required? Wrong Branch? See https://yetus.apache.org/documentation/in-progress/precommit-patchnames for help.
Subsystem Report/Notes
GITHUB PR #958
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/6/console
versions git=2.17.1
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 0s Docker mode activated.
-1 ❌ patch 0m 3s #958 does not apply to master. Rebase required? Wrong Branch? See https://yetus.apache.org/documentation/in-progress/precommit-patchnames for help.
Subsystem Report/Notes
GITHUB PR #958
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-958/6/console
versions git=2.17.1
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

Sign up for free to 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