You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by mm...@apache.org on 2018/12/20 23:13:27 UTC
[accumulo] branch master updated: Remove unused declarations (#848)
This is an automated email from the ASF dual-hosted git repository.
mmiller 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 d06c3fa Remove unused declarations (#848)
d06c3fa is described below
commit d06c3fac39b162dfff97178ed8034bd0b9a23873
Author: Mike Miller <mm...@apache.org>
AuthorDate: Thu Dec 20 18:13:23 2018 -0500
Remove unused declarations (#848)
* Remove unused declarations across code mainly in server, impl and tests
* Avoided API and internal pluggable components
---
.../accumulo/core/clientImpl/BulkImport.java | 6 +-
.../core/clientImpl/ConditionalWriterImpl.java | 8 +--
.../TabletServerBatchReaderIterator.java | 6 +-
.../core/clientImpl/TabletServerBatchWriter.java | 8 +--
.../accumulo/core/clientImpl/ThriftScanner.java | 2 +-
.../core/clientImpl/ThriftTransportPool.java | 14 ++--
.../file/blockfile/impl/CachableBlockFile.java | 10 ++-
.../apache/accumulo/core/file/map/MapFileUtil.java | 5 +-
.../accumulo/core/file/rfile/RFileOperations.java | 2 +-
.../accumulo/core/file/rfile/SplitLarge.java | 10 +--
.../accumulo/core/file/rfile/bcfile/BCFile.java | 18 +----
.../accumulo/core/file/rfile/bcfile/PrintInfo.java | 2 +-
.../accumulo/core/iterators/IteratorUtil.java | 17 +++--
.../core/iterators/system/MapFileIterator.java | 2 +-
.../core/metadata/MetadataLocationObtainer.java | 6 +-
.../replication/AccumuloReplicationReplayer.java | 4 +-
.../accumulo/core/summary/SummarySerializer.java | 3 +-
.../accumulo/core/summary/SummaryWriter.java | 2 +-
.../java/org/apache/accumulo/fate/AdminUtil.java | 2 +-
.../main/java/org/apache/accumulo/fate/Fate.java | 6 +-
.../apache/accumulo/fate/zookeeper/ZooSession.java | 4 +-
.../core/clientImpl/TabletLocatorImplTest.java | 77 ++++++++++------------
.../core/file/rfile/CreateCompatTestFile.java | 2 +-
.../accumulo/core/file/rfile/KeyShortenerTest.java | 51 ++++++--------
.../core/file/rfile/MultiLevelIndexTest.java | 2 +-
.../core/file/rfile/MultiThreadedRFileTest.java | 2 +-
.../apache/accumulo/core/file/rfile/RFileTest.java | 2 +-
.../accumulo/core/iterators/user/CombinerTest.java | 2 +-
.../iterators/user/RowEncodingIteratorTest.java | 8 +--
.../hadoopImpl/mapred/AbstractInputFormat.java | 16 ++---
.../hadoopImpl/mapred/InputFormatBase.java | 2 +-
.../hadoopImpl/mapreduce/AbstractInputFormat.java | 17 ++---
.../hadoopImpl/mapreduce/InputFormatBase.java | 2 +-
.../MiniAccumuloClusterControl.java | 6 +-
.../accumulo/server/client/BulkImporter.java | 46 ++++++-------
.../server/client/ClientServiceHandler.java | 2 +-
.../org/apache/accumulo/server/fs/VolumeUtil.java | 6 +-
.../apache/accumulo/server/init/Initialize.java | 6 +-
.../accumulo/server/master/LiveTServerSet.java | 2 +-
.../master/balancer/DefaultLoadBalancer.java | 8 +--
.../server/master/recovery/RecoveryPath.java | 3 +-
.../server/replication/ReplicationUtil.java | 4 +-
.../apache/accumulo/server/rpc/TServerUtils.java | 12 ++--
.../server/security/SecurityOperation.java | 32 ++++-----
.../server/security/handler/Authenticator.java | 5 +-
.../security/handler/InsecureAuthenticator.java | 5 +-
.../security/handler/KerberosAuthenticator.java | 5 +-
.../server/security/handler/ZKAuthenticator.java | 5 +-
.../accumulo/server/tables/TableManager.java | 2 +-
.../accumulo/server/tables/TableObserver.java | 4 +-
.../server/util/CheckForMetadataProblems.java | 14 ++--
.../org/apache/accumulo/server/util/FileUtil.java | 10 +--
.../accumulo/server/util/MasterMetadataUtil.java | 18 ++---
.../accumulo/server/util/ReplicationTableUtil.java | 4 +-
.../accumulo/server/ServerConstantsTest.java | 4 +-
.../master/balancer/ChaoticLoadBalancerTest.java | 6 +-
.../master/balancer/DefaultLoadBalancerTest.java | 10 +--
.../server/security/UserImpersonationTest.java | 16 ++---
.../apache/accumulo/master/FateServiceHandler.java | 2 +-
.../java/org/apache/accumulo/master/Master.java | 5 +-
.../master/MasterClientServiceHandler.java | 2 +-
.../apache/accumulo/master/TabletGroupWatcher.java | 2 +-
.../accumulo/master/recovery/RecoveryManager.java | 3 +-
.../org/apache/accumulo/master/util/FateAdmin.java | 2 +-
.../monitor/rest/trace/TracesResource.java | 4 +-
.../rest/tservers/TabletServerResource.java | 9 ++-
.../java/org/apache/accumulo/tracer/SpanTree.java | 9 ++-
.../apache/accumulo/tracer/SpanTreeVisitor.java | 4 +-
.../java/org/apache/accumulo/tracer/TraceDump.java | 3 +-
.../org/apache/accumulo/tracer/TracerTest.java | 3 -
.../org/apache/accumulo/tserver/TabletServer.java | 48 ++++++--------
.../apache/accumulo/tserver/TabletStatsKeeper.java | 2 +-
.../org/apache/accumulo/tserver/log/DfsLogger.java | 4 +-
.../accumulo/tserver/log/TabletServerLogger.java | 10 ++-
.../tserver/replication/AccumuloReplicaSystem.java | 21 +++---
.../BatchWriterReplicationReplayer.java | 3 +-
.../accumulo/tserver/tablet/CommitSession.java | 4 +-
.../apache/accumulo/tserver/tablet/Compactor.java | 4 +-
.../accumulo/tserver/tablet/DatafileManager.java | 3 +-
.../tserver/tablet/MinorCompactionTask.java | 5 +-
.../org/apache/accumulo/tserver/tablet/Tablet.java | 14 ++--
.../accumulo/tserver/tablet/TabletCommitter.java | 2 +-
.../apache/accumulo/tserver/tablet/TabletData.java | 8 +--
.../shell/commands/DeleteTableCommand.java | 2 +-
.../accumulo/shell/commands/FateCommand.java | 2 +-
.../accumulo/shell/commands/TableOperation.java | 6 +-
.../shell/commands/DeleteTableCommandTest.java | 2 +-
.../accumulo/harness/MiniClusterHarness.java | 13 ++--
.../java/org/apache/accumulo/test/CleanWalIT.java | 4 +-
.../java/org/apache/accumulo/test/CloneIT.java | 11 ++--
.../org/apache/accumulo/test/VolumeChooserIT.java | 16 ++---
.../test/functional/ConfigurableCompactionIT.java | 10 +--
.../test/functional/ConfigurableMacBase.java | 5 +-
.../accumulo/test/functional/PermissionsIT.java | 14 ++--
.../accumulo/test/functional/ScanIteratorIT.java | 6 +-
.../accumulo/test/master/SuspendedTabletsIT.java | 2 +-
.../test/performance/ContinuousIngest.java | 8 +--
.../test/replication/CyclicReplicationIT.java | 2 +-
98 files changed, 367 insertions(+), 467 deletions(-)
diff --git a/core/src/main/java/org/apache/accumulo/core/clientImpl/BulkImport.java b/core/src/main/java/org/apache/accumulo/core/clientImpl/BulkImport.java
index e3ca1c1..5e5b8bb 100644
--- a/core/src/main/java/org/apache/accumulo/core/clientImpl/BulkImport.java
+++ b/core/src/main/java/org/apache/accumulo/core/clientImpl/BulkImport.java
@@ -264,8 +264,8 @@ public class BulkImport implements ImportDestinationArguments, ImportMappingOpti
throws IOException, AccumuloException, AccumuloSecurityException, TableNotFoundException;
}
- public static List<KeyExtent> findOverlappingTablets(ClientContext context,
- KeyExtentCache extentCache, FileSKVIterator reader)
+ public static List<KeyExtent> findOverlappingTablets(KeyExtentCache extentCache,
+ FileSKVIterator reader)
throws IOException, AccumuloException, AccumuloSecurityException, TableNotFoundException {
Text startRow = null;
@@ -311,7 +311,7 @@ public class BulkImport implements ImportDestinationArguments, ImportMappingOpti
.forFile(file.toString(), fs, fs.getConf(), cs)
.withTableConfiguration(context.getConfiguration()).withFileLenCache(fileLenCache)
.seekToBeginning().build()) {
- return findOverlappingTablets(context, extentCache, reader);
+ return findOverlappingTablets(extentCache, reader);
}
}
diff --git a/core/src/main/java/org/apache/accumulo/core/clientImpl/ConditionalWriterImpl.java b/core/src/main/java/org/apache/accumulo/core/clientImpl/ConditionalWriterImpl.java
index 697a5b7..6fa3c2a 100644
--- a/core/src/main/java/org/apache/accumulo/core/clientImpl/ConditionalWriterImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/clientImpl/ConditionalWriterImpl.java
@@ -626,12 +626,12 @@ class ConditionalWriterImpl implements ConditionalWriter {
queueException(location, cmidToCm, ase);
} catch (TTransportException e) {
locator.invalidateCache(context, location.toString());
- invalidateSession(location, mutations, cmidToCm, sessionId);
+ invalidateSession(location, cmidToCm, sessionId);
} catch (TApplicationException tae) {
queueException(location, cmidToCm, new AccumuloServerException(location.toString(), tae));
} catch (TException e) {
locator.invalidateCache(context, location.toString());
- invalidateSession(location, mutations, cmidToCm, sessionId);
+ invalidateSession(location, cmidToCm, sessionId);
} catch (Exception e) {
queueException(location, cmidToCm, e);
} finally {
@@ -653,8 +653,8 @@ class ConditionalWriterImpl implements ConditionalWriter {
cmk.cm.queueResult(new Result(e, cmk.cm, location.toString()));
}
- private void invalidateSession(HostAndPort location, TabletServerMutations<QCMutation> mutations,
- Map<Long,CMK> cmidToCm, SessionID sessionId) {
+ private void invalidateSession(HostAndPort location, Map<Long,CMK> cmidToCm,
+ SessionID sessionId) {
if (sessionId == null) {
queueRetry(cmidToCm, location);
} else {
diff --git a/core/src/main/java/org/apache/accumulo/core/clientImpl/TabletServerBatchReaderIterator.java b/core/src/main/java/org/apache/accumulo/core/clientImpl/TabletServerBatchReaderIterator.java
index e205c38..c37eae8 100644
--- a/core/src/main/java/org/apache/accumulo/core/clientImpl/TabletServerBatchReaderIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/clientImpl/TabletServerBatchReaderIterator.java
@@ -597,7 +597,7 @@ public class TabletServerBatchReaderIterator implements Iterator<Entry<Key,Value
firstErrorTime = null;
}
- void errorOccured(Exception e) {
+ void errorOccured() {
if (firstErrorTime == null) {
firstErrorTime = activityTime;
} else if (System.currentTimeMillis() - firstErrorTime > timeOut) {
@@ -748,7 +748,7 @@ public class TabletServerBatchReaderIterator implements Iterator<Entry<Key,Value
}
} catch (TTransportException e) {
log.debug("Server : {} msg : {}", server, e.getMessage());
- timeoutTracker.errorOccured(e);
+ timeoutTracker.errorOccured();
throw new IOException(e);
} catch (ThriftSecurityException e) {
log.debug("Server : {} msg : {}", server, e.getMessage(), e);
@@ -770,7 +770,7 @@ public class TabletServerBatchReaderIterator implements Iterator<Entry<Key,Value
throw new SampleNotPresentException(message, e);
} catch (TException e) {
log.debug("Server : {} msg : {}", server, e.getMessage(), e);
- timeoutTracker.errorOccured(e);
+ timeoutTracker.errorOccured();
throw new IOException(e);
} finally {
ThriftTransportPool.getInstance().returnTransport(transport);
diff --git a/core/src/main/java/org/apache/accumulo/core/clientImpl/TabletServerBatchWriter.java b/core/src/main/java/org/apache/accumulo/core/clientImpl/TabletServerBatchWriter.java
index 7e693ea..1fcef72 100644
--- a/core/src/main/java/org/apache/accumulo/core/clientImpl/TabletServerBatchWriter.java
+++ b/core/src/main/java/org/apache/accumulo/core/clientImpl/TabletServerBatchWriter.java
@@ -183,7 +183,7 @@ public class TabletServerBatchWriter {
}
}
- void errorOccured(Exception e) {
+ void errorOccured() {
wroteNothing();
}
@@ -612,7 +612,7 @@ public class TabletServerBatchWriter {
init().addAll(failures);
}
- synchronized void add(String location, TabletServerMutations<Mutation> tsm) {
+ synchronized void add(TabletServerMutations<Mutation> tsm) {
init();
for (Entry<KeyExtent,List<Mutation>> entry : tsm.getMutations().entrySet()) {
recentFailures.addAll(entry.getKey().getTableId(), entry.getValue());
@@ -898,7 +898,7 @@ public class TabletServerBatchWriter {
for (Table.ID table : tables)
getLocator(table).invalidateCache(context, location);
- failedMutations.add(location, tsm);
+ failedMutations.add(tsm);
} finally {
Thread.currentThread().setName(oldName);
}
@@ -1000,7 +1000,7 @@ public class TabletServerBatchWriter {
ThriftUtil.returnClient((TServiceClient) client);
}
} catch (TTransportException e) {
- timeoutTracker.errorOccured(e);
+ timeoutTracker.errorOccured();
throw new IOException(e);
} catch (TApplicationException tae) {
updateServerErrors(location, tae);
diff --git a/core/src/main/java/org/apache/accumulo/core/clientImpl/ThriftScanner.java b/core/src/main/java/org/apache/accumulo/core/clientImpl/ThriftScanner.java
index b195046..1a56d3a 100644
--- a/core/src/main/java/org/apache/accumulo/core/clientImpl/ThriftScanner.java
+++ b/core/src/main/java/org/apache/accumulo/core/clientImpl/ThriftScanner.java
@@ -90,7 +90,7 @@ public class ThriftScanner {
String server, SortedMap<Key,Value> results, SortedSet<Column> fetchedColumns,
List<IterInfo> serverSideIteratorList,
Map<String,Map<String,String>> serverSideIteratorOptions, int size,
- Authorizations authorizations, boolean retry, long batchTimeOut, String classLoaderContext)
+ Authorizations authorizations, long batchTimeOut, String classLoaderContext)
throws AccumuloException, AccumuloSecurityException, NotServingTabletException {
if (server == null)
throw new AccumuloException(new IOException());
diff --git a/core/src/main/java/org/apache/accumulo/core/clientImpl/ThriftTransportPool.java b/core/src/main/java/org/apache/accumulo/core/clientImpl/ThriftTransportPool.java
index ff3810f..faf61ca 100644
--- a/core/src/main/java/org/apache/accumulo/core/clientImpl/ThriftTransportPool.java
+++ b/core/src/main/java/org/apache/accumulo/core/clientImpl/ThriftTransportPool.java
@@ -182,7 +182,7 @@ public class ThriftTransportPool {
int ioCount = 0;
int lastIoCount = -1;
- private void sawError(Exception e) {
+ private void sawError() {
sawError = true;
}
@@ -264,7 +264,7 @@ public class ThriftTransportPool {
ioCount++;
wrappedTransport.open();
} catch (TTransportException tte) {
- sawError(tte);
+ sawError();
throw tte;
} finally {
ioCount++;
@@ -277,7 +277,7 @@ public class ThriftTransportPool {
ioCount++;
return wrappedTransport.read(arg0, arg1, arg2);
} catch (TTransportException tte) {
- sawError(tte);
+ sawError();
throw tte;
} finally {
ioCount++;
@@ -290,7 +290,7 @@ public class ThriftTransportPool {
ioCount++;
return wrappedTransport.readAll(arg0, arg1, arg2);
} catch (TTransportException tte) {
- sawError(tte);
+ sawError();
throw tte;
} finally {
ioCount++;
@@ -303,7 +303,7 @@ public class ThriftTransportPool {
ioCount++;
wrappedTransport.write(arg0, arg1, arg2);
} catch (TTransportException tte) {
- sawError(tte);
+ sawError();
throw tte;
} finally {
ioCount++;
@@ -316,7 +316,7 @@ public class ThriftTransportPool {
ioCount++;
wrappedTransport.write(arg0);
} catch (TTransportException tte) {
- sawError(tte);
+ sawError();
throw tte;
} finally {
ioCount++;
@@ -340,7 +340,7 @@ public class ThriftTransportPool {
ioCount++;
wrappedTransport.flush();
} catch (TTransportException tte) {
- sawError(tte);
+ sawError();
throw tte;
} finally {
ioCount++;
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 f124378..b59fa45 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
@@ -112,12 +112,11 @@ public class CachableBlockFile {
BCFile.Reader tmpReader = null;
if (serializedMetadata == null) {
if (fileLenCache == null) {
- tmpReader = new BCFile.Reader(fsIn, lengthSupplier.get(), conf, accumuloConfiguration,
- cryptoService);
+ tmpReader = new BCFile.Reader(fsIn, lengthSupplier.get(), conf, cryptoService);
} else {
long len = getCachedFileLen();
try {
- tmpReader = new BCFile.Reader(fsIn, len, conf, accumuloConfiguration, cryptoService);
+ tmpReader = new BCFile.Reader(fsIn, len, conf, cryptoService);
} catch (Exception e) {
log.debug("Failed to open {}, clearing file length cache and retrying", cacheId, e);
fileLenCache.invalidate(cacheId);
@@ -125,12 +124,11 @@ public class CachableBlockFile {
if (tmpReader == null) {
len = getCachedFileLen();
- tmpReader = new BCFile.Reader(fsIn, len, conf, accumuloConfiguration, cryptoService);
+ tmpReader = new BCFile.Reader(fsIn, len, conf, cryptoService);
}
}
} else {
- tmpReader = new BCFile.Reader(serializedMetadata, fsIn, conf, accumuloConfiguration,
- cryptoService);
+ tmpReader = new BCFile.Reader(serializedMetadata, fsIn, conf, cryptoService);
}
if (!bcfr.compareAndSet(null, tmpReader)) {
diff --git a/core/src/main/java/org/apache/accumulo/core/file/map/MapFileUtil.java b/core/src/main/java/org/apache/accumulo/core/file/map/MapFileUtil.java
index 0e9b583..f48e63d 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/map/MapFileUtil.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/map/MapFileUtil.java
@@ -18,7 +18,6 @@ package org.apache.accumulo.core.file.map;
import java.io.IOException;
-import org.apache.accumulo.core.conf.AccumuloConfiguration;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
@@ -26,8 +25,8 @@ import org.apache.hadoop.io.MapFile;
import org.apache.hadoop.io.SequenceFile;
public class MapFileUtil {
- public static MapFile.Reader openMapFile(AccumuloConfiguration acuconf, FileSystem fs,
- String dirName, Configuration conf) throws IOException {
+ public static MapFile.Reader openMapFile(FileSystem fs, String dirName, Configuration conf)
+ throws IOException {
MapFile.Reader mfr = null;
try {
mfr = new MapFile.Reader(fs.makeQualified(new Path(dirName)), conf);
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/RFileOperations.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/RFileOperations.java
index ee35fd5..96aa67d 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/RFileOperations.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/RFileOperations.java
@@ -130,7 +130,7 @@ public class RFileOperations extends FileOperations {
}
BCFile.Writer _cbw = new BCFile.Writer(outputStream, options.getRateLimiter(), compression,
- conf, acuconf, options.cryptoService);
+ conf, options.cryptoService);
return new RFile.Writer(_cbw, (int) blockSize, (int) indexBlockSize, samplerConfig, sampler);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/SplitLarge.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/SplitLarge.java
index 3c56674..deba52c 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/SplitLarge.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/SplitLarge.java
@@ -78,10 +78,12 @@ public class SplitLarge {
int blockSize = (int) aconf.getAsBytes(Property.TABLE_FILE_BLOCK_SIZE);
try (
- Writer small = new RFile.Writer(new BCFile.Writer(fs.create(new Path(smallName)), null,
- "gz", conf, aconf, cryptoService), blockSize);
- Writer large = new RFile.Writer(new BCFile.Writer(fs.create(new Path(largeName)), null,
- "gz", conf, aconf, cryptoService), blockSize)) {
+ Writer small = new RFile.Writer(
+ new BCFile.Writer(fs.create(new Path(smallName)), null, "gz", conf, cryptoService),
+ blockSize);
+ Writer large = new RFile.Writer(
+ new BCFile.Writer(fs.create(new Path(largeName)), null, "gz", conf, cryptoService),
+ blockSize)) {
small.startDefaultLocalityGroup();
large.startDefaultLocalityGroup();
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/BCFile.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/BCFile.java
index 2747afe..bfe8dc3 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/BCFile.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/BCFile.java
@@ -33,7 +33,6 @@ import java.util.Arrays;
import java.util.Map;
import java.util.TreeMap;
-import org.apache.accumulo.core.conf.AccumuloConfiguration;
import org.apache.accumulo.core.crypto.CryptoUtils;
import org.apache.accumulo.core.cryptoImpl.CryptoEnvironmentImpl;
import org.apache.accumulo.core.cryptoImpl.NoFileDecrypter;
@@ -314,8 +313,7 @@ public final class BCFile {
* @see Compression#getSupportedAlgorithms
*/
public Writer(FSDataOutputStream fout, RateLimiter writeLimiter, String compressionName,
- Configuration conf, AccumuloConfiguration aconf, CryptoService cryptoService)
- throws IOException {
+ Configuration conf, CryptoService cryptoService) throws IOException {
if (fout.getPos() != 0) {
throw new IOException("Output file not at zero offset.");
}
@@ -597,17 +595,8 @@ public final class BCFile {
}
}
- /**
- * Constructor
- *
- * @param fin
- * FS input stream.
- * @param fileLength
- * Length of the corresponding file
- */
public <InputStreamType extends InputStream & Seekable> Reader(InputStreamType fin,
- long fileLength, Configuration conf, AccumuloConfiguration aconf,
- CryptoService cryptoService) throws IOException {
+ long fileLength, Configuration conf, CryptoService cryptoService) throws IOException {
this.in = new SeekableDataInputStream(fin);
this.conf = conf;
@@ -661,8 +650,7 @@ public final class BCFile {
}
public <InputStreamType extends InputStream & Seekable> Reader(byte[] serializedMetadata,
- InputStreamType fin, Configuration conf, AccumuloConfiguration aconf,
- CryptoService cryptoService) throws IOException {
+ InputStreamType fin, Configuration conf, CryptoService cryptoService) throws IOException {
this.in = new SeekableDataInputStream(fin);
this.conf = conf;
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/PrintInfo.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/PrintInfo.java
index cc0f26e..820ae2a 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/PrintInfo.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/PrintInfo.java
@@ -39,7 +39,7 @@ public class PrintInfo {
FSDataInputStream fsin = fs.open(path);
BCFile.Reader bcfr = null;
try {
- bcfr = new BCFile.Reader(fsin, fs.getFileStatus(path).getLen(), conf, siteConfig,
+ bcfr = new BCFile.Reader(fsin, fs.getFileStatus(path).getLen(), conf,
CryptoServiceFactory.newInstance(siteConfig, ClassloaderType.ACCUMULO));
Set<Entry<String,MetaIndexEntry>> es = bcfr.metaIndex.index.entrySet();
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/IteratorUtil.java b/core/src/main/java/org/apache/accumulo/core/iterators/IteratorUtil.java
index 30fc11d..ab8b433 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/IteratorUtil.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/IteratorUtil.java
@@ -241,8 +241,8 @@ public class IteratorUtil {
AccumuloConfiguration conf, List<IterInfo> ssiList, Map<String,Map<String,String>> ssio,
IteratorEnvironment env, boolean useAccumuloClassLoader) throws IOException {
- return loadIteratorsHelper(scope, source, extent, conf, ssiList, ssio, env,
- useAccumuloClassLoader, conf.get(Property.TABLE_CLASSPATH));
+ return loadIteratorsHelper(scope, source, conf, ssiList, ssio, env, useAccumuloClassLoader,
+ conf.get(Property.TABLE_CLASSPATH));
}
// @formatter:off
@@ -254,18 +254,17 @@ public class IteratorUtil {
IteratorEnvironment env, boolean useAccumuloClassLoader, String classLoaderContext)
throws IOException {
- return loadIteratorsHelper(scope, source, extent, conf, ssiList, ssio, env,
- useAccumuloClassLoader, classLoaderContext);
+ return loadIteratorsHelper(scope, source, conf, ssiList, ssio, env, useAccumuloClassLoader,
+ classLoaderContext);
}
// @formatter:off
private static <K extends WritableComparable<?>,V extends Writable> SortedKeyValueIterator<K,V>
loadIteratorsHelper(
- // @formatter:on
- IteratorScope scope, SortedKeyValueIterator<K,V> source, KeyExtent extent,
- AccumuloConfiguration conf, List<IterInfo> ssiList, Map<String,Map<String,String>> ssio,
- IteratorEnvironment env, boolean useAccumuloClassLoader, String classLoaderContext)
- throws IOException {
+ // @formatter:on
+ IteratorScope scope, SortedKeyValueIterator<K,V> source, AccumuloConfiguration conf,
+ List<IterInfo> ssiList, Map<String,Map<String,String>> ssio, IteratorEnvironment env,
+ boolean useAccumuloClassLoader, String classLoaderContext) throws IOException {
List<IterInfo> iters = new ArrayList<>(ssiList);
Map<String,Map<String,String>> allOptions = new HashMap<>();
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/system/MapFileIterator.java b/core/src/main/java/org/apache/accumulo/core/iterators/system/MapFileIterator.java
index e4b051c..dd73649 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/system/MapFileIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/system/MapFileIterator.java
@@ -54,7 +54,7 @@ public class MapFileIterator implements FileSKVIterator {
public MapFileIterator(AccumuloConfiguration acuconf, FileSystem fs, String dir,
Configuration conf) throws IOException {
- this.reader = MapFileUtil.openMapFile(acuconf, fs, dir, conf);
+ this.reader = MapFileUtil.openMapFile(fs, dir, conf);
this.fs = fs;
this.dirName = dir;
}
diff --git a/core/src/main/java/org/apache/accumulo/core/metadata/MetadataLocationObtainer.java b/core/src/main/java/org/apache/accumulo/core/metadata/MetadataLocationObtainer.java
index d4fa999..28e54db 100644
--- a/core/src/main/java/org/apache/accumulo/core/metadata/MetadataLocationObtainer.java
+++ b/core/src/main/java/org/apache/accumulo/core/metadata/MetadataLocationObtainer.java
@@ -104,8 +104,7 @@ public class MetadataLocationObtainer implements TabletLocationObtainer {
Map<String,Map<String,String>> serverSideIteratorOptions = Collections.emptyMap();
boolean more = ThriftScanner.getBatchFromServer(context, range, src.tablet_extent,
src.tablet_location, encodedResults, locCols, serverSideIteratorList,
- serverSideIteratorOptions, Constants.SCAN_BATCH_SIZE, Authorizations.EMPTY, false, 0L,
- null);
+ serverSideIteratorOptions, Constants.SCAN_BATCH_SIZE, Authorizations.EMPTY, 0L, null);
decodeRows(encodedResults, results);
@@ -115,8 +114,7 @@ public class MetadataLocationObtainer implements TabletLocationObtainer {
encodedResults.clear();
more = ThriftScanner.getBatchFromServer(context, range, src.tablet_extent,
src.tablet_location, encodedResults, locCols, serverSideIteratorList,
- serverSideIteratorOptions, Constants.SCAN_BATCH_SIZE, Authorizations.EMPTY, false, 0L,
- null);
+ serverSideIteratorOptions, Constants.SCAN_BATCH_SIZE, Authorizations.EMPTY, 0L, null);
decodeRows(encodedResults, results);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/replication/AccumuloReplicationReplayer.java b/core/src/main/java/org/apache/accumulo/core/replication/AccumuloReplicationReplayer.java
index 08d95ca..39dea3b 100644
--- a/core/src/main/java/org/apache/accumulo/core/replication/AccumuloReplicationReplayer.java
+++ b/core/src/main/java/org/apache/accumulo/core/replication/AccumuloReplicationReplayer.java
@@ -19,7 +19,6 @@ package org.apache.accumulo.core.replication;
import org.apache.accumulo.core.client.AccumuloException;
import org.apache.accumulo.core.client.AccumuloSecurityException;
import org.apache.accumulo.core.clientImpl.ClientContext;
-import org.apache.accumulo.core.replication.thrift.KeyValues;
import org.apache.accumulo.core.replication.thrift.RemoteReplicationException;
import org.apache.accumulo.core.replication.thrift.WalEdits;
@@ -28,7 +27,6 @@ public interface AccumuloReplicationReplayer {
long replicateLog(ClientContext context, String tableName, WalEdits data)
throws RemoteReplicationException, AccumuloException, AccumuloSecurityException;
- long replicateKeyValues(ClientContext context, String tableName, KeyValues kvs)
- throws RemoteReplicationException;
+ long replicateKeyValues() throws RemoteReplicationException;
}
diff --git a/core/src/main/java/org/apache/accumulo/core/summary/SummarySerializer.java b/core/src/main/java/org/apache/accumulo/core/summary/SummarySerializer.java
index e3a6f61..253abd0 100644
--- a/core/src/main/java/org/apache/accumulo/core/summary/SummarySerializer.java
+++ b/core/src/main/java/org/apache/accumulo/core/summary/SummarySerializer.java
@@ -33,7 +33,6 @@ import org.apache.accumulo.core.client.summary.Summarizer;
import org.apache.accumulo.core.client.summary.Summarizer.Collector;
import org.apache.accumulo.core.client.summary.Summarizer.Combiner;
import org.apache.accumulo.core.client.summary.SummarizerConfiguration;
-import org.apache.accumulo.core.data.ByteSequence;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.summary.Gatherer.RowRange;
@@ -360,7 +359,7 @@ class SummarySerializer {
}
}
- public void startNewLocalityGroup(String name, Set<ByteSequence> columnFamilies) {
+ public void startNewLocalityGroup(String name) {
if (lgb != null) {
lgb.finish();
locGroups.add(lgb);
diff --git a/core/src/main/java/org/apache/accumulo/core/summary/SummaryWriter.java b/core/src/main/java/org/apache/accumulo/core/summary/SummaryWriter.java
index 1f77fd3..d57e931 100644
--- a/core/src/main/java/org/apache/accumulo/core/summary/SummaryWriter.java
+++ b/core/src/main/java/org/apache/accumulo/core/summary/SummaryWriter.java
@@ -63,7 +63,7 @@ public class SummaryWriter implements FileSKVWriter {
public void startNewLocalityGroup(String name, Set<ByteSequence> columnFamilies)
throws IOException {
for (SummarySerializer.Builder ssb : summaryStores) {
- ssb.startNewLocalityGroup(name, columnFamilies);
+ ssb.startNewLocalityGroup(name);
}
writer.startNewLocalityGroup(name, columnFamilies);
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 90e9c07..33cc7d8 100644
--- a/core/src/main/java/org/apache/accumulo/fate/AdminUtil.java
+++ b/core/src/main/java/org/apache/accumulo/fate/AdminUtil.java
@@ -385,7 +385,7 @@ public class AdminUtil<T> {
return state;
}
- public void deleteLocks(TStore<T> zs, IZooReaderWriter zk, String path, String txidStr)
+ public void deleteLocks(IZooReaderWriter zk, String path, String txidStr)
throws KeeperException, InterruptedException {
// delete any locks assoc w/ fate operation
List<String> lockedIds = zk.getChildren(path);
diff --git a/core/src/main/java/org/apache/accumulo/fate/Fate.java b/core/src/main/java/org/apache/accumulo/fate/Fate.java
index 466585d..402f792 100644
--- a/core/src/main/java/org/apache/accumulo/fate/Fate.java
+++ b/core/src/main/java/org/apache/accumulo/fate/Fate.java
@@ -74,7 +74,7 @@ public class Fate<T> {
continue;
} catch (Exception e) {
- transitionToFailed(tid, op, e);
+ transitionToFailed(tid, e);
continue;
}
@@ -92,7 +92,7 @@ public class Fate<T> {
// the op that failed to push onto the stack was never executed, so no need to undo
// it
// just transition to failed and undo the ops that executed
- transitionToFailed(tid, op, e);
+ transitionToFailed(tid, e);
continue;
}
}
@@ -108,7 +108,7 @@ public class Fate<T> {
}
}
- private void transitionToFailed(long tid, Repo<T> op, Exception e) {
+ private void transitionToFailed(long tid, Exception e) {
String tidStr = String.format("%016x", tid);
final String msg = "Failed to execute Repo, tid=" + tidStr;
// Certain FATE ops that throw exceptions don't need to be propagated up to the Monitor
diff --git a/core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java b/core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java
index ef4a987..3c58244b1c 100644
--- a/core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java
+++ b/core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java
@@ -51,7 +51,7 @@ public class ZooSession {
private static final Logger log = LoggerFactory.getLogger(ZooSession.class);
private static class ZooSessionInfo {
- public ZooSessionInfo(ZooKeeper zooKeeper, ZooWatcher watcher) {
+ public ZooSessionInfo(ZooKeeper zooKeeper) {
this.zooKeeper = zooKeeper;
}
@@ -198,7 +198,7 @@ public class ZooSession {
if (zsi == null) {
ZooWatcher watcher = new ZooWatcher();
log.debug("Connecting to {} with timeout {} with auth", zooKeepers, timeout);
- zsi = new ZooSessionInfo(connect(zooKeepers, timeout, scheme, auth, watcher), watcher);
+ zsi = new ZooSessionInfo(connect(zooKeepers, timeout, scheme, auth, watcher));
sessions.put(sessionKey, zsi);
if (auth != null && !sessions.containsKey(readOnlySessionKey))
sessions.put(readOnlySessionKey, zsi);
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 085f897..5c7420f 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
@@ -175,13 +175,13 @@ public class TabletLocatorImplTest {
replay(context);
}
- private void runTest(Text tableName, List<Range> ranges, TabletLocatorImpl tab1TabletCache,
+ private void runTest(List<Range> ranges, TabletLocatorImpl tab1TabletCache,
Map<String,Map<KeyExtent,List<Range>>> expected) throws Exception {
List<Range> failures = Collections.emptyList();
- runTest(tableName, ranges, tab1TabletCache, expected, failures);
+ runTest(ranges, tab1TabletCache, expected, failures);
}
- private void runTest(Text tableName, List<Range> ranges, TabletLocatorImpl tab1TabletCache,
+ private void runTest(List<Range> ranges, TabletLocatorImpl tab1TabletCache,
Map<String,Map<KeyExtent,List<Range>>> expected, List<Range> efailures) throws Exception {
Map<String,Map<KeyExtent,List<Range>>> binnedRanges = new HashMap<>();
@@ -792,7 +792,6 @@ public class TabletLocatorImplTest {
@Test
public void testBinRanges1() throws Exception {
- Text tableName = new Text("foo");
TabletLocatorImpl metaCache = createLocators("foo", nke("foo", null, null), "l1");
@@ -802,28 +801,26 @@ public class TabletLocatorImplTest {
);
- runTest(tableName, ranges, metaCache, expected);
+ runTest(ranges, metaCache, expected);
ranges = nrl(nr("a", null));
expected = createExpectedBinnings("l1", nol(nke("foo", null, null), nrl(nr("a", null)))
);
- runTest(tableName, ranges, metaCache, expected);
+ runTest(ranges, metaCache, expected);
ranges = nrl(nr(null, "b"));
expected = createExpectedBinnings("l1", nol(nke("foo", null, null), nrl(nr(null, "b")))
);
- runTest(tableName, ranges, metaCache, expected);
+ runTest(ranges, metaCache, expected);
}
@Test
public void testBinRanges2() throws Exception {
- Text tableName = new Text("foo");
-
List<Range> ranges = nrl(nr(null, null));
TabletLocatorImpl metaCache = createLocators("foo", nke("foo", "g", null), "l1",
nke("foo", null, "g"), "l2");
@@ -834,14 +831,12 @@ public class TabletLocatorImplTest {
);
- runTest(tableName, ranges, metaCache, expected);
+ runTest(ranges, metaCache, expected);
}
@Test
public void testBinRanges3() throws Exception {
- Text tableName = new Text("foo");
-
// test with three tablets and a range that covers the whole table
List<Range> ranges = nrl(nr(null, null));
TabletLocatorImpl metaCache = createLocators("foo", nke("foo", "g", null), "l1",
@@ -853,7 +848,7 @@ public class TabletLocatorImplTest {
);
- runTest(tableName, ranges, metaCache, expected);
+ runTest(ranges, metaCache, expected);
// test with three tablets where one range falls within the first tablet and last two ranges
// fall within the last tablet
@@ -863,7 +858,7 @@ public class TabletLocatorImplTest {
);
- runTest(tableName, ranges, metaCache, expected);
+ runTest(ranges, metaCache, expected);
// test is same as above, but has an additional range that spans the first two tablets
ranges = nrl(nr(null, "c"), nr("f", "i"), nr("s", "y"), nr("z", null));
@@ -874,7 +869,7 @@ public class TabletLocatorImplTest {
);
- runTest(tableName, ranges, metaCache, expected);
+ runTest(ranges, metaCache, expected);
// test where start of range is not inclusive and same as tablet endRow
ranges = nrl(nr("g", false, "m", true));
@@ -883,7 +878,7 @@ public class TabletLocatorImplTest {
);
- runTest(tableName, ranges, metaCache, expected);
+ runTest(ranges, metaCache, expected);
// test where start of range is inclusive and same as tablet endRow
ranges = nrl(nr("g", true, "m", true));
@@ -893,7 +888,7 @@ public class TabletLocatorImplTest {
);
- runTest(tableName, ranges, metaCache, expected);
+ runTest(ranges, metaCache, expected);
ranges = nrl(nr("g", true, "m", false));
expected = createExpectedBinnings("l1",
@@ -902,7 +897,7 @@ public class TabletLocatorImplTest {
);
- runTest(tableName, ranges, metaCache, expected);
+ runTest(ranges, metaCache, expected);
ranges = nrl(nr("g", false, "m", false));
expected = createExpectedBinnings("l2",
@@ -910,12 +905,11 @@ public class TabletLocatorImplTest {
);
- runTest(tableName, ranges, metaCache, expected);
+ runTest(ranges, metaCache, expected);
}
@Test
public void testBinRanges4() throws Exception {
- Text tableName = new Text("foo");
List<Range> ranges = nrl(new Range(new Text("1")));
TabletLocatorImpl metaCache = createLocators("foo", nke("foo", "0", null), "l1",
@@ -927,7 +921,7 @@ public class TabletLocatorImplTest {
);
- runTest(tableName, ranges, metaCache, expected);
+ runTest(ranges, metaCache, expected);
Key rowColKey = new Key(new Text("3"), new Text("cf1"), new Text("cq1"));
Range range = new Range(rowColKey, true, new Key(new Text("3")).followingKey(PartialKey.ROW),
@@ -939,7 +933,7 @@ public class TabletLocatorImplTest {
);
- runTest(tableName, ranges, metaCache, expected4, nrl());
+ runTest(ranges, metaCache, expected4, nrl());
range = new Range(rowColKey, true, new Key(new Text("3")).followingKey(PartialKey.ROW), true);
@@ -949,7 +943,7 @@ public class TabletLocatorImplTest {
);
- runTest(tableName, ranges, metaCache, expected5, nrl());
+ runTest(ranges, metaCache, expected5, nrl());
range = new Range(new Text("2"), false, new Text("3"), false);
ranges = nrl(range);
@@ -957,7 +951,7 @@ public class TabletLocatorImplTest {
nol(nke("foo", "3", "2"), nrl(range))
);
- runTest(tableName, ranges, metaCache, expected6, nrl());
+ runTest(ranges, metaCache, expected6, nrl());
range = new Range(new Text("2"), true, new Text("3"), false);
ranges = nrl(range);
@@ -965,7 +959,7 @@ public class TabletLocatorImplTest {
nol(nke("foo", "2", "1"), nrl(range)), "l4", nol(nke("foo", "3", "2"), nrl(range))
);
- runTest(tableName, ranges, metaCache, expected7, nrl());
+ runTest(ranges, metaCache, expected7, nrl());
range = new Range(new Text("2"), false, new Text("3"), true);
ranges = nrl(range);
@@ -973,7 +967,7 @@ public class TabletLocatorImplTest {
nol(nke("foo", "3", "2"), nrl(range))
);
- runTest(tableName, ranges, metaCache, expected8, nrl());
+ runTest(ranges, metaCache, expected8, nrl());
range = new Range(new Text("2"), true, new Text("3"), true);
ranges = nrl(range);
@@ -981,14 +975,13 @@ public class TabletLocatorImplTest {
nol(nke("foo", "2", "1"), nrl(range)), "l4", nol(nke("foo", "3", "2"), nrl(range))
);
- runTest(tableName, ranges, metaCache, expected9, nrl());
+ runTest(ranges, metaCache, expected9, nrl());
}
@Test
public void testBinRanges5() throws Exception {
// Test binning when there is a hole in the metadata
- Text tableName = new Text("foo");
List<Range> ranges = nrl(new Range(new Text("1")));
TabletLocatorImpl metaCache = createLocators("foo", nke("foo", "0", null), "l1",
@@ -999,16 +992,16 @@ public class TabletLocatorImplTest {
);
- runTest(tableName, ranges, metaCache, expected1);
+ runTest(ranges, metaCache, expected1);
ranges = nrl(new Range(new Text("2")), new Range(new Text("11")));
Map<String,Map<KeyExtent,List<Range>>> expected2 = createExpectedBinnings();
- runTest(tableName, ranges, metaCache, expected2, ranges);
+ runTest(ranges, metaCache, expected2, ranges);
ranges = nrl(new Range(new Text("1")), new Range(new Text("2")));
- runTest(tableName, ranges, metaCache, expected1, nrl(new Range(new Text("2"))));
+ runTest(ranges, metaCache, expected1, nrl(new Range(new Text("2"))));
ranges = nrl(nr("0", "2"), nr("3", "4"));
Map<String,Map<KeyExtent,List<Range>>> expected3 = createExpectedBinnings("l4",
@@ -1017,7 +1010,7 @@ public class TabletLocatorImplTest {
);
- runTest(tableName, ranges, metaCache, expected3, nrl(nr("0", "2")));
+ runTest(ranges, metaCache, expected3, nrl(nr("0", "2")));
ranges = nrl(nr("0", "1"), nr("0", "11"), nr("1", "2"), nr("0", "4"), nr("2", "4"),
nr("21", "4"));
@@ -1029,7 +1022,7 @@ public class TabletLocatorImplTest {
);
- runTest(tableName, ranges, metaCache, expected4,
+ runTest(ranges, metaCache, expected4,
nrl(nr("0", "11"), nr("1", "2"), nr("0", "4"), nr("2", "4")));
}
@@ -1166,7 +1159,7 @@ public class TabletLocatorImplTest {
);
if (i == 1 || i == 2)
- runTest(new Text("foo"), ranges, metaCache, expected1);
+ runTest(ranges, metaCache, expected1);
KeyExtent ke11 = nke("foo", "n", null);
KeyExtent ke12 = nke("foo", null, "n");
@@ -1185,7 +1178,7 @@ public class TabletLocatorImplTest {
);
if (i == 1 || i == 2)
- runTest(new Text("foo"), ranges, metaCache, expected2,
+ runTest(ranges, metaCache, expected2,
nrl(new Range(new Text("a")), new Range(new Text("m"))));
setLocation(tservers, "tserver2", MTE, ke11, "l3");
@@ -1200,7 +1193,7 @@ public class TabletLocatorImplTest {
);
if (i == 1 || i == 2)
- runTest(new Text("foo"), ranges, metaCache, expected3);
+ runTest(ranges, metaCache, expected3);
}
}
@@ -1415,35 +1408,35 @@ public class TabletLocatorImplTest {
nol(ke11, nrl(new Range("a"), nr("b", "o"))), "L2",
nol(ke12, nrl(nr("b", "o"), nr("r", "z"))));
- runTest(null, ranges, metaCache, expected);
+ runTest(ranges, metaCache, expected);
activeLocks.remove("L2:9");
expected = createExpectedBinnings("L1", nol(ke11, nrl(new Range("a"))));
- runTest(null, ranges, metaCache, expected, nrl(nr("b", "o"), nr("r", "z")));
+ runTest(ranges, metaCache, expected, nrl(nr("b", "o"), nr("r", "z")));
activeLocks.clear();
expected = createExpectedBinnings();
- runTest(null, ranges, metaCache, expected, nrl(new Range("a"), nr("b", "o"), nr("r", "z")));
+ runTest(ranges, metaCache, expected, nrl(new Range("a"), nr("b", "o"), nr("r", "z")));
clearLocation(tservers, "tserver2", MTE, ke11, "8");
clearLocation(tservers, "tserver2", MTE, ke12, "9");
setLocation(tservers, "tserver2", MTE, ke11, "L3", "10");
setLocation(tservers, "tserver2", MTE, ke12, "L4", "11");
- runTest(null, ranges, metaCache, expected, nrl(new Range("a"), nr("b", "o"), nr("r", "z")));
+ runTest(ranges, metaCache, expected, nrl(new Range("a"), nr("b", "o"), nr("r", "z")));
activeLocks.add("L3:10");
expected = createExpectedBinnings("L3", nol(ke11, nrl(new Range("a"))));
- runTest(null, ranges, metaCache, expected, nrl(nr("b", "o"), nr("r", "z")));
+ runTest(ranges, metaCache, expected, nrl(nr("b", "o"), nr("r", "z")));
activeLocks.add("L4:11");
expected = createExpectedBinnings("L3", nol(ke11, nrl(new Range("a"), nr("b", "o"))), "L4",
nol(ke12, nrl(nr("b", "o"), nr("r", "z"))));
- runTest(null, ranges, metaCache, expected);
+ runTest(ranges, metaCache, expected);
}
}
diff --git a/core/src/test/java/org/apache/accumulo/core/file/rfile/CreateCompatTestFile.java b/core/src/test/java/org/apache/accumulo/core/file/rfile/CreateCompatTestFile.java
index a422606..d04c9a5 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/rfile/CreateCompatTestFile.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/rfile/CreateCompatTestFile.java
@@ -60,7 +60,7 @@ public class CreateCompatTestFile {
Configuration conf = new Configuration();
FileSystem fs = FileSystem.get(conf);
AccumuloConfiguration aconf = DefaultConfiguration.getInstance();
- BCFile.Writer _cbw = new BCFile.Writer(fs.create(new Path(args[0])), null, "gz", conf, aconf,
+ BCFile.Writer _cbw = new BCFile.Writer(fs.create(new Path(args[0])), null, "gz", conf,
CryptoServiceFactory.newInstance(aconf, ClassloaderType.JAVA));
RFile.Writer writer = new RFile.Writer(_cbw, 1000);
diff --git a/core/src/test/java/org/apache/accumulo/core/file/rfile/KeyShortenerTest.java b/core/src/test/java/org/apache/accumulo/core/file/rfile/KeyShortenerTest.java
index 26774b1..cef58c3 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/rfile/KeyShortenerTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/rfile/KeyShortenerTest.java
@@ -35,7 +35,7 @@ public class KeyShortenerTest {
assertTrue(s.compareTo(c) < 0);
}
- private void testKeys(Key prev, Key current, Key expected) {
+ private void testKeys(Key prev, Key current) {
Key sk = KeyShortener.shorten(prev, current);
assertBetween(prev, sk, current);
}
@@ -72,32 +72,30 @@ public class KeyShortenerTest {
public void testOneCharacterDifference() {
// row has char that differs by one byte
testKeys(new Key("r321hahahaha", "f89222", "q90232e"),
- new Key("r321hbhahaha", "f89222", "q90232e"), newKey(apendFF("r321ha"), E, E, 0));
+ new Key("r321hbhahaha", "f89222", "q90232e"));
// family has char that differs by one byte
testKeys(new Key("r321hahahaha", "f89222", "q90232e"),
- new Key("r321hahahaha", "f89322", "q90232e"),
- newKey("r321hahahaha", apendFF("f892"), E, 0));
+ new Key("r321hahahaha", "f89322", "q90232e"));
// qualifier has char that differs by one byte
testKeys(new Key("r321hahahaha", "f89222", "q90232e"),
- new Key("r321hahahaha", "f89222", "q91232e"),
- newKey("r321hahahaha", "f89222", apendFF("q90"), 0));
+ new Key("r321hahahaha", "f89222", "q91232e"));
}
@Test
public void testMultiCharacterDifference() {
// row has char that differs by two bytes
testKeys(new Key("r321hahahaha", "f89222", "q90232e"),
- new Key("r321hchahaha", "f89222", "q90232e"), newKey("r321hb", E, E, 0));
+ new Key("r321hchahaha", "f89222", "q90232e"));
// family has char that differs by two bytes
testKeys(new Key("r321hahahaha", "f89222", "q90232e"),
- new Key("r321hahahaha", "f89422", "q90232e"), newKey("r321hahahaha", "f893", E, 0));
+ new Key("r321hahahaha", "f89422", "q90232e"));
// qualifier has char that differs by two bytes
testKeys(new Key("r321hahahaha", "f89222", "q90232e"),
- new Key("r321hahahaha", "f89222", "q92232e"), newKey("r321hahahaha", "f89222", "q91", 0));
+ new Key("r321hahahaha", "f89222", "q92232e"));
}
@Test
@@ -108,42 +106,31 @@ public class KeyShortenerTest {
byte[] eff1 = Bytes.concat(apendFF("mop"), FF, FF);
byte[] eff2 = Bytes.concat(apendFF("mop"), FF, FF, FF);
- testKeys(newKey(ff1, "f89222", "q90232e", 34), new Key("mor56", "f89222", "q90232e"),
- newKey(eff1, E, E, 0));
- testKeys(newKey("r1", ff1, "q90232e", 34), new Key("r1", "mor56", "q90232e"),
- newKey("r1", eff1, E, 0));
- testKeys(newKey("r1", "f1", ff1, 34), new Key("r1", "f1", "mor56"),
- newKey("r1", "f1", eff1, 0));
+ testKeys(newKey(ff1, "f89222", "q90232e", 34), new Key("mor56", "f89222", "q90232e"));
+ testKeys(newKey("r1", ff1, "q90232e", 34), new Key("r1", "mor56", "q90232e"));
+ testKeys(newKey("r1", "f1", ff1, 34), new Key("r1", "f1", "mor56"));
- testKeys(newKey(ff2, "f89222", "q90232e", 34), new Key("mor56", "f89222", "q90232e"),
- newKey(eff2, E, E, 0));
- testKeys(newKey("r1", ff2, "q90232e", 34), new Key("r1", "mor56", "q90232e"),
- newKey("r1", eff2, E, 0));
- testKeys(newKey("r1", "f1", ff2, 34), new Key("r1", "f1", "mor56"),
- newKey("r1", "f1", eff2, 0));
+ testKeys(newKey(ff2, "f89222", "q90232e", 34), new Key("mor56", "f89222", "q90232e"));
+ testKeys(newKey("r1", ff2, "q90232e", 34), new Key("r1", "mor56", "q90232e"));
+ testKeys(newKey("r1", "f1", ff2, 34), new Key("r1", "f1", "mor56"));
}
@Test
public void testOneCharacterDifferenceAtEnd() {
testKeys(new Key("r321hahahaha", "f89222", "q90232e"),
- new Key("r321hahahahb", "f89222", "q90232e"), newKey(append00("r321hahahaha"), E, E, 0));
+ new Key("r321hahahahb", "f89222", "q90232e"));
testKeys(new Key("r321hahahaha", "f89222", "q90232e"),
- new Key("r321hahahaha", "f89223", "q90232e"),
- newKey("r321hahahaha", append00("f89222"), E, 0));
+ new Key("r321hahahaha", "f89223", "q90232e"));
testKeys(new Key("r321hahahaha", "f89222", "q90232e"),
- new Key("r321hahahaha", "f89222", "q90232f"),
- newKey("r321hahahaha", "f89222", append00("q90232e"), 0));
+ new Key("r321hahahaha", "f89222", "q90232f"));
}
@Test
public void testSamePrefix() {
- testKeys(new Key("r3boot4", "f89222", "q90232e"), new Key("r3boot452", "f89222", "q90232e"),
- newKey(append00("r3boot4"), E, E, 0));
- testKeys(new Key("r3boot4", "f892", "q90232e"), new Key("r3boot4", "f89222", "q90232e"),
- newKey("r3boot4", append00("f892"), E, 0));
- testKeys(new Key("r3boot4", "f89222", "q902"), new Key("r3boot4", "f89222", "q90232e"),
- newKey("r3boot4", "f89222", append00("q902"), 0));
+ testKeys(new Key("r3boot4", "f89222", "q90232e"), new Key("r3boot452", "f89222", "q90232e"));
+ testKeys(new Key("r3boot4", "f892", "q90232e"), new Key("r3boot4", "f89222", "q90232e"));
+ testKeys(new Key("r3boot4", "f89222", "q902"), new Key("r3boot4", "f89222", "q90232e"));
}
@Test
diff --git a/core/src/test/java/org/apache/accumulo/core/file/rfile/MultiLevelIndexTest.java b/core/src/test/java/org/apache/accumulo/core/file/rfile/MultiLevelIndexTest.java
index 21436b0..c776de8 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/rfile/MultiLevelIndexTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/rfile/MultiLevelIndexTest.java
@@ -62,7 +62,7 @@ public class MultiLevelIndexTest {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
FSDataOutputStream dos = new FSDataOutputStream(baos, new FileSystem.Statistics("a"));
BCFile.Writer _cbw = new BCFile.Writer(dos, null, "gz", CachedConfiguration.getInstance(),
- aconf, CryptoServiceFactory.newInstance(aconf, ClassloaderType.JAVA));
+ CryptoServiceFactory.newInstance(aconf, ClassloaderType.JAVA));
BufferedWriter mliw = new BufferedWriter(new Writer(_cbw, maxBlockSize));
diff --git a/core/src/test/java/org/apache/accumulo/core/file/rfile/MultiThreadedRFileTest.java b/core/src/test/java/org/apache/accumulo/core/file/rfile/MultiThreadedRFileTest.java
index 0b750f0..7cca7b1 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/rfile/MultiThreadedRFileTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/rfile/MultiThreadedRFileTest.java
@@ -152,7 +152,7 @@ public class MultiThreadedRFileTest {
FileSystem fs = FileSystem.newInstance(conf);
Path path = new Path("file://" + rfile);
dos = fs.create(path, true);
- BCFile.Writer _cbw = new BCFile.Writer(dos, null, "gz", conf, accumuloConfiguration,
+ BCFile.Writer _cbw = new BCFile.Writer(dos, null, "gz", conf,
CryptoServiceFactory.newInstance(accumuloConfiguration, ClassloaderType.JAVA));
SamplerConfigurationImpl samplerConfig = SamplerConfigurationImpl
.newSamplerConfig(accumuloConfiguration);
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 f8d1f34..a13e4f3 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
@@ -242,7 +242,7 @@ public class RFileTest {
public void openWriter(boolean startDLG, int blockSize) throws IOException {
baos = new ByteArrayOutputStream();
dos = new FSDataOutputStream(baos, new FileSystem.Statistics("a"));
- BCFile.Writer _cbw = new BCFile.Writer(dos, null, "gz", conf, accumuloConfiguration,
+ BCFile.Writer _cbw = new BCFile.Writer(dos, null, "gz", conf,
CryptoServiceFactory.newInstance(accumuloConfiguration, ClassloaderType.JAVA));
SamplerConfigurationImpl samplerConfig = SamplerConfigurationImpl
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/user/CombinerTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/user/CombinerTest.java
index bfd320e..127a57f 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/user/CombinerTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/user/CombinerTest.java
@@ -782,7 +782,7 @@ public class CombinerTest {
return new ArrayList<>();
}
- public List<Long> decode(byte[] b, int offset, int len) {
+ public List<Long> decode() {
return new ArrayList<>();
}
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/user/RowEncodingIteratorTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/user/RowEncodingIteratorTest.java
index 1a5c10e..524ac50 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/user/RowEncodingIteratorTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/user/RowEncodingIteratorTest.java
@@ -58,7 +58,7 @@ public class RowEncodingIteratorTest {
private static final class RowEncodingIteratorImpl extends RowEncodingIterator {
- public static SortedMap<Key,Value> decodeRow(Key rowKey, Value rowValue) throws IOException {
+ public static SortedMap<Key,Value> decodeRow(Value rowValue) throws IOException {
DataInputStream dis = new DataInputStream(new ByteArrayInputStream(rowValue.get()));
int numKeys = dis.readInt();
List<Key> decodedKeys = new ArrayList<>();
@@ -86,7 +86,7 @@ public class RowEncodingIteratorTest {
@Override
public SortedMap<Key,Value> rowDecoder(Key rowKey, Value rowValue) throws IOException {
- return decodeRow(rowKey, rowValue);
+ return decodeRow(rowValue);
}
@Override
@@ -141,7 +141,7 @@ public class RowEncodingIteratorTest {
iter.seek(range, new ArrayList<>(), false);
assertTrue(iter.hasTop());
- assertEquals(map1, RowEncodingIteratorImpl.decodeRow(iter.getTopKey(), iter.getTopValue()));
+ assertEquals(map1, RowEncodingIteratorImpl.decodeRow(iter.getTopValue()));
// simulate something continuing using the last key from the iterator
// this is what client and server code will do
@@ -149,7 +149,7 @@ public class RowEncodingIteratorTest {
iter.seek(range, new ArrayList<>(), false);
assertTrue(iter.hasTop());
- assertEquals(map2, RowEncodingIteratorImpl.decodeRow(iter.getTopKey(), iter.getTopValue()));
+ assertEquals(map2, RowEncodingIteratorImpl.decodeRow(iter.getTopValue()));
iter.next();
diff --git a/hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoopImpl/mapred/AbstractInputFormat.java b/hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoopImpl/mapred/AbstractInputFormat.java
index 4d1d4ea..8da2c1a 100644
--- a/hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoopImpl/mapred/AbstractInputFormat.java
+++ b/hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoopImpl/mapred/AbstractInputFormat.java
@@ -226,12 +226,10 @@ public abstract class AbstractInputFormat {
*
* @param job
* the Hadoop job configuration
- * @param tableName
- * the table name for which the scanner is configured
* @return List of iterator settings for given table
* @since 1.7.0
*/
- protected abstract List<IteratorSetting> jobIterators(JobConf job, String tableName);
+ protected abstract List<IteratorSetting> jobIterators(JobConf job);
/**
* Configures the iterators on a scanner for the given table name.
@@ -240,20 +238,18 @@ public abstract class AbstractInputFormat {
* the Hadoop job configuration
* @param scanner
* the scanner for which to configure the iterators
- * @param tableName
- * the table name for which the scanner is configured
* @since 1.7.0
*/
- private void setupIterators(JobConf job, ScannerBase scanner, String tableName,
+ private void setupIterators(JobConf job, ScannerBase scanner,
org.apache.accumulo.hadoopImpl.mapreduce.RangeInputSplit split) {
List<IteratorSetting> iterators = null;
if (split == null) {
- iterators = jobIterators(job, tableName);
+ iterators = jobIterators(job);
} else {
iterators = split.getIterators();
if (iterators == null) {
- iterators = jobIterators(job, tableName);
+ iterators = jobIterators(job);
}
}
@@ -293,7 +289,7 @@ public abstract class AbstractInputFormat {
int scanThreads = 1;
scanner = context.createBatchScanner(baseSplit.getTableName(), authorizations,
scanThreads);
- setupIterators(job, scanner, baseSplit.getTableName(), baseSplit);
+ setupIterators(job, scanner, baseSplit);
if (classLoaderContext != null) {
scanner.setClassLoaderContext(classLoaderContext);
}
@@ -338,7 +334,7 @@ public abstract class AbstractInputFormat {
log.info("Using local iterators");
scanner = new ClientSideIteratorScanner(scanner);
}
- setupIterators(job, scanner, baseSplit.getTableName(), baseSplit);
+ setupIterators(job, scanner, baseSplit);
} catch (Exception e) {
throw new IOException(e);
}
diff --git a/hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoopImpl/mapred/InputFormatBase.java b/hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoopImpl/mapred/InputFormatBase.java
index df85117..acfa559 100644
--- a/hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoopImpl/mapred/InputFormatBase.java
+++ b/hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoopImpl/mapred/InputFormatBase.java
@@ -326,7 +326,7 @@ public abstract class InputFormatBase extends AbstractInputFormat {
public abstract static class RecordReaderBase<K,V> extends AbstractRecordReader<K,V> {
@Override
- protected List<IteratorSetting> jobIterators(JobConf job, String tableName) {
+ protected List<IteratorSetting> jobIterators(JobConf job) {
return getIterators(job);
}
}
diff --git a/hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoopImpl/mapreduce/AbstractInputFormat.java b/hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoopImpl/mapreduce/AbstractInputFormat.java
index b845ff8..cdd929f 100644
--- a/hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoopImpl/mapreduce/AbstractInputFormat.java
+++ b/hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoopImpl/mapreduce/AbstractInputFormat.java
@@ -226,13 +226,10 @@ public abstract class AbstractInputFormat {
*
* @param context
* the Hadoop context for the configured job
- * @param tableName
- * the table name for which the scanner is configured
* @return List of iterator settings for given table
* @since 1.7.0
*/
- protected abstract List<IteratorSetting> contextIterators(TaskAttemptContext context,
- String tableName);
+ protected abstract List<IteratorSetting> contextIterators(TaskAttemptContext context);
/**
* Configures the iterators on a scanner for the given table name. Will attempt to use
@@ -241,24 +238,22 @@ public abstract class AbstractInputFormat {
*
* @param context
* the Hadoop context for the configured job
- * @param tableName
- * the table name for which the scanner is configured
* @param scanner
* the scanner for which to configure the iterators
* @param split
* InputSplit containing configurations
* @since 1.7.0
*/
- private void setupIterators(TaskAttemptContext context, ScannerBase scanner, String tableName,
+ private void setupIterators(TaskAttemptContext context, ScannerBase scanner,
RangeInputSplit split) {
List<IteratorSetting> iterators = null;
if (split == null) {
- iterators = contextIterators(context, tableName);
+ iterators = contextIterators(context);
} else {
iterators = split.getIterators();
if (iterators == null) {
- iterators = contextIterators(context, tableName);
+ iterators = contextIterators(context);
}
}
@@ -297,7 +292,7 @@ public abstract class AbstractInputFormat {
// will not span tablets
int scanThreads = 1;
scanner = context.createBatchScanner(split.getTableName(), authorizations, scanThreads);
- setupIterators(attempt, scanner, split.getTableName(), split);
+ setupIterators(attempt, scanner, split);
if (classLoaderContext != null) {
scanner.setClassLoaderContext(classLoaderContext);
}
@@ -343,7 +338,7 @@ public abstract class AbstractInputFormat {
scanner = new ClientSideIteratorScanner(scanner);
}
- setupIterators(attempt, scanner, split.getTableName(), split);
+ setupIterators(attempt, scanner, split);
} catch (Exception e) {
throw new IOException(e);
}
diff --git a/hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoopImpl/mapreduce/InputFormatBase.java b/hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoopImpl/mapreduce/InputFormatBase.java
index ae9d0bd..f067132 100644
--- a/hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoopImpl/mapreduce/InputFormatBase.java
+++ b/hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoopImpl/mapreduce/InputFormatBase.java
@@ -318,7 +318,7 @@ public abstract class InputFormatBase extends AbstractInputFormat {
public abstract static class RecordReaderBase<K,V> extends AbstractRecordReader<K,V> {
@Override
- protected List<IteratorSetting> contextIterators(TaskAttemptContext context, String tableName) {
+ protected List<IteratorSetting> contextIterators(TaskAttemptContext context) {
return getIterators(context);
}
}
diff --git a/minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterControl.java b/minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterControl.java
index 3b2e33e..fe06c27 100644
--- a/minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterControl.java
+++ b/minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterControl.java
@@ -135,11 +135,11 @@ public class MiniAccumuloClusterControl implements ClusterControl {
@Override
public synchronized void start(ServerType server, String hostname) throws IOException {
- start(server, hostname, Collections.emptyMap(), Integer.MAX_VALUE);
+ start(server, Collections.emptyMap(), Integer.MAX_VALUE);
}
- public synchronized void start(ServerType server, String hostname,
- Map<String,String> configOverrides, int limit) throws IOException {
+ public synchronized void start(ServerType server, Map<String,String> configOverrides, int limit)
+ throws IOException {
if (limit <= 0) {
return;
}
diff --git a/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java b/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
index 3ac6bcd..3ed9edb 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
@@ -45,7 +45,6 @@ import org.apache.accumulo.core.clientImpl.Translator;
import org.apache.accumulo.core.clientImpl.Translators;
import org.apache.accumulo.core.clientImpl.thrift.ClientService;
import org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException;
-import org.apache.accumulo.core.conf.AccumuloConfiguration;
import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.core.data.ByteSequence;
import org.apache.accumulo.core.data.Range;
@@ -80,9 +79,8 @@ public class BulkImporter {
private static final Logger log = LoggerFactory.getLogger(BulkImporter.class);
public static List<String> bulkLoad(ServerContext context, long tid, String tableId,
- List<String> files, String errorDir, boolean setTime) throws IOException {
- AssignmentStats stats = new BulkImporter(context, tid, tableId, setTime).importFiles(files,
- new Path(errorDir));
+ List<String> files, boolean setTime) throws IOException {
+ AssignmentStats stats = new BulkImporter(context, tid, tableId, setTime).importFiles(files);
List<String> result = new ArrayList<>();
for (Path p : stats.completeFailures.keySet()) {
result.add(p.toString());
@@ -108,7 +106,7 @@ public class BulkImporter {
this.setTime = setTime;
}
- public AssignmentStats importFiles(List<String> files, Path failureDir) throws IOException {
+ public AssignmentStats importFiles(List<String> files) throws IOException {
int numThreads = context.getConfiguration().getCount(Property.TSERV_BULK_PROCESS_THREADS);
int numAssignThreads = context.getConfiguration()
@@ -174,8 +172,8 @@ public class BulkImporter {
timer.stop(Timers.EXAMINE_MAP_FILES);
assignmentStats.attemptingAssignments(assignments);
- Map<Path,List<KeyExtent>> assignmentFailures = assignMapFiles(context, conf, fs, tableId,
- assignments, paths, numAssignThreads, numThreads);
+ Map<Path,List<KeyExtent>> assignmentFailures = assignMapFiles(fs, assignments, paths,
+ numAssignThreads, numThreads);
assignmentStats.assignmentsFailed(assignmentFailures);
Map<Path,Integer> failureCount = new TreeMap<>();
@@ -227,8 +225,8 @@ public class BulkImporter {
}
assignmentStats.attemptingAssignments(assignments);
- Map<Path,List<KeyExtent>> assignmentFailures2 = assignMapFiles(context, conf, fs, tableId,
- assignments, paths, numAssignThreads, numThreads);
+ Map<Path,List<KeyExtent>> assignmentFailures2 = assignMapFiles(fs, assignments, paths,
+ numAssignThreads, numThreads);
assignmentStats.assignmentsFailed(assignmentFailures2);
// merge assignmentFailures2 into assignmentFailures
@@ -346,9 +344,8 @@ public class BulkImporter {
return result;
}
- private Map<Path,List<AssignmentInfo>> estimateSizes(final AccumuloConfiguration acuConf,
- final Configuration conf, final VolumeManager vm, Map<Path,List<TabletLocation>> assignments,
- Collection<Path> paths, int numThreads) {
+ private Map<Path,List<AssignmentInfo>> estimateSizes(final VolumeManager vm,
+ Map<Path,List<TabletLocation>> assignments, Collection<Path> paths, int numThreads) {
long t1 = System.currentTimeMillis();
final Map<Path,Long> mapFileSizes = new TreeMap<>();
@@ -387,7 +384,7 @@ public class BulkImporter {
try {
estimatedSizes = FileUtil.estimateSizes(context, entry.getKey(),
- mapFileSizes.get(entry.getKey()), extentsOf(entry.getValue()), conf);
+ mapFileSizes.get(entry.getKey()), extentsOf(entry.getValue()));
} catch (IOException e) {
log.warn("Failed to estimate map file sizes {}", e.getMessage());
}
@@ -442,18 +439,18 @@ public class BulkImporter {
return result;
}
- private Map<Path,List<KeyExtent>> assignMapFiles(ClientContext context, Configuration conf,
- VolumeManager fs, String tableId, Map<Path,List<TabletLocation>> assignments,
- Collection<Path> paths, int numThreads, int numMapThreads) {
+ private Map<Path,List<KeyExtent>> assignMapFiles(VolumeManager fs,
+ Map<Path,List<TabletLocation>> assignments, Collection<Path> paths, int numThreads,
+ int numMapThreads) {
timer.start(Timers.EXAMINE_MAP_FILES);
- Map<Path,List<AssignmentInfo>> assignInfo = estimateSizes(context.getConfiguration(), conf, fs,
- assignments, paths, numMapThreads);
+ Map<Path,List<AssignmentInfo>> assignInfo = estimateSizes(fs, assignments, paths,
+ numMapThreads);
timer.stop(Timers.EXAMINE_MAP_FILES);
Map<Path,List<KeyExtent>> ret;
timer.start(Timers.IMPORT_MAP_FILES);
- ret = assignMapFiles(tableId, assignInfo, locationsOf(assignments), numThreads);
+ ret = assignMapFiles(assignInfo, locationsOf(assignments), numThreads);
timer.stop(Timers.IMPORT_MAP_FILES);
return ret;
@@ -464,8 +461,8 @@ public class BulkImporter {
HostAndPort location;
private Map<KeyExtent,List<PathSize>> assignmentsPerTablet;
- public AssignmentTask(Map<Path,List<KeyExtent>> assignmentFailures, String tableName,
- String location, Map<KeyExtent,List<PathSize>> assignmentsPerTablet) {
+ public AssignmentTask(Map<Path,List<KeyExtent>> assignmentFailures, String location,
+ Map<KeyExtent,List<PathSize>> assignmentsPerTablet) {
this.assignmentFailures = assignmentFailures;
this.location = HostAndPort.fromString(location);
this.assignmentsPerTablet = assignmentsPerTablet;
@@ -526,8 +523,8 @@ public class BulkImporter {
}
}
- private Map<Path,List<KeyExtent>> assignMapFiles(String tableName,
- Map<Path,List<AssignmentInfo>> assignments, Map<KeyExtent,String> locations, int numThreads) {
+ private Map<Path,List<KeyExtent>> assignMapFiles(Map<Path,List<AssignmentInfo>> assignments,
+ Map<KeyExtent,String> locations, int numThreads) {
// group assignments by tablet
Map<KeyExtent,List<PathSize>> assignmentsPerTablet = new TreeMap<>();
@@ -591,8 +588,7 @@ public class BulkImporter {
for (Entry<String,Map<KeyExtent,List<PathSize>>> entry : assignmentsPerTabletServer
.entrySet()) {
String location = entry.getKey();
- threadPool
- .submit(new AssignmentTask(assignmentFailures, tableName, location, entry.getValue()));
+ threadPool.submit(new AssignmentTask(assignmentFailures, location, entry.getValue()));
}
threadPool.shutdown();
diff --git a/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java b/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
index f2d4981..0609c70 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
@@ -342,7 +342,7 @@ public class ClientServiceHandler implements ClientService.Iface {
return transactionWatcher.run(Constants.BULK_ARBITRATOR_TYPE, tid, () -> {
bulkImportStatus.updateBulkImportStatus(files, BulkImportState.PROCESSING);
try {
- return BulkImporter.bulkLoad(context, tid, tableId, files, errorDir, setTime);
+ return BulkImporter.bulkLoad(context, tid, tableId, files, setTime);
} finally {
bulkImportStatus.removeBulkImportStatus(files);
}
diff --git a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java
index d04348f..c0e1439 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java
@@ -291,7 +291,7 @@ public class VolumeUtil {
if (!same(fs1, dir, fs2, newDir)) {
if (fs2.exists(newDir)) {
- Path newDirBackup = getBackupName(fs2, newDir);
+ Path newDirBackup = getBackupName(newDir);
// never delete anything because were dealing with the root tablet
// one reason this dir may exist is because this method failed previously
log.info("renaming {} to {}", newDir, newDirBackup);
@@ -313,7 +313,7 @@ public class VolumeUtil {
// rename the old dir to avoid confusion when someone looks at filesystem... its ok if we
// fail here and this does not happen because the location in
// zookeeper is the authority
- Path dirBackup = getBackupName(fs1, dir);
+ Path dirBackup = getBackupName(dir);
log.info("renaming {} to {}", dir, dirBackup);
fs1.rename(dir, dirBackup);
@@ -378,7 +378,7 @@ public class VolumeUtil {
}
- private static Path getBackupName(FileSystem fs, Path path) {
+ private static Path getBackupName(Path path) {
return new Path(path.getParent(), path.getName() + "_" + System.currentTimeMillis() + "_"
+ (rand.nextInt(Integer.MAX_VALUE) + 1) + ".bak");
}
diff --git a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
index f3cecc1..18fa54f 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
@@ -427,7 +427,7 @@ public class Initialize implements KeywordExecutable {
}
try {
- initSecurity(context, opts, uuid.toString(), rootUser);
+ initSecurity(context, opts, rootUser);
} catch (Exception e) {
log.error("FATAL: Failed to initialize security", e);
return false;
@@ -775,7 +775,7 @@ public class Initialize implements KeywordExecutable {
return optionalWarning;
}
- private static void initSecurity(ServerContext context, Opts opts, String iid, String rootUser)
+ private static void initSecurity(ServerContext context, Opts opts, String rootUser)
throws AccumuloSecurityException {
AuditedSecurityOperation.getInstance(context, true).initializeSecurity(context.rpcCreds(),
rootUser, opts.rootpass);
@@ -953,7 +953,7 @@ public class Initialize implements KeywordExecutable {
final String rootUser = getRootUserName(siteConfig, opts);
opts.rootpass = getRootPassword(siteConfig, opts, rootUser);
- initSecurity(context, opts, context.getInstanceID(), rootUser);
+ initSecurity(context, opts, rootUser);
} else {
log.error("FATAL: Attempted to reset security on accumulo before it was initialized");
}
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java b/server/base/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
index 58dca14..9cf178e 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
@@ -185,7 +185,7 @@ public class LiveTServerSet implements Watcher {
}
}
- public void splitTablet(ZooLock lock, KeyExtent extent, Text splitPoint)
+ public void splitTablet(KeyExtent extent, Text splitPoint)
throws TException, ThriftSecurityException, NotServingTabletException {
TabletClientService.Client client = ThriftUtil
.getClient(new TabletClientService.Client.Factory(), address, context);
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancer.java b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancer.java
index 64b88a8..ec071f3 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancer.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancer.java
@@ -60,7 +60,7 @@ public class DefaultLoadBalancer extends TabletBalancer {
}
public TServerInstance getAssignment(SortedMap<TServerInstance,TabletServerStatus> locations,
- KeyExtent extent, TServerInstance last) {
+ TServerInstance last) {
if (locations.size() == 0)
return null;
@@ -257,7 +257,7 @@ public class DefaultLoadBalancer extends TabletBalancer {
log.error("Unable to select a tablet to move", ex);
return result;
}
- KeyExtent extent = selectTablet(tooMuch.server, onlineTabletsForTable);
+ KeyExtent extent = selectTablet(onlineTabletsForTable);
onlineTabletsForTable.remove(extent);
if (extent == null)
return result;
@@ -290,7 +290,7 @@ public class DefaultLoadBalancer extends TabletBalancer {
return result;
}
- static KeyExtent selectTablet(TServerInstance tserver, Map<KeyExtent,TabletStats> extents) {
+ static KeyExtent selectTablet(Map<KeyExtent,TabletStats> extents) {
if (extents.size() == 0)
return null;
KeyExtent mostRecentlySplit = null;
@@ -322,7 +322,7 @@ public class DefaultLoadBalancer extends TabletBalancer {
public void getAssignments(SortedMap<TServerInstance,TabletServerStatus> current,
Map<KeyExtent,TServerInstance> unassigned, Map<KeyExtent,TServerInstance> assignments) {
for (Entry<KeyExtent,TServerInstance> entry : unassigned.entrySet()) {
- assignments.put(entry.getKey(), getAssignment(current, entry.getKey(), entry.getValue()));
+ assignments.put(entry.getKey(), getAssignment(current, entry.getValue()));
}
}
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/recovery/RecoveryPath.java b/server/base/src/main/java/org/apache/accumulo/server/master/recovery/RecoveryPath.java
index e519731..14c730c 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/recovery/RecoveryPath.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/recovery/RecoveryPath.java
@@ -16,14 +16,13 @@
*/
package org.apache.accumulo.server.master.recovery;
-import org.apache.accumulo.server.fs.VolumeManager;
import org.apache.accumulo.server.fs.VolumeManager.FileType;
import org.apache.hadoop.fs.Path;
public class RecoveryPath {
// given a wal path, transform it to a recovery path
- public static Path getRecoveryPath(VolumeManager fs, Path walPath) {
+ public static Path getRecoveryPath(Path walPath) {
if (walPath.depth() >= 3 && walPath.toUri().getScheme() != null) {
// its a fully qualified path
String uuid = walPath.getName();
diff --git a/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java b/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java
index 8589807..cdc081f 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java
@@ -223,15 +223,13 @@ public class ReplicationUtil {
/**
* Fetches the absolute path of the file to be replicated.
*
- * @param client
- * Accumulo Client
* @param workQueuePath
* Root path for the Replication WorkQueue
* @param queueKey
* The Replication work queue key
* @return The absolute path for the file, or null if the key is no longer in ZooKeeper
*/
- public String getAbsolutePath(AccumuloClient client, String workQueuePath, String queueKey) {
+ public String getAbsolutePath(String workQueuePath, String queueKey) {
byte[] data = zooCache.get(workQueuePath + "/" + queueKey);
if (data != null) {
return new String(data, UTF_8);
diff --git a/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java b/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java
index 30c238f..cb13ec4 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java
@@ -189,9 +189,9 @@ public class TServerUtils {
* Create a NonBlockingServer with a custom thread pool that can dynamically resize itself.
*/
public static ServerAddress createNonBlockingServer(HostAndPort address, TProcessor processor,
- TProtocolFactory protocolFactory, final String serverName, String threadName,
- final int numThreads, final int numSTThreads, long timeBetweenThreadChecks,
- long maxMessageSize) throws TTransportException {
+ TProtocolFactory protocolFactory, final String serverName, final int numThreads,
+ final int numSTThreads, long timeBetweenThreadChecks, long maxMessageSize)
+ throws TTransportException {
final TNonblockingServerSocket transport = new TNonblockingServerSocket(
new InetSocketAddress(address.getHost(), address.getPort()));
@@ -426,7 +426,7 @@ public class TServerUtils {
public static ServerAddress createSaslThreadPoolServer(HostAndPort address, TProcessor processor,
TProtocolFactory protocolFactory, long socketTimeout, SaslServerConnectionParams params,
- final String serverName, String threadName, final int numThreads, final int numSTThreads,
+ final String serverName, final int numThreads, final int numSTThreads,
long timeBetweenThreadChecks) throws TTransportException {
// We'd really prefer to use THsHaServer (or similar) to avoid 1 RPC == 1 Thread that the
// TThreadPoolServer does,
@@ -579,7 +579,7 @@ public class TServerUtils {
case SASL:
log.debug("Instantiating SASL Thrift server");
serverAddress = createSaslThreadPoolServer(address, processor, protocolFactory,
- serverSocketTimeout, saslParams, serverName, threadName, numThreads, numSTThreads,
+ serverSocketTimeout, saslParams, serverName, numThreads, numSTThreads,
timeBetweenThreadChecks);
break;
case THREADPOOL:
@@ -592,7 +592,7 @@ public class TServerUtils {
default:
log.debug("Instantiating default, unsecure custom half-async Thrift server");
serverAddress = createNonBlockingServer(address, processor, protocolFactory, serverName,
- threadName, numThreads, numSTThreads, timeBetweenThreadChecks, maxMessageSize);
+ numThreads, numSTThreads, timeBetweenThreadChecks, maxMessageSize);
}
break;
} catch (TTransportException e) {
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java b/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
index fc33a3f..cc6cc1f 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
@@ -124,7 +124,7 @@ public class SecurityOperation {
permHandle = pm;
if (!authorizor.validSecurityHandlers(authenticator, pm)
- || !authenticator.validSecurityHandlers(authorizor, pm)
+ || !authenticator.validSecurityHandlers()
|| !permHandle.validSecurityHandlers(authent, author))
throw new RuntimeException(authorizor + ", " + authenticator + ", and " + pm
+ " do not play nice with eachother. Please choose authentication and"
@@ -139,7 +139,7 @@ public class SecurityOperation {
throw new AccumuloSecurityException(credentials.getPrincipal(),
SecurityErrorCode.PERMISSION_DENIED);
- authenticator.initializeSecurity(credentials, rootPrincipal, token);
+ authenticator.initializeSecurity(rootPrincipal, token);
authorizor.initializeSecurity(credentials, rootPrincipal);
permHandle.initializeSecurity(credentials, rootPrincipal);
try {
@@ -197,7 +197,7 @@ public class SecurityOperation {
// If we call the normal createUser method, it will loop back into this method
// when it tries to check if the user has permission to create users
try {
- _createUser(credentials, creds, Authorizations.EMPTY);
+ _createUser(credentials, creds);
} catch (ThriftSecurityException e) {
if (e.getCode() != SecurityErrorCode.USER_EXISTS) {
// For Kerberos, a user acct is automatically created because there is no notion of
@@ -450,7 +450,7 @@ public class SecurityOperation {
}
public boolean canConditionallyUpdate(TCredentials credentials, Table.ID tableID,
- Namespace.ID namespaceId, List<ByteBuffer> authorizations) throws ThriftSecurityException {
+ Namespace.ID namespaceId) throws ThriftSecurityException {
authenticate(credentials);
@@ -595,12 +595,12 @@ public class SecurityOperation {
|| hasTablePermission(c, tableId, namespaceId, TablePermission.GRANT, false);
}
- public boolean canGrantNamespace(TCredentials c, String user, Namespace.ID namespace)
+ public boolean canGrantNamespace(TCredentials c, Namespace.ID namespace)
throws ThriftSecurityException {
- return canModifyNamespacePermission(c, user, namespace);
+ return canModifyNamespacePermission(c, namespace);
}
- private boolean canModifyNamespacePermission(TCredentials c, String user, Namespace.ID namespace)
+ private boolean canModifyNamespacePermission(TCredentials c, Namespace.ID namespace)
throws ThriftSecurityException {
authenticate(c);
// The one case where Table/SystemPermission -> NamespacePermission breaks down. The alternative
@@ -631,9 +631,9 @@ public class SecurityOperation {
|| hasTablePermission(c, tableId, namespaceId, TablePermission.GRANT, false);
}
- public boolean canRevokeNamespace(TCredentials c, String user, Namespace.ID namespace)
+ public boolean canRevokeNamespace(TCredentials c, Namespace.ID namespace)
throws ThriftSecurityException {
- return canModifyNamespacePermission(c, user, namespace);
+ return canModifyNamespacePermission(c, namespace);
}
public void changeAuthorizations(TCredentials credentials, String user,
@@ -673,7 +673,7 @@ public class SecurityOperation {
if (!canCreateUser(credentials, newUser.getPrincipal()))
throw new ThriftSecurityException(credentials.getPrincipal(),
SecurityErrorCode.PERMISSION_DENIED);
- _createUser(credentials, newUser, authorizations);
+ _createUser(credentials, newUser);
if (canChangeAuthorizations(credentials, newUser.getPrincipal())) {
try {
authorizor.changeAuthorizations(newUser.getPrincipal(), authorizations);
@@ -683,8 +683,8 @@ public class SecurityOperation {
}
}
- protected void _createUser(TCredentials credentials, Credentials newUser,
- Authorizations authorizations) throws ThriftSecurityException {
+ protected void _createUser(TCredentials credentials, Credentials newUser)
+ throws ThriftSecurityException {
try {
AuthenticationToken token = newUser.getToken();
authenticator.createUser(newUser.getPrincipal(), token);
@@ -748,7 +748,7 @@ public class SecurityOperation {
public void grantNamespacePermission(TCredentials c, String user, Namespace.ID namespace,
NamespacePermission permission) throws ThriftSecurityException {
- if (!canGrantNamespace(c, user, namespace))
+ if (!canGrantNamespace(c, namespace))
throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
targetUserExists(user);
@@ -803,7 +803,7 @@ public class SecurityOperation {
public void revokeNamespacePermission(TCredentials c, String user, Namespace.ID namespace,
NamespacePermission permission) throws ThriftSecurityException {
- if (!canRevokeNamespace(c, user, namespace))
+ if (!canRevokeNamespace(c, namespace))
throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
targetUserExists(user);
@@ -913,8 +913,8 @@ public class SecurityOperation {
namespaceId, false);
}
- public boolean canRenameNamespace(TCredentials credentials, Namespace.ID namespaceId,
- String oldName, String newName) throws ThriftSecurityException {
+ public boolean canRenameNamespace(TCredentials credentials, Namespace.ID namespaceId)
+ throws ThriftSecurityException {
authenticate(credentials);
return hasSystemPermissionWithNamespaceId(credentials, SystemPermission.ALTER_NAMESPACE,
namespaceId, false);
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/handler/Authenticator.java b/server/base/src/main/java/org/apache/accumulo/server/security/handler/Authenticator.java
index 07b3102..b2ab1b9 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/handler/Authenticator.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/handler/Authenticator.java
@@ -20,7 +20,6 @@ import java.util.Set;
import org.apache.accumulo.core.client.AccumuloSecurityException;
import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
-import org.apache.accumulo.core.securityImpl.thrift.TCredentials;
import org.apache.accumulo.server.ServerContext;
/**
@@ -32,9 +31,9 @@ public interface Authenticator {
void initialize(ServerContext context, boolean initialize);
- boolean validSecurityHandlers(Authorizor auth, PermissionHandler pm);
+ boolean validSecurityHandlers();
- void initializeSecurity(TCredentials credentials, String principal, byte[] token);
+ void initializeSecurity(String principal, byte[] token);
boolean authenticateUser(String principal, AuthenticationToken token)
throws AccumuloSecurityException;
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/handler/InsecureAuthenticator.java b/server/base/src/main/java/org/apache/accumulo/server/security/handler/InsecureAuthenticator.java
index aed4b4a..f2584f1 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/handler/InsecureAuthenticator.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/handler/InsecureAuthenticator.java
@@ -22,7 +22,6 @@ import java.util.Set;
import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
import org.apache.accumulo.core.client.security.tokens.NullToken;
-import org.apache.accumulo.core.securityImpl.thrift.TCredentials;
import org.apache.accumulo.server.ServerContext;
/**
@@ -36,12 +35,12 @@ public class InsecureAuthenticator implements Authenticator {
public void initialize(ServerContext context, boolean initialize) {}
@Override
- public boolean validSecurityHandlers(Authorizor auth, PermissionHandler pm) {
+ public boolean validSecurityHandlers() {
return true;
}
@Override
- public void initializeSecurity(TCredentials credentials, String principal, byte[] token) {}
+ public void initializeSecurity(String principal, byte[] token) {}
@Override
public boolean authenticateUser(String principal, AuthenticationToken token) {
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/handler/KerberosAuthenticator.java b/server/base/src/main/java/org/apache/accumulo/server/security/handler/KerberosAuthenticator.java
index 49345ec..0cfe793 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/handler/KerberosAuthenticator.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/handler/KerberosAuthenticator.java
@@ -29,7 +29,6 @@ import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
import org.apache.accumulo.core.client.security.tokens.KerberosToken;
import org.apache.accumulo.core.clientImpl.DelegationTokenImpl;
import org.apache.accumulo.core.clientImpl.thrift.SecurityErrorCode;
-import org.apache.accumulo.core.securityImpl.thrift.TCredentials;
import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
import org.apache.accumulo.fate.zookeeper.ZooCache;
import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
@@ -69,7 +68,7 @@ public class KerberosAuthenticator implements Authenticator {
}
@Override
- public boolean validSecurityHandlers(Authorizor auth, PermissionHandler pm) {
+ public boolean validSecurityHandlers() {
return true;
}
@@ -83,7 +82,7 @@ public class KerberosAuthenticator implements Authenticator {
}
@Override
- public void initializeSecurity(TCredentials credentials, String principal, byte[] token) {
+ public void initializeSecurity(String principal, byte[] token) {
try {
// remove old settings from zookeeper first, if any
IZooReaderWriter zoo = context.getZooReaderWriter();
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java b/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java
index c186bd6..13dfeda 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java
@@ -28,7 +28,6 @@ import org.apache.accumulo.core.client.AccumuloSecurityException;
import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
import org.apache.accumulo.core.client.security.tokens.PasswordToken;
import org.apache.accumulo.core.clientImpl.thrift.SecurityErrorCode;
-import org.apache.accumulo.core.securityImpl.thrift.TCredentials;
import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
import org.apache.accumulo.fate.zookeeper.ZooCache;
import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
@@ -61,7 +60,7 @@ public final class ZKAuthenticator implements Authenticator {
}
@Override
- public void initializeSecurity(TCredentials credentials, String principal, byte[] token) {
+ public void initializeSecurity(String principal, byte[] token) {
try {
// remove old settings from zookeeper first, if any
IZooReaderWriter zoo = context.getZooReaderWriter();
@@ -176,7 +175,7 @@ public final class ZKAuthenticator implements Authenticator {
}
@Override
- public boolean validSecurityHandlers(Authorizor auth, PermissionHandler pm) {
+ public boolean validSecurityHandlers() {
return true;
}
diff --git a/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java b/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java
index 3c9adf9..b4e197b 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java
@@ -266,7 +266,7 @@ public class TableManager {
public boolean addObserver(TableObserver to) {
synchronized (observers) {
synchronized (tableStateCache) {
- to.initialize(Collections.unmodifiableMap(tableStateCache));
+ to.initialize();
return observers.add(to);
}
}
diff --git a/server/base/src/main/java/org/apache/accumulo/server/tables/TableObserver.java b/server/base/src/main/java/org/apache/accumulo/server/tables/TableObserver.java
index a8d2a66..2ed2c48 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/tables/TableObserver.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/tables/TableObserver.java
@@ -16,13 +16,11 @@
*/
package org.apache.accumulo.server.tables;
-import java.util.Map;
-
import org.apache.accumulo.core.clientImpl.Table;
import org.apache.accumulo.core.master.state.tables.TableState;
public interface TableObserver {
- void initialize(Map<Table.ID,TableState> tableIdToStateMap);
+ void initialize();
void stateChanged(Table.ID tableId, TableState tState);
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java b/server/base/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java
index 961bbec..44cb5f0 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java
@@ -40,7 +40,7 @@ import org.apache.hadoop.io.Text;
public class CheckForMetadataProblems {
private static boolean sawProblems = false;
- public static void checkTable(String tablename, TreeSet<KeyExtent> tablets, ServerUtilOpts opts) {
+ public static void checkTable(String tablename, TreeSet<KeyExtent> tablets) {
// sanity check of metadata table entries
// make sure tablets has no holes, and that it starts and ends w/ null
@@ -91,8 +91,8 @@ public class CheckForMetadataProblems {
sawProblems = true;
}
- public static void checkMetadataAndRootTableEntries(String tableNameToCheck, ServerUtilOpts opts,
- VolumeManager fs) throws Exception {
+ public static void checkMetadataAndRootTableEntries(String tableNameToCheck, ServerUtilOpts opts)
+ throws Exception {
System.out.println("Checking table: " + tableNameToCheck);
Map<String,TreeSet<KeyExtent>> tables = new HashMap<>();
@@ -124,7 +124,7 @@ public class CheckForMetadataProblems {
Set<Entry<String,TreeSet<KeyExtent>>> es = tables.entrySet();
for (Entry<String,TreeSet<KeyExtent>> entry2 : es) {
- checkTable(entry2.getKey(), entry2.getValue(), opts);
+ checkTable(entry2.getKey(), entry2.getValue());
}
tables.clear();
@@ -155,7 +155,7 @@ public class CheckForMetadataProblems {
Set<Entry<String,TreeSet<KeyExtent>>> es = tables.entrySet();
for (Entry<String,TreeSet<KeyExtent>> entry : es) {
- checkTable(entry.getKey(), entry.getValue(), opts);
+ checkTable(entry.getKey(), entry.getValue());
}
if (!sawProblems) {
@@ -170,8 +170,8 @@ public class CheckForMetadataProblems {
VolumeManager fs = opts.getServerContext().getVolumeManager();
- checkMetadataAndRootTableEntries(RootTable.NAME, opts, fs);
- checkMetadataAndRootTableEntries(MetadataTable.NAME, opts, fs);
+ checkMetadataAndRootTableEntries(RootTable.NAME, opts);
+ checkMetadataAndRootTableEntries(MetadataTable.NAME, opts);
opts.stopTracing();
if (sawProblems)
throw new RuntimeException();
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/FileUtil.java b/server/base/src/main/java/org/apache/accumulo/server/util/FileUtil.java
index 74f408b..ad01010 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/FileUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/FileUtil.java
@@ -237,7 +237,7 @@ public class FileUtil {
long numKeys = 0;
- numKeys = countIndexEntries(context, prevEndRow, endRow, mapFiles, true, conf, readers);
+ numKeys = countIndexEntries(context, prevEndRow, endRow, mapFiles, true, readers);
if (numKeys == 0) {
// not enough info in the index to answer the question, so instead of going to
@@ -323,7 +323,7 @@ public class FileUtil {
long numKeys = 0;
numKeys = countIndexEntries(context, prevEndRow, endRow, mapFiles,
- tmpDir == null ? useIndex : false, conf, readers);
+ tmpDir == null ? useIndex : false, readers);
if (numKeys == 0) {
if (useIndex) {
@@ -423,8 +423,8 @@ public class FileUtil {
}
private static long countIndexEntries(ServerContext context, Text prevEndRow, Text endRow,
- Collection<String> mapFiles, boolean useIndex, Configuration conf,
- ArrayList<FileSKVIterator> readers) throws IOException {
+ Collection<String> mapFiles, boolean useIndex, ArrayList<FileSKVIterator> readers)
+ throws IOException {
AccumuloConfiguration acuConf = context.getConfiguration();
@@ -559,7 +559,7 @@ public class FileUtil {
}
public static Map<KeyExtent,Long> estimateSizes(ServerContext context, Path mapFile,
- long fileSize, List<KeyExtent> extents, Configuration conf) throws IOException {
+ long fileSize, List<KeyExtent> extents) throws IOException {
FileSystem ns = context.getVolumeManager().getVolumeByPath(mapFile).getFileSystem();
return BulkImport.estimateSizes(context.getConfiguration(), mapFile, fileSize, extents, ns,
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/MasterMetadataUtil.java b/server/base/src/main/java/org/apache/accumulo/server/util/MasterMetadataUtil.java
index 41ce2ea..b19a810 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/MasterMetadataUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/MasterMetadataUtil.java
@@ -98,8 +98,7 @@ public class MasterMetadataUtil {
}
public static KeyExtent fixSplit(ServerContext context, Text metadataEntry,
- SortedMap<ColumnFQ,Value> columns, TServerInstance tserver, ZooLock lock)
- throws AccumuloException {
+ SortedMap<ColumnFQ,Value> columns, ZooLock lock) throws AccumuloException {
log.info("Incomplete split {} attempting to fix", metadataEntry);
Value oper = columns.get(TabletsSection.TabletColumnFamily.OLD_PREV_ROW_COLUMN);
@@ -140,13 +139,12 @@ public class MasterMetadataUtil {
Table.ID tableId = (new KeyExtent(metadataEntry, (Text) null)).getTableId();
- return fixSplit(context, tableId, metadataEntry, metadataPrevEndRow, oper, splitRatio, tserver,
- time.toString(), initFlushID, initCompactID, lock);
+ return fixSplit(context, tableId, metadataEntry, metadataPrevEndRow, oper, splitRatio, lock);
}
private static KeyExtent fixSplit(ServerContext context, Table.ID tableId, Text metadataEntry,
- Text metadataPrevEndRow, Value oper, double splitRatio, TServerInstance tserver, String time,
- long initFlushID, long initCompactID, ZooLock lock) throws AccumuloException {
+ Text metadataPrevEndRow, Value oper, double splitRatio, ZooLock lock)
+ throws AccumuloException {
if (metadataPrevEndRow == null)
// something is wrong, this should not happen... if a tablet is split, it will always have a
// prev end row....
@@ -265,8 +263,7 @@ public class MasterMetadataUtil {
long flushId) {
if (extent.isRootTablet()) {
if (unusedWalLogs != null) {
- updateRootTabletDataFile(context, extent, path, mergeFile, dfv, time, filesInUseByScans,
- address, zooLock, unusedWalLogs, lastLocation, flushId);
+ updateRootTabletDataFile(context, unusedWalLogs);
}
return;
}
@@ -278,10 +275,7 @@ public class MasterMetadataUtil {
/**
* Update the data file for the root tablet
*/
- private static void updateRootTabletDataFile(ServerContext context, KeyExtent extent,
- FileRef path, FileRef mergeFile, DataFileValue dfv, String time,
- Set<FileRef> filesInUseByScans, String address, ZooLock zooLock, Set<String> unusedWalLogs,
- TServerInstance lastLocation, long flushId) {
+ private static void updateRootTabletDataFile(ServerContext context, Set<String> unusedWalLogs) {
IZooReaderWriter zk = context.getZooReaderWriter();
String root = MetadataTableUtil.getZookeeperLogLocation(context);
for (String entry : unusedWalLogs) {
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/ReplicationTableUtil.java b/server/base/src/main/java/org/apache/accumulo/server/util/ReplicationTableUtil.java
index b6cf121..f8defee 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/ReplicationTableUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/ReplicationTableUtil.java
@@ -152,7 +152,7 @@ public class ReplicationTableUtil {
/**
* Write the given Mutation to the replication table.
*/
- static void update(ClientContext context, Mutation m, KeyExtent extent) {
+ static void update(ClientContext context, Mutation m) {
Writer t = getWriter(context);
while (true) {
try {
@@ -179,7 +179,7 @@ public class ReplicationTableUtil {
// ACCUMULO-1294
Value v = ProtobufUtil.toValue(stat);
- update(context, createUpdateMutation(new Path(file), v, extent), extent);
+ update(context, createUpdateMutation(new Path(file), v, extent));
}
static Mutation createUpdateMutation(Path file, Value v, KeyExtent extent) {
diff --git a/server/base/src/test/java/org/apache/accumulo/server/ServerConstantsTest.java b/server/base/src/test/java/org/apache/accumulo/server/ServerConstantsTest.java
index 5b40a1c..8f110ee 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/ServerConstantsTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/ServerConstantsTest.java
@@ -66,7 +66,7 @@ public class ServerConstantsTest {
ServerConstants.DATA_VERSION, ServerConstants.DATA_VERSION, ServerConstants.DATA_VERSION)));
verifySomePass(init(folder.newFolder(), Arrays.asList(uuid1, uuid1, null),
- Arrays.asList(ServerConstants.DATA_VERSION, ServerConstants.DATA_VERSION, null)), 2);
+ Arrays.asList(ServerConstants.DATA_VERSION, ServerConstants.DATA_VERSION, null)));
}
private void verifyAllPass(ArrayList<String> paths) {
@@ -76,7 +76,7 @@ public class ServerConstantsTest {
ServerConstants.checkBaseUris(conf, paths.toArray(new String[paths.size()]), false)));
}
- private void verifySomePass(ArrayList<String> paths, int numExpected) {
+ private void verifySomePass(ArrayList<String> paths) {
assertEquals(paths.subList(0, 2), Arrays.asList(
ServerConstants.checkBaseUris(conf, paths.toArray(new String[paths.size()]), true)));
try {
diff --git a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/ChaoticLoadBalancerTest.java b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/ChaoticLoadBalancerTest.java
index 9d5a123..ec1c6f8 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/ChaoticLoadBalancerTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/ChaoticLoadBalancerTest.java
@@ -44,7 +44,7 @@ public class ChaoticLoadBalancerTest {
class FakeTServer {
List<KeyExtent> extents = new ArrayList<>();
- TabletServerStatus getStatus(TServerInstance server) {
+ TabletServerStatus getStatus() {
TabletServerStatus result = new TabletServerStatus();
result.tableMap = new HashMap<>();
for (KeyExtent extent : extents) {
@@ -104,7 +104,7 @@ public class ChaoticLoadBalancerTest {
SortedMap<TServerInstance,TabletServerStatus> current = new TreeMap<>();
for (Entry<TServerInstance,FakeTServer> entry : servers.entrySet()) {
- current.put(entry.getKey(), entry.getValue().getStatus(entry.getKey()));
+ current.put(entry.getKey(), entry.getValue().getStatus());
}
Map<KeyExtent,TServerInstance> assignments = new HashMap<>();
@@ -117,7 +117,7 @@ public class ChaoticLoadBalancerTest {
Map<TServerInstance,FakeTServer> servers) {
SortedMap<TServerInstance,TabletServerStatus> result = new TreeMap<>();
for (Entry<TServerInstance,FakeTServer> entry : servers.entrySet()) {
- result.put(entry.getKey(), entry.getValue().getStatus(entry.getKey()));
+ result.put(entry.getKey(), entry.getValue().getStatus());
}
return result;
}
diff --git a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancerTest.java b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancerTest.java
index 045e93a..6f2119c 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancerTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancerTest.java
@@ -48,7 +48,7 @@ public class DefaultLoadBalancerTest {
class FakeTServer {
List<KeyExtent> extents = new ArrayList<>();
- TabletServerStatus getStatus(TServerInstance server) {
+ TabletServerStatus getStatus() {
TabletServerStatus result = new TabletServerStatus();
result.tableMap = new HashMap<>();
for (KeyExtent extent : extents) {
@@ -115,7 +115,7 @@ public class DefaultLoadBalancerTest {
SortedMap<TServerInstance,TabletServerStatus> current = new TreeMap<>();
for (Entry<TServerInstance,FakeTServer> entry : servers.entrySet()) {
- current.put(entry.getKey(), entry.getValue().getStatus(entry.getKey()));
+ current.put(entry.getKey(), entry.getValue().getStatus());
}
assignTablets(metadataTable, servers, current, balancer);
@@ -128,7 +128,7 @@ public class DefaultLoadBalancerTest {
// Rebalance once
for (Entry<TServerInstance,FakeTServer> entry : servers.entrySet()) {
- current.put(entry.getKey(), entry.getValue().getStatus(entry.getKey()));
+ current.put(entry.getKey(), entry.getValue().getStatus());
}
// Nothing should happen, we are balanced
@@ -151,7 +151,7 @@ public class DefaultLoadBalancerTest {
SortedMap<TServerInstance,TabletServerStatus> status, TestDefaultLoadBalancer balancer) {
// Assign tablets
for (KeyExtent extent : metadataTable) {
- TServerInstance assignment = balancer.getAssignment(status, extent, last.get(extent));
+ TServerInstance assignment = balancer.getAssignment(status, last.get(extent));
assertNotNull(assignment);
assertFalse(servers.get(assignment).extents.contains(extent));
servers.get(assignment).extents.add(extent);
@@ -163,7 +163,7 @@ public class DefaultLoadBalancerTest {
Map<TServerInstance,FakeTServer> servers) {
SortedMap<TServerInstance,TabletServerStatus> result = new TreeMap<>();
for (Entry<TServerInstance,FakeTServer> entry : servers.entrySet()) {
- result.put(entry.getKey(), entry.getValue().getStatus(entry.getKey()));
+ result.put(entry.getKey(), entry.getValue().getStatus());
}
return result;
}
diff --git a/server/base/src/test/java/org/apache/accumulo/server/security/UserImpersonationTest.java b/server/base/src/test/java/org/apache/accumulo/server/security/UserImpersonationTest.java
index 72535cd..5af844c 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/security/UserImpersonationTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/security/UserImpersonationTest.java
@@ -67,7 +67,7 @@ public class UserImpersonationTest {
};
}
- void setValidHosts(String user, String... hosts) {
+ void setValidHosts(String... hosts) {
cc.set(Property.INSTANCE_RPC_SASL_ALLOWED_HOST_IMPERSONATION.getKey(),
Joiner.on(';').join(hosts));
}
@@ -86,7 +86,7 @@ public class UserImpersonationTest {
@Test
public void testAnyUserAndHosts() {
String server = "server";
- setValidHosts(server, "*");
+ setValidHosts("*");
setValidUsers(ImmutableMap.of(server, "*"));
UserImpersonation impersonation = new UserImpersonation(conf);
@@ -119,7 +119,7 @@ public class UserImpersonationTest {
@Test
public void testNoUsersByDefault() {
String server = "server";
- setValidHosts(server, "*");
+ setValidHosts("*");
UserImpersonation impersonation = new UserImpersonation(conf);
UsersWithHosts uwh = impersonation.get(server);
@@ -129,7 +129,7 @@ public class UserImpersonationTest {
@Test
public void testSingleUserAndHost() {
String server = "server", host = "single_host.domain.com", client = "single_client";
- setValidHosts(server, host);
+ setValidHosts(host);
setValidUsers(ImmutableMap.of(server, client));
UserImpersonation impersonation = new UserImpersonation(conf);
@@ -152,7 +152,7 @@ public class UserImpersonationTest {
@Test
public void testMultipleExplicitUsers() {
String server = "server", client1 = "client1", client2 = "client2", client3 = "client3";
- setValidHosts(server, "*");
+ setValidHosts("*");
setValidUsers(ImmutableMap.of(server, Joiner.on(',').join(client1, client2, client3)));
UserImpersonation impersonation = new UserImpersonation(conf);
@@ -174,7 +174,7 @@ public class UserImpersonationTest {
@Test
public void testMultipleExplicitHosts() {
String server = "server", host1 = "host1", host2 = "host2", host3 = "host3";
- setValidHosts(server, Joiner.on(',').join(host1, host2, host3));
+ setValidHosts(Joiner.on(',').join(host1, host2, host3));
setValidUsers(ImmutableMap.of(server, "*"));
UserImpersonation impersonation = new UserImpersonation(conf);
@@ -197,7 +197,7 @@ public class UserImpersonationTest {
public void testMultipleExplicitUsersHosts() {
String server = "server", host1 = "host1", host2 = "host2", host3 = "host3",
client1 = "client1", client2 = "client2", client3 = "client3";
- setValidHosts(server, Joiner.on(',').join(host1, host2, host3));
+ setValidHosts(Joiner.on(',').join(host1, host2, host3));
setValidUsers(ImmutableMap.of(server, Joiner.on(',').join(client1, client2, client3)));
UserImpersonation impersonation = new UserImpersonation(conf);
@@ -227,7 +227,7 @@ public class UserImpersonationTest {
host3 = "host3", client1 = "client1", client2 = "client2", client3 = "client3";
// server1 can impersonate client1 and client2 from host1 or host2
// server2 can impersonate only client3 from host3
- setValidHosts(server1, Joiner.on(',').join(host1, host2), host3);
+ setValidHosts(Joiner.on(',').join(host1, host2), host3);
setValidUsers(
ImmutableMap.of(server1, Joiner.on(',').join(client1, client2), server2, client3));
UserImpersonation impersonation = new UserImpersonation(conf);
diff --git a/server/master/src/main/java/org/apache/accumulo/master/FateServiceHandler.java b/server/master/src/main/java/org/apache/accumulo/master/FateServiceHandler.java
index 7ffe888..1857fa3 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/FateServiceHandler.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/FateServiceHandler.java
@@ -127,7 +127,7 @@ class FateServiceHandler implements FateService.Iface {
Namespace.ID namespaceId = ClientServiceHandler.checkNamespaceId(master.getContext(),
oldName, tableOp);
- if (!master.security.canRenameNamespace(c, namespaceId, oldName, newName))
+ if (!master.security.canRenameNamespace(c, namespaceId))
throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
master.fate.seedTransaction(opid,
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 4fcde71..1bffe6b 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
@@ -75,7 +75,6 @@ import org.apache.accumulo.core.security.Authorizations;
import org.apache.accumulo.core.security.NamespacePermission;
import org.apache.accumulo.core.security.TablePermission;
import org.apache.accumulo.core.tabletserver.thrift.TUnloadTabletGoal;
-import org.apache.accumulo.core.trace.thrift.TInfo;
import org.apache.accumulo.core.trace.wrappers.TraceWrap;
import org.apache.accumulo.core.util.Daemon;
import org.apache.accumulo.core.util.Pair;
@@ -1644,7 +1643,7 @@ public class Master
}
@Override
- public void initialize(Map<Table.ID,TableState> tableIdToStateMap) {}
+ public void initialize() {}
@Override
public void sessionExpired() {}
@@ -1718,7 +1717,7 @@ public class Master
}
@SuppressFBWarnings(value = "UW_UNCOND_WAIT", justification = "TODO needs triage")
- public void waitForBalance(TInfo tinfo) {
+ public void waitForBalance() {
synchronized (balancedNotifier) {
long eventCounter;
do {
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 47ccf71..e40ed52 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
@@ -451,7 +451,7 @@ public class MasterClientServiceHandler extends FateServiceHandler
@Override
public void waitForBalance(TInfo tinfo) {
- master.waitForBalance(tinfo);
+ master.waitForBalance();
}
@Override
diff --git a/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java b/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
index 100f6f1..668e9ea 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
@@ -511,7 +511,7 @@ abstract class TabletGroupWatcher extends Daemon {
conn = this.master.tserverSet.getConnection(tls.current);
if (conn != null) {
Master.log.info("Asking {} to split {} at {}", tls.current, tls.extent, splitPoint);
- conn.splitTablet(this.master.masterLock, tls.extent, splitPoint);
+ conn.splitTablet(tls.extent, splitPoint);
} else {
Master.log.warn("Not connected to server {}", tls.current);
}
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 b36d963..7c740f7 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
@@ -150,8 +150,7 @@ public class RecoveryManager {
String parts[] = walog.split("/");
String sortId = parts[parts.length - 1];
String filename = master.getFileSystem().getFullPath(FileType.WAL, walog).toString();
- String dest = RecoveryPath.getRecoveryPath(master.getFileSystem(), new Path(filename))
- .toString();
+ String dest = RecoveryPath.getRecoveryPath(new Path(filename)).toString();
log.debug("Recovering {} to {}", filename, dest);
boolean sortQueued;
diff --git a/server/master/src/main/java/org/apache/accumulo/master/util/FateAdmin.java b/server/master/src/main/java/org/apache/accumulo/master/util/FateAdmin.java
index afa736b..21e0850 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/util/FateAdmin.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/util/FateAdmin.java
@@ -95,7 +95,7 @@ public class FateAdmin {
if (!admin.prepDelete(zs, zk, masterPath, txid)) {
System.exit(1);
}
- admin.deleteLocks(zs, zk, zkRoot + Constants.ZTABLE_LOCKS, txid);
+ admin.deleteLocks(zk, zkRoot + Constants.ZTABLE_LOCKS, txid);
}
} else if (jc.getParsedCommand().equals("print")) {
admin.print(new ReadOnlyStore<>(zs), zk, zkRoot + Constants.ZTABLE_LOCKS);
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/trace/TracesResource.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/trace/TracesResource.java
index 7d83ea1..572893b 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/trace/TracesResource.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/trace/TracesResource.java
@@ -223,8 +223,8 @@ public class TracesResource {
traces.addStartTime(start);
final long finalStart = start;
- Set<Long> visited = tree.visit((level, parent, node, children) -> traces
- .addTrace(addTraceInformation(level, node, finalStart)));
+ Set<Long> visited = tree
+ .visit((level, node) -> traces.addTrace(addTraceInformation(level, node, finalStart)));
tree.nodes.keySet().removeAll(visited);
if (!tree.nodes.isEmpty()) {
for (RemoteSpan span : TraceDump.sortByStart(tree.nodes.values())) {
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/tservers/TabletServerResource.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/tservers/TabletServerResource.java
index 23a0e25..8349d36 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/tservers/TabletServerResource.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/tservers/TabletServerResource.java
@@ -219,10 +219,10 @@ public class TabletServerResource {
splitStdDev = stddev(historical.splits.num, historical.splits.elapsed,
historical.splits.sumDev);
- TabletServerDetailInformation details = doDetails(address, tsStats.size());
+ TabletServerDetailInformation details = doDetails(tsStats.size());
List<AllTimeTabletResults> allTime = doAllTimeResults(majorQueueStdDev, minorQueueStdDev,
- totalElapsedForAll, splitStdDev, majorStdDev, minorStdDev);
+ splitStdDev, majorStdDev, minorStdDev);
CurrentTabletResults currentRes = doCurrentTabletResults(currentMinorAvg, currentMinorStdDev,
currentMajorAvg, currentMajorStdDev);
@@ -260,15 +260,14 @@ public class TabletServerResource {
return stats;
}
- private TabletServerDetailInformation doDetails(HostAndPort address, int numTablets) {
+ private TabletServerDetailInformation doDetails(int numTablets) {
return new TabletServerDetailInformation(numTablets, total.numEntries, total.minors.status,
total.majors.status, historical.splits.status);
}
private List<AllTimeTabletResults> doAllTimeResults(double majorQueueStdDev,
- double minorQueueStdDev, double totalElapsedForAll, double splitStdDev, double majorStdDev,
- double minorStdDev) {
+ double minorQueueStdDev, double splitStdDev, double majorStdDev, double minorStdDev) {
List<AllTimeTabletResults> allTime = new ArrayList<>();
diff --git a/server/tracer/src/main/java/org/apache/accumulo/tracer/SpanTree.java b/server/tracer/src/main/java/org/apache/accumulo/tracer/SpanTree.java
index a90661f..bbb6e82 100644
--- a/server/tracer/src/main/java/org/apache/accumulo/tracer/SpanTree.java
+++ b/server/tracer/src/main/java/org/apache/accumulo/tracer/SpanTree.java
@@ -45,12 +45,11 @@ public class SpanTree {
RemoteSpan rootSpan = nodes.get(root.iterator().next());
if (rootSpan == null)
return visited;
- recurse(0, null, rootSpan, visitor, visited);
+ recurse(0, rootSpan, visitor, visited);
return visited;
}
- private void recurse(int level, RemoteSpan parent, RemoteSpan node, SpanTreeVisitor visitor,
- Set<Long> visited) {
+ private void recurse(int level, RemoteSpan node, SpanTreeVisitor visitor, Set<Long> visited) {
// improbable case: duplicate spanId in a trace tree: prevent
// infinite recursion
if (visited.contains(node.spanId))
@@ -67,9 +66,9 @@ public class SpanTree {
}
}
children = TraceDump.sortByStart(children);
- visitor.visit(level, parent, node, children);
+ visitor.visit(level, node);
for (RemoteSpan child : children) {
- recurse(level + 1, node, child, visitor, visited);
+ recurse(level + 1, child, visitor, visited);
}
}
}
diff --git a/server/tracer/src/main/java/org/apache/accumulo/tracer/SpanTreeVisitor.java b/server/tracer/src/main/java/org/apache/accumulo/tracer/SpanTreeVisitor.java
index 2ca1f3b..ac407d7 100644
--- a/server/tracer/src/main/java/org/apache/accumulo/tracer/SpanTreeVisitor.java
+++ b/server/tracer/src/main/java/org/apache/accumulo/tracer/SpanTreeVisitor.java
@@ -16,10 +16,8 @@
*/
package org.apache.accumulo.tracer;
-import java.util.Collection;
-
import org.apache.accumulo.tracer.thrift.RemoteSpan;
public interface SpanTreeVisitor {
- void visit(int level, RemoteSpan parent, RemoteSpan node, Collection<RemoteSpan> children);
+ void visit(int level, RemoteSpan node);
}
diff --git a/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceDump.java b/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceDump.java
index 6596fca..4e345e3 100644
--- a/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceDump.java
+++ b/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceDump.java
@@ -139,8 +139,7 @@ public class TraceDump {
final long finalStart = start;
Set<Long> visited = tree.visit(new SpanTreeVisitor() {
@Override
- public void visit(int level, RemoteSpan parent, RemoteSpan node,
- Collection<RemoteSpan> children) {
+ public void visit(int level, RemoteSpan node) {
String fmt = "%5d+%-5d %" + (level * 2 + 1) + "s%s@%s %s";
out.print(String.format(fmt, node.stop - node.start, node.start - finalStart, "", node.svc,
node.sender, node.description));
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 02637f1..4b95777 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
@@ -38,7 +38,6 @@ import org.apache.accumulo.core.trace.wrappers.TraceWrap;
import org.apache.accumulo.tracer.thrift.TestService;
import org.apache.accumulo.tracer.thrift.TestService.Iface;
import org.apache.accumulo.tracer.thrift.TestService.Processor;
-import org.apache.htrace.HTraceConfiguration;
import org.apache.htrace.Sampler;
import org.apache.htrace.SpanReceiver;
import org.apache.htrace.wrappers.TraceProxy;
@@ -85,8 +84,6 @@ public class TracerTest {
public TestReceiver() {}
- public TestReceiver(HTraceConfiguration conf) {}
-
@Override
public void receiveSpan(org.apache.htrace.Span s) {
long traceId = s.getTraceId();
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
index cd7476e..77ec84b 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
@@ -805,7 +805,7 @@ public class TabletServer implements Runnable {
MultiScanResult result;
try {
- result = continueMultiScan(tinfo, sid, mss);
+ result = continueMultiScan(sid, mss);
} finally {
sessionManager.unreserveSession(sid);
}
@@ -824,13 +824,13 @@ public class TabletServer implements Runnable {
}
try {
- return continueMultiScan(tinfo, scanID, session);
+ return continueMultiScan(scanID, session);
} finally {
sessionManager.unreserveSession(session);
}
}
- private MultiScanResult continueMultiScan(TInfo tinfo, long scanID, MultiScanSession session)
+ private MultiScanResult continueMultiScan(long scanID, MultiScanSession session)
throws TSampleNotPresentException {
if (session.lookupTask == null) {
@@ -1087,7 +1087,7 @@ public class TabletServer implements Runnable {
updateAvgPrepTime(pt2 - pt1, us.queuedMutations.size());
if (error != null) {
- sendables.forEach(CommitSession::abortCommit);
+ sendables.forEach((commitSession, value) -> commitSession.abortCommit());
throw new RuntimeException(error);
}
try {
@@ -1498,7 +1498,7 @@ public class TabletServer implements Runnable {
Table.ID tableId = Table.ID.of(tableIdStr);
Authorizations userauths = null;
Namespace.ID namespaceId = getNamespaceId(credentials, tableId);
- if (!security.canConditionallyUpdate(credentials, tableId, namespaceId, authorizations))
+ if (!security.canConditionallyUpdate(credentials, tableId, namespaceId))
throw new ThriftSecurityException(credentials.getPrincipal(),
SecurityErrorCode.PERMISSION_DENIED);
@@ -2227,10 +2227,10 @@ public class TabletServer implements Runnable {
tablet.initiateMajorCompaction(MajorCompactionReason.NORMAL);
}
} catch (IOException e) {
- statsKeeper.updateTime(Operation.SPLIT, 0, 0, true);
+ statsKeeper.updateTime(Operation.SPLIT, 0, true);
log.error("split failed: {} for tablet {}", e.getMessage(), tablet.getExtent(), e);
} catch (Exception e) {
- statsKeeper.updateTime(Operation.SPLIT, 0, 0, true);
+ statsKeeper.updateTime(Operation.SPLIT, 0, true);
log.error("Unknown error on split:", e);
}
}
@@ -2275,7 +2275,7 @@ public class TabletServer implements Runnable {
new Text("/" + newTablets[0].getLocation().getName()), newTablets[1].getExtent(),
new Text("/" + newTablets[1].getLocation().getName())));
- statsKeeper.updateTime(Operation.SPLIT, start, 0, false);
+ statsKeeper.updateTime(Operation.SPLIT, start, false);
long t2 = System.currentTimeMillis();
log.info("Tablet split: {} size0 {} size1 {} time {}ms", tablet.getExtent(),
newTablets[0].estimateTabletSize(), newTablets[1].estimateTabletSize(), (t2 - t1));
@@ -2498,10 +2498,9 @@ public class TabletServer implements Runnable {
getTableConfiguration(extent));
TabletData data;
if (extent.isRootTablet()) {
- data = new TabletData(context, fs, context.getZooReaderWriter(),
- getTableConfiguration(extent));
+ data = new TabletData(context, fs, getTableConfiguration(extent));
} else {
- data = new TabletData(context, extent, fs, tabletsKeyValues.entrySet().iterator());
+ data = new TabletData(extent, fs, tabletsKeyValues.entrySet().iterator());
}
tablet = new Tablet(TabletServer.this, extent, trm, data);
@@ -2969,7 +2968,7 @@ public class TabletServer implements Runnable {
}
}
- private static Pair<Text,KeyExtent> verifyRootTablet(ServerContext context, KeyExtent extent,
+ private static Pair<Text,KeyExtent> verifyRootTablet(ServerContext context,
TServerInstance instance) throws AccumuloException {
ZooTabletStateStore store = new ZooTabletStateStore(context);
if (!store.iterator().hasNext()) {
@@ -2998,7 +2997,7 @@ public class TabletServer implements Runnable {
log.debug("verifying extent {}", extent);
if (extent.isRootTablet()) {
- return verifyRootTablet(context, extent, instance);
+ return verifyRootTablet(context, instance);
}
Table.ID tableToVerify = MetadataTable.ID;
if (extent.isMeta())
@@ -3040,7 +3039,7 @@ public class TabletServer implements Runnable {
tabletEntries = MetadataTableUtil.getTabletEntries(tabletsKeyValues, columnsToFetch);
KeyExtent fke = MasterMetadataUtil.fixSplit(context, metadataEntry,
- tabletEntries.get(metadataEntry), instance, lock);
+ tabletEntries.get(metadataEntry), lock);
if (!fke.equals(extent)) {
return new Pair<>(null, fke);
@@ -3344,11 +3343,10 @@ public class TabletServer implements Runnable {
return DurabilityImpl.fromString(conf.get(Property.TABLE_DURABILITY));
}
- public void minorCompactionFinished(CommitSession tablet, String newDatafile, long walogSeq)
- throws IOException {
+ public void minorCompactionFinished(CommitSession tablet, long walogSeq) throws IOException {
Durability durability = getMincEventDurability(tablet.getExtent());
totalMinorCompactions.incrementAndGet();
- logger.minorCompactionFinished(tablet, newDatafile, walogSeq, durability);
+ logger.minorCompactionFinished(tablet, walogSeq, durability);
markUnusedWALs();
}
@@ -3358,16 +3356,14 @@ public class TabletServer implements Runnable {
logger.minorCompactionStarted(tablet, lastUpdateSequence, newMapfileLocation, durability);
}
- public void recover(VolumeManager fs, KeyExtent extent, TableConfiguration tconf,
- List<LogEntry> logEntries, Set<String> tabletFiles, MutationReceiver mutationReceiver)
- throws IOException {
+ public void recover(VolumeManager fs, KeyExtent extent, List<LogEntry> logEntries,
+ Set<String> tabletFiles, MutationReceiver mutationReceiver) throws IOException {
List<Path> recoveryLogs = new ArrayList<>();
List<LogEntry> sorted = new ArrayList<>(logEntries);
Collections.sort(sorted, (e1, e2) -> (int) (e1.timestamp - e2.timestamp));
for (LogEntry entry : sorted) {
Path recovery = null;
- Path finished = RecoveryPath.getRecoveryPath(fs,
- fs.getFullPath(FileType.WAL, entry.filename));
+ Path finished = RecoveryPath.getRecoveryPath(fs.getFullPath(FileType.WAL, entry.filename));
finished = SortedLogState.getFinishedMarkerPath(finished);
TabletServer.log.info("Looking for " + finished);
if (fs.exists(finished)) {
@@ -3560,12 +3556,8 @@ public class TabletServer implements Runnable {
private static final String MAJC_READ_LIMITER_KEY = "tserv_majc_read";
private static final String MAJC_WRITE_LIMITER_KEY = "tserv_majc_write";
- private final RateProvider rateProvider = new RateProvider() {
- @Override
- public long getDesiredRate() {
- return getConfiguration().getAsBytes(Property.TSERV_MAJC_THROUGHPUT);
- }
- };
+ private final RateProvider rateProvider = () -> getConfiguration()
+ .getAsBytes(Property.TSERV_MAJC_THROUGHPUT);
/**
* Get the {@link RateLimiter} for reads during major compactions on this tserver. All writes
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletStatsKeeper.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletStatsKeeper.java
index fb0c297..320af8b 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletStatsKeeper.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletStatsKeeper.java
@@ -59,7 +59,7 @@ public class TabletStatsKeeper {
}
- public void updateTime(Operation operation, long start, long count, boolean failed) {
+ public void updateTime(Operation operation, long start, boolean failed) {
try {
ActionStats data = map[operation.ordinal()];
if (failed) {
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 fc8e067..5f9c0a8 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
@@ -625,8 +625,8 @@ public class DfsLogger implements Comparable<DfsLogger> {
}
}
- public LoggerOperation minorCompactionFinished(long seq, int tid, String fqfn,
- Durability durability) throws IOException {
+ public LoggerOperation minorCompactionFinished(long seq, int tid, Durability durability)
+ throws IOException {
LogFileKey key = new LogFileKey();
key.event = COMPACTION_FINISH;
key.seq = seq;
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
index ad6f802..6aac02e 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
@@ -484,15 +484,13 @@ public class TabletServerLogger {
}
}
- public void minorCompactionFinished(final CommitSession commitSession,
- final String fullyQualifiedFileName, final long walogSeq, final Durability durability)
- throws IOException {
+ public void minorCompactionFinished(final CommitSession commitSession, final long walogSeq,
+ final Durability durability) throws IOException {
long t1 = System.currentTimeMillis();
- write(
- singletonList(commitSession), true, logger -> logger.minorCompactionFinished(walogSeq,
- commitSession.getLogId(), fullyQualifiedFileName, durability),
+ write(singletonList(commitSession), true,
+ logger -> logger.minorCompactionFinished(walogSeq, commitSession.getLogId(), durability),
writeRetryFactory.createRetry());
long t2 = System.currentTimeMillis();
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
index f1308f2..9aaf214 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
@@ -289,7 +289,7 @@ public class AccumuloReplicaSystem implements ReplicaSystem {
span = Trace.start("RFile replication");
try {
finalStatus = replicateRFiles(peerContext, peerTserver, target, p, status, sizeLimit,
- remoteTableId, peerContext.rpcCreds(), helper, timeout);
+ remoteTableId, peerContext.rpcCreds(), timeout);
} finally {
span.stop();
}
@@ -325,9 +325,9 @@ public class AccumuloReplicaSystem implements ReplicaSystem {
protected Status replicateRFiles(ClientContext peerContext, final HostAndPort peerTserver,
final ReplicationTarget target, final Path p, final Status status, final long sizeLimit,
- final String remoteTableId, final TCredentials tcreds, final ReplicaSystemHelper helper,
- long timeout) throws TTransportException, AccumuloException, AccumuloSecurityException {
- try (final DataInputStream input = getRFileInputStream(p)) {
+ final String remoteTableId, final TCredentials tcreds, long timeout)
+ throws TTransportException, AccumuloException, AccumuloSecurityException {
+ try (final DataInputStream input = getRFileInputStream()) {
Status lastStatus = status, currentStatus = status;
while (true) {
// Read and send a batch of mutations
@@ -390,7 +390,7 @@ public class AccumuloReplicaSystem implements ReplicaSystem {
// message,
// building a Set of tids from DEFINE_TABLET events which correspond to table ids for future
// mutations
- tids = consumeWalPrefix(target, input, p, status, sizeLimit);
+ tids = consumeWalPrefix(target, input, status);
} catch (IOException e) {
log.warn("Unexpected error consuming file.");
return status;
@@ -612,7 +612,7 @@ public class AccumuloReplicaSystem implements ReplicaSystem {
@Override
public ReplicationStats execute(Client client) throws Exception {
- RFileReplication kvs = getKeyValues(target, input, p, status, sizeLimit);
+ RFileReplication kvs = getKeyValues();
if (kvs.keyValues.getKeyValuesSize() > 0) {
long entriesReplicated = client.replicateKeyValues(remoteTableId, kvs.keyValues, tcreds);
if (entriesReplicated != kvs.keyValues.getKeyValuesSize()) {
@@ -690,14 +690,13 @@ public class AccumuloReplicaSystem implements ReplicaSystem {
return new ClientContext(ClientInfo.from(properties, token), localConf);
}
- protected RFileReplication getKeyValues(ReplicationTarget target, DataInputStream input, Path p,
- Status status, long sizeLimit) {
+ protected RFileReplication getKeyValues() {
// TODO ACCUMULO-2580 Implement me
throw new UnsupportedOperationException();
}
- protected Set<Integer> consumeWalPrefix(ReplicationTarget target, DataInputStream wal, Path p,
- Status status, long sizeLimit) throws IOException {
+ protected Set<Integer> consumeWalPrefix(ReplicationTarget target, DataInputStream wal,
+ Status status) throws IOException {
Set<Integer> tids = new HashSet<>();
LogFileKey key = new LogFileKey();
LogFileValue value = new LogFileValue();
@@ -840,7 +839,7 @@ public class AccumuloReplicaSystem implements ReplicaSystem {
return mutationsToSend;
}
- protected DataInputStream getRFileInputStream(Path p) {
+ protected DataInputStream getRFileInputStream() {
throw new UnsupportedOperationException("Not yet implemented");
}
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/BatchWriterReplicationReplayer.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/BatchWriterReplicationReplayer.java
index 894657c..7892b36 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/BatchWriterReplicationReplayer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/BatchWriterReplicationReplayer.java
@@ -32,7 +32,6 @@ import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.core.data.ColumnUpdate;
import org.apache.accumulo.core.data.Mutation;
import org.apache.accumulo.core.replication.AccumuloReplicationReplayer;
-import org.apache.accumulo.core.replication.thrift.KeyValues;
import org.apache.accumulo.core.replication.thrift.RemoteReplicationErrorCode;
import org.apache.accumulo.core.replication.thrift.RemoteReplicationException;
import org.apache.accumulo.core.replication.thrift.WalEdits;
@@ -170,7 +169,7 @@ public class BatchWriterReplicationReplayer implements AccumuloReplicationReplay
}
@Override
- public long replicateKeyValues(ClientContext context, String tableName, KeyValues kvs) {
+ public long replicateKeyValues() {
// TODO Implement me
throw new UnsupportedOperationException();
}
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CommitSession.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CommitSession.java
index 247f0c8..33ff797 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CommitSession.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CommitSession.java
@@ -73,8 +73,8 @@ public class CommitSession {
}
}
- public void abortCommit(List<Mutation> value) {
- committer.abortCommit(this, value);
+ public void abortCommit() {
+ committer.abortCommit(this);
}
public void commit(List<Mutation> mutations) {
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Compactor.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Compactor.java
index fbc988d..ae9185e 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Compactor.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Compactor.java
@@ -278,7 +278,7 @@ public class Compactor implements Callable<CompactionStats> {
}
}
- private List<SortedKeyValueIterator<Key,Value>> openMapDataFiles(String lgName,
+ private List<SortedKeyValueIterator<Key,Value>> openMapDataFiles(
ArrayList<FileSKVIterator> readers) throws IOException {
List<SortedKeyValueIterator<Key,Value>> iters = new ArrayList<>(filesToCompact.size());
@@ -338,7 +338,7 @@ public class Compactor implements Callable<CompactionStats> {
Span span = Trace.start("compact");
try {
long entriesCompacted = 0;
- List<SortedKeyValueIterator<Key,Value>> iters = openMapDataFiles(lgName, readers);
+ List<SortedKeyValueIterator<Key,Value>> iters = openMapDataFiles(readers);
if (imm != null) {
iters.add(imm.compactionIterator());
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java
index c46d988..1826caa 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java
@@ -457,8 +457,7 @@ class DatafileManager {
// is because the new one will reference the logs used by current memory...
tablet.getTabletServer().minorCompactionFinished(
- tablet.getTabletMemory().getCommitSession(), newDatafile.toString(),
- commitSession.getWALogSeq() + 2);
+ tablet.getTabletMemory().getCommitSession(), commitSession.getWALogSeq() + 2);
break;
} catch (IOException e) {
log.error("Failed to write to write-ahead log " + e.getMessage() + " will retry", e);
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/MinorCompactionTask.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/MinorCompactionTask.java
index c96ac71..5d44f17 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/MinorCompactionTask.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/MinorCompactionTask.java
@@ -88,9 +88,8 @@ class MinorCompactionTask implements Runnable {
}
span.stop();
span = Trace.start("compact");
- this.stats = tablet.minorCompact(tablet.getTabletServer().getFileSystem(),
- tablet.getTabletMemory().getMinCMemTable(), tmpFileRef, newMapfileLocation, mergeFile,
- true, queued, commitSession, flushId, mincReason);
+ this.stats = tablet.minorCompact(tablet.getTabletMemory().getMinCMemTable(), tmpFileRef,
+ newMapfileLocation, mergeFile, true, queued, commitSession, flushId, mincReason);
span.stop();
minorCompaction.data("extent", tablet.getExtent().toString());
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
index 7bbd5b8..d128f02 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
@@ -430,8 +430,8 @@ public class Tablet implements TabletCommitter {
for (FileRef ref : datafiles.keySet())
absPaths.add(ref.path().toString());
- tabletServer.recover(this.getTabletServer().getFileSystem(), extent, tableConfiguration,
- logEntries, absPaths, new MutationReceiver() {
+ tabletServer.recover(this.getTabletServer().getFileSystem(), extent, logEntries, absPaths,
+ new MutationReceiver() {
@Override
public void receive(Mutation m) {
// LogReader.printMutation(m);
@@ -893,9 +893,9 @@ public class Tablet implements TabletCommitter {
return new Scanner(this, range, opts);
}
- DataFileValue minorCompact(VolumeManager fs, InMemoryMap memTable, FileRef tmpDatafile,
- FileRef newDatafile, FileRef mergeFile, boolean hasQueueTime, long queued,
- CommitSession commitSession, long flushId, MinorCompactionReason mincReason) {
+ DataFileValue minorCompact(InMemoryMap memTable, FileRef tmpDatafile, FileRef newDatafile,
+ FileRef mergeFile, boolean hasQueueTime, long queued, CommitSession commitSession,
+ long flushId, MinorCompactionReason mincReason) {
boolean failed = false;
long start = System.currentTimeMillis();
timer.incrementStatusMinor();
@@ -951,7 +951,7 @@ public class Tablet implements TabletCommitter {
if (minCMetrics.isEnabled())
minCMetrics.add(TabletServerMinCMetrics.QUEUE, (start - queued));
} else
- timer.updateTime(Operation.MINOR, start, count, failed);
+ timer.updateTime(Operation.MINOR, start, failed);
}
}
@@ -1255,7 +1255,7 @@ public class Tablet implements TabletCommitter {
}
@Override
- public synchronized void abortCommit(CommitSession commitSession, List<Mutation> value) {
+ public synchronized void abortCommit(CommitSession commitSession) {
if (writesInProgress <= 0) {
throw new IllegalStateException("waitingForLogs <= 0 " + writesInProgress);
}
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/TabletCommitter.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/TabletCommitter.java
index 8315921..5a089dc 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/TabletCommitter.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/TabletCommitter.java
@@ -31,7 +31,7 @@ import org.apache.accumulo.tserver.log.DfsLogger;
*/
public interface TabletCommitter {
- void abortCommit(CommitSession commitSession, List<Mutation> value);
+ void abortCommit(CommitSession commitSession);
void commit(CommitSession commitSession, List<Mutation> mutations);
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/TabletData.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/TabletData.java
index 5734747..d33429b 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/TabletData.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/TabletData.java
@@ -48,7 +48,6 @@ import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.Lo
import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.ScanFileColumnFamily;
import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.ServerColumnFamily;
import org.apache.accumulo.core.tabletserver.log.LogEntry;
-import org.apache.accumulo.fate.zookeeper.ZooReader;
import org.apache.accumulo.server.ServerContext;
import org.apache.accumulo.server.fs.FileRef;
import org.apache.accumulo.server.fs.VolumeManager;
@@ -81,8 +80,7 @@ public class TabletData {
private String directory = null;
// Read tablet data from metadata tables
- public TabletData(ServerContext context, KeyExtent extent, VolumeManager fs,
- Iterator<Entry<Key,Value>> entries) {
+ public TabletData(KeyExtent extent, VolumeManager fs, Iterator<Entry<Key,Value>> entries) {
final Text family = new Text();
Text rowName = extent.getMetadataEntry();
while (entries.hasNext()) {
@@ -134,8 +132,8 @@ public class TabletData {
}
// Read basic root table metadata from zookeeper
- public TabletData(ServerContext context, VolumeManager fs, ZooReader rdr,
- AccumuloConfiguration conf) throws IOException {
+ public TabletData(ServerContext context, VolumeManager fs, AccumuloConfiguration conf)
+ throws IOException {
directory = VolumeUtil.switchRootTableVolume(context,
MetadataTableUtil.getRootTabletDir(context));
diff --git a/shell/src/main/java/org/apache/accumulo/shell/commands/DeleteTableCommand.java b/shell/src/main/java/org/apache/accumulo/shell/commands/DeleteTableCommand.java
index 2ab0424..2c10c54 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/commands/DeleteTableCommand.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/commands/DeleteTableCommand.java
@@ -70,7 +70,7 @@ public class DeleteTableCommand extends TableOperation {
}
@Override
- protected void pruneTables(String pattern, Set<String> tables) {
+ protected void pruneTables(Set<String> tables) {
Iterator<String> tableNames = tables.iterator();
while (tableNames.hasNext()) {
String table = tableNames.next();
diff --git a/shell/src/main/java/org/apache/accumulo/shell/commands/FateCommand.java b/shell/src/main/java/org/apache/accumulo/shell/commands/FateCommand.java
index 359b544..e07e1d6 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/commands/FateCommand.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/commands/FateCommand.java
@@ -145,7 +145,7 @@ public class FateCommand extends Command {
}
for (int i = 1; i < args.length; i++) {
if (admin.prepDelete(zs, zk, masterPath, args[i])) {
- admin.deleteLocks(zs, zk, context.getZooKeeperRoot() + Constants.ZTABLE_LOCKS, args[i]);
+ admin.deleteLocks(zk, context.getZooKeeperRoot() + Constants.ZTABLE_LOCKS, args[i]);
} else {
System.out.printf("Could not delete transaction: %s%n", args[i]);
failedCommand = true;
diff --git a/shell/src/main/java/org/apache/accumulo/shell/commands/TableOperation.java b/shell/src/main/java/org/apache/accumulo/shell/commands/TableOperation.java
index 544f4b5..e3d49a8 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/commands/TableOperation.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/commands/TableOperation.java
@@ -52,7 +52,7 @@ public abstract class TableOperation extends Command {
if (table.matches(tablePattern)) {
tableSet.add(table);
}
- pruneTables(tablePattern, tableSet);
+ pruneTables(tableSet);
} else if (cl.hasOption(optTableName.getOpt())) {
tableSet.add(cl.getOptionValue(optTableName.getOpt()));
} else if (cl.hasOption(optNamespace.getOpt())) {
@@ -101,12 +101,10 @@ public abstract class TableOperation extends Command {
/**
* Allows implementation to remove certain tables from the set of tables to be operated on.
*
- * @param pattern
- * The pattern which tables were selected using
* @param tables
* A reference to the Set of tables to be operated on
*/
- protected void pruneTables(String pattern, Set<String> tables) {
+ protected void pruneTables(Set<String> tables) {
// Default no pruning
}
diff --git a/shell/src/test/java/org/apache/accumulo/shell/commands/DeleteTableCommandTest.java b/shell/src/test/java/org/apache/accumulo/shell/commands/DeleteTableCommandTest.java
index b944915..5c3434b 100644
--- a/shell/src/test/java/org/apache/accumulo/shell/commands/DeleteTableCommandTest.java
+++ b/shell/src/test/java/org/apache/accumulo/shell/commands/DeleteTableCommandTest.java
@@ -33,7 +33,7 @@ public class DeleteTableCommandTest {
Set<String> tables = new HashSet<>(
Arrays.asList(MetadataTable.NAME, RootTable.NAME, "a1", "a2"));
DeleteTableCommand cmd = new DeleteTableCommand();
- cmd.pruneTables("a.*", tables);
+ cmd.pruneTables(tables);
assertEquals(new HashSet<>(Arrays.asList("a1", "a2")), tables);
}
diff --git a/test/src/main/java/org/apache/accumulo/harness/MiniClusterHarness.java b/test/src/main/java/org/apache/accumulo/harness/MiniClusterHarness.java
index dc11d03..eb70466 100644
--- a/test/src/main/java/org/apache/accumulo/harness/MiniClusterHarness.java
+++ b/test/src/main/java/org/apache/accumulo/harness/MiniClusterHarness.java
@@ -151,8 +151,7 @@ public class MiniClusterHarness {
Configuration coreSite = new Configuration(false);
// Setup SSL and credential providers if the properties request such
- configureForEnvironment(cfg, getClass(), AccumuloClusterHarness.getSslDir(baseDir), coreSite,
- kdc);
+ configureForEnvironment(cfg, AccumuloClusterHarness.getSslDir(baseDir), coreSite, kdc);
// Invoke the callback for tests to configure MAC before it starts
configCallback.configureMiniCluster(cfg, coreSite);
@@ -175,8 +174,8 @@ public class MiniClusterHarness {
return miniCluster;
}
- protected void configureForEnvironment(MiniAccumuloConfigImpl cfg, Class<?> testClass,
- File folder, Configuration coreSite, TestingKdc kdc) {
+ protected void configureForEnvironment(MiniAccumuloConfigImpl cfg, File folder,
+ Configuration coreSite, TestingKdc kdc) {
if (TRUE.equals(System.getProperty(USE_SSL_FOR_IT_OPTION))) {
configureForSsl(cfg, folder);
}
@@ -190,7 +189,7 @@ public class MiniClusterHarness {
}
try {
- configureForKerberos(cfg, folder, coreSite, kdc);
+ configureForKerberos(cfg, coreSite, kdc);
} catch (Exception e) {
throw new RuntimeException("Failed to initialize KDC", e);
}
@@ -238,8 +237,8 @@ public class MiniClusterHarness {
cfg.setClientProperty(ClientProperty.SSL_TRUSTSTORE_PASSWORD.getKey(), truststorePassword);
}
- protected void configureForKerberos(MiniAccumuloConfigImpl cfg, File folder,
- Configuration coreSite, TestingKdc kdc) {
+ protected void configureForKerberos(MiniAccumuloConfigImpl cfg, Configuration coreSite,
+ TestingKdc kdc) {
Map<String,String> siteConfig = cfg.getSiteConfig();
if (TRUE.equals(siteConfig.get(Property.INSTANCE_RPC_SSL_ENABLED.getKey()))) {
throw new RuntimeException("Cannot use both SSL and SASL/Kerberos");
diff --git a/test/src/main/java/org/apache/accumulo/test/CleanWalIT.java b/test/src/main/java/org/apache/accumulo/test/CleanWalIT.java
index 631d579..37ab6be 100644
--- a/test/src/main/java/org/apache/accumulo/test/CleanWalIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/CleanWalIT.java
@@ -112,7 +112,7 @@ public class CleanWalIT extends AccumuloClusterHarness {
assertEquals(1, count(tableName, client));
for (String table : new String[] {MetadataTable.NAME, RootTable.NAME}) {
log.debug("Checking logs for {}", table);
- assertEquals("Found logs for " + table, 0, countLogs(table, client));
+ assertEquals("Found logs for " + table, 0, countLogs(client));
}
bw = client.createBatchWriter(tableName, new BatchWriterConfig());
@@ -134,7 +134,7 @@ public class CleanWalIT extends AccumuloClusterHarness {
}
}
- private int countLogs(String tableName, AccumuloClient client) throws TableNotFoundException {
+ private int countLogs(AccumuloClient client) throws TableNotFoundException {
int count = 0;
try (Scanner scanner = client.createScanner(MetadataTable.NAME, Authorizations.EMPTY)) {
scanner.fetchColumnFamily(MetadataSchema.TabletsSection.LogColumnFamily.NAME);
diff --git a/test/src/main/java/org/apache/accumulo/test/CloneIT.java b/test/src/main/java/org/apache/accumulo/test/CloneIT.java
index 1afc409..9ecaec6 100644
--- a/test/src/main/java/org/apache/accumulo/test/CloneIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/CloneIT.java
@@ -225,8 +225,7 @@ public class CloneIT extends AccumuloClusterHarness {
}
}
- private static Mutation deleteTablet(String tid, String endRow, String prevRow, String dir,
- String file) {
+ private static Mutation deleteTablet(String tid, String endRow, String prevRow, String file) {
KeyExtent ke = new KeyExtent(Table.ID.of(tid), endRow == null ? null : new Text(endRow),
prevRow == null ? null : new Text(prevRow));
Mutation mut = new Mutation(ke.getMetadataEntry());
@@ -318,8 +317,8 @@ public class CloneIT extends AccumuloClusterHarness {
MetadataTableUtil.initializeClone(tableName, Table.ID.of("0"), Table.ID.of("1"), client,
bw2);
- bw1.addMutation(deleteTablet("0", "m", null, "/d1", "/d1/file1"));
- bw1.addMutation(deleteTablet("0", null, "m", "/d2", "/d2/file2"));
+ bw1.addMutation(deleteTablet("0", "m", null, "/d1/file1"));
+ bw1.addMutation(deleteTablet("0", null, "m", "/d2/file2"));
bw1.flush();
@@ -335,7 +334,7 @@ public class CloneIT extends AccumuloClusterHarness {
assertEquals(1, rc);
- bw1.addMutation(deleteTablet("0", "m", "f", "/d3", "/d1/file1"));
+ bw1.addMutation(deleteTablet("0", "m", "f", "/d1/file1"));
bw1.flush();
@@ -385,7 +384,7 @@ public class CloneIT extends AccumuloClusterHarness {
MetadataTableUtil.initializeClone(tableName, Table.ID.of("0"), Table.ID.of("1"), client,
bw2);
- bw1.addMutation(deleteTablet("0", "m", null, "/d1", "/d1/file1"));
+ bw1.addMutation(deleteTablet("0", "m", null, "/d1/file1"));
Mutation mut = createTablet("0", null, null, "/d2", "/d2/file2");
mut.put(DataFileColumnFamily.NAME.toString(), "/d1/file1",
new DataFileValue(10, 200).encodeAsString());
diff --git a/test/src/main/java/org/apache/accumulo/test/VolumeChooserIT.java b/test/src/main/java/org/apache/accumulo/test/VolumeChooserIT.java
index 668101f..620ce4c 100644
--- a/test/src/main/java/org/apache/accumulo/test/VolumeChooserIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/VolumeChooserIT.java
@@ -159,8 +159,8 @@ public class VolumeChooserIT extends ConfigurableMacBase {
bw.close();
}
- public static void verifyVolumes(AccumuloClient accumuloClient, String tableName,
- Range tableRange, String vol) throws Exception {
+ public static void verifyVolumes(AccumuloClient accumuloClient, Range tableRange, String vol)
+ throws Exception {
// Verify the new files are written to the Volumes specified
ArrayList<String> volumes = new ArrayList<>();
for (String s : vol.split(","))
@@ -191,8 +191,8 @@ public class VolumeChooserIT extends ConfigurableMacBase {
assertEquals("Wrong number of files", 26, fileCount);
}
- public static void verifyNoVolumes(AccumuloClient accumuloClient, String tableName,
- Range tableRange) throws Exception {
+ public static void verifyNoVolumes(AccumuloClient accumuloClient, Range tableRange)
+ throws Exception {
try (Scanner scanner = accumuloClient.createScanner(MetadataTable.NAME, Authorizations.EMPTY)) {
scanner.setRange(tableRange);
scanner.fetchColumnFamily(DataFileColumnFamily.NAME);
@@ -224,7 +224,7 @@ public class VolumeChooserIT extends ConfigurableMacBase {
// Write some data to the table
writeAndReadData(accumuloClient, tableName);
// Verify the new files are written to the Volumes specified
- verifyVolumes(accumuloClient, tableName, TabletsSection.getRange(tableID), expectedVolumes);
+ verifyVolumes(accumuloClient, TabletsSection.getRange(tableID), expectedVolumes);
}
public static void verifyWaLogVolumes(AccumuloClient accumuloClient, Range tableRange, String vol)
@@ -309,8 +309,7 @@ public class VolumeChooserIT extends ConfigurableMacBase {
writeAndReadData(accumuloClient, tableName);
// Verify the new files are written to the Volumes specified
- verifyVolumes(accumuloClient, tableName, TabletsSection.getRange(tableID),
- v1 + "," + v2 + "," + v4);
+ verifyVolumes(accumuloClient, TabletsSection.getRange(tableID), v1 + "," + v2 + "," + v4);
accumuloClient.namespaceOperations().create(namespace2);
@@ -329,8 +328,7 @@ public class VolumeChooserIT extends ConfigurableMacBase {
// Write some data to the table
writeAndReadData(accumuloClient, tableName2);
// Verify the new files are written to the Volumes specified
- verifyVolumes(accumuloClient, tableName2, TabletsSection.getRange(tableID2),
- v1 + "," + v2 + "," + v4);
+ verifyVolumes(accumuloClient, TabletsSection.getRange(tableID2), v1 + "," + v2 + "," + v4);
}
}
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ConfigurableCompactionIT.java b/test/src/main/java/org/apache/accumulo/test/functional/ConfigurableCompactionIT.java
index e47e467..4fbbd21 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ConfigurableCompactionIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ConfigurableCompactionIT.java
@@ -124,7 +124,7 @@ public class ConfigurableCompactionIT extends ConfigurableMacBase {
for (char ch = 'a'; ch < 'l'; ch++)
writeFlush(c, tableName, ch + "");
- while (countFiles(c, tableName) != 7) {
+ while (countFiles(c) != 7) {
UtilWaitThread.sleep(200);
}
}
@@ -164,12 +164,12 @@ public class ConfigurableCompactionIT extends ConfigurableMacBase {
private void runTest(final AccumuloClient c, final String tableName, final int n)
throws Exception {
- for (int i = countFiles(c, tableName); i < n - 1; i++)
+ for (int i = countFiles(c); i < n - 1; i++)
makeFile(c, tableName);
- assertEquals(n - 1, countFiles(c, tableName));
+ assertEquals(n - 1, countFiles(c));
makeFile(c, tableName);
for (int i = 0; i < 10; i++) {
- int count = countFiles(c, tableName);
+ int count = countFiles(c);
assertTrue(count == 1 || count == n);
if (count == 1)
break;
@@ -177,7 +177,7 @@ public class ConfigurableCompactionIT extends ConfigurableMacBase {
}
}
- private int countFiles(AccumuloClient c, String tableName) throws Exception {
+ private int countFiles(AccumuloClient c) throws Exception {
try (Scanner s = c.createScanner(MetadataTable.NAME, Authorizations.EMPTY)) {
s.fetchColumnFamily(MetadataSchema.TabletsSection.DataFileColumnFamily.NAME);
return Iterators.size(s.iterator());
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ConfigurableMacBase.java b/test/src/main/java/org/apache/accumulo/test/functional/ConfigurableMacBase.java
index a790250..aacd8b1 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ConfigurableMacBase.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ConfigurableMacBase.java
@@ -71,8 +71,7 @@ public class ConfigurableMacBase extends AccumuloITBase {
protected static final String ROOT_PASSWORD = "testRootPassword1";
- public static void configureForEnvironment(MiniAccumuloConfigImpl cfg, Class<?> testClass,
- File folder) {
+ public static void configureForEnvironment(MiniAccumuloConfigImpl cfg, File folder) {
if ("true".equals(System.getProperty("org.apache.accumulo.test.functional.useSslForIT"))) {
configureForSsl(cfg, folder);
}
@@ -159,7 +158,7 @@ public class ConfigurableMacBase extends AccumuloITBase {
Configuration coreSite = new Configuration(false);
cfg.setProperty(Property.TSERV_NATIVEMAP_ENABLED, Boolean.TRUE.toString());
configure(cfg, coreSite);
- configureForEnvironment(cfg, getClass(), getSslDir(baseDir));
+ configureForEnvironment(cfg, getSslDir(baseDir));
cluster = new MiniAccumuloClusterImpl(cfg);
if (coreSite.size() > 0) {
File csFile = new File(cluster.getConfig().getConfDir(), "core-site.xml");
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/PermissionsIT.java b/test/src/main/java/org/apache/accumulo/test/functional/PermissionsIT.java
index 1f8df69..76db2fd 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/PermissionsIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/PermissionsIT.java
@@ -588,12 +588,12 @@ public class PermissionsIT extends AccumuloClusterHarness {
// test permission before and after granting it
createTestTable(c, principal, tableName);
loginAs(testUser);
- testMissingTablePermission(test_user_client, testUser, perm, tableName);
+ testMissingTablePermission(test_user_client, perm, tableName);
loginAs(rootUser);
c.securityOperations().grantTablePermission(principal, tableName, perm);
verifyHasOnlyTheseTablePermissions(c, principal, tableName, perm);
loginAs(testUser);
- testGrantedTablePermission(test_user_client, testUser, perm, tableName);
+ testGrantedTablePermission(test_user_client, perm, tableName);
loginAs(rootUser);
createTestTable(c, principal, tableName);
@@ -623,8 +623,8 @@ public class PermissionsIT extends AccumuloClusterHarness {
}
}
- private void testMissingTablePermission(AccumuloClient test_user_client, ClusterUser testUser,
- TablePermission perm, String tableName) throws Exception {
+ private void testMissingTablePermission(AccumuloClient test_user_client, TablePermission perm,
+ String tableName) throws Exception {
BatchWriter writer;
Mutation m;
log.debug("Confirming that the lack of the {} permission properly restricts the user", perm);
@@ -712,9 +712,9 @@ public class PermissionsIT extends AccumuloClusterHarness {
}
}
- private void testGrantedTablePermission(AccumuloClient test_user_client, ClusterUser normalUser,
- TablePermission perm, String tableName) throws AccumuloException, AccumuloSecurityException,
- TableNotFoundException, MutationsRejectedException {
+ private void testGrantedTablePermission(AccumuloClient test_user_client, TablePermission perm,
+ String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException,
+ MutationsRejectedException {
BatchWriter writer;
Mutation m;
log.debug("Confirming that the presence of the {} permission properly permits the user", perm);
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ScanIteratorIT.java b/test/src/main/java/org/apache/accumulo/test/functional/ScanIteratorIT.java
index 07d6d53..cbc4a73 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ScanIteratorIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ScanIteratorIT.java
@@ -210,7 +210,7 @@ public class ScanIteratorIT extends AccumuloClusterHarness {
runTest(Authorizations.EMPTY, true);
}
- private void runTest(ScannerBase scanner, Authorizations auths, boolean shouldFail) {
+ private void runTest(ScannerBase scanner, boolean shouldFail) {
int count = 0;
for (Map.Entry<Key,Value> entry : scanner) {
assertEquals(shouldFail ? AuthsIterator.FAIL : AuthsIterator.SUCCESS,
@@ -236,8 +236,8 @@ public class ScanIteratorIT extends AccumuloClusterHarness {
batchScanner.setRanges(Collections.singleton(new Range("1")));
batchScanner.addScanIterator(setting);
- runTest(scanner, auths, shouldFail);
- runTest(batchScanner, auths, shouldFail);
+ runTest(scanner, shouldFail);
+ runTest(batchScanner, shouldFail);
}
}
diff --git a/test/src/main/java/org/apache/accumulo/test/master/SuspendedTabletsIT.java b/test/src/main/java/org/apache/accumulo/test/master/SuspendedTabletsIT.java
index 1bdc7e9..2f3ceb5 100644
--- a/test/src/main/java/org/apache/accumulo/test/master/SuspendedTabletsIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/master/SuspendedTabletsIT.java
@@ -230,7 +230,7 @@ public class SuspendedTabletsIT extends ConfigurableMacBase {
// Restart the first tablet server, making sure it ends up on the same port
HostAndPort restartedServer = deadTabletsByServer.keySet().iterator().next();
log.info("Restarting " + restartedServer);
- getCluster().getClusterControl().start(ServerType.TABLET_SERVER, null,
+ getCluster().getClusterControl().start(ServerType.TABLET_SERVER,
ImmutableMap.of(Property.TSERV_CLIENTPORT.getKey(), "" + restartedServer.getPort(),
Property.TSERV_PORTSEARCH.getKey(), "false"),
1);
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 d5f22d3..88c5dbe 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
@@ -137,7 +137,7 @@ public class ContinuousIngest {
firstColFams[index] = cf;
firstColQuals[index] = cq;
- Mutation m = genMutation(rowLong, cf, cq, cv, ingestInstanceId, count, null, r,
+ Mutation m = genMutation(rowLong, cf, cq, cv, ingestInstanceId, count, null,
opts.checksum);
count++;
bw.addMutation(m);
@@ -154,7 +154,7 @@ public class ContinuousIngest {
byte[] prevRow = genRow(prevRows[index]);
prevRows[index] = rowLong;
Mutation m = genMutation(rowLong, r.nextInt(opts.maxColF), r.nextInt(opts.maxColQ), cv,
- ingestInstanceId, count, prevRow, r, opts.checksum);
+ ingestInstanceId, count, prevRow, opts.checksum);
count++;
bw.addMutation(m);
}
@@ -168,7 +168,7 @@ public class ContinuousIngest {
// point to something
for (int index = 0; index < flushInterval - 1; index++) {
Mutation m = genMutation(firstRows[index], firstColFams[index], firstColQuals[index], cv,
- ingestInstanceId, count, genRow(prevRows[index + 1]), r, opts.checksum);
+ ingestInstanceId, count, genRow(prevRows[index + 1]), opts.checksum);
count++;
bw.addMutation(m);
}
@@ -194,7 +194,7 @@ public class ContinuousIngest {
}
public static Mutation genMutation(long rowLong, int cfInt, int cqInt, ColumnVisibility cv,
- byte[] ingestInstanceId, long count, byte[] prevRow, Random r, boolean checksum) {
+ byte[] ingestInstanceId, long count, byte[] prevRow, boolean checksum) {
// Adler32 is supposed to be faster, but according to wikipedia is not good for small data....
// so used CRC32 instead
CRC32 cksum = null;
diff --git a/test/src/main/java/org/apache/accumulo/test/replication/CyclicReplicationIT.java b/test/src/main/java/org/apache/accumulo/test/replication/CyclicReplicationIT.java
index 5649c88..6404455 100644
--- a/test/src/main/java/org/apache/accumulo/test/replication/CyclicReplicationIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/replication/CyclicReplicationIT.java
@@ -170,7 +170,7 @@ public class CyclicReplicationIT {
master1Cfg.setInstanceName("master1");
// Set up SSL if needed
- ConfigurableMacBase.configureForEnvironment(master1Cfg, this.getClass(),
+ ConfigurableMacBase.configureForEnvironment(master1Cfg,
ConfigurableMacBase.getSslDir(master1Dir));
master1Cfg.setProperty(Property.REPLICATION_NAME, master1Cfg.getInstanceName());