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-25227 [branch-1] Fix Java 11 runtime issue in UnsafeAccess #2594

Merged
merged 3 commits into from
Oct 29, 2020

Conversation

apurtell
Copy link
Contributor

@apurtell apurtell commented Oct 28, 2020

UnsafeAccess is observed to throw NoSuchMethodErrors running on Java 11. Some of our methods accept 'int' parameters and use them as parameters to Unsafe methods expecting 'long'. Not an issue on branch-2 and up.

…issue

UnsafeAccess is observed to throw NoSuchMethodErrors running on Java 11. Some
of our methods accept 'int' parameters and use them as parameters to Unsafe
methods expecting 'long'. The Java 8 compiler does the implicit conversion
but the Java 11 compiler does not. Add casts to fix. Not an issue on branch-2
and up.
@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 12s 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.
_ branch-1 Compile Tests _
+1 💚 mvninstall 9m 45s branch-1 passed
+1 💚 compile 0m 18s branch-1 passed with JDK v1.8.0_262
+1 💚 compile 0m 23s branch-1 passed with JDK v1.7.0_272
+1 💚 checkstyle 0m 40s branch-1 passed
+1 💚 shadedjars 3m 4s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 36s branch-1 passed with JDK v1.8.0_262
+1 💚 javadoc 0m 23s branch-1 passed with JDK v1.7.0_272
+0 🆗 spotbugs 1m 24s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 1m 20s branch-1 passed
_ Patch Compile Tests _
+1 💚 mvninstall 2m 0s the patch passed
+1 💚 compile 0m 19s the patch passed with JDK v1.8.0_262
+1 💚 javac 0m 19s the patch passed
+1 💚 compile 0m 24s the patch passed with JDK v1.7.0_272
+1 💚 javac 0m 24s the patch passed
-1 ❌ checkstyle 0m 30s hbase-common: The patch generated 5 new + 27 unchanged - 0 fixed = 32 total (was 27)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 shadedjars 2m 51s patch has no errors when building our shaded downstream artifacts.
+1 💚 hadoopcheck 4m 38s Patch does not cause any errors with Hadoop 2.8.5 2.9.2.
+1 💚 javadoc 0m 19s the patch passed with JDK v1.8.0_262
+1 💚 javadoc 0m 24s the patch passed with JDK v1.7.0_272
+1 💚 findbugs 1m 12s the patch passed
_ Other Tests _
+1 💚 unit 2m 42s hbase-common in the patch passed.
+1 💚 asflicense 0m 22s The patch does not generate ASF License warnings.
37m 1s
Subsystem Report/Notes
Docker Client=19.03.13 Server=19.03.13 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2594/1/artifact/out/Dockerfile
GITHUB PR #2594
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 799e52708e63 4.15.0-65-generic #74-Ubuntu SMP Tue Sep 17 17:06:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-home/workspace/Base-PreCommit-GitHub-PR_PR-2594/out/precommit/personality/provided.sh
git revision branch-1 / b30d1d1
Default Java 1.7.0_272
Multi-JDK versions /usr/lib/jvm/zulu-8-amd64:1.8.0_262 /usr/lib/jvm/zulu-7-amd64:1.7.0_272
checkstyle https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2594/1/artifact/out/diff-checkstyle-hbase-common.txt
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2594/1/testReport/
Max. process+thread count 172 (vs. ulimit of 10000)
modules C: hbase-common U: hbase-common
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2594/1/console
versions git=1.9.1 maven=3.0.5 findbugs=3.0.1
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@apurtell
Copy link
Contributor Author

Fix checkstyle issues

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 36s 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.
_ branch-1 Compile Tests _
+1 💚 mvninstall 9m 44s branch-1 passed
+1 💚 compile 0m 20s branch-1 passed with JDK v1.8.0_262
+1 💚 compile 0m 23s branch-1 passed with JDK v1.7.0_272
+1 💚 checkstyle 0m 38s branch-1 passed
+1 💚 shadedjars 2m 59s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 36s branch-1 passed with JDK v1.8.0_262
+1 💚 javadoc 0m 23s branch-1 passed with JDK v1.7.0_272
+0 🆗 spotbugs 1m 24s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 1m 22s branch-1 passed
_ Patch Compile Tests _
+1 💚 mvninstall 1m 57s the patch passed
+1 💚 compile 0m 19s the patch passed with JDK v1.8.0_262
+1 💚 javac 0m 19s the patch passed
+1 💚 compile 0m 24s the patch passed with JDK v1.7.0_272
+1 💚 javac 0m 24s the patch passed
+1 💚 checkstyle 0m 29s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 shadedjars 2m 51s patch has no errors when building our shaded downstream artifacts.
+1 💚 hadoopcheck 4m 32s Patch does not cause any errors with Hadoop 2.8.5 2.9.2.
+1 💚 javadoc 0m 19s the patch passed with JDK v1.8.0_262
+1 💚 javadoc 0m 23s the patch passed with JDK v1.7.0_272
+1 💚 findbugs 1m 13s the patch passed
_ Other Tests _
+1 💚 unit 2m 40s hbase-common in the patch passed.
+1 💚 asflicense 0m 22s The patch does not generate ASF License warnings.
35m 54s
Subsystem Report/Notes
Docker Client=19.03.13 Server=19.03.13 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2594/2/artifact/out/Dockerfile
GITHUB PR #2594
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 4a3b00cd8e7d 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-agent/workspace/Base-PreCommit-GitHub-PR_PR-2594/out/precommit/personality/provided.sh
git revision branch-1 / b30d1d1
Default Java 1.7.0_272
Multi-JDK versions /usr/lib/jvm/zulu-8-amd64:1.8.0_262 /usr/lib/jvm/zulu-7-amd64:1.7.0_272
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2594/2/testReport/
Max. process+thread count 180 (vs. ulimit of 10000)
modules C: hbase-common U: hbase-common
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2594/2/console
versions git=1.9.1 maven=3.0.5 findbugs=3.0.1
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@Reidddddd Reidddddd left a comment

