HBASE-22131 Delete the patches in hbase-protocol-shaded module

Signed-off-by: zhangduo <zhangduo@apache.org>
This commit is contained in:
pingsutw 2019-03-30 11:54:03 +08:00 committed by zhangduo
parent 1d9158c04a
commit 674921f1f4
3 changed files with 0 additions and 1320 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +0,0 @@
diff --git a/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/ByteInputByteString.java b/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/ByteInputByteString.java
index 1949602..30de4ec 100644
--- a/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/ByteInputByteString.java
+++ b/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/ByteInputByteString.java
@@ -244,6 +244,8 @@ final class ByteInputByteString extends ByteString.LeafByteString {
public CodedInputStream newCodedInput() {
// We trust CodedInputStream not to modify the bytes, or to give anyone
// else access to them.
- return CodedInputStream.newInstance(buffer, offset, length, true);
+ CodedInputStream cis = CodedInputStream.newInstance(buffer, offset, length, true);
+ cis.enableAliasing(true);
+ return cis;
}
}

View File

@ -1,44 +0,0 @@
.../hbase/shaded/com/google/protobuf/CodedInputStream.java | 6 +-----
.../shaded/com/google/protobuf/UnsafeByteOperations.java | 11 +++++++++++
.../src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java | 7 ++++---
3 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/CodedInputStream.java b/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/CodedInputStream.java
index 0ad20e5..0bff626 100644
--- a/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/CodedInputStream.java
+++ b/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/CodedInputStream.java
@@ -150,11 +150,7 @@ 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);
- }
-
- public static CodedInputStream newInstance(ByteInput buf, int off, int len, boolean bufferIsImmutable) {
+ static CodedInputStream newInstance(ByteInput buf, int off, int len, boolean bufferIsImmutable) {
return new ByteInputDecoder(buf, off, len, bufferIsImmutable);
}
diff --git a/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/UnsafeByteOperations.java b/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/UnsafeByteOperations.java
index 3d53f2e..ad99372 100644
--- a/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/UnsafeByteOperations.java
+++ b/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/UnsafeByteOperations.java
@@ -98,6 +98,17 @@ public final class UnsafeByteOperations {
}
/**
+ * An unsafe operation that returns a {@link ByteString} that is backed by the provided buffer.
+ * @param buffer the ByteInput buffer to be wrapped
+ * @param offset the offset of the wrapped byteinput
+ * @param length the number of bytes of the byteinput
+ * @return a {@link ByteString} backed by the provided buffer
+ */
+ public static ByteString unsafeWrap(ByteInput buffer, int offset, int len) {
+ return ByteString.wrap(buffer, offset, len);
+ }
+
+ /**
* Writes the given {@link ByteString} to the provided {@link ByteOutput}. Calling this method may
* result in multiple operations on the target {@link ByteOutput}
* (i.e. for roped {@link ByteString}s).