From 950050e9d61299afa9efcbece053813fdaa4860d Mon Sep 17 00:00:00 2001 From: stack Date: Mon, 2 Nov 2015 08:06:34 -0800 Subject: [PATCH] Revert "HBASE-14728 TestRowCounter is broken in master (Abhishek Singh Chouhan)" Revert because I overcommitted, included files from another patch. This reverts commit 47659200ac1d53590379ff431c428dffc07fd06a. --- conf/hbase-env.cmd | 4 ++++ conf/hbase-env.sh | 4 ++++ dev-support/jenkinsEnv.sh | 2 +- dev-support/publish_hbase_website.sh | 4 ++-- .../apache/hadoop/hbase/mapreduce/TestRowCounter.java | 10 +++------- hbase-spark/pom.xml | 2 +- pom.xml | 6 +++--- 7 files changed, 18 insertions(+), 14 deletions(-) diff --git a/conf/hbase-env.cmd b/conf/hbase-env.cmd index 003d1b388bd..9fb87d77b98 100644 --- a/conf/hbase-env.cmd +++ b/conf/hbase-env.cmd @@ -42,6 +42,10 @@ @rem @rem See TestIPv6NIOServerSocketChannel. set HBASE_OPTS="-XX:+UseConcMarkSweepGC" "-Djava.net.preferIPv4Stack=true" +@rem Configure PermSize. Only needed in JDK7. You can safely remove it for JDK8+ +set HBASE_MASTER_OPTS=%HBASE_MASTER_OPTS% "-XX:PermSize=128m" "-XX:MaxPermSize=128m" +set HBASE_REGIONSERVER_OPTS=%HBASE_REGIONSERVER_OPTS% "-XX:PermSize=128m" "-XX:MaxPermSize=128m" + @rem Uncomment below to enable java garbage collection logging for the server-side processes @rem this enables basic gc logging for the server processes to the .out file @rem set SERVER_GC_OPTS="-verbose:gc" "-XX:+PrintGCDetails" "-XX:+PrintGCDateStamps" %HBASE_GC_OPTS% diff --git a/conf/hbase-env.sh b/conf/hbase-env.sh index e0a143236e6..b7d00d169fe 100644 --- a/conf/hbase-env.sh +++ b/conf/hbase-env.sh @@ -42,6 +42,10 @@ # see http://wiki.apache.org/hadoop/PerformanceTuning export HBASE_OPTS="-XX:+UseConcMarkSweepGC" +# Configure PermSize. Only needed in JDK7. You can safely remove it for JDK8+ +export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m" +export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m" + # Uncomment one of the below three options to enable java garbage collection logging for the server-side processes. # This enables basic gc logging to the .out file. diff --git a/dev-support/jenkinsEnv.sh b/dev-support/jenkinsEnv.sh index d7fe87339e2..6961437fd45 100755 --- a/dev-support/jenkinsEnv.sh +++ b/dev-support/jenkinsEnv.sh @@ -30,7 +30,7 @@ export CLOVER_HOME=/home/jenkins/tools/clover/latest export MAVEN_HOME=/home/jenkins/tools/maven/latest export PATH=$PATH:$JAVA_HOME/bin:$ANT_HOME/bin: -export MAVEN_OPTS="${MAVEN_OPTS:-"-Xmx3100M -XX:-UsePerfData"}" +export MAVEN_OPTS="${MAVEN_OPTS:-"-Xmx3100M -XX:-UsePerfData -XX:MaxPermSize=256m"}" ulimit -n diff --git a/dev-support/publish_hbase_website.sh b/dev-support/publish_hbase_website.sh index 406a6454cfd..1560bcf00bf 100755 --- a/dev-support/publish_hbase_website.sh +++ b/dev-support/publish_hbase_website.sh @@ -90,7 +90,7 @@ if [ -z "$SVN_DIR" ]; then SVN_DIR="$HOME/svn/hbase.apache.org/trunk" fi -export MAVEN_OPTS=${MAVEN_OPTS:-"-Xmx3g"} +export MAVEN_OPTS=${MAVEN_OPTS:-"-Xmx3g -XX:MaxPermSize=256m"} cd $GIT_DIR @@ -257,4 +257,4 @@ else echo "Commit message:" cat /tmp/commit.txt svn commit -q -F /tmp/commit.txt -fi +fi \ No newline at end of file diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestRowCounter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestRowCounter.java index fe2e1976001..1bd2437bae8 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestRowCounter.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestRowCounter.java @@ -38,8 +38,6 @@ import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.client.Table; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.LauncherSecurityManager; -import org.apache.hadoop.mapreduce.Counter; -import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.util.ToolRunner; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -205,11 +203,9 @@ public class TestRowCounter { * @throws Exception */ private void runRowCount(String[] args, int expectedCount) throws Exception { - Job job = RowCounter.createSubmittableJob(TEST_UTIL.getConfiguration(), args); - job.waitForCompletion(true); - assertTrue(job.isSuccessful()); - Counter counter = job.getCounters().findCounter(RowCounter.RowCounterMapper.Counters.ROWS); - assertEquals(expectedCount, counter.getValue()); + final RowCounter counter = new RowCounter(); + assertEquals("job failed either due to failure or miscount (see log output).", 0, + ToolRunner.run(TEST_UTIL.getConfiguration(), counter, args)); } /** diff --git a/hbase-spark/pom.xml b/hbase-spark/pom.xml index 6152787bf3c..ec911bdf5e7 100644 --- a/hbase-spark/pom.xml +++ b/hbase-spark/pom.xml @@ -587,7 +587,7 @@ Integration-Test - -Xmx1536m -XX:ReservedCodeCacheSize=512m + -Xmx1536m -XX:MaxPermSize=512m -XX:ReservedCodeCacheSize=512m false diff --git a/pom.xml b/pom.xml index 65e78f4a82e..d3d457ada90 100644 --- a/pom.xml +++ b/pom.xml @@ -1252,10 +1252,10 @@ -enableassertions -Dhbase.test -Xmx${surefire.Xmx} - -Djava.security.egd=file:/dev/./urandom -Djava.net.preferIPv4Stack=true + -XX:MaxPermSize=256m -Djava.security.egd=file:/dev/./urandom -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true - -enableassertions -Xmx${surefire.cygwinXmx} + -enableassertions -Xmx${surefire.cygwinXmx} -XX:MaxPermSize=256m -Djava.security.egd=file:/dev/./urandom -Djava.net.preferIPv4Stack=true "-Djava.library.path=${hadoop.library.path};${java.library.path}" @@ -2632,7 +2632,7 @@ or you can provide the license with -Dmaven.clover.licenseLocation=/path/to/license. Committers can find the license under https://svn.apache.org/repos/private/committers/donated-licenses/clover/ The report will be generated under target/site/clover/index.html when you run - MAVEN_OPTS="-Xmx2048m" mvn clean package -Pclover site --> + MAVEN_OPTS="-Xmx2048m -XX:MaxPermSize=512m" mvn clean package -Pclover site --> clover