Skip to content

HBASE-22491 Separate the heap HFileBlock and offheap HFileBlock because the heap block won't need refCnt and save into prevBlocks list before shipping #268

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

Merged
merged 1 commit into from
Jun 13, 2019

Conversation

openinx
Copy link
Member

@openinx openinx commented May 30, 2019

…se the heap block won't need refCnt and save into prevBlocks list before shipping

@openinx openinx changed the title HBASE-22491 Separate the heap HFileBlock and offheap HFileBlock becau… HBASE-22491 Separate the heap HFileBlock and offheap HFileBlock because the heap block won't need refCnt and save into prevBlocks list before shipping May 30, 2019
@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 146 Docker mode activated.
_ Prechecks _
+1 hbaseanti 0 Patch does not have any anti-patterns.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 8 new or modified test files.
_ HBASE-21879 Compile Tests _
0 mvndep 25 Maven dependency ordering for branch
+1 mvninstall 229 HBASE-21879 passed
+1 compile 65 HBASE-21879 passed
+1 checkstyle 80 HBASE-21879 passed
+1 shadedjars 258 branch has no errors when building our shaded downstream artifacts.
-1 findbugs 161 hbase-server in HBASE-21879 has 11 extant Findbugs warnings.
+1 javadoc 49 HBASE-21879 passed
_ Patch Compile Tests _
0 mvndep 11 Maven dependency ordering for patch
+1 mvninstall 233 the patch passed
+1 compile 100 the patch passed
+1 javac 100 the patch passed
-1 checkstyle 73 hbase-server: The patch generated 1 new + 93 unchanged - 0 fixed = 94 total (was 93)
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedjars 310 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 509 Patch does not cause any errors with Hadoop 2.7.4 or 3.0.0.
+1 findbugs 241 the patch passed
+1 javadoc 50 the patch passed
_ Other Tests _
+1 unit 172 hbase-common in the patch passed.
-1 unit 10770 hbase-server in the patch failed.
+1 asflicense 63 The patch does not generate ASF License warnings.
13706
Reason Tests
Failed junit tests hadoop.hbase.coprocessor.TestMetaTableMetrics
hadoop.hbase.io.hfile.TestHFileBlock
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/1/artifact/out/Dockerfile
GITHUB PR #268
Optional Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux a6eeb6ce0dcd 4.4.0-145-generic #171-Ubuntu SMP Tue Mar 26 12:43:40 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /testptch/patchprocess/precommit/personality/provided.sh
git revision HBASE-21879 / 68c5129
maven version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java 1.8.0_181
findbugs v3.1.11
findbugs https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/1/artifact/out/branch-findbugs-hbase-server-warnings.html
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/1/artifact/out/diff-checkstyle-hbase-server.txt
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/1/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/1/testReport/
Max. process+thread count 4114 (vs. ulimit of 10000)
modules C: hbase-common hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/1/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@@ -523,15 +523,15 @@ void updateCurrBlockRef(HFileBlock block) {
if (block != null && curBlock != null && block.getOffset() == curBlock.getOffset()) {
return;
}
if (this.curBlock != null) {
if (this.curBlock != null && !this.curBlock.isOnHeap()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We still have this but in a different way. Instead of MemType the block knows its type.

Copy link
Member Author

Choose a reason for hiding this comment

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

Discussed with @anoopsjohn before, Maitaining a MemType inside the block will make the HFileBlock complex and easy to write a bug, because we need to handle the shared & non-shared logics at the same paths or methods.
Separating them into two classes will be more clear.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ya its ok we dont keep the memtype in single class type. But why we can not create 2 block types SharedMem vs ExclusiveMem rather than on heap vs off heap?

Copy link
Member Author

Choose a reason for hiding this comment

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

Addressed this in the new patch. Thanks.

@@ -763,7 +738,7 @@ public long heapSize() {
/**
* @return true to indicate the block is allocated from JVM heap, otherwise from off-heap.
*/
boolean isOnHeap() {
public boolean isOnHeap() {
return buf.hasArray();
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit : Just return 'false' here? Since you have HeapHfileBlock now where isOnheap() is always true?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, can be.

Copy link
Member Author

Choose a reason for hiding this comment

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

Think about this again, lots of UT use the HFileBlock with heap buf , if just return false here, I guess those UT will be failure.... so plan to keep this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why cant do the other way around? Like new class type for the pooled BB backed blocks?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thought about this before, our ByteBuffAllocator won't allocate pooled heap BB , also if allocate a offheap BB, then it must be a pooled one. That's to say, heapBB = exclusiveBB, offheapBB = sharedBB. So if it's a heapBB, then must be a exclusiveBB..

Copy link
Contributor

@anoopsjohn anoopsjohn Jun 12, 2019

Choose a reason for hiding this comment

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

Think about this again, lots of UT use the HFileBlock with heap buf , if just return false here, I guess those UT will be failure.... so plan to keep this.

Then why cant you just do the reverse way? HFileBlock will be on heap one. So the UTs also dont need any change. We will have an extension to it. Name it like SharedMemHFileBlock or OffheapHFileBlock (I prefer the former). This will look a bit strange here where the HFileBlock as such is not telling whether it is on heap or off heap and we have a On heap specific extended class again!

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, let me create two classes: one named ExclusiveMemHFileBlock , the other one is SharedMemHFileBlock, will be easy to see the difference between those two kinds of blocks.

@ramkrish86
Copy link
Contributor

Just few nits and questions. Rest looks good to me.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 233 Docker mode activated.
_ Prechecks _
+1 hbaseanti 0 Patch does not have any anti-patterns.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 9 new or modified test files.
_ HBASE-21879 Compile Tests _
0 mvndep 13 Maven dependency ordering for branch
+1 mvninstall 242 HBASE-21879 passed
+1 compile 72 HBASE-21879 passed
+1 checkstyle 90 HBASE-21879 passed
+1 shadedjars 265 branch has no errors when building our shaded downstream artifacts.
-1 findbugs 172 hbase-server in HBASE-21879 has 11 extant Findbugs warnings.
+1 javadoc 51 HBASE-21879 passed
_ Patch Compile Tests _
0 mvndep 15 Maven dependency ordering for patch
+1 mvninstall 249 the patch passed
+1 compile 72 the patch passed
+1 javac 72 the patch passed
+1 checkstyle 94 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedjars 269 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 498 Patch does not cause any errors with Hadoop 2.7.4 or 3.0.0.
+1 findbugs 255 the patch passed
+1 javadoc 51 the patch passed
_ Other Tests _
+1 unit 166 hbase-common in the patch passed.
-1 unit 15783 hbase-server in the patch failed.
+1 asflicense 68 The patch does not generate ASF License warnings.
18805
Reason Tests
Failed junit tests hadoop.hbase.client.TestFromClientSide3
hadoop.hbase.client.TestFromClientSide
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/2/artifact/out/Dockerfile
GITHUB PR #268
Optional Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 1762c457c9f3 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 GNU/Linux
Build tool maven
Personality /testptch/patchprocess/precommit/personality/provided.sh
git revision HBASE-21879 / 68c5129
maven version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java 1.8.0_181
findbugs v3.1.11
findbugs https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/2/artifact/out/branch-findbugs-hbase-server-warnings.html
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/2/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/2/testReport/
Max. process+thread count 5120 (vs. ulimit of 10000)
modules C: hbase-common hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/2/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@openinx
Copy link
Member Author

openinx commented May 31, 2019

The two timeout UT TestFromClientSide3/TestFromClientSide are unrelated. Any other concerns ? @anoopsjohn @ramkrish86

@openinx
Copy link
Member Author

openinx commented May 31, 2019

Rebased HBASE-21879 branch with master branch , and resolve all conflicts now. Let's see what hadoop QA will say.

@@ -763,7 +738,7 @@ public long heapSize() {
/**
* @return true to indicate the block is allocated from JVM heap, otherwise from off-heap.
*/
boolean isOnHeap() {
public boolean isOnHeap() {
return buf.hasArray();
Copy link
Contributor

Choose a reason for hiding this comment

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

Why cant do the other way around? Like new class type for the pooled BB backed blocks?

@@ -523,15 +523,15 @@ void updateCurrBlockRef(HFileBlock block) {
if (block != null && curBlock != null && block.getOffset() == curBlock.getOffset()) {
return;
}
if (this.curBlock != null) {
if (this.curBlock != null && !this.curBlock.isOnHeap()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Ya its ok we dont keep the memtype in single class type. But why we can not create 2 block types SharedMem vs ExclusiveMem rather than on heap vs off heap?

}

public HFileBlock build() {
if (buf.hasArray()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I still feel we should take any assumptions here. Better keep the notion of whether the block is backed by an exclusive or shared memory area. Based on that create different type of object. Here we always see whether on heap and if so exclusive memory. Why we have to drop that way?

Copy link
Member Author

Choose a reason for hiding this comment

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

Why we have to drop that way?

You mean MemoryType ? It's a concept around all the IOEngine / BlockCache / ByteBuffAllocator /HFileBlock etc... Actually, as I commented above, heap or offheap can decide the shared or non-shared. Then all those MemoryType places can be uniformed in this build() method here, I'd prefer this simple implementation.

Copy link
Contributor

Choose a reason for hiding this comment

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

Dont mean to keep the memory Type. That is not needed in HFileBlock. Even in the Builder too.. A setter which takes boolean to say whether it is exclusive memory or not would have been enough. Any way this assumption is true as of now. So its ok a continue this way if u strongly feel so

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, will do. Thanks.

// We don't have to keep ref to EXCLUSIVE type of block
if (this.curBlock != null) {
// We don't have to keep ref to heap block
if (this.curBlock != null && !this.curBlock.isOnHeap()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Ya here only difference is you will see whether the block is a Shared memory backed. If so add ref. We dont really worry whether it is off heap or on heap.

Copy link
Contributor

Choose a reason for hiding this comment

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

Adding to prevBlocks is only at these 2 places?

Copy link
Member Author

Choose a reason for hiding this comment

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

Adding to prevBlocks is only at these 2 places?

Yeah, check all the places, only the two add here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fine


@Override
public HeapHFileBlock retain() {
// do nothing
Copy link
Contributor

Choose a reason for hiding this comment

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

This is good.

@@ -373,7 +373,7 @@ private Cacheable asReferencedHeapBlock(Cacheable buf) {
if (buf instanceof HFileBlock) {
HFileBlock blk = ((HFileBlock) buf);
if (!blk.isOnHeap()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Here also it will be if shared memory type of block

Copy link
Contributor

Choose a reason for hiding this comment

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

At least the API name in HFileBlock we can keep like isSharedMemory() instead of this on heap vs off heap? That will be more clear when reading parts of code like here. WHy we do this clone.

Copy link
Member Author

Choose a reason for hiding this comment

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

At least the API name in HFileBlock we can keep like isSharedMemory() instead of this on heap vs off heap?

Will impl this in the new patch.

WHy we do this clone.

Because it's a offheap one, while our LRU only keep heap block, so need a deep clone here, please see: HBASE-22127

Copy link
Contributor

Choose a reason for hiding this comment

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

That was not a Q why we clone. :-) My bad. I put a '.' in between. I mean with that name change and using that API in other code places like above, it will be more clear for any new reader to understand why we do this clone.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
0 reexec 27 Docker mode activated.
_ Prechecks _
+1 hbaseanti 0 Patch does not have any anti-patterns.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 9 new or modified test files.
_ HBASE-21879 Compile Tests _
0 mvndep 26 Maven dependency ordering for branch
+1 mvninstall 247 HBASE-21879 passed
+1 compile 73 HBASE-21879 passed
+1 checkstyle 91 HBASE-21879 passed
+1 shadedjars 265 branch has no errors when building our shaded downstream artifacts.
+1 findbugs 237 HBASE-21879 passed
+1 javadoc 53 HBASE-21879 passed
_ Patch Compile Tests _
0 mvndep 16 Maven dependency ordering for patch
+1 mvninstall 237 the patch passed
+1 compile 71 the patch passed
+1 javac 71 the patch passed
+1 checkstyle 89 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedjars 266 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 727 Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 findbugs 259 the patch passed
+1 javadoc 51 the patch passed
_ Other Tests _
+1 unit 165 hbase-common in the patch passed.
+1 unit 8146 hbase-server in the patch passed.
+1 asflicense 48 The patch does not generate ASF License warnings.
11427
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/3/artifact/out/Dockerfile
GITHUB PR #268
Optional Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 76111f40bf28 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 GNU/Linux
Build tool maven
Personality /testptch/patchprocess/precommit/personality/provided.sh
git revision HBASE-21879 / 810d287
maven version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java 1.8.0_181
findbugs v3.1.11
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/3/testReport/
Max. process+thread count 5115 (vs. ulimit of 10000)
modules C: hbase-common hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/3/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@Apache9 Apache9 left a comment

Choose a reason for hiding this comment

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

I still stand my point that this is not the most important thing for now. We should change the way that we release ByteBuffs, so we could solve the problem for both on-heap and off-heap ByteBuffs. And later we could see if we can optimize for on-heap ByteBuffs. In general, I think we will make use of off-heap ByteBuffs as much as possible so I do not think it worth to spend so much time to optimize for on-heap ByteBuffs right now...

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
0 reexec 30 Docker mode activated.
_ Prechecks _
+1 hbaseanti 0 Patch does not have any anti-patterns.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 9 new or modified test files.
_ HBASE-21879 Compile Tests _
0 mvndep 15 Maven dependency ordering for branch
+1 mvninstall 243 HBASE-21879 passed
+1 compile 75 HBASE-21879 passed
+1 checkstyle 95 HBASE-21879 passed
+1 shadedjars 268 branch has no errors when building our shaded downstream artifacts.
+1 findbugs 238 HBASE-21879 passed
+1 javadoc 51 HBASE-21879 passed
_ Patch Compile Tests _
0 mvndep 15 Maven dependency ordering for patch
+1 mvninstall 241 the patch passed
+1 compile 75 the patch passed
+1 javac 75 the patch passed
+1 checkstyle 93 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedjars 270 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 730 Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 findbugs 250 the patch passed
+1 javadoc 53 the patch passed
_ Other Tests _
+1 unit 171 hbase-common in the patch passed.
+1 unit 8330 hbase-server in the patch passed.
+1 asflicense 51 The patch does not generate ASF License warnings.
11618
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/4/artifact/out/Dockerfile
GITHUB PR #268
Optional Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 57d25dbaaee0 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 GNU/Linux
Build tool maven
Personality /testptch/patchprocess/precommit/personality/provided.sh
git revision HBASE-21879 / a6e3d5b
maven version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java 1.8.0_181
findbugs v3.1.11
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/4/testReport/
Max. process+thread count 5243 (vs. ulimit of 10000)
modules C: hbase-common hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/4/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

.withNextBlockOnDiskSize(nextBlockOnDiskSize)
.withHFileContext(fileContext)
.withByteBuffAllocator(allocator)
.withOffset(offset)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why withOffset() been called twice?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, Let me fix this. Thanks.

Copy link
Contributor

@anoopsjohn anoopsjohn left a comment

Choose a reason for hiding this comment

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

Some comments added

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 28 Docker mode activated.
_ Prechecks _
+1 hbaseanti 0 Patch does not have any anti-patterns.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 11 new or modified test files.
_ HBASE-21879 Compile Tests _
0 mvndep 23 Maven dependency ordering for branch
+1 mvninstall 228 HBASE-21879 passed
+1 compile 64 HBASE-21879 passed
+1 checkstyle 82 HBASE-21879 passed
+1 shadedjars 260 branch has no errors when building our shaded downstream artifacts.
+1 findbugs 229 HBASE-21879 passed
+1 javadoc 51 HBASE-21879 passed
_ Patch Compile Tests _
0 mvndep 11 Maven dependency ordering for patch
+1 mvninstall 223 the patch passed
+1 compile 67 the patch passed
+1 javac 67 the patch passed
-1 checkstyle 61 hbase-server: The patch generated 2 new + 120 unchanged - 0 fixed = 122 total (was 120)
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedjars 260 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 689 Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 findbugs 333 the patch passed
+1 javadoc 62 the patch passed
_ Other Tests _
+1 unit 198 hbase-common in the patch passed.
-1 unit 13504 hbase-server in the patch failed.
+1 asflicense 61 The patch does not generate ASF License warnings.
16778
Reason Tests
Failed junit tests hadoop.hbase.client.TestAsyncTableGetMultiThreaded
hadoop.hbase.io.hfile.bucket.TestBucketCache
hadoop.hbase.master.balancer.TestStochasticLoadBalancerRegionReplicaSameHosts
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/5/artifact/out/Dockerfile
GITHUB PR #268
Optional Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 8563b2ea564a 4.4.0-145-generic #171-Ubuntu SMP Tue Mar 26 12:43:40 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /testptch/patchprocess/precommit/personality/provided.sh
git revision HBASE-21879 / a6e3d5b
maven version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java 1.8.0_181
findbugs v3.1.11
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/5/artifact/out/diff-checkstyle-hbase-server.txt
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/5/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/5/testReport/
Max. process+thread count 4443 (vs. ulimit of 10000)
modules C: hbase-common hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/5/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@openinx
Copy link
Member Author

openinx commented Jun 12, 2019

Addressed the failed UT & checkstyle from HBaseQA.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
0 reexec 26 Docker mode activated.
_ Prechecks _
+1 hbaseanti 0 Patch does not have any anti-patterns.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 11 new or modified test files.
_ HBASE-21879 Compile Tests _
0 mvndep 24 Maven dependency ordering for branch
+1 mvninstall 234 HBASE-21879 passed
+1 compile 69 HBASE-21879 passed
+1 checkstyle 85 HBASE-21879 passed
+1 shadedjars 256 branch has no errors when building our shaded downstream artifacts.
+1 findbugs 214 HBASE-21879 passed
+1 javadoc 47 HBASE-21879 passed
_ Patch Compile Tests _
0 mvndep 12 Maven dependency ordering for patch
+1 mvninstall 230 the patch passed
+1 compile 68 the patch passed
+1 javac 68 the patch passed
+1 checkstyle 88 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedjars 261 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 722 Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 findbugs 244 the patch passed
+1 javadoc 52 the patch passed
_ Other Tests _
+1 unit 171 hbase-common in the patch passed.
+1 unit 8340 hbase-server in the patch passed.
+1 asflicense 59 The patch does not generate ASF License warnings.
11536
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/6/artifact/out/Dockerfile
GITHUB PR #268
Optional Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 46ba7a988f9e 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 GNU/Linux
Build tool maven
Personality /testptch/patchprocess/precommit/personality/provided.sh
git revision HBASE-21879 / a6e3d5b
maven version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java 1.8.0_181
findbugs v3.1.11
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/6/testReport/
Max. process+thread count 4759 (vs. ulimit of 10000)
modules C: hbase-common hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/6/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

*/
boolean isOnHeap() {
return buf.hasArray();
public boolean isSharedMem() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Still we create HFileBlock only in tests? If not we could have left this API abstract only and even HFileBlock. That would have been best. May be in a follow up we can do that. Just renaming will be enough. In this jira keep it this way only. Fine.

}

static HFileBlock shallowClone(HFileBlock blk) {
return createBuilder(blk).withShared(!blk.buf.hasArray()).build();
Copy link
Contributor

Choose a reason for hiding this comment

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

blk.buf.hasArray() -> Instead use blk.isShared()

Copy link
Contributor

@anoopsjohn anoopsjohn left a comment

Choose a reason for hiding this comment

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

Few more minor comments. +1 to commit after that

…se the heap block won't need refCnt and save into prevBlocks list before shipping
@openinx openinx merged commit e4a9147 into apache:HBASE-21879 Jun 13, 2019
@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 0 Docker mode activated.
-1 patch 7 #268 does not apply to HBASE-21879. Rebase required? Wrong Branch? See https://yetus.apache.org/documentation/in-progress/precommit-patchnames for help.
Subsystem Report/Notes
GITHUB PR #268
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-268/7/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@openinx openinx deleted the HBASE-21879 branch June 13, 2019 06:34
asfgit pushed a commit that referenced this pull request Jun 18, 2019
…se the heap block won't need refCnt and save into prevBlocks list before shipping (#268)
asfgit pushed a commit that referenced this pull request Jun 24, 2019
…se the heap block won't need refCnt and save into prevBlocks list before shipping (#268)
openinx added a commit to openinx/hbase that referenced this pull request Jun 25, 2019
…se the heap block won't need refCnt and save into prevBlocks list before shipping (apache#268)
infraio pushed a commit to infraio/hbase that referenced this pull request Aug 17, 2020
…se the heap block won't need refCnt and save into prevBlocks list before shipping (apache#268)
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.

5 participants