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/06/10 15:48:58 UTC
git commit: ACCUMULO-2880 verify that deleted tables do not flush on
unload
Repository: accumulo
Updated Branches:
refs/heads/master 42c1e64f3 -> cff581914
ACCUMULO-2880 verify that deleted tables do not flush on unload
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/cff58191
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/cff58191
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/cff58191
Branch: refs/heads/master
Commit: cff58191413c7ae1bdaa7c5bd897f302586b9241
Parents: 42c1e64
Author: Eric C. Newton <er...@gmail.com>
Authored: Tue Jun 10 09:45:01 2014 -0400
Committer: Eric C. Newton <er...@gmail.com>
Committed: Tue Jun 10 09:45:01 2014 -0400
----------------------------------------------------------------------
.../functional/DeletedTablesDontFlushIT.java | 56 ++++++++++++++++++++
1 file changed, 56 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/cff58191/test/src/test/java/org/apache/accumulo/test/functional/DeletedTablesDontFlushIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/DeletedTablesDontFlushIT.java b/test/src/test/java/org/apache/accumulo/test/functional/DeletedTablesDontFlushIT.java
new file mode 100644
index 0000000..be1347e
--- /dev/null
+++ b/test/src/test/java/org/apache/accumulo/test/functional/DeletedTablesDontFlushIT.java
@@ -0,0 +1,56 @@
+/*
+ * 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 java.util.EnumSet;
+
+import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
+import org.apache.accumulo.core.client.Connector;
+import org.apache.accumulo.core.client.IteratorSetting;
+import org.apache.accumulo.core.data.Mutation;
+import org.apache.accumulo.core.data.Value;
+import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope;
+import org.apache.accumulo.fate.util.UtilWaitThread;
+import org.junit.Test;
+
+// ACCUMULO-2880
+public class DeletedTablesDontFlushIT extends SimpleMacIT {
+
+ @Test(timeout = 60 * 1000)
+ public void test() throws Exception {
+ Connector c = getConnector();
+ String tableName = getUniqueNames(1)[0];
+ c.tableOperations().create(tableName);
+ IteratorSetting setting = new IteratorSetting(100, SlowIterator.class);
+ SlowIterator.setSleepTime(setting, 1000);
+ c.tableOperations().attachIterator(tableName, setting, EnumSet.of(IteratorScope.minc));
+ // let the configuration change propagate through zookeeper
+ UtilWaitThread.sleep(1000);
+
+ Mutation m = new Mutation("xyzzy");
+ for (int i = 0; i < 100; i++) {
+ m.put("cf", "" + i, new Value(new byte[]{}));
+ }
+ BatchWriter bw = c.createBatchWriter(tableName, new BatchWriterConfig());
+ bw.addMutation(m);
+ bw.close();
+ // should go fast
+ c.tableOperations().delete(tableName);
+ }
+
+}