You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ch...@apache.org on 2015/12/17 11:47:26 UTC
hbase git commit: HBASE-14955 OOME: cannot create native thread is
back
Repository: hbase
Updated Branches:
refs/heads/branch-1 988ab048e -> 6ec92281e
HBASE-14955 OOME: cannot create native thread is back
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/6ec92281
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/6ec92281
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/6ec92281
Branch: refs/heads/branch-1
Commit: 6ec92281ed1f9683baad9800f9c3a6fe531ee827
Parents: 988ab04
Author: chenheng <ch...@apache.org>
Authored: Thu Dec 17 18:33:37 2015 +0800
Committer: chenheng <ch...@apache.org>
Committed: Thu Dec 17 18:33:37 2015 +0800
----------------------------------------------------------------------
.../java/org/apache/hadoop/hbase/HBaseTestingUtility.java | 10 ++++++++++
.../mapreduce/TestImportTSVWithVisibilityLabels.java | 4 +---
.../hbase/mapreduce/TestTableInputFormatScanBase.java | 4 +---
3 files changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/6ec92281/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
index b0abf8d..44a27ba 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
@@ -161,6 +161,8 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
public static final String PRESPLIT_TEST_TABLE_KEY = "hbase.test.pre-split-table";
public static final boolean PRESPLIT_TEST_TABLE = true;
+
+ public static final String USE_LOCAL_FILESYSTEM = "hbase.test.local.fileSystem";
/**
* Set if we were passed a zkCluster. If so, we won't shutdown zk as
* part of general shutdown.
@@ -396,6 +398,11 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
return testPath;
}
+ public void setJobWithoutMRCluster() throws IOException {
+ conf.set("hbase.fs.tmp.dir", getDataTestDirOnTestFS("hbase-staging").toString());
+ conf.setBoolean(HBaseTestingUtility.USE_LOCAL_FILESYSTEM, true);
+ }
+
private void createSubDirAndSystemProperty(
String propertyName, Path parent, String subDirName){
@@ -632,6 +639,9 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
}
FileSystem fs = this.dfsCluster.getFileSystem();
FSUtils.setFsDefault(this.conf, new Path(fs.getUri()));
+ if (this.conf.getBoolean(USE_LOCAL_FILESYSTEM, false)) {
+ FSUtils.setFsDefault(this.conf, new Path("file:///"));
+ }
}
public MiniDFSCluster startMiniDFSCluster(int servers, final String racks[], String hosts[])
http://git-wip-us.apache.org/repos/asf/hbase/blob/6ec92281/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithVisibilityLabels.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithVisibilityLabels.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithVisibilityLabels.java
index 5020716..6426ec9 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithVisibilityLabels.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithVisibilityLabels.java
@@ -122,12 +122,11 @@ public class TestImportTSVWithVisibilityLabels implements Configurable {
conf.set("hbase.coprocessor.region.classes", VisibilityController.class.getName());
conf.setClass(VisibilityUtils.VISIBILITY_LABEL_GENERATOR_CLASS, SimpleScanLabelGenerator.class,
ScanLabelGenerator.class);
+ util.setJobWithoutMRCluster();
util.startMiniCluster();
// Wait for the labels table to become available
util.waitTableEnabled(VisibilityConstants.LABELS_TABLE_NAME.getName(), 50000);
createLabels();
- Admin admin = new HBaseAdmin(util.getConfiguration());
- util.startMiniMapReduceCluster();
}
private static void createLabels() throws IOException, InterruptedException {
@@ -151,7 +150,6 @@ public class TestImportTSVWithVisibilityLabels implements Configurable {
@AfterClass
public static void releaseCluster() throws Exception {
- util.shutdownMiniMapReduceCluster();
util.shutdownMiniCluster();
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/6ec92281/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormatScanBase.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormatScanBase.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormatScanBase.java
index b41263c..8e451cd 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormatScanBase.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormatScanBase.java
@@ -81,18 +81,16 @@ public abstract class TestTableInputFormatScanBase {
// switch TIF to log at DEBUG level
TEST_UTIL.enableDebug(TableInputFormat.class);
TEST_UTIL.enableDebug(TableInputFormatBase.class);
+ TEST_UTIL.setJobWithoutMRCluster();
// start mini hbase cluster
TEST_UTIL.startMiniCluster(3);
// create and fill table
table = TEST_UTIL.createMultiRegionTable(TableName.valueOf(TABLE_NAME), INPUT_FAMILY);
TEST_UTIL.loadTable(table, INPUT_FAMILY, false);
- // start MR cluster
- TEST_UTIL.startMiniMapReduceCluster();
}
@AfterClass
public static void tearDownAfterClass() throws Exception {
- TEST_UTIL.shutdownMiniMapReduceCluster();
TEST_UTIL.shutdownMiniCluster();
}