Choose a reason for hiding this comment

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

+1, what about directly changing BYTE_ARRAY_BASE_OFFSET's type to long

Copy link
Contributor

@virajjasani virajjasani left a comment

Choose a reason for hiding this comment

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

+1

@anoopsjohn
Copy link
Contributor

+1, what about directly changing BYTE_ARRAY_BASE_OFFSET's type to long

Ya that single change will be enough then and can avoid all cast

@apurtell
Copy link
Contributor Author

directly changing BYTE_ARRAY_BASE_OFFSET's type to long

Ok

@apurtell
Copy link
Contributor Author

Change uses @Reidddddd and @anoopsjohn suggestion instead of casts

@apurtell apurtell changed the title HBASE-25227 [branch-1] Cast in UnsafeAccess to avoid Java 11 runtime issue HBASE-25227 [branch-1] Fix Java 11 runtime issue in UnsafeAccess Oct 29, 2020
@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 11m 39s 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.
_ branch-1 Compile Tests _
+1 💚 mvninstall 9m 58s branch-1 passed
+1 💚 compile 0m 19s branch-1 passed with JDK v1.8.0_262
+1 💚 compile 0m 23s branch-1 passed with JDK v1.7.0_272
+1 💚 checkstyle 0m 41s branch-1 passed
+1 💚 shadedjars 3m 18s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 35s branch-1 passed with JDK v1.8.0_262
+1 💚 javadoc 0m 23s branch-1 passed with JDK v1.7.0_272
+0 🆗 spotbugs 1m 27s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 1m 25s branch-1 passed
_ Patch Compile Tests _
+1 💚 mvninstall 2m 7s the patch passed
+1 💚 compile 0m 19s the patch passed with JDK v1.8.0_262
+1 💚 javac 0m 19s the patch passed
+1 💚 compile 0m 23s the patch passed with JDK v1.7.0_272
+1 💚 javac 0m 23s the patch passed
+1 💚 checkstyle 0m 30s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 shadedjars 3m 6s patch has no errors when building our shaded downstream artifacts.
+1 💚 hadoopcheck 4m 56s Patch does not cause any errors with Hadoop 2.8.5 2.9.2.
+1 💚 javadoc 0m 18s the patch passed with JDK v1.8.0_262
+1 💚 javadoc 0m 23s the patch passed with JDK v1.7.0_272
+1 💚 findbugs 1m 18s the patch passed
_ Other Tests _
+1 💚 unit 2m 37s hbase-common in the patch passed.
+1 💚 asflicense 0m 21s The patch does not generate ASF License warnings.
48m 28s
Subsystem Report/Notes
Docker Client=19.03.13 Server=19.03.13 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2594/3/artifact/out/Dockerfile
GITHUB PR #2594
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux c43bf1b1ee01 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-home/workspace/Base-PreCommit-GitHub-PR_PR-2594/out/precommit/personality/provided.sh
git revision branch-1 / b30d1d1
Default Java 1.7.0_272
Multi-JDK versions /usr/lib/jvm/zulu-8-amd64:1.8.0_262 /usr/lib/jvm/zulu-7-amd64:1.7.0_272
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2594/3/testReport/
Max. process+thread count 165 (vs. ulimit of 10000)
modules C: hbase-common U: hbase-common
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2594/3/console
versions git=1.9.1 maven=3.0.5 findbugs=3.0.1
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@apurtell apurtell merged commit 2e3f842 into apache:branch-1 Oct 29, 2020
apurtell added a commit that referenced this pull request Oct 29, 2020
@apurtell
Copy link
Contributor Author

I'm not sure what happened here. Applying the commit locally.

asfgit pushed a commit that referenced this pull request Oct 29, 2020
asfgit pushed a commit that referenced this pull request Oct 29, 2020
Reapply with corrected commit message.

Signed-off-by: Reid Chan <reidchan@apache.org>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
Signed-off-by: Bharath Vissapragada <bharathv@apache.org>
Signed-off-by: Michael Stack <stack@apache.org>
@apurtell apurtell deleted the HBASE-25227-branch-1 branch October 29, 2020 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants