Updated Branches: refs/heads/master bf320f849 -> 517c271ca
ACCUMULO-1640 Remove unnecessary exception and clean up imports Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/517c271c Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/517c271c Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/517c271c Branch: refs/heads/master Commit: 517c271cab677ade0854048e7f13f421a9fb3aaa Parents: bf320f8 Author: Christopher Tubbs <[email protected]> Authored: Mon Aug 5 17:52:26 2013 -0400 Committer: Christopher Tubbs <[email protected]> Committed: Mon Aug 5 17:52:26 2013 -0400 ---------------------------------------------------------------------- .../server/master/state/IllegalDSException.java | 29 -------------------- .../master/state/ZooTabletStateStore.java | 8 +++--- .../server/master/tableOps/DeleteTable.java | 1 - .../accumulo/test/functional/AbstractMacIT.java | 5 ++-- 4 files changed, 6 insertions(+), 37 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/517c271c/server/src/main/java/org/apache/accumulo/server/master/state/IllegalDSException.java ---------------------------------------------------------------------- diff --git a/server/src/main/java/org/apache/accumulo/server/master/state/IllegalDSException.java b/server/src/main/java/org/apache/accumulo/server/master/state/IllegalDSException.java deleted file mode 100644 index 872c2fa..0000000 --- a/server/src/main/java/org/apache/accumulo/server/master/state/IllegalDSException.java +++ /dev/null @@ -1,29 +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.server.master.state; - -import org.apache.accumulo.server.master.state.DistributedStoreException; - -public class IllegalDSException extends DistributedStoreException { - - public IllegalDSException(String why) { - super(why); - } - - private static final long serialVersionUID = 1L; - -} http://git-wip-us.apache.org/repos/asf/accumulo/blob/517c271c/server/src/main/java/org/apache/accumulo/server/master/state/ZooTabletStateStore.java ---------------------------------------------------------------------- diff --git a/server/src/main/java/org/apache/accumulo/server/master/state/ZooTabletStateStore.java b/server/src/main/java/org/apache/accumulo/server/master/state/ZooTabletStateStore.java index 09a316c..199c8c1 100644 --- a/server/src/main/java/org/apache/accumulo/server/master/state/ZooTabletStateStore.java +++ b/server/src/main/java/org/apache/accumulo/server/master/state/ZooTabletStateStore.java @@ -126,7 +126,7 @@ public class ZooTabletStateStore extends TabletStateStore { Iterator<TabletLocationState> currentIter = iterator(); TabletLocationState current = currentIter.next(); if (current.current != null) { - throw new IllegalDSException("Trying to set the root tablet location: it is already set to " + current.current); + throw new DistributedStoreException("Trying to set the root tablet location: it is already set to " + current.current); } store.put(RootTable.ZROOT_TABLET_FUTURE_LOCATION, value.getBytes()); } @@ -142,14 +142,14 @@ public class ZooTabletStateStore extends TabletStateStore { Iterator<TabletLocationState> currentIter = iterator(); TabletLocationState current = currentIter.next(); if (current.current != null) { - throw new IllegalDSException("Trying to set the root tablet location: it is already set to " + current.current); + throw new DistributedStoreException("Trying to set the root tablet location: it is already set to " + current.current); } if (!current.future.equals(assignment.server)) { - throw new IllegalDSException("Root tablet is already assigned to " + current.future); + throw new DistributedStoreException("Root tablet is already assigned to " + current.future); } store.put(RootTable.ZROOT_TABLET_LOCATION, value.getBytes()); store.put(RootTable.ZROOT_TABLET_LAST_LOCATION, value.getBytes()); - // Make the following unnecessary by making the entire update atomic + // Make the following unnecessary by making the entire update atomic store.remove(RootTable.ZROOT_TABLET_FUTURE_LOCATION); log.debug("Put down root tablet location"); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/517c271c/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 6c6b0d6..20809d5 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 @@ -18,7 +18,6 @@ package org.apache.accumulo.server.master.tableOps; import java.io.IOException; import java.util.Arrays; -import java.util.Collections; import java.util.Map.Entry; import org.apache.accumulo.core.client.BatchScanner; http://git-wip-us.apache.org/repos/asf/accumulo/blob/517c271c/test/src/test/java/org/apache/accumulo/test/functional/AbstractMacIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/AbstractMacIT.java b/test/src/test/java/org/apache/accumulo/test/functional/AbstractMacIT.java index fcd5da9..6ea4452 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/AbstractMacIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/AbstractMacIT.java @@ -16,7 +16,6 @@ */ package org.apache.accumulo.test.functional; -import java.io.File; import java.io.IOException; import java.util.concurrent.atomic.AtomicInteger; @@ -26,13 +25,12 @@ 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.minicluster.MiniAccumuloCluster; -import org.apache.commons.io.FileUtils; import org.apache.log4j.Logger; import org.junit.rules.TemporaryFolder; public abstract class AbstractMacIT { public static final Logger log = Logger.getLogger(AbstractMacIT.class); - + public static final String ROOT_PASSWORD = "secret"; public static final ScannerOpts SOPTS = new ScannerOpts(); public static final BatchWriterOpts BWOPTS = new BatchWriterOpts(); @@ -48,6 +46,7 @@ public abstract class AbstractMacIT { } static AtomicInteger tableCount = new AtomicInteger(); + static public String makeTableName() { return "table" + tableCount.getAndIncrement(); }
