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 2022/02/21 06:03:04 UTC
[accumulo] branch main updated: Remove unnecessary string literal concatenations (#2513)
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 e39fbea Remove unnecessary string literal concatenations (#2513)
e39fbea is described below
commit e39fbea6dfd96b7086babb51af76be99238686e7
Author: Kylian Meulin <59...@users.noreply.github.com>
AuthorDate: Mon Feb 21 07:02:57 2022 +0100
Remove unnecessary string literal concatenations (#2513)
* Replace string literal concatenation patterns of `"a" + "b"` with `"ab"`
* Apply checkstyle rule that triggers in the build if it is seen again
Co-authored-by: Christopher Tubbs <ct...@apache.org>
---
.../accumulo/core/client/admin/DiskUsage.java | 2 +-
.../TabletServerBatchReaderIterator.java | 2 +-
.../accumulo/core/conf/ClientConfigGenerate.java | 2 +-
.../apache/accumulo/core/conf/ClientProperty.java | 8 +--
.../accumulo/core/conf/ConfigurationDocGen.java | 17 +++---
.../org/apache/accumulo/core/conf/Property.java | 12 ++---
.../apache/accumulo/core/conf/PropertyType.java | 10 ++--
.../cache/lru/LruBlockCacheConfiguration.java | 3 +-
.../core/file/rfile/VisMetricsGatherer.java | 3 +-
.../apache/accumulo/core/iterators/Combiner.java | 2 +-
.../core/iterators/user/CfCqSliceOpts.java | 8 +--
.../core/iterators/user/ColumnSliceFilter.java | 2 +-
.../core/iterators/user/LargeRowFilter.java | 2 +-
.../core/iterators/user/SummingArrayCombiner.java | 2 +-
.../core/iterators/user/VisibilityFilter.java | 2 +-
.../org/apache/accumulo/core/rpc/ThriftUtil.java | 2 +-
.../accumulo/fate/zookeeper/ZooReaderWriter.java | 2 +-
.../accumulo/core/conf/PropertyTypeTest.java | 2 +-
.../core/data/ConstraintViolationSummaryTest.java | 2 +-
.../core/iterators/user/RegExFilterTest.java | 4 +-
.../compaction/DefaultCompactionPlannerTest.java | 2 +-
.../core/util/format/HexFormatterTest.java | 2 +-
pom.xml | 5 ++
.../accumulo/server/GarbageCollectionLogger.java | 5 +-
.../apache/accumulo/server/init/Initialize.java | 4 +-
.../server/security/AuditedSecurityOperation.java | 62 +++++++++++-----------
.../server/security/UserImpersonation.java | 5 +-
.../server/util/CheckForMetadataProblems.java | 2 +-
.../server/conf/NamespaceConfigurationTest.java | 4 +-
.../server/conf/TableConfigurationTest.java | 4 +-
.../manager/metrics/fate/FateMetricValues.java | 2 +-
.../util/logging/AccumuloMonitorAppender.java | 2 +-
.../tserver/TabletServerResourceManager.java | 2 +-
.../main/java/org/apache/accumulo/shell/Shell.java | 8 +--
.../org/apache/accumulo/shell/ShellOptionsJC.java | 2 +-
.../accumulo/shell/commands/CompactCommand.java | 2 +-
.../accumulo/shell/commands/ConfigCommand.java | 2 +-
.../shell/commands/CreateTableCommand.java | 2 +-
.../accumulo/shell/commands/DeleteCommand.java | 2 +-
.../accumulo/shell/commands/GrepCommand.java | 2 +-
.../accumulo/shell/commands/InsertCommand.java | 2 +-
.../accumulo/shell/commands/ListScansCommand.java | 2 +-
.../accumulo/shell/commands/ScanCommand.java | 4 +-
.../accumulo/shell/commands/SetIterCommand.java | 2 +-
.../accumulo/shell/commands/SummariesCommand.java | 2 +-
.../org/apache/accumulo/test/AuditMessageIT.java | 2 +-
.../apache/accumulo/test/shell/ShellServerIT.java | 10 ++--
.../org/apache/accumulo/test/util/CertUtils.java | 2 +-
48 files changed, 120 insertions(+), 116 deletions(-)
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/DiskUsage.java b/core/src/main/java/org/apache/accumulo/core/client/admin/DiskUsage.java
index ae5811f..3b31a4d 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/DiskUsage.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/DiskUsage.java
@@ -58,6 +58,6 @@ public class DiskUsage {
@Override
public String toString() {
- return "DiskUsage{" + "tables=" + tables + ", usage=" + usage + '}';
+ return "DiskUsage{tables=" + tables + ", usage=" + usage + '}';
}
}
diff --git a/core/src/main/java/org/apache/accumulo/core/clientImpl/TabletServerBatchReaderIterator.java b/core/src/main/java/org/apache/accumulo/core/clientImpl/TabletServerBatchReaderIterator.java
index 117ba8d..9378165 100644
--- a/core/src/main/java/org/apache/accumulo/core/clientImpl/TabletServerBatchReaderIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/clientImpl/TabletServerBatchReaderIterator.java
@@ -179,7 +179,7 @@ public class TabletServerBatchReaderIterator implements Iterator<Entry<Key,Value
if (queryThreadPool.isShutdown()) {
String shortMsg =
- "The BatchScanner was unexpectedly closed while" + " this Iterator was still in use.";
+ "The BatchScanner was unexpectedly closed while this Iterator was still in use.";
log.error("{} Ensure that a reference to the BatchScanner is retained"
+ " so that it can be closed when this Iterator is exhausted. Not"
+ " retaining a reference to the BatchScanner guarantees that you are"
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/ClientConfigGenerate.java b/core/src/main/java/org/apache/accumulo/core/conf/ClientConfigGenerate.java
index 0ad0a8a..961b965 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/ClientConfigGenerate.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/ClientConfigGenerate.java
@@ -91,7 +91,7 @@ public class ClientConfigGenerate {
doc.println("order: 3");
doc.println("---\n");
doc.println("<!-- WARNING: Do not edit this file. It is a generated file"
- + " that is copied from Accumulo build (from core/target/generated-docs)" + " -->");
+ + " that is copied from Accumulo build (from core/target/generated-docs) -->");
doc.println("<!-- Generated by : " + getClass().getName() + " -->\n");
doc.println("Below are properties set in `accumulo-client.properties`"
+ " that configure [Accumulo clients]({{ page.docs_baseurl"
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/ClientProperty.java b/core/src/main/java/org/apache/accumulo/core/conf/ClientProperty.java
index a1d8431..9f453ce 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/ClientProperty.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/ClientProperty.java
@@ -41,8 +41,8 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
public enum ClientProperty {
// Instance
- INSTANCE_NAME("instance.name", "", PropertyType.STRING,
- "Name of Accumulo instance to " + "connect to", "2.0.0", true),
+ INSTANCE_NAME("instance.name", "", PropertyType.STRING, "Name of Accumulo instance to connect to",
+ "2.0.0", true),
INSTANCE_ZOOKEEPERS("instance.zookeepers", "localhost:2181", PropertyType.HOSTLIST,
"Zookeeper connection information for Accumulo instance", "2.0.0", true),
INSTANCE_ZOOKEEPERS_TIMEOUT("instance.zookeepers.timeout", "30s", PropertyType.TIMEDURATION,
@@ -238,8 +238,8 @@ public enum ClientProperty {
}
public void setBytes(Properties properties, Long bytes) {
- checkState(getType() == PropertyType.BYTES, "Invalid type setting " + "bytes. Type must be "
- + PropertyType.BYTES + ", not " + getType());
+ checkState(getType() == PropertyType.BYTES,
+ "Invalid type setting bytes. Type must be " + PropertyType.BYTES + ", not " + getType());
properties.setProperty(getKey(), bytes.toString());
}
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/ConfigurationDocGen.java b/core/src/main/java/org/apache/accumulo/core/conf/ConfigurationDocGen.java
index 13b89e3..e434b00 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/ConfigurationDocGen.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/ConfigurationDocGen.java
@@ -67,7 +67,7 @@ public class ConfigurationDocGen {
doc.println("order: 4");
doc.println("---\n");
doc.println("<!-- WARNING: Do not edit this file. It is a generated file"
- + " that is copied from Accumulo build (from core/target/generated-docs)" + " -->\n");
+ + " that is copied from Accumulo build (from core/target/generated-docs) -->\n");
doc.println("Below are properties set in `accumulo.properties` or the"
+ " Accumulo shell that configure Accumulo servers (i.e tablet server,"
+ " manager, etc). Properties labeled 'Experimental' should not be considered stable"
@@ -83,9 +83,8 @@ public class ConfigurationDocGen {
if (depr) {
description += "*Deprecated since:* " + prefix.deprecatedSince() + "<br>";
if (prefix.isReplaced())
- description +=
- "*Replaced by:* " + "<a href=\"#" + prefix.replacedBy().getKey().replace(".", "_")
- + "prefix\">" + prefix.replacedBy() + "</a><br>";
+ description += "*Replaced by:* <a href=\"#" + prefix.replacedBy().getKey().replace(".", "_")
+ + "prefix\">" + prefix.replacedBy() + "</a><br>";
}
description += strike(sanitize(prefix.getDescription()), depr);
doc.println("| " + key + " | " + description + " |");
@@ -101,15 +100,15 @@ public class ConfigurationDocGen {
if (prop.getKey().startsWith("manager.")
&& (prop.availableSince().startsWith("1.") || prop.availableSince().startsWith("2.0"))) {
description += "2.1.0 (since " + prop.availableSince() + " as *master."
- + prop.getKey().substring(8) + "*)" + "<br>";
+ + prop.getKey().substring(8) + "*)<br>";
} else {
description += prop.availableSince() + "<br>";
}
if (depr) {
description += "*Deprecated since:* " + prop.deprecatedSince() + "<br>";
if (prop.isReplaced())
- description += "*Replaced by:* " + "<a href=\"#"
- + prop.replacedBy().getKey().replace(".", "_") + "\">" + prop.replacedBy() + "</a><br>";
+ description += "*Replaced by:* <a href=\"#" + prop.replacedBy().getKey().replace(".", "_")
+ + "\">" + prop.replacedBy() + "</a><br>";
}
description += strike(sanitize(prop.getDescription()), depr) + "<br>"
+ strike("**type:** " + prop.getType().name(), depr) + ", "
@@ -122,9 +121,9 @@ public class ConfigurationDocGen {
description += strike("**default value:** ", depr) + "\n```\n" + defaultValue + "\n```\n";
} else if (prop.getType() == PropertyType.CLASSNAME
&& defaultValue.startsWith("org.apache.accumulo")) {
- description += strike("**default value:** " + "{% jlink -f " + defaultValue + " %}", depr);
+ description += strike("**default value:** {% jlink -f " + defaultValue + " %}", depr);
} else {
- description += strike("**default value:** " + "`" + defaultValue + "`", depr);
+ description += strike("**default value:** `" + defaultValue + "`", depr);
}
doc.println("| " + key + " | " + description + " |");
}
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 cc1cac5..667d78b 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
@@ -244,7 +244,7 @@ public enum Property {
"Enables tracing functionality using OpenTelemetry (assuming OpenTelemetry is configured).",
"2.1.0"),
GENERAL_SIMPLETIMER_THREADPOOL_SIZE("general.server.simpletimer.threadpool.size", "1",
- PropertyType.COUNT, "The number of threads to use for " + "server-internal scheduled tasks",
+ PropertyType.COUNT, "The number of threads to use for server-internal scheduled tasks",
"1.7.0"),
// If you update the default type, be sure to update the default used for initialization failures
// in VolumeManagerImpl
@@ -497,7 +497,7 @@ public enum Property {
"1.3.5"),
TSERV_NATIVEMAP_ENABLED("tserver.memory.maps.native.enabled", "true", PropertyType.BOOLEAN,
"An in-memory data store for accumulo implemented in c++ that increases"
- + " the amount of data accumulo can hold in memory and avoids Java GC" + " pauses.",
+ + " the amount of data accumulo can hold in memory and avoids Java GC pauses.",
"1.3.5"),
TSERV_MAXMEM("tserver.memory.maps.max", "33%", PropertyType.MEMORY,
"Maximum amount of memory that can be used to buffer data written to a"
@@ -642,13 +642,13 @@ public enum Property {
TSERV_BULK_PROCESS_THREADS("tserver.bulk.process.threads", "1", PropertyType.COUNT,
"The manager will task a tablet server with pre-processing a bulk import"
+ " RFile prior to assigning it to the appropriate tablet servers. This"
- + " configuration value controls the number of threads used to process the" + " files.",
+ + " configuration value controls the number of threads used to process the files.",
"1.4.0"),
TSERV_BULK_ASSIGNMENT_THREADS("tserver.bulk.assign.threads", "1", PropertyType.COUNT,
"The manager delegates bulk import RFile processing and assignment to"
+ " tablet servers. After file has been processed, the tablet server will"
+ " assign the file to the appropriate tablets on all servers. This property"
- + " controls the number of threads used to communicate to the other" + " servers.",
+ + " controls the number of threads used to communicate to the other servers.",
"1.4.0"),
TSERV_BULK_RETRY("tserver.bulk.retry.max", "5", PropertyType.COUNT,
"The number of times the tablet server will attempt to assign a RFile to"
@@ -1058,9 +1058,9 @@ public enum Property {
"Properties in this category are per-table properties that add"
+ " constraints to a table. These properties start with the category"
+ " prefix, followed by a number, and their values correspond to a fully"
- + " qualified Java class that implements the Constraint interface.\n" + "For example:\n"
+ + " qualified Java class that implements the Constraint interface.\nFor example:\n"
+ "table.constraint.1 = org.apache.accumulo.core.constraints.MyCustomConstraint\n"
- + "and:\n" + " table.constraint.2 = my.package.constraints.MySecondConstraint",
+ + "and:\n table.constraint.2 = my.package.constraints.MySecondConstraint",
"1.3.5"),
TABLE_INDEXCACHE_ENABLED("table.cache.index.enable", "true", PropertyType.BOOLEAN,
"Determines whether index block cache is enabled for a table.", "1.3.5"),
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/PropertyType.java b/core/src/main/java/org/apache/accumulo/core/conf/PropertyType.java
index 6b4de25..12f7666 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/PropertyType.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/PropertyType.java
@@ -45,8 +45,8 @@ public enum PropertyType {
"A non-negative integer optionally followed by a unit of time (whitespace"
+ " disallowed), as in 30s.\n"
+ "If no unit of time is specified, seconds are assumed. Valid units"
- + " are 'ms', 's', 'm', 'h' for milliseconds, seconds," + " minutes, and" + " hours.\n"
- + "Examples of valid durations are '600', '30s', '45m', '30000ms'," + " '3d', and '1h'.\n"
+ + " are 'ms', 's', 'm', 'h' for milliseconds, seconds, minutes, and hours.\n"
+ + "Examples of valid durations are '600', '30s', '45m', '30000ms', '3d', and '1h'.\n"
+ "Examples of invalid durations are '1w', '1h30m', '1s 200ms', 'ms', '',"
+ " and 'a'.\nUnless otherwise stated, the max value for the duration"
+ " represented in milliseconds is " + Long.MAX_VALUE),
@@ -67,7 +67,7 @@ public enum PropertyType {
+ "If a percentage is specified, memory will be a percentage of the"
+ " max memory allocated to a Java process (set by the JVM option -Xmx).\n"
+ "If no unit is specified, bytes are assumed. Valid units are 'B',"
- + " 'K', 'M', 'G', '%' for bytes, kilobytes, megabytes, gigabytes, and" + " percentage.\n"
+ + " 'K', 'M', 'G', '%' for bytes, kilobytes, megabytes, gigabytes, and percentage.\n"
+ "Examples of valid memories are '1024', '20B', '100K', '1500M', '2G', '20%'.\n"
+ "Examples of invalid memories are '1M500K', '1M 2K', '1MB', '1.5G',"
+ " '1,024K', '', and 'a'.\n"
@@ -98,7 +98,7 @@ public enum PropertyType {
+ " suffixed with the '%' character, a percentage.\n"
+ "Examples of valid fractions/percentages are '10', '1000%', '0.05',"
+ " '5%', '0.2%', '0.0005'.\n"
- + "Examples of invalid fractions/percentages are '', '10 percent'," + " 'Hulk Hogan'"),
+ + "Examples of invalid fractions/percentages are '', '10 percent', 'Hulk Hogan'"),
PATH("path", x -> true,
"A string that represents a filesystem path, which can be either relative"
@@ -112,7 +112,7 @@ public enum PropertyType {
x -> x == null || x.trim().isEmpty() || new Path(x.trim()).isAbsolute()
|| x.equals(Property.VFS_CLASSLOADER_CACHE_DIR.getDefaultValue()),
"An absolute filesystem path. The filesystem depends on the property."
- + " This is the same as path, but enforces that its root is explicitly" + " specified."),
+ + " This is the same as path, but enforces that its root is explicitly specified."),
CLASSNAME("java class", new Matches("[\\w$.]*"),
"A fully qualified java class name representing a class on the classpath.\n"
diff --git a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/lru/LruBlockCacheConfiguration.java b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/lru/LruBlockCacheConfiguration.java
index e87ed35..c9acc16 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/lru/LruBlockCacheConfiguration.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/lru/LruBlockCacheConfiguration.java
@@ -113,8 +113,7 @@ public final class LruBlockCacheConfiguration {
this.useEvictionThread = get(EVICTION_THREAD_PROPERTY).map(Boolean::valueOf).orElse(true);
if (this.getSingleFactor() + this.getMultiFactor() + this.getMemoryFactor() != 1) {
- throw new IllegalArgumentException(
- "Single, multi, and memory factors " + " should total 1.0");
+ throw new IllegalArgumentException("Single, multi, and memory factors should total 1.0");
}
if (this.getMinFactor() >= this.getAcceptableFactor()) {
throw new IllegalArgumentException("minFactor must be smaller than acceptableFactor");
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/VisMetricsGatherer.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/VisMetricsGatherer.java
index 8bcc3c1..d41dad5 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/VisMetricsGatherer.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/VisMetricsGatherer.java
@@ -128,8 +128,7 @@ public class VisMetricsGatherer
else
out.println(localityGroups.get(i));
out.printf("%-27s", metricWord);
- out.println("Number of keys" + "\t " + "Percent of keys" + "\t" + "Number of blocks" + "\t"
- + "Percent of blocks");
+ out.println("Number of keys\t Percent of keys\tNumber of blocks\tPercent of blocks");
for (Entry<String,Long> entry : metric.get(lGName).asMap().entrySet()) {
if (hash) {
String encodedKey = "";
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java b/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java
index 5126d42..f6c326a 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java
@@ -193,7 +193,7 @@ public abstract class Combiner extends WrappingIterator implements OptionDescrib
sawDeleteLog.error(
"Combiner of type {} saw a delete during a"
+ " partial compaction. This could cause undesired results. See"
- + " ACCUMULO-2232. Will not log subsequent occurrences for at least" + " 1 hour.",
+ + " ACCUMULO-2232. Will not log subsequent occurrences for at least 1 hour.",
Combiner.this.getClass().getSimpleName());
// the value is not used and does not matter
return Boolean.TRUE;
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/user/CfCqSliceOpts.java b/core/src/main/java/org/apache/accumulo/core/iterators/user/CfCqSliceOpts.java
index 9a38cab..c1307ab 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/user/CfCqSliceOpts.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/user/CfCqSliceOpts.java
@@ -33,24 +33,24 @@ public class CfCqSliceOpts {
+ " representing minimum column family. Optional parameter. If minCf and minCq"
+ " are undefined, the column slice will start at the first column of each row."
+ " If you want to do an exact match on column families, it's more efficient to"
- + " leave minCf and maxCf undefined and use the scanner's fetchColumnFamily" + " method.";
+ + " leave minCf and maxCf undefined and use the scanner's fetchColumnFamily method.";
public static final String OPT_MIN_CQ = "minCq";
public static final String OPT_MIN_CQ_DESC = "UTF-8 encoded string"
+ " representing minimum column qualifier. Optional parameter. If minCf and"
- + " minCq are undefined, the column slice will start at the first column of" + " each row.";
+ + " minCq are undefined, the column slice will start at the first column of each row.";
public static final String OPT_MAX_CF = "maxCf";
public static final String OPT_MAX_CF_DESC = "UTF-8 encoded string"
+ " representing maximum column family. Optional parameter. If minCf and minCq"
+ " are undefined, the column slice will start at the first column of each row."
+ " If you want to do an exact match on column families, it's more efficient to"
- + " leave minCf and maxCf undefined and use the scanner's fetchColumnFamily" + " method.";
+ + " leave minCf and maxCf undefined and use the scanner's fetchColumnFamily method.";
public static final String OPT_MAX_CQ = "maxCq";
public static final String OPT_MAX_CQ_DESC = "UTF-8 encoded string"
+ " representing maximum column qualifier. Optional parameter. If maxCf and"
- + " MaxCq are undefined, the column slice will end at the last column of each" + " row.";
+ + " MaxCq are undefined, the column slice will end at the last column of each row.";
public static final String OPT_MIN_INCLUSIVE = "minInclusive";
public static final String OPT_MIN_INCLUSIVE_DESC = "UTF-8 encoded string"
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/user/ColumnSliceFilter.java b/core/src/main/java/org/apache/accumulo/core/iterators/user/ColumnSliceFilter.java
index 455b033..407755d 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/user/ColumnSliceFilter.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/user/ColumnSliceFilter.java
@@ -68,7 +68,7 @@ public class ColumnSliceFilter extends Filter {
IteratorOptions io = super.describeOptions();
io.setName("columnSlice");
io.setDescription("The ColumnSliceFilter/Iterator allows you to filter for"
- + " key/value pairs based on a lexicographic range of column qualifier" + " names");
+ + " key/value pairs based on a lexicographic range of column qualifier names");
io.addNamedOption(START_BOUND, "start string in slice");
io.addNamedOption(END_BOUND, "end string in slice");
io.addNamedOption(START_INCLUSIVE, "include the start bound in the result set");
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/user/LargeRowFilter.java b/core/src/main/java/org/apache/accumulo/core/iterators/user/LargeRowFilter.java
index 34f2baf..6761cfa 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/user/LargeRowFilter.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/user/LargeRowFilter.java
@@ -257,7 +257,7 @@ public class LargeRowFilter implements SortedKeyValueIterator<Key,Value>, Option
@Override
public IteratorOptions describeOptions() {
String description =
- "This iterator suppresses rows that exceed a specified" + " number of columns. Once\n"
+ "This iterator suppresses rows that exceed a specified number of columns. Once\n"
+ "a row exceeds the threshold, a marker is emitted and the row is always\n"
+ "suppressed by this iterator after that point in time.\n"
+ " This iterator works in a similar way to the RowDeletingIterator. See its\n"
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/user/SummingArrayCombiner.java b/core/src/main/java/org/apache/accumulo/core/iterators/user/SummingArrayCombiner.java
index 80f72f2..4784c0c 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/user/SummingArrayCombiner.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/user/SummingArrayCombiner.java
@@ -133,7 +133,7 @@ public class SummingArrayCombiner extends TypedValueCombiner<List<Long>> {
io.setName("sumarray");
io.setDescription("SummingArrayCombiner can interpret Values as arrays of"
+ " Longs using a variety of encodings (arrays of variable length longs or"
- + " fixed length longs, or comma-separated strings) before summing" + " element-wise.");
+ + " fixed length longs, or comma-separated strings) before summing element-wise.");
io.addNamedOption(TYPE, "<VARLEN|FIXEDLEN|STRING|fullClassName>");
return io;
}
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/user/VisibilityFilter.java b/core/src/main/java/org/apache/accumulo/core/iterators/user/VisibilityFilter.java
index 030d962..67deb60 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/user/VisibilityFilter.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/user/VisibilityFilter.java
@@ -111,7 +111,7 @@ public class VisibilityFilter extends Filter implements OptionDescriber {
IteratorOptions io = super.describeOptions();
io.setName("visibilityFilter");
io.setDescription("The VisibilityFilter allows you to filter for key/value"
- + " pairs by a set of authorizations or filter invalid labels from corrupt" + " files.");
+ + " pairs by a set of authorizations or filter invalid labels from corrupt files.");
io.addNamedOption(FILTER_INVALID_ONLY,
"if 'true', the iterator is instructed to ignore the authorizations and"
+ " only filter invalid visibility labels (default: false)");
diff --git a/core/src/main/java/org/apache/accumulo/core/rpc/ThriftUtil.java b/core/src/main/java/org/apache/accumulo/core/rpc/ThriftUtil.java
index 87f6202..53dfb89 100644
--- a/core/src/main/java/org/apache/accumulo/core/rpc/ThriftUtil.java
+++ b/core/src/main/java/org/apache/accumulo/core/rpc/ThriftUtil.java
@@ -352,7 +352,7 @@ public class ThriftUtil {
// Sadly, we have no way to determine the actual reason we got this TTransportException
// other than inspecting the exception msg.
log.debug("Caught TTransportException opening SASL transport,"
- + " checking if re-login is necessary before propagating the" + " exception.");
+ + " checking if re-login is necessary before propagating the exception.");
attemptClientReLogin();
throw e;
diff --git a/core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooReaderWriter.java b/core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooReaderWriter.java
index 67e043b..091dd0b 100644
--- a/core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooReaderWriter.java
+++ b/core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooReaderWriter.java
@@ -50,7 +50,7 @@ public class ZooReaderWriter extends ZooReader {
public ZooReaderWriter(String keepers, int timeoutInMillis, String secret) {
super(keepers, timeoutInMillis);
- this.auth = ("accumulo" + ":" + secret).getBytes(UTF_8);
+ this.auth = ("accumulo:" + secret).getBytes(UTF_8);
}
@Override
diff --git a/core/src/test/java/org/apache/accumulo/core/conf/PropertyTypeTest.java b/core/src/test/java/org/apache/accumulo/core/conf/PropertyTypeTest.java
index d98ecf6..269efbd 100644
--- a/core/src/test/java/org/apache/accumulo/core/conf/PropertyTypeTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/conf/PropertyTypeTest.java
@@ -58,7 +58,7 @@ public class PropertyTypeTest {
public void testGetFormatDescription() {
assertEquals(
"An arbitrary string of characters whose format is unspecified"
- + " and interpreted based on the context of the property to which it" + " applies.",
+ + " and interpreted based on the context of the property to which it applies.",
PropertyType.STRING.getFormatDescription());
}
diff --git a/core/src/test/java/org/apache/accumulo/core/data/ConstraintViolationSummaryTest.java b/core/src/test/java/org/apache/accumulo/core/data/ConstraintViolationSummaryTest.java
index 095e4b0..e00b078 100644
--- a/core/src/test/java/org/apache/accumulo/core/data/ConstraintViolationSummaryTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/data/ConstraintViolationSummaryTest.java
@@ -35,7 +35,7 @@ public class ConstraintViolationSummaryTest {
cvs = new ConstraintViolationSummary(null, (short) 2, null, 101L);
assertEquals(
"ConstraintViolationSummary(constrainClass:null,"
- + " violationCode:2, violationDescription:null," + " numberOfViolatingMutations:101)",
+ + " violationCode:2, violationDescription:null, numberOfViolatingMutations:101)",
cvs.toString());
}
}
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/user/RegExFilterTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/user/RegExFilterTest.java
index d7c8e67..95a0b9e 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/user/RegExFilterTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/user/RegExFilterTest.java
@@ -223,8 +223,8 @@ public class RegExFilterTest {
rei.deepCopy(new DefaultIteratorEnvironment());
// -----------------------------------------------------
- String multiByteText = new String("\u6d67" + "\u6F68" + "\u7067");
- String multiByteRegex = new String(".*" + "\u6F68" + ".*");
+ String multiByteText = new String("\u6d67\u6F68\u7067");
+ String multiByteRegex = new String(".*\u6F68.*");
Key k4 = new Key("boo4".getBytes(), "hoo".getBytes(), "20080203".getBytes(), "".getBytes(), 1L);
Value inVal = new Value(multiByteText);
diff --git a/core/src/test/java/org/apache/accumulo/core/spi/compaction/DefaultCompactionPlannerTest.java b/core/src/test/java/org/apache/accumulo/core/spi/compaction/DefaultCompactionPlannerTest.java
index 95e3335..0900237 100644
--- a/core/src/test/java/org/apache/accumulo/core/spi/compaction/DefaultCompactionPlannerTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/spi/compaction/DefaultCompactionPlannerTest.java
@@ -377,7 +377,7 @@ public class DefaultCompactionPlannerTest {
}
private String getExecutors(String small, String medium, String large) {
- String execBldr = "[{'name':'small'," + small + "}," + "{'name':'medium'," + medium + "},"
+ String execBldr = "[{'name':'small'," + small + "},{'name':'medium'," + medium + "},"
+ "{'name':'large'," + large + "}]";
return execBldr.replaceAll("'", "\"");
}
diff --git a/core/src/test/java/org/apache/accumulo/core/util/format/HexFormatterTest.java b/core/src/test/java/org/apache/accumulo/core/util/format/HexFormatterTest.java
index 988e1f6..1c3ce1b 100644
--- a/core/src/test/java/org/apache/accumulo/core/util/format/HexFormatterTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/util/format/HexFormatterTest.java
@@ -48,7 +48,7 @@ public class HexFormatterTest {
formatter.initialize(data.entrySet(), new FormatterConfig());
assertTrue(formatter.hasNext());
- assertEquals(" " + " " + " [" + "] ", formatter.next());
+ assertEquals(" [] ", formatter.next());
}
@Test
diff --git a/pom.xml b/pom.xml
index 254ab2c..902a0aa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1097,6 +1097,11 @@
<property name="format" value="import java[.]nio[.]charset[.]StandardCharsets;" />
<property name="message" value="Use static imports for StandardCharsets.* constants for consistency" />
</module>
+ <module name="RegexpSinglelineJava">
+ <!-- double escape quotes because checkstyle passes these through another xml parser -->
+ <property name="format" value="&quot; [+] &quot;" />
+ <property name="message" value="Unnecessary concatenation of string literals" />
+ </module>
<module name="OuterTypeFilename" />
<module name="AvoidStarImport" />
<module name="NoLineWrap" />
diff --git a/server/base/src/main/java/org/apache/accumulo/server/GarbageCollectionLogger.java b/server/base/src/main/java/org/apache/accumulo/server/GarbageCollectionLogger.java
index 0f46641..867ecec 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/GarbageCollectionLogger.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/GarbageCollectionLogger.java
@@ -100,8 +100,9 @@ public class GarbageCollectionLogger {
if (lastMemoryCheckTime > 0 && lastMemoryCheckTime < now) {
final long diff = now - lastMemoryCheckTime;
if (diff > keepAliveTimeout + 1000) {
- log.warn(String.format("GC pause checker not called in a timely"
- + " fashion. Expected every %.1f seconds but was %.1f seconds since" + " last check",
+ log.warn(String.format(
+ "GC pause checker not called in a timely"
+ + " fashion. Expected every %.1f seconds but was %.1f seconds since last check",
keepAliveTimeout / 1000., diff / 1000.));
}
lastMemoryCheckTime = now;
diff --git a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
index c1df596..a2b9335 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
@@ -113,7 +113,7 @@ public class Initialize implements KeywordExecutable {
System.out.println(" bin/accumulo " + ChangeSecret.class.getName());
System.out.println("You will also need to edit your secret in your configuration"
+ " file by adding the property instance.secret to your"
- + " accumulo.properties. Without this accumulo will not operate" + " correctly");
+ + " accumulo.properties. Without this accumulo will not operate correctly");
}
if (isInitialized(fs, initConfig)) {
@@ -528,7 +528,7 @@ public class Initialize implements KeywordExecutable {
}
if (!opts.forceResetSecurity) {
String userEnteredName = System.console().readLine("WARNING: This will remove all"
- + " users from Accumulo! If you wish to proceed enter the instance" + " name: ");
+ + " users from Accumulo! If you wish to proceed enter the instance name: ");
if (userEnteredName != null && !context.getInstanceName().equals(userEnteredName)) {
throw new IllegalStateException(
"Aborted reset security: Instance name did not match current instance.");
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java b/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java
index fd01e53..be0480c 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java
@@ -130,7 +130,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CAN_SCAN_AUDIT_TEMPLATE =
- "action: scan;" + " targetTable: %s; authorizations: %s; range: %s; columns: %s;"
+ "action: scan; targetTable: %s; authorizations: %s; range: %s; columns: %s;"
+ " iterators: %s; iteratorOptions: %s;";
private static final int MAX_ELEMENTS_TO_LOG = 10;
@@ -175,7 +175,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CAN_SCAN_BATCH_AUDIT_TEMPLATE =
- "action: scan;" + " targetTable: %s; authorizations: %s; range: %s; columns: %s;"
+ "action: scan; targetTable: %s; authorizations: %s; range: %s; columns: %s;"
+ " iterators: %s; iteratorOptions: %s;";
@Override
@@ -212,7 +212,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CHANGE_AUTHORIZATIONS_AUDIT_TEMPLATE =
- "action:" + " changeAuthorizations; targetUser: %s; authorizations: %s";
+ "action: changeAuthorizations; targetUser: %s; authorizations: %s";
@Override
public void changeAuthorizations(TCredentials credentials, String user,
@@ -227,7 +227,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CHANGE_PASSWORD_AUDIT_TEMPLATE =
- "action:" + " changePassword; targetUser: %s;";
+ "action: changePassword; targetUser: %s;";
@Override
public void changePassword(TCredentials credentials, Credentials newInfo)
@@ -242,7 +242,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CREATE_USER_AUDIT_TEMPLATE =
- "action: createUser;" + " targetUser: %s; Authorizations: %s;";
+ "action: createUser; targetUser: %s; Authorizations: %s;";
@Override
public void createUser(TCredentials credentials, Credentials newUser,
@@ -257,7 +257,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CAN_CREATE_TABLE_AUDIT_TEMPLATE =
- "action:" + " createTable; targetTable: %s;";
+ "action: createTable; targetTable: %s;";
@Override
public boolean canCreateTable(TCredentials c, String tableName, NamespaceId namespaceId)
@@ -273,7 +273,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CAN_DELETE_TABLE_AUDIT_TEMPLATE =
- "action:" + " deleteTable; targetTable: %s;";
+ "action: deleteTable; targetTable: %s;";
@Override
public boolean canDeleteTable(TCredentials c, TableId tableId, NamespaceId namespaceId)
@@ -290,7 +290,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CAN_RENAME_TABLE_AUDIT_TEMPLATE =
- "action:" + " renameTable; targetTable: %s; newTableName: %s;";
+ "action: renameTable; targetTable: %s; newTableName: %s;";
@Override
public boolean canRenameTable(TCredentials c, TableId tableId, String oldTableName,
@@ -306,7 +306,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CAN_SPLIT_TABLE_AUDIT_TEMPLATE =
- "action:" + " splitTable; targetTable: %s; targetNamespace: %s;";
+ "action: splitTable; targetTable: %s; targetNamespace: %s;";
@Override
public boolean canSplitTablet(TCredentials credentials, TableId table, NamespaceId namespaceId)
@@ -322,7 +322,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CAN_PERFORM_SYSTEM_ACTION_AUDIT_TEMPLATE =
- "action:" + " performSystemAction; principal: %s;";
+ "action: performSystemAction; principal: %s;";
@Override
public boolean canPerformSystemActions(TCredentials credentials) throws ThriftSecurityException {
@@ -338,7 +338,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CAN_FLUSH_TABLE_AUDIT_TEMPLATE =
- "action:" + " flushTable; targetTable: %s; targetNamespace: %s;";
+ "action: flushTable; targetTable: %s; targetNamespace: %s;";
@Override
public boolean canFlush(TCredentials c, TableId tableId, NamespaceId namespaceId)
@@ -354,7 +354,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CAN_ALTER_TABLE_AUDIT_TEMPLATE =
- "action:" + " alterTable; targetTable: %s; targetNamespace: %s;";
+ "action: alterTable; targetTable: %s; targetNamespace: %s;";
@Override
public boolean canAlterTable(TCredentials c, TableId tableId, NamespaceId namespaceId)
@@ -370,7 +370,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CAN_CLONE_TABLE_AUDIT_TEMPLATE =
- "action:" + " cloneTable; targetTable: %s; newTableName: %s";
+ "action: cloneTable; targetTable: %s; newTableName: %s";
@Override
public boolean canCloneTable(TCredentials c, TableId tableId, String tableName,
@@ -389,7 +389,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CAN_DELETE_RANGE_AUDIT_TEMPLATE =
- "action:" + " deleteData; targetTable: %s; startRange: %s; endRange: %s;";
+ "action: deleteData; targetTable: %s; startRange: %s; endRange: %s;";
@Override
public boolean canDeleteRange(TCredentials c, TableId tableId, String tableName, Text startRow,
@@ -407,7 +407,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CAN_BULK_IMPORT_AUDIT_TEMPLATE =
- "action:" + " bulkImport; targetTable: %s; dataDir: %s; failDir: %s;";
+ "action: bulkImport; targetTable: %s; dataDir: %s; failDir: %s;";
@Override
public boolean canBulkImport(TCredentials c, TableId tableId, String tableName, String dir,
@@ -423,7 +423,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CAN_COMPACT_TABLE_AUDIT_TEMPLATE =
- "action:" + " compactTable; targetTable: %s; targetNamespace: %s;";
+ "action: compactTable; targetTable: %s; targetNamespace: %s;";
@Override
public boolean canCompact(TCredentials c, TableId tableId, NamespaceId namespaceId)
@@ -439,7 +439,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CAN_CHANGE_AUTHORIZATIONS_AUDIT_TEMPLATE =
- "action:" + " changeAuthorizations; targetUser: %s;";
+ "action: changeAuthorizations; targetUser: %s;";
@Override
public boolean canChangeAuthorizations(TCredentials c, String user)
@@ -455,7 +455,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CAN_CHANGE_PASSWORD_AUDIT_TEMPLATE =
- "action:" + " changePassword; targetUser: %s;";
+ "action: changePassword; targetUser: %s;";
@Override
public boolean canChangePassword(TCredentials c, String user) throws ThriftSecurityException {
@@ -499,7 +499,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CAN_GRANT_SYSTEM_AUDIT_TEMPLATE =
- "action:" + " grantSystem; targetUser: %s; targetPermission: %s;";
+ "action: grantSystem; targetUser: %s; targetPermission: %s;";
@Override
public boolean canGrantSystem(TCredentials c, String user, SystemPermission sysPerm)
@@ -517,7 +517,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CAN_GRANT_TABLE_AUDIT_TEMPLATE =
- "action:" + " grantTable; targetUser: %s; targetTable: %s; targetNamespace: %s;";
+ "action: grantTable; targetUser: %s; targetTable: %s; targetNamespace: %s;";
@Override
public boolean canGrantTable(TCredentials c, String user, TableId table, NamespaceId namespaceId)
@@ -533,7 +533,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CAN_REVOKE_SYSTEM_AUDIT_TEMPLATE =
- "action:" + " revokeSystem; targetUser: %s;, targetPermission: %s;";
+ "action: revokeSystem; targetUser: %s;, targetPermission: %s;";
@Override
public boolean canRevokeSystem(TCredentials c, String user, SystemPermission sysPerm)
@@ -549,7 +549,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CAN_REVOKE_TABLE_AUDIT_TEMPLATE =
- "action:" + " revokeTable; targetUser: %s; targetTable %s; targetNamespace: %s;";
+ "action: revokeTable; targetUser: %s; targetTable %s; targetNamespace: %s;";
@Override
public boolean canRevokeTable(TCredentials c, String user, TableId table, NamespaceId namespaceId)
@@ -565,7 +565,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CAN_IMPORT_AUDIT_TEMPLATE =
- "action: import;" + " targetTable: %s; dataDir: %s;";
+ "action: import; targetTable: %s; dataDir: %s;";
@Override
public boolean canImport(TCredentials credentials, String tableName, Set<String> importDirs,
@@ -582,7 +582,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CAN_EXPORT_AUDIT_TEMPLATE =
- "action: export;" + " targetTable: %s; dataDir: %s;";
+ "action: export; targetTable: %s; dataDir: %s;";
@Override
public boolean canExport(TCredentials credentials, TableId tableId, String tableName,
@@ -612,7 +612,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String GRANT_SYSTEM_PERMISSION_AUDIT_TEMPLATE =
- "action:" + " grantSystemPermission; permission: %s; targetUser: %s;";
+ "action: grantSystemPermission; permission: %s; targetUser: %s;";
@Override
public void grantSystemPermission(TCredentials credentials, String user,
@@ -627,7 +627,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String GRANT_TABLE_PERMISSION_AUDIT_TEMPLATE =
- "action:" + " grantTablePermission; permission: %s; targetTable: %s; targetUser: %s;";
+ "action: grantTablePermission; permission: %s; targetTable: %s; targetUser: %s;";
@Override
public void grantTablePermission(TCredentials credentials, String user, TableId tableId,
@@ -643,7 +643,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String REVOKE_SYSTEM_PERMISSION_AUDIT_TEMPLATE =
- "action:" + " revokeSystemPermission; permission: %s; targetUser: %s;";
+ "action: revokeSystemPermission; permission: %s; targetUser: %s;";
@Override
public void revokeSystemPermission(TCredentials credentials, String user,
@@ -659,7 +659,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String REVOKE_TABLE_PERMISSION_AUDIT_TEMPLATE =
- "action:" + " revokeTablePermission; permission: %s; targetTable: %s; targetUser: %s;";
+ "action: revokeTablePermission; permission: %s; targetTable: %s; targetUser: %s;";
@Override
public void revokeTablePermission(TCredentials credentials, String user, TableId tableId,
@@ -675,7 +675,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String HAS_SYSTEM_PERMISSION_AUDIT_TEMPLATE =
- "action:" + " hasSystemPermission; permission: %s; targetUser: %s;";
+ "action: hasSystemPermission; permission: %s; targetUser: %s;";
@Override
public boolean hasSystemPermission(TCredentials credentials, String user,
@@ -691,7 +691,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CAN_ONLINE_OFFLINE_TABLE_AUDIT_TEMPLATE =
- "action:" + " %s; targetTable: %s;";
+ "action: %s; targetTable: %s;";
@Override
public boolean canOnlineOfflineTable(TCredentials credentials, TableId tableId, FateOperation op,
@@ -715,7 +715,7 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
public static final String CAN_MERGE_TABLE_AUDIT_TEMPLATE =
- "action:" + " mergeTable; targetTable: %s; targetNamespace: %s;";
+ "action: mergeTable; targetTable: %s; targetNamespace: %s;";
@Override
public boolean canMerge(TCredentials c, TableId tableId, NamespaceId namespaceId)
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/UserImpersonation.java b/server/base/src/main/java/org/apache/accumulo/server/security/UserImpersonation.java
index 8561162..a7961b6 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/UserImpersonation.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/UserImpersonation.java
@@ -188,8 +188,9 @@ public class UserImpersonation {
hostConfigString.trim().isEmpty() ? new String[] {""} : hostConfigString.split(";");
if (userConfigs.length != hostConfigs.length) {
- String msg = String.format("Should have equal number of user and host"
- + " impersonation elements in configuration. Got %d and %d elements," + " respectively.",
+ String msg = String.format(
+ "Should have equal number of user and host"
+ + " impersonation elements in configuration. Got %d and %d elements, respectively.",
userConfigs.length, hostConfigs.length);
throw new IllegalArgumentException(msg);
}
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java b/server/base/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java
index ba1a2e4..aa66f6b 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java
@@ -69,7 +69,7 @@ public class CheckForMetadataProblems {
}
if (tablets.first().prevEndRow() != null) {
- System.out.println("...First entry for table " + tableName + " (" + tableId + ") " + " - "
+ System.out.println("...First entry for table " + tableName + " (" + tableId + ") - "
+ tablets.first() + " - has non null prev end row");
sawProblems = true;
return;
diff --git a/server/base/src/test/java/org/apache/accumulo/server/conf/NamespaceConfigurationTest.java b/server/base/src/test/java/org/apache/accumulo/server/conf/NamespaceConfigurationTest.java
index ce47f11..584e2a7 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/conf/NamespaceConfigurationTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/conf/NamespaceConfigurationTest.java
@@ -125,9 +125,9 @@ public class NamespaceConfigurationTest {
ZooUtil.getRoot(iid) + Constants.ZNAMESPACES + "/" + NSID + Constants.ZNAMESPACE_CONF))
.andReturn(children);
expect(zc.get(ZooUtil.getRoot(iid) + Constants.ZNAMESPACES + "/" + NSID
- + Constants.ZNAMESPACE_CONF + "/" + "foo")).andReturn("bar".getBytes(UTF_8));
+ + Constants.ZNAMESPACE_CONF + "/foo")).andReturn("bar".getBytes(UTF_8));
expect(zc.get(ZooUtil.getRoot(iid) + Constants.ZNAMESPACES + "/" + NSID
- + Constants.ZNAMESPACE_CONF + "/" + "ding")).andReturn("dong".getBytes(UTF_8));
+ + Constants.ZNAMESPACE_CONF + "/ding")).andReturn("dong".getBytes(UTF_8));
replay(zc);
c.getProperties(props, all);
assertEquals(2, props.size());
diff --git a/server/base/src/test/java/org/apache/accumulo/server/conf/TableConfigurationTest.java b/server/base/src/test/java/org/apache/accumulo/server/conf/TableConfigurationTest.java
index 6104417..108bf92 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/conf/TableConfigurationTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/conf/TableConfigurationTest.java
@@ -109,8 +109,8 @@ public class TableConfigurationTest {
expect(zc
.getChildren(ZooUtil.getRoot(iid) + Constants.ZTABLES + "/" + TID + Constants.ZTABLE_CONF))
.andReturn(children);
- expect(zc.get(
- ZooUtil.getRoot(iid) + Constants.ZTABLES + "/" + TID + Constants.ZTABLE_CONF + "/" + "foo"))
+ expect(zc
+ .get(ZooUtil.getRoot(iid) + Constants.ZTABLES + "/" + TID + Constants.ZTABLE_CONF + "/foo"))
.andReturn("bar".getBytes(UTF_8));
expect(zc.get(ZooUtil.getRoot(iid) + Constants.ZTABLES + "/" + TID + Constants.ZTABLE_CONF + "/"
+ "ding")).andReturn("dong".getBytes(UTF_8));
diff --git a/server/manager/src/main/java/org/apache/accumulo/manager/metrics/fate/FateMetricValues.java b/server/manager/src/main/java/org/apache/accumulo/manager/metrics/fate/FateMetricValues.java
index 4ea126f..ee40bcd 100644
--- a/server/manager/src/main/java/org/apache/accumulo/manager/metrics/fate/FateMetricValues.java
+++ b/server/manager/src/main/java/org/apache/accumulo/manager/metrics/fate/FateMetricValues.java
@@ -170,7 +170,7 @@ class FateMetricValues {
@Override
public String toString() {
- return "FateMetricValues{" + "updateTime=" + updateTime + ", currentFateOps=" + currentFateOps
+ return "FateMetricValues{updateTime=" + updateTime + ", currentFateOps=" + currentFateOps
+ ", zkFateChildOpsTotal=" + zkFateChildOpsTotal + ", zkConnectionErrors="
+ zkConnectionErrors + '}';
}
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/logging/AccumuloMonitorAppender.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/logging/AccumuloMonitorAppender.java
index 5c2625c..368e2a6 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/logging/AccumuloMonitorAppender.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/logging/AccumuloMonitorAppender.java
@@ -141,7 +141,7 @@ public class AccumuloMonitorAppender extends AbstractAppender {
@Override
public String toString() {
- return "AccumuloMonitorAppender{" + "name=" + getName() + ", state=" + getState() + '}';
+ return "AccumuloMonitorAppender{name=" + getName() + ", state=" + getState() + '}';
}
}
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java
index 79d153f..190b022 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java
@@ -282,7 +282,7 @@ public class TabletServerResourceManager {
// Still check block cache sizes when using native maps.
if (dCacheSize + iCacheSize + sCacheSize + totalQueueSize > runtime.maxMemory()) {
throw new IllegalArgumentException(String.format(
- "Block cache sizes %,d" + " and mutation queue size %,d is too large for this JVM"
+ "Block cache sizes %,d and mutation queue size %,d is too large for this JVM"
+ " configuration %,d",
dCacheSize + iCacheSize + sCacheSize, totalQueueSize, runtime.maxMemory()));
}
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 049530c..4dc0a2f 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/Shell.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/Shell.java
@@ -626,10 +626,10 @@ public class Shell extends ShellOptions implements KeywordExecutable {
public void printInfo() throws IOException {
ClientInfo info = ClientInfo.from(accumuloClient.properties());
- writer.print("\n" + SHELL_DESCRIPTION + "\n" + "- \n" + "- version: " + Constants.VERSION + "\n"
- + "- instance name: " + info.getInstanceName() + "\n" + "- instance id: "
- + accumuloClient.instanceOperations().getInstanceId() + "\n" + "- \n"
- + "- type 'help' for a list of available commands\n" + "- \n");
+ writer.print("\n" + SHELL_DESCRIPTION + "\n- \n- version: " + Constants.VERSION + "\n"
+ + "- instance name: " + info.getInstanceName() + "\n- instance id: "
+ + accumuloClient.instanceOperations().getInstanceId() + "\n- \n"
+ + "- type 'help' for a list of available commands\n- \n");
writer.flush();
}
diff --git a/shell/src/main/java/org/apache/accumulo/shell/ShellOptionsJC.java b/shell/src/main/java/org/apache/accumulo/shell/ShellOptionsJC.java
index 2665f43..09504ec 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/ShellOptionsJC.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/ShellOptionsJC.java
@@ -127,7 +127,7 @@ public class ShellOptionsJC {
if (ClientProperty.SASL_ENABLED.getBoolean(getClientProperties())) {
if (!UserGroupInformation.isSecurityEnabled()) {
throw new IllegalArgumentException(
- "Kerberos security is not" + " enabled. Run with --sasl or set 'sasl.enabled' in"
+ "Kerberos security is not enabled. Run with --sasl or set 'sasl.enabled' in"
+ " accumulo-client.properties");
}
UserGroupInformation ugi = UserGroupInformation.getCurrentUser();
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 5315399..0ae475b 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
@@ -56,7 +56,7 @@ public class CompactCommand extends TableOperation {
+ " specified, then all files will be compacted. Options that configure"
+ " output settings are only applied to this compaction and not later"
+ " compactions. If multiple concurrent user initiated compactions specify"
- + " iterators or a compaction strategy, then all but one will fail to" + " start.";
+ + " iterators or a compaction strategy, then all but one will fail to start.";
}
@Override
diff --git a/shell/src/main/java/org/apache/accumulo/shell/commands/ConfigCommand.java b/shell/src/main/java/org/apache/accumulo/shell/commands/ConfigCommand.java
index eb01e0f..1480a1f 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/commands/ConfigCommand.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/commands/ConfigCommand.java
@@ -287,7 +287,7 @@ public class ConfigCommand extends Command {
s2 += " " + Shell.repeat(".", COL2 - s2.length() - 1);
}
output.add(String.format("%-" + COL1 + "s | %-" + COL2 + "s | %s", s1, s2, s3.replace("\n",
- "\n" + Shell.repeat(" ", COL1 + 1) + "|" + Shell.repeat(" ", COL2 + 2) + "|" + " ")));
+ "\n" + Shell.repeat(" ", COL1 + 1) + "|" + Shell.repeat(" ", COL2 + 2) + "| ")));
}
private void printConfFooter(List<String> output) {
diff --git a/shell/src/main/java/org/apache/accumulo/shell/commands/CreateTableCommand.java b/shell/src/main/java/org/apache/accumulo/shell/commands/CreateTableCommand.java
index caa41a9..b6d2ae1 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/commands/CreateTableCommand.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/commands/CreateTableCommand.java
@@ -316,7 +316,7 @@ public class CreateTableCommand extends Command {
createTableOptLocalityProps.setArgs(Option.UNLIMITED_VALUES);
createTableOptIteratorProps = new Option("i", "iter", true,
- "initialize" + " iterator at table creation using profile. If no scope supplied, all"
+ "initialize iterator at table creation using profile. If no scope supplied, all"
+ " scopes are activated.");
createTableOptIteratorProps.setArgName("profile[:[all]|[scan[,]][minc[,]][majc]]");
createTableOptIteratorProps.setArgs(Option.UNLIMITED_VALUES);
diff --git a/shell/src/main/java/org/apache/accumulo/shell/commands/DeleteCommand.java b/shell/src/main/java/org/apache/accumulo/shell/commands/DeleteCommand.java
index fc2f375..54f002b 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/commands/DeleteCommand.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/commands/DeleteCommand.java
@@ -104,7 +104,7 @@ public class DeleteCommand extends Command {
timeoutOption = new Option(null, "timeout", true,
"time before insert should fail if no data is written. If no unit is"
- + " given assumes seconds. Units d,h,m,s,and ms are supported. e.g. 30s" + " or 100ms");
+ + " given assumes seconds. Units d,h,m,s,and ms are supported. e.g. 30s or 100ms");
timeoutOption.setArgName("timeout");
o.addOption(timeoutOption);
diff --git a/shell/src/main/java/org/apache/accumulo/shell/commands/GrepCommand.java b/shell/src/main/java/org/apache/accumulo/shell/commands/GrepCommand.java
index 769801f..0a19724 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/commands/GrepCommand.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/commands/GrepCommand.java
@@ -110,7 +110,7 @@ public class GrepCommand extends ScanCommand {
@Override
public String description() {
return "searches each row, column family, column qualifier and value in a"
- + " table for a substring (not a regular expression), in parallel, on the" + " server side";
+ + " table for a substring (not a regular expression), in parallel, on the server side";
}
@Override
diff --git a/shell/src/main/java/org/apache/accumulo/shell/commands/InsertCommand.java b/shell/src/main/java/org/apache/accumulo/shell/commands/InsertCommand.java
index 283387f..33f7e87 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/commands/InsertCommand.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/commands/InsertCommand.java
@@ -163,7 +163,7 @@ public class InsertCommand extends Command {
timeoutOption = new Option(null, "timeout", true,
"time before insert should fail if no data is written. If no unit is"
- + " given assumes seconds. Units d,h,m,s,and ms are supported. e.g. 30s" + " or 100ms");
+ + " given assumes seconds. Units d,h,m,s,and ms are supported. e.g. 30s or 100ms");
timeoutOption.setArgName("timeout");
o.addOption(timeoutOption);
diff --git a/shell/src/main/java/org/apache/accumulo/shell/commands/ListScansCommand.java b/shell/src/main/java/org/apache/accumulo/shell/commands/ListScansCommand.java
index c044cd1..0014304 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/commands/ListScansCommand.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/commands/ListScansCommand.java
@@ -35,7 +35,7 @@ public class ListScansCommand extends Command {
@Override
public String description() {
return "lists what scans are currently running in accumulo. See the"
- + " accumulo.core.client.admin.ActiveScan javadoc for more information" + " about columns.";
+ + " accumulo.core.client.admin.ActiveScan javadoc for more information about columns.";
}
@Override
diff --git a/shell/src/main/java/org/apache/accumulo/shell/commands/ScanCommand.java b/shell/src/main/java/org/apache/accumulo/shell/commands/ScanCommand.java
index d1c0b8d..b3ce4f6 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/commands/ScanCommand.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/commands/ScanCommand.java
@@ -385,7 +385,7 @@ public class ScanCommand extends Command {
optEndRowExclusive.setArgName("end-exclusive");
scanOptRow = new Option("r", "row", true, "row to scan");
scanOptColumns = new Option("c", "columns", true,
- "comma-separated columns.This" + " option is mutually exclusive with cf and cq");
+ "comma-separated columns. This option is mutually exclusive with cf and cq");
scanOptCf = new Option("cf", "column-family", true, "column family to scan.");
scanOptCq = new Option("cq", "column-qualifier", true, "column qualifier to scan");
@@ -400,7 +400,7 @@ public class ScanCommand extends Command {
"fully qualified name of a class that is a formatter and interpreter");
timeoutOption = new Option(null, "timeout", true,
"time before scan should fail if no data is returned. If no unit is"
- + " given assumes seconds. Units d,h,m,s,and ms are supported. e.g. 30s" + " or 100ms");
+ + " given assumes seconds. Units d,h,m,s,and ms are supported. e.g. 30s or 100ms");
outputFileOpt = new Option("o", "output", true, "local file to write the scan output to");
sampleOpt = new Option(null, "sample", false, "Show sample");
contextOpt = new Option("cc", "context", true, "name of the classloader context");
diff --git a/shell/src/main/java/org/apache/accumulo/shell/commands/SetIterCommand.java b/shell/src/main/java/org/apache/accumulo/shell/commands/SetIterCommand.java
index c07512d..12cff9f 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/commands/SetIterCommand.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/commands/SetIterCommand.java
@@ -305,7 +305,7 @@ public class SetIterCommand extends Command {
} else {
writer.flush();
writer.println("The iterator class does not implement OptionDescriber."
- + " Consider this for better iterator configuration using this setiter" + " command.");
+ + " Consider this for better iterator configuration using this setiter command.");
iteratorName = reader.readLine("Name for iterator (enter to skip): ");
if (iteratorName == null) {
writer.println();
diff --git a/shell/src/main/java/org/apache/accumulo/shell/commands/SummariesCommand.java b/shell/src/main/java/org/apache/accumulo/shell/commands/SummariesCommand.java
index 3d225e2..2f5da94 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/commands/SummariesCommand.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/commands/SummariesCommand.java
@@ -109,7 +109,7 @@ public class SummariesCommand extends TableOperation {
final Options opts = super.getOptions();
disablePaginationOpt = new Option("np", "no-pagination", false, "disable pagination of output");
summarySelectionOpt = new Option("sr", "select-regex", true,
- "regex to" + " select summaries. Matches against class name and options used to"
+ "regex to select summaries. Matches against class name and options used to"
+ " generate summaries.");
opts.addOption(disablePaginationOpt);
opts.addOption(summarySelectionOpt);
diff --git a/test/src/main/java/org/apache/accumulo/test/AuditMessageIT.java b/test/src/main/java/org/apache/accumulo/test/AuditMessageIT.java
index b46c0d8..2005ecf 100644
--- a/test/src/main/java/org/apache/accumulo/test/AuditMessageIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/AuditMessageIT.java
@@ -503,7 +503,7 @@ public class AuditMessageIT extends ConfigurableMacBase {
+ String.format(AuditedSecurityOperation.CAN_ONLINE_OFFLINE_TABLE_AUDIT_TEMPLATE,
"offlineTable", OLD_TEST_TABLE_NAME)));
assertEquals(1, findAuditMessage(auditMessages,
- "operation: denied;.*" + "action: scan; targetTable: " + OLD_TEST_TABLE_NAME));
+ "operation: denied;.*action: scan; targetTable: " + OLD_TEST_TABLE_NAME));
assertEquals(1,
findAuditMessage(auditMessages,
"operation: denied;.*"
diff --git a/test/src/main/java/org/apache/accumulo/test/shell/ShellServerIT.java b/test/src/main/java/org/apache/accumulo/test/shell/ShellServerIT.java
index 65412dc..d3cb460 100644
--- a/test/src/main/java/org/apache/accumulo/test/shell/ShellServerIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/shell/ShellServerIT.java
@@ -1191,9 +1191,9 @@ public class ShellServerIT extends SharedMiniClusterBase {
public void help() throws Exception {
ts.exec("help -np", true, "Help Commands", true);
ts.exec("?", true, "Help Commands", true);
- for (String c : ("bye exit quit " + "about help info ? "
+ for (String c : ("bye exit quit about help info ? "
+ "deleteiter deletescaniter listiter setiter setscaniter "
- + "grant revoke systempermissions tablepermissions userpermissions " + "execfile history "
+ + "grant revoke systempermissions tablepermissions userpermissions execfile history "
+ "authenticate cls clear notable sleep table user whoami "
+ "clonetable config createtable deletetable droptable du exporttable "
+ "importtable offline online renametable tables "
@@ -1872,11 +1872,11 @@ public class ShellServerIT extends SharedMiniClusterBase {
private static final String REAL_CONTEXT_CLASSPATH = "file://" + System.getProperty("user.dir")
+ "/target/" + ShellServerIT.class.getSimpleName() + "-real-iterators.jar";
private static final String VALUE_REVERSING_ITERATOR =
- "org.apache.accumulo.test." + "functional.ValueReversingIterator";
+ "org.apache.accumulo.test.functional.ValueReversingIterator";
private static final String SUMMING_COMBINER_ITERATOR =
- "org.apache.accumulo.core." + "iterators.user.SummingCombiner";
+ "org.apache.accumulo.core.iterators.user.SummingCombiner";
private static final String COLUMN_FAMILY_COUNTER_ITERATOR =
- "org.apache.accumulo.core.iterators" + ".ColumnFamilyCounter";
+ "org.apache.accumulo.core.iterators.ColumnFamilyCounter";
private void setupRealContextPath() throws IOException {
// Copy the test iterators jar to tmp
diff --git a/test/src/main/java/org/apache/accumulo/test/util/CertUtils.java b/test/src/main/java/org/apache/accumulo/test/util/CertUtils.java
index e2b28a5..9236c9b 100644
--- a/test/src/main/java/org/apache/accumulo/test/util/CertUtils.java
+++ b/test/src/main/java/org/apache/accumulo/test/util/CertUtils.java
@@ -113,7 +113,7 @@ public class CertUtils {
String issuerDirString = "o=Apache Accumulo";
@Parameter(names = "--accumulo-props",
- description = "Path to accumulo.properties to load " + "Accumulo configuration from")
+ description = "Path to accumulo.properties to load Accumulo configuration from")
public String accumuloPropsFile = null;
@Parameter(names = "--signing-algorithm", description = "Algorithm used to sign certificates")