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/03/19 04:54:56 UTC
[hbase] branch branch-2.2 updated: HBASE-23999 [flakey test]
TestTableOutputFormatConnectionExhaust (#1302)
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 3263c20 HBASE-23999 [flakey test] TestTableOutputFormatConnectionExhaust (#1302)
3263c20 is described below
commit 3263c2005e5837dc559752f2453c0008af656904
Author: Huaxiang Sun <qi...@hotmail.com>
AuthorDate: Wed Mar 18 21:51:04 2020 -0700
HBASE-23999 [flakey test] TestTableOutputFormatConnectionExhaust (#1302)
Signed-off-by: Nick Dimiduk <nd...@apache.org>
---
.../hadoop/hbase/regionserver/TestCompactionTool.java | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionTool.java b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionTool.java
index b1a5b7a..9e7340f 100644
--- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionTool.java
+++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionTool.java
@@ -19,9 +19,6 @@ package org.apache.hadoop.hbase.regionserver;
import static org.junit.Assert.assertEquals;
-import java.io.File;
-import java.io.FileOutputStream;
-
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
@@ -60,12 +57,6 @@ public class TestCompactionTool {
public void setUp() throws Exception {
this.testUtil.startMiniCluster();
testUtil.createTable(tableName, HBaseTestingUtility.fam1);
- String defaultFS = testUtil.getMiniHBaseCluster().getConfiguration().get("fs.defaultFS");
- Configuration config = HBaseConfiguration.create();
- config.set("fs.defaultFS", defaultFS);
- String configPath = this.getClass().getClassLoader()
- .getResource("hbase-site.xml").getFile();
- config.writeXml(new FileOutputStream(new File(configPath)));
rootDir = testUtil.getDefaultRootDirPath();
this.region = testUtil.getMiniHBaseCluster().getRegions(tableName).get(0);
}
@@ -89,7 +80,10 @@ public class TestCompactionTool {
+ Bytes.toString(HBaseTestingUtility.fam1);
FileStatus[] regionDirFiles = fs.listStatus(new Path(storePath));
assertEquals(10, regionDirFiles.length);
- int result = ToolRunner.run(HBaseConfiguration.create(), new CompactionTool(),
+ String defaultFS = testUtil.getMiniHBaseCluster().getConfiguration().get("fs.defaultFS");
+ Configuration config = HBaseConfiguration.create();
+ config.set("fs.defaultFS", defaultFS);
+ int result = ToolRunner.run(config, new CompactionTool(),
new String[]{"-compactOnce", "-major", storePath});
assertEquals(0,result);
regionDirFiles = fs.listStatus(new Path(storePath));