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-22802 Avoid temp ByteBuffer allocation in FileIOEngine#read #583

Merged
merged 1 commit into from Sep 9, 2019

Conversation

chenxu14
Copy link
Contributor

@chenxu14 chenxu14 commented Sep 4, 2019

No description provided.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
💙 reexec 1m 6s Docker mode activated.
_ Prechecks _
💚 dupname 0m 0s No case conflicting files found.
💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
💚 @author 0m 0s The patch does not contain any @author tags.
💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ master Compile Tests _
💙 mvndep 0m 33s Maven dependency ordering for branch
💚 mvninstall 5m 41s master passed
💚 compile 1m 19s master passed
💚 checkstyle 1m 57s master passed
💚 shadedjars 4m 54s branch has no errors when building our shaded downstream artifacts.
💚 javadoc 0m 56s master passed
💙 spotbugs 4m 19s Used deprecated FindBugs config; considering switching to SpotBugs.
💚 findbugs 5m 6s master passed
_ Patch Compile Tests _
💙 mvndep 0m 13s Maven dependency ordering for patch
💚 mvninstall 5m 21s the patch passed
💚 compile 1m 20s the patch passed
💚 javac 1m 20s the patch passed
💚 checkstyle 0m 27s hbase-common: The patch generated 0 new + 48 unchanged - 2 fixed = 48 total (was 50)
💚 checkstyle 1m 28s The patch passed checkstyle in hbase-server
💚 whitespace 0m 0s The patch has no whitespace issues.
💚 shadedjars 4m 57s patch has no errors when building our shaded downstream artifacts.
💚 hadoopcheck 17m 5s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
💚 javadoc 0m 55s the patch passed
💚 findbugs 5m 28s the patch passed
_ Other Tests _
💔 unit 2m 43s hbase-common in the patch failed.
💔 unit 245m 32s hbase-server in the patch failed.
💚 asflicense 0m 51s The patch does not generate ASF License warnings.
314m 49s
Reason Tests
Failed junit tests hadoop.hbase.io.TestByteBuffAllocator
hadoop.hbase.io.hfile.bucket.TestBucketCacheRefCnt
hadoop.hbase.master.TestMasterShutdown
hadoop.hbase.io.hfile.bucket.TestBucketCache
Subsystem Report/Notes
Docker Client=19.03.2 Server=19.03.2 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-583/1/artifact/out/Dockerfile
GITHUB PR #583
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 8a65a742a1a5 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-583/out/precommit/personality/provided.sh
git revision master / 0d338a1
Default Java 1.8.0_181
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-583/1/artifact/out/patch-unit-hbase-common.txt
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-583/1/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-583/1/testReport/
Max. process+thread count 5312 (vs. ulimit of 10000)
modules C: hbase-common hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-583/1/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.0 https://yetus.apache.org

This message was automatically generated.

@chenxu14
Copy link
Contributor Author

chenxu14 commented Sep 5, 2019

TestMasterShutdown seems not related, let's fix the failed UT

