You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2024/04/10 03:44:30 UTC
(hbase-thirdparty) branch master updated: HBASE-28493 [hbase-thirdparty] Bump protobuf version (#117)
This is an automated email from the ASF dual-hosted git repository.
zhangduo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase-thirdparty.git
The following commit(s) were added to refs/heads/master by this push:
new d7883b5 HBASE-28493 [hbase-thirdparty] Bump protobuf version (#117)
d7883b5 is described below
commit d7883b5dde5a06014318d3140cd17ce1b1994c41
Author: Duo Zhang <zh...@apache.org>
AuthorDate: Wed Apr 10 11:44:26 2024 +0800
HBASE-28493 [hbase-thirdparty] Bump protobuf version (#117)
Signed-off-by: Nick Dimiduk <nd...@apache.org>
Signed-off-by: Andrew Purtell <ap...@apache.org>
---
.../src/main/patches/HBASE-15789_V2.patch | 29 +++++++++++-----------
.../src/main/patches/HBASE-17239.patch | 8 +++---
pom.xml | 2 +-
3 files changed, 19 insertions(+), 20 deletions(-)
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 8e09530..5bca44c 100644
--- a/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V2.patch
+++ b/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V2.patch
@@ -1,8 +1,8 @@
diff --git a/src/main/java/com/google/protobuf/ByteBufferWriter.java b/src/main/java/com/google/protobuf/ByteBufferWriter.java
-index 3970b0ea5..571b0a975 100644
+index e7d9eec8e..e17fefd39 100644
--- a/src/main/java/com/google/protobuf/ByteBufferWriter.java
+++ b/src/main/java/com/google/protobuf/ByteBufferWriter.java
-@@ -111,7 +111,7 @@ final class ByteBufferWriter {
+@@ -88,7 +88,7 @@ final class ByteBufferWriter {
}
}
@@ -359,13 +359,13 @@ index 000000000..320977290
+ }
+}
diff --git a/src/main/java/com/google/protobuf/ByteString.java b/src/main/java/com/google/protobuf/ByteString.java
-index 2569d5dad..bebee3373 100644
+index 8ba729c8e..62aae86ee 100644
--- a/src/main/java/com/google/protobuf/ByteString.java
+++ b/src/main/java/com/google/protobuf/ByteString.java
-@@ -445,6 +445,13 @@ public abstract class ByteString implements Iterable<Byte>, Serializable {
+@@ -422,6 +422,13 @@ public abstract class ByteString implements Iterable<Byte>, Serializable {
}
}
-
+
+ /**
+ * Wraps the given bytes into a {@code ByteString}. Intended for internal only usage.
+ */
@@ -377,14 +377,13 @@ index 2569d5dad..bebee3373 100644
* Wraps the given bytes into a {@code ByteString}. Intended for internal usage within the library
* 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 ae94ee887..ce1d05875 100644
+index 224ced529..64c3efa37 100644
--- a/src/main/java/com/google/protobuf/CodedInputStream.java
+++ b/src/main/java/com/google/protobuf/CodedInputStream.java
-@@ -200,6 +200,16 @@ public abstract class CodedInputStream {
- throw InvalidProtocolBufferException.recursionLimitExceeded();
+@@ -178,6 +178,15 @@ public abstract class CodedInputStream {
}
}
-+
+
+ /** Create a new CodedInputStream wrapping the given {@link ByteInput}. */
+ public static CodedInputStream newInstance(ByteInput buf, boolean bufferIsImmutable) {
+ return new ByteInputDecoder(buf, bufferIsImmutable);
@@ -397,7 +396,7 @@ index ae94ee887..ce1d05875 100644
/** Disable construction/inheritance outside of this class. */
private CodedInputStream() {}
-@@ -3965,4 +3975,652 @@ public abstract class CodedInputStream {
+@@ -3957,4 +3966,652 @@ public abstract class CodedInputStream {
}
}
}
@@ -1051,10 +1050,10 @@ index ae94ee887..ce1d05875 100644
+ }
}
diff --git a/src/main/java/com/google/protobuf/Utf8.java b/src/main/java/com/google/protobuf/Utf8.java
-index 7c6823d91..20afe8255 100644
+index d52006754..92ed1f1f7 100644
--- a/src/main/java/com/google/protobuf/Utf8.java
+++ b/src/main/java/com/google/protobuf/Utf8.java
-@@ -219,6 +219,16 @@ final class Utf8 {
+@@ -196,6 +196,16 @@ final class Utf8 {
}
}
@@ -1071,7 +1070,7 @@ index 7c6823d91..20afe8255 100644
// These UTF-8 handling methods are copied from Guava's Utf8 class with a modification to throw
// a protocol buffer local exception. This exception is then caught in CodedOutputStream so it can
// fallback to more lenient behavior.
-@@ -341,6 +351,24 @@ final class Utf8 {
+@@ -318,6 +328,24 @@ final class Utf8 {
return processor.decodeUtf8(bytes, index, size);
}
@@ -1096,10 +1095,10 @@ index 7c6823d91..20afe8255 100644
/**
* Encodes the given characters to the target {@link ByteBuffer} using UTF-8 encoding.
*
-@@ -717,6 +745,169 @@ final class Utf8 {
+@@ -694,6 +722,169 @@ final class Utf8 {
return new String(resultArr, 0, resultPos);
}
-
+
+ public boolean isValidUtf8(ByteInput buffer, int index, int limit) {
+ return partialIsValidUtf8(COMPLETE, buffer, index, limit) == COMPLETE;
+ }
diff --git a/hbase-shaded-protobuf/src/main/patches/HBASE-17239.patch b/hbase-shaded-protobuf/src/main/patches/HBASE-17239.patch
index 4843755..ff5891c 100644
--- a/hbase-shaded-protobuf/src/main/patches/HBASE-17239.patch
+++ b/hbase-shaded-protobuf/src/main/patches/HBASE-17239.patch
@@ -1,8 +1,8 @@
diff --git a/src/main/java/com/google/protobuf/CodedInputStream.java b/src/main/java/com/google/protobuf/CodedInputStream.java
-index ce1d05875..5d74971ff 100644
+index 64c3efa37..a5455e7f5 100644
--- a/src/main/java/com/google/protobuf/CodedInputStream.java
+++ b/src/main/java/com/google/protobuf/CodedInputStream.java
-@@ -202,11 +202,7 @@ public abstract class CodedInputStream {
+@@ -179,11 +179,7 @@ public abstract class CodedInputStream {
}
/** Create a new CodedInputStream wrapping the given {@link ByteInput}. */
@@ -16,10 +16,10 @@ index ce1d05875..5d74971ff 100644
}
diff --git a/src/main/java/com/google/protobuf/UnsafeByteOperations.java b/src/main/java/com/google/protobuf/UnsafeByteOperations.java
-index 164010e43..8b3857069 100644
+index 06121780f..3afb65965 100644
--- a/src/main/java/com/google/protobuf/UnsafeByteOperations.java
+++ b/src/main/java/com/google/protobuf/UnsafeByteOperations.java
-@@ -98,6 +98,17 @@ public final class UnsafeByteOperations {
+@@ -75,6 +75,17 @@ public final class UnsafeByteOperations {
return ByteString.wrap(buffer);
}
diff --git a/pom.xml b/pom.xml
index f450bbe..9e4a605 100644
--- a/pom.xml
+++ b/pom.xml
@@ -134,7 +134,7 @@
<maven.min.version>3.3.3</maven.min.version>
<os.maven.version>1.7.1</os.maven.version>
<rename.offset>org.apache.hbase.thirdparty</rename.offset>
- <protobuf.version>3.25.2</protobuf.version>
+ <protobuf.version>4.26.1</protobuf.version>
<netty.version>4.1.108.Final</netty.version>
<netty.tcnative.version>2.0.61.Final</netty.tcnative.version>
<guava.version>33.1.0-jre</guava.version>