You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2020/07/16 17:07:32 UTC
[accumulo] 02/03: Numerous warnings cleanup
This is an automated email from the ASF dual-hosted git repository.
ctubbsii pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo.git
commit 0fda74cfb2bf1fcc9b7ed4de240d285a69ad9fc3
Author: Christopher Tubbs <ct...@apache.org>
AuthorDate: Thu Jul 16 03:14:06 2020 -0400
Numerous warnings cleanup
---
.../apache/accumulo/core/logging/TabletLogger.java | 2 --
.../accumulo/core/spi/compaction/package-info.java | 27 ++++++++++------------
.../accumulo/shell/commands/CompactCommand.java | 7 ++----
.../accumulo/test/functional/AccumuloClientIT.java | 3 +--
.../test/functional/ConfigurableCompactionIT.java | 14 +++++------
.../apache/accumulo/test/functional/SummaryIT.java | 20 ++++++++--------
6 files changed, 32 insertions(+), 41 deletions(-)
diff --git a/core/src/main/java/org/apache/accumulo/core/logging/TabletLogger.java b/core/src/main/java/org/apache/accumulo/core/logging/TabletLogger.java
index f67a256..b066e0d 100644
--- a/core/src/main/java/org/apache/accumulo/core/logging/TabletLogger.java
+++ b/core/src/main/java/org/apache/accumulo/core/logging/TabletLogger.java
@@ -114,8 +114,6 @@ public class TabletLogger {
/**
* Lazily converts TableFile to file names. The lazy part is really important because when it is
* not called with log.isDebugEnabled().
- *
- * @return
*/
private static Collection<String> asFileNames(Collection<CompactableFile> files) {
return Collections2.transform(files, CompactableFile::getFileName);
diff --git a/core/src/main/java/org/apache/accumulo/core/spi/compaction/package-info.java b/core/src/main/java/org/apache/accumulo/core/spi/compaction/package-info.java
index 293f990..a26503b 100644
--- a/core/src/main/java/org/apache/accumulo/core/spi/compaction/package-info.java
+++ b/core/src/main/java/org/apache/accumulo/core/spi/compaction/package-info.java
@@ -39,42 +39,39 @@
* these are created based on user configuration. Users can assign a table to a compaction service.
* Has a single compaction planner and one ore more compaction executors.
* <ul>
+ * <li><b>Compaction Executor</b> A non pluggable component that executes compactions using multiple
+ * threads and has a priority queue.
* <li><b>Compaction Planner</b> A pluggable component that can be configured by users when they
* configure a compaction service. It makes decisions about which files to compact on which
* executors. See {@link org.apache.accumulo.core.spi.compaction.CompactionPlanner},
* {@link org.apache.accumulo.core.spi.compaction.CompactionPlanner#makePlan(org.apache.accumulo.core.spi.compaction.CompactionPlanner.PlanningParameters)},
* and {@link org.apache.accumulo.core.spi.compaction.DefaultCompactionPlanner}
- * <li><b>Compaction Executor</b> A non pluggable component that executes compactions using multiple
- * threads and has a priority queue.</li>
* </ul>
- * </li>
+ * </ul>
+ * <ul>
* <li><b>Compactable</b> A non pluggable component that wraps a Tablet and per table pluggable
* compaction components. It tracks all information about one or more running compactions that is
* needed by a compaction service in a thread safe manor. There is a 1 to 1 relationship between
* compactables and tablets.
* <ul>
+ * <li><b>Compaction Configurer</b> A pluggable component that can optionally be configured per
+ * table to dynamically configure file output settings. This supports use cases like using snappy
+ * for small files and gzip for large files. See
+ * {@link org.apache.accumulo.core.client.admin.compaction.CompactionConfigurer}
* <li><b>Compaction Dispatcher</b> A pluggable component component that decides which compaction
* service a table should use for different kinds of compactions. This is configurable by users per
- * table. See {@link org.apache.accumulo.core.spi.compaction.CompactionDispatcher}</li>
+ * table. See {@link org.apache.accumulo.core.spi.compaction.CompactionDispatcher}
* <li><b>Compaction Selector</b> A pluggable component that can optionally be configured per table
* to periodically select files to compact. This supports use cases like periodically compacting all
* files because there are too many deletes. See
- * {@link org.apache.accumulo.core.client.admin.compaction.CompactionSelector}</li>
- * <li><b>Compaction Configurer</b> A pluggable component that can optionally be configured per
- * table to dynamically configure file output settings. This supports use cases like using snappy
- * for small files and gzip for large files. See
- * {@link org.apache.accumulo.core.client.admin.compaction.CompactionConfigurer}</li>
+ * {@link org.apache.accumulo.core.client.admin.compaction.CompactionSelector}
* <li><b>Compaction Strategy</b> A deprecated pluggable component replaced by the Selector and
- * Configurer. See {@link org.apache.accumulo.core.client.admin.CompactionStrategyConfig} for more
- * information about why this was deprecated.
+ * Configurer. See {@code org.apache.accumulo.core.client.admin.CompactionStrategyConfig}'s own
+ * documentation for more information about why it was deprecated.
* </ul>
- * </li>
* </ul>
- * </li>
* </ul>
*
- *
- *
* @see org.apache.accumulo.core.spi
*/
package org.apache.accumulo.core.spi.compaction;
diff --git a/shell/src/main/java/org/apache/accumulo/shell/commands/CompactCommand.java b/shell/src/main/java/org/apache/accumulo/shell/commands/CompactCommand.java
index 7133c63..b5d87aa 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/commands/CompactCommand.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/commands/CompactCommand.java
@@ -28,7 +28,6 @@ import org.apache.accumulo.core.client.AccumuloSecurityException;
import org.apache.accumulo.core.client.IteratorSetting;
import org.apache.accumulo.core.client.TableNotFoundException;
import org.apache.accumulo.core.client.admin.CompactionConfig;
-import org.apache.accumulo.core.client.admin.CompactionStrategyConfig;
import org.apache.accumulo.core.client.admin.PluginConfig;
import org.apache.accumulo.core.compaction.CompactionSettings;
import org.apache.accumulo.shell.Shell;
@@ -178,11 +177,9 @@ public class CompactCommand extends TableOperation {
@SuppressWarnings("removal")
private void configureCompactionStrat(final CommandLine cl) {
- CompactionStrategyConfig csc =
- new CompactionStrategyConfig(cl.getOptionValue(strategyOpt.getOpt()));
-
+ var csc = new org.apache.accumulo.core.client.admin.CompactionStrategyConfig(
+ cl.getOptionValue(strategyOpt.getOpt()));
csc.setOptions(ShellUtil.parseMapOpt(cl, strategyConfigOpt));
-
compactionConfig.setCompactionStrategy(csc);
}
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/AccumuloClientIT.java b/test/src/main/java/org/apache/accumulo/test/functional/AccumuloClientIT.java
index bd0cbd8..491f438 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/AccumuloClientIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/AccumuloClientIT.java
@@ -32,7 +32,6 @@ import org.apache.accumulo.core.client.Accumulo;
import org.apache.accumulo.core.client.AccumuloClient;
import org.apache.accumulo.core.client.BatchWriter;
import org.apache.accumulo.core.client.ConditionalWriterConfig;
-import org.apache.accumulo.core.client.Connector;
import org.apache.accumulo.core.client.Scanner;
import org.apache.accumulo.core.client.admin.TableOperations;
import org.apache.accumulo.core.client.security.tokens.PasswordToken;
@@ -105,7 +104,7 @@ public class AccumuloClientIT extends AccumuloClusterHarness {
c.tableOperations().create(tableName);
- try (AccumuloClient client2 = Connector.newClient(c)) {
+ try (AccumuloClient client2 = org.apache.accumulo.core.client.Connector.newClient(c)) {
assertTrue(client2.tableOperations().list().contains(tableName));
}
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ConfigurableCompactionIT.java b/test/src/main/java/org/apache/accumulo/test/functional/ConfigurableCompactionIT.java
index 389787a..7aff326 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ConfigurableCompactionIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ConfigurableCompactionIT.java
@@ -43,9 +43,6 @@ import org.apache.accumulo.core.metadata.schema.MetadataSchema;
import org.apache.accumulo.core.security.Authorizations;
import org.apache.accumulo.fate.util.UtilWaitThread;
import org.apache.accumulo.miniclusterImpl.MiniAccumuloConfigImpl;
-import org.apache.accumulo.tserver.compaction.CompactionPlan;
-import org.apache.accumulo.tserver.compaction.CompactionStrategy;
-import org.apache.accumulo.tserver.compaction.MajorCompactionRequest;
import org.apache.commons.io.FileUtils;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.Text;
@@ -68,7 +65,8 @@ public class ConfigurableCompactionIT extends ConfigurableMacBase {
}
@SuppressWarnings("removal")
- public static class SimpleCompactionStrategy extends CompactionStrategy {
+ public static class SimpleCompactionStrategy
+ extends org.apache.accumulo.tserver.compaction.CompactionStrategy {
@Override
public void init(Map<String,String> options) {
@@ -80,14 +78,16 @@ public class ConfigurableCompactionIT extends ConfigurableMacBase {
int count = 3;
@Override
- public boolean shouldCompact(MajorCompactionRequest request) {
+ public boolean
+ shouldCompact(org.apache.accumulo.tserver.compaction.MajorCompactionRequest request) {
return request.getFiles().size() == count;
}
@Override
- public CompactionPlan getCompactionPlan(MajorCompactionRequest request) {
- CompactionPlan result = new CompactionPlan();
+ public org.apache.accumulo.tserver.compaction.CompactionPlan
+ getCompactionPlan(org.apache.accumulo.tserver.compaction.MajorCompactionRequest request) {
+ var result = new org.apache.accumulo.tserver.compaction.CompactionPlan();
result.inputFiles.addAll(request.getFiles().keySet());
return result;
}
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/SummaryIT.java b/test/src/main/java/org/apache/accumulo/test/functional/SummaryIT.java
index 9ea90aa..ed77986 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/SummaryIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/SummaryIT.java
@@ -62,7 +62,6 @@ import org.apache.accumulo.core.client.Scanner;
import org.apache.accumulo.core.client.TableNotFoundException;
import org.apache.accumulo.core.client.TableOfflineException;
import org.apache.accumulo.core.client.admin.CompactionConfig;
-import org.apache.accumulo.core.client.admin.CompactionStrategyConfig;
import org.apache.accumulo.core.client.admin.NewTableConfiguration;
import org.apache.accumulo.core.client.admin.PluginConfig;
import org.apache.accumulo.core.client.admin.compaction.CompactionSelector;
@@ -85,9 +84,6 @@ import org.apache.accumulo.core.security.Authorizations;
import org.apache.accumulo.core.security.TablePermission;
import org.apache.accumulo.fate.util.UtilWaitThread;
import org.apache.accumulo.harness.AccumuloClusterHarness;
-import org.apache.accumulo.tserver.compaction.CompactionPlan;
-import org.apache.accumulo.tserver.compaction.CompactionStrategy;
-import org.apache.accumulo.tserver.compaction.MajorCompactionRequest;
import org.apache.hadoop.io.Text;
import org.junit.Test;
@@ -471,17 +467,19 @@ public class SummaryIT extends AccumuloClusterHarness {
* in the data. The {@link FooCounter} summary data is used to make the determination.
*/
@SuppressWarnings("removal")
- public static class FooCS extends CompactionStrategy {
+ public static class FooCS extends org.apache.accumulo.tserver.compaction.CompactionStrategy {
private boolean compact = false;
@Override
- public boolean shouldCompact(MajorCompactionRequest request) {
+ public boolean
+ shouldCompact(org.apache.accumulo.tserver.compaction.MajorCompactionRequest request) {
return true;
}
@Override
- public void gatherInformation(MajorCompactionRequest request) {
+ public void
+ gatherInformation(org.apache.accumulo.tserver.compaction.MajorCompactionRequest request) {
List<Summary> summaries = request.getSummaries(request.getFiles().keySet(),
conf -> conf.getClassName().contains("FooCounter"));
if (summaries.size() == 1) {
@@ -494,9 +492,10 @@ public class SummaryIT extends AccumuloClusterHarness {
}
@Override
- public CompactionPlan getCompactionPlan(MajorCompactionRequest request) {
+ public org.apache.accumulo.tserver.compaction.CompactionPlan
+ getCompactionPlan(org.apache.accumulo.tserver.compaction.MajorCompactionRequest request) {
if (compact) {
- CompactionPlan cp = new CompactionPlan();
+ var cp = new org.apache.accumulo.tserver.compaction.CompactionPlan();
cp.inputFiles.addAll(request.getFiles().keySet());
return cp;
}
@@ -517,7 +516,8 @@ public class SummaryIT extends AccumuloClusterHarness {
@SuppressWarnings("removal")
@Test
public void compactionStrategyTest() throws Exception {
- CompactionStrategyConfig csc = new CompactionStrategyConfig(FooCS.class.getName());
+ var csc =
+ new org.apache.accumulo.core.client.admin.CompactionStrategyConfig(FooCS.class.getName());
CompactionConfig compactConfig = new CompactionConfig().setCompactionStrategy(csc);
compactionTest(compactConfig);
}