[accumulo] branch main updated: Fix warnings (unused imports, deprecation)
This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git The following commit(s) were added to refs/heads/main by this push: new c7b1d85 Fix warnings (unused imports, deprecation) c7b1d85 is described below commit c7b1d857eba85e4c246dd5e8350bfb6f2419757d Author: Christopher Tubbs AuthorDate: Wed Feb 10 15:25:30 2021 -0500 Fix warnings (unused imports, deprecation) Fix a few warnings for unused imports and unsuppressed warnings for deprecated class references, left behind from previous commits. --- core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooUtil.java | 1 - .../org/apache/accumulo/server/fs/VolumeChooserEnvironmentImpl.java | 2 +- .../java/org/apache/accumulo/shell/commands/HistoryCommand.java | 1 - .../main/java/org/apache/accumulo/test/start/KeywordStartIT.java| 6 ++ 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooUtil.java b/core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooUtil.java index d416cbc..80c46e9 100644 --- a/core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooUtil.java +++ b/core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooUtil.java @@ -23,7 +23,6 @@ import java.util.ArrayList; import java.util.List; import org.apache.accumulo.core.Constants; -import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy; import org.apache.zookeeper.KeeperException; import org.apache.zookeeper.KeeperException.Code; import org.apache.zookeeper.ZooDefs.Ids; diff --git a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeChooserEnvironmentImpl.java b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeChooserEnvironmentImpl.java index ccfd2df..17ae3ec 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeChooserEnvironmentImpl.java +++ b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeChooserEnvironmentImpl.java @@ -32,7 +32,7 @@ import org.apache.hadoop.io.Text; /** * Volume chooser authors should avoid using this class when testing their volume chooser. The * constructors for this class may change at any time. For testing purposes mocking the interface - * {@link VolumeChooserEnvironment} should result in more stable code over time than using this + * {@code VolumeChooserEnvironment} should result in more stable code over time than using this * class. */ @SuppressWarnings("deprecation") diff --git a/shell/src/main/java/org/apache/accumulo/shell/commands/HistoryCommand.java b/shell/src/main/java/org/apache/accumulo/shell/commands/HistoryCommand.java index 3886092..2f34879 100644 --- a/shell/src/main/java/org/apache/accumulo/shell/commands/HistoryCommand.java +++ b/shell/src/main/java/org/apache/accumulo/shell/commands/HistoryCommand.java @@ -27,7 +27,6 @@ import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.Option; import org.apache.commons.cli.Options; import org.jline.reader.History; -import org.jline.reader.History.Entry; import com.google.common.collect.Iterators; diff --git a/test/src/main/java/org/apache/accumulo/test/start/KeywordStartIT.java b/test/src/main/java/org/apache/accumulo/test/start/KeywordStartIT.java index a0a1a98..87e8d31 100644 --- a/test/src/main/java/org/apache/accumulo/test/start/KeywordStartIT.java +++ b/test/src/main/java/org/apache/accumulo/test/start/KeywordStartIT.java @@ -41,8 +41,6 @@ import org.apache.accumulo.core.util.Version; import org.apache.accumulo.gc.GCExecutable; import org.apache.accumulo.gc.SimpleGarbageCollector; import org.apache.accumulo.manager.ManagerExecutable; -import org.apache.accumulo.manager.MasterExecutable; -import org.apache.accumulo.master.Master; import org.apache.accumulo.minicluster.MiniAccumuloRunner; import org.apache.accumulo.miniclusterImpl.MiniClusterExecutable; import org.apache.accumulo.monitor.Monitor; @@ -113,7 +111,7 @@ public class KeywordStartIT { expectSet.put("init", Initialize.class); expectSet.put("login-info", LoginProperties.class); expectSet.put("manager", ManagerExecutable.class); -expectSet.put("master", MasterExecutable.class); +expectSet.put("master", org.apache.accumulo.manager.MasterExecutable.class); expectSet.put("minicluster", MiniClusterExecutable.class); expectSet.put("monitor", MonitorExecutable.class); expectSet.put("rfile-info", PrintInfo.class); @@ -164,7 +162,7 @@ public class KeywordStartIT { expectSet.add(Info.class); expectSet.add(Initialize.class); expectSet.add(LoginProperties.class); -expectSet.add(Master.class); +expectSet.add(org.apache.accumulo.master.Master.class); expectSet.add(MiniAccumuloRunner.class); expectSet.add(Monitor.class); expectSet.add(PrintInfo.class);
[accumulo] branch main updated (3edd539 -> ec8c4c6)
This is an automated email from the ASF dual-hosted git repository. jmanno pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git. from 3edd539 Drop debug logs to trace in ZooLock (#1918) add ec8c4c6 Better error message when instance.volumes does not specify the accumulo directory (#1921) No new revisions were added by this update. Summary of changes: core/src/main/java/org/apache/accumulo/core/volume/VolumeImpl.java | 7 +++ .../src/main/java/org/apache/accumulo/server/fs/VolumeManager.java | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-)
[accumulo] branch main updated (a75dad4 -> 3edd539)
This is an automated email from the ASF dual-hosted git repository. mmiller pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git. from a75dad4 fixes #1909 - test broken by changes in commit 954a55395 (#1915) add 3edd539 Drop debug logs to trace in ZooLock (#1918) No new revisions were added by this update. Summary of changes: core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-)
[accumulo] branch main updated: fixes #1909 - test broken by changes in commit 954a55395 (#1915)
This is an automated email from the ASF dual-hosted git repository. dlmarion pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git The following commit(s) were added to refs/heads/main by this push: new a75dad4 fixes #1909 - test broken by changes in commit 954a55395 (#1915) a75dad4 is described below commit a75dad45d4a6e1e78f5e22f19eacaafa7f7c430e Author: Dave Marion AuthorDate: Wed Feb 10 07:30:52 2021 -0500 fixes #1909 - test broken by changes in commit 954a55395 (#1915) --- .../apache/accumulo/fate/zookeeper/ZooLock.java| 13 + .../accumulo/test/fate/zookeeper/ZooLockIT.java| 33 +- 2 files changed, 39 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java b/core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java index f5e476e..0a92c7b 100644 --- a/core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java +++ b/core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java @@ -107,6 +107,19 @@ public class ZooLock implements Watcher { } } + protected ZooLock(ZooKeeper zookeeper, String path, UUID uuid) { +this.zooKeeper = zookeeper; +this.path = path; +try { + zooKeeper.exists(path, this); + watchingParent = true; + this.vmLockPrefix = new Prefix(ZLOCK_PREFIX + uuid.toString() + "#"); +} catch (Exception ex) { + LOG.error("Error setting initial watch", ex); + throw new RuntimeException(ex); +} + } + private static class LockWatcherWrapper implements AccumuloLockWatcher { boolean acquiredLock = false; diff --git a/test/src/main/java/org/apache/accumulo/test/fate/zookeeper/ZooLockIT.java b/test/src/main/java/org/apache/accumulo/test/fate/zookeeper/ZooLockIT.java index 243b5f1..f65bff3 100644 --- a/test/src/main/java/org/apache/accumulo/test/fate/zookeeper/ZooLockIT.java +++ b/test/src/main/java/org/apache/accumulo/test/fate/zookeeper/ZooLockIT.java @@ -92,6 +92,14 @@ public class ZooLockIT extends SharedMiniClusterBase { } + private static class ZooLockWrapper extends ZooLock { + +protected ZooLockWrapper(ZooKeeper zookeeper, String path, UUID uuid) { + super(zookeeper, path, uuid); +} + + } + static class RetryLockWatcher implements AccumuloLockWatcher { private boolean lockHeld = false; @@ -181,7 +189,10 @@ public class ZooLockIT extends SharedMiniClusterBase { props.put(Property.INSTANCE_ZK_TIMEOUT.toString(), "3"); props.put(Property.INSTANCE_SECRET.toString(), "secret"); return new ZooLock(new ConfigurationCopy(props), parent, uuid); + } + private static ZooLock getZooLock(ZooKeeperWrapper zkw, String parent, UUID uuid) { +return new ZooLockWrapper(zkw, parent, uuid); } @Test(timeout = 1) @@ -381,14 +392,20 @@ public class ZooLockIT extends SharedMiniClusterBase { public void testLockSerial() throws Exception { String parent = "/zlretryLockSerial"; -ConnectedWatcher watcher = new ConnectedWatcher(); -try (ZooKeeperWrapper zk1 = new ZooKeeperWrapper(getCluster().getZooKeepers(), 3, watcher); -ZooKeeperWrapper zk2 = new ZooKeeperWrapper(getCluster().getZooKeepers(), 3, watcher)) { +ConnectedWatcher watcher1 = new ConnectedWatcher(); +ConnectedWatcher watcher2 = new ConnectedWatcher(); +try (ZooKeeperWrapper zk1 = new ZooKeeperWrapper(getCluster().getZooKeepers(), 3, watcher1); +ZooKeeperWrapper zk2 = +new ZooKeeperWrapper(getCluster().getZooKeepers(), 3, watcher2)) { zk1.addAuthInfo("digest", "accumulo:secret".getBytes(UTF_8)); zk2.addAuthInfo("digest", "accumulo:secret".getBytes(UTF_8)); - while (!watcher.isConnected()) { + while (!watcher1.isConnected()) { +Thread.sleep(200); + } + + while (!watcher2.isConnected()) { Thread.sleep(200); } @@ -396,7 +413,8 @@ public class ZooLockIT extends SharedMiniClusterBase { zk1.createOnce(parent, new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); final RetryLockWatcher zlw1 = new RetryLockWatcher(); - ZooLock zl1 = getZooLock(parent, UUID.fromString("----")); + ZooLock zl1 = + getZooLock(zk1, parent, UUID.fromString("----")); zl1.lock(zlw1, "test1".getBytes(UTF_8)); // The call above creates two nodes in ZK because of the overridden create method in // ZooKeeperWrapper. @@ -410,7 +428,8 @@ public class ZooLockIT extends SharedMiniClusterBase { // zl1 assumes that it has the lock. final RetryLockWatcher zlw2 = new RetryLockWatcher(); - ZooLock zl2 = getZooLock(parent, UUID.fromString("----")); + ZooLock zl2 = + getZooLock(zk2, parent, UUID.fromString("----"));