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 2020/03/17 06:42:16 UTC
[hbase] branch branch-2 updated: HBASE-22103. HDFS-13209 in Hadoop
3.3.0 breaks asyncwal. (#1284)
This is an automated email from the ASF dual-hosted git repository.
zhangduo pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2 by this push:
new 7b2fe82 HBASE-22103. HDFS-13209 in Hadoop 3.3.0 breaks asyncwal. (#1284)
7b2fe82 is described below
commit 7b2fe82be3344d526175734d93bef32fbcb0d73f
Author: Wei-Chiu Chuang <we...@apache.org>
AuthorDate: Mon Mar 16 23:36:56 2020 -0700
HBASE-22103. HDFS-13209 in Hadoop 3.3.0 breaks asyncwal. (#1284)
Signed-off-by: Duo Zhang <zh...@apache.org>
---
.../io/asyncfs/FanOutOneBlockAsyncDFSOutputHelper.java | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutputHelper.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutputHelper.java
index 0c8a49b..5eb2004 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutputHelper.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutputHelper.java
@@ -221,6 +221,18 @@ public final class FanOutOneBlockAsyncDFSOutputHelper {
};
}
+ private static FileCreator createFileCreator3_3() throws NoSuchMethodException {
+ Method createMethod = ClientProtocol.class.getMethod("create", String.class, FsPermission.class,
+ String.class, EnumSetWritable.class, boolean.class, short.class, long.class,
+ CryptoProtocolVersion[].class, String.class, String.class);
+
+ return (instance, src, masked, clientName, flag, createParent, replication, blockSize,
+ supportedVersions) -> {
+ return (HdfsFileStatus) createMethod.invoke(instance, src, masked, clientName, flag,
+ createParent, replication, blockSize, supportedVersions, null, null);
+ };
+ }
+
private static FileCreator createFileCreator3() throws NoSuchMethodException {
Method createMethod = ClientProtocol.class.getMethod("create", String.class, FsPermission.class,
String.class, EnumSetWritable.class, boolean.class, short.class, long.class,
@@ -247,6 +259,12 @@ public final class FanOutOneBlockAsyncDFSOutputHelper {
private static FileCreator createFileCreator() throws NoSuchMethodException {
try {
+ return createFileCreator3_3();
+ } catch (NoSuchMethodException e) {
+ LOG.debug("ClientProtocol::create wrong number of arguments, should be hadoop 3.2 or below");
+ }
+
+ try {
return createFileCreator3();
} catch (NoSuchMethodException e) {
LOG.debug("ClientProtocol::create wrong number of arguments, should be hadoop 2.x");