while (buffsIterator.hasNext()) {
ByteBuffer buffer = buffsIterator.next();
while (buffer.hasRemaining()) {
int len = channel.write(curItem, offset);
Copy link
Member

Choose a reason for hiding this comment

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

Better to use buffer instead of curItem here, otherwise seems strange here although no much difference in logics. Also maybe we can try to combine the buffsIterator and curItem & curItemIndex into one iterator, seems they are doing the same thing , say tracking the current buffer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Better to use buffer instead of curItem here

nice find, use buffer instead

maybe we can try to combine the buffsIterator and curItem & curItemIndex into one iterator

I think it's not easy to do that, the curItem is referenced in so many methods, maybe we should keep the current logic to avoid possible BUGs.

public static RefCnt create() {
return new RefCnt(ByteBuffAllocator.NONE);
}
public static final RefCnt NONE = new RefCnt(ByteBuffAllocator.NONE) {
Copy link
Member

Choose a reason for hiding this comment

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

Is this right ? before we will create a RefCnt which will still increase/decrement the its reference count value, but with a NONE de-allocator to deallocate the memory (means donothing).... now we will create a RefCnt with reference count value to be 1, and never change... I'm afraid that if upper layer depends one the ref cnt value, then will be messed up..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The RefCnt#NONE is mainly to avoid the creation of temporary objects, but your worries are necessary, will revert it.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
💙 reexec 0m 37s Docker mode activated.
_ Prechecks _
💚 dupname 0m 0s No case conflicting files found.
💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
💚 @author 0m 0s The patch does not contain any @author tags.
💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ master Compile Tests _
💙 mvndep 0m 36s Maven dependency ordering for branch
💚 mvninstall 5m 12s master passed
💚 compile 1m 18s master passed
💚 checkstyle 1m 45s master passed
💚 shadedjars 4m 29s branch has no errors when building our shaded downstream artifacts.
💚 javadoc 0m 59s master passed
💙 spotbugs 3m 57s Used deprecated FindBugs config; considering switching to SpotBugs.
💚 findbugs 4m 44s master passed
_ Patch Compile Tests _
💙 mvndep 0m 15s Maven dependency ordering for patch
💚 mvninstall 4m 58s the patch passed
💚 compile 1m 16s the patch passed
💚 javac 1m 16s the patch passed
💚 checkstyle 0m 28s hbase-common: The patch generated 0 new + 48 unchanged - 2 fixed = 48 total (was 50)
💚 checkstyle 1m 20s The patch passed checkstyle in hbase-server
💚 whitespace 0m 0s The patch has no whitespace issues.
💚 shadedjars 4m 25s patch has no errors when building our shaded downstream artifacts.
💚 hadoopcheck 15m 43s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
💚 javadoc 0m 57s the patch passed
💚 findbugs 5m 1s the patch passed
_ Other Tests _
💚 unit 3m 5s hbase-common in the patch passed.
💔 unit 162m 10s hbase-server in the patch failed.
💚 asflicense 1m 4s The patch does not generate ASF License warnings.
226m 13s
Reason Tests
Failed junit tests hadoop.hbase.master.replication.TestTransitPeerSyncReplicationStateProcedureRetry
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-583/3/artifact/out/Dockerfile
GITHUB PR #583
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux dcfb2ecaaf5c 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-583/out/precommit/personality/provided.sh
git revision master / fbd5b5e
Default Java 1.8.0_181
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-583/3/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-583/3/testReport/
Max. process+thread count 4908 (vs. ulimit of 10000)
modules C: hbase-common hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-583/3/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.0 https://yetus.apache.org

This message was automatically generated.

Copy link
Member

@openinx openinx left a comment

Choose a reason for hiding this comment

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

The patch looks good to me now.

@openinx openinx merged commit fb7230c into apache:master Sep 9, 2019
@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
💙 reexec 1m 10s Docker mode activated.
_ Prechecks _
💚 dupname 0m 0s No case conflicting files found.
💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
💚 @author 0m 0s The patch does not contain any @author tags.
💚 test4tests 0m 0s The patch appears to include 3 new or modified test files.
_ master Compile Tests _
💙 mvndep 0m 33s Maven dependency ordering for branch
💚 mvninstall 5m 39s master passed
💚 compile 1m 21s master passed
💚 checkstyle 1m 55s master passed
💚 shadedjars 4m 55s branch has no errors when building our shaded downstream artifacts.
💚 javadoc 0m 56s master passed
💙 spotbugs 4m 20s Used deprecated FindBugs config; considering switching to SpotBugs.
💚 findbugs 5m 6s master passed
_ Patch Compile Tests _
💙 mvndep 0m 14s Maven dependency ordering for patch
💚 mvninstall 5m 24s the patch passed
💚 compile 1m 20s the patch passed
💚 javac 1m 20s the patch passed
💚 checkstyle 0m 28s hbase-common: The patch generated 0 new + 48 unchanged - 2 fixed = 48 total (was 50)
💚 checkstyle 1m 31s The patch passed checkstyle in hbase-server
💚 whitespace 0m 0s The patch has no whitespace issues.
💚 shadedjars 4m 54s patch has no errors when building our shaded downstream artifacts.
💚 hadoopcheck 17m 6s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
💚 javadoc 0m 54s the patch passed
💚 findbugs 5m 26s the patch passed
_ Other Tests _
💚 unit 2m 56s hbase-common in the patch passed.
💔 unit 260m 54s hbase-server in the patch failed.
💚 asflicense 1m 5s The patch does not generate ASF License warnings.
330m 50s
Subsystem Report/Notes
Docker Client=19.03.2 Server=19.03.2 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-583/4/artifact/out/Dockerfile
GITHUB PR #583
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 04073c2299c2 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-583/out/precommit/personality/provided.sh
git revision master / 7648855
Default Java 1.8.0_181
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-583/4/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-583/4/testReport/
Max. process+thread count 4649 (vs. ulimit of 10000)
modules C: hbase-common hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-583/4/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.0 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
3 participants