HBASE-23833. The relocated hadoop-thirdparty protobuf breaks HBase asyncwal (#1301)
commit72727ff9be9bc626522247aad9155938656fbfdb
authorWei-Chiu Chuang <weichiu@apache.org>
Wed, 8 Apr 2020 18:31:51 +0000 (8 11:31 -0700)
committerGitHub <noreply@github.com>
Wed, 8 Apr 2020 18:31:51 +0000 (8 11:31 -0700)
tree6e2d4c53e0904dd1ff9b0bfef23ae5ab1be29e96
parent082ebdd53c434d1d3741b62e97522aa83ca74b34
HBASE-23833. The relocated hadoop-thirdparty protobuf breaks HBase asyncwal  (#1301)

* Use Reflection to access shaded Hadoop protobuf classes.

(cherry picked from commit a321e536989083ca3620bf2c53f12c07740bf5b0)

* Update to improve the code:

1. Added license.
2. Added more comments.
3. Wrap byte array instead of copy to make a ByteString.
4. Moved all reflection instantiation to static class loading time.

* Use LiteralByteString to wrap byte array instead of copying it.

Signed-off-by: Duo Zhang <zhangduo@apache.org>
Signed-off-by: stack <stack@apache.org>
hbase-server/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutput.java
hbase-server/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutputHelper.java
hbase-server/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutputSaslHelper.java
hbase-server/src/main/java/org/apache/hadoop/hbase/io/asyncfs/ProtobufDecoder.java [new file with mode: 0644]