You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2020/04/29 05:29:45 UTC
[hbase] branch branch-2.2 updated: HBASE-22103. HDFS-13209 in
Hadoop 3.3.0 breaks asyncwal. (#1284) (#1566)
This is an automated email from the ASF dual-hosted git repository.
stack pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.2 by this push:
new 79b5ef4 HBASE-22103. HDFS-13209 in Hadoop 3.3.0 breaks asyncwal. (#1284) (#1566)
79b5ef4 is described below
commit 79b5ef4ecc56f283cd32dac58127e8b7a420c3b0
Author: Wei-Chiu Chuang <we...@apache.org>
AuthorDate: Tue Apr 28 22:29:33 2020 -0700
HBASE-22103. HDFS-13209 in Hadoop 3.3.0 breaks asyncwal. (#1284) (#1566)
Signed-off-by: Duo Zhang <zh...@apache.org>
(cherry picked from commit 7b2fe82be3344d526175734d93bef32fbcb0d73f)
---
.../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");