[2/6] accumulo git commit: ACCUMULO-3916 Set mapreduce.job.reduce.slowstart.completedmaps=0.95 for ContinuousVerify
ACCUMULO-3916 Set mapreduce.job.reduce.slowstart.completedmaps=0.95 for ContinuousVerify Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/e785da14 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/e785da14 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/e785da14 Branch: refs/heads/1.7 Commit: e785da14833c1095c2835d36d896b17e629cad9e Parents: fc15de7 Author: Josh Elser Authored: Tue Jun 23 22:49:15 2015 -0400 Committer: Josh Elser Committed: Tue Jun 23 22:49:15 2015 -0400 -- test/system/continuous/run-verify.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/e785da14/test/system/continuous/run-verify.sh -- diff --git a/test/system/continuous/run-verify.sh b/test/system/continuous/run-verify.sh index 72ecc14..42eb214 100755 --- a/test/system/continuous/run-verify.sh +++ b/test/system/continuous/run-verify.sh @@ -39,4 +39,4 @@ if [ "$SCAN_OFFLINE" == "false" ] ; then SCAN_OPT= fi -$ACCUMULO_HOME/bin/tool.sh "$SERVER_LIBJAR" org.apache.accumulo.test.continuous.ContinuousVerify -libjars "$SERVER_LIBJAR" $AUTH_OPT -i $INSTANCE_NAME -z $ZOO_KEEPERS -u $USER -p $PASS --table $TABLE --output $VERIFY_OUT --maxMappers $VERIFY_MAX_MAPS --reducers $VERIFY_REDUCERS $SCAN_OPT +$ACCUMULO_HOME/bin/tool.sh "$SERVER_LIBJAR" org.apache.accumulo.test.continuous.ContinuousVerify -Dmapreduce.job.reduce.slowstart.completedmaps=0.95 -libjars "$SERVER_LIBJAR" $AUTH_OPT -i $INSTANCE_NAME -z $ZOO_KEEPERS -u $USER -p $PASS --table $TABLE --output $VERIFY_OUT --maxMappers $VERIFY_MAX_MAPS --reducers $VERIFY_REDUCERS $SCAN_OPT
[3/6] accumulo git commit: ACCUMULO-3916 Set mapreduce.job.reduce.slowstart.completedmaps=0.95 for ContinuousVerify
ACCUMULO-3916 Set mapreduce.job.reduce.slowstart.completedmaps=0.95 for ContinuousVerify Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/e785da14 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/e785da14 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/e785da14 Branch: refs/heads/master Commit: e785da14833c1095c2835d36d896b17e629cad9e Parents: fc15de7 Author: Josh Elser Authored: Tue Jun 23 22:49:15 2015 -0400 Committer: Josh Elser Committed: Tue Jun 23 22:49:15 2015 -0400 -- test/system/continuous/run-verify.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/e785da14/test/system/continuous/run-verify.sh -- diff --git a/test/system/continuous/run-verify.sh b/test/system/continuous/run-verify.sh index 72ecc14..42eb214 100755 --- a/test/system/continuous/run-verify.sh +++ b/test/system/continuous/run-verify.sh @@ -39,4 +39,4 @@ if [ "$SCAN_OFFLINE" == "false" ] ; then SCAN_OPT= fi -$ACCUMULO_HOME/bin/tool.sh "$SERVER_LIBJAR" org.apache.accumulo.test.continuous.ContinuousVerify -libjars "$SERVER_LIBJAR" $AUTH_OPT -i $INSTANCE_NAME -z $ZOO_KEEPERS -u $USER -p $PASS --table $TABLE --output $VERIFY_OUT --maxMappers $VERIFY_MAX_MAPS --reducers $VERIFY_REDUCERS $SCAN_OPT +$ACCUMULO_HOME/bin/tool.sh "$SERVER_LIBJAR" org.apache.accumulo.test.continuous.ContinuousVerify -Dmapreduce.job.reduce.slowstart.completedmaps=0.95 -libjars "$SERVER_LIBJAR" $AUTH_OPT -i $INSTANCE_NAME -z $ZOO_KEEPERS -u $USER -p $PASS --table $TABLE --output $VERIFY_OUT --maxMappers $VERIFY_MAX_MAPS --reducers $VERIFY_REDUCERS $SCAN_OPT
[4/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: test/system/continuous/run-verify.sh Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/f1bc1dd8 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/f1bc1dd8 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/f1bc1dd8 Branch: refs/heads/master Commit: f1bc1dd8dbf73e0063aa7e1daf577c953a9a63e0 Parents: a0032a9 e785da1 Author: Josh Elser Authored: Tue Jun 23 22:50:29 2015 -0400 Committer: Josh Elser Committed: Tue Jun 23 22:50:29 2015 -0400 -- test/system/continuous/run-verify.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/f1bc1dd8/test/system/continuous/run-verify.sh -- diff --cc test/system/continuous/run-verify.sh index 4706d6b,42eb214..c68c3ea --- a/test/system/continuous/run-verify.sh +++ b/test/system/continuous/run-verify.sh @@@ -27,12 -27,16 +27,12 @@@ bin=$( cd -P "$( dirname "${SOURCE}" ) script=$( basename "${SOURCE}" ) # Stop: Resolve Script Directory -. ${bin}/mapred-setup.sh +. "${bin}/mapred-setup.sh" AUTH_OPT=""; +[[ -n $VERIFY_AUTHS ]] && AUTH_OPT="--auths $VERIFY_AUTHS" -if [ -n "$VERIFY_AUTHS" ] ; then - AUTH_OPT="--auths $VERIFY_AUTHS"; -fi SCAN_OPT=--offline -if [ "$SCAN_OFFLINE" == "false" ] ; then - SCAN_OPT= -fi +[[ $SCAN_OFFLINE == false ]] && SCAN_OPT= - "$ACCUMULO_HOME/bin/tool.sh" "$SERVER_LIBJAR" org.apache.accumulo.test.continuous.ContinuousVerify -libjars "$SERVER_LIBJAR" "$AUTH_OPT" -i "$INSTANCE_NAME" -z "$ZOO_KEEPERS" -u "$USER" -p "$PASS" --table "$TABLE" --output "$VERIFY_OUT" --maxMappers "$VERIFY_MAX_MAPS" --reducers "$VERIFY_REDUCERS" "$SCAN_OPT" -$ACCUMULO_HOME/bin/tool.sh "$SERVER_LIBJAR" org.apache.accumulo.test.continuous.ContinuousVerify -Dmapreduce.job.reduce.slowstart.completedmaps=0.95 -libjars "$SERVER_LIBJAR" $AUTH_OPT -i $INSTANCE_NAME -z $ZOO_KEEPERS -u $USER -p $PASS --table $TABLE --output $VERIFY_OUT --maxMappers $VERIFY_MAX_MAPS --reducers $VERIFY_REDUCERS $SCAN_OPT ++"$ACCUMULO_HOME/bin/tool.sh" "$SERVER_LIBJAR" org.apache.accumulo.test.continuous.ContinuousVerify -Dmapreduce.job.reduce.slowstart.completedmaps=0.95 -libjars "$SERVER_LIBJAR" "$AUTH_OPT" -i "$INSTANCE_NAME" -z "$ZOO_KEEPERS" -u "$USER" -p "$PASS" --table "$TABLE" --output "$VERIFY_OUT" --maxMappers "$VERIFY_MAX_MAPS" --reducers "$VERIFY_REDUCERS" "$SCAN_OPT"
[6/6] accumulo git commit: Merge branch '1.7'
Merge branch '1.7' Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/29fdbfbb Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/29fdbfbb Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/29fdbfbb Branch: refs/heads/master Commit: 29fdbfbb74199d96e5f84a70de3ad7c2c51f6035 Parents: b8005be f1bc1dd Author: Josh Elser Authored: Tue Jun 23 22:50:34 2015 -0400 Committer: Josh Elser Committed: Tue Jun 23 22:50:34 2015 -0400 -- test/system/continuous/run-verify.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --
[1/6] accumulo git commit: ACCUMULO-3916 Set mapreduce.job.reduce.slowstart.completedmaps=0.95 for ContinuousVerify
Repository: accumulo Updated Branches: refs/heads/1.6 fc15de748 -> e785da148 refs/heads/1.7 a0032a9a1 -> f1bc1dd8d refs/heads/master b8005bef4 -> 29fdbfbb7 ACCUMULO-3916 Set mapreduce.job.reduce.slowstart.completedmaps=0.95 for ContinuousVerify Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/e785da14 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/e785da14 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/e785da14 Branch: refs/heads/1.6 Commit: e785da14833c1095c2835d36d896b17e629cad9e Parents: fc15de7 Author: Josh Elser Authored: Tue Jun 23 22:49:15 2015 -0400 Committer: Josh Elser Committed: Tue Jun 23 22:49:15 2015 -0400 -- test/system/continuous/run-verify.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/e785da14/test/system/continuous/run-verify.sh -- diff --git a/test/system/continuous/run-verify.sh b/test/system/continuous/run-verify.sh index 72ecc14..42eb214 100755 --- a/test/system/continuous/run-verify.sh +++ b/test/system/continuous/run-verify.sh @@ -39,4 +39,4 @@ if [ "$SCAN_OFFLINE" == "false" ] ; then SCAN_OPT= fi -$ACCUMULO_HOME/bin/tool.sh "$SERVER_LIBJAR" org.apache.accumulo.test.continuous.ContinuousVerify -libjars "$SERVER_LIBJAR" $AUTH_OPT -i $INSTANCE_NAME -z $ZOO_KEEPERS -u $USER -p $PASS --table $TABLE --output $VERIFY_OUT --maxMappers $VERIFY_MAX_MAPS --reducers $VERIFY_REDUCERS $SCAN_OPT +$ACCUMULO_HOME/bin/tool.sh "$SERVER_LIBJAR" org.apache.accumulo.test.continuous.ContinuousVerify -Dmapreduce.job.reduce.slowstart.completedmaps=0.95 -libjars "$SERVER_LIBJAR" $AUTH_OPT -i $INSTANCE_NAME -z $ZOO_KEEPERS -u $USER -p $PASS --table $TABLE --output $VERIFY_OUT --maxMappers $VERIFY_MAX_MAPS --reducers $VERIFY_REDUCERS $SCAN_OPT
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: test/system/continuous/run-verify.sh Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/f1bc1dd8 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/f1bc1dd8 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/f1bc1dd8 Branch: refs/heads/1.7 Commit: f1bc1dd8dbf73e0063aa7e1daf577c953a9a63e0 Parents: a0032a9 e785da1 Author: Josh Elser Authored: Tue Jun 23 22:50:29 2015 -0400 Committer: Josh Elser Committed: Tue Jun 23 22:50:29 2015 -0400 -- test/system/continuous/run-verify.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/f1bc1dd8/test/system/continuous/run-verify.sh -- diff --cc test/system/continuous/run-verify.sh index 4706d6b,42eb214..c68c3ea --- a/test/system/continuous/run-verify.sh +++ b/test/system/continuous/run-verify.sh @@@ -27,12 -27,16 +27,12 @@@ bin=$( cd -P "$( dirname "${SOURCE}" ) script=$( basename "${SOURCE}" ) # Stop: Resolve Script Directory -. ${bin}/mapred-setup.sh +. "${bin}/mapred-setup.sh" AUTH_OPT=""; +[[ -n $VERIFY_AUTHS ]] && AUTH_OPT="--auths $VERIFY_AUTHS" -if [ -n "$VERIFY_AUTHS" ] ; then - AUTH_OPT="--auths $VERIFY_AUTHS"; -fi SCAN_OPT=--offline -if [ "$SCAN_OFFLINE" == "false" ] ; then - SCAN_OPT= -fi +[[ $SCAN_OFFLINE == false ]] && SCAN_OPT= - "$ACCUMULO_HOME/bin/tool.sh" "$SERVER_LIBJAR" org.apache.accumulo.test.continuous.ContinuousVerify -libjars "$SERVER_LIBJAR" "$AUTH_OPT" -i "$INSTANCE_NAME" -z "$ZOO_KEEPERS" -u "$USER" -p "$PASS" --table "$TABLE" --output "$VERIFY_OUT" --maxMappers "$VERIFY_MAX_MAPS" --reducers "$VERIFY_REDUCERS" "$SCAN_OPT" -$ACCUMULO_HOME/bin/tool.sh "$SERVER_LIBJAR" org.apache.accumulo.test.continuous.ContinuousVerify -Dmapreduce.job.reduce.slowstart.completedmaps=0.95 -libjars "$SERVER_LIBJAR" $AUTH_OPT -i $INSTANCE_NAME -z $ZOO_KEEPERS -u $USER -p $PASS --table $TABLE --output $VERIFY_OUT --maxMappers $VERIFY_MAX_MAPS --reducers $VERIFY_REDUCERS $SCAN_OPT ++"$ACCUMULO_HOME/bin/tool.sh" "$SERVER_LIBJAR" org.apache.accumulo.test.continuous.ContinuousVerify -Dmapreduce.job.reduce.slowstart.completedmaps=0.95 -libjars "$SERVER_LIBJAR" "$AUTH_OPT" -i "$INSTANCE_NAME" -z "$ZOO_KEEPERS" -u "$USER" -p "$PASS" --table "$TABLE" --output "$VERIFY_OUT" --maxMappers "$VERIFY_MAX_MAPS" --reducers "$VERIFY_REDUCERS" "$SCAN_OPT"
[3/3] accumulo git commit: Merge branch '1.7'
Merge branch '1.7' Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/b8005bef Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/b8005bef Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/b8005bef Branch: refs/heads/master Commit: b8005bef42544e61507722f699149256861c6b59 Parents: c91d713 a0032a9 Author: Josh Elser Authored: Tue Jun 23 21:41:33 2015 -0400 Committer: Josh Elser Committed: Tue Jun 23 21:41:33 2015 -0400 -- test/src/main/java/org/apache/accumulo/test/functional/BulkIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/b8005bef/test/src/main/java/org/apache/accumulo/test/functional/BulkIT.java -- diff --cc test/src/main/java/org/apache/accumulo/test/functional/BulkIT.java index 04570a4,000..f752ed5 mode 100644,00..100644 --- a/test/src/main/java/org/apache/accumulo/test/functional/BulkIT.java +++ b/test/src/main/java/org/apache/accumulo/test/functional/BulkIT.java @@@ -1,114 -1,0 +1,114 @@@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.accumulo.test.functional; + +import org.apache.accumulo.core.cli.BatchWriterOpts; +import org.apache.accumulo.core.cli.ScannerOpts; +import org.apache.accumulo.core.client.Connector; +import org.apache.accumulo.core.util.CachedConfiguration; +import org.apache.accumulo.harness.AccumuloClusterHarness; +import org.apache.accumulo.test.TestIngest; +import org.apache.accumulo.test.TestIngest.Opts; +import org.apache.accumulo.test.VerifyIngest; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.Path; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class BulkIT extends AccumuloClusterHarness { + + private static final int N = 10; + private static final int COUNT = 5; + private static final BatchWriterOpts BWOPTS = new BatchWriterOpts(); + private static final ScannerOpts SOPTS = new ScannerOpts(); + + @Override + protected int defaultTimeoutSeconds() { +return 4 * 60; + } + + private Configuration origConf; + + @Before + public void saveConf() { +origConf = CachedConfiguration.getInstance(); + } + + @After + public void restoreConf() { +if (null != origConf) { + CachedConfiguration.setInstance(origConf); +} + } + + @Test + public void test() throws Exception { +runTest(getConnector(), getCluster().getFileSystem(), getCluster().getTemporaryPath(), getAdminPrincipal(), getUniqueNames(1)[0], +this.getClass().getName(), testName.getMethodName()); + } + + static void runTest(Connector c, FileSystem fs, Path basePath, String principal, String tableName, String filePrefix, String dirSuffix) throws Exception { +c.tableOperations().create(tableName); + +Path base = new Path(basePath, "testBulkFail_" + dirSuffix); +fs.delete(base, true); +fs.mkdirs(base); +Path bulkFailures = new Path(base, "failures"); +Path files = new Path(base, "files"); +fs.mkdirs(bulkFailures); +fs.mkdirs(files); + +Opts opts = new Opts(); +opts.timestamp = 1; +opts.random = 56; +opts.rows = N; +opts.instance = c.getInstance().getInstanceName(); +opts.cols = 1; +opts.setTableName(tableName); +opts.conf = new Configuration(false); +opts.fs = fs; +String fileFormat = filePrefix + "rf%02d"; +for (int i = 0; i < COUNT; i++) { + opts.outputFile = new Path(files, String.format(fileFormat, i)).toString(); + opts.startRow = N * i; + TestIngest.ingest(c, fs, opts, BWOPTS); +} - opts.outputFile = base + String.format(fileFormat, N); ++opts.outputFile = new Path(files, String.format(fileFormat, N)).toString(); +opts.startRow = N; +opts.rows = 1; +// create an rfile with one entry, there was a bug with this:
[1/3] accumulo git commit: ACCUMULO-3915 Make sure we import the bad file
Repository: accumulo Updated Branches: refs/heads/1.7 77066e35c -> a0032a9a1 refs/heads/master c91d713bb -> b8005bef4 ACCUMULO-3915 Make sure we import the bad file Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/a0032a9a Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/a0032a9a Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/a0032a9a Branch: refs/heads/1.7 Commit: a0032a9a181d5f498b46abce662d2acc4b165d63 Parents: 77066e3 Author: Josh Elser Authored: Tue Jun 23 21:41:01 2015 -0400 Committer: Josh Elser Committed: Tue Jun 23 21:41:01 2015 -0400 -- test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/a0032a9a/test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java -- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java b/test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java index 8ad3d26..1ed9bdf 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java @@ -92,7 +92,7 @@ public class BulkIT extends AccumuloClusterIT { opts.startRow = N * i; TestIngest.ingest(c, opts, BWOPTS); } -opts.outputFile = base + String.format(fileFormat, N); +opts.outputFile = new Path(files, String.format(fileFormat, N)).toString(); opts.startRow = N; opts.rows = 1; // create an rfile with one entry, there was a bug with this:
[2/3] accumulo git commit: ACCUMULO-3915 Make sure we import the bad file
ACCUMULO-3915 Make sure we import the bad file Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/a0032a9a Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/a0032a9a Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/a0032a9a Branch: refs/heads/master Commit: a0032a9a181d5f498b46abce662d2acc4b165d63 Parents: 77066e3 Author: Josh Elser Authored: Tue Jun 23 21:41:01 2015 -0400 Committer: Josh Elser Committed: Tue Jun 23 21:41:01 2015 -0400 -- test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/a0032a9a/test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java -- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java b/test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java index 8ad3d26..1ed9bdf 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java @@ -92,7 +92,7 @@ public class BulkIT extends AccumuloClusterIT { opts.startRow = N * i; TestIngest.ingest(c, opts, BWOPTS); } -opts.outputFile = base + String.format(fileFormat, N); +opts.outputFile = new Path(files, String.format(fileFormat, N)).toString(); opts.startRow = N; opts.rows = 1; // create an rfile with one entry, there was a bug with this:
[1/5] accumulo git commit: ACCUMULO-3912 Only configure conurrent namespaces in conucurrent test
Repository: accumulo Updated Branches: refs/heads/master 84a42bb59 -> c91d713bb ACCUMULO-3912 Only configure conurrent namespaces in conucurrent test Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/2721bc83 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/2721bc83 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/2721bc83 Branch: refs/heads/master Commit: 2721bc839944cc86cb0a6045293e5d928a0ea520 Parents: 3509547 Author: Keith Turner Authored: Tue Jun 23 16:33:41 2015 -0400 Committer: Keith Turner Committed: Tue Jun 23 16:49:04 2015 -0400 -- .../org/apache/accumulo/test/randomwalk/concurrent/Config.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/2721bc83/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java -- diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java index 402f139..1f4a284 100644 --- a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java +++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java @@ -201,7 +201,7 @@ public class Config extends Test { Setting setting = tableSettings[choice]; // pick a random table -SortedSet namespaces = state.getConnector().namespaceOperations().list(); +SortedSet namespaces = state.getConnector().namespaceOperations().list().tailSet("nspc").headSet("nspd"); if (namespaces.isEmpty()) return; String namespace = random.nextSample(namespaces, 1)[0].toString();
[5/5] accumulo git commit: Merge branch '1.7'
Merge branch '1.7' Conflicts: test/src/test/java/org/apache/accumulo/test/DetectDeadTabletServersIT.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/c91d713b Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/c91d713b Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/c91d713b Branch: refs/heads/master Commit: c91d713bb1ab36d4b89c6aee82f7fe10016513e7 Parents: 84a42bb 77066e3 Author: Keith Turner Authored: Tue Jun 23 18:26:45 2015 -0400 Committer: Keith Turner Committed: Tue Jun 23 18:26:45 2015 -0400 -- .../accumulo/test/DetectDeadTabletServers.java | 98 - .../test/DetectDeadTabletServersIT.java | 97 .../randomwalk/concurrent/CheckBalance.java | 110 --- .../concurrent/ConcurrentFixture.java | 5 +- .../test/randomwalk/concurrent/Config.java | 2 +- .../randomwalk/conf/modules/Concurrent.xml | 5 - 6 files changed, 99 insertions(+), 218 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/c91d713b/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServersIT.java -- diff --cc test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServersIT.java index 000,000..e4e0962 new file mode 100644 --- /dev/null +++ b/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServersIT.java @@@ -1,0 -1,0 +1,97 @@@ ++/* ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ */ ++package org.apache.accumulo.test; ++ ++import static org.apache.accumulo.minicluster.ServerType.TABLET_SERVER; ++import static org.junit.Assert.assertEquals; ++ ++import org.apache.accumulo.core.client.Connector; ++import org.apache.accumulo.core.client.impl.ClientContext; ++import org.apache.accumulo.core.client.impl.Credentials; ++import org.apache.accumulo.core.client.impl.MasterClient; ++import org.apache.accumulo.core.client.security.tokens.PasswordToken; ++import org.apache.accumulo.core.conf.Property; ++import org.apache.accumulo.core.master.thrift.MasterClientService.Client; ++import org.apache.accumulo.core.master.thrift.MasterMonitorInfo; ++import org.apache.accumulo.core.metadata.MetadataTable; ++import org.apache.accumulo.core.security.Authorizations; ++import org.apache.accumulo.core.trace.Tracer; ++import org.apache.accumulo.fate.util.UtilWaitThread; ++import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; ++import org.apache.accumulo.test.functional.ConfigurableMacBase; ++import org.apache.hadoop.conf.Configuration; ++import org.junit.Test; ++ ++import com.google.common.collect.Iterators; ++ ++public class DetectDeadTabletServersIT extends ConfigurableMacBase { ++ ++ @Override ++ protected void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) { ++cfg.setProperty(Property.INSTANCE_ZK_TIMEOUT, "3s"); ++ } ++ ++ @Test ++ public void test() throws Exception { ++Connector c = getConnector(); ++log.info("verifying that everything is up"); ++Iterators.size(c.createScanner(MetadataTable.NAME, Authorizations.EMPTY).iterator()); ++ ++MasterMonitorInfo stats = getStats(c); ++assertEquals(2, stats.tServerInfo.size()); ++assertEquals(0, stats.badTServers.size()); ++assertEquals(0, stats.deadTabletServers.size()); ++log.info("Killing a tablet server"); ++getCluster().killProcess(TABLET_SERVER, getCluster().getProcesses().get(TABLET_SERVER).iterator().next()); ++ ++while (true) { ++ stats = getStats(c); ++ if (2 != stats.tServerInfo.size()) { ++break; ++ } ++ UtilWaitThread.sleep(500); ++} ++assertEquals(1, stats.tServerInfo.size()); ++assertEquals(1, stats.badTServers.size() + stats.deadTabletServers.size()); ++while (true) { ++ stats = getStats(c); ++ if (0 != stats.deadTabletServers.size()) { ++break; ++ } ++ UtilWaitThread.sleep(500); ++} ++assertEquals(1, stats.tServerInfo.size(
[2/5] accumulo git commit: ACCUMULO-3141 removed CheckBalance node from RW
ACCUMULO-3141 removed CheckBalance node from RW Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/35095474 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/35095474 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/35095474 Branch: refs/heads/master Commit: 35095474f7ae0b096117313273b57f7a1ed05226 Parents: c3bb4c6 Author: Keith Turner Authored: Tue Jun 23 16:31:56 2015 -0400 Committer: Keith Turner Committed: Tue Jun 23 16:49:04 2015 -0400 -- .../randomwalk/concurrent/CheckBalance.java | 109 --- .../concurrent/ConcurrentFixture.java | 2 - .../randomwalk/conf/modules/Concurrent.xml | 5 - 3 files changed, 116 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/35095474/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CheckBalance.java -- diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CheckBalance.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CheckBalance.java deleted file mode 100644 index 6a20bfc..000 --- a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CheckBalance.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.accumulo.test.randomwalk.concurrent; - -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Properties; - -import org.apache.accumulo.core.client.Scanner; -import org.apache.accumulo.core.data.Key; -import org.apache.accumulo.core.data.Value; -import org.apache.accumulo.core.metadata.MetadataTable; -import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection; -import org.apache.accumulo.core.security.Authorizations; -import org.apache.accumulo.test.randomwalk.State; -import org.apache.accumulo.test.randomwalk.Test; - -/** - * - */ -public class CheckBalance extends Test { - - static final String LAST_UNBALANCED_TIME = "lastUnbalancedTime"; - static final String UNBALANCED_COUNT = "unbalancedCount"; - - @Override - public void visit(State state, Properties props) throws Exception { -log.debug("checking balance"); -Map counts = new HashMap(); -Scanner scanner = state.getConnector().createScanner(MetadataTable.NAME, Authorizations.EMPTY); -scanner.fetchColumnFamily(TabletsSection.CurrentLocationColumnFamily.NAME); -for (Entry entry : scanner) { - String location = entry.getKey().getColumnQualifier().toString(); - Long count = counts.get(location); - if (count == null) -count = Long.valueOf(0); - counts.put(location, count + 1); -} -double total = 0.; -for (Long count : counts.values()) { - total += count.longValue(); -} -final double average = total / counts.size(); -final double sd = stddev(counts.values(), average); -log.debug("average " + average + ", standard deviation " + sd); - -// Check for balanced # of tablets on each node -double maxDifference = 2.0 * sd; -String unbalancedLocation = null; -long lastCount = 0L; -boolean balanced = true; -for (Entry entry : counts.entrySet()) { - long thisCount = entry.getValue().longValue(); - if (Math.abs(thisCount - average) > maxDifference) { -balanced = false; -log.debug("unbalanced: " + entry.getKey() + " has " + entry.getValue() + " tablets and the average is " + average); -unbalancedLocation = entry.getKey(); -lastCount = thisCount; - } -} - -// It is expected that the number of tablets will be uneven for short -// periods of time. Don't complain unless we've seen it only unbalanced -// over a 15 minute period and it's been at least three checks. -if (!balanced) { - Long last = state.getLong(LAST_UNBALANCED_TIME); - if (last != null && System.currentTimeMillis() - last > 15 * 60 * 1000) { -Integer
[4/5] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CheckBalance.java test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/ConcurrentFixture.java test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/77066e35 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/77066e35 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/77066e35 Branch: refs/heads/master Commit: 77066e35c3778fee18ef17be9c82322f0660138c Parents: 8dd229c fc15de7 Author: Keith Turner Authored: Tue Jun 23 18:11:31 2015 -0400 Committer: Keith Turner Committed: Tue Jun 23 18:11:31 2015 -0400 -- .../accumulo/test/DetectDeadTabletServers.java | 98 - .../randomwalk/concurrent/CheckBalance.java | 110 --- .../concurrent/ConcurrentFixture.java | 5 +- .../test/randomwalk/concurrent/Config.java | 2 +- .../test/DetectDeadTabletServersIT.java | 97 .../randomwalk/conf/modules/Concurrent.xml | 5 - 6 files changed, 99 insertions(+), 218 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/77066e35/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/ConcurrentFixture.java -- diff --cc test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/ConcurrentFixture.java index a32e463,7963c8b..b27f34c --- a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/ConcurrentFixture.java +++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/ConcurrentFixture.java @@@ -34,13 -33,11 +34,10 @@@ import org.apache.hadoop.io.Text public class ConcurrentFixture extends Fixture { @Override - public void setUp(State state) throws Exception {} + public void setUp(State state, Environment env) throws Exception {} @Override - public void tearDown(State state, Environment env) throws Exception { - state.remove(CheckBalance.LAST_UNBALANCED_TIME); - state.remove(CheckBalance.UNBALANCED_COUNT); - public void tearDown(State state) throws Exception { -- } ++ public void tearDown(State state, Environment env) throws Exception {} /** * http://git-wip-us.apache.org/repos/asf/accumulo/blob/77066e35/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java -- diff --cc test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java index 6e02c23,1f4a284..7e95d3b --- a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java +++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java @@@ -201,7 -201,7 +201,7 @@@ public class Config extends Test Setting setting = tableSettings[choice]; // pick a random table - SortedSet namespaces = env.getConnector().namespaceOperations().list(); -SortedSet namespaces = state.getConnector().namespaceOperations().list().tailSet("nspc").headSet("nspd"); ++SortedSet namespaces = env.getConnector().namespaceOperations().list().tailSet("nspc").headSet("nspd"); if (namespaces.isEmpty()) return; String namespace = random.nextSample(namespaces, 1)[0].toString(); http://git-wip-us.apache.org/repos/asf/accumulo/blob/77066e35/test/src/test/java/org/apache/accumulo/test/DetectDeadTabletServersIT.java -- diff --cc test/src/test/java/org/apache/accumulo/test/DetectDeadTabletServersIT.java index 000,11fa06b..04c781b mode 00,100644..100644 --- a/test/src/test/java/org/apache/accumulo/test/DetectDeadTabletServersIT.java +++ b/test/src/test/java/org/apache/accumulo/test/DetectDeadTabletServersIT.java @@@ -1,0 -1,96 +1,97 @@@ + /* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the Licen
[3/5] accumulo git commit: ACCUMULO-3747 put IT in its place and give it a correct name
ACCUMULO-3747 put IT in its place and give it a correct name Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/fc15de74 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/fc15de74 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/fc15de74 Branch: refs/heads/master Commit: fc15de748d2a02dba5fee4133c71f2645b6ae230 Parents: 2721bc8 Author: Keith Turner Authored: Tue Jun 23 18:07:15 2015 -0400 Committer: Keith Turner Committed: Tue Jun 23 18:07:15 2015 -0400 -- .../accumulo/test/DetectDeadTabletServers.java | 96 .../test/DetectDeadTabletServersIT.java | 96 2 files changed, 96 insertions(+), 96 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/fc15de74/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java -- diff --git a/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java b/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java deleted file mode 100644 index 15afd25..000 --- a/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.accumulo.test; - -import static org.apache.accumulo.minicluster.ServerType.TABLET_SERVER; -import static org.junit.Assert.assertEquals; - -import org.apache.accumulo.core.client.Connector; -import org.apache.accumulo.core.client.impl.MasterClient; -import org.apache.accumulo.core.client.security.tokens.PasswordToken; -import org.apache.accumulo.core.conf.Property; -import org.apache.accumulo.core.master.thrift.MasterClientService; -import org.apache.accumulo.core.master.thrift.MasterMonitorInfo; -import org.apache.accumulo.core.metadata.MetadataTable; -import org.apache.accumulo.core.security.Authorizations; -import org.apache.accumulo.core.security.Credentials; -import org.apache.accumulo.fate.util.UtilWaitThread; -import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; -import org.apache.accumulo.test.functional.ConfigurableMacIT; -import org.apache.accumulo.trace.instrument.Tracer; -import org.apache.hadoop.conf.Configuration; -import org.junit.Test; - -import com.google.common.collect.Iterators; - -public class DetectDeadTabletServers extends ConfigurableMacIT { - - @Override - protected void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) { -cfg.setProperty(Property.INSTANCE_ZK_TIMEOUT, "3s"); - } - - @Test - public void test() throws Exception { -Connector c = getConnector(); -log.info("verifying that everything is up"); -Iterators.size(c.createScanner(MetadataTable.NAME, Authorizations.EMPTY).iterator()); - -MasterMonitorInfo stats = getStats(c); -assertEquals(2, stats.tServerInfo.size()); -assertEquals(0, stats.badTServers.size()); -assertEquals(0, stats.deadTabletServers.size()); -log.info("Killing a tablet server"); -getCluster().killProcess(TABLET_SERVER, getCluster().getProcesses().get(TABLET_SERVER).iterator().next()); - -while (true) { - stats = getStats(c); - if (2 != stats.tServerInfo.size()) { -break; - } - UtilWaitThread.sleep(500); -} -assertEquals(1, stats.tServerInfo.size()); -assertEquals(1, stats.badTServers.size() + stats.deadTabletServers.size()); -while (true) { - stats = getStats(c); - if (0 != stats.deadTabletServers.size()) { -break; - } - UtilWaitThread.sleep(500); -} -assertEquals(1, stats.tServerInfo.size()); -assertEquals(0, stats.badTServers.size()); -assertEquals(1, stats.deadTabletServers.size()); - } - - private MasterMonitorInfo getStats(Connector c) throws Exception { -Credentials creds = new Credentials("root", new PasswordToken(ROOT_PASSWORD)); -MasterClientService.Iface client = null; -try { - client = MasterClient.getConnectionWithRetry(c.getInstance()
[2/3] accumulo git commit: ACCUMULO-3141 removed CheckBalance node from RW
ACCUMULO-3141 removed CheckBalance node from RW Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/35095474 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/35095474 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/35095474 Branch: refs/heads/1.6 Commit: 35095474f7ae0b096117313273b57f7a1ed05226 Parents: c3bb4c6 Author: Keith Turner Authored: Tue Jun 23 16:31:56 2015 -0400 Committer: Keith Turner Committed: Tue Jun 23 16:49:04 2015 -0400 -- .../randomwalk/concurrent/CheckBalance.java | 109 --- .../concurrent/ConcurrentFixture.java | 2 - .../randomwalk/conf/modules/Concurrent.xml | 5 - 3 files changed, 116 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/35095474/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CheckBalance.java -- diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CheckBalance.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CheckBalance.java deleted file mode 100644 index 6a20bfc..000 --- a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CheckBalance.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.accumulo.test.randomwalk.concurrent; - -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Properties; - -import org.apache.accumulo.core.client.Scanner; -import org.apache.accumulo.core.data.Key; -import org.apache.accumulo.core.data.Value; -import org.apache.accumulo.core.metadata.MetadataTable; -import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection; -import org.apache.accumulo.core.security.Authorizations; -import org.apache.accumulo.test.randomwalk.State; -import org.apache.accumulo.test.randomwalk.Test; - -/** - * - */ -public class CheckBalance extends Test { - - static final String LAST_UNBALANCED_TIME = "lastUnbalancedTime"; - static final String UNBALANCED_COUNT = "unbalancedCount"; - - @Override - public void visit(State state, Properties props) throws Exception { -log.debug("checking balance"); -Map counts = new HashMap(); -Scanner scanner = state.getConnector().createScanner(MetadataTable.NAME, Authorizations.EMPTY); -scanner.fetchColumnFamily(TabletsSection.CurrentLocationColumnFamily.NAME); -for (Entry entry : scanner) { - String location = entry.getKey().getColumnQualifier().toString(); - Long count = counts.get(location); - if (count == null) -count = Long.valueOf(0); - counts.put(location, count + 1); -} -double total = 0.; -for (Long count : counts.values()) { - total += count.longValue(); -} -final double average = total / counts.size(); -final double sd = stddev(counts.values(), average); -log.debug("average " + average + ", standard deviation " + sd); - -// Check for balanced # of tablets on each node -double maxDifference = 2.0 * sd; -String unbalancedLocation = null; -long lastCount = 0L; -boolean balanced = true; -for (Entry entry : counts.entrySet()) { - long thisCount = entry.getValue().longValue(); - if (Math.abs(thisCount - average) > maxDifference) { -balanced = false; -log.debug("unbalanced: " + entry.getKey() + " has " + entry.getValue() + " tablets and the average is " + average); -unbalancedLocation = entry.getKey(); -lastCount = thisCount; - } -} - -// It is expected that the number of tablets will be uneven for short -// periods of time. Don't complain unless we've seen it only unbalanced -// over a 15 minute period and it's been at least three checks. -if (!balanced) { - Long last = state.getLong(LAST_UNBALANCED_TIME); - if (last != null && System.currentTimeMillis() - last > 15 * 60 * 1000) { -Integer cou
[4/4] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CheckBalance.java test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/ConcurrentFixture.java test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/77066e35 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/77066e35 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/77066e35 Branch: refs/heads/1.7 Commit: 77066e35c3778fee18ef17be9c82322f0660138c Parents: 8dd229c fc15de7 Author: Keith Turner Authored: Tue Jun 23 18:11:31 2015 -0400 Committer: Keith Turner Committed: Tue Jun 23 18:11:31 2015 -0400 -- .../accumulo/test/DetectDeadTabletServers.java | 98 - .../randomwalk/concurrent/CheckBalance.java | 110 --- .../concurrent/ConcurrentFixture.java | 5 +- .../test/randomwalk/concurrent/Config.java | 2 +- .../test/DetectDeadTabletServersIT.java | 97 .../randomwalk/conf/modules/Concurrent.xml | 5 - 6 files changed, 99 insertions(+), 218 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/77066e35/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/ConcurrentFixture.java -- diff --cc test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/ConcurrentFixture.java index a32e463,7963c8b..b27f34c --- a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/ConcurrentFixture.java +++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/ConcurrentFixture.java @@@ -34,13 -33,11 +34,10 @@@ import org.apache.hadoop.io.Text public class ConcurrentFixture extends Fixture { @Override - public void setUp(State state) throws Exception {} + public void setUp(State state, Environment env) throws Exception {} @Override - public void tearDown(State state, Environment env) throws Exception { - state.remove(CheckBalance.LAST_UNBALANCED_TIME); - state.remove(CheckBalance.UNBALANCED_COUNT); - public void tearDown(State state) throws Exception { -- } ++ public void tearDown(State state, Environment env) throws Exception {} /** * http://git-wip-us.apache.org/repos/asf/accumulo/blob/77066e35/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java -- diff --cc test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java index 6e02c23,1f4a284..7e95d3b --- a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java +++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java @@@ -201,7 -201,7 +201,7 @@@ public class Config extends Test Setting setting = tableSettings[choice]; // pick a random table - SortedSet namespaces = env.getConnector().namespaceOperations().list(); -SortedSet namespaces = state.getConnector().namespaceOperations().list().tailSet("nspc").headSet("nspd"); ++SortedSet namespaces = env.getConnector().namespaceOperations().list().tailSet("nspc").headSet("nspd"); if (namespaces.isEmpty()) return; String namespace = random.nextSample(namespaces, 1)[0].toString(); http://git-wip-us.apache.org/repos/asf/accumulo/blob/77066e35/test/src/test/java/org/apache/accumulo/test/DetectDeadTabletServersIT.java -- diff --cc test/src/test/java/org/apache/accumulo/test/DetectDeadTabletServersIT.java index 000,11fa06b..04c781b mode 00,100644..100644 --- a/test/src/test/java/org/apache/accumulo/test/DetectDeadTabletServersIT.java +++ b/test/src/test/java/org/apache/accumulo/test/DetectDeadTabletServersIT.java @@@ -1,0 -1,96 +1,97 @@@ + /* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License.
[1/4] accumulo git commit: ACCUMULO-3912 Only configure conurrent namespaces in conucurrent test
Repository: accumulo Updated Branches: refs/heads/1.7 8dd229c8a -> 77066e35c ACCUMULO-3912 Only configure conurrent namespaces in conucurrent test Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/2721bc83 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/2721bc83 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/2721bc83 Branch: refs/heads/1.7 Commit: 2721bc839944cc86cb0a6045293e5d928a0ea520 Parents: 3509547 Author: Keith Turner Authored: Tue Jun 23 16:33:41 2015 -0400 Committer: Keith Turner Committed: Tue Jun 23 16:49:04 2015 -0400 -- .../org/apache/accumulo/test/randomwalk/concurrent/Config.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/2721bc83/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java -- diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java index 402f139..1f4a284 100644 --- a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java +++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java @@ -201,7 +201,7 @@ public class Config extends Test { Setting setting = tableSettings[choice]; // pick a random table -SortedSet namespaces = state.getConnector().namespaceOperations().list(); +SortedSet namespaces = state.getConnector().namespaceOperations().list().tailSet("nspc").headSet("nspd"); if (namespaces.isEmpty()) return; String namespace = random.nextSample(namespaces, 1)[0].toString();
[1/3] accumulo git commit: ACCUMULO-3912 Only configure conurrent namespaces in conucurrent test
Repository: accumulo Updated Branches: refs/heads/1.6 c3bb4c6da -> fc15de748 ACCUMULO-3912 Only configure conurrent namespaces in conucurrent test Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/2721bc83 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/2721bc83 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/2721bc83 Branch: refs/heads/1.6 Commit: 2721bc839944cc86cb0a6045293e5d928a0ea520 Parents: 3509547 Author: Keith Turner Authored: Tue Jun 23 16:33:41 2015 -0400 Committer: Keith Turner Committed: Tue Jun 23 16:49:04 2015 -0400 -- .../org/apache/accumulo/test/randomwalk/concurrent/Config.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/2721bc83/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java -- diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java index 402f139..1f4a284 100644 --- a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java +++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Config.java @@ -201,7 +201,7 @@ public class Config extends Test { Setting setting = tableSettings[choice]; // pick a random table -SortedSet namespaces = state.getConnector().namespaceOperations().list(); +SortedSet namespaces = state.getConnector().namespaceOperations().list().tailSet("nspc").headSet("nspd"); if (namespaces.isEmpty()) return; String namespace = random.nextSample(namespaces, 1)[0].toString();
[3/4] accumulo git commit: ACCUMULO-3747 put IT in its place and give it a correct name
ACCUMULO-3747 put IT in its place and give it a correct name Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/fc15de74 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/fc15de74 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/fc15de74 Branch: refs/heads/1.7 Commit: fc15de748d2a02dba5fee4133c71f2645b6ae230 Parents: 2721bc8 Author: Keith Turner Authored: Tue Jun 23 18:07:15 2015 -0400 Committer: Keith Turner Committed: Tue Jun 23 18:07:15 2015 -0400 -- .../accumulo/test/DetectDeadTabletServers.java | 96 .../test/DetectDeadTabletServersIT.java | 96 2 files changed, 96 insertions(+), 96 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/fc15de74/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java -- diff --git a/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java b/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java deleted file mode 100644 index 15afd25..000 --- a/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.accumulo.test; - -import static org.apache.accumulo.minicluster.ServerType.TABLET_SERVER; -import static org.junit.Assert.assertEquals; - -import org.apache.accumulo.core.client.Connector; -import org.apache.accumulo.core.client.impl.MasterClient; -import org.apache.accumulo.core.client.security.tokens.PasswordToken; -import org.apache.accumulo.core.conf.Property; -import org.apache.accumulo.core.master.thrift.MasterClientService; -import org.apache.accumulo.core.master.thrift.MasterMonitorInfo; -import org.apache.accumulo.core.metadata.MetadataTable; -import org.apache.accumulo.core.security.Authorizations; -import org.apache.accumulo.core.security.Credentials; -import org.apache.accumulo.fate.util.UtilWaitThread; -import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; -import org.apache.accumulo.test.functional.ConfigurableMacIT; -import org.apache.accumulo.trace.instrument.Tracer; -import org.apache.hadoop.conf.Configuration; -import org.junit.Test; - -import com.google.common.collect.Iterators; - -public class DetectDeadTabletServers extends ConfigurableMacIT { - - @Override - protected void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) { -cfg.setProperty(Property.INSTANCE_ZK_TIMEOUT, "3s"); - } - - @Test - public void test() throws Exception { -Connector c = getConnector(); -log.info("verifying that everything is up"); -Iterators.size(c.createScanner(MetadataTable.NAME, Authorizations.EMPTY).iterator()); - -MasterMonitorInfo stats = getStats(c); -assertEquals(2, stats.tServerInfo.size()); -assertEquals(0, stats.badTServers.size()); -assertEquals(0, stats.deadTabletServers.size()); -log.info("Killing a tablet server"); -getCluster().killProcess(TABLET_SERVER, getCluster().getProcesses().get(TABLET_SERVER).iterator().next()); - -while (true) { - stats = getStats(c); - if (2 != stats.tServerInfo.size()) { -break; - } - UtilWaitThread.sleep(500); -} -assertEquals(1, stats.tServerInfo.size()); -assertEquals(1, stats.badTServers.size() + stats.deadTabletServers.size()); -while (true) { - stats = getStats(c); - if (0 != stats.deadTabletServers.size()) { -break; - } - UtilWaitThread.sleep(500); -} -assertEquals(1, stats.tServerInfo.size()); -assertEquals(0, stats.badTServers.size()); -assertEquals(1, stats.deadTabletServers.size()); - } - - private MasterMonitorInfo getStats(Connector c) throws Exception { -Credentials creds = new Credentials("root", new PasswordToken(ROOT_PASSWORD)); -MasterClientService.Iface client = null; -try { - client = MasterClient.getConnectionWithRetry(c.getInstance());
[2/4] accumulo git commit: ACCUMULO-3141 removed CheckBalance node from RW
ACCUMULO-3141 removed CheckBalance node from RW Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/35095474 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/35095474 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/35095474 Branch: refs/heads/1.7 Commit: 35095474f7ae0b096117313273b57f7a1ed05226 Parents: c3bb4c6 Author: Keith Turner Authored: Tue Jun 23 16:31:56 2015 -0400 Committer: Keith Turner Committed: Tue Jun 23 16:49:04 2015 -0400 -- .../randomwalk/concurrent/CheckBalance.java | 109 --- .../concurrent/ConcurrentFixture.java | 2 - .../randomwalk/conf/modules/Concurrent.xml | 5 - 3 files changed, 116 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/35095474/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CheckBalance.java -- diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CheckBalance.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CheckBalance.java deleted file mode 100644 index 6a20bfc..000 --- a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CheckBalance.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.accumulo.test.randomwalk.concurrent; - -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Properties; - -import org.apache.accumulo.core.client.Scanner; -import org.apache.accumulo.core.data.Key; -import org.apache.accumulo.core.data.Value; -import org.apache.accumulo.core.metadata.MetadataTable; -import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection; -import org.apache.accumulo.core.security.Authorizations; -import org.apache.accumulo.test.randomwalk.State; -import org.apache.accumulo.test.randomwalk.Test; - -/** - * - */ -public class CheckBalance extends Test { - - static final String LAST_UNBALANCED_TIME = "lastUnbalancedTime"; - static final String UNBALANCED_COUNT = "unbalancedCount"; - - @Override - public void visit(State state, Properties props) throws Exception { -log.debug("checking balance"); -Map counts = new HashMap(); -Scanner scanner = state.getConnector().createScanner(MetadataTable.NAME, Authorizations.EMPTY); -scanner.fetchColumnFamily(TabletsSection.CurrentLocationColumnFamily.NAME); -for (Entry entry : scanner) { - String location = entry.getKey().getColumnQualifier().toString(); - Long count = counts.get(location); - if (count == null) -count = Long.valueOf(0); - counts.put(location, count + 1); -} -double total = 0.; -for (Long count : counts.values()) { - total += count.longValue(); -} -final double average = total / counts.size(); -final double sd = stddev(counts.values(), average); -log.debug("average " + average + ", standard deviation " + sd); - -// Check for balanced # of tablets on each node -double maxDifference = 2.0 * sd; -String unbalancedLocation = null; -long lastCount = 0L; -boolean balanced = true; -for (Entry entry : counts.entrySet()) { - long thisCount = entry.getValue().longValue(); - if (Math.abs(thisCount - average) > maxDifference) { -balanced = false; -log.debug("unbalanced: " + entry.getKey() + " has " + entry.getValue() + " tablets and the average is " + average); -unbalancedLocation = entry.getKey(); -lastCount = thisCount; - } -} - -// It is expected that the number of tablets will be uneven for short -// periods of time. Don't complain unless we've seen it only unbalanced -// over a 15 minute period and it's been at least three checks. -if (!balanced) { - Long last = state.getLong(LAST_UNBALANCED_TIME); - if (last != null && System.currentTimeMillis() - last > 15 * 60 * 1000) { -Integer cou
[3/3] accumulo git commit: ACCUMULO-3747 put IT in its place and give it a correct name
ACCUMULO-3747 put IT in its place and give it a correct name Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/fc15de74 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/fc15de74 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/fc15de74 Branch: refs/heads/1.6 Commit: fc15de748d2a02dba5fee4133c71f2645b6ae230 Parents: 2721bc8 Author: Keith Turner Authored: Tue Jun 23 18:07:15 2015 -0400 Committer: Keith Turner Committed: Tue Jun 23 18:07:15 2015 -0400 -- .../accumulo/test/DetectDeadTabletServers.java | 96 .../test/DetectDeadTabletServersIT.java | 96 2 files changed, 96 insertions(+), 96 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/fc15de74/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java -- diff --git a/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java b/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java deleted file mode 100644 index 15afd25..000 --- a/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.accumulo.test; - -import static org.apache.accumulo.minicluster.ServerType.TABLET_SERVER; -import static org.junit.Assert.assertEquals; - -import org.apache.accumulo.core.client.Connector; -import org.apache.accumulo.core.client.impl.MasterClient; -import org.apache.accumulo.core.client.security.tokens.PasswordToken; -import org.apache.accumulo.core.conf.Property; -import org.apache.accumulo.core.master.thrift.MasterClientService; -import org.apache.accumulo.core.master.thrift.MasterMonitorInfo; -import org.apache.accumulo.core.metadata.MetadataTable; -import org.apache.accumulo.core.security.Authorizations; -import org.apache.accumulo.core.security.Credentials; -import org.apache.accumulo.fate.util.UtilWaitThread; -import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; -import org.apache.accumulo.test.functional.ConfigurableMacIT; -import org.apache.accumulo.trace.instrument.Tracer; -import org.apache.hadoop.conf.Configuration; -import org.junit.Test; - -import com.google.common.collect.Iterators; - -public class DetectDeadTabletServers extends ConfigurableMacIT { - - @Override - protected void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) { -cfg.setProperty(Property.INSTANCE_ZK_TIMEOUT, "3s"); - } - - @Test - public void test() throws Exception { -Connector c = getConnector(); -log.info("verifying that everything is up"); -Iterators.size(c.createScanner(MetadataTable.NAME, Authorizations.EMPTY).iterator()); - -MasterMonitorInfo stats = getStats(c); -assertEquals(2, stats.tServerInfo.size()); -assertEquals(0, stats.badTServers.size()); -assertEquals(0, stats.deadTabletServers.size()); -log.info("Killing a tablet server"); -getCluster().killProcess(TABLET_SERVER, getCluster().getProcesses().get(TABLET_SERVER).iterator().next()); - -while (true) { - stats = getStats(c); - if (2 != stats.tServerInfo.size()) { -break; - } - UtilWaitThread.sleep(500); -} -assertEquals(1, stats.tServerInfo.size()); -assertEquals(1, stats.badTServers.size() + stats.deadTabletServers.size()); -while (true) { - stats = getStats(c); - if (0 != stats.deadTabletServers.size()) { -break; - } - UtilWaitThread.sleep(500); -} -assertEquals(1, stats.tServerInfo.size()); -assertEquals(0, stats.badTServers.size()); -assertEquals(1, stats.deadTabletServers.size()); - } - - private MasterMonitorInfo getStats(Connector c) throws Exception { -Credentials creds = new Credentials("root", new PasswordToken(ROOT_PASSWORD)); -MasterClientService.Iface client = null; -try { - client = MasterClient.getConnectionWithRetry(c.getInstance());
accumulo git commit: ACCUMULO-3768 halt if direct memory buffers blow up memory during a scan
Repository: accumulo Updated Branches: refs/heads/master df2715478 -> 84a42bb59 ACCUMULO-3768 halt if direct memory buffers blow up memory during a scan Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/84a42bb5 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/84a42bb5 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/84a42bb5 Branch: refs/heads/master Commit: 84a42bb5912152322da76d9ac8f6d02555ea1c49 Parents: df27154 Author: Eric C. Newton Authored: Tue Jun 23 17:15:19 2015 -0400 Committer: Eric C. Newton Committed: Tue Jun 23 17:15:19 2015 -0400 -- .../java/org/apache/accumulo/tserver/scan/NextBatchTask.java | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/84a42bb5/server/tserver/src/main/java/org/apache/accumulo/tserver/scan/NextBatchTask.java -- diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/scan/NextBatchTask.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/scan/NextBatchTask.java index 768cc53..e3f4146 100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/scan/NextBatchTask.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/scan/NextBatchTask.java @@ -19,6 +19,7 @@ package org.apache.accumulo.tserver.scan; import java.util.concurrent.atomic.AtomicBoolean; import org.apache.accumulo.core.iterators.IterationInterruptedException; +import org.apache.accumulo.server.util.Halt; import org.apache.accumulo.tserver.TabletServer; import org.apache.accumulo.tserver.TooManyFilesException; import org.apache.accumulo.tserver.session.ScanSession; @@ -85,6 +86,9 @@ public class NextBatchTask extends ScanTask { } } catch (TooManyFilesException tmfe) { addResult(tmfe); +} catch (OutOfMemoryError ome) { + Halt.halt("Ran out of memory scanning " + scanSession.extent + " for " + scanSession.client); + addResult(ome); } catch (Throwable e) { log.warn("exception while scanning tablet " + (scanSession == null ? "(unknown)" : scanSession.extent), e); addResult(e);
accumulo git commit: ACCUMULO-3901 update the default value for tserver.tablet.split.midpoint.files.max
Repository: accumulo Updated Branches: refs/heads/master 9a3e35190 -> df2715478 ACCUMULO-3901 update the default value for tserver.tablet.split.midpoint.files.max Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/df271547 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/df271547 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/df271547 Branch: refs/heads/master Commit: df2715478a52f2f27c4b35d07a4a16d7e2452dd8 Parents: 9a3e351 Author: Eric C. Newton Authored: Tue Jun 23 16:41:27 2015 -0400 Committer: Eric C. Newton Committed: Tue Jun 23 16:41:27 2015 -0400 -- core/src/main/java/org/apache/accumulo/core/conf/Property.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/df271547/core/src/main/java/org/apache/accumulo/core/conf/Property.java -- diff --git a/core/src/main/java/org/apache/accumulo/core/conf/Property.java b/core/src/main/java/org/apache/accumulo/core/conf/Property.java index 7e10edf..c15dabc 100644 --- a/core/src/main/java/org/apache/accumulo/core/conf/Property.java +++ b/core/src/main/java/org/apache/accumulo/core/conf/Property.java @@ -239,7 +239,7 @@ public enum Property { + "size is ok because of group commit."), TSERV_TOTAL_MUTATION_QUEUE_MAX("tserver.total.mutation.queue.max", "50M", PropertyType.MEMORY, "The amount of memory used to store write-ahead-log mutations before flushing them."), - TSERV_TABLET_SPLIT_FINDMIDPOINT_MAXOPEN("tserver.tablet.split.midpoint.files.max", "30", PropertyType.COUNT, + TSERV_TABLET_SPLIT_FINDMIDPOINT_MAXOPEN("tserver.tablet.split.midpoint.files.max", "300", PropertyType.COUNT, "To find a tablets split points, all index files are opened. This setting determines how many index " + "files can be opened at once. When there are more index files than this setting multiple passes " + "must be made, which is slower. However opening too many files at once can cause problems."),
accumulo git commit: ACCUMULO-3747 port 1.7 changes to master
Repository: accumulo Updated Branches: refs/heads/master d07451861 -> 9a3e35190 ACCUMULO-3747 port 1.7 changes to master Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/9a3e3519 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/9a3e3519 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/9a3e3519 Branch: refs/heads/master Commit: 9a3e35190cb26807fd8835183baf1236f458a8a0 Parents: d074518 Author: Eric C. Newton Authored: Tue Jun 23 16:39:37 2015 -0400 Committer: Eric C. Newton Committed: Tue Jun 23 16:39:37 2015 -0400 -- .../java/org/apache/accumulo/test/DetectDeadTabletServers.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/9a3e3519/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java -- diff --git a/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java b/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java index a3d548d..dad57af 100644 --- a/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java +++ b/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java @@ -32,13 +32,13 @@ import org.apache.accumulo.core.security.Authorizations; import org.apache.accumulo.core.trace.Tracer; import org.apache.accumulo.fate.util.UtilWaitThread; import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; -import org.apache.accumulo.test.functional.ConfigurableMacIT; +import org.apache.accumulo.test.functional.ConfigurableMacBase; import org.apache.hadoop.conf.Configuration; import org.junit.Test; import com.google.common.collect.Iterators; -public class DetectDeadTabletServers extends ConfigurableMacIT { +public class DetectDeadTabletServers extends ConfigurableMacBase { @Override protected void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) {
[2/2] accumulo git commit: Merge branch '1.7'
Merge branch '1.7' Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/d0745186 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/d0745186 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/d0745186 Branch: refs/heads/master Commit: d07451861996453755b873f3c3cfae9a9fa8bad5 Parents: 121cc6b 8dd229c Author: Eric C. Newton Authored: Tue Jun 23 16:23:14 2015 -0400 Committer: Eric C. Newton Committed: Tue Jun 23 16:23:14 2015 -0400 -- .../apache/accumulo/test/DetectDeadTabletServers.java | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) --
[1/2] accumulo git commit: ACCUMULO-3747 1.6 fix to 1.7
Repository: accumulo Updated Branches: refs/heads/master 121cc6bc0 -> d07451861 ACCUMULO-3747 1.6 fix to 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/8dd229c8 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/8dd229c8 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/8dd229c8 Branch: refs/heads/master Commit: 8dd229c8a918d0339680d8430fc6caf2808ffd6b Parents: 7985b91 Author: Eric C. Newton Authored: Tue Jun 23 16:22:43 2015 -0400 Committer: Eric C. Newton Committed: Tue Jun 23 16:22:43 2015 -0400 -- .../apache/accumulo/test/DetectDeadTabletServers.java | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/8dd229c8/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java -- diff --git a/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java b/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java index 15afd25..a3d548d 100644 --- a/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java +++ b/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java @@ -20,18 +20,19 @@ import static org.apache.accumulo.minicluster.ServerType.TABLET_SERVER; import static org.junit.Assert.assertEquals; import org.apache.accumulo.core.client.Connector; +import org.apache.accumulo.core.client.impl.ClientContext; +import org.apache.accumulo.core.client.impl.Credentials; import org.apache.accumulo.core.client.impl.MasterClient; import org.apache.accumulo.core.client.security.tokens.PasswordToken; import org.apache.accumulo.core.conf.Property; -import org.apache.accumulo.core.master.thrift.MasterClientService; +import org.apache.accumulo.core.master.thrift.MasterClientService.Client; import org.apache.accumulo.core.master.thrift.MasterMonitorInfo; import org.apache.accumulo.core.metadata.MetadataTable; import org.apache.accumulo.core.security.Authorizations; -import org.apache.accumulo.core.security.Credentials; +import org.apache.accumulo.core.trace.Tracer; import org.apache.accumulo.fate.util.UtilWaitThread; import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; import org.apache.accumulo.test.functional.ConfigurableMacIT; -import org.apache.accumulo.trace.instrument.Tracer; import org.apache.hadoop.conf.Configuration; import org.junit.Test; @@ -80,11 +81,12 @@ public class DetectDeadTabletServers extends ConfigurableMacIT { private MasterMonitorInfo getStats(Connector c) throws Exception { Credentials creds = new Credentials("root", new PasswordToken(ROOT_PASSWORD)); -MasterClientService.Iface client = null; +ClientContext context = new ClientContext(c.getInstance(), creds, getClientConfig()); +Client client = null; try { - client = MasterClient.getConnectionWithRetry(c.getInstance()); + client = MasterClient.getConnectionWithRetry(context); log.info("Fetching master stats"); - return client.getMasterStats(Tracer.traceInfo(), creds.toThrift(c.getInstance())); + return client.getMasterStats(Tracer.traceInfo(), context.rpcCreds()); } finally { if (client != null) { MasterClient.close(client);
accumulo git commit: ACCUMULO-3747 1.6 fix to 1.7
Repository: accumulo Updated Branches: refs/heads/1.7 7985b917d -> 8dd229c8a ACCUMULO-3747 1.6 fix to 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/8dd229c8 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/8dd229c8 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/8dd229c8 Branch: refs/heads/1.7 Commit: 8dd229c8a918d0339680d8430fc6caf2808ffd6b Parents: 7985b91 Author: Eric C. Newton Authored: Tue Jun 23 16:22:43 2015 -0400 Committer: Eric C. Newton Committed: Tue Jun 23 16:22:43 2015 -0400 -- .../apache/accumulo/test/DetectDeadTabletServers.java | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/8dd229c8/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java -- diff --git a/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java b/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java index 15afd25..a3d548d 100644 --- a/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java +++ b/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java @@ -20,18 +20,19 @@ import static org.apache.accumulo.minicluster.ServerType.TABLET_SERVER; import static org.junit.Assert.assertEquals; import org.apache.accumulo.core.client.Connector; +import org.apache.accumulo.core.client.impl.ClientContext; +import org.apache.accumulo.core.client.impl.Credentials; import org.apache.accumulo.core.client.impl.MasterClient; import org.apache.accumulo.core.client.security.tokens.PasswordToken; import org.apache.accumulo.core.conf.Property; -import org.apache.accumulo.core.master.thrift.MasterClientService; +import org.apache.accumulo.core.master.thrift.MasterClientService.Client; import org.apache.accumulo.core.master.thrift.MasterMonitorInfo; import org.apache.accumulo.core.metadata.MetadataTable; import org.apache.accumulo.core.security.Authorizations; -import org.apache.accumulo.core.security.Credentials; +import org.apache.accumulo.core.trace.Tracer; import org.apache.accumulo.fate.util.UtilWaitThread; import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; import org.apache.accumulo.test.functional.ConfigurableMacIT; -import org.apache.accumulo.trace.instrument.Tracer; import org.apache.hadoop.conf.Configuration; import org.junit.Test; @@ -80,11 +81,12 @@ public class DetectDeadTabletServers extends ConfigurableMacIT { private MasterMonitorInfo getStats(Connector c) throws Exception { Credentials creds = new Credentials("root", new PasswordToken(ROOT_PASSWORD)); -MasterClientService.Iface client = null; +ClientContext context = new ClientContext(c.getInstance(), creds, getClientConfig()); +Client client = null; try { - client = MasterClient.getConnectionWithRetry(c.getInstance()); + client = MasterClient.getConnectionWithRetry(context); log.info("Fetching master stats"); - return client.getMasterStats(Tracer.traceInfo(), creds.toThrift(c.getInstance())); + return client.getMasterStats(Tracer.traceInfo(), context.rpcCreds()); } finally { if (client != null) { MasterClient.close(client);
[5/5] accumulo git commit: Merge branch '1.7'
Merge branch '1.7' Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/121cc6bc Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/121cc6bc Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/121cc6bc Branch: refs/heads/master Commit: 121cc6bc0e04167ca110f88f841ccfd38b10f5ba Parents: eabdc83 7985b91 Author: Eric C. Newton Authored: Tue Jun 23 15:33:55 2015 -0400 Committer: Eric C. Newton Committed: Tue Jun 23 15:33:55 2015 -0400 -- .../java/org/apache/accumulo/master/Master.java | 4 +- .../accumulo/test/DetectDeadTabletServers.java | 96 2 files changed, 98 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/121cc6bc/server/master/src/main/java/org/apache/accumulo/master/Master.java --
[1/5] accumulo git commit: ACCUMULO-3871 build the native library at package time
Repository: accumulo Updated Branches: refs/heads/master 74859ee0f -> 121cc6bc0 ACCUMULO-3871 build the native library at package time Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/fe6da34e Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/fe6da34e Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/fe6da34e Branch: refs/heads/master Commit: fe6da34e514df5791bd4ff95eedfef71464196ea Parents: b7f88f9 Author: Eric C. Newton Authored: Tue Jun 23 13:35:19 2015 -0400 Committer: Eric C. Newton Committed: Tue Jun 23 13:35:19 2015 -0400 -- server/native/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/fe6da34e/server/native/pom.xml -- diff --git a/server/native/pom.xml b/server/native/pom.xml index 0fc8f34..f0e9403 100644 --- a/server/native/pom.xml +++ b/server/native/pom.xml @@ -101,7 +101,7 @@ exec -integration-test +package make ${project.build.directory}/${project.artifactId}-${project.version}/${project.artifactId}-${project.version}
[3/5] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/7985b917 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/7985b917 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/7985b917 Branch: refs/heads/master Commit: 7985b917d0ef4b68e00c3e9c6880bd3aa983aa59 Parents: 61bb1b4 c3bb4c6 Author: Eric C. Newton Authored: Tue Jun 23 15:33:30 2015 -0400 Committer: Eric C. Newton Committed: Tue Jun 23 15:33:30 2015 -0400 -- .../java/org/apache/accumulo/master/Master.java | 4 +- .../accumulo/test/DetectDeadTabletServers.java | 96 2 files changed, 98 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/7985b917/server/master/src/main/java/org/apache/accumulo/master/Master.java --
[1/2] accumulo git commit: ACCUMULO-3747 do not clear a server from the dead server list just because we tried to stop it
Repository: accumulo Updated Branches: refs/heads/1.7 61bb1b47d -> 7985b917d ACCUMULO-3747 do not clear a server from the dead server list just because we tried to stop it Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/c3bb4c6d Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/c3bb4c6d Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/c3bb4c6d Branch: refs/heads/1.7 Commit: c3bb4c6da82bbc5ab939a684b110d61aadb8ffd2 Parents: 28be43e Author: Eric C. Newton Authored: Tue Jun 23 15:32:17 2015 -0400 Committer: Eric C. Newton Committed: Tue Jun 23 15:32:17 2015 -0400 -- .../java/org/apache/accumulo/master/Master.java | 4 +- .../accumulo/test/DetectDeadTabletServers.java | 96 2 files changed, 98 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/c3bb4c6d/server/master/src/main/java/org/apache/accumulo/master/Master.java -- diff --git a/server/master/src/main/java/org/apache/accumulo/master/Master.java b/server/master/src/main/java/org/apache/accumulo/master/Master.java index b3d2ac5..545d93a 100644 --- a/server/master/src/main/java/org/apache/accumulo/master/Master.java +++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java @@ -949,15 +949,15 @@ public class Master implements LiveTServerSet.Listener, TableObserver, CurrentSt log.warn("attempting to stop " + server); try { TServerConnection connection = tserverSet.getConnection(server); -if (connection != null) +if (connection != null) { connection.halt(masterLock); +} } catch (TTransportException e) { // ignore: it's probably down } catch (Exception e) { log.info("error talking to troublesome tablet server ", e); } badServers.remove(server); - tserverSet.remove(server); } } } http://git-wip-us.apache.org/repos/asf/accumulo/blob/c3bb4c6d/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java -- diff --git a/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java b/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java new file mode 100644 index 000..15afd25 --- /dev/null +++ b/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java @@ -0,0 +1,96 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.accumulo.test; + +import static org.apache.accumulo.minicluster.ServerType.TABLET_SERVER; +import static org.junit.Assert.assertEquals; + +import org.apache.accumulo.core.client.Connector; +import org.apache.accumulo.core.client.impl.MasterClient; +import org.apache.accumulo.core.client.security.tokens.PasswordToken; +import org.apache.accumulo.core.conf.Property; +import org.apache.accumulo.core.master.thrift.MasterClientService; +import org.apache.accumulo.core.master.thrift.MasterMonitorInfo; +import org.apache.accumulo.core.metadata.MetadataTable; +import org.apache.accumulo.core.security.Authorizations; +import org.apache.accumulo.core.security.Credentials; +import org.apache.accumulo.fate.util.UtilWaitThread; +import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; +import org.apache.accumulo.test.functional.ConfigurableMacIT; +import org.apache.accumulo.trace.instrument.Tracer; +import org.apache.hadoop.conf.Configuration; +import org.junit.Test; + +import com.google.common.collect.Iterators; + +public class DetectDeadTabletServers extends ConfigurableMacIT { + + @Override + protected void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) { +cfg.setProperty(Property.INSTANCE_ZK_TIMEOUT, "3s"); + } + + @Test + public void test() throws Exception { +Connector c = getConnector(); +log.info("verifying that everything is up"); +Iterato
[4/5] accumulo git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/accumulo
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/accumulo Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/eabdc83f Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/eabdc83f Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/eabdc83f Branch: refs/heads/master Commit: eabdc83f97553ba43224b34c0f096855009381d6 Parents: fe6da34 74859ee Author: Eric C. Newton Authored: Tue Jun 23 15:33:46 2015 -0400 Committer: Eric C. Newton Committed: Tue Jun 23 15:33:46 2015 -0400 -- .../org/apache/accumulo/test/mrit/IntegrationTestMapReduce.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --
[2/5] accumulo git commit: ACCUMULO-3747 do not clear a server from the dead server list just because we tried to stop it
ACCUMULO-3747 do not clear a server from the dead server list just because we tried to stop it Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/c3bb4c6d Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/c3bb4c6d Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/c3bb4c6d Branch: refs/heads/master Commit: c3bb4c6da82bbc5ab939a684b110d61aadb8ffd2 Parents: 28be43e Author: Eric C. Newton Authored: Tue Jun 23 15:32:17 2015 -0400 Committer: Eric C. Newton Committed: Tue Jun 23 15:32:17 2015 -0400 -- .../java/org/apache/accumulo/master/Master.java | 4 +- .../accumulo/test/DetectDeadTabletServers.java | 96 2 files changed, 98 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/c3bb4c6d/server/master/src/main/java/org/apache/accumulo/master/Master.java -- diff --git a/server/master/src/main/java/org/apache/accumulo/master/Master.java b/server/master/src/main/java/org/apache/accumulo/master/Master.java index b3d2ac5..545d93a 100644 --- a/server/master/src/main/java/org/apache/accumulo/master/Master.java +++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java @@ -949,15 +949,15 @@ public class Master implements LiveTServerSet.Listener, TableObserver, CurrentSt log.warn("attempting to stop " + server); try { TServerConnection connection = tserverSet.getConnection(server); -if (connection != null) +if (connection != null) { connection.halt(masterLock); +} } catch (TTransportException e) { // ignore: it's probably down } catch (Exception e) { log.info("error talking to troublesome tablet server ", e); } badServers.remove(server); - tserverSet.remove(server); } } } http://git-wip-us.apache.org/repos/asf/accumulo/blob/c3bb4c6d/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java -- diff --git a/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java b/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java new file mode 100644 index 000..15afd25 --- /dev/null +++ b/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java @@ -0,0 +1,96 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.accumulo.test; + +import static org.apache.accumulo.minicluster.ServerType.TABLET_SERVER; +import static org.junit.Assert.assertEquals; + +import org.apache.accumulo.core.client.Connector; +import org.apache.accumulo.core.client.impl.MasterClient; +import org.apache.accumulo.core.client.security.tokens.PasswordToken; +import org.apache.accumulo.core.conf.Property; +import org.apache.accumulo.core.master.thrift.MasterClientService; +import org.apache.accumulo.core.master.thrift.MasterMonitorInfo; +import org.apache.accumulo.core.metadata.MetadataTable; +import org.apache.accumulo.core.security.Authorizations; +import org.apache.accumulo.core.security.Credentials; +import org.apache.accumulo.fate.util.UtilWaitThread; +import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; +import org.apache.accumulo.test.functional.ConfigurableMacIT; +import org.apache.accumulo.trace.instrument.Tracer; +import org.apache.hadoop.conf.Configuration; +import org.junit.Test; + +import com.google.common.collect.Iterators; + +public class DetectDeadTabletServers extends ConfigurableMacIT { + + @Override + protected void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) { +cfg.setProperty(Property.INSTANCE_ZK_TIMEOUT, "3s"); + } + + @Test + public void test() throws Exception { +Connector c = getConnector(); +log.info("verifying that everything is up"); +Iterators.size(c.createScanner(MetadataTable.NAME, Authorizations.EMPTY).iterator())
[2/2] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/7985b917 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/7985b917 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/7985b917 Branch: refs/heads/1.7 Commit: 7985b917d0ef4b68e00c3e9c6880bd3aa983aa59 Parents: 61bb1b4 c3bb4c6 Author: Eric C. Newton Authored: Tue Jun 23 15:33:30 2015 -0400 Committer: Eric C. Newton Committed: Tue Jun 23 15:33:30 2015 -0400 -- .../java/org/apache/accumulo/master/Master.java | 4 +- .../accumulo/test/DetectDeadTabletServers.java | 96 2 files changed, 98 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/7985b917/server/master/src/main/java/org/apache/accumulo/master/Master.java --
accumulo git commit: ACCUMULO-3747 do not clear a server from the dead server list just because we tried to stop it
Repository: accumulo Updated Branches: refs/heads/1.6 28be43ef2 -> c3bb4c6da ACCUMULO-3747 do not clear a server from the dead server list just because we tried to stop it Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/c3bb4c6d Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/c3bb4c6d Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/c3bb4c6d Branch: refs/heads/1.6 Commit: c3bb4c6da82bbc5ab939a684b110d61aadb8ffd2 Parents: 28be43e Author: Eric C. Newton Authored: Tue Jun 23 15:32:17 2015 -0400 Committer: Eric C. Newton Committed: Tue Jun 23 15:32:17 2015 -0400 -- .../java/org/apache/accumulo/master/Master.java | 4 +- .../accumulo/test/DetectDeadTabletServers.java | 96 2 files changed, 98 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/c3bb4c6d/server/master/src/main/java/org/apache/accumulo/master/Master.java -- diff --git a/server/master/src/main/java/org/apache/accumulo/master/Master.java b/server/master/src/main/java/org/apache/accumulo/master/Master.java index b3d2ac5..545d93a 100644 --- a/server/master/src/main/java/org/apache/accumulo/master/Master.java +++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java @@ -949,15 +949,15 @@ public class Master implements LiveTServerSet.Listener, TableObserver, CurrentSt log.warn("attempting to stop " + server); try { TServerConnection connection = tserverSet.getConnection(server); -if (connection != null) +if (connection != null) { connection.halt(masterLock); +} } catch (TTransportException e) { // ignore: it's probably down } catch (Exception e) { log.info("error talking to troublesome tablet server ", e); } badServers.remove(server); - tserverSet.remove(server); } } } http://git-wip-us.apache.org/repos/asf/accumulo/blob/c3bb4c6d/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java -- diff --git a/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java b/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java new file mode 100644 index 000..15afd25 --- /dev/null +++ b/test/src/main/java/org/apache/accumulo/test/DetectDeadTabletServers.java @@ -0,0 +1,96 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.accumulo.test; + +import static org.apache.accumulo.minicluster.ServerType.TABLET_SERVER; +import static org.junit.Assert.assertEquals; + +import org.apache.accumulo.core.client.Connector; +import org.apache.accumulo.core.client.impl.MasterClient; +import org.apache.accumulo.core.client.security.tokens.PasswordToken; +import org.apache.accumulo.core.conf.Property; +import org.apache.accumulo.core.master.thrift.MasterClientService; +import org.apache.accumulo.core.master.thrift.MasterMonitorInfo; +import org.apache.accumulo.core.metadata.MetadataTable; +import org.apache.accumulo.core.security.Authorizations; +import org.apache.accumulo.core.security.Credentials; +import org.apache.accumulo.fate.util.UtilWaitThread; +import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; +import org.apache.accumulo.test.functional.ConfigurableMacIT; +import org.apache.accumulo.trace.instrument.Tracer; +import org.apache.hadoop.conf.Configuration; +import org.junit.Test; + +import com.google.common.collect.Iterators; + +public class DetectDeadTabletServers extends ConfigurableMacIT { + + @Override + protected void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) { +cfg.setProperty(Property.INSTANCE_ZK_TIMEOUT, "3s"); + } + + @Test + public void test() throws Exception { +Connector c = getConnector(); +log.info("verifying that everything is up"); +Iterato