From ab552488c58cd7cc938fda072d50e9bece3e054d Mon Sep 17 00:00:00 2001 From: zhangduo Date: Sat, 30 Mar 2019 09:23:44 +0800 Subject: [PATCH] HBASE-22130 [hbase-thirdparty] Upgrade thirdparty dependencies --- hbase-shaded-miscellaneous/pom.xml | 22 ++++++++++++++----- hbase-shaded-netty/pom.xml | 2 +- hbase-shaded-protobuf/pom.xml | 7 ++---- .../src/main/patches/HBASE-15789_V2.patch | 15 ++++++++----- pom.xml | 11 +++++----- 5 files changed, 35 insertions(+), 22 deletions(-) diff --git a/hbase-shaded-miscellaneous/pom.xml b/hbase-shaded-miscellaneous/pom.xml index 8ab697c..3e3e671 100644 --- a/hbase-shaded-miscellaneous/pom.xml +++ b/hbase-shaded-miscellaneous/pom.xml @@ -114,12 +114,12 @@ com.google.code.gson gson - 2.8.1 + 2.8.5 com.google.guava guava - 22.0 + 27.1-jre com.google.code.findbugs @@ -137,14 +137,24 @@ org.codehaus.mojo animal-sniffer-annotations + + + com.google.guava + listenablefuture + + + org.checkerframework + checker-qual + com.google.protobuf protobuf-java-util - - 3.3.0 + + ${protobuf.version} com.google.protobuf @@ -160,7 +170,7 @@ org.apache.commons commons-collections4 - 4.1 + 4.3 diff --git a/hbase-shaded-netty/pom.xml b/hbase-shaded-netty/pom.xml index 5cc5465..ce5fe35 100644 --- a/hbase-shaded-netty/pom.xml +++ b/hbase-shaded-netty/pom.xml @@ -144,7 +144,7 @@ io.netty netty-all - 4.1.17.Final + 4.1.34.Final diff --git a/hbase-shaded-protobuf/pom.xml b/hbase-shaded-protobuf/pom.xml index 18a8e98..def2018 100644 --- a/hbase-shaded-protobuf/pom.xml +++ b/hbase-shaded-protobuf/pom.xml @@ -31,9 +31,6 @@ Pulls down protobuf, patches it, compiles, and then relocates/shades. - - 3.5.1 - @@ -82,7 +79,7 @@ src/main/java)--> org.apache.maven.plugins maven-dependency-plugin - 2.10 + 3.1.1 unpack @@ -110,7 +107,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.6.1 + 3.8.0 diff --git a/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V2.patch b/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V2.patch index cef5cfc..c3300c5 100644 --- a/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V2.patch +++ b/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V2.patch @@ -5,11 +5,11 @@ index c0ed636..906c216 100644 @@ -112,7 +112,7 @@ final class ByteBufferWriter { } } - + - private static byte[] getOrCreateBuffer(int requestedSize) { + static byte[] getOrCreateBuffer(int requestedSize) { requestedSize = max(requestedSize, MIN_CACHED_BUFFER_SIZE); - + byte[] buffer = getBuffer(); diff --git a/src/main/java/com/google/protobuf/ByteInput.java b/src/main/java/com/google/protobuf/ByteInput.java new file mode 100644 @@ -103,7 +103,7 @@ new file mode 100644 index 0000000..1949602 --- /dev/null +++ b/src/main/java/com/google/protobuf/ByteInputByteString.java -@@ -0,0 +1,249 @@ +@@ -0,0 +1,254 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ @@ -187,6 +187,11 @@ index 0000000..1949602 + return buffer.read(getAbsoluteOffset(index)); + } + ++ @Override ++ byte internalByteAt(int index) { ++ return buffer.read(getAbsoluteOffset(index)); ++ } ++ + private int getAbsoluteOffset(int relativeOffset) { + return this.offset + relativeOffset; + } @@ -368,8 +373,8 @@ index 8cae888..ebfa7fa 100644 + } + + /** - * Wraps the given bytes into a {@code ByteString}. Intended for internal only - * usage to force a classload of ByteString before LiteralByteString. + * Wraps the given bytes into a {@code ByteString}. Intended for internal only usage to force a + * classload of ByteString before LiteralByteString. */ diff --git a/src/main/java/com/google/protobuf/CodedInputStream.java b/src/main/java/com/google/protobuf/CodedInputStream.java index 12d70ce..e4c8e05 100644 diff --git a/pom.xml b/pom.xml index 2af80de..e20df51 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ org.apache apache - 18 + 21 @@ -126,6 +126,7 @@ ${compileSource} 3.3.3 org.apache.hbase.thirdparty + 3.7.0 @@ -150,7 +151,7 @@ org.codehaus.mojo build-helper-maven-plugin - 1.9.1 + 3.0.0 org.apache.rat @@ -214,7 +215,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.0.0 + 3.2.1 @@ -235,7 +236,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 1.4 + 1.4.1 org.codehaus.mojo @@ -283,7 +284,7 @@ maven-assembly-plugin - 3.0.0 + 3.1.1 src/main/assembly/src.xml -- 2.17.1