[accumulo] branch main updated: Fix warnings
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 7e487dfdbf Fix warnings 7e487dfdbf is described below commit 7e487dfdbff200df71a7e034371d469a10033d1f Author: Christopher Tubbs AuthorDate: Mon Jul 25 14:26:48 2022 -0400 Fix warnings * Use fully-qualified class name and warnings suppressions for ScanInterpreter uses left from #2806 * Delete unused static get method in ZooInfoViewer introduced in #2751 --- .../org/apache/accumulo/core/conf/Property.java| 4 +- .../accumulo/server/conf/util/ZooInfoViewer.java | 7 --- .../main/java/org/apache/accumulo/shell/Shell.java | 4 +- .../accumulo/shell/commands/DeleteManyCommand.java | 4 +- .../accumulo/shell/commands/GrepCommand.java | 4 +- .../accumulo/shell/commands/MaxRowCommand.java | 4 +- .../accumulo/shell/commands/ScanCommand.java | 72 +- 7 files changed, 54 insertions(+), 45 deletions(-) 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 100d8f4c69..9b252449c0 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 @@ -40,7 +40,6 @@ import org.apache.accumulo.core.spi.scan.ScanDispatcher; import org.apache.accumulo.core.spi.scan.ScanPrioritizer; import org.apache.accumulo.core.spi.scan.SimpleScanDispatcher; import org.apache.accumulo.core.util.format.DefaultFormatter; -import org.apache.accumulo.core.util.interpret.DefaultScanInterpreter; import org.slf4j.LoggerFactory; import com.google.common.base.Preconditions; @@ -1114,7 +1113,8 @@ public enum Property { TABLE_FORMATTER_CLASS("table.formatter", DefaultFormatter.class.getName(), PropertyType.STRING, "The Formatter class to apply on results in the shell", "1.4.0"), @Deprecated(since = "2.1.0") - TABLE_INTERPRETER_CLASS("table.interepreter", DefaultScanInterpreter.class.getName(), + TABLE_INTERPRETER_CLASS("table.interepreter", + org.apache.accumulo.core.util.interpret.DefaultScanInterpreter.class.getName(), PropertyType.STRING, "The ScanInterpreter class to apply on scan arguments in the shell. " + "Note that this property is deprecated and will be removed in a future version.", diff --git a/server/base/src/main/java/org/apache/accumulo/server/conf/util/ZooInfoViewer.java b/server/base/src/main/java/org/apache/accumulo/server/conf/util/ZooInfoViewer.java index ed54c72707..d7d2283025 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/conf/util/ZooInfoViewer.java +++ b/server/base/src/main/java/org/apache/accumulo/server/conf/util/ZooInfoViewer.java @@ -517,15 +517,8 @@ public class ZooInfoViewer implements KeywordExecutable { } private static class NullWatcher extends PropStoreWatcher { - public NullWatcher(ReadyMonitor zkReadyMonitor) { super(zkReadyMonitor); } - -public static NullWatcher get() { - ReadyMonitor monitor = new ReadyMonitor("property-printer", 2000); - monitor.setReady(); - return new NullWatcher(monitor); -} } } diff --git a/shell/src/main/java/org/apache/accumulo/shell/Shell.java b/shell/src/main/java/org/apache/accumulo/shell/Shell.java index fa7e6946b8..863ffb011c 100644 --- a/shell/src/main/java/org/apache/accumulo/shell/Shell.java +++ b/shell/src/main/java/org/apache/accumulo/shell/Shell.java @@ -120,7 +120,6 @@ import org.apache.accumulo.shell.commands.ImportDirectoryCommand; import org.apache.accumulo.shell.commands.ImportTableCommand; import org.apache.accumulo.shell.commands.InfoCommand; import org.apache.accumulo.shell.commands.InsertCommand; -import org.apache.accumulo.shell.commands.InterpreterCommand; import org.apache.accumulo.shell.commands.ListBulkCommand; import org.apache.accumulo.shell.commands.ListCompactionsCommand; import org.apache.accumulo.shell.commands.ListIterCommand; @@ -379,7 +378,8 @@ public class Shell extends ShellOptions implements KeywordExecutable { @SuppressWarnings("deprecation") Command[] dataCommands = {new DeleteCommand(), new DeleteManyCommand(), new DeleteRowsCommand(), -new EGrepCommand(), new FormatterCommand(), new InterpreterCommand(), new GrepCommand(), +new EGrepCommand(), new FormatterCommand(), +new org.apache.accumulo.shell.commands.InterpreterCommand(), new GrepCommand(), new ImportDirectoryCommand(), new InsertCommand(), new MaxRowCommand(), new ScanCommand()}; @SuppressWarnings("deprecation") Command[] debuggingCommands = diff --git a/shell/src/main/java/org/apache/accumulo/shell/commands/DeleteManyCommand.java
[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: Fix warnings leftover from VFS deprecation (#1804)
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 68acf9f Fix warnings leftover from VFS deprecation (#1804) 68acf9f is described below commit 68acf9f101efeaf3a612b39e898a3a58090470fa Author: Christopher Tubbs AuthorDate: Thu Nov 26 14:17:23 2020 -0500 Fix warnings leftover from VFS deprecation (#1804) * Fix warnings leftover from VFS deprecation This addresses warnings introduced recently and generally improves the overall context class loader feature and related code. Fixing warnings: * Deprecate some classes that exist only to support deprecated code * Reduce references to deprecated classes by putting them behind more utility methods (especially in ClassLoaderUtil) * Remove references to deprecated classes in javadoc `@see` tags * Remove unused variables * Remove Deprecated annotation when it would propagate and create too many warnings for internal classes that aren't user-facing and don't need to advertise their deprecation status * Suppress unavoidable compiler warnings due to deprecations * Prevent new compiler warnings from being introduced, by adding a flag for the compiler plugin to fail the build on warnings. Since we keep untriaged (unsuppressed) warnings at `0`, this should not cause a problem for most builds, but can be suppressed during development with `-Dmaven.compiler.failOnWarning=false`. Other improvements: * Deprecate old table.classpath.context in favor of new table.class.loader.context, and update Property docs * Update ContextClassLoaderFactory javadocs and remove declared RuntimeExceptions from interface definition * Consolidate ContextClassLoaders and ClassLoaderUtil utility classes * Rename LegacyVFSContextClassLoaderFactory to DefaultContextClassLoaderFactory * Use more functional and streams, wherever possible, and use generics where previously rawtypes or excessive casting was used * Remove unneeded initialize method from factory interface * Push down IOException handling into utility methods in AccumuloVFSClassLoader that were previously propagated and handled outside the class to simplify calling code * Fix tests Add implementation for isPropertySet in ConfigurationCopy, because it is used for per-table context lookup in some test code paths. * Add deprecated annotation to a few missed classes --- .../accumulo/core/classloader/ClassLoaderUtil.java | 81 +-- .../core/classloader/ContextClassLoaders.java | 88 .../DefaultContextClassLoaderFactory.java | 82 +++ .../LegacyVFSContextClassLoaderFactory.java| 94 -- .../accumulo/core/conf/ConfigurationCopy.java | 5 ++ .../apache/accumulo/core/conf/IterConfigUtil.java | 2 +- .../org/apache/accumulo/core/conf/Property.java| 42 ++ .../apache/accumulo/core/conf/PropertyType.java| 1 + .../accumulo/core/file/BloomFilterLayer.java | 4 +- .../cache/impl/BlockCacheManagerFactory.java | 2 +- .../core/iterators/TypedValueCombiner.java | 4 +- .../accumulo/core/sample/impl/SamplerFactory.java | 3 +- .../core/spi/common/ContextClassLoaderFactory.java | 55 +++-- .../accumulo/core/summary/SummarizerFactory.java | 3 +- .../classloader/ContextClassLoaderFactoryTest.java | 14 ++-- .../core/classloader/URLClassLoaderFactory.java| 20 ++--- .../core/conf/AccumuloConfigurationTest.java | 21 ++--- .../apache/accumulo/core/crypto/CryptoTest.java| 2 +- .../minicluster/MiniAccumuloClusterTest.java | 12 ++- pom.xml| 2 + .../org/apache/accumulo/server/AbstractServer.java | 2 + .../accumulo/server/ServiceEnvironmentImpl.java| 4 +- .../server/client/ClientServiceHandler.java| 9 +-- .../accumulo/server/conf/TableConfiguration.java | 4 +- .../server/master/balancer/TableLoadBalancer.java | 2 +- .../accumulo/server/util/LoginProperties.java | 8 +- .../server/master/balancer/GroupBalancerTest.java | 3 - .../master/balancer/TableLoadBalancerTest.java | 6 +- .../java/org/apache/accumulo/master/Master.java| 11 --- .../org/apache/accumulo/tracer/TraceServer.java| 17 ++-- .../org/apache/accumulo/tserver/TabletServer.java | 7 -- .../tserver/constraints/ConstraintChecker.java | 2 +- .../accumulo/tserver/tablet/CompactableUtils.java | 3 +- .../main/java/org/apache/accumulo/shell/Shell.java | 63 +-- .../accumulo/shell/commands/ClasspathCommand.java | 4 +- .../accumulo/shell/commands/ScanCommand.java | 10 +--