You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by mw...@apache.org on 2019/02/27 21:15:27 UTC
[accumulo] branch master updated: Remove c-style array declarations
(#996)
This is an automated email from the ASF dual-hosted git repository.
mwalch pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/master by this push:
new 87297be Remove c-style array declarations (#996)
87297be is described below
commit 87297bec465081cf0dc081e1f0ab54e6722c9aae
Author: Mike Walch <mw...@apache.org>
AuthorDate: Wed Feb 27 16:15:22 2019 -0500
Remove c-style array declarations (#996)
* While valid, c-style arrays make the code harder read
* Code was converted by IDE (not by hand)
---
.../core/client/lexicoder/ReverseLexicoder.java | 2 +-
.../core/client/lexicoder/UIntegerLexicoder.java | 2 +-
.../core/client/lexicoder/ULongLexicoder.java | 2 +-
.../core/client/lexicoder/UUIDLexicoder.java | 2 +-
.../mapreduce/lib/partition/RangePartitioner.java | 2 +-
.../core/clientImpl/NamespaceOperationsHelper.java | 4 +-
.../core/clientImpl/TableOperationsHelper.java | 4 +-
.../core/clientImpl/TableOperationsImpl.java | 2 +-
.../accumulo/core/clientImpl/bulk/BulkImport.java | 2 +-
.../core/clientImpl/lexicoder/ByteUtils.java | 6 +-
.../lexicoder/FixedByteArrayOutputStream.java | 6 +-
.../apache/accumulo/core/conf/IterConfigUtil.java | 4 +-
.../core/crypto/streams/BlockedInputStream.java | 2 +-
.../core/crypto/streams/BlockedOutputStream.java | 4 +-
.../crypto/streams/RFileCipherOutputStream.java | 4 +-
.../accumulo/core/data/ArrayByteSequence.java | 6 +-
.../org/apache/accumulo/core/data/Condition.java | 2 +-
.../java/org/apache/accumulo/core/data/Key.java | 26 +++---
.../org/apache/accumulo/core/data/KeyBuilder.java | 2 +-
.../org/apache/accumulo/core/data/Mutation.java | 16 ++--
.../core/file/blockfile/cache/lru/CachedBlock.java | 2 +-
.../file/blockfile/cache/lru/LruBlockCache.java | 4 +-
.../file/blockfile/impl/CachableBlockFile.java | 4 +-
.../impl/SeekableByteArrayInputStream.java | 4 +-
.../core/file/keyfunctor/ColumnFamilyFunctor.java | 2 +-
.../file/keyfunctor/ColumnQualifierFunctor.java | 2 +-
.../accumulo/core/file/keyfunctor/RowFunctor.java | 2 +-
.../accumulo/core/file/rfile/MultiLevelIndex.java | 4 +-
.../apache/accumulo/core/file/rfile/PrintInfo.java | 4 +-
.../org/apache/accumulo/core/file/rfile/RFile.java | 10 +-
.../accumulo/core/file/rfile/RollingStats.java | 2 +-
.../core/file/rfile/bcfile/Compression.java | 2 +-
.../rfile/bcfile/SimpleBufferedOutputStream.java | 4 +-
.../accumulo/core/iterators/conf/ColumnSet.java | 2 +-
.../iterators/system/LocalityGroupIterator.java | 2 +-
.../accumulo/core/iterators/user/GrepIterator.java | 4 +-
.../accumulo/core/iterators/user/RegExFilter.java | 2 +-
.../accumulo/core/security/ColumnVisibility.java | 2 +-
.../core/security/NamespacePermission.java | 2 +-
.../accumulo/core/security/TablePermission.java | 2 +-
.../apache/accumulo/core/spi/cache/BlockCache.java | 2 +-
.../accumulo/core/tabletserver/log/LogEntry.java | 4 +-
.../org/apache/accumulo/core/util/FastFormat.java | 10 +-
.../accumulo/core/util/LocalityGroupUtil.java | 2 +-
.../org/apache/accumulo/core/util/NumUtil.java | 4 +-
.../accumulo/core/util/UnsynchronizedBuffer.java | 10 +-
.../core/util/format/DefaultFormatter.java | 6 +-
.../accumulo/core/util/format/HexFormatter.java | 2 +-
.../accumulo/core/volume/VolumeConfiguration.java | 8 +-
.../java/org/apache/accumulo/fate/AdminUtil.java | 2 +-
.../java/org/apache/accumulo/fate/ZooStore.java | 2 +-
.../fate/zookeeper/DistributedReadWriteLock.java | 2 +-
.../apache/accumulo/fate/zookeeper/ZooLock.java | 4 +-
.../apache/accumulo/fate/zookeeper/ZooUtil.java | 2 +-
.../accumulo/core/client/RowIteratorTest.java | 2 +-
.../core/clientImpl/TableOperationsHelperTest.java | 2 +-
.../core/clientImpl/TabletLocatorImplTest.java | 2 +-
.../org/apache/accumulo/core/data/ColumnTest.java | 2 +-
.../apache/accumulo/core/data/KeyBuilderTest.java | 2 +-
.../org/apache/accumulo/core/data/KeyTest.java | 8 +-
.../apache/accumulo/core/data/MutationTest.java | 2 +-
.../org/apache/accumulo/core/data/OldMutation.java | 18 ++--
.../file/blockfile/cache/TestLruBlockCache.java | 2 +-
.../accumulo/core/file/rfile/RFileMetricsTest.java | 2 +-
.../apache/accumulo/core/file/rfile/RFileTest.java | 6 +-
.../iterators/user/IndexedDocIteratorTest.java | 2 +-
.../iterators/user/IntersectingIteratorTest.java | 2 +-
.../accumulo/core/util/LocalityGroupUtilTest.java | 4 +-
.../org/apache/accumulo/core/util/MergeTest.java | 2 +-
.../mapreduce/partition/RangePartitioner.java | 2 +-
.../miniclusterImpl/MiniAccumuloClusterImpl.java | 2 +-
.../apache/accumulo/server/ServerConstants.java | 2 +-
.../accumulo/server/log/WalStateManager.java | 4 +-
.../master/state/TabletStateChangeIterator.java | 2 +-
.../accumulo/server/problems/ProblemReport.java | 6 +-
.../accumulo/server/problems/ProblemReports.java | 2 +-
.../server/replication/StatusFormatter.java | 2 +-
.../apache/accumulo/server/util/ChangeSecret.java | 2 +-
.../accumulo/server/util/FileSystemMonitor.java | 2 +-
.../accumulo/server/util/TableDiskUsage.java | 2 +-
.../server/master/balancer/GroupBalancerTest.java | 24 ++---
.../apache/accumulo/gc/SimpleGarbageCollector.java | 4 +-
.../java/org/apache/accumulo/master/Master.java | 18 ++--
.../master/MasterClientServiceHandler.java | 2 +-
.../accumulo/master/recovery/RecoveryManager.java | 2 +-
.../apache/accumulo/master/state/TableCounts.java | 2 +-
.../master/tableOps/bulkVer1/BulkImport.java | 2 +-
.../master/tableOps/bulkVer2/PrepBulkImport.java | 2 +-
.../tableOps/tableExport/WriteExportFiles.java | 2 +-
.../master/tableOps/tableImport/ImportTable.java | 2 +-
.../tableOps/tableImport/MapImportFileNames.java | 2 +-
.../tableImport/PopulateMetadataTable.java | 2 +-
.../java/org/apache/accumulo/monitor/Monitor.java | 2 +-
.../apache/accumulo/monitor/ZooKeeperStatus.java | 2 +-
.../rest/trace/RecentTracesInformation.java | 2 +-
.../org/apache/accumulo/tracer/TraceServer.java | 2 +-
.../org/apache/accumulo/tracer/TracerTest.java | 2 +-
.../accumulo/tserver/BulkFailedCopyProcessor.java | 2 +-
.../org/apache/accumulo/tserver/InMemoryMap.java | 4 +-
.../org/apache/accumulo/tserver/NativeMap.java | 30 +++---
.../org/apache/accumulo/tserver/log/DfsLogger.java | 2 +-
.../apache/accumulo/tserver/logger/LogReader.java | 2 +-
.../apache/accumulo/tserver/InMemoryMapTest.java | 2 +-
.../tserver/log/SortedLogRecoveryTest.java | 102 ++++++++++-----------
.../main/java/org/apache/accumulo/shell/Shell.java | 4 +-
.../accumulo/shell/commands/ConfigCommand.java | 2 +-
.../shell/commands/CreateTableCommand.java | 2 +-
.../accumulo/shell/commands/ScanCommand.java | 2 +-
.../accumulo/shell/commands/SetGroupsCommand.java | 2 +-
.../main/java/org/apache/accumulo/start/Main.java | 2 +-
.../accumulo/test/BalanceWithOfflineTableIT.java | 2 +-
.../apache/accumulo/test/ConditionalWriterIT.java | 2 +-
.../org/apache/accumulo/test/LargeSplitRowIT.java | 8 +-
.../accumulo/test/NewTableConfigurationIT.java | 2 +-
.../test/RecoveryCompactionsAreFlushesIT.java | 2 +-
.../accumulo/test/RewriteTabletDirectoriesIT.java | 2 +-
.../org/apache/accumulo/test/ShellServerIT.java | 2 +-
.../org/apache/accumulo/test/SplitRecoveryIT.java | 2 +-
.../org/apache/accumulo/test/TestBinaryRows.java | 2 +-
.../java/org/apache/accumulo/test/TestIngest.java | 12 +--
.../org/apache/accumulo/test/TotalQueuedIT.java | 2 +-
.../accumulo/test/UserCompactionStrategyIT.java | 2 +-
.../org/apache/accumulo/test/VerifyIngest.java | 6 +-
.../java/org/apache/accumulo/test/VolumeIT.java | 2 +-
.../test/constraints/AlphaNumKeyConstraint.java | 2 +-
.../test/constraints/NumericValueConstraint.java | 2 +-
.../accumulo/test/functional/BackupMasterIT.java | 2 +-
.../accumulo/test/functional/BulkFailureIT.java | 2 +-
.../accumulo/test/functional/BulkLoadIT.java | 4 +-
.../accumulo/test/functional/CacheTestWriter.java | 4 +-
.../test/functional/DeleteRowsSplitIT.java | 2 +-
.../accumulo/test/functional/DurabilityIT.java | 10 +-
.../test/functional/HalfDeadTServerIT.java | 2 +-
.../accumulo/test/functional/LargeRowIT.java | 6 +-
.../apache/accumulo/test/functional/MaxOpenIT.java | 2 +-
.../accumulo/test/functional/MetadataIT.java | 2 +-
.../accumulo/test/functional/NativeMapIT.java | 20 ++--
.../apache/accumulo/test/master/MergeStateIT.java | 2 +-
.../test/performance/ContinuousIngest.java | 10 +-
.../test/performance/scan/CollectTabletStats.java | 4 +-
.../accumulo/test/proxy/SimpleProxyBase.java | 10 +-
141 files changed, 337 insertions(+), 337 deletions(-)
diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/ReverseLexicoder.java b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/ReverseLexicoder.java
index c65ed80..ebe578c 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/ReverseLexicoder.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/ReverseLexicoder.java
@@ -56,7 +56,7 @@ public class ReverseLexicoder<T> extends AbstractLexicoder<T> {
@Override
protected T decodeUnchecked(byte[] data, int offset, int len) {
- byte ret[] = new byte[len - 1];
+ byte[] ret = new byte[len - 1];
int dataIndex;
for (int i = 0; i < ret.length; i++) {
diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/UIntegerLexicoder.java b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/UIntegerLexicoder.java
index f22f705..940e1dd 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/UIntegerLexicoder.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/UIntegerLexicoder.java
@@ -40,7 +40,7 @@ public class UIntegerLexicoder extends AbstractLexicoder<Integer> {
shift -= 8;
}
- byte ret[] = new byte[5 - index];
+ byte[] ret = new byte[5 - index];
ret[0] = (byte) (4 - index);
for (index = 1; index < ret.length; index++) {
ret[index] = (byte) (i >>> shift);
diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/ULongLexicoder.java b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/ULongLexicoder.java
index 3b18561..c852c6c 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/ULongLexicoder.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/ULongLexicoder.java
@@ -40,7 +40,7 @@ public class ULongLexicoder extends AbstractLexicoder<Long> {
shift -= 8;
}
- byte ret[] = new byte[9 - index];
+ byte[] ret = new byte[9 - index];
ret[0] = (byte) (8 - index);
for (index = 1; index < ret.length; index++) {
ret[index] = (byte) (l >>> shift);
diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/UUIDLexicoder.java b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/UUIDLexicoder.java
index c581afc..d57b346 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/UUIDLexicoder.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/UUIDLexicoder.java
@@ -42,7 +42,7 @@ public class UUIDLexicoder extends AbstractLexicoder<UUID> {
@Override
public byte[] encode(UUID uuid) {
try {
- byte ret[] = new byte[16];
+ byte[] ret = new byte[16];
DataOutputStream out = new DataOutputStream(new FixedByteArrayOutputStream(ret));
out.writeLong(uuid.getMostSignificantBits() ^ 0x8000000000000000L);
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/partition/RangePartitioner.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/partition/RangePartitioner.java
index 365108e..9f890fe 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/partition/RangePartitioner.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/partition/RangePartitioner.java
@@ -84,7 +84,7 @@ public class RangePartitioner extends Partitioner<Text,Writable> implements Conf
return _numSubBins;
}
- private Text cutPointArray[] = null;
+ private Text[] cutPointArray = null;
@SuppressFBWarnings(value = "PATH_TRAVERSAL_IN",
justification = "path provided by distributed cache framework, not user input")
diff --git a/core/src/main/java/org/apache/accumulo/core/clientImpl/NamespaceOperationsHelper.java b/core/src/main/java/org/apache/accumulo/core/clientImpl/NamespaceOperationsHelper.java
index 9ee008f..80ec3e9 100644
--- a/core/src/main/java/org/apache/accumulo/core/clientImpl/NamespaceOperationsHelper.java
+++ b/core/src/main/java/org/apache/accumulo/core/clientImpl/NamespaceOperationsHelper.java
@@ -97,7 +97,7 @@ public abstract class NamespaceOperationsHelper implements NamespaceOperations {
String opt = root + ".opt.";
for (Entry<String,String> property : this.getProperties(namespace)) {
if (property.getKey().equals(root)) {
- String parts[] = property.getValue().split(",");
+ String[] parts = property.getValue().split(",");
if (parts.length != 2) {
throw new AccumuloException("Bad value for iterator setting: " + property.getValue());
}
@@ -155,7 +155,7 @@ public abstract class NamespaceOperationsHelper implements NamespaceOperations {
optionConflicts.put(property.getKey(), property.getValue());
if (property.getKey().contains(".opt."))
continue;
- String parts[] = property.getValue().split(",");
+ String[] parts = property.getValue().split(",");
if (parts.length != 2)
throw new AccumuloException("Bad value for existing iterator setting: "
+ property.getKey() + "=" + property.getValue());
diff --git a/core/src/main/java/org/apache/accumulo/core/clientImpl/TableOperationsHelper.java b/core/src/main/java/org/apache/accumulo/core/clientImpl/TableOperationsHelper.java
index f5f1446..35bb85b 100644
--- a/core/src/main/java/org/apache/accumulo/core/clientImpl/TableOperationsHelper.java
+++ b/core/src/main/java/org/apache/accumulo/core/clientImpl/TableOperationsHelper.java
@@ -91,7 +91,7 @@ public abstract class TableOperationsHelper implements TableOperations {
String opt = root + ".opt.";
for (Entry<String,String> property : this.getProperties(tableName)) {
if (property.getKey().equals(root)) {
- String parts[] = property.getValue().split(",");
+ String[] parts = property.getValue().split(",");
if (parts.length != 2) {
throw new AccumuloException("Bad value for iterator setting: " + property.getValue());
}
@@ -145,7 +145,7 @@ public abstract class TableOperationsHelper implements TableOperations {
optionConflicts.put(property.getKey(), property.getValue());
if (property.getKey().contains(".opt."))
continue;
- String parts[] = property.getValue().split(",");
+ String[] parts = property.getValue().split(",");
if (parts.length != 2)
throw new AccumuloException("Bad value for existing iterator setting: "
+ property.getKey() + "=" + property.getValue());
diff --git a/core/src/main/java/org/apache/accumulo/core/clientImpl/TableOperationsImpl.java b/core/src/main/java/org/apache/accumulo/core/clientImpl/TableOperationsImpl.java
index bf59cc6..b607dbb 100644
--- a/core/src/main/java/org/apache/accumulo/core/clientImpl/TableOperationsImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/clientImpl/TableOperationsImpl.java
@@ -1455,7 +1455,7 @@ public class TableOperationsImpl extends TableOperationsHelper {
try (BufferedReader in = new BufferedReader(new InputStreamReader(zis, UTF_8))) {
String line;
while ((line = in.readLine()) != null) {
- String sa[] = line.split("=", 2);
+ String[] sa = line.split("=", 2);
props.put(sa[0], sa[1]);
}
}
diff --git a/core/src/main/java/org/apache/accumulo/core/clientImpl/bulk/BulkImport.java b/core/src/main/java/org/apache/accumulo/core/clientImpl/bulk/BulkImport.java
index 1333878..5b2fa69 100644
--- a/core/src/main/java/org/apache/accumulo/core/clientImpl/bulk/BulkImport.java
+++ b/core/src/main/java/org/apache/accumulo/core/clientImpl/bulk/BulkImport.java
@@ -466,7 +466,7 @@ public class BulkImport implements ImportDestinationArguments, ImportMappingOpti
continue;
}
- String sa[] = fname.split("\\.");
+ String[] sa = fname.split("\\.");
String extension = "";
if (sa.length > 1) {
extension = sa[sa.length - 1];
diff --git a/core/src/main/java/org/apache/accumulo/core/clientImpl/lexicoder/ByteUtils.java b/core/src/main/java/org/apache/accumulo/core/clientImpl/lexicoder/ByteUtils.java
index b79656b..4d1622a 100644
--- a/core/src/main/java/org/apache/accumulo/core/clientImpl/lexicoder/ByteUtils.java
+++ b/core/src/main/java/org/apache/accumulo/core/clientImpl/lexicoder/ByteUtils.java
@@ -34,7 +34,7 @@ public class ByteUtils {
if (escapeCount == 0)
return in;
- byte ret[] = new byte[escapeCount + in.length];
+ byte[] ret = new byte[escapeCount + in.length];
int index = 0;
for (int i = 0; i < in.length; i++) {
@@ -70,7 +70,7 @@ public class ByteUtils {
if (escapeCount == 0)
return in;
- byte ret[] = new byte[in.length - escapeCount];
+ byte[] ret = new byte[in.length - escapeCount];
int index = 0;
for (int i = 0; i < in.length; i++) {
@@ -128,7 +128,7 @@ public class ByteUtils {
len += field.length;
}
- byte ret[] = new byte[len + fields.length - 1];
+ byte[] ret = new byte[len + fields.length - 1];
int index = 0;
for (byte[] field : fields) {
diff --git a/core/src/main/java/org/apache/accumulo/core/clientImpl/lexicoder/FixedByteArrayOutputStream.java b/core/src/main/java/org/apache/accumulo/core/clientImpl/lexicoder/FixedByteArrayOutputStream.java
index 63b509c..f5e4c92 100644
--- a/core/src/main/java/org/apache/accumulo/core/clientImpl/lexicoder/FixedByteArrayOutputStream.java
+++ b/core/src/main/java/org/apache/accumulo/core/clientImpl/lexicoder/FixedByteArrayOutputStream.java
@@ -25,9 +25,9 @@ import java.io.OutputStream;
public class FixedByteArrayOutputStream extends OutputStream {
private int i;
- byte out[];
+ byte[] out;
- public FixedByteArrayOutputStream(byte out[]) {
+ public FixedByteArrayOutputStream(byte[] out) {
this.out = out;
}
@@ -37,7 +37,7 @@ public class FixedByteArrayOutputStream extends OutputStream {
}
@Override
- public void write(byte b[], int off, int len) {
+ public void write(byte[] b, int off, int len) {
System.arraycopy(b, off, out, i, len);
i += len;
}
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/IterConfigUtil.java b/core/src/main/java/org/apache/accumulo/core/conf/IterConfigUtil.java
index a5fe350..ab5b4cb 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/IterConfigUtil.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/IterConfigUtil.java
@@ -103,10 +103,10 @@ public class IterConfigUtil {
for (Entry<String,String> entry : properties.entrySet()) {
String suffix = entry.getKey().substring(scopePropertyKey.length());
- String suffixSplit[] = suffix.split("\\.", 3);
+ String[] suffixSplit = suffix.split("\\.", 3);
if (suffixSplit.length == 1) {
- String sa[] = entry.getValue().split(",");
+ String[] sa = entry.getValue().split(",");
int prio = Integer.parseInt(sa[0]);
String className = sa[1];
iterators.add(new IterInfo(prio, className, suffixSplit[0]));
diff --git a/core/src/main/java/org/apache/accumulo/core/crypto/streams/BlockedInputStream.java b/core/src/main/java/org/apache/accumulo/core/crypto/streams/BlockedInputStream.java
index 6a0f3a5..3924d5e 100644
--- a/core/src/main/java/org/apache/accumulo/core/crypto/streams/BlockedInputStream.java
+++ b/core/src/main/java/org/apache/accumulo/core/crypto/streams/BlockedInputStream.java
@@ -68,7 +68,7 @@ public class BlockedInputStream extends InputStream {
}
@Override
- public int read(byte b[], int off, int len) throws IOException {
+ public int read(byte[] b, int off, int len) throws IOException {
int toCopy = Math.min(len, remaining());
if (toCopy > 0) {
System.arraycopy(array, readPos, b, off, toCopy);
diff --git a/core/src/main/java/org/apache/accumulo/core/crypto/streams/BlockedOutputStream.java b/core/src/main/java/org/apache/accumulo/core/crypto/streams/BlockedOutputStream.java
index 0f931be..e495732 100644
--- a/core/src/main/java/org/apache/accumulo/core/crypto/streams/BlockedOutputStream.java
+++ b/core/src/main/java/org/apache/accumulo/core/crypto/streams/BlockedOutputStream.java
@@ -79,7 +79,7 @@ public class BlockedOutputStream extends OutputStream {
}
@Override
- public void write(byte b[], int off, int len) throws IOException {
+ public void write(byte[] b, int off, int len) throws IOException {
// Can't recurse here in case the len is large and the blocksize is small (and the stack is
// small)
// So we'll just fill up the buffer over and over
@@ -97,7 +97,7 @@ public class BlockedOutputStream extends OutputStream {
}
@Override
- public void write(byte b[]) throws IOException {
+ public void write(byte[] b) throws IOException {
write(b, 0, b.length);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/crypto/streams/RFileCipherOutputStream.java b/core/src/main/java/org/apache/accumulo/core/crypto/streams/RFileCipherOutputStream.java
index cfa81e8..4ad7571 100644
--- a/core/src/main/java/org/apache/accumulo/core/crypto/streams/RFileCipherOutputStream.java
+++ b/core/src/main/java/org/apache/accumulo/core/crypto/streams/RFileCipherOutputStream.java
@@ -58,7 +58,7 @@ public class RFileCipherOutputStream extends CipherOutputStream {
* This method now throws an exception if an attempt to write bytes beyond a maximum is made.
*/
@Override
- public void write(byte b[], int off, int len) throws IOException {
+ public void write(byte[] b, int off, int len) throws IOException {
count += len;
if (count > maxOutputSize) {
throw new IOException("Attempt to write " + count + " bytes was made. A maximum of "
@@ -68,7 +68,7 @@ public class RFileCipherOutputStream extends CipherOutputStream {
}
@Override
- public void write(byte b[]) throws IOException {
+ public void write(byte[] b) throws IOException {
write(b, 0, b.length);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/data/ArrayByteSequence.java b/core/src/main/java/org/apache/accumulo/core/data/ArrayByteSequence.java
index a19a0ba..71f7464 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/ArrayByteSequence.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/ArrayByteSequence.java
@@ -31,7 +31,7 @@ public class ArrayByteSequence extends ByteSequence implements Serializable {
private static final long serialVersionUID = 1L;
- protected byte data[];
+ protected byte[] data;
protected int offset;
protected int length;
@@ -42,7 +42,7 @@ public class ArrayByteSequence extends ByteSequence implements Serializable {
* @param data
* byte data
*/
- public ArrayByteSequence(byte data[]) {
+ public ArrayByteSequence(byte[] data) {
this.data = data;
this.offset = 0;
this.length = data.length;
@@ -62,7 +62,7 @@ public class ArrayByteSequence extends ByteSequence implements Serializable {
* @throws IllegalArgumentException
* if the offset or length are out of bounds for the given byte array
*/
- public ArrayByteSequence(byte data[], int offset, int length) {
+ public ArrayByteSequence(byte[] data, int offset, int length) {
if (offset < 0 || offset > data.length || length < 0 || (offset + length) > data.length) {
throw new IllegalArgumentException(" Bad offset and/or length data.length = " + data.length
diff --git a/core/src/main/java/org/apache/accumulo/core/data/Condition.java b/core/src/main/java/org/apache/accumulo/core/data/Condition.java
index 71708df..3bad041 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/Condition.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/Condition.java
@@ -38,7 +38,7 @@ public class Condition {
private ByteSequence cv;
private ByteSequence val;
private Long ts;
- private IteratorSetting iterators[] = new IteratorSetting[0];
+ private IteratorSetting[] iterators = new IteratorSetting[0];
private static final ByteSequence EMPTY = new ArrayByteSequence(new byte[0]);
/**
diff --git a/core/src/main/java/org/apache/accumulo/core/data/Key.java b/core/src/main/java/org/apache/accumulo/core/data/Key.java
index aab3dd8..3859bfb 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/Key.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/Key.java
@@ -80,9 +80,9 @@ public class Key implements WritableComparable<Key>, Cloneable {
return false;
}
- private static final byte EMPTY_BYTES[] = new byte[0];
+ private static final byte[] EMPTY_BYTES = new byte[0];
- static byte[] copyIfNeeded(byte ba[], int off, int len, boolean copyData) {
+ static byte[] copyIfNeeded(byte[] ba, int off, int len, boolean copyData) {
if (len == 0)
return EMPTY_BYTES;
@@ -94,8 +94,8 @@ public class Key implements WritableComparable<Key>, Cloneable {
return copy;
}
- private final void init(byte r[], int rOff, int rLen, byte cf[], int cfOff, int cfLen, byte cq[],
- int cqOff, int cqLen, byte cv[], int cvOff, int cvLen, long ts, boolean del, boolean copy) {
+ private final void init(byte[] r, int rOff, int rLen, byte[] cf, int cfOff, int cfLen, byte[] cq,
+ int cqOff, int cqLen, byte[] cv, int cvOff, int cvLen, long ts, boolean del, boolean copy) {
row = copyIfNeeded(r, rOff, rLen, copy);
colFamily = copyIfNeeded(cf, cfOff, cfLen, copy);
colQualifier = copyIfNeeded(cq, cqOff, cqLen, copy);
@@ -215,8 +215,8 @@ public class Key implements WritableComparable<Key>, Cloneable {
* timestamp
* @see #builder()
*/
- public Key(byte row[], int rOff, int rLen, byte cf[], int cfOff, int cfLen, byte cq[], int cqOff,
- int cqLen, byte cv[], int cvOff, int cvLen, long ts) {
+ public Key(byte[] row, int rOff, int rLen, byte[] cf, int cfOff, int cfLen, byte[] cq, int cqOff,
+ int cqLen, byte[] cv, int cvOff, int cvLen, long ts) {
init(row, rOff, rLen, cf, cfOff, cfLen, cq, cqOff, cqLen, cv, cvOff, cvLen, ts, false, true);
}
@@ -258,8 +258,8 @@ public class Key implements WritableComparable<Key>, Cloneable {
* if true, forces copy of byte array values into key
* @see #builder()
*/
- Key(byte row[], int rOff, int rLen, byte cf[], int cfOff, int cfLen, byte cq[], int cqOff,
- int cqLen, byte cv[], int cvOff, int cvLen, long ts, boolean deleted, boolean copy) {
+ Key(byte[] row, int rOff, int rLen, byte[] cf, int cfOff, int cfLen, byte[] cq, int cqOff,
+ int cqLen, byte[] cv, int cvOff, int cvLen, long ts, boolean deleted, boolean copy) {
init(row, rOff, rLen, cf, cfOff, cfLen, cq, cqOff, cqLen, cv, cvOff, cvLen, ts, deleted, copy);
}
@@ -550,7 +550,7 @@ public class Key implements WritableComparable<Key>, Cloneable {
new Text(cv.getExpression()), ts);
}
- private byte[] followingArray(byte ba[]) {
+ private byte[] followingArray(byte[] ba) {
byte[] fba = new byte[ba.length + 1];
System.arraycopy(ba, 0, fba, 0, ba.length);
fba[ba.length] = (byte) 0x00;
@@ -1045,7 +1045,7 @@ public class Key implements WritableComparable<Key>, Cloneable {
* @return printable string
* @see #appendPrintableString(byte[], int, int, int, StringBuilder)
*/
- public static String toPrintableString(byte ba[], int offset, int len, int maxLen) {
+ public static String toPrintableString(byte[] ba, int offset, int len, int maxLen) {
return appendPrintableString(ba, offset, len, maxLen, new StringBuilder()).toString();
}
@@ -1067,8 +1067,8 @@ public class Key implements WritableComparable<Key>, Cloneable {
* <code>StringBuilder</code> to append to
* @return given <code>StringBuilder</code>
*/
- public static StringBuilder appendPrintableString(byte ba[], int offset, int len, int maxLen,
- StringBuilder sb) {
+ public static StringBuilder appendPrintableString(byte[] ba, int offset, int len, int maxLen,
+ StringBuilder sb) {
int plen = Math.min(len, maxLen);
for (int i = 0; i < plen; i++) {
@@ -1156,7 +1156,7 @@ public class Key implements WritableComparable<Key>, Cloneable {
return getLength();
}
- private static boolean isEqual(byte a1[], byte a2[]) {
+ private static boolean isEqual(byte[] a1, byte[] a2) {
if (a1 == a2)
return true;
diff --git a/core/src/main/java/org/apache/accumulo/core/data/KeyBuilder.java b/core/src/main/java/org/apache/accumulo/core/data/KeyBuilder.java
index 4a2221b..270b662 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/KeyBuilder.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/KeyBuilder.java
@@ -296,7 +296,7 @@ public class KeyBuilder {
static class KeyBuilderImpl
implements RowStep, ColumnFamilyStep, ColumnQualifierStep, ColumnVisibilityStep {
- protected static final byte EMPTY_BYTES[] = new byte[0];
+ protected static final byte[] EMPTY_BYTES = new byte[0];
private final boolean copyBytes;
private byte[] row = EMPTY_BYTES;
diff --git a/core/src/main/java/org/apache/accumulo/core/data/Mutation.java b/core/src/main/java/org/apache/accumulo/core/data/Mutation.java
index 760bfab..5415802 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/Mutation.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/Mutation.java
@@ -294,11 +294,11 @@ public class Mutation implements Writable {
return row;
}
- private void fill(byte b[]) {
+ private void fill(byte[] b) {
fill(b, b.length);
}
- private void fill(byte b[], int length) {
+ private void fill(byte[] b, int length) {
buffer.writeVLong(length);
buffer.add(b, 0, length);
}
@@ -355,7 +355,7 @@ public class Mutation implements Writable {
if (values == null) {
values = new ArrayList<>();
}
- byte copy[] = new byte[valLength];
+ byte[] copy = new byte[valLength];
System.arraycopy(val, 0, copy, 0, valLength);
values.add(copy);
fill(-1 * values.size());
@@ -1293,7 +1293,7 @@ public class Mutation implements Writable {
if (values == null) {
values = new ArrayList<>();
}
- byte copy[] = new byte[val.length];
+ byte[] copy = new byte[val.length];
System.arraycopy(val, 0, copy, 0, val.length);
values.add(copy);
fill(-1 * values.size());
@@ -1373,7 +1373,7 @@ public class Mutation implements Writable {
if (len == 0)
return EMPTY_BYTES;
- byte bytes[] = new byte[len];
+ byte[] bytes = new byte[len];
in.readBytes(bytes);
return bytes;
}
@@ -1383,7 +1383,7 @@ public class Mutation implements Writable {
if (len == 0)
return EMPTY_BYTES;
- byte bytes[] = new byte[len];
+ byte[] bytes = new byte[len];
in.readBytes(bytes);
return bytes;
}
@@ -1572,7 +1572,7 @@ public class Mutation implements Writable {
int numValues = WritableUtils.readVInt(in);
for (int i = 0; i < numValues; i++) {
len = WritableUtils.readVInt(in);
- byte val[] = new byte[len];
+ byte[] val = new byte[len];
in.readFully(val);
values.add(val);
}
@@ -1612,7 +1612,7 @@ public class Mutation implements Writable {
int numValues = in.readInt();
for (int i = 0; i < numValues; i++) {
len = in.readInt();
- byte val[] = new byte[len];
+ byte[] val = new byte[len];
in.readFully(val);
localValues.add(val);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/lru/CachedBlock.java b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/lru/CachedBlock.java
index 81be8be..08025c0 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/lru/CachedBlock.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/lru/CachedBlock.java
@@ -61,7 +61,7 @@ public class CachedBlock implements HeapSize, Comparable<CachedBlock> {
private BlockPriority priority;
private Weighable index;
- public CachedBlock(String blockName, byte buf[], long accessTime, boolean inMemory) {
+ public CachedBlock(String blockName, byte[] buf, long accessTime, boolean inMemory) {
this.buffer = buf;
this.blockName = blockName;
this.accessTime = accessTime;
diff --git a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/lru/LruBlockCache.java b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/lru/LruBlockCache.java
index 127db09..4a2b729 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/lru/LruBlockCache.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/lru/LruBlockCache.java
@@ -217,7 +217,7 @@ public class LruBlockCache extends SynchronousLoadingBlockCache implements Block
* @param inMemory
* if block is in-memory
*/
- public CacheEntry cacheBlock(String blockName, byte buf[], boolean inMemory) {
+ public CacheEntry cacheBlock(String blockName, byte[] buf, boolean inMemory) {
CachedBlock cb = map.get(blockName);
if (cb != null) {
stats.duplicateReads();
@@ -255,7 +255,7 @@ public class LruBlockCache extends SynchronousLoadingBlockCache implements Block
* block buffer
*/
@Override
- public CacheEntry cacheBlock(String blockName, byte buf[]) {
+ public CacheEntry cacheBlock(String blockName, byte[] buf) {
return cacheBlock(blockName, buf, false);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java b/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
index 44699b2..891fd43 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
@@ -344,7 +344,7 @@ public class CachableBlockFile {
return null;
}
- byte b[] = null;
+ byte[] b = null;
try {
b = new byte[(int) _currBlock.getRawSize()];
_currBlock.readFully(b);
@@ -486,7 +486,7 @@ public class CachableBlockFile {
indexable = false;
}
- public CachedBlockRead(CacheEntry cb, byte buf[]) {
+ public CachedBlockRead(CacheEntry cb, byte[] buf) {
this(new SeekableByteArrayInputStream(buf), cb);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/SeekableByteArrayInputStream.java b/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/SeekableByteArrayInputStream.java
index 773a921..70b29c0 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/SeekableByteArrayInputStream.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/SeekableByteArrayInputStream.java
@@ -40,7 +40,7 @@ public class SeekableByteArrayInputStream extends InputStream {
// thread 2 sees all of thread 1 changes before setting the volatile.
@SuppressFBWarnings(value = "VO_VOLATILE_REFERENCE_TO_ARRAY",
justification = "see explanation above")
- private volatile byte buffer[];
+ private volatile byte[] buffer;
private int cur;
private int max;
@@ -54,7 +54,7 @@ public class SeekableByteArrayInputStream extends InputStream {
}
@Override
- public int read(byte b[], int offset, int length) {
+ public int read(byte[] b, int offset, int length) {
if (b == null) {
throw new NullPointerException();
}
diff --git a/core/src/main/java/org/apache/accumulo/core/file/keyfunctor/ColumnFamilyFunctor.java b/core/src/main/java/org/apache/accumulo/core/file/keyfunctor/ColumnFamilyFunctor.java
index c38aaee..4e098f4 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/keyfunctor/ColumnFamilyFunctor.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/keyfunctor/ColumnFamilyFunctor.java
@@ -28,7 +28,7 @@ public class ColumnFamilyFunctor implements KeyFunctor {
@Override
public Key transform(org.apache.accumulo.core.data.Key acuKey) {
- byte keyData[];
+ byte[] keyData;
ByteSequence row = acuKey.getRowData();
ByteSequence cf = acuKey.getColumnFamilyData();
diff --git a/core/src/main/java/org/apache/accumulo/core/file/keyfunctor/ColumnQualifierFunctor.java b/core/src/main/java/org/apache/accumulo/core/file/keyfunctor/ColumnQualifierFunctor.java
index ba1f7e5..353a202 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/keyfunctor/ColumnQualifierFunctor.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/keyfunctor/ColumnQualifierFunctor.java
@@ -25,7 +25,7 @@ public class ColumnQualifierFunctor implements KeyFunctor {
@Override
public org.apache.hadoop.util.bloom.Key transform(org.apache.accumulo.core.data.Key acuKey) {
- byte keyData[];
+ byte[] keyData;
ByteSequence row = acuKey.getRowData();
ByteSequence cf = acuKey.getColumnFamilyData();
diff --git a/core/src/main/java/org/apache/accumulo/core/file/keyfunctor/RowFunctor.java b/core/src/main/java/org/apache/accumulo/core/file/keyfunctor/RowFunctor.java
index 44c2a9d..1ad5956 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/keyfunctor/RowFunctor.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/keyfunctor/RowFunctor.java
@@ -25,7 +25,7 @@ public class RowFunctor implements KeyFunctor {
@Override
public Key transform(org.apache.accumulo.core.data.Key acuKey) {
- byte keyData[];
+ byte[] keyData;
ByteSequence row = acuKey.getRowData();
keyData = new byte[row.length()];
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/MultiLevelIndex.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/MultiLevelIndex.java
index 164fa77..92d3ff6 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/MultiLevelIndex.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/MultiLevelIndex.java
@@ -263,7 +263,7 @@ public class MultiLevelIndex {
private int offset;
private boolean hasNext;
- private byte data[];
+ private byte[] data;
private int[] offsetsArray;
private int numOffsets;
private int offsetsOffset;
@@ -382,7 +382,7 @@ public class MultiLevelIndex {
hasNext = false;
int numIndexEntries = in.readInt();
- int offsets[] = new int[numIndexEntries];
+ int[] offsets = new int[numIndexEntries];
for (int i = 0; i < numIndexEntries; i++) {
offsets[i] = in.readInt();
}
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java
index a36595d..2a50a16 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java
@@ -85,8 +85,8 @@ public class PrintInfo implements KeywordExecutable {
}
static class LogHistogram {
- long countBuckets[] = new long[11];
- long sizeBuckets[] = new long[countBuckets.length];
+ long[] countBuckets = new long[11];
+ long[] sizeBuckets = new long[countBuckets.length];
long totalSize = 0;
public void add(int size) {
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/RFile.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/RFile.java
index 09dabed..2759d3a 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/RFile.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/RFile.java
@@ -269,7 +269,7 @@ public class RFile {
for (int i = 0; i < size; i++) {
int len = in.readInt();
- byte cf[] = new byte[len];
+ byte[] cf = new byte[len];
in.readFully(cf);
long count = in.readLong();
@@ -1135,9 +1135,9 @@ public class RFile {
private final ArrayList<LocalityGroupMetadata> localityGroups = new ArrayList<>();
private final ArrayList<LocalityGroupMetadata> sampleGroups = new ArrayList<>();
- private final LocalityGroupReader currentReaders[];
- private final LocalityGroupReader readers[];
- private final LocalityGroupReader sampleReaders[];
+ private final LocalityGroupReader[] currentReaders;
+ private final LocalityGroupReader[] readers;
+ private final LocalityGroupReader[] sampleReaders;
private final LocalityGroupContext lgContext;
private LocalityGroupSeekCache lgCache;
@@ -1206,7 +1206,7 @@ public class RFile {
createHeap(currentReaders.length);
}
- private Reader(Reader r, LocalityGroupReader sampleReaders[]) {
+ private Reader(Reader r, LocalityGroupReader[] sampleReaders) {
super(sampleReaders.length);
this.reader = r.reader;
this.currentReaders = new LocalityGroupReader[sampleReaders.length];
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/RollingStats.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/RollingStats.java
index c337a92..8407217 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/RollingStats.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/RollingStats.java
@@ -30,7 +30,7 @@ import org.apache.commons.math3.util.FastMath;
*/
class RollingStats {
private int position;
- private double window[];
+ private double[] window;
private double average;
private double variance;
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/Compression.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/Compression.java
index 4234df4..db39180 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/Compression.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/Compression.java
@@ -63,7 +63,7 @@ public final class Compression {
}
@Override
- public void write(byte b[], int off, int len) throws IOException {
+ public void write(byte[] b, int off, int len) throws IOException {
out.write(b, off, len);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/SimpleBufferedOutputStream.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/SimpleBufferedOutputStream.java
index 5e2277a..1db2490 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/SimpleBufferedOutputStream.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/SimpleBufferedOutputStream.java
@@ -26,7 +26,7 @@ import java.io.OutputStream;
* been buffered.
*/
class SimpleBufferedOutputStream extends FilterOutputStream {
- protected byte buf[]; // the borrowed buffer
+ protected byte[] buf; // the borrowed buffer
protected int count = 0; // bytes used in buffer.
// Constructor
@@ -51,7 +51,7 @@ class SimpleBufferedOutputStream extends FilterOutputStream {
}
@Override
- public void write(byte b[], int off, int len) throws IOException {
+ public void write(byte[] b, int off, int len) throws IOException {
if (len >= buf.length) {
flushBuffer();
out.write(b, off, len);
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/conf/ColumnSet.java b/core/src/main/java/org/apache/accumulo/core/iterators/conf/ColumnSet.java
index f182757..0e93026 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/conf/ColumnSet.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/conf/ColumnSet.java
@@ -146,7 +146,7 @@ public class ColumnSet {
if (sb[i] != '%') {
t.append(new byte[] {sb[i]}, 0, 1);
} else {
- byte hex[] = {sb[++i], sb[++i]};
+ byte[] hex = {sb[++i], sb[++i]};
String hs = new String(hex, UTF_8);
int b = Integer.parseInt(hs, 16);
t.append(new byte[] {(byte) b}, 0, 1);
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/system/LocalityGroupIterator.java b/core/src/main/java/org/apache/accumulo/core/iterators/system/LocalityGroupIterator.java
index 382e77b..565aaeb 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/system/LocalityGroupIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/system/LocalityGroupIterator.java
@@ -129,7 +129,7 @@ public class LocalityGroupIterator extends HeapIterator implements Interruptible
private LocalityGroupSeekCache lgCache;
private AtomicBoolean interruptFlag;
- public LocalityGroupIterator(LocalityGroup groups[]) {
+ public LocalityGroupIterator(LocalityGroup[] groups) {
super(groups.length);
this.lgContext = new LocalityGroupContext(groups);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/user/GrepIterator.java b/core/src/main/java/org/apache/accumulo/core/iterators/user/GrepIterator.java
index acb967f..af1c7b3 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/user/GrepIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/user/GrepIterator.java
@@ -36,8 +36,8 @@ import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
*/
public class GrepIterator extends Filter {
- private byte term[];
- private int right[] = new int[256];
+ private byte[] term;
+ private int[] right = new int[256];
@Override
public boolean accept(Key k, Value v) {
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/user/RegExFilter.java b/core/src/main/java/org/apache/accumulo/core/iterators/user/RegExFilter.java
index 5ed384c..2bdcdf3 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/user/RegExFilter.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/user/RegExFilter.java
@@ -83,7 +83,7 @@ public class RegExFilter extends Filter {
return !orFields;
}
- private boolean matches(Matcher matcher, byte data[], int offset, int len) {
+ private boolean matches(Matcher matcher, byte[] data, int offset, int len) {
if (matcher != null) {
matcher.reset(new String(data, offset, len, encoding));
return matchSubstring ? matcher.find() : matcher.matches();
diff --git a/core/src/main/java/org/apache/accumulo/core/security/ColumnVisibility.java b/core/src/main/java/org/apache/accumulo/core/security/ColumnVisibility.java
index 6389389..3898eb4 100644
--- a/core/src/main/java/org/apache/accumulo/core/security/ColumnVisibility.java
+++ b/core/src/main/java/org/apache/accumulo/core/security/ColumnVisibility.java
@@ -146,7 +146,7 @@ public class ColumnVisibility {
return end;
}
- public ByteSequence getTerm(byte expression[]) {
+ public ByteSequence getTerm(byte[] expression) {
if (type != NodeType.TERM)
throw new RuntimeException();
diff --git a/core/src/main/java/org/apache/accumulo/core/security/NamespacePermission.java b/core/src/main/java/org/apache/accumulo/core/security/NamespacePermission.java
index 1caccf4..cad8f63 100644
--- a/core/src/main/java/org/apache/accumulo/core/security/NamespacePermission.java
+++ b/core/src/main/java/org/apache/accumulo/core/security/NamespacePermission.java
@@ -37,7 +37,7 @@ public enum NamespacePermission {
private final byte permID;
- private static final NamespacePermission mapping[] = new NamespacePermission[9];
+ private static final NamespacePermission[] mapping = new NamespacePermission[9];
static {
for (NamespacePermission perm : NamespacePermission.values())
mapping[perm.permID] = perm;
diff --git a/core/src/main/java/org/apache/accumulo/core/security/TablePermission.java b/core/src/main/java/org/apache/accumulo/core/security/TablePermission.java
index 49abc36..7d65256 100644
--- a/core/src/main/java/org/apache/accumulo/core/security/TablePermission.java
+++ b/core/src/main/java/org/apache/accumulo/core/security/TablePermission.java
@@ -39,7 +39,7 @@ public enum TablePermission {
private final byte permID;
- private static final TablePermission mapping[] = new TablePermission[9];
+ private static final TablePermission[] mapping = new TablePermission[9];
static {
for (TablePermission perm : TablePermission.values())
mapping[perm.permID] = perm;
diff --git a/core/src/main/java/org/apache/accumulo/core/spi/cache/BlockCache.java b/core/src/main/java/org/apache/accumulo/core/spi/cache/BlockCache.java
index 5ec95f3..0d5c924 100644
--- a/core/src/main/java/org/apache/accumulo/core/spi/cache/BlockCache.java
+++ b/core/src/main/java/org/apache/accumulo/core/spi/cache/BlockCache.java
@@ -36,7 +36,7 @@ public interface BlockCache {
* @param buf
* The block contents wrapped in a ByteBuffer.
*/
- CacheEntry cacheBlock(String blockName, byte buf[]);
+ CacheEntry cacheBlock(String blockName, byte[] buf);
/**
* Fetch block from cache.
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/log/LogEntry.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/log/LogEntry.java
index 7651788..ed0bdc3 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/log/LogEntry.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/log/LogEntry.java
@@ -67,7 +67,7 @@ public class LogEntry {
return Arrays.copyOf(out.getData(), out.getLength());
}
- public static LogEntry fromBytes(byte bytes[]) throws IOException {
+ public static LogEntry fromBytes(byte[] bytes) throws IOException {
DataInputBuffer inp = new DataInputBuffer();
inp.reset(bytes, bytes.length);
KeyExtent extent = new KeyExtent();
@@ -108,7 +108,7 @@ public class LogEntry {
}
public String getUniqueID() {
- String parts[] = filename.split("/");
+ String[] parts = filename.split("/");
return parts[parts.length - 1];
}
diff --git a/core/src/main/java/org/apache/accumulo/core/util/FastFormat.java b/core/src/main/java/org/apache/accumulo/core/util/FastFormat.java
index 54169c3..f1f9aca 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/FastFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/FastFormat.java
@@ -26,15 +26,15 @@ public class FastFormat {
public static byte[] toZeroPaddedString(long num, int width, int radix, byte[] prefix) {
Preconditions.checkArgument(num >= 0);
String strNum = Long.toString(num, radix);
- byte ret[] = new byte[Math.max(strNum.length(), width) + prefix.length];
+ byte[] ret = new byte[Math.max(strNum.length(), width) + prefix.length];
if (toZeroPaddedString(ret, 0, strNum, width, prefix) != ret.length)
throw new RuntimeException(" Did not format to expected width " + num + " " + width + " "
+ radix + " " + new String(prefix, UTF_8));
return ret;
}
- public static int toZeroPaddedString(byte output[], int outputOffset, long num, int width,
- int radix, byte[] prefix) {
+ public static int toZeroPaddedString(byte[] output, int outputOffset, long num, int width,
+ int radix, byte[] prefix) {
Preconditions.checkArgument(num >= 0);
String strNum = Long.toString(num, radix);
@@ -42,8 +42,8 @@ public class FastFormat {
return toZeroPaddedString(output, outputOffset, strNum, width, prefix);
}
- private static int toZeroPaddedString(byte output[], int outputOffset, String strNum, int width,
- byte[] prefix) {
+ private static int toZeroPaddedString(byte[] output, int outputOffset, String strNum, int width,
+ byte[] prefix) {
int index = outputOffset;
diff --git a/core/src/main/java/org/apache/accumulo/core/util/LocalityGroupUtil.java b/core/src/main/java/org/apache/accumulo/core/util/LocalityGroupUtil.java
index 8b4163c..a9f039e 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/LocalityGroupUtil.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/LocalityGroupUtil.java
@@ -168,7 +168,7 @@ public class LocalityGroupUtil {
public static ByteSequence decodeColumnFamily(String colFam)
throws LocalityGroupConfigurationError {
- byte output[] = new byte[colFam.length()];
+ byte[] output = new byte[colFam.length()];
int pos = 0;
for (int i = 0; i < colFam.length(); i++) {
diff --git a/core/src/main/java/org/apache/accumulo/core/util/NumUtil.java b/core/src/main/java/org/apache/accumulo/core/util/NumUtil.java
index ef94f0c..df4a691 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/NumUtil.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/NumUtil.java
@@ -20,8 +20,8 @@ import java.text.DecimalFormat;
public class NumUtil {
- private static final String QUANTITY_SUFFIX[] = {"", "K", "M", "B", "T", "e15", "e18", "e21"};
- private static final String SIZE_SUFFIX[] = {"", "K", "M", "G", "T", "P", "E", "Z"};
+ private static final String[] QUANTITY_SUFFIX = {"", "K", "M", "B", "T", "e15", "e18", "e21"};
+ private static final String[] SIZE_SUFFIX = {"", "K", "M", "G", "T", "P", "E", "Z"};
private static DecimalFormat df = new DecimalFormat("#,###,##0");
private static DecimalFormat df_mantissa = new DecimalFormat("#,###,##0.00");
diff --git a/core/src/main/java/org/apache/accumulo/core/util/UnsynchronizedBuffer.java b/core/src/main/java/org/apache/accumulo/core/util/UnsynchronizedBuffer.java
index f477231..30c87a0 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/UnsynchronizedBuffer.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/UnsynchronizedBuffer.java
@@ -34,7 +34,7 @@ public class UnsynchronizedBuffer {
public static class Writer {
int offset = 0;
- byte data[];
+ byte[] data;
/**
* Creates a new writer.
@@ -102,7 +102,7 @@ public class UnsynchronizedBuffer {
* @return byte buffer contents
*/
public byte[] toArray() {
- byte ret[] = new byte[offset];
+ byte[] ret = new byte[offset];
System.arraycopy(data, 0, ret, 0, offset);
return ret;
}
@@ -151,7 +151,7 @@ public class UnsynchronizedBuffer {
*/
public static class Reader {
int offset;
- byte data[];
+ byte[] data;
/**
* Creates a new reader.
@@ -159,7 +159,7 @@ public class UnsynchronizedBuffer {
* @param b
* bytes to read
*/
- public Reader(byte b[]) {
+ public Reader(byte[] b) {
this.data = b;
}
@@ -207,7 +207,7 @@ public class UnsynchronizedBuffer {
* @param b
* byte array to fill
*/
- public void readBytes(byte b[]) {
+ public void readBytes(byte[] b) {
System.arraycopy(data, offset, b, 0, b.length);
offset += b.length;
}
diff --git a/core/src/main/java/org/apache/accumulo/core/util/format/DefaultFormatter.java b/core/src/main/java/org/apache/accumulo/core/util/format/DefaultFormatter.java
index 84b9c08..14e6c46 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/format/DefaultFormatter.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/format/DefaultFormatter.java
@@ -168,7 +168,7 @@ public class DefaultFormatter implements Formatter {
return appendBytes(sb, value.get(), 0, value.get().length, shownLength);
}
- static StringBuilder appendBytes(StringBuilder sb, byte ba[], int offset, int len) {
+ static StringBuilder appendBytes(StringBuilder sb, byte[] ba, int offset, int len) {
for (int i = 0; i < len; i++) {
int c = 0xff & ba[offset + i];
if (c == '\\')
@@ -181,8 +181,8 @@ public class DefaultFormatter implements Formatter {
return sb;
}
- static StringBuilder appendBytes(StringBuilder sb, byte ba[], int offset, int len,
- int shownLength) {
+ static StringBuilder appendBytes(StringBuilder sb, byte[] ba, int offset, int len,
+ int shownLength) {
int length = Math.min(len, shownLength);
return DefaultFormatter.appendBytes(sb, ba, offset, length);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/util/format/HexFormatter.java b/core/src/main/java/org/apache/accumulo/core/util/format/HexFormatter.java
index f54f5f7..9324b3e 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/format/HexFormatter.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/format/HexFormatter.java
@@ -29,7 +29,7 @@ import org.apache.hadoop.io.Text;
*/
public class HexFormatter implements Formatter, ScanInterpreter {
- private char chars[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e',
+ private char[] chars = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e',
'f'};
private Iterator<Entry<Key,Value>> iter;
private FormatterConfig config;
diff --git a/core/src/main/java/org/apache/accumulo/core/volume/VolumeConfiguration.java b/core/src/main/java/org/apache/accumulo/core/volume/VolumeConfiguration.java
index d556cc2..955596b 100644
--- a/core/src/main/java/org/apache/accumulo/core/volume/VolumeConfiguration.java
+++ b/core/src/main/java/org/apache/accumulo/core/volume/VolumeConfiguration.java
@@ -88,13 +88,13 @@ public class VolumeConfiguration {
public static String[] getVolumeUris(AccumuloConfiguration conf, Configuration hadoopConfig) {
String ns = conf.get(Property.INSTANCE_VOLUMES);
- String configuredBaseDirs[];
+ String[] configuredBaseDirs;
if (ns == null || ns.isEmpty()) {
// Fall back to using the old config values
configuredBaseDirs = new String[] {getConfiguredBaseDir(conf, hadoopConfig)};
} else {
- String namespaces[] = ns.split(",");
+ String[] namespaces = ns.split(",");
configuredBaseDirs = new String[namespaces.length];
int i = 0;
for (String namespace : namespaces) {
@@ -116,10 +116,10 @@ public class VolumeConfiguration {
return configuredBaseDirs;
}
- public static String[] prefix(String bases[], String suffix) {
+ public static String[] prefix(String[] bases, String suffix) {
if (suffix.startsWith("/"))
suffix = suffix.substring(1);
- String result[] = new String[bases.length];
+ String[] result = new String[bases.length];
for (int i = 0; i < bases.length; i++) {
if (bases[i].endsWith("/")) {
result[i] = bases[i] + suffix;
diff --git a/core/src/main/java/org/apache/accumulo/fate/AdminUtil.java b/core/src/main/java/org/apache/accumulo/fate/AdminUtil.java
index 8efb3ae..f9966ed 100644
--- a/core/src/main/java/org/apache/accumulo/fate/AdminUtil.java
+++ b/core/src/main/java/org/apache/accumulo/fate/AdminUtil.java
@@ -505,7 +505,7 @@ public class AdminUtil<T> {
for (String node : lockNodes) {
String lockPath = path + "/" + id + "/" + node;
byte[] data = zk.getData(path + "/" + id + "/" + node, null);
- String lda[] = new String(data, UTF_8).split(":");
+ String[] lda = new String(data, UTF_8).split(":");
if (lda[1].equals(txidStr))
zk.recursiveDelete(lockPath, NodeMissingPolicy.SKIP);
}
diff --git a/core/src/main/java/org/apache/accumulo/fate/ZooStore.java b/core/src/main/java/org/apache/accumulo/fate/ZooStore.java
index 1aeb96f..c1064ba 100644
--- a/core/src/main/java/org/apache/accumulo/fate/ZooStore.java
+++ b/core/src/main/java/org/apache/accumulo/fate/ZooStore.java
@@ -80,7 +80,7 @@ public class ZooStore<T> implements TStore<T> {
@SuppressFBWarnings(value = "OBJECT_DESERIALIZATION",
justification = "unsafe to store arbitrary serialized objects like this, but needed for now"
+ " for backwards compatibility")
- private Object deserialize(byte ser[]) {
+ private Object deserialize(byte[] ser) {
try {
ByteArrayInputStream bais = new ByteArrayInputStream(ser);
ObjectInputStream ois = new ObjectInputStream(bais);
diff --git a/core/src/main/java/org/apache/accumulo/fate/zookeeper/DistributedReadWriteLock.java b/core/src/main/java/org/apache/accumulo/fate/zookeeper/DistributedReadWriteLock.java
index b891655..c49b793 100644
--- a/core/src/main/java/org/apache/accumulo/fate/zookeeper/DistributedReadWriteLock.java
+++ b/core/src/main/java/org/apache/accumulo/fate/zookeeper/DistributedReadWriteLock.java
@@ -76,7 +76,7 @@ public class DistributedReadWriteLock implements java.util.concurrent.locks.Read
}
public byte[] getLockData() {
- byte typeBytes[] = type.name().getBytes(UTF_8);
+ byte[] typeBytes = type.name().getBytes(UTF_8);
byte[] result = new byte[userData.length + 1 + typeBytes.length];
System.arraycopy(typeBytes, 0, result, 0, typeBytes.length);
result[typeBytes.length] = ':';
diff --git a/core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java b/core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java
index 0468b83..31afe95 100644
--- a/core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java
+++ b/core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java
@@ -118,7 +118,7 @@ public class ZooLock implements Watcher {
}
- public synchronized boolean tryLock(LockWatcher lw, byte data[])
+ public synchronized boolean tryLock(LockWatcher lw, byte[] data)
throws KeeperException, InterruptedException {
TryLockAsyncLockWatcher tlalw = new TryLockAsyncLockWatcher(lw);
@@ -248,7 +248,7 @@ public class ZooLock implements Watcher {
localLw.lostLock(reason);
}
- public synchronized void lockAsync(final AsyncLockWatcher lw, byte data[]) {
+ public synchronized void lockAsync(final AsyncLockWatcher lw, byte[] data) {
if (lockWatcher != null || lock != null || asyncLock != null) {
throw new IllegalStateException();
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 5b9f52e..8d10b66 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
@@ -73,7 +73,7 @@ public class ZooUtil {
public String node;
public LockID(String root, String serializedLID) {
- String sa[] = serializedLID.split("\\$");
+ String[] sa = serializedLID.split("\\$");
int lastSlash = sa[0].lastIndexOf('/');
if (sa.length != 2 || lastSlash < 0) {
diff --git a/core/src/test/java/org/apache/accumulo/core/client/RowIteratorTest.java b/core/src/test/java/org/apache/accumulo/core/client/RowIteratorTest.java
index d8b0696..9d27db8 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/RowIteratorTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/RowIteratorTest.java
@@ -38,7 +38,7 @@ public class RowIteratorTest {
Iterator<Entry<Key,Value>> makeIterator(final String... args) {
final Map<Key,Value> result = new TreeMap<>();
for (String s : args) {
- final String parts[] = s.split("[ \t]");
+ final String[] parts = s.split("[ \t]");
final Key key = new Key(parts[0], parts[1], parts[2]);
final Value value = new Value(parts[3].getBytes());
result.put(key, value);
diff --git a/core/src/test/java/org/apache/accumulo/core/clientImpl/TableOperationsHelperTest.java b/core/src/test/java/org/apache/accumulo/core/clientImpl/TableOperationsHelperTest.java
index 81d4141..9d41959 100644
--- a/core/src/test/java/org/apache/accumulo/core/clientImpl/TableOperationsHelperTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/clientImpl/TableOperationsHelperTest.java
@@ -254,7 +254,7 @@ public class TableOperationsHelperTest {
void check(TableOperationsHelper t, String tablename, String[] values) throws Exception {
Map<String,String> expected = new TreeMap<>();
for (String value : values) {
- String parts[] = value.split("=", 2);
+ String[] parts = value.split("=", 2);
expected.put(parts[0], parts[1]);
}
Map<String,String> actual = new TreeMap<>();
diff --git a/core/src/test/java/org/apache/accumulo/core/clientImpl/TabletLocatorImplTest.java b/core/src/test/java/org/apache/accumulo/core/clientImpl/TabletLocatorImplTest.java
index eb46597..3d89cb1 100644
--- a/core/src/test/java/org/apache/accumulo/core/clientImpl/TabletLocatorImplTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/clientImpl/TabletLocatorImplTest.java
@@ -88,7 +88,7 @@ public class TabletLocatorImplTest {
for (int i = 0; i < data.length; i += 2) {
String loc = (String) data[i];
- Object binData[] = (Object[]) data[i + 1];
+ Object[] binData = (Object[]) data[i + 1];
HashMap<KeyExtent,List<Range>> binnedKE = new HashMap<>();
diff --git a/core/src/test/java/org/apache/accumulo/core/data/ColumnTest.java b/core/src/test/java/org/apache/accumulo/core/data/ColumnTest.java
index a6339f0..b525bdb 100644
--- a/core/src/test/java/org/apache/accumulo/core/data/ColumnTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/data/ColumnTest.java
@@ -32,7 +32,7 @@ import org.junit.BeforeClass;
import org.junit.Test;
public class ColumnTest {
- static Column col[];
+ static Column[] col;
@BeforeClass
public static void setup() {
diff --git a/core/src/test/java/org/apache/accumulo/core/data/KeyBuilderTest.java b/core/src/test/java/org/apache/accumulo/core/data/KeyBuilderTest.java
index 5182699..e56dad1 100644
--- a/core/src/test/java/org/apache/accumulo/core/data/KeyBuilderTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/data/KeyBuilderTest.java
@@ -27,7 +27,7 @@ import org.junit.Test;
public class KeyBuilderTest {
- private static final byte EMPTY_BYTES[] = new byte[0];
+ private static final byte[] EMPTY_BYTES = new byte[0];
byte[] rowBytes = "row".getBytes(UTF_8);
byte[] familyBytes = "family".getBytes(UTF_8);
byte[] qualifierBytes = "qualifier".getBytes(UTF_8);
diff --git a/core/src/test/java/org/apache/accumulo/core/data/KeyTest.java b/core/src/test/java/org/apache/accumulo/core/data/KeyTest.java
index d49f559..192c8fc 100644
--- a/core/src/test/java/org/apache/accumulo/core/data/KeyTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/data/KeyTest.java
@@ -48,10 +48,10 @@ public class KeyTest {
@Test
public void testCopyData() {
- byte row[] = "r".getBytes();
- byte cf[] = "cf".getBytes();
- byte cq[] = "cq".getBytes();
- byte cv[] = "cv".getBytes();
+ byte[] row = "r".getBytes();
+ byte[] cf = "cf".getBytes();
+ byte[] cq = "cq".getBytes();
+ byte[] cv = "cv".getBytes();
Key k1 = new Key(row, cf, cq, cv, 5L, false, false);
Key k2 = new Key(row, cf, cq, cv, 5L, false, true);
diff --git a/core/src/test/java/org/apache/accumulo/core/data/MutationTest.java b/core/src/test/java/org/apache/accumulo/core/data/MutationTest.java
index 9dbffdf..f7dce23 100644
--- a/core/src/test/java/org/apache/accumulo/core/data/MutationTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/data/MutationTest.java
@@ -148,7 +148,7 @@ public class MutationTest {
Mutation m = new Mutation(new Text("r1"));
for (int i = 0; i < 5; i++) {
int len = Mutation.VALUE_SIZE_COPY_CUTOFF - 2 + i;
- byte val[] = new byte[len];
+ byte[] val = new byte[len];
for (int j = 0; j < len; j++)
val[j] = (byte) i;
diff --git a/core/src/test/java/org/apache/accumulo/core/data/OldMutation.java b/core/src/test/java/org/apache/accumulo/core/data/OldMutation.java
index 4c81c3f..7d3cf11 100644
--- a/core/src/test/java/org/apache/accumulo/core/data/OldMutation.java
+++ b/core/src/test/java/org/apache/accumulo/core/data/OldMutation.java
@@ -48,7 +48,7 @@ public class OldMutation implements Writable {
private static class ByteBuffer {
int offset;
- byte data[] = new byte[64];
+ byte[] data = new byte[64];
private void reserve(int l) {
if (offset + l > data.length) {
@@ -104,7 +104,7 @@ public class OldMutation implements Writable {
}
public byte[] toArray() {
- byte ret[] = new byte[offset];
+ byte[] ret = new byte[offset];
System.arraycopy(data, 0, ret, 0, offset);
return ret;
}
@@ -113,9 +113,9 @@ public class OldMutation implements Writable {
private static class SimpleReader {
int offset;
- byte data[];
+ byte[] data;
- SimpleReader(byte b[]) {
+ SimpleReader(byte[] b) {
this.data = b;
}
@@ -132,7 +132,7 @@ public class OldMutation implements Writable {
+ ((data[offset++] & 255) << 8) + ((data[offset++] & 255) << 0));
}
- void readBytes(byte b[]) {
+ void readBytes(byte[] b) {
System.arraycopy(data, offset, b, 0, b.length);
offset += b.length;
}
@@ -186,7 +186,7 @@ public class OldMutation implements Writable {
return row;
}
- private void put(byte b[]) {
+ private void put(byte[] b) {
buffer.add(b.length);
buffer.add(b);
}
@@ -226,7 +226,7 @@ public class OldMutation implements Writable {
} else {
if (values == null)
values = new ArrayList<>();
- byte copy[] = new byte[val.length];
+ byte[] copy = new byte[val.length];
System.arraycopy(val, 0, copy, 0, val.length);
values.add(copy);
put(-1 * values.size());
@@ -351,7 +351,7 @@ public class OldMutation implements Writable {
if (len == 0)
return EMPTY_BYTES;
- byte bytes[] = new byte[len];
+ byte[] bytes = new byte[len];
in.readBytes(bytes);
return bytes;
}
@@ -459,7 +459,7 @@ public class OldMutation implements Writable {
int numValues = in.readInt();
for (int i = 0; i < numValues; i++) {
len = in.readInt();
- byte val[] = new byte[len];
+ byte[] val = new byte[len];
in.readFully(val);
values.add(val);
}
diff --git a/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java b/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
index 68de0bb..8b744e1 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
@@ -539,7 +539,7 @@ public class TestLruBlockCache {
private static class Block implements HeapSize {
String blockName;
- byte buf[];
+ byte[] buf;
Block(String blockName, int size) {
this.blockName = blockName;
diff --git a/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileMetricsTest.java b/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileMetricsTest.java
index fe3d98f..d3a06b9 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileMetricsTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileMetricsTest.java
@@ -529,7 +529,7 @@ public class RFileMetricsTest {
trf.writer.startDefaultLocalityGroup();
- String vis[] = {"A", "A&B", "A|C", "B&C", "Boo"};
+ String[] vis = {"A", "A&B", "A|C", "B&C", "Boo"};
int fam = 0;
for (int row = 0; row < 1000; row++) {
diff --git a/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java b/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java
index 072d428..7cf5fdd 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java
@@ -1727,12 +1727,12 @@ public class RFileTest {
InputStream in = this.getClass().getClassLoader()
.getResourceAsStream("org/apache/accumulo/core/file/rfile/ver_" + version + ".rf");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
- byte buf[] = new byte[1024];
+ byte[] buf = new byte[1024];
int read;
while ((read = in.read(buf)) > 0)
baos.write(buf, 0, read);
- byte data[] = baos.toByteArray();
+ byte[] data = baos.toByteArray();
SeekableByteArrayInputStream bais = new SeekableByteArrayInputStream(data);
FSDataInputStream in2 = new FSDataInputStream(bais);
CachableBuilder cb = new CachableBuilder().input(in2).length(data.length).conf(hadoopConf)
@@ -2240,7 +2240,7 @@ public class RFileTest {
// add a few keys with long rows
for (int i = 0; i < 1000; i += 100) {
String row = String.format("r%06d", i);
- char ca[] = new char[1000];
+ char[] ca = new char[1000];
Arrays.fill(ca, 'b');
row = row + new String(ca);
keys.add(new Key(row, "cf1", "cq1", 42));
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/user/IndexedDocIteratorTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/user/IndexedDocIteratorTest.java
index 2230d74..7a0dba5 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/user/IndexedDocIteratorTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/user/IndexedDocIteratorTest.java
@@ -142,7 +142,7 @@ public class IndexedDocIteratorTest {
private SortedKeyValueIterator<Key,Value> createIteratorStack(float hitRatio, int numRows,
int numDocsPerRow, Text[] columnFamilies, Text[] otherColumnFamilies, HashSet<Text> docs)
throws IOException {
- Text nullText[] = new Text[0];
+ Text[] nullText = new Text[0];
return createIteratorStack(hitRatio, numRows, numDocsPerRow, columnFamilies,
otherColumnFamilies, docs, nullText);
}
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/user/IntersectingIteratorTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/user/IntersectingIteratorTest.java
index af867f3..d8e4406 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/user/IntersectingIteratorTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/user/IntersectingIteratorTest.java
@@ -104,7 +104,7 @@ public class IntersectingIteratorTest {
private SortedKeyValueIterator<Key,Value> createIteratorStack(float hitRatio, int numRows,
int numDocsPerRow, Text[] columnFamilies, Text[] otherColumnFamilies, HashSet<Text> docs) {
- Text nullText[] = new Text[0];
+ Text[] nullText = new Text[0];
return createIteratorStack(hitRatio, numRows, numDocsPerRow, columnFamilies,
otherColumnFamilies, docs, nullText);
}
diff --git a/core/src/test/java/org/apache/accumulo/core/util/LocalityGroupUtilTest.java b/core/src/test/java/org/apache/accumulo/core/util/LocalityGroupUtilTest.java
index c45996d..b653123 100644
--- a/core/src/test/java/org/apache/accumulo/core/util/LocalityGroupUtilTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/util/LocalityGroupUtilTest.java
@@ -61,8 +61,8 @@ public class LocalityGroupUtilTest {
@Test
public void testEncoding() throws Exception {
- byte test1[] = new byte[256];
- byte test2[] = new byte[256];
+ byte[] test1 = new byte[256];
+ byte[] test2 = new byte[256];
for (int i = 0; i < 256; i++) {
test1[i] = (byte) (0xff & i);
test2[i] = (byte) (0xff & (255 - i));
diff --git a/core/src/test/java/org/apache/accumulo/core/util/MergeTest.java b/core/src/test/java/org/apache/accumulo/core/util/MergeTest.java
index 9218714..86725dc 100644
--- a/core/src/test/java/org/apache/accumulo/core/util/MergeTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/util/MergeTest.java
@@ -109,7 +109,7 @@ public class MergeTest {
}
private static int[] sizes(List<Size> sizes) {
- int result[] = new int[sizes.size()];
+ int[] result = new int[sizes.size()];
int i = 0;
for (Size s : sizes) {
result[i++] = (int) s.size;
diff --git a/hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoop/mapreduce/partition/RangePartitioner.java b/hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoop/mapreduce/partition/RangePartitioner.java
index 8658340..abe01cc 100644
--- a/hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoop/mapreduce/partition/RangePartitioner.java
+++ b/hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoop/mapreduce/partition/RangePartitioner.java
@@ -83,7 +83,7 @@ public class RangePartitioner extends Partitioner<Text,Writable> implements Conf
return _numSubBins;
}
- private Text cutPointArray[] = null;
+ private Text[] cutPointArray = null;
@SuppressFBWarnings(value = "PATH_TRAVERSAL_IN",
justification = "path provided by distributed cache framework, not user input")
diff --git a/minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterImpl.java b/minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterImpl.java
index 0e45118..e53e487 100644
--- a/minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterImpl.java
+++ b/minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterImpl.java
@@ -508,7 +508,7 @@ public class MiniAccumuloClusterImpl implements AccumuloCluster {
s.setReuseAddress(true);
s.getOutputStream().write("ruok\n".getBytes());
s.getOutputStream().flush();
- byte buffer[] = new byte[100];
+ byte[] buffer = new byte[100];
int n = s.getInputStream().read(buffer);
if (n >= 4 && new String(buffer, 0, 4).equals("imok"))
break;
diff --git a/server/base/src/main/java/org/apache/accumulo/server/ServerConstants.java b/server/base/src/main/java/org/apache/accumulo/server/ServerConstants.java
index 27d4a07..d3c49b9 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/ServerConstants.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/ServerConstants.java
@@ -188,7 +188,7 @@ public class ServerConstants {
for (String pair : pairs) {
- String uris[] = pair.split("\\s+");
+ String[] uris = pair.split("\\s+");
if (uris.length != 2)
throw new IllegalArgumentException(
Property.INSTANCE_VOLUMES_REPLACEMENTS.getKey() + " contains malformed pair " + pair);
diff --git a/server/base/src/main/java/org/apache/accumulo/server/log/WalStateManager.java b/server/base/src/main/java/org/apache/accumulo/server/log/WalStateManager.java
index 9c42d41..17cae67 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/log/WalStateManager.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/log/WalStateManager.java
@@ -150,8 +150,8 @@ public class WalStateManager {
updateState(tsi, path, WalState.UNREFERENCED);
}
- private static Pair<WalState,Path> parse(byte data[]) {
- String parts[] = new String(data, UTF_8).split(",");
+ private static Pair<WalState,Path> parse(byte[] data) {
+ String[] parts = new String(data, UTF_8).split(",");
return new Pair<>(WalState.valueOf(parts[0]), new Path(parts[1]));
}
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java b/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java
index 4a3ee39..9de1568 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java
@@ -121,7 +121,7 @@ public class TabletStateChangeIterator extends SkippingIterator {
Set<TServerInstance> result = new HashSet<>();
if (servers.length() > 0) {
for (String part : servers.split(",")) {
- String parts[] = part.split("\\[", 2);
+ String[] parts = part.split("\\[", 2);
String hostport = parts[0];
String instance = parts[1];
if (instance != null && instance.endsWith("]"))
diff --git a/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReport.java b/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReport.java
index 2110551..d35022e 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReport.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReport.java
@@ -84,7 +84,7 @@ public class ProblemReport {
this(tableId, problemType, resource, null, e);
}
- private ProblemReport(TableId table, ProblemType problemType, String resource, byte enc[])
+ private ProblemReport(TableId table, ProblemType problemType, String resource, byte[] enc)
throws IOException {
requireNonNull(table, "table is null");
requireNonNull(problemType, "problemType is null");
@@ -118,7 +118,7 @@ public class ProblemReport {
return baos.toByteArray();
}
- private void decode(byte enc[]) throws IOException {
+ private void decode(byte[] enc) throws IOException {
ByteArrayInputStream bais = new ByteArrayInputStream(enc);
DataInputStream dis = new DataInputStream(bais);
@@ -180,7 +180,7 @@ public class ProblemReport {
static ProblemReport decodeZooKeeperEntry(ServerContext context, String node)
throws IOException, KeeperException, InterruptedException {
- byte bytes[] = Encoding.decodeBase64FileName(node);
+ byte[] bytes = Encoding.decodeBase64FileName(node);
ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
DataInputStream dis = new DataInputStream(bais);
diff --git a/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java b/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
index 98114c9..240395f 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
@@ -295,7 +295,7 @@ public class ProblemReports implements Iterable<ProblemReport> {
return instance;
}
- public static void main(String args[]) {
+ public static void main(String[] args) {
ServerContext context = new ServerContext(new SiteConfiguration());
getInstance(context).printProblems();
}
diff --git a/server/base/src/main/java/org/apache/accumulo/server/replication/StatusFormatter.java b/server/base/src/main/java/org/apache/accumulo/server/replication/StatusFormatter.java
index 3007ec7..d793034 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/replication/StatusFormatter.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/replication/StatusFormatter.java
@@ -133,7 +133,7 @@ public class StatusFormatter implements Formatter {
return appendBytes(sb, t.getBytes(), 0, t.getLength());
}
- protected StringBuilder appendBytes(StringBuilder sb, byte ba[], int offset, int len) {
+ protected StringBuilder appendBytes(StringBuilder sb, byte[] ba, int offset, int len) {
for (int i = 0; i < len; i++) {
int c = 0xff & ba[offset + i];
if (c == '\\')
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java b/server/base/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java
index 3b7f164..4c71872 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java
@@ -145,7 +145,7 @@ public class ChangeSecret {
// upgrade
if (acls.containsAll(Ids.OPEN_ACL_UNSAFE)) {
// make user nodes private, they contain the user's password
- String parts[] = path.split("/");
+ String[] parts = path.split("/");
if (parts[parts.length - 2].equals("users")) {
new_.putPrivatePersistentData(newPath, data, NodeExistsPolicy.FAIL);
} else {
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/FileSystemMonitor.java b/server/base/src/main/java/org/apache/accumulo/server/util/FileSystemMonitor.java
index 4792e2c..5fa9af1 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/FileSystemMonitor.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/FileSystemMonitor.java
@@ -52,7 +52,7 @@ public class FileSystemMonitor {
Set<String> options;
Mount(String line) {
- String tokens[] = line.split("\\s+");
+ String[] tokens = line.split("\\s+");
device = tokens[0].trim();
mountPoint = tokens[1].trim();
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/TableDiskUsage.java b/server/base/src/main/java/org/apache/accumulo/server/util/TableDiskUsage.java
index fa36a5d..789e69c 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/TableDiskUsage.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/TableDiskUsage.java
@@ -182,7 +182,7 @@ public class TableDiskUsage {
// Read each file referenced by that table
for (Entry<Key,Value> entry : mdScanner) {
String file = entry.getKey().getColumnQualifier().toString();
- String parts[] = file.split("/");
+ String[] parts = file.split("/");
// the filename
String uniqueName = parts[parts.length - 1];
if (file.contains(":") || file.startsWith("../")) {
diff --git a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/GroupBalancerTest.java b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/GroupBalancerTest.java
index 8169d67..14548a5 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/GroupBalancerTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/GroupBalancerTest.java
@@ -196,10 +196,10 @@ public class GroupBalancerTest {
@Test
public void testSingleGroup() {
- String tests[][] = {new String[] {"a", "b", "c", "d"}, new String[] {"a", "b", "c"},
- new String[] {"a", "b", "c", "d", "e"}, new String[] {"a", "b", "c", "d", "e", "f", "g"},
- new String[] {"a", "b", "c", "d", "e", "f", "g", "h"},
- new String[] {"a", "b", "c", "d", "e", "f", "g", "h", "i"}, new String[] {"a"}};
+ String[][] tests = {new String[]{"a", "b", "c", "d"}, new String[]{"a", "b", "c"},
+ new String[]{"a", "b", "c", "d", "e"}, new String[]{"a", "b", "c", "d", "e", "f", "g"},
+ new String[]{"a", "b", "c", "d", "e", "f", "g", "h"},
+ new String[]{"a", "b", "c", "d", "e", "f", "g", "h", "i"}, new String[]{"a"}};
for (String[] suffixes : tests) {
for (int maxTS = 1; maxTS <= 4; maxTS++) {
@@ -219,10 +219,10 @@ public class GroupBalancerTest {
@Test
public void testTwoGroups() {
- String tests[][] = {new String[] {"a", "b", "c", "d"}, new String[] {"a", "b", "c"},
- new String[] {"a", "b", "c", "d", "e"}, new String[] {"a", "b", "c", "d", "e", "f", "g"},
- new String[] {"a", "b", "c", "d", "e", "f", "g", "h"},
- new String[] {"a", "b", "c", "d", "e", "f", "g", "h", "i"}, new String[] {"a"}};
+ String[][] tests = {new String[]{"a", "b", "c", "d"}, new String[]{"a", "b", "c"},
+ new String[]{"a", "b", "c", "d", "e"}, new String[]{"a", "b", "c", "d", "e", "f", "g"},
+ new String[]{"a", "b", "c", "d", "e", "f", "g", "h"},
+ new String[]{"a", "b", "c", "d", "e", "f", "g", "h", "i"}, new String[]{"a"}};
for (String[] suffixes1 : tests) {
for (String[] suffixes2 : tests) {
@@ -248,10 +248,10 @@ public class GroupBalancerTest {
@Test
public void testThreeGroups() {
- String tests[][] = {new String[] {"a", "b", "c", "d"}, new String[] {"a", "b", "c"},
- new String[] {"a", "b", "c", "d", "e"}, new String[] {"a", "b", "c", "d", "e", "f", "g"},
- new String[] {"a", "b", "c", "d", "e", "f", "g", "h"},
- new String[] {"a", "b", "c", "d", "e", "f", "g", "h", "i"}, new String[] {"a"}};
+ String[][] tests = {new String[]{"a", "b", "c", "d"}, new String[]{"a", "b", "c"},
+ new String[]{"a", "b", "c", "d", "e"}, new String[]{"a", "b", "c", "d", "e", "f", "g"},
+ new String[]{"a", "b", "c", "d", "e", "f", "g", "h"},
+ new String[]{"a", "b", "c", "d", "e", "f", "g", "h", "i"}, new String[]{"a"}};
for (String[] suffixes1 : tests) {
for (String[] suffixes2 : tests) {
diff --git a/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java b/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
index 4f9e72a..6646e85 100644
--- a/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
+++ b/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
@@ -392,7 +392,7 @@ public class SimpleGarbageCollector implements Iface {
synchronized (SimpleGarbageCollector.this) {
++status.current.errors;
}
- String parts[] = fullPath.toString().split(Constants.ZTABLES)[1].split("/");
+ String[] parts = fullPath.toString().split(Constants.ZTABLES)[1].split("/");
if (parts.length > 2) {
TableId tableId = TableId.of(parts[1]);
String tabletDir = parts[2];
@@ -649,7 +649,7 @@ public class SimpleGarbageCollector implements Iface {
} else {
processor = new Processor<>(rpcProxy);
}
- int port[] = getConfiguration().getPort(Property.GC_PORT);
+ int[] port = getConfiguration().getPort(Property.GC_PORT);
HostAndPort[] addresses = TServerUtils.getHostAndPorts(this.opts.getAddress(), port);
long maxMessageSize = getConfiguration().getAsBytes(Property.GENERAL_MAX_MESSAGE_SIZE);
try {
diff --git a/server/master/src/main/java/org/apache/accumulo/master/Master.java b/server/master/src/main/java/org/apache/accumulo/master/Master.java
index 1dbe0cb..3e5fd7f 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/Master.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java
@@ -240,15 +240,15 @@ public class Master
static final boolean X = true;
static final boolean O = false;
// @formatter:off
- static final boolean transitionOK[][] = {
+ static final boolean[][] transitionOK = {
// INITIAL HAVE_LOCK SAFE_MODE NORMAL UNLOAD_META UNLOAD_ROOT STOP
- /* INITIAL */ {X, X, O, O, O, O, X},
- /* HAVE_LOCK */ {O, X, X, X, O, O, X},
- /* SAFE_MODE */ {O, O, X, X, X, O, X},
- /* NORMAL */ {O, O, X, X, X, O, X},
- /* UNLOAD_METADATA_TABLETS */ {O, O, X, X, X, X, X},
- /* UNLOAD_ROOT_TABLET */ {O, O, O, X, X, X, X},
- /* STOP */ {O, O, O, O, O, X, X}};
+ /* INITIAL */ {X, X, O, O, O, O, X},
+ /* HAVE_LOCK */ {O, X, X, X, O, O, X},
+ /* SAFE_MODE */ {O, O, X, X, X, O, X},
+ /* NORMAL */ {O, O, X, X, X, O, X},
+ /* UNLOAD_METADATA_TABLETS */ {O, O, X, X, X, X, X},
+ /* UNLOAD_ROOT_TABLET */ {O, O, O, X, X, X, X},
+ /* STOP */ {O, O, O, O, O, X, X}};
//@formatter:on
synchronized void setMasterState(MasterState newState) {
if (state.equals(newState))
@@ -371,7 +371,7 @@ public class Master
// is the entire instance set to use flushing vs sync?
boolean flushDefault = false;
try {
- byte data[] = zoo.getData(zpath, null);
+ byte[] data = zoo.getData(zpath, null);
if (new String(data, UTF_8).endsWith("flush")) {
flushDefault = true;
}
diff --git a/server/master/src/main/java/org/apache/accumulo/master/MasterClientServiceHandler.java b/server/master/src/main/java/org/apache/accumulo/master/MasterClientServiceHandler.java
index c49d325..a9db7c2 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/MasterClientServiceHandler.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/MasterClientServiceHandler.java
@@ -118,7 +118,7 @@ public class MasterClientServiceHandler extends FateServiceHandler
+ tableId + Constants.ZTABLE_FLUSH_ID;
IZooReaderWriter zoo = master.getContext().getZooReaderWriter();
- byte fid[];
+ byte[] fid;
try {
fid = zoo.mutate(zTablePath, null, null, new Mutator() {
@Override
diff --git a/server/master/src/main/java/org/apache/accumulo/master/recovery/RecoveryManager.java b/server/master/src/main/java/org/apache/accumulo/master/recovery/RecoveryManager.java
index 8f4e019..fbffc03 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/recovery/RecoveryManager.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/recovery/RecoveryManager.java
@@ -147,7 +147,7 @@ public class RecoveryManager {
walog = switchedWalog;
}
- String parts[] = walog.split("/");
+ String[] parts = walog.split("/");
String sortId = parts[parts.length - 1];
String filename = master.getFileSystem().getFullPath(FileType.WAL, walog).toString();
String dest = RecoveryPath.getRecoveryPath(new Path(filename)).toString();
diff --git a/server/master/src/main/java/org/apache/accumulo/master/state/TableCounts.java b/server/master/src/main/java/org/apache/accumulo/master/state/TableCounts.java
index dd44bc6..1e54c3d 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/state/TableCounts.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/state/TableCounts.java
@@ -19,7 +19,7 @@ package org.apache.accumulo.master.state;
import org.apache.accumulo.server.master.state.TabletState;
public class TableCounts {
- int counts[] = new int[TabletState.values().length];
+ int[] counts = new int[TabletState.values().length];
public int unassigned() {
return counts[TabletState.UNASSIGNED.ordinal()];
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/bulkVer1/BulkImport.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/bulkVer1/BulkImport.java
index 83a59f6..2b401a5 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/bulkVer1/BulkImport.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/bulkVer1/BulkImport.java
@@ -204,7 +204,7 @@ public class BulkImport extends MasterRepo {
final FileStatus fileStatus = file;
results.add(workers.submit(() -> {
try {
- String sa[] = fileStatus.getPath().getName().split("\\.");
+ String[] sa = fileStatus.getPath().getName().split("\\.");
String extension = "";
if (sa.length > 1) {
extension = sa[sa.length - 1];
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/bulkVer2/PrepBulkImport.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/bulkVer2/PrepBulkImport.java
index 30b8ebb..c660962 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/bulkVer2/PrepBulkImport.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/bulkVer2/PrepBulkImport.java
@@ -188,7 +188,7 @@ public class PrepBulkImport extends MasterRepo {
for (FileStatus file : files) {
final FileStatus fileStatus = file;
final Path originalPath = fileStatus.getPath();
- String fileNameParts[] = originalPath.getName().split("\\.");
+ String[] fileNameParts = originalPath.getName().split("\\.");
String extension = "";
boolean invalidFileName;
if (fileNameParts.length > 1) {
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/tableExport/WriteExportFiles.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/tableExport/WriteExportFiles.java
index d3386e8..2a4ce91 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/tableExport/WriteExportFiles.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/tableExport/WriteExportFiles.java
@@ -230,7 +230,7 @@ class WriteExportFiles extends MasterRepo {
if (entry.getKey().getColumnFamily().equals(DataFileColumnFamily.NAME)) {
String path = fs.getFullPath(entry.getKey()).toString();
- String tokens[] = path.split("/");
+ String[] tokens = path.split("/");
if (tokens.length < 1) {
throw new RuntimeException("Illegal path " + path);
}
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/tableImport/ImportTable.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/tableImport/ImportTable.java
index aad8671..514d991 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/tableImport/ImportTable.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/tableImport/ImportTable.java
@@ -97,7 +97,7 @@ public class ImportTable extends MasterRepo {
BufferedReader in = new BufferedReader(new InputStreamReader(zis, UTF_8));
String line = null;
while ((line = in.readLine()) != null) {
- String sa[] = line.split(":", 2);
+ String[] sa = line.split(":", 2);
if (sa[0].equals(ExportTable.EXPORT_VERSION_PROP)) {
exportVersion = Integer.parseInt(sa[1]);
} else if (sa[0].equals(ExportTable.DATA_VERSION_PROP)) {
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/tableImport/MapImportFileNames.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/tableImport/MapImportFileNames.java
index 48cfc00..651e62a 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/tableImport/MapImportFileNames.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/tableImport/MapImportFileNames.java
@@ -69,7 +69,7 @@ class MapImportFileNames extends MasterRepo {
for (FileStatus fileStatus : files) {
String fileName = fileStatus.getPath().getName();
log.info("filename " + fileStatus.getPath());
- String sa[] = fileName.split("\\.");
+ String[] sa = fileName.split("\\.");
String extension = "";
if (sa.length > 1) {
extension = sa[sa.length - 1];
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/tableImport/PopulateMetadataTable.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/tableImport/PopulateMetadataTable.java
index 09b926f..18fc179 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/tableImport/PopulateMetadataTable.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/tableImport/PopulateMetadataTable.java
@@ -75,7 +75,7 @@ class PopulateMetadataTable extends MasterRepo {
String line = null;
while ((line = in.readLine()) != null) {
- String sa[] = line.split(":", 2);
+ String[] sa = line.split(":", 2);
map.put(sa[0], sa[1]);
}
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
index d4e79f5..b23d47d 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
@@ -450,7 +450,7 @@ public class Monitor implements HighlyAvailableService {
public void run() {
Monitor.START_TIME = System.currentTimeMillis();
- int ports[] = config.getSystemConfiguration().getPort(Property.MONITOR_PORT);
+ int[] ports = config.getSystemConfiguration().getPort(Property.MONITOR_PORT);
for (int port : ports) {
try {
log.debug("Creating monitor on port {}", port);
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/ZooKeeperStatus.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/ZooKeeperStatus.java
index 3ebb9ac..9a0979f 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/ZooKeeperStatus.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/ZooKeeperStatus.java
@@ -100,7 +100,7 @@ public class ZooKeeperStatus implements Runnable {
TreeSet<ZooKeeperState> update = new TreeSet<>();
- String zookeepers[] = context.getConfiguration().get(Property.INSTANCE_ZK_HOST).split(",");
+ String[] zookeepers = context.getConfiguration().get(Property.INSTANCE_ZK_HOST).split(",");
for (String keeper : zookeepers) {
int clients = 0;
String mode = "unknown";
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/trace/RecentTracesInformation.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/trace/RecentTracesInformation.java
index a0168bf..9f164d9 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/trace/RecentTracesInformation.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/trace/RecentTracesInformation.java
@@ -35,7 +35,7 @@ public class RecentTracesInformation {
public long max = Long.MIN_VALUE;
private long totalMS = 0L;
- public long histogram[] = {0L, 0L, 0L, 0L, 0L, 0L};
+ public long[] histogram = {0L, 0L, 0L, 0L, 0L, 0L};
public RecentTracesInformation() {}
diff --git a/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceServer.java b/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceServer.java
index da0f74e..58ed427 100644
--- a/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceServer.java
+++ b/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceServer.java
@@ -202,7 +202,7 @@ public class TraceServer implements Watcher, AutoCloseable {
tableName = conf.get(Property.TRACE_TABLE);
accumuloClient = ensureTraceTableExists(conf);
- int ports[] = conf.getPort(Property.TRACE_PORT);
+ int[] ports = conf.getPort(Property.TRACE_PORT);
ServerSocket sock = null;
for (int port : ports) {
ServerSocket s = ServerSocketChannel.open().socket();
diff --git a/server/tracer/src/test/java/org/apache/accumulo/tracer/TracerTest.java b/server/tracer/src/test/java/org/apache/accumulo/tracer/TracerTest.java
index df23b75..d9d19f7 100644
--- a/server/tracer/src/test/java/org/apache/accumulo/tracer/TracerTest.java
+++ b/server/tracer/src/test/java/org/apache/accumulo/tracer/TracerTest.java
@@ -185,7 +185,7 @@ public class TracerTest {
}
assertNotNull(tracer.traces.get(startTraceId));
- String traces[] = {"my test", "checkTrace", "client:checkTrace", "start"};
+ String[] traces = {"my test", "checkTrace", "client:checkTrace", "start"};
assertEquals(tracer.traces.get(startTraceId).size(), traces.length);
for (int i = 0; i < traces.length; i++)
assertEquals(traces[i], tracer.traces.get(startTraceId).get(i).description);
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/BulkFailedCopyProcessor.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/BulkFailedCopyProcessor.java
index 5019993..a8da081 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/BulkFailedCopyProcessor.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/BulkFailedCopyProcessor.java
@@ -50,7 +50,7 @@ public class BulkFailedCopyProcessor implements Processor {
@Override
public void process(String workID, byte[] data) {
- String paths[] = new String(data, UTF_8).split(",");
+ String[] paths = new String(data, UTF_8).split(",");
Path orig = new Path(paths[0]);
Path dest = new Path(paths[1]);
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
index 7900ded..4ac2f82 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
@@ -281,7 +281,7 @@ public class InMemoryMap {
private PreAllocatedArray<Map<ByteSequence,MutableLong>> groupFams;
// the last map in the array is the default locality group
- private SimpleMap maps[];
+ private SimpleMap[] maps;
private Partitioner partitioner;
private PreAllocatedArray<List<Mutation>> partitioned;
@@ -322,7 +322,7 @@ public class InMemoryMap {
if (samplerConfig != null)
throw new SampleNotPresentException();
- LocalityGroup groups[] = new LocalityGroup[maps.length];
+ LocalityGroup[] groups = new LocalityGroup[maps.length];
for (int i = 0; i < groups.length; i++) {
if (i < groupFams.length)
groups[i] = new LocalityGroup(maps[i].skvIterator(null), groupFams.get(i), false);
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
index 7d238a4..dc981d4 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
@@ -192,13 +192,13 @@ public class NativeMap implements Iterable<Map.Entry<Key,Value>> {
// private static native void putNM(long nmPointer, byte[] kd, int cfo, int cqo, int cvo, int tl,
// long ts, boolean del, byte[] value);
- private static native void singleUpdate(long nmPointer, byte[] row, byte cf[], byte cq[],
- byte cv[], long ts, boolean del, byte[] value, int mutationCount);
+ private static native void singleUpdate(long nmPointer, byte[] row, byte[] cf, byte[] cq,
+ byte[] cv, long ts, boolean del, byte[] value, int mutationCount);
private static native long startUpdate(long nmPointer, byte[] row);
- private static native void update(long nmPointer, long updateID, byte cf[], byte cq[], byte cv[],
- long ts, boolean del, byte[] value, int mutationCount);
+ private static native void update(long nmPointer, long updateID, byte[] cf, byte[] cq, byte[] cv,
+ long ts, boolean del, byte[] value, int mutationCount);
private static native int sizeNM(long nmPointer);
@@ -248,15 +248,15 @@ public class NativeMap implements Iterable<Map.Entry<Key,Value>> {
}
}
- private static native long createNMI(long nmp, int fieldLens[]);
+ private static native long createNMI(long nmp, int[] fieldLens);
- private static native long createNMI(long nmp, byte[] row, byte cf[], byte cq[], byte cv[],
- long ts, boolean del, int fieldLens[]);
+ private static native long createNMI(long nmp, byte[] row, byte[] cf, byte[] cq, byte[] cv,
+ long ts, boolean del, int[] fieldLens);
- private static native boolean nmiNext(long nmiPointer, int fieldLens[]);
+ private static native boolean nmiNext(long nmiPointer, int[] fieldLens);
- private static native void nmiGetData(long nmiPointer, byte[] row, byte cf[], byte cq[],
- byte cv[], byte[] valData);
+ private static native void nmiGetData(long nmiPointer, byte[] row, byte[] cf, byte[] cq,
+ byte[] cv, byte[] valData);
private static native long nmiGetTS(long nmiPointer);
@@ -389,7 +389,7 @@ public class NativeMap implements Iterable<Map.Entry<Key,Value>> {
private boolean hasNext;
private int expectedModCount;
private int[] fieldsLens = new int[7];
- private byte lastRow[];
+ private byte[] lastRow;
// it is assumed the read lock is held when this method is called
NMIterator(Key key) {
@@ -458,11 +458,11 @@ public class NativeMap implements Iterable<Map.Entry<Key,Value>> {
lastRow = row;
}
- byte cf[] = new byte[fieldsLens[1]];
- byte cq[] = new byte[fieldsLens[2]];
- byte cv[] = new byte[fieldsLens[3]];
+ byte[] cf = new byte[fieldsLens[1]];
+ byte[] cq = new byte[fieldsLens[2]];
+ byte[] cv = new byte[fieldsLens[3]];
boolean deleted = fieldsLens[4] != 0;
- byte val[] = new byte[fieldsLens[5]];
+ byte[] val = new byte[fieldsLens[5]];
nmiGetData(nmiPointer, row, cf, cq, cv, val);
long ts = nmiGetTS(nmiPointer);
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
index 58b251e..b999882 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
@@ -653,7 +653,7 @@ public class DfsLogger implements Comparable<DfsLogger> {
}
public String getLogger() {
- String parts[] = logPath.split("/");
+ String[] parts = logPath.split("/");
return Joiner.on(":").join(parts[parts.length - 2].split("[+]"));
}
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/logger/LogReader.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/logger/LogReader.java
index 37f19af..2f38fd9 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/logger/LogReader.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/logger/LogReader.java
@@ -89,7 +89,7 @@ public class LogReader {
if (opts.row != null)
row = new Text(opts.row);
if (opts.extent != null) {
- String sa[] = opts.extent.split(";");
+ String[] sa = opts.extent.split(";");
ke = new KeyExtent(TableId.of(sa[0]), new Text(sa[1]), new Text(sa[2]));
}
if (opts.regexp != null) {
diff --git a/server/tserver/src/test/java/org/apache/accumulo/tserver/InMemoryMapTest.java b/server/tserver/src/test/java/org/apache/accumulo/tserver/InMemoryMapTest.java
index 951d5da..87c32dd 100644
--- a/server/tserver/src/test/java/org/apache/accumulo/tserver/InMemoryMapTest.java
+++ b/server/tserver/src/test/java/org/apache/accumulo/tserver/InMemoryMapTest.java
@@ -520,7 +520,7 @@ public class InMemoryMapTest {
List<Double> timings = new ArrayList<>();
for (int threads : new int[] {1, 2, 16, /* 64, 256 */}) {
final long now = System.currentTimeMillis();
- final long counts[] = new long[threads];
+ final long[] counts = new long[threads];
final InMemoryMap imm = newInMemoryMap(false, tempFolder.newFolder().getAbsolutePath());
ExecutorService e = Executors.newFixedThreadPool(threads);
for (int j = 0; j < threads; j++) {
diff --git a/server/tserver/src/test/java/org/apache/accumulo/tserver/log/SortedLogRecoveryTest.java b/server/tserver/src/test/java/org/apache/accumulo/tserver/log/SortedLogRecoveryTest.java
index 7278303..b91bfd7 100644
--- a/server/tserver/src/test/java/org/apache/accumulo/tserver/log/SortedLogRecoveryTest.java
+++ b/server/tserver/src/test/java/org/apache/accumulo/tserver/log/SortedLogRecoveryTest.java
@@ -179,22 +179,22 @@ public class SortedLogRecoveryTest {
m.put(cf, cq, value);
Mutation m2 = new ServerMutation(new Text("row2"));
m2.put(cf, cq, value);
- KeyValue entries[] = {createKeyValue(OPEN, 0, 1, "2"),
+ KeyValue[] entries = {createKeyValue(OPEN, 0, 1, "2"),
createKeyValue(DEFINE_TABLET, 1, 1, extent),
createKeyValue(COMPACTION_START, 3, 1, "/t1/f1"), createKeyValue(MUTATION, 2, 1, ignored),
createKeyValue(MUTATION, 4, 1, ignored),};
- KeyValue entries2[] = {createKeyValue(OPEN, 0, 1, "2"),
+ KeyValue[] entries2 = {createKeyValue(OPEN, 0, 1, "2"),
createKeyValue(DEFINE_TABLET, 1, 1, extent),
createKeyValue(COMPACTION_START, 4, 1, "/t1/f1"), createKeyValue(MUTATION, 7, 1, m),};
- KeyValue entries3[] = {createKeyValue(OPEN, 0, 2, "23"),
+ KeyValue[] entries3 = {createKeyValue(OPEN, 0, 2, "23"),
createKeyValue(DEFINE_TABLET, 1, 1, extent),
createKeyValue(COMPACTION_START, 5, 1, "/t1/f2"),
createKeyValue(COMPACTION_FINISH, 6, 1, null), createKeyValue(MUTATION, 3, 1, ignored),
createKeyValue(MUTATION, 4, 1, ignored),};
- KeyValue entries4[] = {createKeyValue(OPEN, 0, 3, "69"),
+ KeyValue[] entries4 = {createKeyValue(OPEN, 0, 3, "69"),
createKeyValue(DEFINE_TABLET, 1, 1, extent), createKeyValue(MUTATION, 2, 1, ignored),
createKeyValue(MUTATION, 3, 1, ignored), createKeyValue(MUTATION, 4, 1, ignored),};
- KeyValue entries5[] = {createKeyValue(OPEN, 0, 4, "70"),
+ KeyValue[] entries5 = {createKeyValue(OPEN, 0, 4, "70"),
createKeyValue(DEFINE_TABLET, 1, 1, extent),
createKeyValue(COMPACTION_START, 3, 1, "/t1/f3"), createKeyValue(MUTATION, 2, 1, ignored),
createKeyValue(MUTATION, 6, 1, m2),};
@@ -228,14 +228,14 @@ public class SortedLogRecoveryTest {
m3.put(cf, cq, value);
Mutation m4 = new ServerMutation(new Text("row4"));
m4.put(cf, cq, value);
- KeyValue entries[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 1, 1, extent),
createKeyValue(COMPACTION_START, 3, 1, "/t1/f1"), createKeyValue(MUTATION, 2, 1, ignored),
createKeyValue(MUTATION, 4, 1, ignored),};
- KeyValue entries2[] = {createKeyValue(OPEN, 5, -1, "2"),
+ KeyValue[] entries2 = {createKeyValue(OPEN, 5, -1, "2"),
createKeyValue(DEFINE_TABLET, 6, 1, extent), createKeyValue(MUTATION, 7, 1, ignored),};
// createKeyValue(COMPACTION_FINISH, 14, 1, null),
- KeyValue entries3[] = {createKeyValue(OPEN, 8, -1, "3"),
+ KeyValue[] entries3 = {createKeyValue(OPEN, 8, -1, "3"),
createKeyValue(DEFINE_TABLET, 9, 1, extent),
createKeyValue(COMPACTION_FINISH, 10, 1, "/t1/f1"),
createKeyValue(COMPACTION_START, 12, 1, "/t1/f2"),
@@ -243,7 +243,7 @@ public class SortedLogRecoveryTest {
// createKeyValue(COMPACTION_FINISH, 14, 1, null),
createKeyValue(MUTATION, 11, 1, ignored), createKeyValue(MUTATION, 15, 1, m),
createKeyValue(MUTATION, 16, 1, m2),};
- KeyValue entries4[] = {createKeyValue(OPEN, 17, -1, "4"),
+ KeyValue[] entries4 = {createKeyValue(OPEN, 17, -1, "4"),
createKeyValue(DEFINE_TABLET, 18, 1, extent),
createKeyValue(COMPACTION_START, 20, 1, "/t1/f3"), createKeyValue(MUTATION, 19, 1, m3),
createKeyValue(MUTATION, 21, 1, m4),};
@@ -277,10 +277,10 @@ public class SortedLogRecoveryTest {
m4.put(cf, cq, value);
Mutation m5 = new ServerMutation(new Text("row5"));
m5.put(cf, cq, value);
- KeyValue entries[] = {createKeyValue(OPEN, 0, 1, "2"),
+ KeyValue[] entries = {createKeyValue(OPEN, 0, 1, "2"),
createKeyValue(DEFINE_TABLET, 1, 1, extent), createKeyValue(MUTATION, 1, 1, ignored),
createKeyValue(MUTATION, 3, 1, m),};
- KeyValue entries2[] = {createKeyValue(OPEN, 0, 1, "2"),
+ KeyValue[] entries2 = {createKeyValue(OPEN, 0, 1, "2"),
createKeyValue(DEFINE_TABLET, 1, 1, extent),
createKeyValue(COMPACTION_START, 2, 1, "/t1/f1"),
createKeyValue(COMPACTION_FINISH, 3, 1, "/t1/f1"), createKeyValue(MUTATION, 3, 1, m2),};
@@ -301,7 +301,7 @@ public class SortedLogRecoveryTest {
@Test
public void testEmpty() throws IOException {
// Create a test log
- KeyValue entries[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 1, 1, extent),};
Map<String,KeyValue[]> logs = new TreeMap<>();
logs.put("testlog", entries);
@@ -315,7 +315,7 @@ public class SortedLogRecoveryTest {
@Test
public void testMissingDefinition() {
// Create a test log
- KeyValue entries[] = {createKeyValue(OPEN, 0, -1, "1"),};
+ KeyValue[] entries = {createKeyValue(OPEN, 0, -1, "1"),};
Map<String,KeyValue[]> logs = new TreeMap<>();
logs.put("testlog", entries);
// Recover
@@ -330,7 +330,7 @@ public class SortedLogRecoveryTest {
// Create a test log
Mutation m = new ServerMutation(new Text("row1"));
m.put(cf, cq, value);
- KeyValue entries[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 1, 1, extent), createKeyValue(MUTATION, 2, 1, m),};
Map<String,KeyValue[]> logs = new TreeMap<>();
logs.put("testlog", entries);
@@ -348,7 +348,7 @@ public class SortedLogRecoveryTest {
ignored.put(cf, cq, value);
Mutation m = new ServerMutation(new Text("row1"));
m.put(cf, cq, value);
- KeyValue entries[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 1, 1, extent),
createKeyValue(COMPACTION_START, 3, 1, "/t1/f1"),
createKeyValue(COMPACTION_FINISH, 4, 1, null), createKeyValue(MUTATION, 2, 1, ignored),
@@ -369,10 +369,10 @@ public class SortedLogRecoveryTest {
ignored.put(cf, cq, value);
Mutation m = new ServerMutation(new Text("row1"));
m.put(cf, cq, value);
- KeyValue entries[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 1, 1, extent),
createKeyValue(COMPACTION_START, 3, 1, "/t1/f1"), createKeyValue(MUTATION, 2, 1, ignored),};
- KeyValue entries2[] = {createKeyValue(OPEN, 4, -1, "1"),
+ KeyValue[] entries2 = {createKeyValue(OPEN, 4, -1, "1"),
createKeyValue(DEFINE_TABLET, 5, 1, extent), createKeyValue(COMPACTION_FINISH, 6, 1, null),
createKeyValue(MUTATION, 7, 1, m),};
Map<String,KeyValue[]> logs = new TreeMap<>();
@@ -394,11 +394,11 @@ public class SortedLogRecoveryTest {
m.put(cf, cq, value);
Mutation m2 = new ServerMutation(new Text("row2"));
m2.put(cf, cq, new Value("123".getBytes()));
- KeyValue entries[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 1, 1, extent),
createKeyValue(COMPACTION_START, 3, 1, "/t1/f1"), createKeyValue(MUTATION, 2, 1, ignored),
createKeyValue(MUTATION, 4, 1, m),};
- KeyValue entries2[] = {createKeyValue(OPEN, 5, -1, "1"),
+ KeyValue[] entries2 = {createKeyValue(OPEN, 5, -1, "1"),
createKeyValue(DEFINE_TABLET, 4, 1, extent), createKeyValue(COMPACTION_FINISH, 4, 1, null),
createKeyValue(MUTATION, 8, 1, m2),};
Map<String,KeyValue[]> logs = new TreeMap<>();
@@ -421,7 +421,7 @@ public class SortedLogRecoveryTest {
m.put(cf, cq, value);
Mutation m2 = new ServerMutation(new Text("row2"));
m2.put(cf, cq, new Value("123".getBytes()));
- KeyValue entries[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 1, 1, extent), createKeyValue(COMPACTION_FINISH, 2, 1, null),
createKeyValue(COMPACTION_START, 4, 1, "/t1/f1"),
createKeyValue(COMPACTION_FINISH, 5, 1, null), createKeyValue(MUTATION, 3, 1, ignored),
@@ -447,13 +447,13 @@ public class SortedLogRecoveryTest {
m2.put(cf, cq, value);
Mutation m3 = new ServerMutation(new Text("row3"));
m3.put(cf, cq, value);
- KeyValue entries[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 1, 1, extent),
createKeyValue(COMPACTION_START, 3, 1, "/t1/f1"), createKeyValue(MUTATION, 2, 1, ignored),
createKeyValue(MUTATION, 4, 1, m),};
- KeyValue entries2[] = {createKeyValue(OPEN, 5, -1, "1"),
+ KeyValue[] entries2 = {createKeyValue(OPEN, 5, -1, "1"),
createKeyValue(DEFINE_TABLET, 4, 1, extent), createKeyValue(MUTATION, 4, 1, m2),};
- KeyValue entries3[] = {createKeyValue(OPEN, 8, -1, "1"),
+ KeyValue[] entries3 = {createKeyValue(OPEN, 8, -1, "1"),
createKeyValue(DEFINE_TABLET, 4, 1, extent), createKeyValue(COMPACTION_FINISH, 4, 1, null),
createKeyValue(MUTATION, 4, 1, m3),};
Map<String,KeyValue[]> logs = new TreeMap<>();
@@ -476,7 +476,7 @@ public class SortedLogRecoveryTest {
m1.put(cf, cq, value);
Mutation m2 = new ServerMutation(new Text("row2"));
m2.put(cf, cq, value);
- KeyValue entries[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 1, 1, extent),
createKeyValue(COMPACTION_START, 30, 1, "/t1/f1"),
createKeyValue(COMPACTION_FINISH, 32, 1, "/t1/f1"), createKeyValue(MUTATION, 29, 1, m1),
@@ -500,11 +500,11 @@ public class SortedLogRecoveryTest {
m2.put(cf, cq, value);
Mutation m3 = new ServerMutation(new Text("row3"));
m3.put(cf, cq, value);
- KeyValue entries[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 1, 1, extent),
createKeyValue(COMPACTION_START, 3, 1, "/t1/f1"),
createKeyValue(COMPACTION_FINISH, 4, 1, null), createKeyValue(MUTATION, 4, 1, m),};
- KeyValue entries2[] = {createKeyValue(OPEN, 5, -1, "1"),
+ KeyValue[] entries2 = {createKeyValue(OPEN, 5, -1, "1"),
createKeyValue(DEFINE_TABLET, 6, 1, extent),
createKeyValue(COMPACTION_START, 8, 1, "/t1/f1"), createKeyValue(MUTATION, 7, 1, m2),
createKeyValue(MUTATION, 9, 1, m3),};
@@ -538,12 +538,12 @@ public class SortedLogRecoveryTest {
Mutation m6 = new ServerMutation(new Text("row6"));
m6.put(cf, cq, value);
// createKeyValue(COMPACTION_FINISH, 5, 1, null),
- KeyValue entries[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 1, 1, extent),
createKeyValue(COMPACTION_START, 4, 1, "/t1/f1"),
// createKeyValue(COMPACTION_FINISH, 5, 1, null),
createKeyValue(MUTATION, 2, 1, m), createKeyValue(MUTATION, 3, 1, m2),};
- KeyValue entries2[] = {createKeyValue(OPEN, 5, -1, "2"),
+ KeyValue[] entries2 = {createKeyValue(OPEN, 5, -1, "2"),
createKeyValue(DEFINE_TABLET, 6, 1, extent), createKeyValue(MUTATION, 7, 1, m3),
createKeyValue(MUTATION, 8, 1, m4),};
// createKeyValue(COMPACTION_FINISH, 11, 1, null),
@@ -552,7 +552,7 @@ public class SortedLogRecoveryTest {
// createKeyValue(COMPACTION_FINISH, 17, 1, null),
// createKeyValue(COMPACTION_START, 18, 1, "somefile"),
// createKeyValue(COMPACTION_FINISH, 19, 1, null),
- KeyValue entries3[] = {createKeyValue(OPEN, 9, -1, "3"),
+ KeyValue[] entries3 = {createKeyValue(OPEN, 9, -1, "3"),
createKeyValue(DEFINE_TABLET, 10, 1, extent),
// createKeyValue(COMPACTION_FINISH, 11, 1, null),
createKeyValue(COMPACTION_START, 12, 1, "/t1/f1"),
@@ -594,13 +594,13 @@ public class SortedLogRecoveryTest {
m4.put(cf, cq, value);
Mutation m5 = new ServerMutation(new Text("row5"));
m5.put(cf, cq, value);
- KeyValue entries[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 1, 1, extent),
createKeyValue(COMPACTION_START, 2, 1, "/t1/f1"),
createKeyValue(COMPACTION_FINISH, 3, 1, null), createKeyValue(MUTATION, 1, 1, ignored),
createKeyValue(MUTATION, 3, 1, m), createKeyValue(MUTATION, 3, 1, m2),
createKeyValue(MUTATION, 3, 1, m3),};
- KeyValue entries2[] = {createKeyValue(OPEN, 0, -1, "2"),
+ KeyValue[] entries2 = {createKeyValue(OPEN, 0, -1, "2"),
createKeyValue(DEFINE_TABLET, 1, 1, extent),
createKeyValue(COMPACTION_START, 2, 1, "/t1/f12"), createKeyValue(MUTATION, 3, 1, m4),
createKeyValue(MUTATION, 3, 1, m5),};
@@ -629,7 +629,7 @@ public class SortedLogRecoveryTest {
Mutation m = new ServerMutation(new Text("row1"));
m.put("foo", "bar", "v1");
- KeyValue entries[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 1, 1, extent), createKeyValue(DEFINE_TABLET, 1, 2, extent),
createKeyValue(MUTATION, 2, 2, ignored), createKeyValue(COMPACTION_START, 5, 2, "/t1/f1"),
createKeyValue(MUTATION, 6, 2, m), createKeyValue(COMPACTION_FINISH, 6, 2, null),};
@@ -653,7 +653,7 @@ public class SortedLogRecoveryTest {
Mutation ignored = new ServerMutation(new Text("row1"));
ignored.put("foo", "bar", "v1");
- KeyValue entries[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 1, 2, extent), createKeyValue(MUTATION, 2, 2, ignored),
createKeyValue(COMPACTION_START, 3, 2, "/t/f1")};
@@ -676,7 +676,7 @@ public class SortedLogRecoveryTest {
Mutation m = new ServerMutation(new Text("row1"));
m.put("foo", "bar", "v2");
- KeyValue entries[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 1, 2, extent), createKeyValue(MUTATION, 2, 2, ignored),
createKeyValue(COMPACTION_START, 3, 2, "/t/f1"), createKeyValue(MUTATION, 4, 2, m),};
@@ -701,12 +701,12 @@ public class SortedLogRecoveryTest {
Mutation m2 = new ServerMutation(new Text("r2"));
m2.put("f1", "q1", "v2");
- KeyValue entries1[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries1 = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 100, 10, extent), createKeyValue(MUTATION, 100, 10, m1),
createKeyValue(COMPACTION_START, 101, 10, "/t/f1"),
createKeyValue(COMPACTION_FINISH, 102, 10, null)};
- KeyValue entries2[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries2 = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 1, 20, extent), createKeyValue(MUTATION, 1, 20, m2)};
Arrays.sort(entries1);
@@ -738,7 +738,7 @@ public class SortedLogRecoveryTest {
Mutation m4 = new ServerMutation(new Text("s"));
m4.put("f1", "q2", "v4");
- KeyValue entries1[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries1 = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 7, 10, e1), createKeyValue(DEFINE_TABLET, 5, 11, e2),
createKeyValue(MUTATION, 8, 10, m1), createKeyValue(COMPACTION_START, 9, 10, "/t/f1"),
createKeyValue(MUTATION, 10, 10, m2), createKeyValue(COMPACTION_FINISH, 10, 10, null),
@@ -759,7 +759,7 @@ public class SortedLogRecoveryTest {
assertEquals(m3, mutations2.get(0));
assertEquals(m4, mutations2.get(1));
- KeyValue entries2[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries2 = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 9, 11, e2), createKeyValue(COMPACTION_FINISH, 8, 11, null)};
Arrays.sort(entries2);
logs.put("entries2", entries2);
@@ -776,7 +776,7 @@ public class SortedLogRecoveryTest {
Mutation m2 = new ServerMutation(new Text("row1"));
m2.put("foo", "bar", "v2");
- KeyValue entries[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 1, 2, extent), createKeyValue(MUTATION, 2, 2, m1),
createKeyValue(COMPACTION_START, 3, 2, compactionStartFile),
createKeyValue(MUTATION, 4, 2, m2),};
@@ -806,9 +806,9 @@ public class SortedLogRecoveryTest {
runPathTest(false, "/t1/f1", "/t1/f0");
runPathTest(true, "/t1/f1", "/t1/f0", "/t1/f1");
- String aliases[] = {"/t1/f1", "hdfs://nn1/accumulo/tables/8/t1/f1",
+ String[] aliases = {"/t1/f1", "hdfs://nn1/accumulo/tables/8/t1/f1",
"hdfs://1.2.3.4/accumulo/tables/8/t1/f1", "hdfs://1.2.3.4//accumulo//tables//8//t1//f1"};
- String others[] = {"/t1/f0", "hdfs://nn1/accumulo/tables/8/t1/f2",
+ String[] others = {"/t1/f0", "hdfs://nn1/accumulo/tables/8/t1/f2",
"hdfs://1.2.3.4//accumulo//tables//8//t1//f3", "hdfs://nn1/accumulo/tables/8/t1/t1",
"hdfs://nn1/accumulo/tables/8/f1/f1"};
@@ -837,7 +837,7 @@ public class SortedLogRecoveryTest {
// The presence of only a compaction finish event indicates the write ahead logs are incomplete
// in some way. This should cause an exception.
- KeyValue entries1[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries1 = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 100, 10, extent),
createKeyValue(COMPACTION_FINISH, 102, 10, null), createKeyValue(MUTATION, 102, 10, m1)};
@@ -862,7 +862,7 @@ public class SortedLogRecoveryTest {
// Consecutive compaction finish events indicate the write ahead logs are incomplete in some
// way. This should cause an exception.
- KeyValue entries1[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries1 = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 100, 10, extent), createKeyValue(MUTATION, 100, 10, m1),
createKeyValue(COMPACTION_START, 102, 10, "/t/f1"),
createKeyValue(COMPACTION_FINISH, 103, 10, null),
@@ -888,7 +888,7 @@ public class SortedLogRecoveryTest {
// Duplicate consecutive compaction finish events should not cause an exception.
- KeyValue entries1[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries1 = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 100, 10, extent), createKeyValue(MUTATION, 100, 10, m1),
createKeyValue(COMPACTION_START, 102, 10, "/t/f1"),
createKeyValue(COMPACTION_FINISH, 103, 10, null),
@@ -912,22 +912,22 @@ public class SortedLogRecoveryTest {
Mutation m2 = new ServerMutation(new Text("r2"));
m2.put("f1", "q1", "v2");
- KeyValue entries1[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries1 = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 100, 10, extent), createKeyValue(MUTATION, 100, 10, m1)};
- KeyValue entries2[] = {createKeyValue(OPEN, 0, -1, "1")};
+ KeyValue[] entries2 = {createKeyValue(OPEN, 0, -1, "1")};
- KeyValue entries3[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries3 = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 105, 10, extent),
createKeyValue(COMPACTION_START, 107, 10, "/t/f1")};
- KeyValue entries4[] = {};
+ KeyValue[] entries4 = {};
- KeyValue entries5[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries5 = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 107, 10, extent),
createKeyValue(COMPACTION_FINISH, 111, 10, null)};
- KeyValue entries6[] = {createKeyValue(OPEN, 0, -1, "1"),
+ KeyValue[] entries6 = {createKeyValue(OPEN, 0, -1, "1"),
createKeyValue(DEFINE_TABLET, 122, 10, extent), createKeyValue(MUTATION, 123, 10, m2)};
Arrays.sort(entries1);
@@ -986,7 +986,7 @@ public class SortedLogRecoveryTest {
// Its expected that every log file should have an open event as the first event. Should throw
// an error if not present.
- KeyValue entries1[] = {createKeyValue(DEFINE_TABLET, 100, 10, extent),
+ KeyValue[] entries1 = {createKeyValue(DEFINE_TABLET, 100, 10, extent),
createKeyValue(MUTATION, 100, 10, m1), createKeyValue(COMPACTION_FINISH, 102, 10, null),
createKeyValue(MUTATION, 105, 10, m2)};
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 7e2fb3b..5648198 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/Shell.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/Shell.java
@@ -517,7 +517,7 @@ public class Shell extends ShellOptions implements KeywordExecutable {
}
}
- public static void main(String args[]) throws IOException {
+ public static void main(String[] args) throws IOException {
new Shell(new ConsoleReader()).execute(args);
}
@@ -680,7 +680,7 @@ public class Shell extends ShellOptions implements KeywordExecutable {
return;
}
- String fields[];
+ String[] fields;
try {
fields = new QuotedStringTokenizer(input).getTokens();
} catch (BadArgumentException e) {
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 984490a..db41895 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
@@ -118,7 +118,7 @@ public class ConfigCommand extends Command {
throw new BadArgumentException("Missing '=' operator in set operation.", fullCommand,
fullCommand.indexOf(property));
}
- final String pair[] = property.split("=", 2);
+ final String[] pair = property.split("=", 2);
property = pair[0];
value = pair[1];
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 0f54482..ba58017 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
@@ -185,7 +185,7 @@ public class CreateTableCommand extends Command {
HashMap<String,Set<Text>> localityGroupMap = new HashMap<>();
String[] options = cl.getOptionValues(createTableOptLocalityProps.getOpt());
for (String localityInfo : options) {
- final String parts[] = localityInfo.split("=", 2);
+ final String[] parts = localityInfo.split("=", 2);
if (parts.length < 2)
throw new IllegalArgumentException("Missing '=' or there are spaces between entries");
final String groupName = parts[0];
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 327a1b1..963efb6 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
@@ -260,7 +260,7 @@ public class ScanCommand extends Command {
final ScanInterpreter formatter) throws UnsupportedEncodingException {
if (cl.hasOption(scanOptColumns.getOpt())) {
for (String a : cl.getOptionValue(scanOptColumns.getOpt()).split(",")) {
- final String sa[] = a.split(":", 2);
+ final String[] sa = a.split(":", 2);
if (sa.length == 1) {
scanner.fetchColumnFamily(
formatter.interpretColumnFamily(new Text(a.getBytes(Shell.CHARSET))));
diff --git a/shell/src/main/java/org/apache/accumulo/shell/commands/SetGroupsCommand.java b/shell/src/main/java/org/apache/accumulo/shell/commands/SetGroupsCommand.java
index 5aefd13..8384bbe 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/commands/SetGroupsCommand.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/commands/SetGroupsCommand.java
@@ -40,7 +40,7 @@ public class SetGroupsCommand extends Command {
final HashMap<String,Set<Text>> groups = new HashMap<>();
for (String arg : cl.getArgs()) {
- final String sa[] = arg.split("=", 2);
+ final String[] sa = arg.split("=", 2);
if (sa.length < 2) {
throw new IllegalArgumentException("Missing '='");
}
diff --git a/start/src/main/java/org/apache/accumulo/start/Main.java b/start/src/main/java/org/apache/accumulo/start/Main.java
index e3c517b..9415f03 100644
--- a/start/src/main/java/org/apache/accumulo/start/Main.java
+++ b/start/src/main/java/org/apache/accumulo/start/Main.java
@@ -180,7 +180,7 @@ public class Main {
public static String[] stripArgs(final String[] originalArgs, int numToStrip) {
int newSize = originalArgs.length - numToStrip;
- String newArgs[] = new String[newSize];
+ String[] newArgs = new String[newSize];
System.arraycopy(originalArgs, numToStrip, newArgs, 0, newSize);
return newArgs;
}
diff --git a/test/src/main/java/org/apache/accumulo/test/BalanceWithOfflineTableIT.java b/test/src/main/java/org/apache/accumulo/test/BalanceWithOfflineTableIT.java
index 32e0513..88ce36b 100644
--- a/test/src/main/java/org/apache/accumulo/test/BalanceWithOfflineTableIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/BalanceWithOfflineTableIT.java
@@ -42,7 +42,7 @@ public class BalanceWithOfflineTableIT extends ConfigurableMacBase {
@Test
public void test() throws Exception {
- final String tableNames[] = getUniqueNames(2);
+ final String[] tableNames = getUniqueNames(2);
final String tableName = tableNames[0];
// create a table with a bunch of splits
diff --git a/test/src/main/java/org/apache/accumulo/test/ConditionalWriterIT.java b/test/src/main/java/org/apache/accumulo/test/ConditionalWriterIT.java
index 10e156e..793f4c8 100644
--- a/test/src/main/java/org/apache/accumulo/test/ConditionalWriterIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/ConditionalWriterIT.java
@@ -1077,7 +1077,7 @@ public class ConditionalWriterIT extends AccumuloClusterHarness {
ByteSequence row = null;
int seq;
long sum;
- int data[] = new int[10];
+ int[] data = new int[10];
public Stats(Iterator<Entry<Key,Value>> iterator) {
while (iterator.hasNext()) {
diff --git a/test/src/main/java/org/apache/accumulo/test/LargeSplitRowIT.java b/test/src/main/java/org/apache/accumulo/test/LargeSplitRowIT.java
index 706d149..9d16f5d 100644
--- a/test/src/main/java/org/apache/accumulo/test/LargeSplitRowIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/LargeSplitRowIT.java
@@ -81,7 +81,7 @@ public class LargeSplitRowIT extends ConfigurableMacBase {
// Create a split point that is too large to be an end row and fill it with all 'm'
SortedSet<Text> partitionKeys = new TreeSet<>();
- byte data[] = new byte[(int) (ConfigurationTypeHelper
+ byte[] data = new byte[(int) (ConfigurationTypeHelper
.getFixedMemoryAsBytes(Property.TABLE_MAX_END_ROW_SIZE.getDefaultValue()) + 2)];
for (int i = 0; i < data.length; i++) {
data[i] = 'm';
@@ -136,7 +136,7 @@ public class LargeSplitRowIT extends ConfigurableMacBase {
// end row
// Fill this key with all m's except the last spot
BatchWriter batchWriter = client.createBatchWriter(tableName, new BatchWriterConfig());
- byte data[] = new byte[(int) (ConfigurationTypeHelper
+ byte[] data = new byte[(int) (ConfigurationTypeHelper
.getFixedMemoryAsBytes(Property.TABLE_MAX_END_ROW_SIZE.getDefaultValue()) + 2)];
for (int i = 0; i < data.length - 1; i++) {
data[i] = (byte) 'm';
@@ -213,7 +213,7 @@ public class LargeSplitRowIT extends ConfigurableMacBase {
// Create a BatchWriter and key for a table entry that is longer than the allowed size for an
// end row
BatchWriter batchWriter = client.createBatchWriter(tableName, new BatchWriterConfig());
- byte data[] = new byte[10];
+ byte[] data = new byte[10];
// Fill key with all j's except for last spot which alternates through 1 through 10 for every
// j
@@ -259,7 +259,7 @@ public class LargeSplitRowIT extends ConfigurableMacBase {
// Create a BatchWriter and key for a table entry that is longer than the allowed size for an
// end row
BatchWriter batchWriter = client.createBatchWriter(tableName, new BatchWriterConfig());
- byte data[] = new byte[(int) (ConfigurationTypeHelper
+ byte[] data = new byte[(int) (ConfigurationTypeHelper
.getFixedMemoryAsBytes(Property.TABLE_MAX_END_ROW_SIZE.getDefaultValue()) + 2)];
// Fill key with all j's except for last spot which alternates through 1 through 10 for every j
diff --git a/test/src/main/java/org/apache/accumulo/test/NewTableConfigurationIT.java b/test/src/main/java/org/apache/accumulo/test/NewTableConfigurationIT.java
index 88677e8..b98d73b 100644
--- a/test/src/main/java/org/apache/accumulo/test/NewTableConfigurationIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/NewTableConfigurationIT.java
@@ -660,7 +660,7 @@ public class NewTableConfigurationIT extends SharedMiniClusterBase {
expected.put("table.iterator.scan.vers.opt.maxVersions", "1");
}
for (String value : values) {
- String parts[] = value.split("=", 2);
+ String[] parts = value.split("=", 2);
expected.put(parts[0], parts[1]);
}
diff --git a/test/src/main/java/org/apache/accumulo/test/RecoveryCompactionsAreFlushesIT.java b/test/src/main/java/org/apache/accumulo/test/RecoveryCompactionsAreFlushesIT.java
index 13b0b16..cb87447 100644
--- a/test/src/main/java/org/apache/accumulo/test/RecoveryCompactionsAreFlushesIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/RecoveryCompactionsAreFlushesIT.java
@@ -94,7 +94,7 @@ public class RecoveryCompactionsAreFlushesIT extends AccumuloClusterHarness {
s.fetchColumnFamily(MetadataSchema.TabletsSection.DataFileColumnFamily.NAME);
for (Entry<Key,Value> entry : s) {
String filename = entry.getKey().getColumnQualifier().toString();
- String parts[] = filename.split("/");
+ String[] parts = filename.split("/");
assertFalse(parts[parts.length - 1].startsWith("M"));
}
}
diff --git a/test/src/main/java/org/apache/accumulo/test/RewriteTabletDirectoriesIT.java b/test/src/main/java/org/apache/accumulo/test/RewriteTabletDirectoriesIT.java
index a29a690..5068e0e 100644
--- a/test/src/main/java/org/apache/accumulo/test/RewriteTabletDirectoriesIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/RewriteTabletDirectoriesIT.java
@@ -112,7 +112,7 @@ public class RewriteTabletDirectoriesIT extends ConfigurableMacBase {
entry.getValue().toString().contains(v1.toString()));
count++;
if (count % 2 == 0) {
- String parts[] = entry.getValue().toString().split("/");
+ String[] parts = entry.getValue().toString().split("/");
Key key = entry.getKey();
Mutation m = new Mutation(key.getRow());
m.put(key.getColumnFamily(), key.getColumnQualifier(),
diff --git a/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java b/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
index 6f59e15..39abb04 100644
--- a/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
@@ -1599,7 +1599,7 @@ public class ShellServerIT extends SharedMiniClusterBase {
log.info("Ignoring scan because it doesn't contain 'RUNNING': {}", scan);
continue;
}
- String parts[] = scan.split("\\|");
+ String[] parts = scan.split("\\|");
assertEquals("Expected 14 colums, but found " + parts.length + " instead for '"
+ Arrays.toString(parts) + "'", 14, parts.length);
String tserver = parts[0].trim();
diff --git a/test/src/main/java/org/apache/accumulo/test/SplitRecoveryIT.java b/test/src/main/java/org/apache/accumulo/test/SplitRecoveryIT.java
index 0e0e802..07d9558 100644
--- a/test/src/main/java/org/apache/accumulo/test/SplitRecoveryIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/SplitRecoveryIT.java
@@ -130,7 +130,7 @@ public class SplitRecoveryIT extends AccumuloClusterHarness {
// verify the tablets went online
try (Scanner scanner = accumuloClient.createScanner(tableName, Authorizations.EMPTY)) {
int i = 0;
- String expected[] = {"a", "b", "c"};
+ String[] expected = {"a", "b", "c"};
for (Entry<Key,Value> entry : scanner) {
assertEquals(expected[i], entry.getKey().getRow().toString());
i++;
diff --git a/test/src/main/java/org/apache/accumulo/test/TestBinaryRows.java b/test/src/main/java/org/apache/accumulo/test/TestBinaryRows.java
index eb8d002..9009fa5 100644
--- a/test/src/main/java/org/apache/accumulo/test/TestBinaryRows.java
+++ b/test/src/main/java/org/apache/accumulo/test/TestBinaryRows.java
@@ -59,7 +59,7 @@ public class TestBinaryRows {
return ba;
}
- static long decodeLong(byte ba[]) {
+ static long decodeLong(byte[] ba) {
// validate byte array
if (ba.length > Long.SIZE / Byte.SIZE)
throw new IllegalArgumentException(
diff --git a/test/src/main/java/org/apache/accumulo/test/TestIngest.java b/test/src/main/java/org/apache/accumulo/test/TestIngest.java
index 2dc0d15..79025fb 100644
--- a/test/src/main/java/org/apache/accumulo/test/TestIngest.java
+++ b/test/src/main/java/org/apache/accumulo/test/TestIngest.java
@@ -164,14 +164,14 @@ public class TestIngest {
return bytevals;
}
- private static byte ROW_PREFIX[] = "row_".getBytes(UTF_8);
- private static byte COL_PREFIX[] = "col_".getBytes(UTF_8);
+ private static byte[] ROW_PREFIX = "row_".getBytes(UTF_8);
+ private static byte[] COL_PREFIX = "col_".getBytes(UTF_8);
public static Text generateRow(int rowid, int startRow) {
return new Text(FastFormat.toZeroPaddedString(rowid + startRow, 10, 10, ROW_PREFIX));
}
- public static byte[] genRandomValue(Random random, byte dest[], int seed, int row, int col) {
+ public static byte[] genRandomValue(Random random, byte[] dest, int seed, int row, int col) {
random.setSeed((row ^ seed) ^ col);
random.nextBytes(dest);
toPrintableChars(dest);
@@ -215,7 +215,7 @@ public class TestIngest {
byte[][] bytevals = generateValues(opts.dataSize);
- byte randomValue[] = new byte[opts.dataSize];
+ byte[] randomValue = new byte[opts.dataSize];
Random random = new Random();
long bytesWritten = 0;
@@ -272,7 +272,7 @@ public class TestIngest {
if (opts.delete) {
writer.append(key, new Value(new byte[0]));
} else {
- byte value[];
+ byte[] value;
if (opts.random != null) {
value = genRandomValue(random, randomValue, opts.random, rowid + opts.startRow, j);
} else {
@@ -294,7 +294,7 @@ public class TestIngest {
else
m.putDelete(colf, colq, opts.columnVisibility);
} else {
- byte value[];
+ byte[] value;
if (opts.random != null) {
value = genRandomValue(random, randomValue, opts.random, rowid + opts.startRow, j);
} else {
diff --git a/test/src/main/java/org/apache/accumulo/test/TotalQueuedIT.java b/test/src/main/java/org/apache/accumulo/test/TotalQueuedIT.java
index 78d9e01..b86ca83 100644
--- a/test/src/main/java/org/apache/accumulo/test/TotalQueuedIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/TotalQueuedIT.java
@@ -65,7 +65,7 @@ public class TotalQueuedIT extends ConfigurableMacBase {
c.tableOperations().setProperty(tableName, Property.TABLE_FILE_MAX.getKey(), "999");
sleepUninterruptibly(1, TimeUnit.SECONDS);
// get an idea of how fast the syncs occur
- byte row[] = new byte[250];
+ byte[] row = new byte[250];
BatchWriterConfig cfg = new BatchWriterConfig();
cfg.setMaxWriteThreads(10);
cfg.setMaxLatency(1, TimeUnit.SECONDS);
diff --git a/test/src/main/java/org/apache/accumulo/test/UserCompactionStrategyIT.java b/test/src/main/java/org/apache/accumulo/test/UserCompactionStrategyIT.java
index 2c25dce..79ee9d4 100644
--- a/test/src/main/java/org/apache/accumulo/test/UserCompactionStrategyIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/UserCompactionStrategyIT.java
@@ -317,7 +317,7 @@ public class UserCompactionStrategyIT extends AccumuloClusterHarness {
void writeRandomValue(AccumuloClient c, String tableName, int size) throws Exception {
Random rand = new SecureRandom();
- byte data1[] = new byte[size];
+ byte[] data1 = new byte[size];
rand.nextBytes(data1);
BatchWriter bw = c.createBatchWriter(tableName, new BatchWriterConfig());
diff --git a/test/src/main/java/org/apache/accumulo/test/VerifyIngest.java b/test/src/main/java/org/apache/accumulo/test/VerifyIngest.java
index 1a22939..21f0714 100644
--- a/test/src/main/java/org/apache/accumulo/test/VerifyIngest.java
+++ b/test/src/main/java/org/apache/accumulo/test/VerifyIngest.java
@@ -99,7 +99,7 @@ public class VerifyIngest {
long bytesRead = 0;
long t1 = System.currentTimeMillis();
- byte randomValue[] = new byte[opts.dataSize];
+ byte[] randomValue = new byte[opts.dataSize];
Random random = new Random();
Key endKey = new Key(new Text("row_" + String.format("%010d", opts.rows + opts.startRow)));
@@ -127,7 +127,7 @@ public class VerifyIngest {
val = iter.next().getValue().get();
}
- byte ev[];
+ byte[] ev;
if (opts.random != null) {
ev = TestIngest.genRandomValue(random, randomValue, opts.random, expectedRow,
expectedCol);
@@ -199,7 +199,7 @@ public class VerifyIngest {
break;
}
- byte value[];
+ byte[] value;
if (opts.random != null) {
value = TestIngest.genRandomValue(random, randomValue, opts.random, expectedRow,
colNum);
diff --git a/test/src/main/java/org/apache/accumulo/test/VolumeIT.java b/test/src/main/java/org/apache/accumulo/test/VolumeIT.java
index e9bb97b..dcf9ac1 100644
--- a/test/src/main/java/org/apache/accumulo/test/VolumeIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/VolumeIT.java
@@ -394,7 +394,7 @@ public class VolumeIT extends ConfigurableMacBase {
metaScanner.fetchColumnFamily(MetadataSchema.TabletsSection.DataFileColumnFamily.NAME);
metaScanner.setRange(new KeyExtent(tableId, null, null).toMetadataRange());
- int counts[] = new int[paths.length];
+ int[] counts = new int[paths.length];
outer: for (Entry<Key,Value> entry : metaScanner) {
String cf = entry.getKey().getColumnFamily().toString();
diff --git a/test/src/main/java/org/apache/accumulo/test/constraints/AlphaNumKeyConstraint.java b/test/src/main/java/org/apache/accumulo/test/constraints/AlphaNumKeyConstraint.java
index 6ab8ce2..f790007 100644
--- a/test/src/main/java/org/apache/accumulo/test/constraints/AlphaNumKeyConstraint.java
+++ b/test/src/main/java/org/apache/accumulo/test/constraints/AlphaNumKeyConstraint.java
@@ -39,7 +39,7 @@ public class AlphaNumKeyConstraint implements Constraint {
static final String COLF_VIOLATION_MESSAGE = "Column family was not alpha numeric";
static final String COLQ_VIOLATION_MESSAGE = "Column qualifier was not alpha numeric";
- private boolean isAlphaNum(byte bytes[]) {
+ private boolean isAlphaNum(byte[] bytes) {
for (byte b : bytes) {
boolean ok = ((b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') || (b >= '0' && b <= '9'));
if (!ok)
diff --git a/test/src/main/java/org/apache/accumulo/test/constraints/NumericValueConstraint.java b/test/src/main/java/org/apache/accumulo/test/constraints/NumericValueConstraint.java
index 0939d53..2a52b66 100644
--- a/test/src/main/java/org/apache/accumulo/test/constraints/NumericValueConstraint.java
+++ b/test/src/main/java/org/apache/accumulo/test/constraints/NumericValueConstraint.java
@@ -36,7 +36,7 @@ public class NumericValueConstraint implements Constraint {
private static final List<Short> VIOLATION_LIST = Collections
.unmodifiableList(Arrays.asList(NON_NUMERIC_VALUE));
- private boolean isNumeric(byte bytes[]) {
+ private boolean isNumeric(byte[] bytes) {
for (byte b : bytes) {
boolean ok = (b >= '0' && b <= '9');
if (!ok)
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/BackupMasterIT.java b/test/src/main/java/org/apache/accumulo/test/functional/BackupMasterIT.java
index ed42e9a..3cd927c 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/BackupMasterIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/BackupMasterIT.java
@@ -57,7 +57,7 @@ public class BackupMasterIT extends ConfigurableMacBase {
UtilWaitThread.sleep(1000);
// generate a false zookeeper event
String lockPath = root + "/masters/lock/" + children.get(0);
- byte data[] = writer.getData(lockPath, null);
+ byte[] data = writer.getData(lockPath, null);
writer.getZooKeeper().setData(lockPath, data, -1);
// let it propagate
UtilWaitThread.sleep(500);
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/BulkFailureIT.java b/test/src/main/java/org/apache/accumulo/test/functional/BulkFailureIT.java
index 349edbc..f0e9d64 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/BulkFailureIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/BulkFailureIT.java
@@ -87,7 +87,7 @@ public class BulkFailureIT extends AccumuloClusterHarness {
@Test
public void testImportCompactionImport() throws Exception {
- String tables[] = getUniqueNames(2);
+ String[] tables = getUniqueNames(2);
// run test calling old bulk import RPCs
runTest(tables[0], 99999999L, BulkFailureIT::oldLoad);
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/BulkLoadIT.java b/test/src/main/java/org/apache/accumulo/test/functional/BulkLoadIT.java
index 39564a6..04887e2 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/BulkLoadIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/BulkLoadIT.java
@@ -418,8 +418,8 @@ public class BulkLoadIT extends AccumuloClusterHarness {
justification = "path provided by test; sha-1 is okay for test")
private String hash(String filename) {
try {
- byte data[] = Files.readAllBytes(Paths.get(filename.replaceFirst("^file:", "")));
- byte hash[] = MessageDigest.getInstance("SHA1").digest(data);
+ byte[] data = Files.readAllBytes(Paths.get(filename.replaceFirst("^file:", "")));
+ byte[] hash = MessageDigest.getInstance("SHA1").digest(data);
return new BigInteger(1, hash).toString(16);
} catch (IOException | NoSuchAlgorithmException e) {
throw new RuntimeException(e);
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/CacheTestWriter.java b/test/src/main/java/org/apache/accumulo/test/functional/CacheTestWriter.java
index 31f6d2c..f8e473d 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/CacheTestWriter.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/CacheTestWriter.java
@@ -92,7 +92,7 @@ public class CacheTestWriter {
// change values
for (int i = 0; i < numData; i++) {
- byte data[] = Long.toString(r.nextLong(), 16).getBytes(UTF_8);
+ byte[] data = Long.toString(r.nextLong(), 16).getBytes(UTF_8);
zk.putPersistentData(rootDir + "/data" + i, data, NodeExistsPolicy.OVERWRITE);
expectedData.put(rootDir + "/data" + i, new String(data, UTF_8));
}
@@ -100,7 +100,7 @@ public class CacheTestWriter {
// test a data node that does not always exists...
if (r.nextFloat() < .5) {
- byte data[] = Long.toString(r.nextLong(), 16).getBytes(UTF_8);
+ byte[] data = Long.toString(r.nextLong(), 16).getBytes(UTF_8);
if (!dataSExists) {
zk.putPersistentData(rootDir + "/dataS", data, NodeExistsPolicy.SKIP);
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java b/test/src/main/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java
index e602347..24a8bc9 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java
@@ -83,7 +83,7 @@ public class DeleteRowsSplitIT extends AccumuloClusterHarness {
generateRandomRange(start, end);
// initiate the delete range
- final boolean fail[] = {false};
+ final boolean[] fail = {false};
Thread t = new Thread(() -> {
try {
// split the table
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/DurabilityIT.java b/test/src/main/java/org/apache/accumulo/test/functional/DurabilityIT.java
index 52a5c1a..b4688f0 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/DurabilityIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/DurabilityIT.java
@@ -94,7 +94,7 @@ public class DurabilityIT extends ConfigurableMacBase {
public void testWriteSpeed() throws Exception {
try (AccumuloClient client = createClient()) {
TableOperations tableOps = client.tableOperations();
- String tableNames[] = init(client);
+ String[] tableNames = init(client);
// write some gunk, delete the table to keep that table from messing with the performance
// numbers of successive calls
// sync
@@ -119,7 +119,7 @@ public class DurabilityIT extends ConfigurableMacBase {
@Test(timeout = 4 * 60 * 1000)
public void testSync() throws Exception {
try (AccumuloClient client = createClient()) {
- String tableNames[] = init(client);
+ String[] tableNames = init(client);
// sync table should lose nothing
writeSome(client, tableNames[0], N);
restartTServer();
@@ -131,7 +131,7 @@ public class DurabilityIT extends ConfigurableMacBase {
@Test(timeout = 4 * 60 * 1000)
public void testFlush() throws Exception {
try (AccumuloClient client = createClient()) {
- String tableNames[] = init(client);
+ String[] tableNames = init(client);
// flush table won't lose anything since we're not losing power/dfs
writeSome(client, tableNames[1], N);
restartTServer();
@@ -143,7 +143,7 @@ public class DurabilityIT extends ConfigurableMacBase {
@Test(timeout = 4 * 60 * 1000)
public void testLog() throws Exception {
try (AccumuloClient client = createClient()) {
- String tableNames[] = init(client);
+ String[] tableNames = init(client);
// we're probably going to lose something the the log setting
writeSome(client, tableNames[2], N);
restartTServer();
@@ -156,7 +156,7 @@ public class DurabilityIT extends ConfigurableMacBase {
@Test(timeout = 4 * 60 * 1000)
public void testNone() throws Exception {
try (AccumuloClient client = createClient()) {
- String tableNames[] = init(client);
+ String[] tableNames = init(client);
// probably won't get any data back without logging
writeSome(client, tableNames[3], N);
restartTServer();
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/HalfDeadTServerIT.java b/test/src/main/java/org/apache/accumulo/test/functional/HalfDeadTServerIT.java
index dca075f..17bdb2e 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/HalfDeadTServerIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/HalfDeadTServerIT.java
@@ -216,7 +216,7 @@ public class HalfDeadTServerIT extends ConfigurableMacBase {
String source = root + "/src/test/c/fake_disk_failure.c";
String lib = root + "/target/fake_disk_failure.so";
String platform = System.getProperty("os.name");
- String cmd[];
+ String[] cmd;
if (platform.equals("Darwin")) {
cmd = new String[] {"gcc", "-arch", "x86_64", "-arch", "i386", "-dynamiclib", "-O3", "-fPIC",
source, "-o", lib};
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/LargeRowIT.java b/test/src/main/java/org/apache/accumulo/test/functional/LargeRowIT.java
index 43e532e..42521c9 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/LargeRowIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/LargeRowIT.java
@@ -114,7 +114,7 @@ public class LargeRowIT extends AccumuloClusterHarness {
@Test
public void run() throws Exception {
Random r = new Random();
- byte rowData[] = new byte[ROW_SIZE];
+ byte[] rowData = new byte[ROW_SIZE];
r.setSeed(SEED + 1);
TreeSet<Text> splitPoints = new TreeSet<>();
for (int i = 0; i < NUM_PRE_SPLITS; i++) {
@@ -158,7 +158,7 @@ public class LargeRowIT extends AccumuloClusterHarness {
try (BatchWriter bw = c.createBatchWriter(table)) {
Random r = new Random();
- byte rowData[] = new byte[ROW_SIZE];
+ byte[] rowData = new byte[ROW_SIZE];
r.setSeed(SEED);
for (int i = 0; i < NUM_ROWS; i++) {
@@ -195,7 +195,7 @@ public class LargeRowIT extends AccumuloClusterHarness {
justification = "predictable random is okay for testing")
private void verify(AccumuloClient c, String table) throws Exception {
Random r = new Random();
- byte rowData[] = new byte[ROW_SIZE];
+ byte[] rowData = new byte[ROW_SIZE];
r.setSeed(SEED);
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/MaxOpenIT.java b/test/src/main/java/org/apache/accumulo/test/functional/MaxOpenIT.java
index 2b790b1..22b3bba 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/MaxOpenIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/MaxOpenIT.java
@@ -145,7 +145,7 @@ public class MaxOpenIT extends AccumuloClusterHarness {
long t1 = System.currentTimeMillis();
- byte rval[] = new byte[50];
+ byte[] rval = new byte[50];
Random random = new Random();
for (Entry<Key,Value> entry : bs) {
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/MetadataIT.java b/test/src/main/java/org/apache/accumulo/test/functional/MetadataIT.java
index 8b3750f..7f367bf 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/MetadataIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/MetadataIT.java
@@ -62,7 +62,7 @@ public class MetadataIT extends AccumuloClusterHarness {
@Test
public void testFlushAndCompact() throws Exception {
try (AccumuloClient c = createAccumuloClient()) {
- String tableNames[] = getUniqueNames(2);
+ String[] tableNames = getUniqueNames(2);
// create a table to write some data to metadata table
c.tableOperations().create(tableNames[0]);
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/NativeMapIT.java b/test/src/main/java/org/apache/accumulo/test/functional/NativeMapIT.java
index 747ab61..8b06ded 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/NativeMapIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/NativeMapIT.java
@@ -420,8 +420,8 @@ public class NativeMapIT {
"Memory changed after inserting duplicate data " + mem1 + " " + mem3);
}
- byte bigrow[] = new byte[1000000];
- byte bigvalue[] = new byte[bigrow.length];
+ byte[] bigrow = new byte[1000000];
+ byte[] bigvalue = new byte[bigrow.length];
for (int i = 0; i < bigrow.length; i++) {
bigrow[i] = (byte) (0xff & (i % 256));
@@ -458,7 +458,7 @@ public class NativeMapIT {
private static byte[] getRandomBytes(Random r, int maxLen) {
int len = r.nextInt(maxLen);
- byte f[] = new byte[len];
+ byte[] f = new byte[len];
r.nextBytes(f);
return f;
@@ -533,12 +533,12 @@ public class NativeMapIT {
public void testBinary() {
NativeMap nm = new NativeMap();
- byte emptyBytes[] = new byte[0];
+ byte[] emptyBytes = new byte[0];
for (int i = 0; i < 256; i++) {
for (int j = 0; j < 256; j++) {
- byte row[] = {'r', (byte) (0xff & i), (byte) (0xff & j)};
- byte data[] = {'v', (byte) (0xff & i), (byte) (0xff & j)};
+ byte[] row = {'r', (byte) (0xff & i), (byte) (0xff & j)};
+ byte[] data = {'v', (byte) (0xff & i), (byte) (0xff & j)};
Key k = new Key(row, emptyBytes, emptyBytes, emptyBytes, 1);
Value v = new Value(data);
@@ -550,8 +550,8 @@ public class NativeMapIT {
Iterator<Entry<Key,Value>> iter = nm.iterator();
for (int i = 0; i < 256; i++) {
for (int j = 0; j < 256; j++) {
- byte row[] = {'r', (byte) (0xff & i), (byte) (0xff & j)};
- byte data[] = {'v', (byte) (0xff & i), (byte) (0xff & j)};
+ byte[] row = {'r', (byte) (0xff & i), (byte) (0xff & j)};
+ byte[] data = {'v', (byte) (0xff & i), (byte) (0xff & j)};
Key k = new Key(row, emptyBytes, emptyBytes, emptyBytes, 1);
Value v = new Value(data);
@@ -569,8 +569,8 @@ public class NativeMapIT {
for (int i = 0; i < 256; i++) {
for (int j = 0; j < 256; j++) {
- byte row[] = {'r', (byte) (0xff & i), (byte) (0xff & j)};
- byte data[] = {'v', (byte) (0xff & i), (byte) (0xff & j)};
+ byte[] row = {'r', (byte) (0xff & i), (byte) (0xff & j)};
+ byte[] data = {'v', (byte) (0xff & i), (byte) (0xff & j)};
Key k = new Key(row, emptyBytes, emptyBytes, emptyBytes, 1);
Value v = new Value(data);
diff --git a/test/src/main/java/org/apache/accumulo/test/master/MergeStateIT.java b/test/src/main/java/org/apache/accumulo/test/master/MergeStateIT.java
index f18880b..7027d87 100644
--- a/test/src/main/java/org/apache/accumulo/test/master/MergeStateIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/master/MergeStateIT.java
@@ -113,7 +113,7 @@ public class MergeStateIT extends ConfigurableMacBase {
new BatchWriterConfig());
// Create a fake METADATA table with these splits
- String splits[] = {"a", "e", "j", "o", "t", "z"};
+ String[] splits = {"a", "e", "j", "o", "t", "z"};
// create metadata for a table "t" with the splits above
TableId tableId = TableId.of("t");
Text pr = null;
diff --git a/test/src/main/java/org/apache/accumulo/test/performance/ContinuousIngest.java b/test/src/main/java/org/apache/accumulo/test/performance/ContinuousIngest.java
index 3149834..028a5b7 100644
--- a/test/src/main/java/org/apache/accumulo/test/performance/ContinuousIngest.java
+++ b/test/src/main/java/org/apache/accumulo/test/performance/ContinuousIngest.java
@@ -121,10 +121,10 @@ public class ContinuousIngest {
// always exist in accumulo when verifying data. To do this make insert N point
// back to the row from insert (N - flushInterval). The array below is used to keep
// track of this.
- long prevRows[] = new long[flushInterval];
- long firstRows[] = new long[flushInterval];
- int firstColFams[] = new int[flushInterval];
- int firstColQuals[] = new int[flushInterval];
+ long[] prevRows = new long[flushInterval];
+ long[] firstRows = new long[flushInterval];
+ int[] firstColFams = new int[flushInterval];
+ int[] firstColQuals = new int[flushInterval];
long lastFlushTime = System.currentTimeMillis();
@@ -242,7 +242,7 @@ public class ContinuousIngest {
int dataLen = ingestInstanceId.length + 16 + (prevRow == null ? 0 : prevRow.length) + 3;
if (cksum != null)
dataLen += 8;
- byte val[] = new byte[dataLen];
+ byte[] val = new byte[dataLen];
System.arraycopy(ingestInstanceId, 0, val, 0, ingestInstanceId.length);
int index = ingestInstanceId.length;
val[index++] = ':';
diff --git a/test/src/main/java/org/apache/accumulo/test/performance/scan/CollectTabletStats.java b/test/src/main/java/org/apache/accumulo/test/performance/scan/CollectTabletStats.java
index 929226d..e46a3bc 100644
--- a/test/src/main/java/org/apache/accumulo/test/performance/scan/CollectTabletStats.java
+++ b/test/src/main/java/org/apache/accumulo/test/performance/scan/CollectTabletStats.java
@@ -106,10 +106,10 @@ public class CollectTabletStats {
final CollectOptions opts = new CollectOptions();
opts.parseArgs(CollectTabletStats.class.getName(), args);
- String columnsTmp[] = {};
+ String[] columnsTmp = {};
if (opts.columns != null)
columnsTmp = opts.columns.split(",");
- final String columns[] = columnsTmp;
+ final String[] columns = columnsTmp;
ServerContext context = opts.getServerContext();
final VolumeManager fs = context.getVolumeManager();
diff --git a/test/src/main/java/org/apache/accumulo/test/proxy/SimpleProxyBase.java b/test/src/main/java/org/apache/accumulo/test/proxy/SimpleProxyBase.java
index 2d6bdbd..09f9357 100644
--- a/test/src/main/java/org/apache/accumulo/test/proxy/SimpleProxyBase.java
+++ b/test/src/main/java/org/apache/accumulo/test/proxy/SimpleProxyBase.java
@@ -1968,7 +1968,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterBase {
}
client.deleteRows(creds, tableName, null, null);
client.removeIterator(creds, tableName, "test", EnumSet.allOf(IteratorScope.class));
- String expected[][] = new String[10][];
+ String[][] expected = new String[10][];
for (int i = 0; i < 10; i++) {
client.updateAndFlush(creds, tableName, mutation("row" + i, "cf", "cq", "" + i));
expected[i] = new String[] {"row" + i, "cf", "cq", "" + i};
@@ -1981,7 +1981,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterBase {
public void cloneTable() throws Exception {
String TABLE_TEST2 = getUniqueNames(2)[1];
- String expected[][] = new String[10][];
+ String[][] expected = new String[10][];
for (int i = 0; i < 10; i++) {
client.updateAndFlush(creds, tableName, mutation("row" + i, "cf", "cq", "" + i));
expected[i] = new String[] {"row" + i, "cf", "cq", "" + i};
@@ -2003,7 +2003,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterBase {
@Test
public void compactTable() throws Exception {
- String expected[][] = new String[10][];
+ String[][] expected = new String[10][];
for (int i = 0; i < 10; i++) {
client.updateAndFlush(creds, tableName, mutation("row" + i, "cf", "cq", "" + i));
expected[i] = new String[] {"row" + i, "cf", "cq", "" + i};
@@ -2022,7 +2022,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterBase {
String TABLE_TEST2 = getUniqueNames(2)[1];
// Write some data
- String expected[][] = new String[10][];
+ String[][] expected = new String[10][];
for (int i = 0; i < 10; i++) {
client.updateAndFlush(creds, tableName, mutation("row" + i, "cf", "cq", "" + i));
expected[i] = new String[] {"row" + i, "cf", "cq", "" + i};
@@ -2070,7 +2070,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterBase {
@Test
public void importExportTable() throws Exception {
// Write some data
- String expected[][] = new String[10][];
+ String[][] expected = new String[10][];
for (int i = 0; i < 10; i++) {
client.updateAndFlush(creds, tableName, mutation("row" + i, "cf", "cq", "" + i));
expected[i] = new String[] {"row" + i, "cf", "cq", "" + i};