You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2015/04/07 03:36:32 UTC
[3/3] accumulo git commit: ACCUMULO-2129 Update javadocs for
overridden methods
ACCUMULO-2129 Update javadocs for overridden methods
* Add missing @Override annotations
* Remove trivial javadocs on overriding implementations
* Merge implementing javadoc with interface javadoc, when appropriate
* Added some additional checkstyle rules relating to @Override annotations
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/698368f2
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/698368f2
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/698368f2
Branch: refs/heads/master
Commit: 698368f2b7968fa06d077e9b39e013910882d621
Parents: 5ed504c
Author: Christopher Tubbs <ct...@apache.org>
Authored: Mon Apr 6 21:03:05 2015 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Mon Apr 6 21:03:05 2015 -0400
----------------------------------------------------------------------
.../accumulo/core/bloomfilter/Filter.java | 2 +
.../accumulo/core/client/BatchDeleter.java | 4 +-
.../accumulo/core/client/BatchScanner.java | 16 +-
.../accumulo/core/client/IteratorSetting.java | 8 +-
.../accumulo/core/client/ScannerBase.java | 20 +-
.../core/client/admin/TableOperations.java | 2 +-
.../client/impl/MultiTableBatchWriterImpl.java | 4 +-
.../accumulo/core/client/impl/ScannerImpl.java | 7 +-
.../core/client/impl/ScannerOptions.java | 16 --
.../core/client/impl/TableOperationsImpl.java | 218 -------------------
.../client/impl/TabletServerBatchReader.java | 4 +-
.../core/client/impl/TimeoutTabletLocator.java | 4 -
.../core/client/lexicoder/AbstractEncoder.java | 24 +-
.../core/client/lexicoder/BytesLexicoder.java | 7 +-
.../core/client/lexicoder/ListLexicoder.java | 12 +-
.../core/client/lexicoder/UUIDLexicoder.java | 10 +-
.../core/client/mapred/AbstractInputFormat.java | 6 +-
.../client/mapred/AccumuloOutputFormat.java | 6 +-
.../client/mapreduce/AbstractInputFormat.java | 7 +-
.../client/mapreduce/AccumuloOutputFormat.java | 6 +-
.../core/client/mapreduce/InputFormatBase.java | 9 -
.../core/client/mapreduce/InputTableConfig.java | 12 -
.../client/security/tokens/DelegationToken.java | 4 +-
.../client/security/tokens/PasswordToken.java | 6 +-
.../core/conf/AccumuloConfiguration.java | 5 +-
.../accumulo/core/data/ArrayByteSequence.java | 1 +
.../apache/accumulo/core/data/ByteSequence.java | 9 +-
.../org/apache/accumulo/core/data/Column.java | 7 +-
.../accumulo/core/data/ComparableBytes.java | 1 +
.../java/org/apache/accumulo/core/data/Key.java | 13 --
.../apache/accumulo/core/data/KeyExtent.java | 12 -
.../file/blockfile/cache/CachedBlockQueue.java | 1 +
.../file/blockfile/cache/LruBlockCache.java | 6 -
.../file/blockfile/impl/CachableBlockFile.java | 9 +-
.../core/file/rfile/bcfile/CompareUtils.java | 1 +
.../core/file/rfile/bcfile/Compression.java | 1 +
.../accumulo/core/file/rfile/bcfile/Utils.java | 6 -
.../accumulo/core/iterators/DebugIterator.java | 1 +
.../core/iterators/SortedKeyValueIterator.java | 3 +-
.../core/iterators/TypedValueCombiner.java | 2 +-
.../iterators/aggregation/LongSummation.java | 4 +-
.../aggregation/NumArraySummation.java | 3 +
.../iterators/aggregation/NumSummation.java | 3 +
.../core/iterators/aggregation/StringMax.java | 3 +
.../core/iterators/aggregation/StringMin.java | 3 +
.../iterators/aggregation/StringSummation.java | 3 +
.../core/iterators/conf/ColumnUtil.java | 4 +
.../iterators/system/ColumnQualifierFilter.java | 1 +
.../core/iterators/system/CountingIterator.java | 1 +
.../core/iterators/system/DeletingIterator.java | 1 +
.../core/iterators/system/MultiIterator.java | 1 +
.../iterators/system/SequenceFileIterator.java | 6 +
.../iterators/user/RowEncodingIterator.java | 3 -
.../security/crypto/BlockedInputStream.java | 2 +
.../crypto/DiscardCloseOutputStream.java | 1 +
.../core/tabletserver/log/LogEntry.java | 1 +
.../accumulo/core/util/NamingThreadFactory.java | 1 +
.../org/apache/accumulo/core/util/Stat.java | 1 +
.../core/util/format/BinaryFormatter.java | 1 +
.../accumulo/core/client/TestThrift1474.java | 1 +
.../client/lexicoder/ListLexicoderTest.java | 10 +-
.../core/iterators/IteratorUtilTest.java | 9 +
.../core/iterators/user/FilterTest.java | 2 +
.../simple/filedata/ChunkInputStream.java | 2 +-
.../examples/simple/shell/DebugCommand.java | 3 +
.../simple/shell/MyAppShellExtension.java | 1 +
.../java/org/apache/accumulo/fate/TStore.java | 7 -
.../java/org/apache/accumulo/fate/ZooStore.java | 1 +
.../accumulo/fate/util/LoggingRunnable.java | 2 +-
.../fate/zookeeper/IZooReaderWriter.java | 1 +
.../apache/accumulo/fate/zookeeper/ZooLock.java | 1 +
.../fate/zookeeper/ZooReaderWriter.java | 5 -
.../apache/accumulo/fate/AgeOffStoreTest.java | 1 +
.../impl/MiniAccumuloClusterImpl.java | 10 +-
pom.xml | 2 +
.../server/conf/NamespaceConfiguration.java | 3 -
.../server/conf/TableConfiguration.java | 3 -
.../server/data/ServerColumnUpdate.java | 1 +
.../org/apache/accumulo/server/fs/FileRef.java | 1 +
.../master/balancer/ChaoticLoadBalancer.java | 6 +-
.../master/state/TabletLocationState.java | 1 +
.../server/master/state/TabletMigration.java | 1 +
.../server/replication/StatusCombiner.java | 3 -
.../server/rpc/TNonblockingServerSocket.java | 5 +
.../server/security/handler/Authenticator.java | 6 +
.../security/handler/ZKAuthenticator.java | 6 -
.../server/tablets/UniqueNameAllocator.java | 1 +
.../accumulo/server/util/ChangeSecret.java | 2 +
.../accumulo/server/util/FileSystemMonitor.java | 1 +
.../org/apache/accumulo/server/util/Halt.java | 5 +-
.../accumulo/server/util/time/SimpleTimer.java | 1 +
.../base/src/main/scripts/generate-protobuf.sh | 4 +-
.../server/util/time/BaseRelativeTimeTest.java | 1 +
.../server/util/time/SimpleTimerTest.java | 2 +
.../monitor/servlets/trace/ListType.java | 1 +
.../monitor/servlets/trace/ShowTrace.java | 7 +-
.../monitor/servlets/trace/Summary.java | 1 +
.../org/apache/accumulo/tracer/TracerTest.java | 1 +
.../tserver/ConditionalMutationSet.java | 1 +
.../org/apache/accumulo/tserver/MemKey.java | 1 +
.../ConfigurableCompactionStrategy.java | 1 +
.../constraints/UnsatisfiableConstraint.java | 2 +
.../mastermessage/SplitReportMessage.java | 1 +
.../mastermessage/TabletStatusMessage.java | 1 +
.../apache/accumulo/tserver/tablet/Tablet.java | 7 +-
.../tserver/tablet/TabletCommitter.java | 5 +
.../accumulo/shell/ShellCommandException.java | 2 +
.../java/org/apache/accumulo/shell/Token.java | 1 +
.../shell/commands/AddSplitsCommand.java | 1 +
.../shell/commands/CloneTableCommand.java | 1 +
.../accumulo/shell/commands/CompactCommand.java | 1 +
.../accumulo/shell/commands/DebugCommand.java | 1 +
.../shell/commands/DeleteManyCommand.java | 1 +
.../shell/commands/ExportTableCommand.java | 1 +
.../accumulo/shell/commands/FlushCommand.java | 1 +
.../shell/commands/FormatterCommand.java | 2 +
.../accumulo/shell/commands/HelpCommand.java | 3 +
.../shell/commands/ListShellIterCommand.java | 1 +
.../accumulo/shell/commands/MaxRowCommand.java | 1 +
.../accumulo/shell/commands/MergeCommand.java | 1 +
.../accumulo/shell/commands/OfflineCommand.java | 1 +
.../accumulo/shell/commands/ScriptCommand.java | 3 +
.../accumulo/shell/commands/TraceCommand.java | 1 +
.../apache/accumulo/shell/mock/MockShell.java | 1 +
.../vfs/providers/HdfsFileObject.java | 61 ------
.../vfs/providers/HdfsFileProvider.java | 10 -
.../vfs/providers/HdfsFileSystem.java | 12 -
.../vfs/providers/HdfsRandomAccessContent.java | 102 ---------
.../vfs/providers/VfsClassLoaderTest.java | 3 +
.../accumulo/test/EstimateInMemMapOverhead.java | 24 ++
.../accumulo/test/FaultyConditionalWriter.java | 2 +
.../accumulo/test/functional/DropModIter.java | 1 +
.../test/randomwalk/concurrent/Config.java | 5 +-
.../test/randomwalk/conditional/Transfer.java | 1 +
.../test/stress/random/RandomByteArrays.java | 1 +
.../accumulo/test/stress/random/Scan.java | 2 +
.../apache/accumulo/test/MetaGetsReadersIT.java | 1 +
.../accumulo/test/TabletServerGivesUpIT.java | 1 +
.../apache/accumulo/trace/instrument/Span.java | 7 +
139 files changed, 290 insertions(+), 642 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/bloomfilter/Filter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/bloomfilter/Filter.java b/core/src/main/java/org/apache/accumulo/core/bloomfilter/Filter.java
index 12961a9..27eab69 100644
--- a/core/src/main/java/org/apache/accumulo/core/bloomfilter/Filter.java
+++ b/core/src/main/java/org/apache/accumulo/core/bloomfilter/Filter.java
@@ -211,6 +211,7 @@ public abstract class Filter implements Writable {
// Writable interface
+ @Override
public void write(final DataOutput out) throws IOException {
out.writeInt(VERSION);
out.writeInt(this.nbHash);
@@ -226,6 +227,7 @@ public abstract class Filter implements Writable {
return VERSION;
}
+ @Override
public void readFields(final DataInput in) throws IOException {
final int ver = in.readInt();
rVersion = ver;
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/client/BatchDeleter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/BatchDeleter.java b/core/src/main/java/org/apache/accumulo/core/client/BatchDeleter.java
index 54d49d1..0e3856e 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/BatchDeleter.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/BatchDeleter.java
@@ -44,8 +44,6 @@ public interface BatchDeleter extends ScannerBase {
*/
void setRanges(Collection<Range> ranges);
- /**
- * Releases any resources.
- */
+ @Override
void close();
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/client/BatchScanner.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/BatchScanner.java b/core/src/main/java/org/apache/accumulo/core/client/BatchScanner.java
index 39f96f5..8be6acf 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/BatchScanner.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/BatchScanner.java
@@ -30,7 +30,6 @@ import org.apache.accumulo.core.data.Range;
* If you want to lookup a few ranges and expect those ranges to contain a lot of data, then use the Scanner instead. Also, the Scanner will return data in
* sorted order, this will not.
*/
-
public interface BatchScanner extends ScannerBase {
/**
@@ -41,22 +40,15 @@ public interface BatchScanner extends ScannerBase {
*/
void setRanges(Collection<Range> ranges);
- /**
- * Cleans up and finalizes the scanner
- */
+ @Override
void close();
/**
- * Sets a timeout threshold for a server to respond. The batch scanner will accomplish as much work as possible before throwing an exception. BatchScanner
- * iterators will throw a {@link TimedOutException} when all needed servers timeout. Setting the timeout to zero or Long.MAX_VALUE and TimeUnit.MILLISECONDS
- * means no timeout.
+ * {@inheritDoc}
*
* <p>
- * If not set, there is not timeout. The BatchScanner will retry forever.
- *
- * @param timeUnit
- * determines how timeout is interpreted
- * @since 1.5.0
+ * The batch scanner will accomplish as much work as possible before throwing an exception. BatchScanner iterators will throw a {@link TimedOutException} when
+ * all needed servers timeout.
*/
@Override
void setTimeout(long timeout, TimeUnit timeUnit);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/client/IteratorSetting.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/IteratorSetting.java b/core/src/main/java/org/apache/accumulo/core/client/IteratorSetting.java
index baf9860..e7bbbdf 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/IteratorSetting.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/IteratorSetting.java
@@ -279,9 +279,6 @@ public class IteratorSetting implements Writable {
properties.clear();
}
- /**
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
@@ -322,9 +319,6 @@ public class IteratorSetting implements Writable {
return true;
}
- /**
- * @see java.lang.Object#toString()
- */
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -372,6 +366,7 @@ public class IteratorSetting implements Writable {
/**
* @since 1.5.0
+ * @see Writable
*/
@Override
public void readFields(DataInput din) throws IOException {
@@ -388,6 +383,7 @@ public class IteratorSetting implements Writable {
/**
* @since 1.5.0
+ * @see Writable
*/
@Override
public void write(DataOutput dout) throws IOException {
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/client/ScannerBase.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/ScannerBase.java b/core/src/main/java/org/apache/accumulo/core/client/ScannerBase.java
index e49a502..667f423 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/ScannerBase.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/ScannerBase.java
@@ -65,7 +65,10 @@ public interface ScannerBase extends Iterable<Entry<Key,Value>> {
/**
* Adds a column family to the list of columns that will be fetched by this scanner. By default when no columns have been added the scanner fetches all
- * columns.
+ * columns. To fetch multiple column families call this function multiple times.
+ *
+ * <p>
+ * This can help limit which locality groups are read on the server side.
*
* @param col
* the column family to be fetched
@@ -97,19 +100,24 @@ public interface ScannerBase extends Iterable<Entry<Key,Value>> {
* Returns an iterator over an accumulo table. This iterator uses the options that are currently set for its lifetime, so setting options will have no effect
* on existing iterators.
*
+ * <p>
* Keys returned by the iterator are not guaranteed to be in sorted order.
*
* @return an iterator over Key,Value pairs which meet the restrictions set on the scanner
*/
+ @Override
Iterator<Entry<Key,Value>> iterator();
/**
- * This setting determines how long a scanner will automatically retry when a failure occurs. By default a scanner will retry forever.
+ * This setting determines how long a scanner will automatically retry when a failure occurs. By default, a scanner will retry forever.
*
- * Setting to zero or Long.MAX_VALUE and TimeUnit.MILLISECONDS means to retry forever.
+ * <p>
+ * Setting the timeout to zero (with any time unit) or {@link Long#MAX_VALUE} (with {@link TimeUnit#MILLISECONDS}) means no timeout.
*
+ * @param timeOut
+ * the length of the timeout
* @param timeUnit
- * determines how timeout is interpreted
+ * the units of the timeout
* @since 1.5.0
*/
void setTimeout(long timeOut, TimeUnit timeUnit);
@@ -131,9 +139,9 @@ public interface ScannerBase extends Iterable<Entry<Key,Value>> {
/**
* Returns the authorizations that have been set on the scanner
+ *
* @since 1.7.0
- * @return
- * The authorizations set on the scanner instance
+ * @return The authorizations set on the scanner instance
*/
Authorizations getAuthorizations();
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java
index 41021b1..d4d5fd3 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java
@@ -409,7 +409,7 @@ public interface TableOperations {
* @throws AccumuloSecurityException
* if the user does not have permission
*
- * @deprecated As of release 1.4, replaced by {@link #flush(String, Text, Text, boolean)}
+ * @deprecated since 1.4; use {@link #flush(String, Text, Text, boolean)} instead
*/
@Deprecated
void flush(String tableName) throws AccumuloException, AccumuloSecurityException;
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/client/impl/MultiTableBatchWriterImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/MultiTableBatchWriterImpl.java b/core/src/main/java/org/apache/accumulo/core/client/impl/MultiTableBatchWriterImpl.java
index 824c3ee..5d13eda 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/MultiTableBatchWriterImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/MultiTableBatchWriterImpl.java
@@ -138,9 +138,7 @@ public class MultiTableBatchWriterImpl implements MultiTableBatchWriter {
bw.close();
}
- /**
- * Warning: do not rely upon finalize to close this class. Finalize is not guaranteed to be called.
- */
+ // WARNING: do not rely upon finalize to close this class. Finalize is not guaranteed to be called.
@Override
protected void finalize() {
if (!closed.get()) {
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerImpl.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerImpl.java
index 6084024..09edc4a 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerImpl.java
@@ -91,16 +91,13 @@ public class ScannerImpl extends ScannerOptions implements Scanner {
return size;
}
- /**
- * Returns an iterator over an accumulo table. This iterator uses the options that are currently set on the scanner for its lifetime. So setting options on a
- * Scanner object will have no effect on existing iterators.
- */
@Override
public synchronized Iterator<Entry<Key,Value>> iterator() {
return new ScannerIterator(context, table, authorizations, range, size, getTimeOut(), this, isolated, readaheadThreshold);
}
- @Override public Authorizations getAuthorizations() {
+ @Override
+ public Authorizations getAuthorizations() {
return authorizations;
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerOptions.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerOptions.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerOptions.java
index 5b6d9ac..f4a6176 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerOptions.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerOptions.java
@@ -57,10 +57,6 @@ public class ScannerOptions implements ScannerBase {
setOptions(this, so);
}
- /**
- * Adds server-side scan iterators.
- *
- */
@Override
public synchronized void addScanIterator(IteratorSetting si) {
checkArgument(si != null, "si is null");
@@ -105,9 +101,6 @@ public class ScannerOptions implements ScannerBase {
serverSideIteratorOptions.remove(iteratorName);
}
- /**
- * Override any existing options on the given named iterator
- */
@Override
public synchronized void updateScanIteratorOption(String iteratorName, String key, String value) {
checkArgument(iteratorName != null, "iteratorName is null");
@@ -125,12 +118,6 @@ public class ScannerOptions implements ScannerBase {
opts.put(key, value);
}
- /**
- * Limit a scan to the specified column family. This can limit which locality groups are read on the server side.
- *
- * To fetch multiple column families call this function multiple times.
- */
-
@Override
public synchronized void fetchColumnFamily(Text col) {
checkArgument(col != null, "col is null");
@@ -160,9 +147,6 @@ public class ScannerOptions implements ScannerBase {
return fetchedColumns;
}
- /**
- * Clears scan iterators prior to returning a scanner to the pool.
- */
@Override
public synchronized void clearScanIterators() {
serverSideIteratorList = Collections.emptyList();
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java b/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
index cb35cd2..b1cc9c6 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
@@ -131,11 +131,6 @@ public class TableOperationsImpl extends TableOperationsHelper {
this.context = context;
}
- /**
- * Retrieve a list of tables in Accumulo.
- *
- * @return List of tables in accumulo
- */
@Override
public SortedSet<String> list() {
OpTimer opTimer = new OpTimer(log, Level.TRACE).start("Fetching list of tables...");
@@ -144,13 +139,6 @@ public class TableOperationsImpl extends TableOperationsHelper {
return tableNames;
}
- /**
- * A method to check if a table exists in Accumulo.
- *
- * @param tableName
- * the name of the table
- * @return true if the table exists
- */
@Override
public boolean exists(String tableName) {
checkArgument(tableName != null, "tableName is null");
@@ -163,43 +151,17 @@ public class TableOperationsImpl extends TableOperationsHelper {
return exists;
}
- /**
- * Create a table with no special configuration
- *
- * @param tableName
- * the name of the table
- * @throws AccumuloException
- * if a general error occurs
- * @throws AccumuloSecurityException
- * if the user does not have permission
- * @throws TableExistsException
- * if the table already exists
- */
@Override
public void create(String tableName) throws AccumuloException, AccumuloSecurityException, TableExistsException {
create(tableName, new NewTableConfiguration());
}
- /**
- * @param tableName
- * the name of the table
- * @param limitVersion
- * Enables/disables the versioning iterator, which will limit the number of Key versions kept.
- */
@Override
@Deprecated
public void create(String tableName, boolean limitVersion) throws AccumuloException, AccumuloSecurityException, TableExistsException {
create(tableName, limitVersion, TimeType.MILLIS);
}
- /**
- * @param tableName
- * the name of the table
- * @param timeType
- * specifies logical or real-time based time recording for entries in the table
- * @param limitVersion
- * Enables/disables the versioning iterator, which will limit the number of Key versions kept.
- */
@Override
@Deprecated
public void create(String tableName, boolean limitVersion, TimeType timeType) throws AccumuloException, AccumuloSecurityException, TableExistsException {
@@ -214,14 +176,6 @@ public class TableOperationsImpl extends TableOperationsHelper {
create(tableName, ntc.withoutDefaultIterators());
}
- /**
- * @param tableName
- * the name of the table
- * @param ntc
- * specifies the new table's configuration. It determines whether the versioning iterator is enabled or disabled, logical or real-time based time
- * recording for entries in the table
- *
- */
@Override
public void create(String tableName, NewTableConfiguration ntc) throws AccumuloException, AccumuloSecurityException, TableExistsException {
checkArgument(tableName != null, "tableName is null");
@@ -417,18 +371,6 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
- /**
- * @param tableName
- * the name of the table
- * @param partitionKeys
- * a sorted set of row key values to pre-split the table on
- * @throws AccumuloException
- * if a general error occurs
- * @throws AccumuloSecurityException
- * if the user does not have permission
- * @throws TableNotFoundException
- * if the table does not exist
- */
@Override
public void addSplits(String tableName, SortedSet<Text> partitionKeys) throws TableNotFoundException, AccumuloException, AccumuloSecurityException {
String tableId = Tables.getTableId(context.getInstance(), tableName);
@@ -576,11 +518,6 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
}
- /**
- * @param tableName
- * the name of the table
- * @return the split points (end-row names) for the table's current split profile
- */
@Override
public Collection<Text> listSplits(String tableName) throws TableNotFoundException, AccumuloSecurityException {
@@ -631,13 +568,6 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
}
- /**
- * @param tableName
- * the name of the table
- * @param maxSplits
- * specifies the maximum number of splits to return
- * @return the split points (end-row names) for the table's current split profile, grouped into fewer splits so as not to exceed maxSplits
- */
@Override
public Collection<Text> listSplits(String tableName, int maxSplits) throws TableNotFoundException, AccumuloSecurityException {
Collection<Text> endRows = listSplits(tableName);
@@ -673,18 +603,6 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
}
- /**
- * Delete a table
- *
- * @param tableName
- * the name of the table
- * @throws AccumuloException
- * if a general error occurs
- * @throws AccumuloSecurityException
- * if the user does not have permission
- * @throws TableNotFoundException
- * if the table does not exist
- */
@Override
public void delete(String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
checkArgument(tableName != null, "tableName is null");
@@ -734,22 +652,6 @@ public class TableOperationsImpl extends TableOperationsHelper {
doTableFateOperation(newTableName, AccumuloException.class, FateOperation.TABLE_CLONE, args, opts);
}
- /**
- * Rename a table
- *
- * @param oldTableName
- * the old table name
- * @param newTableName
- * the new table name
- * @throws AccumuloException
- * if a general error occurs
- * @throws AccumuloSecurityException
- * if the user does not have permission
- * @throws TableNotFoundException
- * if the old table name does not exist
- * @throws TableExistsException
- * if the new table name already exists
- */
@Override
public void rename(String oldTableName, String newTableName) throws AccumuloSecurityException, TableNotFoundException, AccumuloException,
TableExistsException {
@@ -759,9 +661,6 @@ public class TableOperationsImpl extends TableOperationsHelper {
doTableFateOperation(oldTableName, TableNotFoundException.class, FateOperation.TABLE_RENAME, args, opts);
}
- /**
- * @deprecated since 1.4 {@link #flush(String, Text, Text, boolean)}
- */
@Override
@Deprecated
public void flush(String tableName) throws AccumuloException, AccumuloSecurityException {
@@ -772,16 +671,6 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
}
- /**
- * Flush a table
- *
- * @param tableName
- * the name of the table
- * @throws AccumuloException
- * if a general error occurs
- * @throws AccumuloSecurityException
- * if the user does not have permission
- */
@Override
public void flush(String tableName, Text start, Text end, boolean wait) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
checkArgument(tableName != null, "tableName is null");
@@ -922,20 +811,6 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
}
- /**
- * Sets a property on a table
- *
- * @param tableName
- * the name of the table
- * @param property
- * the name of a per-table property
- * @param value
- * the value to set a per-table property to
- * @throws AccumuloException
- * if a general error occurs
- * @throws AccumuloSecurityException
- * if the user does not have permission
- */
@Override
public void setProperty(final String tableName, final String property, final String value) throws AccumuloException, AccumuloSecurityException {
checkArgument(tableName != null, "tableName is null");
@@ -953,18 +828,6 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
}
- /**
- * Removes a property from a table
- *
- * @param tableName
- * the name of the table
- * @param property
- * the name of a per-table property
- * @throws AccumuloException
- * if a general error occurs
- * @throws AccumuloSecurityException
- * if the user does not have permission
- */
@Override
public void removeProperty(final String tableName, final String property) throws AccumuloException, AccumuloSecurityException {
checkArgument(tableName != null, "tableName is null");
@@ -981,15 +844,6 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
}
- /**
- * Gets properties of a table
- *
- * @param tableName
- * the name of the table
- * @return all properties visible by this table (system and per-table properties)
- * @throws TableNotFoundException
- * if the table does not exist
- */
@Override
public Iterable<Entry<String,String>> getProperties(final String tableName) throws AccumuloException, TableNotFoundException {
checkArgument(tableName != null, "tableName is null");
@@ -1017,20 +871,6 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
- /**
- * Sets a tables locality groups. A tables locality groups can be changed at any time.
- *
- * @param tableName
- * the name of the table
- * @param groups
- * mapping of locality group names to column families in the locality group
- * @throws AccumuloException
- * if a general error occurs
- * @throws AccumuloSecurityException
- * if the user does not have permission
- * @throws TableNotFoundException
- * if the table does not exist
- */
@Override
public void setLocalityGroups(String tableName, Map<String,Set<Text>> groups) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
// ensure locality groups do not overlap
@@ -1075,18 +915,6 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
}
- /**
- *
- * Gets the locality groups currently set for a table.
- *
- * @param tableName
- * the name of the table
- * @return mapping of locality group names to column families in the locality group
- * @throws AccumuloException
- * if a general error occurs
- * @throws TableNotFoundException
- * if the table does not exist
- */
@Override
public Map<String,Set<Text>> getLocalityGroups(String tableName) throws AccumuloException, TableNotFoundException {
AccumuloConfiguration conf = new ConfigurationCopy(this.getProperties(tableName));
@@ -1107,21 +935,6 @@ public class TableOperationsImpl extends TableOperationsHelper {
return groups2;
}
- /**
- * @param tableName
- * the name of the table
- * @param range
- * a range to split
- * @param maxSplits
- * the maximum number of splits
- * @return the range, split into smaller ranges that fall on boundaries of the table's split points as evenly as possible
- * @throws AccumuloException
- * if a general error occurs
- * @throws AccumuloSecurityException
- * if the user does not have permission
- * @throws TableNotFoundException
- * if the table does not exist
- */
@Override
public Set<Range> splitRangeByTablets(String tableName, Range range, int maxSplits) throws AccumuloException, AccumuloSecurityException,
TableNotFoundException {
@@ -1370,15 +1183,6 @@ public class TableOperationsImpl extends TableOperationsHelper {
offline(tableName, false);
}
- /**
- *
- * @param tableName
- * the table to take offline
- * @throws AccumuloException
- * when there is a general accumulo error
- * @throws AccumuloSecurityException
- * when the user does not have the proper permissions
- */
@Override
public void offline(String tableName, boolean wait) throws AccumuloSecurityException, AccumuloException, TableNotFoundException {
@@ -1403,15 +1207,6 @@ public class TableOperationsImpl extends TableOperationsHelper {
online(tableName, false);
}
- /**
- *
- * @param tableName
- * the table to take online
- * @throws AccumuloException
- * when there is a general accumulo error
- * @throws AccumuloSecurityException
- * when the user does not have the proper permissions
- */
@Override
public void online(String tableName, boolean wait) throws AccumuloSecurityException, AccumuloException, TableNotFoundException {
checkArgument(tableName != null, "tableName is null");
@@ -1430,14 +1225,6 @@ public class TableOperationsImpl extends TableOperationsHelper {
waitForTableStateTransition(tableId, TableState.ONLINE);
}
- /**
- * Clears the tablet locator cache for a specified table
- *
- * @param tableName
- * the name of the table
- * @throws TableNotFoundException
- * if table does not exist
- */
@Override
public void clearLocatorCache(String tableName) throws TableNotFoundException {
checkArgument(tableName != null, "tableName is null");
@@ -1445,11 +1232,6 @@ public class TableOperationsImpl extends TableOperationsHelper {
tabLocator.invalidateCache();
}
- /**
- * Get a mapping of table name to internal table id.
- *
- * @return the map from table name to internal table id
- */
@Override
public Map<String,String> tableIdMap() {
return Tables.getNameToIdMap(context.getInstance());
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReader.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReader.java b/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReader.java
index ad50013..6d09936 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReader.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReader.java
@@ -79,9 +79,7 @@ public class TabletServerBatchReader extends ScannerOptions implements BatchScan
return authorizations;
}
- /**
- * Warning: do not rely upon finalize to close this class. Finalize is not guaranteed to be called.
- */
+ // WARNING: do not rely upon finalize to close this class. Finalize is not guaranteed to be called.
@Override
protected void finalize() {
if (!queryThreadPool.isShutdown()) {
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/client/impl/TimeoutTabletLocator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/TimeoutTabletLocator.java b/core/src/main/java/org/apache/accumulo/core/client/impl/TimeoutTabletLocator.java
index 8a6777d..81c1ccc 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/TimeoutTabletLocator.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/TimeoutTabletLocator.java
@@ -92,10 +92,6 @@ public class TimeoutTabletLocator extends TabletLocator {
}
}
- /**
- *
- */
-
@Override
public List<Range> binRanges(ClientContext context, List<Range> ranges, Map<String,Map<KeyExtent,List<Range>>> binnedRanges) throws AccumuloException,
AccumuloSecurityException, TableNotFoundException {
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/client/lexicoder/AbstractEncoder.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/AbstractEncoder.java b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/AbstractEncoder.java
index b266e53..6ba7e02 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/AbstractEncoder.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/AbstractEncoder.java
@@ -16,13 +16,14 @@
*/
package org.apache.accumulo.core.client.lexicoder;
-import com.google.common.base.Preconditions;
import org.apache.accumulo.core.iterators.ValueFormatException;
+import com.google.common.base.Preconditions;
+
/**
- * AbstractEncoder is an {@link org.apache.accumulo.core.client.lexicoder.Encoder} that implements all of Encoder's
- * methods validating the input, but has those methods defer logic to to a new method,
- * {@link #decodeUnchecked(byte[], int, int)}.
+ * AbstractEncoder is an {@link org.apache.accumulo.core.client.lexicoder.Encoder} that implements all of Encoder's methods validating the input, but has those
+ * methods defer logic to to a new method, {@link #decodeUnchecked(byte[], int, int)}.
+ *
* @since 1.7.0
*/
public abstract class AbstractEncoder<T> implements Encoder<T> {
@@ -32,9 +33,6 @@ public abstract class AbstractEncoder<T> implements Encoder<T> {
*/
protected abstract T decodeUnchecked(byte[] b, int offset, int len) throws ValueFormatException;
- /**
- * Calls {@link #decodeUnchecked(byte[], int, int)} as {@code decodeUnchecked(b, 0, b.length);}.
- */
@Override
public T decode(byte[] b) {
Preconditions.checkNotNull(b, "cannot decode null byte array");
@@ -42,18 +40,18 @@ public abstract class AbstractEncoder<T> implements Encoder<T> {
}
/**
- * Checks if the byte array is null, or if parameters exceed the bounds of the byte array,
- * then calls {@link #decodeUnchecked(byte[], int, int)}.
+ * Checks if the byte array is null, or if parameters exceed the bounds of the byte array, then calls {@link #decodeUnchecked(byte[], int, int)}.
*
- * @throws java.lang.NullPointerException if {@code b} is null
- * @throws java.lang.IllegalArgumentException if {@code offset + len} exceeds the length of {@code b}
+ * @throws java.lang.NullPointerException
+ * if {@code b} is null
+ * @throws java.lang.IllegalArgumentException
+ * if {@code offset + len} exceeds the length of {@code b}
*/
public T decode(byte[] b, int offset, int len) {
Preconditions.checkNotNull(b, "cannot decode null byte array");
Preconditions.checkArgument(offset >= 0, "offset %s cannot be negative", offset);
Preconditions.checkArgument(len >= 0, "length %s cannot be negative", len);
- Preconditions.checkArgument(offset + len < b.length, "offset + length %s exceeds byte array length %s",
- (offset + len), b.length);
+ Preconditions.checkArgument(offset + len < b.length, "offset + length %s exceeds byte array length %s", (offset + len), b.length);
return decodeUnchecked(b, offset, len);
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/client/lexicoder/BytesLexicoder.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/BytesLexicoder.java b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/BytesLexicoder.java
index 8e0f5e2..ae4dfbd 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/BytesLexicoder.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/BytesLexicoder.java
@@ -33,13 +33,14 @@ public class BytesLexicoder extends AbstractLexicoder<byte[]> implements Lexicod
@Override
public byte[] decode(byte[] data) {
- // overrides AbstractLexicoder since this simply returns the array
+ // overrides AbstractLexicoder since this simply returns the array; this is more flexible than the superclass behavior, since it can return null
return data;
}
/**
- * If offset == 0 and len == data.length, returns data. Otherwise, returns a new
- * byte array with contents starting at data[offset] with length len.
+ * If offset == 0 and len == data.length, returns data. Otherwise, returns a new byte array with contents starting at data[offset] with length len.
+ *
+ * {@inheritDoc}
*/
@Override
protected byte[] decodeUnchecked(byte[] data, int offset, int len) {
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/client/lexicoder/ListLexicoder.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/ListLexicoder.java b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/ListLexicoder.java
index a92f4c6..3c20401 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/ListLexicoder.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/ListLexicoder.java
@@ -16,16 +16,16 @@
*/
package org.apache.accumulo.core.client.lexicoder;
-import org.apache.accumulo.core.client.lexicoder.impl.AbstractLexicoder;
-
-import java.util.ArrayList;
-import java.util.List;
-
import static org.apache.accumulo.core.client.lexicoder.impl.ByteUtils.concat;
import static org.apache.accumulo.core.client.lexicoder.impl.ByteUtils.escape;
import static org.apache.accumulo.core.client.lexicoder.impl.ByteUtils.split;
import static org.apache.accumulo.core.client.lexicoder.impl.ByteUtils.unescape;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.accumulo.core.client.lexicoder.impl.AbstractLexicoder;
+
/**
* A lexicoder to encode/decode a Java List to/from a byte array where the concatenation of each encoded element sorts lexicographically.
*
@@ -40,6 +40,8 @@ public class ListLexicoder<LT> extends AbstractLexicoder<List<LT>> implements Le
}
/**
+ * {@inheritDoc}
+ *
* @return a byte array containing the concatenation of each element in the list encoded.
*/
@Override
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/client/lexicoder/UUIDLexicoder.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/UUIDLexicoder.java b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/UUIDLexicoder.java
index 98ee467..e8e2c06 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/UUIDLexicoder.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/UUIDLexicoder.java
@@ -16,16 +16,16 @@
*/
package org.apache.accumulo.core.client.lexicoder;
-import org.apache.accumulo.core.client.lexicoder.impl.AbstractLexicoder;
-import org.apache.accumulo.core.client.lexicoder.impl.FixedByteArrayOutputStream;
-import org.apache.accumulo.core.iterators.ValueFormatException;
-
import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.UUID;
+import org.apache.accumulo.core.client.lexicoder.impl.AbstractLexicoder;
+import org.apache.accumulo.core.client.lexicoder.impl.FixedByteArrayOutputStream;
+import org.apache.accumulo.core.iterators.ValueFormatException;
+
/**
* A lexicoder for a UUID that maintains its lexicographic sorting order.
*
@@ -34,6 +34,8 @@ import java.util.UUID;
public class UUIDLexicoder extends AbstractLexicoder<UUID> implements Lexicoder<UUID> {
/**
+ * {@inheritDoc}
+ *
* @see <a href="http://www.ietf.org/rfc/rfc4122.txt"> RFC 4122: A Universally Unique IDentifier (UUID) URN Namespace, "Rules for Lexical Equivalence" in
* Section 3.</a>
*/
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/client/mapred/AbstractInputFormat.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapred/AbstractInputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapred/AbstractInputFormat.java
index 7d43e0c..1071683 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapred/AbstractInputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapred/AbstractInputFormat.java
@@ -532,7 +532,11 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V> {
}
/**
- * Read the metadata table to get tablets and match up ranges to them.
+ * Gets the splits of the tables that have been set on the job by reading the metadata table for the specified ranges.
+ *
+ * @return the splits from the tables based on the ranges.
+ * @throws java.io.IOException
+ * if a table set on the job doesn't exist or an error occurs initializing the tablet locator
*/
@Override
public InputSplit[] getSplits(JobConf job, int numSplits) throws IOException {
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java
index 8631a2c..8bcf2a9 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java
@@ -40,9 +40,9 @@ import org.apache.accumulo.core.client.mapreduce.lib.impl.OutputConfigurator;
import org.apache.accumulo.core.client.mock.MockInstance;
import org.apache.accumulo.core.client.security.SecurityErrorCode;
import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
+import org.apache.accumulo.core.client.security.tokens.AuthenticationToken.AuthenticationTokenSerializer;
import org.apache.accumulo.core.client.security.tokens.DelegationToken;
import org.apache.accumulo.core.client.security.tokens.KerberosToken;
-import org.apache.accumulo.core.client.security.tokens.AuthenticationToken.AuthenticationTokenSerializer;
import org.apache.accumulo.core.data.ColumnUpdate;
import org.apache.accumulo.core.data.KeyExtent;
import org.apache.accumulo.core.data.Mutation;
@@ -436,8 +436,8 @@ public class AccumuloOutputFormat implements OutputFormat<Text,Mutation> {
}
/**
- * Push a mutation into a table. If table is null, the defaultTable will be used. If canCreateTable is set, the table will be created if it does not exist.
- * The table name must only contain alphanumerics and underscore.
+ * Push a mutation into a table. If table is null, the defaultTable will be used. If {@link AccumuloOutputFormat#canCreateTables(JobConf)} is set, the table
+ * will be created if it does not exist. The table name must only contain alphanumerics and underscore.
*/
@Override
public void write(Text table, Mutation mutation) throws IOException {
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java
index bf18e4e..300e92b 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java
@@ -428,9 +428,6 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V> {
*/
protected abstract void setupIterators(TaskAttemptContext context, Scanner scanner, String tableName, RangeInputSplit split);
- /**
- * Initialize a scanner over the given input split using this task attempt configuration.
- */
@Override
public void initialize(InputSplit inSplit, TaskAttemptContext attempt) throws IOException {
@@ -575,10 +572,8 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V> {
}
/**
- * Gets the splits of the tables that have been set on the job.
+ * Gets the splits of the tables that have been set on the job by reading the metadata table for the specified ranges.
*
- * @param context
- * the configuration of the job
* @return the splits from the tables based on the ranges.
* @throws java.io.IOException
* if a table set on the job doesn't exist or an error occurs initializing the tablet locator
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
index c4ab313..5ee0962 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
@@ -40,9 +40,9 @@ import org.apache.accumulo.core.client.mapreduce.lib.impl.OutputConfigurator;
import org.apache.accumulo.core.client.mock.MockInstance;
import org.apache.accumulo.core.client.security.SecurityErrorCode;
import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
+import org.apache.accumulo.core.client.security.tokens.AuthenticationToken.AuthenticationTokenSerializer;
import org.apache.accumulo.core.client.security.tokens.DelegationToken;
import org.apache.accumulo.core.client.security.tokens.KerberosToken;
-import org.apache.accumulo.core.client.security.tokens.AuthenticationToken.AuthenticationTokenSerializer;
import org.apache.accumulo.core.data.ColumnUpdate;
import org.apache.accumulo.core.data.KeyExtent;
import org.apache.accumulo.core.data.Mutation;
@@ -436,8 +436,8 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation> {
}
/**
- * Push a mutation into a table. If table is null, the defaultTable will be used. If canCreateTable is set, the table will be created if it does not exist.
- * The table name must only contain alphanumerics and underscore.
+ * Push a mutation into a table. If table is null, the defaultTable will be used. If {@link AccumuloOutputFormat#canCreateTables(JobContext)} is set, the
+ * table will be created if it does not exist. The table name must only contain alphanumerics and underscore.
*/
@Override
public void write(Text table, Mutation mutation) throws IOException {
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java
index d81030d..76ca401 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java
@@ -313,15 +313,6 @@ public abstract class InputFormatBase<K,V> extends AbstractInputFormat<K,V> {
protected abstract static class RecordReaderBase<K,V> extends AbstractRecordReader<K,V> {
- /**
- * Apply the configured iterators from the configuration to the scanner for the specified table name
- *
- * @param context
- * the Hadoop context for the configured job
- * @param scanner
- * the scanner to configure
- * @since 1.6.0
- */
@Override
protected void setupIterators(TaskAttemptContext context, Scanner scanner, String tableName, org.apache.accumulo.core.client.mapreduce.RangeInputSplit split) {
setupIterators(context, scanner, split);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputTableConfig.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputTableConfig.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputTableConfig.java
index 03473f2..257f6c9 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputTableConfig.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputTableConfig.java
@@ -241,12 +241,6 @@ public class InputTableConfig implements Writable {
return useIsolatedScanners;
}
- /**
- * Writes the state for the current object out to the specified {@link DataOutput}
- *
- * @param dataOutput
- * the output for which to write the object's state
- */
@Override
public void write(DataOutput dataOutput) throws IOException {
if (iterators != null) {
@@ -284,12 +278,6 @@ public class InputTableConfig implements Writable {
dataOutput.writeBoolean(offlineScan);
}
- /**
- * Reads the fields in the {@link DataInput} into the current object
- *
- * @param dataInput
- * the input fields to read into the current object
- */
@Override
public void readFields(DataInput dataInput) throws IOException {
// load iterators
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/client/security/tokens/DelegationToken.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/security/tokens/DelegationToken.java b/core/src/main/java/org/apache/accumulo/core/client/security/tokens/DelegationToken.java
index c3219ec..1c52bcf 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/security/tokens/DelegationToken.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/security/tokens/DelegationToken.java
@@ -142,11 +142,9 @@ public class DelegationToken extends PasswordToken {
return super.hashCode() ^ identifier.hashCode();
}
- /*
- * We assume we can cast obj to DelegationToken because the super.equals(obj) check ensures obj is of the same type as this
- */
@Override
public boolean equals(Object obj) {
+ // We assume we can cast obj to DelegationToken because the super.equals(obj) check ensures obj is of the same type as this
return super.equals(obj) && identifier.equals(((DelegationToken) obj).identifier);
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/client/security/tokens/PasswordToken.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/security/tokens/PasswordToken.java b/core/src/main/java/org/apache/accumulo/core/client/security/tokens/PasswordToken.java
index e11c3b0..9cbf914 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/security/tokens/PasswordToken.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/security/tokens/PasswordToken.java
@@ -103,12 +103,10 @@ public class PasswordToken implements AuthenticationToken {
return Arrays.hashCode(password);
}
- /*
- * Instances of PasswordToken should only be considered equal if they are of the same type. This check is done here to ensure that this class is equal to the
- * class of the object being checked.
- */
@Override
public boolean equals(Object obj) {
+ // Instances of PasswordToken should only be considered equal if they are of the same type.
+ // This check is done here to ensure that this class is equal to the class of the object being checked.
return this == obj || (obj != null && getClass().equals(obj.getClass()) && Arrays.equals(password, ((PasswordToken) obj).password));
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/conf/AccumuloConfiguration.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/AccumuloConfiguration.java b/core/src/main/java/org/apache/accumulo/core/conf/AccumuloConfiguration.java
index c259b55..6041620 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/AccumuloConfiguration.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/AccumuloConfiguration.java
@@ -32,7 +32,6 @@ import org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-
/**
* A configuration object.
*/
@@ -407,7 +406,9 @@ public abstract class AccumuloConfiguration implements Iterable<Entry<String,Str
return maxFilesPerTablet;
}
- // overridden in ZooConfiguration
+ /**
+ * Invalidates the <code>ZooCache</code> used for storage and quick retrieval of properties for this configuration.
+ */
public void invalidateCache() {}
/**
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/data/ArrayByteSequence.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/ArrayByteSequence.java b/core/src/main/java/org/apache/accumulo/core/data/ArrayByteSequence.java
index 31b1204..f894dbf 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/ArrayByteSequence.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/ArrayByteSequence.java
@@ -154,6 +154,7 @@ public class ArrayByteSequence extends ByteSequence implements Serializable {
return copy;
}
+ @Override
public String toString() {
return new String(data, offset, length, UTF_8);
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/data/ByteSequence.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/ByteSequence.java b/core/src/main/java/org/apache/accumulo/core/data/ByteSequence.java
index ce8dab0..cb15a75 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/ByteSequence.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/ByteSequence.java
@@ -106,14 +106,7 @@ public abstract class ByteSequence implements Comparable<ByteSequence> {
return bs1.length() - bs2.length();
}
- /**
- * Compares this byte sequence to another.
- *
- * @param obs
- * byte sequence to compare
- * @return comparison result
- * @see #compareBytes(ByteSequence, ByteSequence)
- */
+ @Override
public int compareTo(ByteSequence obs) {
if (isBackedByArray() && obs.isBackedByArray()) {
return WritableComparator.compareBytes(getBackingArray(), offset(), length(), obs.getBackingArray(), obs.offset(), obs.length());
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/data/Column.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/Column.java b/core/src/main/java/org/apache/accumulo/core/data/Column.java
index 294226a..d48079a 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/Column.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/Column.java
@@ -50,6 +50,7 @@ public class Column implements WritableComparable<Column> {
* column to compare
* @return comparison result
*/
+ @Override
public int compareTo(Column that) {
int result;
result = compareBytes(this.columnFamily, that.columnFamily);
@@ -61,6 +62,7 @@ public class Column implements WritableComparable<Column> {
return compareBytes(this.columnVisibility, that.columnVisibility);
}
+ @Override
public void readFields(DataInput in) throws IOException {
if (in.readBoolean()) {
int len = in.readInt();
@@ -210,11 +212,12 @@ public class Column implements WritableComparable<Column> {
}
/**
- * Gets a string representation of this column. The family, qualifier, and visibility are interpreted as strings using the platform default encoding; nulls
- * are interpreted as empty strings.
+ * Gets a string representation of this column. The family, qualifier, and visibility are interpreted as strings using the UTF-8 encoding; nulls are
+ * interpreted as empty strings.
*
* @return string form of column
*/
+ @Override
public String toString() {
return new String(columnFamily == null ? new byte[0] : columnFamily, UTF_8) + ":"
+ new String(columnQualifier == null ? new byte[0] : columnQualifier, UTF_8) + ":"
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/data/ComparableBytes.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/ComparableBytes.java b/core/src/main/java/org/apache/accumulo/core/data/ComparableBytes.java
index 67e4bb1..11aaf2b 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/ComparableBytes.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/ComparableBytes.java
@@ -40,6 +40,7 @@ public class ComparableBytes extends BinaryComparable {
*
* @return bytes
*/
+ @Override
public byte[] getBytes() {
return data;
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/data/Key.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/Key.java b/core/src/main/java/org/apache/accumulo/core/data/Key.java
index 8ebba43..f88ddaa 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/Key.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/Key.java
@@ -755,14 +755,6 @@ public class Key implements WritableComparable<Key>, Cloneable {
return result;
}
- /**
- * Compares this key with another.
- *
- * @param other
- * key to compare to
- * @return comparison result
- * @see #compareTo(Key, PartialKey)
- */
@Override
public int compareTo(Key other) {
return compareTo(other, PartialKey.ROW_COLFAM_COLQUAL_COLVIS_TIME_DEL);
@@ -1057,11 +1049,6 @@ public class Key implements WritableComparable<Key>, Cloneable {
return new TKey(ByteBuffer.wrap(row), ByteBuffer.wrap(colFamily), ByteBuffer.wrap(colQualifier), ByteBuffer.wrap(colVisibility), timestamp);
}
- /**
- * Performs a deep copy of this key.
- *
- * @return cloned key
- */
@Override
public Object clone() throws CloneNotSupportedException {
Key r = (Key) super.clone();
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/data/KeyExtent.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/KeyExtent.java b/core/src/main/java/org/apache/accumulo/core/data/KeyExtent.java
index bc1513e..fe7f776 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/KeyExtent.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/KeyExtent.java
@@ -239,10 +239,6 @@ public class KeyExtent implements WritableComparable<KeyExtent> {
setPrevEndRow(prevEndRow, true, true);
}
- /**
- * Populates the extents data fields from a DataInput object
- *
- */
@Override
public void readFields(DataInput in) throws IOException {
Text tid = new Text();
@@ -269,10 +265,6 @@ public class KeyExtent implements WritableComparable<KeyExtent> {
check();
}
- /**
- * Writes this extent's data fields to a DataOutput object
- *
- */
@Override
public void write(DataOutput out) throws IOException {
getTableId().write(out);
@@ -395,10 +387,6 @@ public class KeyExtent implements WritableComparable<KeyExtent> {
return m;
}
- /**
- * Compares extents based on rows
- *
- */
@Override
public int compareTo(KeyExtent other) {
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/CachedBlockQueue.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/CachedBlockQueue.java b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/CachedBlockQueue.java
index d08fee1..0754f17 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/CachedBlockQueue.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/CachedBlockQueue.java
@@ -115,6 +115,7 @@ public class CachedBlockQueue implements HeapSize {
*
* @return size of all elements currently in queue, in bytes
*/
+ @Override
public long heapSize() {
return heapSize;
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/LruBlockCache.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/LruBlockCache.java b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/LruBlockCache.java
index 888a92f..d4b875c 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/LruBlockCache.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/LruBlockCache.java
@@ -291,7 +291,6 @@ public class LruBlockCache implements BlockCache, HeapSize {
* block name
* @return buffer of specified block name, or null if not in cache
*/
-
@Override
public CachedBlock getBlock(String blockName) {
CachedBlock cb = map.get(blockName);
@@ -460,11 +459,6 @@ public class LruBlockCache implements BlockCache, HeapSize {
}
}
- /**
- * Get the maximum size of this cache.
- *
- * @return max size in bytes
- */
@Override
public long getMaxSize() {
return this.maxSize;
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
----------------------------------------------------------------------
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 2d5c95f..54da7d9 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
@@ -41,7 +41,6 @@ import org.apache.hadoop.fs.Path;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-
/***
*
* This is a wrapper class for BCFile that includes a cache for independent caches for datablocks and metadatablocks
@@ -72,21 +71,25 @@ public class CachableBlockFile {
_bc = new BCFile.Writer(fsout, compressAlgor, conf, false, accumuloConfiguration);
}
+ @Override
public ABlockWriter prepareMetaBlock(String name) throws IOException {
_bw = new BlockWrite(_bc.prepareMetaBlock(name));
return _bw;
}
+ @Override
public ABlockWriter prepareMetaBlock(String name, String compressionName) throws IOException {
_bw = new BlockWrite(_bc.prepareMetaBlock(name, compressionName));
return _bw;
}
+ @Override
public ABlockWriter prepareDataBlock() throws IOException {
_bw = new BlockWrite(_bc.prepareDataBlock());
return _bw;
}
+ @Override
public void close() throws IOException {
_bw.close();
@@ -371,6 +374,7 @@ public class CachableBlockFile {
* NOTE: In the case of multi-read threads: This method can do redundant work where an entry is read from disk and other threads check the cache before it
* has been inserted.
*/
+ @Override
public BlockRead getMetaBlock(String blockName) throws IOException {
String _lookup = this.fileName + "M" + blockName;
return getBlock(_lookup, _iCache, new MetaBlockLoader(blockName, accumuloConfiguration));
@@ -390,6 +394,7 @@ public class CachableBlockFile {
* has been inserted.
*/
+ @Override
public BlockRead getDataBlock(int blockIndex) throws IOException {
String _lookup = this.fileName + "O" + blockIndex;
return getBlock(_lookup, _dCache, new OffsetBlockLoader(blockIndex));
@@ -402,6 +407,7 @@ public class CachableBlockFile {
return getBlock(_lookup, _dCache, new RawBlockLoader(offset, compressedSize, rawSize));
}
+ @Override
public synchronized void close() throws IOException {
if (closed)
return;
@@ -512,6 +518,7 @@ public class CachableBlockFile {
/**
* Size is the size of the bytearray that was read form the cache
*/
+ @Override
public long getRawSize() {
return size;
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/CompareUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/CompareUtils.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/CompareUtils.java
index d7651e8..ac0bdb1 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/CompareUtils.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/CompareUtils.java
@@ -64,6 +64,7 @@ class CompareUtils {
magnitude = m;
}
+ @Override
public long magnitude() {
return magnitude;
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/Compression.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/Compression.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/Compression.java
index 9defa1c..48a9acc 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/Compression.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/Compression.java
@@ -225,6 +225,7 @@ public final class Compression {
private transient boolean checked = false;
private static final String defaultClazz = "org.apache.hadoop.io.compress.SnappyCodec";
+ @Override
public CompressionCodec getCodec() throws IOException {
if (!isSupported()) {
throw new IOException("SNAPPY codec class not specified. Did you forget to set property " + CONF_SNAPPY_CLASS + "?");
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/Utils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/Utils.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/Utils.java
index 84b861b..fca120e 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/Utils.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/Utils.java
@@ -316,9 +316,6 @@ public final class Utils {
return (Short.SIZE + Short.SIZE) / Byte.SIZE;
}
- /**
- * Return a string representation of the version.
- */
@Override
public String toString() {
return new StringBuilder("v").append(major).append(".").append(minor).toString();
@@ -335,9 +332,6 @@ public final class Utils {
return major == other.major;
}
- /**
- * Compare this version with another version.
- */
@Override
public int compareTo(Version that) {
if (major != that.major) {
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/iterators/DebugIterator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/DebugIterator.java b/core/src/main/java/org/apache/accumulo/core/iterators/DebugIterator.java
index 6c430fd..c2c7ad5 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/DebugIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/DebugIterator.java
@@ -35,6 +35,7 @@ public class DebugIterator extends WrappingIterator implements OptionDescriber {
public DebugIterator() {}
+ @Override
public DebugIterator deepCopy(IteratorEnvironment env) {
return new DebugIterator(this, env);
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/iterators/SortedKeyValueIterator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/SortedKeyValueIterator.java b/core/src/main/java/org/apache/accumulo/core/iterators/SortedKeyValueIterator.java
index 7c65565..232dc2a 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/SortedKeyValueIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/SortedKeyValueIterator.java
@@ -129,7 +129,8 @@ public interface SortedKeyValueIterator<K extends WritableComparable<?>,V extend
/**
* Creates a deep copy of this iterator as though seek had not yet been called. init should be called on an iterator before deepCopy is called. init should
* not need to be called on the copy that is returned by deepCopy; that is, when necessary init should be called in the deepCopy method on the iterator it
- * returns. The behavior is unspecified if init is called after deepCopy either on the original or the copy.
+ * returns. The behavior is unspecified if init is called after deepCopy either on the original or the copy. A proper implementation would call deepCopy on
+ * the source.
*
* @param env
* <tt>IteratorEnvironment</tt> environment in which iterator is being run.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/iterators/TypedValueCombiner.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/TypedValueCombiner.java b/core/src/main/java/org/apache/accumulo/core/iterators/TypedValueCombiner.java
index dbe2d4a..7e7fa64 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/TypedValueCombiner.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/TypedValueCombiner.java
@@ -105,7 +105,7 @@ public abstract class TypedValueCombiner<V> extends Combiner {
}
/**
- * An interface for translating from byte[] to V and back.
+ * An interface for translating from byte[] to V and back. Decodes the entire contents of the byte array.
*/
public interface Encoder<V> {
byte[] encode(V v);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/LongSummation.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/LongSummation.java b/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/LongSummation.java
index f39b497..7692ecb 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/LongSummation.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/LongSummation.java
@@ -22,7 +22,6 @@ import org.apache.accumulo.core.data.Value;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-
/**
* @deprecated since 1.4, replaced by {@link org.apache.accumulo.core.iterators.user.SummingCombiner} with
* {@link org.apache.accumulo.core.iterators.LongCombiner.Type#FIXEDLEN}
@@ -32,10 +31,12 @@ public class LongSummation implements Aggregator {
private static final Logger log = LoggerFactory.getLogger(LongSummation.class);
long sum = 0;
+ @Override
public Value aggregate() {
return new Value(longToBytes(sum));
}
+ @Override
public void collect(Value value) {
try {
sum += bytesToLong(value.get());
@@ -44,6 +45,7 @@ public class LongSummation implements Aggregator {
}
}
+ @Override
public void reset() {
sum = 0;
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/NumArraySummation.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/NumArraySummation.java b/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/NumArraySummation.java
index ca00337..66cd2d5 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/NumArraySummation.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/NumArraySummation.java
@@ -33,6 +33,7 @@ import org.apache.hadoop.io.WritableUtils;
public class NumArraySummation implements Aggregator {
long[] sum = new long[0];
+ @Override
public Value aggregate() {
try {
return new Value(NumArraySummation.longArrayToBytes(sum));
@@ -41,6 +42,7 @@ public class NumArraySummation implements Aggregator {
}
}
+ @Override
public void collect(Value value) {
long[] la;
try {
@@ -86,6 +88,7 @@ public class NumArraySummation implements Aggregator {
return la;
}
+ @Override
public void reset() {
sum = new long[0];
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/NumSummation.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/NumSummation.java b/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/NumSummation.java
index 9c28776..4d79894 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/NumSummation.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/NumSummation.java
@@ -33,6 +33,7 @@ import org.apache.hadoop.io.WritableUtils;
public class NumSummation implements Aggregator {
long sum = 0l;
+ @Override
public Value aggregate() {
try {
return new Value(NumSummation.longToBytes(sum));
@@ -41,6 +42,7 @@ public class NumSummation implements Aggregator {
}
}
+ @Override
public void collect(Value value) {
long l;
try {
@@ -81,6 +83,7 @@ public class NumSummation implements Aggregator {
return a + b;
}
+ @Override
public void reset() {
sum = 0l;
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringMax.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringMax.java b/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringMax.java
index e086b22..3d4516d 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringMax.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringMax.java
@@ -27,10 +27,12 @@ public class StringMax implements Aggregator {
long max = Long.MIN_VALUE;
+ @Override
public Value aggregate() {
return new Value(Long.toString(max).getBytes());
}
+ @Override
public void collect(Value value) {
long l = Long.parseLong(new String(value.get()));
if (l > max) {
@@ -38,6 +40,7 @@ public class StringMax implements Aggregator {
}
}
+ @Override
public void reset() {
max = Long.MIN_VALUE;
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringMin.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringMin.java b/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringMin.java
index 48855b3..7a49f81 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringMin.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringMin.java
@@ -27,10 +27,12 @@ public class StringMin implements Aggregator {
long min = Long.MAX_VALUE;
+ @Override
public Value aggregate() {
return new Value(Long.toString(min).getBytes());
}
+ @Override
public void collect(Value value) {
long l = Long.parseLong(new String(value.get()));
if (l < min) {
@@ -38,6 +40,7 @@ public class StringMin implements Aggregator {
}
}
+ @Override
public void reset() {
min = Long.MAX_VALUE;
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringSummation.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringSummation.java b/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringSummation.java
index 63a8297..a8b5967 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringSummation.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringSummation.java
@@ -27,14 +27,17 @@ public class StringSummation implements Aggregator {
long sum = 0;
+ @Override
public Value aggregate() {
return new Value(Long.toString(sum).getBytes());
}
+ @Override
public void collect(Value value) {
sum += Long.parseLong(new String(value.get()));
}
+ @Override
public void reset() {
sum = 0;
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/iterators/conf/ColumnUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/conf/ColumnUtil.java b/core/src/main/java/org/apache/accumulo/core/iterators/conf/ColumnUtil.java
index a6a3e65..89afcdb 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/conf/ColumnUtil.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/conf/ColumnUtil.java
@@ -56,10 +56,12 @@ public class ColumnUtil {
hashCode = hash(key.getColumnFamilyData());
}
+ @Override
public int hashCode() {
return hashCode;
}
+ @Override
public boolean equals(Object o) {
if (o instanceof ColFamHashKey)
return equals((ColFamHashKey) o);
@@ -97,10 +99,12 @@ public class ColumnUtil {
hashValue = hash(key.getColumnFamilyData()) + hash(key.getColumnQualifierData());
}
+ @Override
public int hashCode() {
return hashValue;
}
+ @Override
public boolean equals(Object o) {
if (o instanceof ColHashKey)
return equals((ColHashKey) o);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/iterators/system/ColumnQualifierFilter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/system/ColumnQualifierFilter.java b/core/src/main/java/org/apache/accumulo/core/iterators/system/ColumnQualifierFilter.java
index 6e0f6e1..aa6426d 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/system/ColumnQualifierFilter.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/system/ColumnQualifierFilter.java
@@ -50,6 +50,7 @@ public class ColumnQualifierFilter extends Filter {
this.scanColumns = scanColumns;
}
+ @Override
public boolean accept(Key key, Value v) {
if (!scanColumns)
return true;
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/iterators/system/CountingIterator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/system/CountingIterator.java b/core/src/main/java/org/apache/accumulo/core/iterators/system/CountingIterator.java
index b75ce67..ab77e19 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/system/CountingIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/system/CountingIterator.java
@@ -29,6 +29,7 @@ public class CountingIterator extends WrappingIterator {
private long count;
+ @Override
public CountingIterator deepCopy(IteratorEnvironment env) {
return new CountingIterator(this, env);
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/iterators/system/DeletingIterator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/system/DeletingIterator.java b/core/src/main/java/org/apache/accumulo/core/iterators/system/DeletingIterator.java
index 1e7bd0d..abdb6c1 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/system/DeletingIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/system/DeletingIterator.java
@@ -34,6 +34,7 @@ public class DeletingIterator extends WrappingIterator {
private boolean propogateDeletes;
private Key workKey = new Key();
+ @Override
public DeletingIterator deepCopy(IteratorEnvironment env) {
return new DeletingIterator(this, env);
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/698368f2/core/src/main/java/org/apache/accumulo/core/iterators/system/MultiIterator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/system/MultiIterator.java b/core/src/main/java/org/apache/accumulo/core/iterators/system/MultiIterator.java
index 26ad8e9..426ae5f 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/system/MultiIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/system/MultiIterator.java
@@ -43,6 +43,7 @@ public class MultiIterator extends HeapIterator {
private Range fence;
// deep copy with no seek/scan state
+ @Override
public MultiIterator deepCopy(IteratorEnvironment env) {
return new MultiIterator(this, env);
}