You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2014/02/18 17:53:07 UTC
[1/2] git commit: ACCUMULO-2361 IT to reproduce
Repository: accumulo
Updated Branches:
refs/heads/1.5.1-SNAPSHOT a9cd5d14e -> b0d580889
ACCUMULO-2361 IT to reproduce
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/00ff4481
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/00ff4481
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/00ff4481
Branch: refs/heads/1.5.1-SNAPSHOT
Commit: 00ff44819bf97063ad04a96c924a2fde0a10bdd6
Parents: 5eb19c6
Author: Eric Newton <er...@gmail.com>
Authored: Tue Feb 18 11:50:46 2014 -0500
Committer: Eric Newton <er...@gmail.com>
Committed: Tue Feb 18 11:50:46 2014 -0500
----------------------------------------------------------------------
.../server/master/tableOps/DeleteTable.java | 2 +-
.../accumulo/test/DeleteTableDuringSplitIT.java | 126 +++++++++++++++++++
2 files changed, 127 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/00ff4481/server/src/main/java/org/apache/accumulo/server/master/tableOps/DeleteTable.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/master/tableOps/DeleteTable.java b/server/src/main/java/org/apache/accumulo/server/master/tableOps/DeleteTable.java
index f13d3a9..60b5633 100644
--- a/server/src/main/java/org/apache/accumulo/server/master/tableOps/DeleteTable.java
+++ b/server/src/main/java/org/apache/accumulo/server/master/tableOps/DeleteTable.java
@@ -97,7 +97,7 @@ class CleanUp extends MasterRepo {
for (Entry<Key,Value> entry : scanner) {
TabletLocationState locationState = MetaDataTableScanner.createTabletLocationState(entry.getKey(), entry.getValue());
if (!locationState.extent.isPreviousExtent(prevExtent)) {
- log.debug("Still waiting for table to be deleted: " + tableId + " saw inconsistency" + prevExtent + " " + locationState.extent);
+ log.info("Still waiting for table to be deleted: " + tableId + " saw inconsistency " + prevExtent + " " + locationState.extent);
done = false;
break;
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/00ff4481/test/src/test/java/org/apache/accumulo/test/DeleteTableDuringSplitIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/DeleteTableDuringSplitIT.java b/test/src/test/java/org/apache/accumulo/test/DeleteTableDuringSplitIT.java
new file mode 100644
index 0000000..65b39a7
--- /dev/null
+++ b/test/src/test/java/org/apache/accumulo/test/DeleteTableDuringSplitIT.java
@@ -0,0 +1,126 @@
+/*
+ * 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.junit.Assert.assertFalse;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import java.util.concurrent.Future;
+
+import org.apache.accumulo.core.client.AccumuloException;
+import org.apache.accumulo.core.client.AccumuloSecurityException;
+import org.apache.accumulo.core.client.Connector;
+import org.apache.accumulo.core.client.TableNotFoundException;
+import org.apache.accumulo.core.client.ZooKeeperInstance;
+import org.apache.accumulo.core.client.security.tokens.PasswordToken;
+import org.apache.accumulo.core.util.SimpleThreadPool;
+import org.apache.accumulo.fate.util.UtilWaitThread;
+import org.apache.accumulo.minicluster.MiniAccumuloCluster;
+import org.apache.hadoop.io.Text;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
+
+// ACCUMULO-2361
+public class DeleteTableDuringSplitIT {
+ public static TemporaryFolder folder = new TemporaryFolder();
+ private MiniAccumuloCluster accumulo;
+ private String secret = "secret";
+
+ Connector getConnector() throws AccumuloException, AccumuloSecurityException {
+ ZooKeeperInstance zki = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers());
+ return zki.getConnector("root", new PasswordToken(secret));
+ }
+
+ String[] getTableNames(int n) {
+ String[] result = new String[n];
+ for (int i = 0; i < n; i++) {
+ result[i] = "test_" + i;
+ }
+ return result;
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ folder.create();
+ accumulo = new MiniAccumuloCluster(folder.getRoot(), secret);
+ accumulo.start();
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ accumulo.stop();
+ //folder.delete();
+ }
+
+
+ @Test(timeout= 10 * 60 * 1000)
+ public void test() throws Exception {
+ String[] tableNames = getTableNames(100);
+ // make a bunch of tables
+ for (String tableName : tableNames) {
+ getConnector().tableOperations().create(tableName);
+ }
+ final SortedSet<Text> splits = new TreeSet<Text>();
+ for (byte i = 0; i < 100; i++) {
+ splits.add(new Text(new byte[]{0, 0, i}));
+ }
+
+ List<Future<?>> results = new ArrayList<Future<?>>();
+ List<Runnable> tasks = new ArrayList<Runnable>();
+ SimpleThreadPool es = new SimpleThreadPool(tableNames.length, "concurrent-api-requests");
+ for (String tableName : tableNames) {
+ final String finalName = tableName;
+ tasks.add(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ getConnector().tableOperations().addSplits(finalName, splits);
+ } catch (TableNotFoundException ex) {
+ } catch (Exception ex) {
+ throw new RuntimeException(finalName, ex);
+ }
+ }
+ });
+ tasks.add(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ UtilWaitThread.sleep(500);
+ getConnector().tableOperations().delete(finalName);
+ } catch (Exception ex) {
+ throw new RuntimeException(ex);
+ }
+ }
+ });
+ }
+ //Collections.shuffle(tasks);
+ for (Runnable r : tasks)
+ results.add(es.submit(r));
+ for (Future<?> f : results) {
+ f.get();
+ }
+ for (String tableName : tableNames) {
+ assertFalse(getConnector().tableOperations().exists(tableName));
+ }
+ }
+
+}
[2/2] git commit: Merge branch '1.5.1-SNAPSHOT' of
https://git-wip-us.apache.org/repos/asf/accumulo into 1.5.1-SNAPSHOT
Posted by ec...@apache.org.
Merge branch '1.5.1-SNAPSHOT' of https://git-wip-us.apache.org/repos/asf/accumulo into 1.5.1-SNAPSHOT
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/b0d58088
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/b0d58088
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/b0d58088
Branch: refs/heads/1.5.1-SNAPSHOT
Commit: b0d5808892c92b15009791c9f8d03678415af32d
Parents: 00ff448 a9cd5d1
Author: Eric Newton <er...@gmail.com>
Authored: Tue Feb 18 11:53:16 2014 -0500
Committer: Eric Newton <er...@gmail.com>
Committed: Tue Feb 18 11:53:16 2014 -0500
----------------------------------------------------------------------
CHANGES | 807 ++++---------------
bin/config.sh | 9 +
.../1GB/native-standalone/accumulo-env.sh | 1 -
conf/examples/1GB/standalone/accumulo-env.sh | 1 -
.../2GB/native-standalone/accumulo-env.sh | 1 -
conf/examples/2GB/standalone/accumulo-env.sh | 1 -
.../3GB/native-standalone/accumulo-env.sh | 1 -
conf/examples/3GB/standalone/accumulo-env.sh | 1 -
.../512MB/native-standalone/accumulo-env.sh | 1 -
conf/examples/512MB/standalone/accumulo-env.sh | 1 -
.../org/apache/accumulo/core/Constants.java | 4 +-
.../impl/TabletServerBatchReaderIterator.java | 11 +-
.../org/apache/accumulo/core/conf/Property.java | 1 +
.../core/iterators/user/WholeRowIterator.java | 55 +-
.../apache/accumulo/core/util/AddressUtil.java | 4 +
.../iterators/user/WholeRowIteratorTest.java | 24 +-
pom.xml | 2 +-
.../org/apache/accumulo/proxy/SimpleTest.java | 13 +-
.../org/apache/accumulo/server/Accumulo.java | 76 +-
.../server/conf/TableConfiguration.java | 14 +-
.../server/gc/SimpleGarbageCollector.java | 31 +-
.../apache/accumulo/server/master/Master.java | 5 +
.../accumulo/server/monitor/LogService.java | 81 +-
.../apache/accumulo/server/monitor/Monitor.java | 333 +++++---
.../org/apache/accumulo/server/util/Info.java | 2 +-
.../apache/accumulo/server/util/Initialize.java | 2 +
.../accumulo/server/util/TServerUtils.java | 1 +
.../server/watcher/MonitorLog4jWatcher.java | 154 ++++
.../AccumuloReloadingVFSClassLoaderTest.java | 9 +-
.../providers/ReadOnlyHdfsFileProviderTest.java | 2 +-
.../vfs/providers/VfsClassLoaderTest.java | 11 +-
.../apache/accumulo/test/AccumuloDFSBase.java | 26 +-
.../org/apache/accumulo/test/MetaSplitTest.java | 2 +-
.../apache/accumulo/test/ShellServerTest.java | 451 +++++++----
34 files changed, 1025 insertions(+), 1113 deletions(-)
----------------------------------------------------------------------