You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by rm...@apache.org on 2020/05/13 14:28:57 UTC
[flink] 03/08: [FLINK-11086][HBase] Skip some HBase tests in Hadoop
3
This is an automated email from the ASF dual-hosted git repository.
rmetzger pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 90fbb9447f4e59ac3bf7c313bbc0c7274cb0d907
Author: Robert Metzger <rm...@apache.org>
AuthorDate: Mon May 4 10:12:53 2020 +0200
[FLINK-11086][HBase] Skip some HBase tests in Hadoop 3
---
.../addons/hbase/util/HBaseTestingClusterAutoStarter.java | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/flink-connectors/flink-hbase/src/test/java/org/apache/flink/addons/hbase/util/HBaseTestingClusterAutoStarter.java b/flink-connectors/flink-hbase/src/test/java/org/apache/flink/addons/hbase/util/HBaseTestingClusterAutoStarter.java
index b515c2b..0fe8ad4 100644
--- a/flink-connectors/flink-hbase/src/test/java/org/apache/flink/addons/hbase/util/HBaseTestingClusterAutoStarter.java
+++ b/flink-connectors/flink-hbase/src/test/java/org/apache/flink/addons/hbase/util/HBaseTestingClusterAutoStarter.java
@@ -35,7 +35,9 @@ import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.ZooKeeperConnectionException;
import org.apache.hadoop.hbase.client.HBaseAdmin;
import org.apache.hadoop.hbase.client.HTable;
+import org.apache.hadoop.util.VersionUtil;
import org.junit.AfterClass;
+import org.junit.Assume;
import org.junit.BeforeClass;
import java.io.File;
@@ -142,6 +144,11 @@ public abstract class HBaseTestingClusterAutoStarter extends AbstractTestBase {
@BeforeClass
public static void setUp() throws Exception {
+ // HBase 1.4 does not work with Hadoop 3
+ // because it uses Guava 12.0.1, Hadoop 3 uses Guava 27.0-jre.
+ // There is not Guava version in between that works with both.
+ Assume.assumeTrue("This test is skipped for Hadoop versions above 3", VersionUtil.compareVersions(System.getProperty("hadoop.version"), "3.0.0") < 0);
+
LOG.info("HBase minicluster: Starting");
TEST_UTIL.startMiniCluster(1);
@@ -236,6 +243,10 @@ public abstract class HBaseTestingClusterAutoStarter extends AbstractTestBase {
@AfterClass
public static void tearDown() throws Exception {
+ if (conf == null) {
+ LOG.info("Skipping Hbase tear down. It was never started");
+ return;
+ }
LOG.info("HBase minicluster: Shutting down");
deleteTables();
hbaseSiteXmlFile.delete();