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 2018/04/06 09:53:02 UTC
[accumulo] 02/05: Apply initial formatting changes to 100-char lines
This is an automated email from the ASF dual-hosted git repository.
ctubbsii pushed a commit to branch 1.8
in repository https://gitbox.apache.org/repos/asf/accumulo.git
commit f4f43febbc3e68013d8a1bcd46d8b44275e2e55e
Author: Christopher Tubbs <ct...@apache.org>
AuthorDate: Fri Apr 6 00:00:56 2018 -0400
Apply initial formatting changes to 100-char lines
Apply formatting changes from running the following:
mvn clean verify -Dfindbugs.skip -Dcheckstyle.skip -DskipITs -DskipTests
---
.../java/org/apache/accumulo/core/Constants.java | 3 +-
.../accumulo/core/bloomfilter/BloomFilter.java | 33 +-
.../core/bloomfilter/DynamicBloomFilter.java | 46 +-
.../apache/accumulo/core/bloomfilter/Filter.java | 5 +-
.../apache/accumulo/core/cli/BatchScannerOpts.java | 3 +-
.../apache/accumulo/core/cli/BatchWriterOpts.java | 12 +-
.../org/apache/accumulo/core/cli/ClientOpts.java | 41 +-
.../core/cli/MapReduceClientOnRequiredTable.java | 3 +-
.../accumulo/core/cli/MapReduceClientOpts.java | 11 +-
.../org/apache/accumulo/core/cli/ScannerOpts.java | 3 +-
.../core/client/AccumuloSecurityException.java | 12 +-
.../apache/accumulo/core/client/BatchScanner.java | 26 +-
.../apache/accumulo/core/client/BatchWriter.java | 15 +-
.../accumulo/core/client/BatchWriterConfig.java | 49 +-
.../accumulo/core/client/ClientConfiguration.java | 359 ++++++----
.../core/client/ClientSideIteratorScanner.java | 43 +-
.../accumulo/core/client/ConditionalWriter.java | 30 +-
.../core/client/ConditionalWriterConfig.java | 25 +-
.../org/apache/accumulo/core/client/Connector.java | 92 ++-
.../apache/accumulo/core/client/Durability.java | 6 +-
.../org/apache/accumulo/core/client/Instance.java | 40 +-
.../accumulo/core/client/IsolatedScanner.java | 16 +-
.../accumulo/core/client/IteratorSetting.java | 54 +-
.../core/client/MultiTableBatchWriter.java | 8 +-
.../core/client/MutationsRejectedException.java | 36 +-
.../core/client/NamespaceExistsException.java | 11 +-
.../core/client/NamespaceNotEmptyException.java | 11 +-
.../core/client/NamespaceNotFoundException.java | 11 +-
.../apache/accumulo/core/client/RowIterator.java | 11 +-
.../core/client/SampleNotPresentException.java | 3 +-
.../org/apache/accumulo/core/client/Scanner.java | 25 +-
.../apache/accumulo/core/client/ScannerBase.java | 90 ++-
.../core/client/TableDeletedException.java | 3 +-
.../accumulo/core/client/TableExistsException.java | 8 +-
.../core/client/TableNotFoundException.java | 14 +-
.../accumulo/core/client/TimedOutException.java | 3 +-
.../accumulo/core/client/ZooKeeperInstance.java | 84 ++-
.../core/client/admin/ActiveCompaction.java | 3 +-
.../core/client/admin/CompactionConfig.java | 26 +-
.../client/admin/CompactionStrategyConfig.java | 14 +-
.../core/client/admin/DelegationTokenConfig.java | 10 +-
.../apache/accumulo/core/client/admin/FindMax.java | 15 +-
.../core/client/admin/InstanceOperations.java | 35 +-
.../accumulo/core/client/admin/Locations.java | 12 +-
.../core/client/admin/NamespaceOperations.java | 82 ++-
.../core/client/admin/NewTableConfiguration.java | 16 +-
.../core/client/admin/ReplicationOperations.java | 34 +-
.../core/client/admin/SecurityOperations.java | 76 +-
.../core/client/admin/TableOperations.java | 280 +++++---
.../accumulo/core/client/admin/TimeType.java | 7 +-
.../AcceptableThriftTableOperationException.java | 6 +-
.../core/client/impl/ActiveCompactionImpl.java | 9 +-
.../accumulo/core/client/impl/ActiveScanImpl.java | 7 +-
.../client/impl/AuthenticationTokenIdentifier.java | 3 +-
.../core/client/impl/BaseIteratorEnvironment.java | 8 +-
.../accumulo/core/client/impl/ClientContext.java | 62 +-
.../core/client/impl/ConditionalWriterImpl.java | 70 +-
.../accumulo/core/client/impl/ConnectorImpl.java | 59 +-
.../accumulo/core/client/impl/Credentials.java | 65 +-
.../core/client/impl/DelegationTokenImpl.java | 21 +-
.../core/client/impl/InstanceOperationsImpl.java | 61 +-
.../accumulo/core/client/impl/MasterClient.java | 29 +-
.../client/impl/MultiTableBatchWriterImpl.java | 18 +-
.../client/impl/NamespaceOperationsHelper.java | 80 ++-
.../core/client/impl/NamespaceOperationsImpl.java | 80 ++-
.../accumulo/core/client/impl/Namespaces.java | 27 +-
.../accumulo/core/client/impl/OfflineIterator.java | 63 +-
.../accumulo/core/client/impl/OfflineScanner.java | 3 +-
.../core/client/impl/ReplicationClient.java | 44 +-
.../client/impl/ReplicationOperationsImpl.java | 32 +-
.../core/client/impl/RootTabletLocator.java | 27 +-
.../accumulo/core/client/impl/ScannerImpl.java | 13 +-
.../accumulo/core/client/impl/ScannerIterator.java | 16 +-
.../accumulo/core/client/impl/ScannerOptions.java | 3 +-
.../core/client/impl/SecurityOperationsImpl.java | 128 ++--
.../accumulo/core/client/impl/ServerClient.java | 37 +-
.../core/client/impl/SyncingTabletLocator.java | 17 +-
.../apache/accumulo/core/client/impl/TableMap.java | 3 +-
.../core/client/impl/TableOperationsHelper.java | 77 +-
.../core/client/impl/TableOperationsImpl.java | 412 +++++++----
.../apache/accumulo/core/client/impl/Tables.java | 58 +-
.../accumulo/core/client/impl/TabletLocator.java | 28 +-
.../core/client/impl/TabletLocatorImpl.java | 141 ++--
.../core/client/impl/TabletServerBatchDeleter.java | 9 +-
.../core/client/impl/TabletServerBatchReader.java | 15 +-
.../impl/TabletServerBatchReaderIterator.java | 136 ++--
.../core/client/impl/TabletServerBatchWriter.java | 121 ++--
.../accumulo/core/client/impl/TabletType.java | 3 +-
.../accumulo/core/client/impl/ThriftScanner.java | 126 ++--
.../core/client/impl/ThriftTransportKey.java | 6 +-
.../core/client/impl/ThriftTransportPool.java | 48 +-
.../core/client/impl/TimeoutTabletLocator.java | 15 +-
.../accumulo/core/client/impl/Translator.java | 15 +-
.../apache/accumulo/core/client/impl/Writer.java | 12 +-
.../core/client/lexicoder/AbstractEncoder.java | 14 +-
.../core/client/lexicoder/BigIntegerLexicoder.java | 6 +-
.../core/client/lexicoder/BytesLexicoder.java | 10 +-
.../core/client/lexicoder/DateLexicoder.java | 3 +-
.../core/client/lexicoder/DoubleLexicoder.java | 3 +-
.../accumulo/core/client/lexicoder/Encoder.java | 3 +-
.../core/client/lexicoder/FloatLexicoder.java | 3 +-
.../core/client/lexicoder/IntegerLexicoder.java | 7 +-
.../accumulo/core/client/lexicoder/Lexicoder.java | 4 +-
.../core/client/lexicoder/ListLexicoder.java | 6 +-
.../core/client/lexicoder/LongLexicoder.java | 4 +-
.../core/client/lexicoder/PairLexicoder.java | 35 +-
.../core/client/lexicoder/ReverseLexicoder.java | 7 +-
.../core/client/lexicoder/StringLexicoder.java | 7 +-
.../core/client/lexicoder/TextLexicoder.java | 7 +-
.../core/client/lexicoder/UIntegerLexicoder.java | 8 +-
.../core/client/lexicoder/ULongLexicoder.java | 8 +-
.../core/client/lexicoder/UUIDLexicoder.java | 7 +-
.../lexicoder/impl/FixedByteArrayOutputStream.java | 3 +-
.../core/client/mapred/AbstractInputFormat.java | 141 ++--
.../client/mapred/AccumuloFileOutputFormat.java | 58 +-
.../core/client/mapred/AccumuloInputFormat.java | 10 +-
.../mapred/AccumuloMultiTableInputFormat.java | 8 +-
.../core/client/mapred/AccumuloOutputFormat.java | 83 ++-
.../core/client/mapred/AccumuloRowInputFormat.java | 12 +-
.../core/client/mapred/InputFormatBase.java | 100 ++-
.../core/client/mapred/RangeInputSplit.java | 3 +-
.../core/client/mapred/impl/BatchInputSplit.java | 9 +-
.../core/client/mapreduce/AbstractInputFormat.java | 152 ++--
.../client/mapreduce/AccumuloFileOutputFormat.java | 52 +-
.../core/client/mapreduce/AccumuloInputFormat.java | 10 +-
.../mapreduce/AccumuloMultiTableInputFormat.java | 11 +-
.../client/mapreduce/AccumuloOutputFormat.java | 86 ++-
.../client/mapreduce/AccumuloRowInputFormat.java | 13 +-
.../core/client/mapreduce/InputFormatBase.java | 106 +--
.../core/client/mapreduce/InputTableConfig.java | 58 +-
.../core/client/mapreduce/RangeInputSplit.java | 18 +-
.../client/mapreduce/impl/BatchInputSplit.java | 30 +-
.../client/mapreduce/impl/DelegationTokenStub.java | 3 +-
.../core/client/mapreduce/impl/SplitUtils.java | 16 +-
.../mapreduce/lib/impl/ConfiguratorBase.java | 134 ++--
.../mapreduce/lib/impl/FileOutputConfigurator.java | 83 ++-
.../mapreduce/lib/impl/InputConfigurator.java | 240 ++++---
.../mapreduce/lib/impl/OutputConfigurator.java | 36 +-
.../client/mapreduce/lib/impl/package-info.java | 27 +-
.../lib/partition/KeyRangePartitioner.java | 3 +-
.../mapreduce/lib/partition/RangePartitioner.java | 9 +-
.../mapreduce/lib/util/ConfiguratorBase.java | 72 +-
.../mapreduce/lib/util/FileOutputConfigurator.java | 67 +-
.../mapreduce/lib/util/InputConfigurator.java | 167 +++--
.../mapreduce/lib/util/OutputConfigurator.java | 54 +-
.../client/mapreduce/lib/util/package-info.java | 1 -
.../accumulo/core/client/mock/MockAccumulo.java | 15 +-
.../core/client/mock/MockBatchDeleter.java | 9 +-
.../core/client/mock/MockConfiguration.java | 3 +-
.../accumulo/core/client/mock/MockConnector.java | 46 +-
.../accumulo/core/client/mock/MockInstance.java | 25 +-
.../core/client/mock/MockInstanceOperations.java | 18 +-
.../client/mock/MockMultiTableBatchWriter.java | 3 +-
.../core/client/mock/MockNamespaceOperations.java | 25 +-
.../accumulo/core/client/mock/MockScannerBase.java | 14 +-
.../core/client/mock/MockSecurityOperations.java | 54 +-
.../accumulo/core/client/mock/MockTable.java | 14 +-
.../core/client/mock/MockTableOperations.java | 149 ++--
.../core/client/mock/impl/MockTabletLocator.java | 12 +-
.../accumulo/core/client/mock/package-info.java | 1 -
.../client/replication/PeerExistsException.java | 3 +-
.../apache/accumulo/core/client/rfile/RFile.java | 93 ++-
.../accumulo/core/client/rfile/RFileScanner.java | 33 +-
.../core/client/rfile/RFileScannerBuilder.java | 6 +-
.../accumulo/core/client/rfile/RFileSource.java | 4 +-
.../accumulo/core/client/rfile/RFileWriter.java | 40 +-
.../core/client/rfile/RFileWriterBuilder.java | 8 +-
.../core/client/sample/AbstractHashSampler.java | 13 +-
.../core/client/sample/RowColumnSampler.java | 15 +-
.../accumulo/core/client/sample/RowSampler.java | 10 +-
.../accumulo/core/client/sample/Sampler.java | 30 +-
.../security/tokens/AuthenticationToken.java | 24 +-
.../security/tokens/CredentialProviderToken.java | 24 +-
.../client/security/tokens/DelegationToken.java | 13 +-
.../core/client/security/tokens/KerberosToken.java | 28 +-
.../core/client/security/tokens/PasswordToken.java | 21 +-
.../accumulo/core/conf/AccumuloConfiguration.java | 67 +-
.../accumulo/core/conf/ConfigSanityCheck.java | 17 +-
.../accumulo/core/conf/ConfigurationCopy.java | 3 +-
.../accumulo/core/conf/ConfigurationDocGen.java | 38 +-
.../core/conf/CredentialProviderFactoryShim.java | 133 ++--
.../accumulo/core/conf/DefaultConfiguration.java | 3 +-
.../apache/accumulo/core/conf/Interpolated.java | 9 +-
.../core/conf/ObservableConfiguration.java | 6 +-
.../org/apache/accumulo/core/conf/Property.java | 742 +++++++++++++-------
.../apache/accumulo/core/conf/PropertyType.java | 66 +-
.../org/apache/accumulo/core/conf/Sensitive.java | 3 +-
.../accumulo/core/conf/SiteConfiguration.java | 44 +-
.../accumulo/core/constraints/Constraint.java | 14 +-
.../core/constraints/VisibilityConstraint.java | 3 +-
.../accumulo/core/data/ArrayByteSequence.java | 24 +-
.../apache/accumulo/core/data/ByteSequence.java | 17 +-
.../java/org/apache/accumulo/core/data/Column.java | 10 +-
.../apache/accumulo/core/data/ColumnUpdate.java | 20 +-
.../apache/accumulo/core/data/ComparableBytes.java | 11 +-
.../org/apache/accumulo/core/data/Condition.java | 55 +-
.../accumulo/core/data/ConditionalMutation.java | 6 +-
.../core/data/ConstraintViolationSummary.java | 12 +-
.../java/org/apache/accumulo/core/data/Key.java | 312 +++++----
.../org/apache/accumulo/core/data/KeyExtent.java | 36 +-
.../org/apache/accumulo/core/data/Mutation.java | 229 +++---
.../org/apache/accumulo/core/data/PartialKey.java | 6 +-
.../java/org/apache/accumulo/core/data/Range.java | 180 +++--
.../org/apache/accumulo/core/data/TabletId.java | 3 +-
.../java/org/apache/accumulo/core/data/Value.java | 32 +-
.../accumulo/core/data/impl/ComparableBytes.java | 3 +-
.../apache/accumulo/core/data/impl/KeyExtent.java | 76 +-
.../accumulo/core/data/impl/TabletIdImpl.java | 6 +-
.../accumulo/core/file/BloomFilterLayer.java | 71 +-
.../accumulo/core/file/DispatchingFileFactory.java | 8 +-
.../apache/accumulo/core/file/FileOperations.java | 121 +++-
.../accumulo/core/file/blockfile/ABlockReader.java | 3 +-
.../core/file/blockfile/BlockFileReader.java | 3 +-
.../core/file/blockfile/BlockFileWriter.java | 3 +-
.../core/file/blockfile/cache/CachedBlock.java | 16 +-
.../file/blockfile/cache/CachedBlockQueue.java | 15 +-
.../core/file/blockfile/cache/ClassSize.java | 18 +-
.../core/file/blockfile/cache/HeapSize.java | 9 +-
.../core/file/blockfile/cache/LruBlockCache.java | 109 +--
.../file/blockfile/impl/CachableBlockFile.java | 97 +--
.../impl/SeekableByteArrayInputStream.java | 9 +-
.../file/keyfunctor/ColumnQualifierFunctor.java | 3 +-
.../accumulo/core/file/keyfunctor/RowFunctor.java | 3 +-
.../accumulo/core/file/map/MapFileOperations.java | 19 +-
.../apache/accumulo/core/file/map/MapFileUtil.java | 6 +-
.../accumulo/core/file/rfile/BlockIndex.java | 15 +-
.../accumulo/core/file/rfile/CreateEmpty.java | 15 +-
.../accumulo/core/file/rfile/IndexIterator.java | 6 +-
.../accumulo/core/file/rfile/KeyShortener.java | 22 +-
.../accumulo/core/file/rfile/MetricsGatherer.java | 10 +-
.../core/file/rfile/MultiIndexIterator.java | 6 +-
.../accumulo/core/file/rfile/MultiLevelIndex.java | 58 +-
.../apache/accumulo/core/file/rfile/PrintInfo.java | 28 +-
.../org/apache/accumulo/core/file/rfile/RFile.java | 230 ++++--
.../accumulo/core/file/rfile/RFileOperations.java | 15 +-
.../accumulo/core/file/rfile/RelativeKey.java | 33 +-
.../accumulo/core/file/rfile/RollingStats.java | 15 +-
.../accumulo/core/file/rfile/SplitLarge.java | 15 +-
.../core/file/rfile/VisMetricsGatherer.java | 19 +-
.../accumulo/core/file/rfile/VisibilityMetric.java | 10 +-
.../accumulo/core/file/rfile/bcfile/BCFile.java | 204 ++++--
.../core/file/rfile/bcfile/Compression.java | 134 ++--
.../accumulo/core/file/rfile/bcfile/PrintInfo.java | 15 +-
.../core/file/rfile/bcfile/RawComparable.java | 10 +-
.../rfile/bcfile/SimpleBufferedOutputStream.java | 3 +-
.../accumulo/core/file/rfile/bcfile/Utils.java | 67 +-
.../file/streams/BoundedRangeFileInputStream.java | 11 +-
.../file/streams/PositionedDataOutputStream.java | 6 +-
.../core/file/streams/PositionedOutput.java | 3 +-
.../core/file/streams/PositionedOutputs.java | 8 +-
.../core/file/streams/RateLimitedInputStream.java | 3 +-
.../core/file/streams/SeekableDataInputStream.java | 3 +-
.../core/iterators/AggregatingIterator.java | 30 +-
.../core/iterators/ColumnFamilyCounter.java | 9 +-
.../apache/accumulo/core/iterators/Combiner.java | 125 ++--
.../accumulo/core/iterators/DebugIterator.java | 10 +-
.../apache/accumulo/core/iterators/DevNull.java | 10 +-
.../core/iterators/FamilyIntersectingIterator.java | 3 +-
.../org/apache/accumulo/core/iterators/Filter.java | 25 +-
.../core/iterators/FirstEntryInRowIterator.java | 16 +-
.../core/iterators/IntersectingIterator.java | 6 +-
.../accumulo/core/iterators/IteratorAdapter.java | 3 +-
.../core/iterators/IteratorEnvironment.java | 14 +-
.../accumulo/core/iterators/IteratorUtil.java | 116 ++--
.../accumulo/core/iterators/LongCombiner.java | 61 +-
.../accumulo/core/iterators/OptionDescriber.java | 36 +-
.../apache/accumulo/core/iterators/OrIterator.java | 52 +-
.../core/iterators/RowDeletingIterator.java | 6 +-
.../accumulo/core/iterators/SkippingIterator.java | 10 +-
.../accumulo/core/iterators/SortedKeyIterator.java | 4 +-
.../core/iterators/SortedKeyValueIterator.java | 86 ++-
.../accumulo/core/iterators/SortedMapIterator.java | 13 +-
.../core/iterators/TypedValueCombiner.java | 38 +-
.../core/iterators/VersioningIterator.java | 3 +-
.../accumulo/core/iterators/WholeRowIterator.java | 3 +-
.../accumulo/core/iterators/WrappingIterator.java | 22 +-
.../accumulo/core/iterators/YieldCallback.java | 5 +-
.../core/iterators/YieldingKeyValueIterator.java | 18 +-
.../core/iterators/aggregation/LongSummation.java | 15 +-
.../iterators/aggregation/NumArraySummation.java | 3 +-
.../core/iterators/aggregation/NumSummation.java | 3 +-
.../core/iterators/aggregation/StringMax.java | 4 +-
.../core/iterators/aggregation/StringMin.java | 4 +-
.../iterators/aggregation/StringSummation.java | 3 +-
.../aggregation/conf/AggregatorConfiguration.java | 3 +-
.../iterators/aggregation/conf/AggregatorSet.java | 6 +-
.../accumulo/core/iterators/conf/ColumnSet.java | 6 +-
.../core/iterators/conf/ColumnToClassMapping.java | 12 +-
.../accumulo/core/iterators/conf/ColumnUtil.java | 9 +-
.../iterators/conf/PerColumnIteratorConfig.java | 6 +-
.../system/ColumnFamilySkippingIterator.java | 12 +-
.../iterators/system/ColumnQualifierFilter.java | 9 +-
.../core/iterators/system/CountingIterator.java | 3 +-
.../core/iterators/system/DeletingIterator.java | 15 +-
.../core/iterators/system/EmptyIterator.java | 6 +-
.../core/iterators/system/HeapIterator.java | 4 +-
.../iterators/system/LocalityGroupIterator.java | 43 +-
.../core/iterators/system/MapFileIterator.java | 9 +-
.../core/iterators/system/MultiIterator.java | 9 +-
.../iterators/system/SequenceFileIterator.java | 6 +-
.../iterators/system/SourceSwitchingIterator.java | 53 +-
.../core/iterators/system/StatsIterator.java | 6 +-
.../iterators/system/SynchronizedIterator.java | 14 +-
.../core/iterators/system/TimeSettingIterator.java | 6 +-
.../core/iterators/system/VisibilityFilter.java | 9 +-
.../accumulo/core/iterators/user/AgeOffFilter.java | 18 +-
.../core/iterators/user/BigDecimalCombiner.java | 12 +-
.../core/iterators/user/CfCqSliceFilter.java | 13 +-
.../core/iterators/user/CfCqSliceOpts.java | 18 +-
.../iterators/user/CfCqSliceSeekingFilter.java | 27 +-
.../core/iterators/user/ColumnAgeOffFilter.java | 17 +-
.../core/iterators/user/ColumnSliceFilter.java | 22 +-
.../accumulo/core/iterators/user/GrepIterator.java | 9 +-
.../core/iterators/user/IndexedDocIterator.java | 38 +-
.../core/iterators/user/IntersectingIterator.java | 97 ++-
.../core/iterators/user/LargeRowFilter.java | 46 +-
.../accumulo/core/iterators/user/MaxCombiner.java | 3 +-
.../accumulo/core/iterators/user/MinCombiner.java | 3 +-
.../accumulo/core/iterators/user/RegExFilter.java | 26 +-
.../core/iterators/user/RowDeletingIterator.java | 45 +-
.../core/iterators/user/RowEncodingIterator.java | 55 +-
.../accumulo/core/iterators/user/RowFilter.java | 44 +-
.../core/iterators/user/SeekingFilter.java | 47 +-
.../core/iterators/user/SummingArrayCombiner.java | 26 +-
.../core/iterators/user/SummingCombiner.java | 3 +-
.../core/iterators/user/TimestampFilter.java | 15 +-
.../core/iterators/user/TransformingIterator.java | 219 +++---
.../core/iterators/user/VersioningIterator.java | 19 +-
.../core/iterators/user/VisibilityFilter.java | 12 +-
.../iterators/user/WholeColumnFamilyIterator.java | 52 +-
.../core/iterators/user/WholeRowIterator.java | 27 +-
.../core/metadata/MetadataLocationObtainer.java | 54 +-
.../accumulo/core/metadata/MetadataServicer.java | 9 +-
.../apache/accumulo/core/metadata/RootTable.java | 3 +-
.../core/metadata/ServicerForRootTable.java | 3 +-
.../core/metadata/TableMetadataServicer.java | 26 +-
.../core/metadata/schema/MetadataSchema.java | 42 +-
.../replication/AccumuloReplicationReplayer.java | 7 +-
.../core/replication/ReplicationSchema.java | 26 +-
.../core/replication/ReplicationTable.java | 9 +-
.../core/replication/ReplicationTarget.java | 10 +-
.../apache/accumulo/core/rpc/FilterTransport.java | 3 +-
.../rpc/ProtocolOverridingSSLSocketFactory.java | 24 +-
.../core/rpc/SaslClientDigestCallbackHandler.java | 5 +-
.../accumulo/core/rpc/SaslConnectionParams.java | 15 +-
.../core/rpc/SaslDigestCallbackHandler.java | 6 +-
.../accumulo/core/rpc/SslConnectionParams.java | 19 +-
.../apache/accumulo/core/rpc/TBufferedSocket.java | 3 +-
.../accumulo/core/rpc/TTimeoutTransport.java | 6 +-
.../org/apache/accumulo/core/rpc/ThriftUtil.java | 142 ++--
.../accumulo/core/rpc/TraceProtocolFactory.java | 3 +-
.../accumulo/core/rpc/UGIAssumingTransport.java | 6 +-
.../core/sample/impl/SamplerConfigurationImpl.java | 18 +-
.../accumulo/core/sample/impl/SamplerFactory.java | 6 +-
.../accumulo/core/security/Authorizations.java | 24 +-
.../accumulo/core/security/ColumnVisibility.java | 86 ++-
.../core/security/NamespacePermission.java | 3 +-
.../accumulo/core/security/SystemPermission.java | 3 +-
.../accumulo/core/security/TablePermission.java | 3 +-
.../core/security/VisibilityConstraint.java | 8 +-
.../core/security/VisibilityEvaluator.java | 29 +-
.../core/security/VisibilityParseException.java | 3 +-
.../core/security/crypto/BlockedInputStream.java | 10 +-
.../core/security/crypto/BlockedOutputStream.java | 12 +-
.../CachingHDFSSecretKeyEncryptionStrategy.java | 27 +-
.../core/security/crypto/CryptoModule.java | 87 ++-
.../core/security/crypto/CryptoModuleFactory.java | 78 ++-
.../security/crypto/CryptoModuleParameters.java | 263 ++++---
.../core/security/crypto/DefaultCryptoModule.java | 173 +++--
.../security/crypto/DefaultCryptoModuleUtils.java | 16 +-
.../NonCachingSecretKeyEncryptionStrategy.java | 29 +-
.../apache/accumulo/core/trace/CountSampler.java | 3 +-
.../accumulo/core/trace/DistributedTrace.java | 43 +-
.../accumulo/core/trace/ProbabilitySampler.java | 3 +-
.../java/org/apache/accumulo/core/trace/Span.java | 3 +-
.../java/org/apache/accumulo/core/trace/Trace.java | 3 +-
.../accumulo/core/trace/wrappers/TraceWrap.java | 11 +-
.../org/apache/accumulo/core/util/AddressUtil.java | 6 +-
.../accumulo/core/util/AsyncSocketAppender.java | 8 +-
.../java/org/apache/accumulo/core/util/Base64.java | 13 +-
.../apache/accumulo/core/util/ByteBufferUtil.java | 12 +-
.../org/apache/accumulo/core/util/CleanUp.java | 11 +-
.../apache/accumulo/core/util/ComparablePair.java | 3 +-
.../org/apache/accumulo/core/util/CreateToken.java | 23 +-
.../apache/accumulo/core/util/DeprecationUtil.java | 13 +-
.../org/apache/accumulo/core/util/FastFormat.java | 6 +-
.../org/apache/accumulo/core/util/HostAndPort.java | 46 +-
.../java/org/apache/accumulo/core/util/Jar.java | 8 +-
.../accumulo/core/util/LocalityGroupUtil.java | 38 +-
.../java/org/apache/accumulo/core/util/Merge.java | 33 +-
.../org/apache/accumulo/core/util/OpTimer.java | 14 +-
.../apache/accumulo/core/util/PeekingIterator.java | 3 +-
.../accumulo/core/util/PreAllocatedArray.java | 5 +-
.../apache/accumulo/core/util/ServerServices.java | 3 +-
.../accumulo/core/util/SimpleThreadPool.java | 3 +-
.../accumulo/core/util/ThriftMessageUtil.java | 13 +-
.../accumulo/core/util/UnsynchronizedBuffer.java | 26 +-
.../org/apache/accumulo/core/util/Validator.java | 15 +-
.../accumulo/core/util/format/BinaryFormatter.java | 12 +-
.../core/util/format/DateFormatSupplier.java | 19 +-
.../core/util/format/DateStringFormatter.java | 17 +-
.../core/util/format/DefaultFormatter.java | 9 +-
.../accumulo/core/util/format/FormatterConfig.java | 5 +-
.../core/util/format/FormatterFactory.java | 6 +-
.../accumulo/core/util/format/HexFormatter.java | 3 +-
.../format/ShardedTableDistributionFormatter.java | 7 +-
.../util/format/StatisticsDisplayFormatter.java | 5 +-
.../core/util/interpret/HexScanInterpreter.java | 5 +-
.../core/util/interpret/ScanInterpreter.java | 3 +-
.../core/util/ratelimit/GuavaRateLimiter.java | 9 +-
.../util/ratelimit/SharedRateLimiterFactory.java | 22 +-
.../accumulo/core/volume/NonConfiguredVolume.java | 21 +-
.../org/apache/accumulo/core/volume/Volume.java | 6 +-
.../accumulo/core/volume/VolumeConfiguration.java | 21 +-
.../apache/accumulo/core/volume/VolumeImpl.java | 12 +-
.../apache/accumulo/core/zookeeper/ZooUtil.java | 16 +-
.../apache/accumulo/core/cli/TestClientOpts.java | 34 +-
.../core/client/BatchWriterConfigTest.java | 6 +-
.../core/client/ClientConfigurationTest.java | 6 +-
.../accumulo/core/client/IteratorSettingTest.java | 6 +-
.../accumulo/core/client/TestThrift1474.java | 3 +-
.../core/client/ZooKeeperInstanceTest.java | 21 +-
.../client/admin/DelegationTokenConfigTest.java | 6 +-
.../core/client/impl/ClientContextTest.java | 15 +-
.../core/client/impl/ScannerOptionsTest.java | 3 +-
.../client/impl/TableOperationsHelperTest.java | 143 ++--
.../core/client/impl/TableOperationsImplTest.java | 3 +-
.../core/client/impl/TabletLocatorImplTest.java | 258 ++++---
.../core/client/impl/ThriftScannerTest.java | 6 +-
.../core/client/impl/ThriftTransportKeyTest.java | 89 +--
.../client/lexicoder/BigIntegerLexicoderTest.java | 19 +-
.../core/client/lexicoder/DoubleLexicoderTest.java | 10 +-
.../core/client/lexicoder/FloatLexicoderTest.java | 9 +-
.../client/lexicoder/IntegerLexicoderTest.java | 4 +-
.../core/client/lexicoder/LexicoderTest.java | 3 +-
.../core/client/lexicoder/LongLexicoderTest.java | 8 +-
.../core/client/lexicoder/PairLexicoderTest.java | 21 +-
.../client/lexicoder/ReverseLexicoderTest.java | 11 +-
.../core/client/lexicoder/ULongLexicoderTest.java | 31 +-
.../core/client/lexicoder/UUIDLexicoderTest.java | 4 +-
.../lexicoder/impl/AbstractLexicoderTest.java | 5 +-
.../mapred/AccumuloFileOutputFormatTest.java | 9 +-
.../client/mapred/AccumuloInputFormatTest.java | 38 +-
.../mapred/AccumuloMultiTableInputFormatTest.java | 9 +-
.../client/mapred/AccumuloOutputFormatTest.java | 6 +-
.../core/client/mapred/RangeInputSplitTest.java | 9 +-
.../mapreduce/AccumuloFileOutputFormatTest.java | 12 +-
.../client/mapreduce/AccumuloInputFormatTest.java | 38 +-
.../AccumuloMultiTableInputFormatTest.java | 3 +-
.../client/mapreduce/AccumuloOutputFormatTest.java | 6 +-
.../core/client/mapreduce/RangeInputSplitTest.java | 9 +-
.../client/mapreduce/impl/BatchInputSplitTest.java | 9 +-
.../mapreduce/lib/impl/ConfiguratorBaseTest.java | 43 +-
.../lib/partition/RangePartitionerTest.java | 9 +-
.../core/client/mock/MockConnectorTest.java | 26 +-
.../core/client/mock/MockNamespacesTest.java | 25 +-
.../accumulo/core/client/mock/MockScannerTest.java | 6 +-
.../core/client/mock/MockTableOperationsTest.java | 34 +-
.../core/client/mock/TestBatchScanner821.java | 3 +-
.../accumulo/core/client/rfile/RFileTest.java | 58 +-
.../client/security/SecurityErrorCodeTest.java | 3 +-
.../security/tokens/DelegationTokenImplTest.java | 21 +-
.../client/security/tokens/KerberosTokenTest.java | 3 +-
.../core/conf/AccumuloConfigurationTest.java | 6 +-
.../accumulo/core/conf/ConfigSanityCheckTest.java | 3 +-
.../conf/CredentialProviderFactoryShimTest.java | 38 +-
.../core/conf/DefaultConfigurationTest.java | 3 +-
.../apache/accumulo/core/conf/PropertyTest.java | 23 +-
.../accumulo/core/conf/PropertyTypeTest.java | 51 +-
.../accumulo/core/conf/SiteConfigurationTest.java | 15 +-
.../constraints/DefaultKeySizeConstraintTest.java | 16 +-
.../accumulo/core/data/ArrayByteSequenceTest.java | 3 +-
.../apache/accumulo/core/data/ConditionTest.java | 12 +-
.../core/data/ConstraintViolationSummaryTest.java | 10 +-
.../org/apache/accumulo/core/data/KeyTest.java | 12 +-
.../apache/accumulo/core/data/MutationTest.java | 39 +-
.../org/apache/accumulo/core/data/OldMutation.java | 84 ++-
.../org/apache/accumulo/core/data/RangeTest.java | 103 ++-
.../core/file/BloomFilterLayerLookupTest.java | 15 +-
.../accumulo/core/file/FileOperationsTest.java | 3 +-
.../file/blockfile/cache/TestCachedBlockQueue.java | 10 +-
.../file/blockfile/cache/TestLruBlockCache.java | 43 +-
.../accumulo/core/file/rfile/BlockIndexTest.java | 15 +-
.../core/file/rfile/CreateCompatTestFile.java | 22 +-
.../accumulo/core/file/rfile/KeyShortenerTest.java | 78 ++-
.../core/file/rfile/MultiLevelIndexTest.java | 6 +-
.../core/file/rfile/MultiThreadedRFileTest.java | 56 +-
.../accumulo/core/file/rfile/RFileMetricsTest.java | 9 +-
.../apache/accumulo/core/file/rfile/RFileTest.java | 299 +++++---
.../accumulo/core/file/rfile/RelativeKeyTest.java | 24 +-
.../core/file/rfile/RolllingStatsTest.java | 4 +-
.../core/file/rfile/bcfile/CompressionTest.java | 21 +-
.../file/streams/RateLimitedInputStreamTest.java | 12 +-
.../file/streams/RateLimitedOutputStreamTest.java | 3 +-
.../core/iterators/AggregatingIteratorTest.java | 9 +-
.../core/iterators/DefaultIteratorEnvironment.java | 3 +-
.../iterators/FirstEntryInRowIteratorTest.java | 9 +-
.../core/iterators/FirstEntryInRowTest.java | 9 +-
.../accumulo/core/iterators/IteratorUtilTest.java | 74 +-
.../conf/AggregatorConfigurationTest.java | 16 +-
.../system/ColumnFamilySkippingIteratorTest.java | 16 +-
.../core/iterators/system/ColumnFilterTest.java | 6 +-
.../iterators/system/DeletingIteratorTest.java | 3 +-
.../core/iterators/system/MultiIteratorTest.java | 20 +-
.../system/SourceSwitchingIteratorTest.java | 31 +-
.../iterators/system/TimeSettingIteratorTest.java | 21 +-
.../iterators/system/VisibilityFilterTest.java | 6 +-
.../core/iterators/user/ColumnSliceFilterTest.java | 3 +-
.../accumulo/core/iterators/user/CombinerTest.java | 53 +-
.../accumulo/core/iterators/user/FilterTest.java | 27 +-
.../core/iterators/user/GrepIteratorTest.java | 3 +-
.../iterators/user/IndexedDocIteratorTest.java | 39 +-
.../iterators/user/IntersectingIteratorTest.java | 39 +-
.../core/iterators/user/LargeRowFilterTest.java | 27 +-
.../iterators/user/RowDeletingIteratorTest.java | 12 +-
.../iterators/user/RowEncodingIteratorTest.java | 9 +-
.../core/iterators/user/RowFilterTest.java | 12 +-
.../core/iterators/user/TestCfCqSlice.java | 81 ++-
.../iterators/user/TransformingIteratorTest.java | 102 ++-
.../iterators/user/VersioningIteratorTest.java | 3 +-
.../core/iterators/user/VisibilityFilterTest.java | 14 +-
.../user/WholeColumnFamilyIteratorTest.java | 53 +-
.../core/iterators/user/WholeRowIteratorTest.java | 44 +-
.../core/metadata/MetadataServicerTest.java | 3 +-
.../ReplicationConfigurationUtilTest.java | 20 +-
.../rpc/SaslClientDigestCallbackHandlerTest.java | 5 +-
.../core/rpc/SaslConnectionParamsTest.java | 121 ++--
.../AuthenticationTokenIdentifierTest.java | 6 +-
.../core/security/AuthenticationTokenTest.java | 6 +-
.../accumulo/core/security/AuthorizationsTest.java | 3 +-
.../core/security/ColumnVisibilityTest.java | 6 +-
.../accumulo/core/security/CredentialsTest.java | 19 +-
.../core/security/NamespacePermissionsTest.java | 3 +-
.../core/security/VisibilityConstraintTest.java | 3 +-
.../core/security/VisibilityEvaluatorTest.java | 33 +-
.../core/security/crypto/BlockedIOStreamTest.java | 3 +-
.../accumulo/core/security/crypto/CryptoTest.java | 58 +-
.../core/util/AsyncSocketAppenderTest.java | 6 +-
.../accumulo/core/util/ByteBufferUtilTest.java | 6 +-
.../accumulo/core/util/LocalityGroupUtilTest.java | 3 +-
.../org/apache/accumulo/core/util/MergeTest.java | 12 +-
.../org/apache/accumulo/core/util/OpTimerTest.java | 15 +-
.../org/apache/accumulo/core/util/PairTest.java | 3 +-
.../apache/accumulo/core/util/PartitionerTest.java | 3 +-
.../accumulo/core/util/PreAllocatedArrayTest.java | 3 +-
.../core/util/format/DateFormatSupplierTest.java | 6 +-
.../core/util/format/DefaultFormatterTest.java | 9 +-
.../core/util/format/FormatterFactoryTest.java | 3 +-
.../simple/client/CountingVerifyingReceiver.java | 3 +-
.../examples/simple/client/RandomBatchScanner.java | 26 +-
.../examples/simple/client/RandomBatchWriter.java | 30 +-
.../examples/simple/client/ReadWriteExample.java | 10 +-
.../examples/simple/client/RowOperations.java | 50 +-
.../simple/client/SequentialBatchWriter.java | 14 +-
.../examples/simple/client/TraceDumpExample.java | 12 +-
.../examples/simple/client/TracingExample.java | 21 +-
.../examples/simple/combiner/StatsCombiner.java | 17 +-
.../simple/constraints/NumericValueConstraint.java | 6 +-
.../examples/simple/dirlist/FileCount.java | 25 +-
.../accumulo/examples/simple/dirlist/Ingest.java | 24 +-
.../examples/simple/dirlist/QueryUtil.java | 38 +-
.../accumulo/examples/simple/dirlist/Viewer.java | 9 +-
.../simple/filedata/CharacterHistogram.java | 11 +-
.../examples/simple/filedata/ChunkCombiner.java | 21 +-
.../examples/simple/filedata/ChunkInputFormat.java | 8 +-
.../examples/simple/filedata/ChunkInputStream.java | 21 +-
.../examples/simple/filedata/FileDataIngest.java | 27 +-
.../examples/simple/filedata/FileDataQuery.java | 10 +-
.../simple/filedata/VisibilityCombiner.java | 3 +-
.../simple/helloworld/InsertWithBatchWriter.java | 10 +-
.../examples/simple/helloworld/ReadData.java | 6 +-
.../simple/isolation/InterferenceTest.java | 14 +-
.../examples/simple/mapreduce/NGramIngest.java | 9 +-
.../examples/simple/mapreduce/RegexExample.java | 3 +-
.../examples/simple/mapreduce/RowHash.java | 3 +-
.../examples/simple/mapreduce/TableToFile.java | 3 +-
.../examples/simple/mapreduce/TeraSortIngest.java | 39 +-
.../simple/mapreduce/TokenFileWordCount.java | 9 +-
.../examples/simple/mapreduce/UniqueColumns.java | 18 +-
.../examples/simple/mapreduce/WordCount.java | 3 +-
.../simple/mapreduce/bulk/BulkIngestExample.java | 18 +-
.../simple/mapreduce/bulk/GenerateTestData.java | 3 +-
.../simple/mapreduce/bulk/VerifyIngest.java | 9 +-
.../accumulo/examples/simple/reservations/ARS.java | 72 +-
.../examples/simple/sample/SampleExample.java | 32 +-
.../examples/simple/shard/ContinuousQuery.java | 11 +-
.../simple/shard/CutoffIntersectingIterator.java | 24 +-
.../accumulo/examples/simple/shard/Index.java | 15 +-
.../accumulo/examples/simple/shard/Query.java | 12 +-
.../accumulo/examples/simple/shard/Reverse.java | 5 +-
.../constraints/AlphaNumKeyConstraintTest.java | 13 +-
.../constraints/NumericValueConstraintTest.java | 6 +-
.../simple/filedata/ChunkCombinerTest.java | 21 +-
.../simple/filedata/ChunkInputStreamTest.java | 12 +-
.../apache/accumulo/fate/AcceptableException.java | 12 +-
.../java/org/apache/accumulo/fate/AdminUtil.java | 56 +-
.../java/org/apache/accumulo/fate/AgeOffStore.java | 6 +-
.../main/java/org/apache/accumulo/fate/Fate.java | 21 +-
.../org/apache/accumulo/fate/ReadOnlyRepo.java | 4 +-
.../org/apache/accumulo/fate/ReadOnlyStore.java | 6 +-
.../org/apache/accumulo/fate/ReadOnlyTStore.java | 19 +-
.../main/java/org/apache/accumulo/fate/TStore.java | 7 +-
.../java/org/apache/accumulo/fate/ZooStore.java | 27 +-
.../org/apache/accumulo/fate/util/AddressUtil.java | 24 +-
.../apache/accumulo/fate/util/LoggingRunnable.java | 9 +-
.../java/org/apache/accumulo/fate/util/Retry.java | 47 +-
.../apache/accumulo/fate/util/UtilWaitThread.java | 8 +-
.../fate/zookeeper/DistributedReadWriteLock.java | 20 +-
.../apache/accumulo/fate/zookeeper/IZooReader.java | 9 +-
.../accumulo/fate/zookeeper/IZooReaderWriter.java | 24 +-
.../apache/accumulo/fate/zookeeper/ZooCache.java | 63 +-
.../accumulo/fate/zookeeper/ZooCacheFactory.java | 7 +-
.../apache/accumulo/fate/zookeeper/ZooLock.java | 52 +-
.../accumulo/fate/zookeeper/ZooQueueLock.java | 3 +-
.../apache/accumulo/fate/zookeeper/ZooReader.java | 42 +-
.../accumulo/fate/zookeeper/ZooReaderWriter.java | 46 +-
.../accumulo/fate/zookeeper/ZooReservation.java | 12 +-
.../apache/accumulo/fate/zookeeper/ZooSession.java | 18 +-
.../apache/accumulo/fate/zookeeper/ZooUtil.java | 72 +-
.../org/apache/accumulo/fate/AgeOffStoreTest.java | 12 +-
.../apache/accumulo/fate/ReadOnlyStoreTest.java | 6 +-
.../java/org/apache/accumulo/fate/SimpleStore.java | 6 +-
.../apache/accumulo/fate/util/AddressUtilTest.java | 15 +-
.../org/apache/accumulo/fate/util/RetryTest.java | 29 +-
.../accumulo/fate/zookeeper/ZooCacheTest.java | 24 +-
.../zookeeper/ZooKeeperConnectionInfoTest.java | 7 +-
.../fate/zookeeper/ZooReaderWriterTest.java | 17 +-
.../iteratortest/IteratorTestCaseFinder.java | 9 +-
.../accumulo/iteratortest/IteratorTestInput.java | 29 +-
.../accumulo/iteratortest/IteratorTestOutput.java | 17 +-
.../accumulo/iteratortest/IteratorTestReport.java | 6 +-
.../accumulo/iteratortest/IteratorTestRunner.java | 14 +-
.../accumulo/iteratortest/IteratorTestUtil.java | 3 +-
.../iteratortest/SimpleKVReusingIterator.java | 9 +-
.../environments/SimpleIteratorEnvironment.java | 3 +-
.../junit4/BaseJUnit4IteratorTest.java | 12 +-
.../testcases/InstantiationTestCase.java | 3 +-
.../testcases/IsolatedDeepCopiesTestCase.java | 24 +-
.../iteratortest/testcases/IteratorTestCase.java | 7 +-
.../testcases/MultipleHasTopCalls.java | 13 +-
.../testcases/OutputVerifyingTestCase.java | 3 +-
.../iteratortest/testcases/ReSeekTestCase.java | 20 +-
.../iteratortest/testcases/YieldingTestCase.java | 24 +-
.../iteratortest/framework/JUnitFrameworkTest.java | 9 +-
.../maven/plugin/AbstractAccumuloMojo.java | 6 +-
.../apache/accumulo/maven/plugin/StartMojo.java | 24 +-
.../org/apache/accumulo/maven/plugin/StopMojo.java | 6 +-
.../apache/accumulo/cluster/AccumuloCluster.java | 6 +-
.../apache/accumulo/cluster/ClusterControl.java | 9 +-
.../org/apache/accumulo/cluster/ClusterUser.java | 6 +-
.../org/apache/accumulo/cluster/ClusterUsers.java | 3 +-
.../org/apache/accumulo/cluster/RemoteShell.java | 12 +-
.../accumulo/cluster/RemoteShellOptions.java | 5 +-
.../standalone/StandaloneAccumuloCluster.java | 29 +-
.../standalone/StandaloneClusterControl.java | 60 +-
.../apache/accumulo/minicluster/MemoryUnit.java | 5 +-
.../accumulo/minicluster/MiniAccumuloCluster.java | 18 +-
.../accumulo/minicluster/MiniAccumuloConfig.java | 18 +-
.../accumulo/minicluster/MiniAccumuloInstance.java | 10 +-
.../accumulo/minicluster/MiniAccumuloRunner.java | 64 +-
.../apache/accumulo/minicluster/ServerType.java | 7 +-
.../impl/MiniAccumuloClusterControl.java | 16 +-
.../minicluster/impl/MiniAccumuloClusterImpl.java | 123 ++--
.../minicluster/impl/MiniAccumuloConfigImpl.java | 76 +-
.../minicluster/impl/ProcessReference.java | 3 +-
.../minicluster/impl/ZooKeeperBindException.java | 3 +-
.../standalone/StandaloneAccumuloClusterTest.java | 6 +-
.../standalone/StandaloneClusterControlTest.java | 14 +-
.../MiniAccumuloClusterExistingZooKeepersTest.java | 13 +-
.../MiniAccumuloClusterStartStopTest.java | 3 +-
.../minicluster/MiniAccumuloClusterTest.java | 20 +-
.../minicluster/impl/CleanShutdownMacTest.java | 6 +-
.../impl/MiniAccumuloClusterImplTest.java | 18 +-
.../impl/MiniAccumuloConfigImplTest.java | 15 +-
.../main/java/org/apache/accumulo/proxy/Proxy.java | 56 +-
.../org/apache/accumulo/proxy/ProxyServer.java | 772 ++++++++++++++-------
.../main/java/org/apache/accumulo/proxy/Util.java | 15 +-
.../org/apache/accumulo/proxy/ProxyServerTest.java | 6 +-
.../java/org/apache/accumulo/server/Accumulo.java | 83 ++-
.../accumulo/server/AccumuloServerContext.java | 30 +-
.../accumulo/server/GarbageCollectionLogger.java | 9 +-
.../apache/accumulo/server/ServerConstants.java | 44 +-
.../accumulo/server/client/BulkImporter.java | 172 +++--
.../server/client/ClientServiceHandler.java | 178 +++--
.../accumulo/server/client/HdfsZooInstance.java | 27 +-
.../accumulo/server/conf/NamespaceConfWatcher.java | 13 +-
.../server/conf/NamespaceConfiguration.java | 9 +-
.../server/conf/ServerConfigurationFactory.java | 21 +-
.../accumulo/server/conf/TableConfWatcher.java | 10 +-
.../accumulo/server/conf/TableConfiguration.java | 15 +-
.../server/conf/ZooCachePropertyAccessor.java | 15 +-
.../accumulo/server/conf/ZooConfiguration.java | 6 +-
.../server/conf/ZooConfigurationFactory.java | 15 +-
.../server/constraints/MetadataConstraints.java | 60 +-
.../accumulo/server/data/ServerColumnUpdate.java | 3 +-
.../accumulo/server/data/ServerMutation.java | 6 +-
.../org/apache/accumulo/server/fs/FileRef.java | 8 +-
.../accumulo/server/fs/PerTableVolumeChooser.java | 20 +-
.../accumulo/server/fs/PreferredVolumeChooser.java | 26 +-
.../org/apache/accumulo/server/fs/ViewFSUtils.java | 6 +-
.../apache/accumulo/server/fs/VolumeChooser.java | 4 +-
.../apache/accumulo/server/fs/VolumeManager.java | 18 +-
.../accumulo/server/fs/VolumeManagerImpl.java | 60 +-
.../org/apache/accumulo/server/fs/VolumeUtil.java | 57 +-
.../apache/accumulo/server/init/Initialize.java | 327 ++++++---
.../server/iterators/MetadataBulkLoadFilter.java | 3 +-
.../apache/accumulo/server/log/SortedLogState.java | 5 +-
.../accumulo/server/log/WalStateManager.java | 6 +-
.../accumulo/server/master/LiveTServerSet.java | 81 ++-
.../master/balancer/ChaoticLoadBalancer.java | 22 +-
.../master/balancer/DefaultLoadBalancer.java | 33 +-
.../server/master/balancer/GroupBalancer.java | 93 ++-
.../balancer/HostRegexTableLoadBalancer.java | 130 ++--
.../server/master/balancer/RegexGroupBalancer.java | 35 +-
.../server/master/balancer/TableLoadBalancer.java | 16 +-
.../server/master/balancer/TabletBalancer.java | 75 +-
.../server/master/recovery/HadoopLogCloser.java | 3 +-
.../accumulo/server/master/state/CurrentState.java | 3 +-
.../accumulo/server/master/state/MergeInfo.java | 3 +-
.../accumulo/server/master/state/MergeState.java | 6 +-
.../server/master/state/MetaDataStateStore.java | 21 +-
.../server/master/state/MetaDataTableScanner.java | 20 +-
.../server/master/state/RootTabletStateStore.java | 3 +-
.../server/master/state/TServerInstance.java | 6 +-
.../server/master/state/TabletLocationState.java | 26 +-
.../master/state/TabletStateChangeIterator.java | 9 +-
.../server/master/state/TabletStateStore.java | 46 +-
.../server/master/state/ZooTabletStateStore.java | 21 +-
.../master/tableOps/UserCompactionConfig.java | 3 +-
.../server/metrics/AbstractMetricsImpl.java | 16 +-
.../server/metrics/MetricsConfiguration.java | 15 +-
.../server/metrics/MetricsSystemHelper.java | 3 +-
.../accumulo/server/metrics/ThriftMetrics.java | 3 +-
.../accumulo/server/monitor/DedupedLogEvent.java | 6 +-
.../apache/accumulo/server/monitor/LogService.java | 6 +-
.../accumulo/server/problems/ProblemReport.java | 27 +-
.../server/problems/ProblemReportingIterator.java | 19 +-
.../accumulo/server/problems/ProblemReports.java | 34 +-
.../DistributedWorkQueueWorkAssignerHelper.java | 21 +-
.../replication/PrintReplicationRecords.java | 6 +-
.../accumulo/server/replication/ReplicaSystem.java | 6 +-
.../server/replication/ReplicaSystemFactory.java | 15 +-
.../server/replication/ReplicaSystemHelper.java | 10 +-
.../server/replication/ReplicationUtil.java | 33 +-
.../server/replication/StatusCombiner.java | 20 +-
.../server/replication/StatusFormatter.java | 10 +-
.../accumulo/server/replication/StatusUtil.java | 15 +-
.../replication/ZooKeeperInitialization.java | 6 +-
.../server/rpc/ClientInfoProcessorFactory.java | 3 +-
.../server/rpc/CustomNonBlockingServer.java | 25 +-
.../org/apache/accumulo/server/rpc/RpcWrapper.java | 36 +-
.../server/rpc/SaslServerConnectionParams.java | 9 +-
.../rpc/SaslServerDigestCallbackHandler.java | 12 +-
.../rpc/TCredentialsUpdatingInvocationHandler.java | 67 +-
.../server/rpc/TCredentialsUpdatingWrapper.java | 13 +-
.../apache/accumulo/server/rpc/TServerUtils.java | 275 +++++---
.../accumulo/server/rpc/ThriftServerType.java | 10 +-
.../apache/accumulo/server/rpc/TimedProcessor.java | 6 +-
.../accumulo/server/rpc/UGIAssumingProcessor.java | 6 +-
.../server/security/AuditedSecurityOperation.java | 174 +++--
.../server/security/SecurityOperation.java | 383 ++++++----
.../accumulo/server/security/SecurityUtil.java | 36 +-
.../server/security/SystemCredentials.java | 18 +-
.../server/security/UserImpersonation.java | 27 +-
.../security/delegation/AuthenticationKey.java | 12 +-
.../delegation/AuthenticationTokenKeyManager.java | 21 +-
.../AuthenticationTokenSecretManager.java | 36 +-
.../ZooAuthenticationKeyDistributor.java | 36 +-
.../delegation/ZooAuthenticationKeyWatcher.java | 24 +-
.../server/security/handler/Authenticator.java | 11 +-
.../server/security/handler/Authorizor.java | 14 +-
.../security/handler/InsecureAuthenticator.java | 14 +-
.../security/handler/InsecurePermHandler.java | 54 +-
.../security/handler/KerberosAuthenticator.java | 31 +-
.../security/handler/KerberosAuthorizor.java | 24 +-
.../handler/KerberosPermissionHandler.java | 91 ++-
.../server/security/handler/PermissionHandler.java | 59 +-
.../server/security/handler/ZKAuthenticator.java | 29 +-
.../server/security/handler/ZKAuthorizor.java | 19 +-
.../server/security/handler/ZKPermHandler.java | 132 ++--
.../server/security/handler/ZKSecurityTool.java | 16 +-
.../accumulo/server/tables/TableManager.java | 165 +++--
.../server/tablets/UniqueNameAllocator.java | 26 +-
.../tabletserver/LargestFirstMemoryManager.java | 37 +-
.../server/tabletserver/MemoryManager.java | 14 +-
.../accumulo/server/util/AccumuloStatus.java | 3 +-
.../org/apache/accumulo/server/util/Admin.java | 96 ++-
.../apache/accumulo/server/util/ChangeSecret.java | 28 +-
.../server/util/CheckForMetadataProblems.java | 18 +-
.../accumulo/server/util/CleanZookeeper.java | 10 +-
.../apache/accumulo/server/util/DefaultMap.java | 3 +-
.../apache/accumulo/server/util/DumpZookeeper.java | 12 +-
.../accumulo/server/util/FileSystemMonitor.java | 6 +-
.../org/apache/accumulo/server/util/FileUtil.java | 148 ++--
.../accumulo/server/util/FindOfflineTablets.java | 18 +-
.../apache/accumulo/server/util/ListInstances.java | 23 +-
.../accumulo/server/util/ListVolumesUsed.java | 18 +-
.../apache/accumulo/server/util/LocalityCheck.java | 9 +-
.../accumulo/server/util/LoginProperties.java | 12 +-
.../accumulo/server/util/MasterMetadataUtil.java | 94 ++-
.../accumulo/server/util/MetadataTableUtil.java | 282 +++++---
.../accumulo/server/util/NamespacePropUtil.java | 21 +-
.../apache/accumulo/server/util/RandomWriter.java | 6 +-
.../accumulo/server/util/RandomizeVolumes.java | 17 +-
.../server/util/RemoveEntriesForMissingFiles.java | 17 +-
.../accumulo/server/util/ReplicationTableUtil.java | 27 +-
.../accumulo/server/util/RestoreZookeeper.java | 6 +-
.../accumulo/server/util/SendLogToChainsaw.java | 31 +-
.../accumulo/server/util/SystemPropUtil.java | 27 +-
.../accumulo/server/util/TableDiskUsage.java | 18 +-
.../apache/accumulo/server/util/TableInfoUtil.java | 3 +-
.../apache/accumulo/server/util/TablePropUtil.java | 18 +-
.../accumulo/server/util/TabletIterator.java | 32 +-
.../accumulo/server/util/TabletServerLocks.java | 3 +-
.../server/util/VerifyTabletAssignments.java | 22 +-
.../apache/accumulo/server/util/ZooKeeperMain.java | 12 +-
.../org/apache/accumulo/server/util/ZooZap.java | 6 +-
.../server/util/time/BaseRelativeTime.java | 3 +-
.../accumulo/server/util/time/SimpleTimer.java | 21 +-
.../server/watcher/Log4jConfiguration.java | 9 +-
.../server/watcher/MonitorLog4jWatcher.java | 3 +-
.../server/zookeeper/DistributedWorkQueue.java | 21 +-
.../server/zookeeper/TransactionWatcher.java | 21 +-
.../apache/accumulo/server/zookeeper/ZooLock.java | 3 +-
.../accumulo/server/zookeeper/ZooQueueLock.java | 3 +-
.../accumulo/server/zookeeper/ZooReaderWriter.java | 3 +-
.../server/zookeeper/ZooReaderWriterFactory.java | 6 +-
.../accumulo/server/AccumuloServerContextTest.java | 42 +-
.../org/apache/accumulo/server/AccumuloTest.java | 15 +-
.../accumulo/server/ServerConstantsTest.java | 51 +-
.../accumulo/server/client/BulkImporterTest.java | 52 +-
.../server/conf/NamespaceConfigurationTest.java | 29 +-
.../conf/ServerConfigurationFactoryTest.java | 3 +-
.../server/conf/TableConfigurationTest.java | 24 +-
.../constraints/MetadataConstraintsTest.java | 72 +-
.../org/apache/accumulo/server/fs/FileRefTest.java | 72 +-
.../apache/accumulo/server/fs/FileTypeTest.java | 75 +-
.../apache/accumulo/server/fs/ViewFSUtilsTest.java | 41 +-
.../accumulo/server/fs/VolumeManagerImplTest.java | 9 +-
.../apache/accumulo/server/fs/VolumeUtilTest.java | 153 ++--
.../accumulo/server/init/InitializeTest.java | 12 +-
.../iterators/MetadataBulkLoadFilterTest.java | 31 +-
.../accumulo/server/master/LiveTServerSetTest.java | 6 +-
.../BaseHostRegexTableLoadBalancerTest.java | 90 ++-
.../master/balancer/ChaoticLoadBalancerTest.java | 18 +-
.../master/balancer/DefaultLoadBalancerTest.java | 29 +-
.../server/master/balancer/GroupBalancerTest.java | 56 +-
...tRegexTableLoadBalancerReconfigurationTest.java | 24 +-
.../balancer/HostRegexTableLoadBalancerTest.java | 74 +-
.../master/balancer/TableLoadBalancerTest.java | 26 +-
.../server/master/state/MergeInfoTest.java | 3 +-
.../server/problems/ProblemReportTest.java | 36 +-
.../server/replication/ReplicationUtilTest.java | 6 +-
.../server/replication/StatusCombinerTest.java | 114 +--
.../server/replication/StatusUtilTest.java | 15 +-
.../replication/ZooKeeperInitializationTest.java | 12 +-
.../apache/accumulo/server/rpc/RpcWrapperTest.java | 21 +-
.../server/rpc/SaslDigestCallbackHandlerTest.java | 15 +-
.../server/rpc/SaslServerConnectionParamsTest.java | 3 +-
.../TCredentialsUpdatingInvocationHandlerTest.java | 63 +-
.../accumulo/server/rpc/ThriftServerTypeTest.java | 3 +-
.../server/security/SystemCredentialsTest.java | 27 +-
.../server/security/UserImpersonationTest.java | 18 +-
.../security/delegation/AuthenticationKeyTest.java | 9 +-
.../AuthenticationTokenKeyManagerTest.java | 32 +-
.../AuthenticationTokenSecretManagerTest.java | 99 ++-
.../ZooAuthenticationKeyDistributorTest.java | 74 +-
.../ZooAuthenticationKeyWatcherTest.java | 68 +-
.../security/handler/ZKAuthenticatorTest.java | 6 +-
.../IllegalTableTransitionExceptionTest.java | 6 +-
.../org/apache/accumulo/server/util/AdminTest.java | 23 +-
.../accumulo/server/util/DefaultMapTest.java | 3 +-
.../server/util/FileSystemMonitorTest.java | 33 +-
.../apache/accumulo/server/util/FileUtilTest.java | 15 +-
.../server/util/ReplicationTableUtilTest.java | 21 +-
.../accumulo/server/util/TServerUtilsTest.java | 41 +-
.../server/util/time/BaseRelativeTimeTest.java | 3 +-
.../accumulo/gc/GarbageCollectWriteAheadLogs.java | 43 +-
.../accumulo/gc/GarbageCollectionAlgorithm.java | 60 +-
.../accumulo/gc/GarbageCollectionEnvironment.java | 37 +-
.../apache/accumulo/gc/SimpleGarbageCollector.java | 154 ++--
.../replication/CloseWriteAheadLogReferences.java | 30 +-
.../gc/GarbageCollectWriteAheadLogsTest.java | 60 +-
.../apache/accumulo/gc/GarbageCollectionTest.java | 47 +-
.../accumulo/gc/SimpleGarbageCollectorTest.java | 30 +-
.../apache/accumulo/master/FateServiceHandler.java | 248 ++++---
.../java/org/apache/accumulo/master/Master.java | 313 ++++++---
.../master/MasterClientServiceHandler.java | 152 ++--
.../org/apache/accumulo/master/MasterTime.java | 21 +-
.../apache/accumulo/master/TabletGroupWatcher.java | 150 ++--
.../master/metrics/Metrics2ReplicationMetrics.java | 23 +-
.../master/metrics/ReplicationMetrics.java | 4 +-
.../master/metrics/ReplicationMetricsMBean.java | 14 +-
.../accumulo/master/recovery/RecoveryManager.java | 34 +-
.../DistributedWorkQueueWorkAssigner.java | 31 +-
.../master/replication/FinishedWorkUpdater.java | 32 +-
.../replication/MasterReplicationCoordinator.java | 23 +-
.../RemoveCompleteReplicationRecords.java | 30 +-
.../master/replication/ReplicationDriver.java | 6 +-
.../master/replication/SequentialWorkAssigner.java | 30 +-
.../accumulo/master/replication/StatusMaker.java | 34 +-
.../master/replication/UnorderedWorkAssigner.java | 26 +-
.../accumulo/master/replication/WorkMaker.java | 9 +-
.../apache/accumulo/master/state/MergeStats.java | 55 +-
.../apache/accumulo/master/state/SetGoalState.java | 8 +-
.../accumulo/master/tableOps/BulkImport.java | 31 +-
.../master/tableOps/CancelCompactions.java | 13 +-
.../accumulo/master/tableOps/ChangeTableState.java | 9 +-
.../apache/accumulo/master/tableOps/ChooseDir.java | 6 +-
.../apache/accumulo/master/tableOps/CleanUp.java | 27 +-
.../master/tableOps/CleanUpBulkImport.java | 3 +-
.../accumulo/master/tableOps/CloneMetadata.java | 14 +-
.../accumulo/master/tableOps/ClonePermissions.java | 9 +-
.../accumulo/master/tableOps/CloneTable.java | 6 +-
.../accumulo/master/tableOps/CloneZookeeper.java | 9 +-
.../accumulo/master/tableOps/CompactRange.java | 39 +-
.../accumulo/master/tableOps/CompactionDriver.java | 28 +-
.../accumulo/master/tableOps/CopyFailed.java | 16 +-
.../accumulo/master/tableOps/CreateImportDir.java | 3 +-
.../accumulo/master/tableOps/CreateNamespace.java | 3 +-
.../accumulo/master/tableOps/CreateTable.java | 3 +-
.../accumulo/master/tableOps/DeleteTable.java | 3 +-
.../accumulo/master/tableOps/ExportTable.java | 3 +-
.../master/tableOps/FinishCancelCompaction.java | 3 +-
.../accumulo/master/tableOps/FinishCloneTable.java | 9 +-
.../master/tableOps/FinishCreateNamespace.java | 3 +-
.../master/tableOps/FinishCreateTable.java | 3 +-
.../master/tableOps/FinishImportTable.java | 3 +-
.../master/tableOps/ImportPopulateZookeeper.java | 12 +-
.../master/tableOps/ImportSetupPermissions.java | 6 +-
.../accumulo/master/tableOps/ImportTable.java | 9 +-
.../apache/accumulo/master/tableOps/LoadFiles.java | 18 +-
.../master/tableOps/MapImportFileNames.java | 3 +-
.../master/tableOps/MoveExportedFiles.java | 6 +-
.../accumulo/master/tableOps/PopulateMetadata.java | 6 +-
.../master/tableOps/PopulateMetadataTable.java | 46 +-
.../master/tableOps/PopulateZookeeper.java | 6 +-
.../tableOps/PopulateZookeeperWithNamespace.java | 12 +-
.../accumulo/master/tableOps/RenameNamespace.java | 10 +-
.../accumulo/master/tableOps/RenameTable.java | 21 +-
.../master/tableOps/SetupNamespacePermissions.java | 3 +-
.../accumulo/master/tableOps/SetupPermissions.java | 6 +-
.../accumulo/master/tableOps/TableRangeOp.java | 10 +-
.../accumulo/master/tableOps/TableRangeOpWait.java | 22 +-
.../org/apache/accumulo/master/tableOps/Utils.java | 75 +-
.../accumulo/master/tableOps/WriteExportFiles.java | 59 +-
.../master/tserverOps/ShutdownTServer.java | 6 +-
.../org/apache/accumulo/master/util/FateAdmin.java | 4 +-
.../accumulo/master/util/TableValidators.java | 10 +-
.../metrics/Metrics2ReplicationMetricsTest.java | 3 +-
...DistributedWorkQueueWorkAssignerHelperTest.java | 3 +-
.../replication/SequentialWorkAssignerTest.java | 24 +-
.../replication/UnorderedWorkAssignerTest.java | 20 +-
.../accumulo/master/replication/WorkMakerTest.java | 6 +-
.../master/state/RootTabletStateStoreTest.java | 3 +-
.../accumulo/master/tableOps/ImportTableTest.java | 9 +-
.../apache/accumulo/monitor/EmbeddedWebServer.java | 9 +-
.../java/org/apache/accumulo/monitor/Monitor.java | 85 ++-
.../apache/accumulo/monitor/ZooKeeperStatus.java | 6 +-
.../accumulo/monitor/servlets/BasicServlet.java | 77 +-
.../monitor/servlets/BulkImportServlet.java | 12 +-
.../accumulo/monitor/servlets/DefaultServlet.java | 47 +-
.../accumulo/monitor/servlets/GcStatusServlet.java | 23 +-
.../accumulo/monitor/servlets/JSONServlet.java | 12 +-
.../accumulo/monitor/servlets/LogServlet.java | 13 +-
.../accumulo/monitor/servlets/MasterServlet.java | 77 +-
.../monitor/servlets/OperationServlet.java | 18 +-
.../accumulo/monitor/servlets/ProblemServlet.java | 34 +-
.../monitor/servlets/ReplicationServlet.java | 28 +-
.../accumulo/monitor/servlets/ScanServlet.java | 9 +-
.../accumulo/monitor/servlets/ShellServlet.java | 30 +-
.../accumulo/monitor/servlets/TServersServlet.java | 146 ++--
.../accumulo/monitor/servlets/TablesServlet.java | 55 +-
.../accumulo/monitor/servlets/VisServlet.java | 53 +-
.../accumulo/monitor/servlets/XMLServlet.java | 32 +-
.../accumulo/monitor/servlets/trace/Basic.java | 21 +-
.../accumulo/monitor/servlets/trace/ListType.java | 6 +-
.../accumulo/monitor/servlets/trace/ShowTrace.java | 25 +-
.../monitor/servlets/trace/ShowTraceLinkType.java | 3 +-
.../accumulo/monitor/servlets/trace/Summary.java | 13 +-
.../org/apache/accumulo/monitor/util/Table.java | 41 +-
.../monitor/util/celltypes/CompactionsType.java | 3 +-
.../monitor/util/celltypes/DateTimeType.java | 3 +-
.../monitor/util/celltypes/NumberType.java | 12 +-
.../monitor/util/celltypes/TableLinkType.java | 3 +-
.../accumulo/monitor/ShowTraceLinkTypeTest.java | 3 +-
.../accumulo/monitor/ZooKeeperStatusTest.java | 3 +-
.../apache/accumulo/tracer/AsyncSpanReceiver.java | 6 +-
.../apache/accumulo/tracer/SendSpansViaThrift.java | 3 +-
.../java/org/apache/accumulo/tracer/SpanTree.java | 3 +-
.../java/org/apache/accumulo/tracer/TraceDump.java | 19 +-
.../org/apache/accumulo/tracer/TraceFormatter.java | 6 +-
.../org/apache/accumulo/tracer/TraceServer.java | 89 ++-
.../apache/accumulo/tracer/TraceTableStats.java | 17 +-
.../org/apache/accumulo/tracer/ZooTraceClient.java | 6 +-
.../accumulo/tracer/AsyncSpanReceiverTest.java | 9 +-
.../org/apache/accumulo/tracer/TracerTest.java | 16 +-
.../apache/accumulo/tracer/ZooTraceClientTest.java | 12 +-
.../accumulo/tserver/ActiveAssignmentRunnable.java | 9 +-
.../apache/accumulo/tserver/CompactionQueue.java | 6 +-
.../accumulo/tserver/ConditionCheckerContext.java | 30 +-
.../accumulo/tserver/ConditionalMutationSet.java | 15 +-
.../org/apache/accumulo/tserver/FileManager.java | 59 +-
.../org/apache/accumulo/tserver/InMemoryMap.java | 79 ++-
.../java/org/apache/accumulo/tserver/MemKey.java | 3 +-
.../accumulo/tserver/MemKeyConversionIterator.java | 3 +-
.../java/org/apache/accumulo/tserver/MemValue.java | 3 +-
.../org/apache/accumulo/tserver/NativeMap.java | 93 ++-
.../java/org/apache/accumulo/tserver/RowLocks.java | 6 +-
.../tserver/TConstraintViolationException.java | 3 +-
.../tserver/TabletIteratorEnvironment.java | 32 +-
.../org/apache/accumulo/tserver/TabletServer.java | 749 +++++++++++++-------
.../tserver/TabletServerResourceManager.java | 107 ++-
.../accumulo/tserver/TservConstraintEnv.java | 3 +-
.../org/apache/accumulo/tserver/WriteTracker.java | 7 +-
.../tserver/compaction/CompactionPlan.java | 7 +-
.../tserver/compaction/CompactionStrategy.java | 49 +-
.../compaction/DefaultCompactionStrategy.java | 3 +-
.../compaction/EverythingCompactionStrategy.java | 3 +-
.../tserver/compaction/MajorCompactionReason.java | 5 +-
.../tserver/compaction/MajorCompactionRequest.java | 6 +-
.../strategies/ConfigurableCompactionStrategy.java | 24 +-
.../tserver/constraints/ConstraintChecker.java | 15 +-
.../tserver/data/ServerConditionalMutation.java | 3 +-
.../org/apache/accumulo/tserver/log/DfsLogger.java | 92 ++-
.../org/apache/accumulo/tserver/log/LogSorter.java | 22 +-
.../apache/accumulo/tserver/log/MultiReader.java | 8 +-
.../accumulo/tserver/log/SortedLogRecovery.java | 41 +-
.../accumulo/tserver/log/TabletServerLogger.java | 69 +-
.../apache/accumulo/tserver/logger/LogEvents.java | 7 +-
.../apache/accumulo/tserver/logger/LogFileKey.java | 6 +-
.../accumulo/tserver/logger/LogFileValue.java | 8 +-
.../apache/accumulo/tserver/logger/LogReader.java | 6 +-
.../tserver/mastermessage/MasterMessage.java | 3 +-
.../tserver/mastermessage/SplitReportMessage.java | 6 +-
.../tserver/mastermessage/TabletStatusMessage.java | 3 +-
.../metrics/Metrics2TabletServerMetrics.java | 46 +-
.../metrics/Metrics2TabletServerMinCMetrics.java | 6 +-
.../metrics/Metrics2TabletServerScanMetrics.java | 6 +-
.../metrics/Metrics2TabletServerUpdateMetrics.java | 30 +-
.../tserver/metrics/TabletServerMBeanImpl.java | 4 +-
.../metrics/TabletServerMetricsFactory.java | 3 +-
.../tserver/metrics/TabletServerMinCMetrics.java | 10 +-
.../tserver/metrics/TabletServerScanMetrics.java | 10 +-
.../tserver/metrics/TabletServerUpdateMetrics.java | 11 +-
.../tserver/replication/AccumuloReplicaSystem.java | 211 ++++--
.../BatchWriterReplicationReplayer.java | 41 +-
.../tserver/replication/ReplicationProcessor.java | 21 +-
.../replication/ReplicationServicerHandler.java | 23 +-
.../tserver/replication/ReplicationWorker.java | 9 +-
.../apache/accumulo/tserver/scan/LookupTask.java | 24 +-
.../accumulo/tserver/scan/NextBatchTask.java | 17 +-
.../org/apache/accumulo/tserver/scan/ScanTask.java | 9 +-
.../tserver/session/ConditionalSession.java | 3 +-
.../accumulo/tserver/session/MultiScanSession.java | 6 +-
.../accumulo/tserver/session/ScanSession.java | 5 +-
.../accumulo/tserver/session/SessionManager.java | 31 +-
.../tserver/tablet/BulkImportCacheCleaner.java | 3 +-
.../accumulo/tserver/tablet/CompactionInfo.java | 9 +-
.../accumulo/tserver/tablet/CompactionRunner.java | 3 +-
.../accumulo/tserver/tablet/CompactionWatcher.java | 14 +-
.../apache/accumulo/tserver/tablet/Compactor.java | 50 +-
.../accumulo/tserver/tablet/CountingIterator.java | 3 +-
.../accumulo/tserver/tablet/DatafileManager.java | 117 ++--
.../tserver/tablet/MinorCompactionTask.java | 23 +-
.../accumulo/tserver/tablet/MinorCompactor.java | 68 +-
.../apache/accumulo/tserver/tablet/RootFiles.java | 30 +-
.../accumulo/tserver/tablet/ScanDataSource.java | 53 +-
.../accumulo/tserver/tablet/ScanOptions.java | 6 +-
.../apache/accumulo/tserver/tablet/Scanner.java | 22 +-
.../org/apache/accumulo/tserver/tablet/Tablet.java | 552 +++++++++------
.../apache/accumulo/tserver/tablet/TabletData.java | 13 +-
.../accumulo/tserver/tablet/TabletMemory.java | 3 +-
.../accumulo/tserver/CheckTabletMetadataTest.java | 24 +-
.../apache/accumulo/tserver/InMemoryMapTest.java | 55 +-
.../tserver/LargestFirstMemoryManagerTest.java | 82 ++-
.../tserver/TabletServerSyncCheckTest.java | 12 +-
.../accumulo/tserver/TservConstraintEnvTest.java | 9 +-
.../compaction/DefaultCompactionStrategyTest.java | 24 +-
.../SizeLimitCompactionStrategyTest.java | 12 +-
.../ConfigurableCompactionStrategyTest.java | 15 +-
.../apache/accumulo/tserver/log/DfsLoggerTest.java | 21 +-
.../accumulo/tserver/log/MultiReaderTest.java | 8 +-
.../tserver/log/SortedLogRecoveryTest.java | 215 ++++--
.../tserver/log/TestUpgradePathForWALogs.java | 16 +-
.../accumulo/tserver/logger/LogFileTest.java | 11 +-
.../replication/AccumuloReplicaSystemTest.java | 66 +-
.../BatchWriterReplicationReplayerTest.java | 6 +-
.../replication/ReplicationProcessorTest.java | 6 +-
.../tserver/tablet/DatafileManagerTest.java | 27 +-
.../accumulo/tserver/tablet/RootFilesTest.java | 12 +-
.../apache/accumulo/tserver/tablet/TabletTest.java | 12 +-
.../main/java/org/apache/accumulo/shell/Shell.java | 239 ++++---
.../org/apache/accumulo/shell/ShellCompletor.java | 3 +-
.../org/apache/accumulo/shell/ShellOptionsJC.java | 60 +-
.../java/org/apache/accumulo/shell/ShellUtil.java | 6 +-
.../accumulo/shell/commands/AboutCommand.java | 3 +-
.../shell/commands/ActiveCompactionIterator.java | 15 +-
.../shell/commands/ActiveScanIterator.java | 15 +-
.../accumulo/shell/commands/AddAuthsCommand.java | 12 +-
.../accumulo/shell/commands/AddSplitsCommand.java | 9 +-
.../shell/commands/AuthenticateCommand.java | 9 +-
.../shell/commands/BulkImportListIterator.java | 3 +-
.../accumulo/shell/commands/ClearCommand.java | 3 +-
.../accumulo/shell/commands/CloneTableCommand.java | 20 +-
.../accumulo/shell/commands/CompactCommand.java | 47 +-
.../accumulo/shell/commands/ConfigCommand.java | 76 +-
.../accumulo/shell/commands/ConstraintCommand.java | 40 +-
.../shell/commands/CreateNamespaceCommand.java | 12 +-
.../shell/commands/CreateTableCommand.java | 48 +-
.../accumulo/shell/commands/CreateUserCommand.java | 11 +-
.../apache/accumulo/shell/commands/DUCommand.java | 19 +-
.../accumulo/shell/commands/DebugCommand.java | 12 +-
.../shell/commands/DeleteAuthsCommand.java | 9 +-
.../accumulo/shell/commands/DeleteCommand.java | 8 +-
.../accumulo/shell/commands/DeleteIterCommand.java | 27 +-
.../accumulo/shell/commands/DeleteManyCommand.java | 14 +-
.../shell/commands/DeleteNamespaceCommand.java | 12 +-
.../accumulo/shell/commands/DeleteRowsCommand.java | 9 +-
.../shell/commands/DeleteScanIterCommand.java | 15 +-
.../shell/commands/DeleteShellIterCommand.java | 6 +-
.../shell/commands/DeleteTableCommand.java | 3 +-
.../accumulo/shell/commands/DropUserCommand.java | 12 +-
.../accumulo/shell/commands/EGrepCommand.java | 9 +-
.../accumulo/shell/commands/ExecfileCommand.java | 6 +-
.../shell/commands/ExportTableCommand.java | 8 +-
.../accumulo/shell/commands/FateCommand.java | 28 +-
.../accumulo/shell/commands/FlushCommand.java | 6 +-
.../accumulo/shell/commands/FormatterCommand.java | 19 +-
.../accumulo/shell/commands/GetAuthsCommand.java | 6 +-
.../accumulo/shell/commands/GetGroupsCommand.java | 9 +-
.../accumulo/shell/commands/GetSplitsCommand.java | 33 +-
.../accumulo/shell/commands/GrantCommand.java | 37 +-
.../accumulo/shell/commands/GrepCommand.java | 12 +-
.../accumulo/shell/commands/HelpCommand.java | 21 +-
.../accumulo/shell/commands/HiddenCommand.java | 11 +-
.../accumulo/shell/commands/HistoryCommand.java | 3 +-
.../shell/commands/ImportDirectoryCommand.java | 7 +-
.../shell/commands/ImportTableCommand.java | 5 +-
.../accumulo/shell/commands/InsertCommand.java | 17 +-
.../shell/commands/InterpreterCommand.java | 6 +-
.../accumulo/shell/commands/ListBulkCommand.java | 6 +-
.../shell/commands/ListCompactionsCommand.java | 3 +-
.../accumulo/shell/commands/ListIterCommand.java | 39 +-
.../accumulo/shell/commands/ListScansCommand.java | 3 +-
.../shell/commands/ListShellIterCommand.java | 12 +-
.../accumulo/shell/commands/MaxRowCommand.java | 7 +-
.../accumulo/shell/commands/MergeCommand.java | 15 +-
.../commands/NamespacePermissionsCommand.java | 3 +-
.../accumulo/shell/commands/NamespacesCommand.java | 36 +-
.../accumulo/shell/commands/NoTableCommand.java | 3 +-
.../accumulo/shell/commands/OfflineCommand.java | 6 +-
.../accumulo/shell/commands/OnlineCommand.java | 6 +-
.../apache/accumulo/shell/commands/OptUtil.java | 16 +-
.../accumulo/shell/commands/PasswdCommand.java | 15 +-
.../accumulo/shell/commands/PingCommand.java | 3 +-
.../shell/commands/QuotedStringTokenizer.java | 13 +-
.../shell/commands/RenameNamespaceCommand.java | 8 +-
.../shell/commands/RenameTableCommand.java | 8 +-
.../accumulo/shell/commands/RevokeCommand.java | 37 +-
.../accumulo/shell/commands/ScanCommand.java | 130 ++--
.../accumulo/shell/commands/ScriptCommand.java | 6 +-
.../accumulo/shell/commands/SetAuthsCommand.java | 12 +-
.../accumulo/shell/commands/SetGroupsCommand.java | 3 +-
.../accumulo/shell/commands/SetIterCommand.java | 98 ++-
.../shell/commands/SetScanIterCommand.java | 18 +-
.../shell/commands/SetShellIterCommand.java | 11 +-
.../commands/ShellPluginConfigurationCommand.java | 40 +-
.../accumulo/shell/commands/SleepCommand.java | 3 +-
.../shell/commands/SystemPermissionsCommand.java | 3 +-
.../accumulo/shell/commands/TableCommand.java | 7 +-
.../accumulo/shell/commands/TableOperation.java | 21 +-
.../shell/commands/TablePermissionsCommand.java | 3 +-
.../accumulo/shell/commands/TablesCommand.java | 38 +-
.../accumulo/shell/commands/TraceCommand.java | 15 +-
.../accumulo/shell/commands/UserCommand.java | 6 +-
.../shell/commands/UserPermissionsCommand.java | 12 +-
.../accumulo/shell/commands/UsersCommand.java | 3 +-
.../accumulo/shell/commands/WhoAmICommand.java | 3 +-
.../accumulo/shell/format/DeleterFormatter.java | 9 +-
.../org/apache/accumulo/shell/mock/MockShell.java | 8 +-
.../org/apache/accumulo/shell/ShellConfigTest.java | 14 +-
.../accumulo/shell/ShellSetInstanceTest.java | 40 +-
.../java/org/apache/accumulo/shell/ShellTest.java | 43 +-
.../org/apache/accumulo/shell/ShellUtilTest.java | 6 +-
.../shell/commands/CompactCommandTest.java | 3 +-
.../shell/commands/DeleteAuthsCommandTest.java | 9 +-
.../shell/commands/DeleteManyCommandTest.java | 3 +-
.../shell/commands/DeleteRowsCommandTest.java | 3 +-
.../shell/commands/DeleteTableCommandTest.java | 3 +-
.../accumulo/shell/commands/FlushCommandTest.java | 3 +-
.../shell/commands/HistoryCommandTest.java | 6 +-
.../accumulo/shell/commands/MergeCommandTest.java | 3 +-
.../accumulo/shell/commands/ScanCommandTest.java | 3 +-
.../shell/commands/SetIterCommandTest.java | 24 +-
.../shell/format/DeleterFormatterTest.java | 18 +-
.../main/java/org/apache/accumulo/start/Main.java | 51 +-
.../java/org/apache/accumulo/start/TestMain.java | 5 +-
.../start/classloader/AccumuloClassLoader.java | 34 +-
.../vfs/AccumuloReloadingVFSClassLoader.java | 17 +-
.../classloader/vfs/AccumuloVFSClassLoader.java | 54 +-
.../start/classloader/vfs/ContextManager.java | 9 +-
.../vfs/PostDelegatingVFSClassLoader.java | 6 +-
.../classloader/vfs/UniqueFileReplicator.java | 3 +-
.../accumulo/start/spi/KeywordExecutable.java | 18 +-
.../vfs/AccumuloReloadingVFSClassLoaderTest.java | 76 +-
.../vfs/AccumuloVFSClassLoaderTest.java | 45 +-
.../start/classloader/vfs/ContextManagerTest.java | 12 +-
.../accumulo/start/test/AccumuloDFSBase.java | 10 +-
.../accumulo/harness/AccumuloClusterHarness.java | 74 +-
.../apache/accumulo/harness/AccumuloITBase.java | 28 +-
.../harness/MiniClusterConfigurationCallback.java | 3 +-
.../accumulo/harness/MiniClusterHarness.java | 108 ++-
.../accumulo/harness/SharedMiniClusterBase.java | 55 +-
.../org/apache/accumulo/harness/TestingKdc.java | 9 +-
.../conf/AccumuloClusterPropertyConfiguration.java | 18 +-
.../conf/AccumuloMiniClusterConfiguration.java | 6 +-
.../StandaloneAccumuloClusterConfiguration.java | 51 +-
.../accumulo/test/ArbitraryTablePropertiesIT.java | 12 +-
.../org/apache/accumulo/test/AuditMessageIT.java | 256 ++++---
.../accumulo/test/BadDeleteMarkersCreatedIT.java | 6 +-
.../accumulo/test/BatchWriterInTabletServerIT.java | 16 +-
.../apache/accumulo/test/BatchWriterIterator.java | 50 +-
.../apache/accumulo/test/BulkImportDirectory.java | 15 +-
.../accumulo/test/BulkImportMonitoringIT.java | 6 +-
.../accumulo/test/BulkImportSequentialRowsIT.java | 12 +-
.../java/org/apache/accumulo/test/CleanWalIT.java | 6 +-
.../apache/accumulo/test/ClientSideIteratorIT.java | 6 +-
.../java/org/apache/accumulo/test/CloneIT.java | 30 +-
.../accumulo/test/CompactionRateLimitingIT.java | 10 +-
.../apache/accumulo/test/ConditionalWriterIT.java | 303 +++++---
.../test/ConfigurableMajorCompactionIT.java | 3 +-
.../org/apache/accumulo/test/CreateRFiles.java | 11 +-
.../apache/accumulo/test/CreateRandomRFile.java | 3 +-
.../test/CreateTableWithNewTableConfigIT.java | 25 +-
.../accumulo/test/DetectDeadTabletServersIT.java | 3 +-
.../org/apache/accumulo/test/DumpConfigIT.java | 10 +-
.../accumulo/test/EstimateInMemMapOverhead.java | 6 +-
.../org/apache/accumulo/test/ExistingMacIT.java | 19 +-
.../accumulo/test/FaultyConditionalWriter.java | 6 +-
.../org/apache/accumulo/test/FileArchiveIT.java | 33 +-
.../java/org/apache/accumulo/test/FindMaxIT.java | 30 +-
.../apache/accumulo/test/GarbageCollectWALIT.java | 3 +-
.../accumulo/test/GenerateSequentialRFile.java | 6 +-
.../apache/accumulo/test/GetFileInfoBulkIT.java | 3 +-
.../org/apache/accumulo/test/GetMasterStats.java | 3 +-
.../org/apache/accumulo/test/HardListIterator.java | 30 +-
.../org/apache/accumulo/test/IMMLGBenchmark.java | 19 +-
.../org/apache/accumulo/test/ImportExportIT.java | 27 +-
.../org/apache/accumulo/test/InMemoryMapIT.java | 81 ++-
.../accumulo/test/InMemoryMapMemoryUsageTest.java | 3 +-
.../accumulo/test/InterruptibleScannersIT.java | 6 +-
.../accumulo/test/IsolationAndDeepCopyIT.java | 9 +-
.../apache/accumulo/test/KeyValueEqualityIT.java | 10 +-
.../org/apache/accumulo/test/LargeSplitRowIT.java | 48 +-
.../java/org/apache/accumulo/test/LocatorIT.java | 16 +-
.../java/org/apache/accumulo/test/ManySplitIT.java | 3 +-
.../test/MasterRepairsDualAssignmentIT.java | 9 +-
.../org/apache/accumulo/test/MemoryUsageTest.java | 8 +-
.../accumulo/test/MetaConstraintRetryIT.java | 6 +-
.../apache/accumulo/test/MetaGetsReadersIT.java | 3 +-
.../java/org/apache/accumulo/test/MetaSplitIT.java | 9 +-
.../test/MissingWalHeaderCompletesRecoveryIT.java | 33 +-
.../accumulo/test/MultiTableBatchWriterIT.java | 15 +-
.../apache/accumulo/test/MultiTableRecoveryIT.java | 3 +-
.../org/apache/accumulo/test/NamespacesIT.java | 164 +++--
.../accumulo/test/NativeMapConcurrencyTest.java | 9 +-
.../accumulo/test/NativeMapPerformanceTest.java | 18 +-
.../apache/accumulo/test/NativeMapStressTest.java | 29 +-
.../org/apache/accumulo/test/NullBatchWriter.java | 3 +-
.../org/apache/accumulo/test/OrIteratorIT.java | 21 +-
.../apache/accumulo/test/QueryMetadataTable.java | 6 +-
.../accumulo/test/RewriteTabletDirectoriesIT.java | 24 +-
.../java/org/apache/accumulo/test/SampleIT.java | 53 +-
.../org/apache/accumulo/test/ShellConfigIT.java | 18 +-
.../org/apache/accumulo/test/ShellServerIT.java | 217 +++---
.../org/apache/accumulo/test/SplitRecoveryIT.java | 9 +-
.../accumulo/test/TableConfigurationUpdateIT.java | 10 +-
.../apache/accumulo/test/TableOperationsIT.java | 50 +-
.../org/apache/accumulo/test/TestBinaryRows.java | 37 +-
.../java/org/apache/accumulo/test/TestIngest.java | 49 +-
.../apache/accumulo/test/TestMultiTableIngest.java | 9 +-
.../apache/accumulo/test/TestRandomDeletes.java | 19 +-
.../apache/accumulo/test/TextMemoryUsageTest.java | 4 +-
.../org/apache/accumulo/test/TotalQueuedIT.java | 17 +-
.../test/TracerRecoversAfterOfflineTableIT.java | 3 +-
.../apache/accumulo/test/TransportCachingIT.java | 12 +-
.../java/org/apache/accumulo/test/UnusedWALIT.java | 6 +-
.../accumulo/test/UserCompactionStrategyIT.java | 57 +-
.../java/org/apache/accumulo/test/UsersIT.java | 9 +-
.../org/apache/accumulo/test/VerifyIngest.java | 39 +-
.../accumulo/test/VerifySerialRecoveryIT.java | 3 +-
.../org/apache/accumulo/test/VolumeChooserIT.java | 54 +-
.../java/org/apache/accumulo/test/VolumeIT.java | 77 +-
.../org/apache/accumulo/test/WaitForBalanceIT.java | 9 +-
.../org/apache/accumulo/test/WrongTabletTest.java | 3 +-
.../org/apache/accumulo/test/YieldScannersIT.java | 30 +-
.../test/categories/MiniClusterOnlyTests.java | 3 +-
.../accumulo/test/categories/PerformanceTests.java | 8 +-
.../categories/StandaloneCapableClusterTests.java | 4 +-
.../accumulo/test/categories/SunnyDayTests.java | 4 +-
.../accumulo/test/categories/package-info.java | 1 -
.../test/continuous/ContinuousBatchWalker.java | 12 +-
.../accumulo/test/continuous/ContinuousIngest.java | 41 +-
.../accumulo/test/continuous/ContinuousMoru.java | 29 +-
.../accumulo/test/continuous/ContinuousOpts.java | 15 +-
.../accumulo/test/continuous/ContinuousQuery.java | 6 +-
.../test/continuous/ContinuousScanner.java | 9 +-
.../test/continuous/ContinuousStatsCollector.java | 31 +-
.../accumulo/test/continuous/ContinuousUtil.java | 6 +-
.../accumulo/test/continuous/ContinuousVerify.java | 33 +-
.../accumulo/test/continuous/ContinuousWalk.java | 3 +-
.../apache/accumulo/test/continuous/HistData.java | 3 +-
.../apache/accumulo/test/continuous/Histogram.java | 3 +-
.../test/continuous/PrintScanTimeHistogram.java | 3 +-
.../accumulo/test/continuous/TimeBinner.java | 26 +-
.../test/continuous/UndefinedAnalyzer.java | 39 +-
.../test/examples/simple/dirlist/CountIT.java | 6 +-
.../simple/filedata/ChunkInputFormatIT.java | 42 +-
.../simple/filedata/ChunkInputStreamIT.java | 18 +-
.../accumulo/test/functional/AddSplitIT.java | 3 +-
.../accumulo/test/functional/AuthsIterator.java | 3 +-
.../accumulo/test/functional/BackupMasterIT.java | 3 +-
.../test/functional/BadIteratorMincIT.java | 3 +-
.../functional/BalanceAfterCommsFailureIT.java | 16 +-
.../BalanceInPresenceOfOfflineTableIT.java | 21 +-
.../accumulo/test/functional/BatchScanSplitIT.java | 6 +-
.../test/functional/BatchWriterFlushIT.java | 13 +-
.../accumulo/test/functional/BigRootTabletIT.java | 9 +-
.../accumulo/test/functional/BloomFilterIT.java | 30 +-
.../accumulo/test/functional/BulkFileIT.java | 18 +-
.../apache/accumulo/test/functional/BulkIT.java | 11 +-
.../test/functional/BulkSplitOptimizationIT.java | 9 +-
.../accumulo/test/functional/ClassLoaderIT.java | 9 +-
.../apache/accumulo/test/functional/CleanUpIT.java | 14 +-
.../accumulo/test/functional/CloneTestIT.java | 25 +-
.../accumulo/test/functional/CombinerIT.java | 3 +-
.../accumulo/test/functional/CompactionIT.java | 3 +-
.../accumulo/test/functional/ConcurrencyIT.java | 8 +-
.../test/functional/ConcurrentDeleteTableIT.java | 3 +-
.../test/functional/ConfigurableCompactionIT.java | 21 +-
.../test/functional/ConfigurableMacBase.java | 32 +-
.../accumulo/test/functional/ConstraintIT.java | 66 +-
.../accumulo/test/functional/CreateAndUseIT.java | 3 +-
.../accumulo/test/functional/CredentialsIT.java | 6 +-
.../test/functional/DeleteEverythingIT.java | 6 +-
.../apache/accumulo/test/functional/DeleteIT.java | 15 +-
.../accumulo/test/functional/DeleteRowsIT.java | 10 +-
.../accumulo/test/functional/DropModIter.java | 6 +-
.../accumulo/test/functional/DurabilityIT.java | 3 +-
.../test/functional/DynamicThreadPoolsIT.java | 6 +-
.../accumulo/test/functional/ExamplesIT.java | 213 +++---
.../test/functional/FunctionalTestUtils.java | 33 +-
.../test/functional/GarbageCollectorIT.java | 18 +-
.../test/functional/HalfDeadTServerIT.java | 16 +-
.../accumulo/test/functional/KerberosIT.java | 222 +++---
.../accumulo/test/functional/KerberosProxyIT.java | 187 +++--
.../test/functional/KerberosRenewalIT.java | 44 +-
.../accumulo/test/functional/LargeRowIT.java | 18 +-
.../test/functional/LateLastContactIT.java | 3 +-
.../accumulo/test/functional/LogicalTimeIT.java | 62 +-
.../accumulo/test/functional/MapReduceIT.java | 13 +-
.../test/functional/MasterAssignmentIT.java | 9 +-
.../apache/accumulo/test/functional/MaxOpenIT.java | 9 +-
.../apache/accumulo/test/functional/MergeIT.java | 64 +-
.../test/functional/MetadataMaxFilesIT.java | 3 +-
.../accumulo/test/functional/MetadataSplitIT.java | 3 +-
.../accumulo/test/functional/MonitorLoggingIT.java | 15 +-
.../accumulo/test/functional/MonitorSslIT.java | 30 +-
.../accumulo/test/functional/NativeMapIT.java | 47 +-
.../accumulo/test/functional/PermissionsIT.java | 197 ++++--
.../accumulo/test/functional/ReadWriteIT.java | 136 ++--
.../test/functional/RecoveryWithEmptyRFileIT.java | 14 +-
.../test/functional/RegexGroupBalanceIT.java | 19 +-
.../apache/accumulo/test/functional/RestartIT.java | 37 +-
.../accumulo/test/functional/RestartStressIT.java | 8 +-
.../apache/accumulo/test/functional/ScanIdIT.java | 59 +-
.../accumulo/test/functional/ScanIteratorIT.java | 28 +-
.../accumulo/test/functional/ScanRangeIT.java | 18 +-
.../test/functional/ScanSessionTimeOutIT.java | 3 +-
.../accumulo/test/functional/ScannerContextIT.java | 24 +-
.../apache/accumulo/test/functional/ScannerIT.java | 6 +-
.../test/functional/SessionBlockVerifyIT.java | 20 +-
.../test/functional/SessionDurabilityIT.java | 6 +-
.../accumulo/test/functional/ShutdownIT.java | 28 +-
.../test/functional/SimpleBalancerFairnessIT.java | 10 +-
.../accumulo/test/functional/SlowIterator.java | 6 +-
.../test/functional/SparseColumnFamilyIT.java | 3 +-
.../apache/accumulo/test/functional/SplitIT.java | 16 +-
.../accumulo/test/functional/SplitRecoveryIT.java | 75 +-
.../org/apache/accumulo/test/functional/SslIT.java | 13 +-
.../test/functional/TableChangeStateIT.java | 93 ++-
.../apache/accumulo/test/functional/TabletIT.java | 6 +-
.../functional/TabletStateChangeIteratorIT.java | 64 +-
.../apache/accumulo/test/functional/TimeoutIT.java | 3 +-
.../accumulo/test/functional/VisibilityIT.java | 27 +-
.../accumulo/test/functional/WALSunnyDayIT.java | 21 +-
.../test/functional/WatchTheWatchCountIT.java | 7 +-
.../accumulo/test/functional/WriteLotsIT.java | 3 +-
.../accumulo/test/functional/YieldingIterator.java | 30 +-
.../accumulo/test/functional/ZombieTServer.java | 26 +-
.../accumulo/test/functional/ZooCacheIT.java | 6 +-
.../CloseWriteAheadLogReferencesIT.java | 45 +-
.../test/mapred/AccumuloFileOutputFormatIT.java | 21 +-
.../test/mapred/AccumuloInputFormatIT.java | 19 +-
.../mapred/AccumuloMultiTableInputFormatIT.java | 9 +-
.../test/mapred/AccumuloOutputFormatIT.java | 18 +-
.../test/mapred/AccumuloRowInputFormatIT.java | 18 +-
.../apache/accumulo/test/mapred/TokenFileIT.java | 12 +-
.../test/mapreduce/AccumuloFileOutputFormatIT.java | 33 +-
.../test/mapreduce/AccumuloInputFormatIT.java | 78 ++-
.../mapreduce/AccumuloMultiTableInputFormatIT.java | 12 +-
.../test/mapreduce/AccumuloOutputFormatIT.java | 9 +-
.../test/mapreduce/AccumuloRowInputFormatIT.java | 21 +-
.../accumulo/test/mapreduce/TokenFileIT.java | 12 +-
.../apache/accumulo/test/master/MergeStateIT.java | 32 +-
.../accumulo/test/master/SuspendedTabletsIT.java | 47 +-
.../test/mrit/IntegrationTestMapReduce.java | 19 +-
.../accumulo/test/performance/NullTserver.java | 101 ++-
.../test/performance/RollWALPerformanceIT.java | 5 +-
.../performance/metadata/FastBulkImportIT.java | 3 +-
.../metadata/MetadataBatchScanTest.java | 19 +-
.../test/performance/scan/CollectTabletStats.java | 84 ++-
.../accumulo/test/proxy/ProxyDurabilityIT.java | 9 +-
.../accumulo/test/proxy/SimpleProxyBase.java | 531 +++++++++-----
.../accumulo/test/proxy/TestProxyClient.java | 17 +-
.../test/proxy/TestProxyInstanceOperations.java | 10 +-
.../test/proxy/TestProxyNamespaceOperations.java | 40 +-
.../accumulo/test/proxy/TestProxyReadWrite.java | 54 +-
.../test/proxy/TestProxySecurityOperations.java | 26 +-
.../test/proxy/TestProxyTableOperations.java | 24 +-
.../accumulo/test/randomwalk/Environment.java | 24 +-
.../apache/accumulo/test/randomwalk/Framework.java | 9 +-
.../apache/accumulo/test/randomwalk/Module.java | 27 +-
.../org/apache/accumulo/test/randomwalk/Node.java | 3 +-
.../org/apache/accumulo/test/randomwalk/State.java | 3 +-
.../test/randomwalk/bulk/BulkImportTest.java | 20 +-
.../accumulo/test/randomwalk/bulk/BulkPlusOne.java | 16 +-
.../accumulo/test/randomwalk/bulk/Compact.java | 3 +-
.../test/randomwalk/bulk/ConsistencyCheck.java | 6 +-
.../accumulo/test/randomwalk/bulk/Merge.java | 6 +-
.../test/randomwalk/bulk/SelectiveBulkTest.java | 6 +-
.../test/randomwalk/bulk/SelectiveQueueing.java | 3 +-
.../accumulo/test/randomwalk/bulk/Split.java | 3 +-
.../accumulo/test/randomwalk/bulk/Verify.java | 6 +-
.../test/randomwalk/concurrent/Apocalypse.java | 3 +-
.../test/randomwalk/concurrent/BulkImport.java | 15 +-
.../concurrent/ChangeAuthorizations.java | 3 +-
.../randomwalk/concurrent/ChangePermissions.java | 9 +-
.../randomwalk/concurrent/CheckPermission.java | 9 +-
.../test/randomwalk/concurrent/CloneTable.java | 6 +-
.../test/randomwalk/concurrent/Compact.java | 9 +-
.../randomwalk/concurrent/ConcurrentFixture.java | 6 +-
.../test/randomwalk/concurrent/Config.java | 39 +-
.../test/randomwalk/concurrent/IsolatedScan.java | 3 +-
.../accumulo/test/randomwalk/concurrent/Merge.java | 6 +-
.../test/randomwalk/concurrent/Replication.java | 6 +-
.../test/randomwalk/concurrent/Shutdown.java | 3 +-
.../test/randomwalk/concurrent/StartAll.java | 9 +-
.../randomwalk/concurrent/StopTabletServer.java | 6 +-
.../test/randomwalk/conditional/Setup.java | 6 +-
.../test/randomwalk/conditional/Transfer.java | 6 +-
.../test/randomwalk/conditional/Verify.java | 6 +-
.../accumulo/test/randomwalk/image/Commit.java | 3 +-
.../test/randomwalk/image/ImageFixture.java | 6 +-
.../accumulo/test/randomwalk/image/ScanMeta.java | 6 +-
.../accumulo/test/randomwalk/image/Verify.java | 3 +-
.../accumulo/test/randomwalk/image/Write.java | 6 +-
.../test/randomwalk/multitable/CopyTool.java | 15 +-
.../randomwalk/multitable/MultiTableFixture.java | 3 +-
.../test/randomwalk/security/AlterTable.java | 19 +-
.../test/randomwalk/security/AlterTablePerm.java | 26 +-
.../test/randomwalk/security/Authenticate.java | 20 +-
.../test/randomwalk/security/ChangePass.java | 10 +-
.../test/randomwalk/security/CreateTable.java | 13 +-
.../test/randomwalk/security/CreateUser.java | 13 +-
.../test/randomwalk/security/DropTable.java | 10 +-
.../test/randomwalk/security/DropUser.java | 10 +-
.../test/randomwalk/security/SecurityFixture.java | 6 +-
.../test/randomwalk/security/SecurityHelper.java | 9 +-
.../test/randomwalk/security/SetAuths.java | 10 +-
.../accumulo/test/randomwalk/security/TableOp.java | 73 +-
.../test/randomwalk/security/Validate.java | 39 +-
.../test/randomwalk/security/WalkingSecurity.java | 88 ++-
.../test/randomwalk/sequential/BatchVerify.java | 12 +-
.../test/randomwalk/sequential/Commit.java | 3 +-
.../randomwalk/sequential/MapRedVerifyTool.java | 21 +-
.../randomwalk/sequential/SequentialFixture.java | 6 +-
.../accumulo/test/randomwalk/shard/BulkInsert.java | 28 +-
.../accumulo/test/randomwalk/shard/CloneIndex.java | 6 +-
.../test/randomwalk/shard/CompactFilter.java | 12 +-
.../accumulo/test/randomwalk/shard/Delete.java | 3 +-
.../test/randomwalk/shard/DeleteSomeDocs.java | 6 +-
.../accumulo/test/randomwalk/shard/DeleteWord.java | 6 +-
.../test/randomwalk/shard/ExportIndex.java | 31 +-
.../accumulo/test/randomwalk/shard/Grep.java | 14 +-
.../accumulo/test/randomwalk/shard/Insert.java | 17 +-
.../accumulo/test/randomwalk/shard/Merge.java | 3 +-
.../accumulo/test/randomwalk/shard/Reindex.java | 3 +-
.../accumulo/test/randomwalk/shard/Search.java | 9 +-
.../test/randomwalk/shard/ShardFixture.java | 12 +-
.../accumulo/test/randomwalk/shard/Split.java | 3 +-
.../test/randomwalk/shard/VerifyIndex.java | 9 +-
.../test/replication/CyclicReplicationIT.java | 88 ++-
.../test/replication/FinishedWorkUpdaterIT.java | 21 +-
...GarbageCollectorCommunicatesWithTServersIT.java | 85 ++-
.../test/replication/KerberosReplicationIT.java | 32 +-
.../test/replication/MockReplicaSystem.java | 19 +-
.../replication/MultiInstanceReplicationIT.java | 191 +++--
.../replication/MultiTserverReplicationIT.java | 9 +-
.../RemoveCompleteReplicationRecordsIT.java | 45 +-
.../accumulo/test/replication/ReplicationIT.java | 255 ++++---
.../replication/ReplicationOperationsImplIT.java | 48 +-
.../test/replication/SequentialWorkAssignerIT.java | 75 +-
.../test/replication/StatusCombinerMacIT.java | 12 +-
.../accumulo/test/replication/StatusMakerIT.java | 47 +-
.../test/replication/UnorderedWorkAssignerIT.java | 36 +-
.../UnorderedWorkAssignerReplicationIT.java | 191 +++--
.../UnusedWalDoesntCloseReplicationStatusIT.java | 27 +-
.../accumulo/test/replication/WorkMakerIT.java | 36 +-
.../test/replication/merkle/MerkleTree.java | 7 +-
.../test/replication/merkle/MerkleTreeNode.java | 15 +-
.../test/replication/merkle/cli/CompareTables.java | 36 +-
.../replication/merkle/cli/ComputeRootHash.java | 17 +-
.../replication/merkle/cli/GenerateHashes.java | 49 +-
.../replication/merkle/cli/ManualComparison.java | 7 +-
.../replication/merkle/ingest/RandomWorkload.java | 19 +-
.../test/replication/merkle/package-info.java | 33 +-
.../replication/merkle/skvi/DigestIterator.java | 15 +-
.../apache/accumulo/test/scalability/Ingest.java | 7 +-
.../org/apache/accumulo/test/scalability/Run.java | 10 +-
.../accumulo/test/scalability/ScaleTest.java | 8 +-
.../test/server/security/SystemCredentialsIT.java | 39 +-
.../apache/accumulo/test/start/KeywordStartIT.java | 18 +-
.../test/stress/random/RandomMutations.java | 8 +-
.../apache/accumulo/test/stress/random/Scan.java | 15 +-
.../accumulo/test/stress/random/ScanOpts.java | 6 +-
.../apache/accumulo/test/stress/random/Stream.java | 3 +-
.../apache/accumulo/test/stress/random/Write.java | 30 +-
.../accumulo/test/stress/random/WriteOptions.java | 43 +-
.../accumulo/test/stress/random/package-info.java | 30 +-
.../org/apache/accumulo/test/util/CertUtils.java | 99 ++-
.../accumulo/test/util/SerializationUtil.java | 17 +-
.../test/TraceRepoDeserializationTest.java | 18 +-
.../accumulo/test/fate/zookeeper/ZooLockTest.java | 36 +-
.../test/functional/ValueReversingIterator.java | 6 +-
.../accumulo/test/iterator/AgeOffFilterTest.java | 21 +-
.../test/iterator/CfCqSliceFilterTest.java | 23 +-
.../apache/accumulo/test/iterator/RegExTest.java | 9 +-
.../test/iterator/SummingCombinerTest.java | 6 +-
.../test/iterator/WholeRowIteratorTest.java | 6 +-
.../accumulo/test/randomwalk/FrameworkTest.java | 9 +-
.../apache/accumulo/test/util/CertUtilsTest.java | 24 +-
.../accumulo/trace/instrument/CloudtraceSpan.java | 10 +-
.../accumulo/trace/instrument/CountSampler.java | 3 +-
.../apache/accumulo/trace/instrument/Tracer.java | 8 +-
1556 files changed, 30101 insertions(+), 16564 deletions(-)
diff --git a/core/src/main/java/org/apache/accumulo/core/Constants.java b/core/src/main/java/org/apache/accumulo/core/Constants.java
index eebd81d..ed1680b 100644
--- a/core/src/main/java/org/apache/accumulo/core/Constants.java
+++ b/core/src/main/java/org/apache/accumulo/core/Constants.java
@@ -126,7 +126,8 @@ public class Constants {
public static final String EXPORT_INFO_FILE = "accumulo_export_info.txt";
// Variables that will be substituted with environment vars in PropertyType.PATH values
- public static final Collection<String> PATH_PROPERTY_ENV_VARS = Collections.unmodifiableCollection(Arrays.asList("ACCUMULO_HOME", "ACCUMULO_CONF_DIR"));
+ public static final Collection<String> PATH_PROPERTY_ENV_VARS = Collections
+ .unmodifiableCollection(Arrays.asList("ACCUMULO_HOME", "ACCUMULO_CONF_DIR"));
public static final String HDFS_TABLES_DIR = "/tables";
diff --git a/core/src/main/java/org/apache/accumulo/core/bloomfilter/BloomFilter.java b/core/src/main/java/org/apache/accumulo/core/bloomfilter/BloomFilter.java
index f51f8f7..37e84d9 100644
--- a/core/src/main/java/org/apache/accumulo/core/bloomfilter/BloomFilter.java
+++ b/core/src/main/java/org/apache/accumulo/core/bloomfilter/BloomFilter.java
@@ -65,23 +65,29 @@ import org.slf4j.LoggerFactory;
/**
* Implements a <i>Bloom filter</i>, as defined by Bloom in 1970.
* <p>
- * The Bloom filter is a data structure that was introduced in 1970 and that has been adopted by the networking research community in the past decade thanks to
- * the bandwidth efficiencies that it offers for the transmission of set membership information between networked hosts. A sender encodes the information into a
- * bit vector, the Bloom filter, that is more compact than a conventional representation. Computation and space costs for construction are linear in the number
- * of elements. The receiver uses the filter to test whether various elements are members of the set. Though the filter will occasionally return a false
- * positive, it will never return a false negative. When creating the filter, the sender can choose its desired point in a trade-off between the false positive
- * rate and the size.
+ * The Bloom filter is a data structure that was introduced in 1970 and that has been adopted by the
+ * networking research community in the past decade thanks to the bandwidth efficiencies that it
+ * offers for the transmission of set membership information between networked hosts. A sender
+ * encodes the information into a bit vector, the Bloom filter, that is more compact than a
+ * conventional representation. Computation and space costs for construction are linear in the
+ * number of elements. The receiver uses the filter to test whether various elements are members of
+ * the set. Though the filter will occasionally return a false positive, it will never return a
+ * false negative. When creating the filter, the sender can choose its desired point in a trade-off
+ * between the false positive rate and the size.
*
* <p>
- * Originally created by <a href="http://www.one-lab.org">European Commission One-Lab Project 034819</a>.
+ * Originally created by <a href="http://www.one-lab.org">European Commission One-Lab Project
+ * 034819</a>.
*
* @see Filter The general behavior of a filter
*
- * @see <a href="http://portal.acm.org/citation.cfm?id=362692&dl=ACM&coll=portal">Space/Time Trade-Offs in Hash Coding with Allowable Errors</a>
+ * @see <a href="http://portal.acm.org/citation.cfm?id=362692&dl=ACM&coll=portal">Space/Time
+ * Trade-Offs in Hash Coding with Allowable Errors</a>
*/
public class BloomFilter extends Filter {
private static final Logger log = LoggerFactory.getLogger(BloomFilter.class);
- private static final byte[] bitvalues = new byte[] {(byte) 0x01, (byte) 0x02, (byte) 0x04, (byte) 0x08, (byte) 0x10, (byte) 0x20, (byte) 0x40, (byte) 0x80};
+ private static final byte[] bitvalues = new byte[] {(byte) 0x01, (byte) 0x02, (byte) 0x04,
+ (byte) 0x08, (byte) 0x10, (byte) 0x20, (byte) 0x40, (byte) 0x80};
/** The bit vector. */
BitSet bits;
@@ -128,7 +134,8 @@ public class BloomFilter extends Filter {
@Override
public void and(final Filter filter) {
- if (filter == null || !(filter instanceof BloomFilter) || filter.vectorSize != this.vectorSize || filter.nbHash != this.nbHash) {
+ if (filter == null || !(filter instanceof BloomFilter) || filter.vectorSize != this.vectorSize
+ || filter.nbHash != this.nbHash) {
throw new IllegalArgumentException("filters cannot be and-ed");
}
@@ -158,7 +165,8 @@ public class BloomFilter extends Filter {
@Override
public void or(final Filter filter) {
- if (filter == null || !(filter instanceof BloomFilter) || filter.vectorSize != this.vectorSize || filter.nbHash != this.nbHash) {
+ if (filter == null || !(filter instanceof BloomFilter) || filter.vectorSize != this.vectorSize
+ || filter.nbHash != this.nbHash) {
throw new IllegalArgumentException("filters cannot be or-ed");
}
bits.or(((BloomFilter) filter).bits);
@@ -166,7 +174,8 @@ public class BloomFilter extends Filter {
@Override
public void xor(final Filter filter) {
- if (filter == null || !(filter instanceof BloomFilter) || filter.vectorSize != this.vectorSize || filter.nbHash != this.nbHash) {
+ if (filter == null || !(filter instanceof BloomFilter) || filter.vectorSize != this.vectorSize
+ || filter.nbHash != this.nbHash) {
throw new IllegalArgumentException("filters cannot be xor-ed");
}
bits.xor(((BloomFilter) filter).bits);
diff --git a/core/src/main/java/org/apache/accumulo/core/bloomfilter/DynamicBloomFilter.java b/core/src/main/java/org/apache/accumulo/core/bloomfilter/DynamicBloomFilter.java
index 11e765a..5f70105 100644
--- a/core/src/main/java/org/apache/accumulo/core/bloomfilter/DynamicBloomFilter.java
+++ b/core/src/main/java/org/apache/accumulo/core/bloomfilter/DynamicBloomFilter.java
@@ -58,25 +58,33 @@ import org.apache.hadoop.util.bloom.Key;
/**
* Implements a <i>dynamic Bloom filter</i>, as defined in the INFOCOM 2006 paper.
* <p>
- * A dynamic Bloom filter (DBF) makes use of a <code>s * m</code> bit matrix but each of the <code>s</code> rows is a standard Bloom filter. The creation
- * process of a DBF is iterative. At the start, the DBF is a <code>1 * m</code> bit matrix, i.e., it is composed of a single standard Bloom filter. It assumes
- * that <code>n<sub>r</sub></code> elements are recorded in the initial bit vector, where <code>n<sub>r</sub> <= n</code> (<code>n</code> is the cardinality
- * of the set <code>A</code> to record in the filter).
+ * A dynamic Bloom filter (DBF) makes use of a <code>s * m</code> bit matrix but each of the
+ * <code>s</code> rows is a standard Bloom filter. The creation process of a DBF is iterative. At
+ * the start, the DBF is a <code>1 * m</code> bit matrix, i.e., it is composed of a single standard
+ * Bloom filter. It assumes that <code>n<sub>r</sub></code> elements are recorded in the initial bit
+ * vector, where <code>n<sub>r</sub> <= n</code> (<code>n</code> is the cardinality of the set
+ * <code>A</code> to record in the filter).
* <p>
- * As the size of <code>A</code> grows during the execution of the application, several keys must be inserted in the DBF. When inserting a key into the DBF, one
- * must first get an active Bloom filter in the matrix. A Bloom filter is active when the number of recorded keys, <code>n<sub>r</sub></code>, is strictly less
- * than the current cardinality of <code>A</code>, <code>n</code>. If an active Bloom filter is found, the key is inserted and <code>n<sub>r</sub></code> is
- * incremented by one. On the other hand, if there is no active Bloom filter, a new one is created (i.e., a new row is added to the matrix) according to the
- * current size of <code>A</code> and the element is added in this new Bloom filter and the <code>n<sub>r</sub></code> value of this new Bloom filter is set to
- * one. A given key is said to belong to the DBF if the <code>k</code> positions are set to one in one of the matrix rows.
+ * As the size of <code>A</code> grows during the execution of the application, several keys must be
+ * inserted in the DBF. When inserting a key into the DBF, one must first get an active Bloom filter
+ * in the matrix. A Bloom filter is active when the number of recorded keys,
+ * <code>n<sub>r</sub></code>, is strictly less than the current cardinality of <code>A</code>,
+ * <code>n</code>. If an active Bloom filter is found, the key is inserted and
+ * <code>n<sub>r</sub></code> is incremented by one. On the other hand, if there is no active Bloom
+ * filter, a new one is created (i.e., a new row is added to the matrix) according to the current
+ * size of <code>A</code> and the element is added in this new Bloom filter and the
+ * <code>n<sub>r</sub></code> value of this new Bloom filter is set to one. A given key is said to
+ * belong to the DBF if the <code>k</code> positions are set to one in one of the matrix rows.
* <p>
- * Originally created by <a href="http://www.one-lab.org">European Commission One-Lab Project 034819</a>.
+ * Originally created by <a href="http://www.one-lab.org">European Commission One-Lab Project
+ * 034819</a>.
*
* @see Filter The general behavior of a filter
* @see BloomFilter A Bloom filter
*
- * @see <a href="http://www.cse.fau.edu/~jie/research/publications/Publication_files/infocom2006.pdf">Theory and Network Applications of Dynamic Bloom
- * Filters</a>
+ * @see <a href=
+ * "http://www.cse.fau.edu/~jie/research/publications/Publication_files/infocom2006.pdf">Theory
+ * and Network Applications of Dynamic Bloom Filters</a>
*/
public class DynamicBloomFilter extends Filter {
/**
@@ -113,7 +121,8 @@ public class DynamicBloomFilter extends Filter {
* @param nr
* The threshold for the maximum number of keys to record in a dynamic Bloom filter row.
*/
- public DynamicBloomFilter(final int vectorSize, final int nbHash, final int hashType, final int nr) {
+ public DynamicBloomFilter(final int vectorSize, final int nbHash, final int hashType,
+ final int nr) {
super(vectorSize, nbHash, hashType);
this.nr = nr;
@@ -147,7 +156,8 @@ public class DynamicBloomFilter extends Filter {
@Override
public void and(final Filter filter) {
- if (filter == null || !(filter instanceof DynamicBloomFilter) || filter.vectorSize != this.vectorSize || filter.nbHash != this.nbHash) {
+ if (filter == null || !(filter instanceof DynamicBloomFilter)
+ || filter.vectorSize != this.vectorSize || filter.nbHash != this.nbHash) {
throw new IllegalArgumentException("filters cannot be and-ed");
}
@@ -186,7 +196,8 @@ public class DynamicBloomFilter extends Filter {
@Override
public void or(final Filter filter) {
- if (filter == null || !(filter instanceof DynamicBloomFilter) || filter.vectorSize != this.vectorSize || filter.nbHash != this.nbHash) {
+ if (filter == null || !(filter instanceof DynamicBloomFilter)
+ || filter.vectorSize != this.vectorSize || filter.nbHash != this.nbHash) {
throw new IllegalArgumentException("filters cannot be or-ed");
}
@@ -202,7 +213,8 @@ public class DynamicBloomFilter extends Filter {
@Override
public void xor(final Filter filter) {
- if (filter == null || !(filter instanceof DynamicBloomFilter) || filter.vectorSize != this.vectorSize || filter.nbHash != this.nbHash) {
+ if (filter == null || !(filter instanceof DynamicBloomFilter)
+ || filter.vectorSize != this.vectorSize || filter.nbHash != this.nbHash) {
throw new IllegalArgumentException("filters cannot be xor-ed");
}
DynamicBloomFilter dbf = (DynamicBloomFilter) filter;
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 f6fb632..8d30a05 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
@@ -62,8 +62,9 @@ import org.apache.hadoop.util.hash.Hash;
/**
* Defines the general behavior of a filter.
* <p>
- * A filter is a data structure which aims at offering a lossy summary of a set <code>A</code>. The key idea is to map entries of <code>A</code> (also called
- * <i>keys</i>) into several positions in a vector through the use of several hash functions.
+ * A filter is a data structure which aims at offering a lossy summary of a set <code>A</code>. The
+ * key idea is to map entries of <code>A</code> (also called <i>keys</i>) into several positions in
+ * a vector through the use of several hash functions.
* <p>
* Typically, a filter will be implemented as a Bloom filter (or a Bloom filter extension).
* <p>
diff --git a/core/src/main/java/org/apache/accumulo/core/cli/BatchScannerOpts.java b/core/src/main/java/org/apache/accumulo/core/cli/BatchScannerOpts.java
index 2d5b51d..2706468 100644
--- a/core/src/main/java/org/apache/accumulo/core/cli/BatchScannerOpts.java
+++ b/core/src/main/java/org/apache/accumulo/core/cli/BatchScannerOpts.java
@@ -24,7 +24,8 @@ public class BatchScannerOpts {
@Parameter(names = "--scanThreads", description = "Number of threads to use when batch scanning")
public Integer scanThreads = 10;
- @Parameter(names = "--scanTimeout", converter = TimeConverter.class, description = "timeout used to fail a batch scan")
+ @Parameter(names = "--scanTimeout", converter = TimeConverter.class,
+ description = "timeout used to fail a batch scan")
public Long scanTimeout = Long.MAX_VALUE;
}
diff --git a/core/src/main/java/org/apache/accumulo/core/cli/BatchWriterOpts.java b/core/src/main/java/org/apache/accumulo/core/cli/BatchWriterOpts.java
index 02fb3da..96e4e85 100644
--- a/core/src/main/java/org/apache/accumulo/core/cli/BatchWriterOpts.java
+++ b/core/src/main/java/org/apache/accumulo/core/cli/BatchWriterOpts.java
@@ -27,16 +27,20 @@ import com.beust.jcommander.Parameter;
public class BatchWriterOpts {
private static final BatchWriterConfig BWDEFAULTS = new BatchWriterConfig();
- @Parameter(names = "--batchThreads", description = "Number of threads to use when writing large batches")
+ @Parameter(names = "--batchThreads",
+ description = "Number of threads to use when writing large batches")
public Integer batchThreads = BWDEFAULTS.getMaxWriteThreads();
- @Parameter(names = "--batchLatency", converter = TimeConverter.class, description = "The maximum time to wait before flushing data to servers when writing")
+ @Parameter(names = "--batchLatency", converter = TimeConverter.class,
+ description = "The maximum time to wait before flushing data to servers when writing")
public Long batchLatency = BWDEFAULTS.getMaxLatency(TimeUnit.MILLISECONDS);
- @Parameter(names = "--batchMemory", converter = MemoryConverter.class, description = "memory used to batch data when writing")
+ @Parameter(names = "--batchMemory", converter = MemoryConverter.class,
+ description = "memory used to batch data when writing")
public Long batchMemory = BWDEFAULTS.getMaxMemory();
- @Parameter(names = "--batchTimeout", converter = TimeConverter.class, description = "timeout used to fail a batch write")
+ @Parameter(names = "--batchTimeout", converter = TimeConverter.class,
+ description = "timeout used to fail a batch write")
public Long batchTimeout = BWDEFAULTS.getTimeout(TimeUnit.MILLISECONDS);
public BatchWriterConfig getBatchWriterConfig() {
diff --git a/core/src/main/java/org/apache/accumulo/core/cli/ClientOpts.java b/core/src/main/java/org/apache/accumulo/core/cli/ClientOpts.java
index 4073455..b1d3150 100644
--- a/core/src/main/java/org/apache/accumulo/core/cli/ClientOpts.java
+++ b/core/src/main/java/org/apache/accumulo/core/cli/ClientOpts.java
@@ -130,7 +130,8 @@ public class ClientOpts extends Help {
@Parameter(names = "-p", converter = PasswordConverter.class, description = "Connection password")
private Password password = null;
- @Parameter(names = "--password", converter = PasswordConverter.class, description = "Enter the connection password", password = true)
+ @Parameter(names = "--password", converter = PasswordConverter.class,
+ description = "Enter the connection password", password = true)
private Password securePassword = null;
@Parameter(names = {"-tc", "--tokenClass"}, description = "Token class")
@@ -148,9 +149,11 @@ public class ClientOpts extends Help {
props.put(loginOption.getKey(), loginOption.getValue());
}
- // It's expected that the user is already logged in via UserGroupInformation or external to this program (kinit).
+ // It's expected that the user is already logged in via UserGroupInformation or external to
+ // this program (kinit).
try {
- AuthenticationToken token = Class.forName(tokenClassName).asSubclass(AuthenticationToken.class).newInstance();
+ AuthenticationToken token = Class.forName(tokenClassName)
+ .asSubclass(AuthenticationToken.class).newInstance();
token.init(props);
return token;
} catch (Exception e) {
@@ -174,13 +177,15 @@ public class ClientOpts extends Help {
return new PasswordToken(pass.value);
}
- @Parameter(names = {"-z", "--keepers"}, description = "Comma separated list of zookeeper hosts (host:port,host:port)")
+ @Parameter(names = {"-z", "--keepers"},
+ description = "Comma separated list of zookeeper hosts (host:port,host:port)")
public String zookeepers = "localhost:2181";
@Parameter(names = {"-i", "--instance"}, description = "The name of the accumulo instance")
public String instance = null;
- @Parameter(names = {"-auths", "--auths"}, converter = AuthConverter.class, description = "the authorizations to use when reading or writing")
+ @Parameter(names = {"-auths", "--auths"}, converter = AuthConverter.class,
+ description = "the authorizations to use when reading or writing")
public Authorizations auths = Authorizations.EMPTY;
@Parameter(names = "--debug", description = "turn on TRACE-level log messages")
@@ -189,7 +194,8 @@ public class ClientOpts extends Help {
@Parameter(names = {"-fake", "--mock"}, description = "Use a mock Instance")
public boolean mock = false;
- @Parameter(names = "--site-file", description = "Read the given accumulo site file to find the accumulo instance")
+ @Parameter(names = "--site-file",
+ description = "Read the given accumulo site file to find the accumulo instance")
public String siteFile = null;
@Parameter(names = "--ssl", description = "Connect to accumulo over SSL")
@@ -225,8 +231,8 @@ public class ClientOpts extends Help {
}
/**
- * Automatically update the options to use a KerberosToken when SASL is enabled for RPCs. Don't overwrite the options if the user has provided something
- * specifically.
+ * Automatically update the options to use a KerberosToken when SASL is enabled for RPCs. Don't
+ * overwrite the options if the user has provided something specifically.
*/
public void updateKerberosCredentials() {
ClientConfiguration clientConfig;
@@ -242,14 +248,16 @@ public class ClientOpts extends Help {
}
/**
- * Automatically update the options to use a KerberosToken when SASL is enabled for RPCs. Don't overwrite the options if the user has provided something
- * specifically.
+ * Automatically update the options to use a KerberosToken when SASL is enabled for RPCs. Don't
+ * overwrite the options if the user has provided something specifically.
*/
public void updateKerberosCredentials(ClientConfiguration clientConfig) {
- final boolean clientConfSaslEnabled = Boolean.parseBoolean(clientConfig.get(ClientProperty.INSTANCE_RPC_SASL_ENABLED));
+ final boolean clientConfSaslEnabled = Boolean
+ .parseBoolean(clientConfig.get(ClientProperty.INSTANCE_RPC_SASL_ENABLED));
if ((saslEnabled || clientConfSaslEnabled) && null == tokenClassName) {
tokenClassName = KerberosToken.CLASS_NAME;
- // ACCUMULO-3701 We need to ensure we're logged in before parseArgs returns as the MapReduce Job is going to make a copy of the current user (UGI)
+ // ACCUMULO-3701 We need to ensure we're logged in before parseArgs returns as the MapReduce
+ // Job is going to make a copy of the current user (UGI)
// when it is instantiated.
if (null != keytabPath) {
File keytab = new File(keytabPath);
@@ -291,10 +299,12 @@ public class ClientOpts extends Help {
if (null == principal) {
AuthenticationToken token = getToken();
if (null == token) {
- throw new AccumuloSecurityException("No principal or authentication token was provided", SecurityErrorCode.BAD_CREDENTIALS);
+ throw new AccumuloSecurityException("No principal or authentication token was provided",
+ SecurityErrorCode.BAD_CREDENTIALS);
}
- // In MapReduce, if we create a DelegationToken, the principal is updated from the KerberosToken
+ // In MapReduce, if we create a DelegationToken, the principal is updated from the
+ // KerberosToken
// used to obtain the DelegationToken.
if (null != principal) {
return principal;
@@ -389,7 +399,8 @@ public class ClientOpts extends Help {
String instanceIDFromFile = ZooUtil.getInstanceIDFromHdfs(instanceDir, config);
if (config.getBoolean(Property.INSTANCE_RPC_SSL_ENABLED))
clientConfig.setProperty(ClientProperty.INSTANCE_RPC_SSL_ENABLED, "true");
- return cachedClientConfig = clientConfig.withInstance(UUID.fromString(instanceIDFromFile)).withZkHosts(zookeepers);
+ return cachedClientConfig = clientConfig.withInstance(UUID.fromString(instanceIDFromFile))
+ .withZkHosts(zookeepers);
}
return cachedClientConfig = clientConfig.withInstance(instance).withZkHosts(zookeepers);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/cli/MapReduceClientOnRequiredTable.java b/core/src/main/java/org/apache/accumulo/core/cli/MapReduceClientOnRequiredTable.java
index caef02d..79b59e7 100644
--- a/core/src/main/java/org/apache/accumulo/core/cli/MapReduceClientOnRequiredTable.java
+++ b/core/src/main/java/org/apache/accumulo/core/cli/MapReduceClientOnRequiredTable.java
@@ -29,7 +29,8 @@ public class MapReduceClientOnRequiredTable extends MapReduceClientOpts {
@Parameter(names = {"-t", "--table"}, required = true, description = "table to use")
private String tableName;
- @Parameter(names = {"-tf", "--tokenFile"}, description = "File in hdfs containing the user's authentication token create with \"bin/accumulo create-token\"")
+ @Parameter(names = {"-tf", "--tokenFile"},
+ description = "File in hdfs containing the user's authentication token create with \"bin/accumulo create-token\"")
private String tokenFile = "";
@Override
diff --git a/core/src/main/java/org/apache/accumulo/core/cli/MapReduceClientOpts.java b/core/src/main/java/org/apache/accumulo/core/cli/MapReduceClientOpts.java
index 2a5408b..71d8e1c 100644
--- a/core/src/main/java/org/apache/accumulo/core/cli/MapReduceClientOpts.java
+++ b/core/src/main/java/org/apache/accumulo/core/cli/MapReduceClientOpts.java
@@ -62,11 +62,14 @@ public class MapReduceClientOpts extends ClientOpts {
Connector conn = getInstance().getConnector(newPrincipal, krbToken);
// Do the explicit check to see if the user has the permission to get a delegation token
- if (!conn.securityOperations().hasSystemPermission(conn.whoami(), SystemPermission.OBTAIN_DELEGATION_TOKEN)) {
- log.error("{} doesn't have the {} SystemPermission neccesary to obtain a delegation token. MapReduce tasks cannot automatically use the client's"
- + " credentials on remote servers. Delegation tokens provide a means to run MapReduce without distributing the user's credentials.",
+ if (!conn.securityOperations().hasSystemPermission(conn.whoami(),
+ SystemPermission.OBTAIN_DELEGATION_TOKEN)) {
+ log.error(
+ "{} doesn't have the {} SystemPermission neccesary to obtain a delegation token. MapReduce tasks cannot automatically use the client's"
+ + " credentials on remote servers. Delegation tokens provide a means to run MapReduce without distributing the user's credentials.",
user.getUserName(), SystemPermission.OBTAIN_DELEGATION_TOKEN.name());
- throw new IllegalStateException(conn.whoami() + " does not have permission to obtain a delegation token");
+ throw new IllegalStateException(
+ conn.whoami() + " does not have permission to obtain a delegation token");
}
// Get the delegation token from Accumulo
diff --git a/core/src/main/java/org/apache/accumulo/core/cli/ScannerOpts.java b/core/src/main/java/org/apache/accumulo/core/cli/ScannerOpts.java
index 439b374..37939fd 100644
--- a/core/src/main/java/org/apache/accumulo/core/cli/ScannerOpts.java
+++ b/core/src/main/java/org/apache/accumulo/core/cli/ScannerOpts.java
@@ -19,6 +19,7 @@ package org.apache.accumulo.core.cli;
import com.beust.jcommander.Parameter;
public class ScannerOpts {
- @Parameter(names = "--scanBatchSize", description = "the number of key-values to pull during a scan")
+ @Parameter(names = "--scanBatchSize",
+ description = "the number of key-values to pull during a scan")
public int scanBatchSize = 1000;
}
diff --git a/core/src/main/java/org/apache/accumulo/core/client/AccumuloSecurityException.java b/core/src/main/java/org/apache/accumulo/core/client/AccumuloSecurityException.java
index a614e8c..0881ac2 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/AccumuloSecurityException.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/AccumuloSecurityException.java
@@ -21,7 +21,8 @@ import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
import org.apache.commons.lang.StringUtils;
/**
- * An Accumulo Exception for security violations, authentication failures, authorization failures, etc.
+ * An Accumulo Exception for security violations, authentication failures, authorization failures,
+ * etc.
*
*/
public class AccumuloSecurityException extends Exception {
@@ -92,7 +93,8 @@ public class AccumuloSecurityException extends Exception {
* @param cause
* the exception that caused this violation
*/
- public AccumuloSecurityException(final String user, final SecurityErrorCode errorcode, final Throwable cause) {
+ public AccumuloSecurityException(final String user, final SecurityErrorCode errorcode,
+ final Throwable cause) {
super(getDefaultErrorMessage(errorcode), cause);
this.user = user;
this.errorCode = errorcode == null ? SecurityErrorCode.DEFAULT_SECURITY_ERROR : errorcode;
@@ -108,7 +110,8 @@ public class AccumuloSecurityException extends Exception {
* @param cause
* the exception that caused this violation
*/
- public AccumuloSecurityException(final String user, final SecurityErrorCode errorcode, final String tableInfo, final Throwable cause) {
+ public AccumuloSecurityException(final String user, final SecurityErrorCode errorcode,
+ final String tableInfo, final Throwable cause) {
super(getDefaultErrorMessage(errorcode), cause);
this.user = user;
this.errorCode = errorcode == null ? SecurityErrorCode.DEFAULT_SECURITY_ERROR : errorcode;
@@ -135,7 +138,8 @@ public class AccumuloSecurityException extends Exception {
* @param tableInfo
* the relevant tableInfo for the security violation
*/
- public AccumuloSecurityException(final String user, final SecurityErrorCode errorcode, final String tableInfo) {
+ public AccumuloSecurityException(final String user, final SecurityErrorCode errorcode,
+ final String tableInfo) {
super(getDefaultErrorMessage(errorcode));
this.user = user;
this.errorCode = errorcode == null ? SecurityErrorCode.DEFAULT_SECURITY_ERROR : errorcode;
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 402eb1a..8c33d09 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
@@ -22,10 +22,13 @@ import java.util.concurrent.TimeUnit;
import org.apache.accumulo.core.data.Range;
/**
- * In exchange for possibly <b>returning scanned entries out of order</b>, BatchScanner implementations may scan an Accumulo table more efficiently by
+ * In exchange for possibly <b>returning scanned entries out of order</b>, BatchScanner
+ * implementations may scan an Accumulo table more efficiently by
* <ul>
- * <li>Looking up multiple ranges in parallel. Parallelism is constrained by the number of threads available to the BatchScanner, set in its constructor.</li>
- * <li>Breaking up large ranges into subranges. Often the number and boundaries of subranges are determined by a table's split points.</li>
+ * <li>Looking up multiple ranges in parallel. Parallelism is constrained by the number of threads
+ * available to the BatchScanner, set in its constructor.</li>
+ * <li>Breaking up large ranges into subranges. Often the number and boundaries of subranges are
+ * determined by a table's split points.</li>
* <li>Combining multiple ranges into a single RPC call to a tablet server.</li>
* </ul>
*
@@ -33,15 +36,18 @@ import org.apache.accumulo.core.data.Range;
* <ul>
* <li>Retrieving many small ranges</li>
* <li>Scanning a large range that returns many entries</li>
- * <li>Running server-side iterators that perform computation, even if few entries are returned from the scan itself</li>
+ * <li>Running server-side iterators that perform computation, even if few entries are returned from
+ * the scan itself</li>
* </ul>
*
- * To re-emphasize, only use a BatchScanner when you do not care whether returned data is in sorted order. Use a {@link Scanner} instead when sorted order is
- * important.
+ * To re-emphasize, only use a BatchScanner when you do not care whether returned data is in sorted
+ * order. Use a {@link Scanner} instead when sorted order is important.
*
* <p>
- * A BatchScanner instance will use no more threads than provided in the construction of the BatchScanner implementation. Multiple invocations of
- * <code>iterator()</code> will all share the same resources of the instance. A new BatchScanner instance should be created to use allocate additional threads.
+ * A BatchScanner instance will use no more threads than provided in the construction of the
+ * BatchScanner implementation. Multiple invocations of <code>iterator()</code> will all share the
+ * same resources of the instance. A new BatchScanner instance should be created to use allocate
+ * additional threads.
*/
public interface BatchScanner extends ScannerBase {
@@ -60,8 +66,8 @@ public interface BatchScanner extends ScannerBase {
* {@inheritDoc}
*
* <p>
- * 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.
+ * 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);
diff --git a/core/src/main/java/org/apache/accumulo/core/client/BatchWriter.java b/core/src/main/java/org/apache/accumulo/core/client/BatchWriter.java
index 95d87c5..da9601b 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/BatchWriter.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/BatchWriter.java
@@ -21,13 +21,16 @@ import org.apache.accumulo.core.data.Mutation;
/**
* Send Mutations to a single Table in Accumulo.
* <p>
- * When the user uses a Connector to create a BatchWriter, they specify how much memory and how many threads it should use. As the user adds mutations to the
- * batch writer, it buffers them. Once the buffered mutations have used half of the user specified buffer, the mutations are dumped into the background to be
- * written by a thread pool. If the user specified memory completely fills up, then writes are held. When a user calls flush, it does not return until all
- * buffered mutations are written.
+ * When the user uses a Connector to create a BatchWriter, they specify how much memory and how many
+ * threads it should use. As the user adds mutations to the batch writer, it buffers them. Once the
+ * buffered mutations have used half of the user specified buffer, the mutations are dumped into the
+ * background to be written by a thread pool. If the user specified memory completely fills up, then
+ * writes are held. When a user calls flush, it does not return until all buffered mutations are
+ * written.
* <p>
- * In the event that an MutationsRejectedException exception is thrown by one of the methods on a BatchWriter instance, the user should close the current
- * instance and create a new instance. This is a known limitation which will be addressed by ACCUMULO-2990 in the future.
+ * In the event that an MutationsRejectedException exception is thrown by one of the methods on a
+ * BatchWriter instance, the user should close the current instance and create a new instance. This
+ * is a known limitation which will be addressed by ACCUMULO-2990 in the future.
*/
public interface BatchWriter extends AutoCloseable {
diff --git a/core/src/main/java/org/apache/accumulo/core/client/BatchWriterConfig.java b/core/src/main/java/org/apache/accumulo/core/client/BatchWriterConfig.java
index 521e0ce..f2ec775 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/BatchWriterConfig.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/BatchWriterConfig.java
@@ -52,8 +52,10 @@ public class BatchWriterConfig implements Writable {
private Durability durability = Durability.DEFAULT;
/**
- * Sets the maximum memory to batch before writing. The smaller this value, the more frequently the {@link BatchWriter} will write.<br>
- * If set to a value smaller than a single mutation, then it will {@link BatchWriter#flush()} after each added mutation. Must be non-negative.
+ * Sets the maximum memory to batch before writing. The smaller this value, the more frequently
+ * the {@link BatchWriter} will write.<br>
+ * If set to a value smaller than a single mutation, then it will {@link BatchWriter#flush()}
+ * after each added mutation. Must be non-negative.
*
* <p>
* <b>Default:</b> 50M
@@ -76,9 +78,10 @@ public class BatchWriterConfig implements Writable {
* For no maximum, set to zero, or {@link Long#MAX_VALUE} with {@link TimeUnit#MILLISECONDS}.
*
* <p>
- * {@link TimeUnit#MICROSECONDS} or {@link TimeUnit#NANOSECONDS} will be truncated to the nearest {@link TimeUnit#MILLISECONDS}.<br>
- * If this truncation would result in making the value zero when it was specified as non-zero, then a minimum value of one {@link TimeUnit#MILLISECONDS} will
- * be used.
+ * {@link TimeUnit#MICROSECONDS} or {@link TimeUnit#NANOSECONDS} will be truncated to the nearest
+ * {@link TimeUnit#MILLISECONDS}.<br>
+ * If this truncation would result in making the value zero when it was specified as non-zero,
+ * then a minimum value of one {@link TimeUnit#MILLISECONDS} will be used.
*
* <p>
* <b>Default:</b> 120 seconds
@@ -98,19 +101,22 @@ public class BatchWriterConfig implements Writable {
if (maxLatency == 0)
this.maxLatency = Long.MAX_VALUE;
else
- // make small, positive values that truncate to 0 when converted use the minimum millis instead
+ // make small, positive values that truncate to 0 when converted use the minimum millis
+ // instead
this.maxLatency = Math.max(1, timeUnit.toMillis(maxLatency));
return this;
}
/**
- * Sets the maximum amount of time an unresponsive server will be re-tried. When this timeout is exceeded, the {@link BatchWriter} should throw an exception.<br>
+ * Sets the maximum amount of time an unresponsive server will be re-tried. When this timeout is
+ * exceeded, the {@link BatchWriter} should throw an exception.<br>
* For no timeout, set to zero, or {@link Long#MAX_VALUE} with {@link TimeUnit#MILLISECONDS}.
*
* <p>
- * {@link TimeUnit#MICROSECONDS} or {@link TimeUnit#NANOSECONDS} will be truncated to the nearest {@link TimeUnit#MILLISECONDS}.<br>
- * If this truncation would result in making the value zero when it was specified as non-zero, then a minimum value of one {@link TimeUnit#MILLISECONDS} will
- * be used.
+ * {@link TimeUnit#MICROSECONDS} or {@link TimeUnit#NANOSECONDS} will be truncated to the nearest
+ * {@link TimeUnit#MILLISECONDS}.<br>
+ * If this truncation would result in making the value zero when it was specified as non-zero,
+ * then a minimum value of one {@link TimeUnit#MILLISECONDS} will be used.
*
* <p>
* <b>Default:</b> {@link Long#MAX_VALUE} (no timeout)
@@ -130,7 +136,8 @@ public class BatchWriterConfig implements Writable {
if (timeout == 0)
this.timeout = Long.MAX_VALUE;
else
- // make small, positive values that truncate to 0 when converted use the minimum millis instead
+ // make small, positive values that truncate to 0 when converted use the minimum millis
+ // instead
this.timeout = Math.max(1, timeUnit.toMillis(timeout));
return this;
}
@@ -160,7 +167,8 @@ public class BatchWriterConfig implements Writable {
}
public long getMaxLatency(TimeUnit timeUnit) {
- return timeUnit.convert(maxLatency != null ? maxLatency : DEFAULT_MAX_LATENCY, TimeUnit.MILLISECONDS);
+ return timeUnit.convert(maxLatency != null ? maxLatency : DEFAULT_MAX_LATENCY,
+ TimeUnit.MILLISECONDS);
}
public long getTimeout(TimeUnit timeUnit) {
@@ -180,8 +188,9 @@ public class BatchWriterConfig implements Writable {
}
/**
- * Change the durability for the BatchWriter session. The default durability is "default" which is the table's durability setting. If the durability is set to
- * something other than the default, it will override the durability setting of the table.
+ * Change the durability for the BatchWriter session. The default durability is "default" which is
+ * the table's durability setting. If the durability is set to something other than the default,
+ * it will override the durability setting of the table.
*
* @param durability
* the Durability to be used by the BatchWriter
@@ -230,7 +239,8 @@ public class BatchWriterConfig implements Writable {
String strLen = new String(len, UTF_8);
if (!strLen.endsWith("#"))
throw new IllegalStateException("length was not encoded correctly");
- byte[] bytes = new byte[Integer.parseInt(strLen.substring(strLen.lastIndexOf(' ') + 1, strLen.length() - 1), 36)];
+ byte[] bytes = new byte[Integer
+ .parseInt(strLen.substring(strLen.lastIndexOf(' ') + 1, strLen.length() - 1), 36)];
in.readFully(bytes);
String strFields = new String(bytes, UTF_8);
@@ -312,15 +322,18 @@ public class BatchWriterConfig implements Writable {
@Override
public int hashCode() {
HashCodeBuilder hcb = new HashCodeBuilder();
- hcb.append(maxMemory).append(maxLatency).append(maxWriteThreads).append(timeout).append(durability);
+ hcb.append(maxMemory).append(maxLatency).append(maxWriteThreads).append(timeout)
+ .append(durability);
return hcb.toHashCode();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder(32);
- sb.append("[maxMemory=").append(getMaxMemory()).append(", maxLatency=").append(getMaxLatency(TimeUnit.MILLISECONDS)).append(", maxWriteThreads=")
- .append(getMaxWriteThreads()).append(", timeout=").append(getTimeout(TimeUnit.MILLISECONDS)).append(", durability=").append(durability).append("]");
+ sb.append("[maxMemory=").append(getMaxMemory()).append(", maxLatency=")
+ .append(getMaxLatency(TimeUnit.MILLISECONDS)).append(", maxWriteThreads=")
+ .append(getMaxWriteThreads()).append(", timeout=").append(getTimeout(TimeUnit.MILLISECONDS))
+ .append(", durability=").append(durability).append("]");
return sb.toString();
}
}
diff --git a/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java b/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java
index a8622be..09c9e8b 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java
@@ -53,7 +53,8 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- * Contains a list of property keys recognized by the Accumulo client and convenience methods for setting them.
+ * Contains a list of property keys recognized by the Accumulo client and convenience methods for
+ * setting them.
*
* @since 1.6.0
*/
@@ -82,8 +83,10 @@ public class ClientConfiguration extends CompositeConfiguration {
INSTANCE_ZK_TIMEOUT(Property.INSTANCE_ZK_TIMEOUT),
// Instance information
- INSTANCE_NAME("instance.name", null, PropertyType.STRING, "Name of Accumulo instance to connect to"),
- INSTANCE_ID("instance.id", null, PropertyType.STRING, "UUID of Accumulo instance to connect to"),
+ INSTANCE_NAME("instance.name", null, PropertyType.STRING,
+ "Name of Accumulo instance to connect to"),
+ INSTANCE_ID("instance.id", null, PropertyType.STRING,
+ "UUID of Accumulo instance to connect to"),
// Tracing
TRACE_SPAN_RECEIVERS(Property.TRACE_SPAN_RECEIVERS),
@@ -133,7 +136,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.7.0 This method returns a type that is not part of the public API and not guaranteed to be stable.
+ * @deprecated since 1.7.0 This method returns a type that is not part of the public API and not
+ * guaranteed to be stable.
*/
@Deprecated
public PropertyType getType() {
@@ -145,7 +149,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.7.0 This method returns a type that is not part of the public API and not guaranteed to be stable.
+ * @deprecated since 1.7.0 This method returns a type that is not part of the public API and not
+ * guaranteed to be stable.
*/
@Deprecated
public Property getAccumuloProperty() {
@@ -177,7 +182,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API; use {@link #fromFile(File)} instead.
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API; use {@link #fromFile(File)} instead.
*/
@Deprecated
public ClientConfiguration(String configFile) throws ConfigurationException {
@@ -189,7 +195,8 @@ public class ClientConfiguration extends CompositeConfiguration {
*
* @param configFile
* the path to the properties file
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API; use {@link #fromFile(File)} instead.
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API; use {@link #fromFile(File)} instead.
*/
@Deprecated
public ClientConfiguration(File configFile) throws ConfigurationException {
@@ -197,7 +204,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
public ClientConfiguration(List<? extends Configuration> configs) {
@@ -207,9 +215,11 @@ public class ClientConfiguration extends CompositeConfiguration {
for (Configuration c : configs) {
if (c instanceof AbstractConfiguration) {
AbstractConfiguration abstractConfiguration = (AbstractConfiguration) c;
- if (!abstractConfiguration.isDelimiterParsingDisabled() && abstractConfiguration.getListDelimiter() != '\0') {
- log.warn("Client configuration constructed with a Configuration that did not have list delimiter disabled or overridden, multi-valued config "
- + "properties may be unavailable");
+ if (!abstractConfiguration.isDelimiterParsingDisabled()
+ && abstractConfiguration.getListDelimiter() != '\0') {
+ log.warn(
+ "Client configuration constructed with a Configuration that did not have list delimiter disabled or overridden, multi-valued config "
+ + "properties may be unavailable");
abstractConfiguration.setListDelimiter('\0');
}
}
@@ -221,7 +231,8 @@ public class ClientConfiguration extends CompositeConfiguration {
*
* @see PropertiesConfiguration
* @see #loadDefault()
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
public ClientConfiguration(Configuration... configs) {
@@ -229,8 +240,9 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * Attempts to load a configuration file from the system using the default search paths. Uses the <em>ACCUMULO_CLIENT_CONF_PATH</em> environment variable,
- * split on <em>File.pathSeparator</em>, for a list of target files.
+ * Attempts to load a configuration file from the system using the default search paths. Uses the
+ * <em>ACCUMULO_CLIENT_CONF_PATH</em> environment variable, split on <em>File.pathSeparator</em>,
+ * for a list of target files.
* <p>
* If <em>ACCUMULO_CLIENT_CONF_PATH</em> is not set, uses the following in this order:
* <ul>
@@ -240,8 +252,9 @@ public class ClientConfiguration extends CompositeConfiguration {
* <li>/etc/accumulo/conf/client.conf
* </ul>
* <p>
- * A client configuration will then be read from each location using <em>PropertiesConfiguration</em> to construct a configuration. That means the latest item
- * will be the one in the configuration.
+ * A client configuration will then be read from each location using
+ * <em>PropertiesConfiguration</em> to construct a configuration. That means the latest item will
+ * be the one in the configuration.
*
* @see PropertiesConfiguration
* @see File#pathSeparator
@@ -251,7 +264,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * Initializes an empty configuration object to be further configured with other methods on the class.
+ * Initializes an empty configuration object to be further configured with other methods on the
+ * class.
*
* @since 1.9.0
*/
@@ -260,8 +274,9 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * Initializes a configuration object from the contents of a configuration file. Currently supports Java "properties" files. The returned object can be
- * further configured with subsequent calls to other methods on this class.
+ * Initializes a configuration object from the contents of a configuration file. Currently
+ * supports Java "properties" files. The returned object can be further configured with subsequent
+ * calls to other methods on this class.
*
* @param file
* the path to the configuration file
@@ -276,8 +291,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * Initializes a configuration object from the contents of a map. The returned object can be further configured with subsequent calls to other methods on this
- * class.
+ * Initializes a configuration object from the contents of a map. The returned object can be
+ * further configured with subsequent calls to other methods on this class.
*
* @param properties
* a map containing the configuration properties to use
@@ -318,14 +333,16 @@ public class ClientConfiguration extends CompositeConfiguration {
try {
propConfig.load(new StringReader(serializedConfig));
} catch (ConfigurationException e) {
- throw new IllegalArgumentException("Error deserializing client configuration: " + serializedConfig, e);
+ throw new IllegalArgumentException(
+ "Error deserializing client configuration: " + serializedConfig, e);
}
return new ClientConfiguration(propConfig);
}
/**
- * Muck the value of {@code clientConfPath} if it points to a directory by appending {@code client.conf} to the end of the file path. This is a no-op if the
- * value is not a directory on the filesystem.
+ * Muck the value of {@code clientConfPath} if it points to a directory by appending
+ * {@code client.conf} to the end of the file path. This is a no-op if the value is not a
+ * directory on the filesystem.
*
* @param clientConfPath
* The value of ACCUMULO_CLIENT_CONF_PATH.
@@ -350,14 +367,18 @@ public class ClientConfiguration extends CompositeConfiguration {
} else {
// if $ACCUMULO_CLIENT_CONF_PATH env isn't set, priority from top to bottom is:
// ~/.accumulo/config
- // $ACCUMULO_CONF_DIR/client.conf -OR- $ACCUMULO_HOME/conf/client.conf (depending on whether $ACCUMULO_CONF_DIR is set)
+ // $ACCUMULO_CONF_DIR/client.conf -OR- $ACCUMULO_HOME/conf/client.conf (depending on whether
+ // $ACCUMULO_CONF_DIR is set)
// /etc/accumulo/client.conf
clientConfPaths = new LinkedList<>();
- clientConfPaths.add(System.getProperty("user.home") + File.separator + USER_ACCUMULO_DIR_NAME + File.separator + USER_CONF_FILENAME);
+ clientConfPaths.add(System.getProperty("user.home") + File.separator + USER_ACCUMULO_DIR_NAME
+ + File.separator + USER_CONF_FILENAME);
if (System.getenv("ACCUMULO_CONF_DIR") != null) {
- clientConfPaths.add(System.getenv("ACCUMULO_CONF_DIR") + File.separator + GLOBAL_CONF_FILENAME);
+ clientConfPaths
+ .add(System.getenv("ACCUMULO_CONF_DIR") + File.separator + GLOBAL_CONF_FILENAME);
} else if (System.getenv("ACCUMULO_HOME") != null) {
- clientConfPaths.add(System.getenv("ACCUMULO_HOME") + File.separator + "conf" + File.separator + GLOBAL_CONF_FILENAME);
+ clientConfPaths.add(System.getenv("ACCUMULO_HOME") + File.separator + "conf"
+ + File.separator + GLOBAL_CONF_FILENAME);
}
clientConfPaths.add("/etc/accumulo/" + GLOBAL_CONF_FILENAME);
clientConfPaths.add("/etc/accumulo/conf/" + GLOBAL_CONF_FILENAME);
@@ -391,7 +412,8 @@ public class ClientConfiguration extends CompositeConfiguration {
private void checkType(ClientProperty property, PropertyType type) {
if (!property.getType().equals(type)) {
- String msg = "Configuration method intended for type " + type + " called with a " + property.getType() + " argument (" + property.getKey() + ")";
+ String msg = "Configuration method intended for type " + type + " called with a "
+ + property.getType() + " argument (" + property.getKey() + ")";
throw new IllegalArgumentException(msg);
}
}
@@ -430,7 +452,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * Same as {@link #setProperty(ClientProperty, String)} but returns the ClientConfiguration for chaining purposes
+ * Same as {@link #setProperty(ClientProperty, String)} but returns the ClientConfiguration for
+ * chaining purposes
*/
public ClientConfiguration with(ClientProperty prop, String value) {
return with(prop.getKey(), value);
@@ -446,7 +469,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * Same as {@link #setProperty(String, String)} but returns the ClientConfiguration for chaining purposes
+ * Same as {@link #setProperty(String, String)} but returns the ClientConfiguration for chaining
+ * purposes
*
* @since 1.9.0
*/
@@ -499,11 +523,13 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * Same as {@link #with(ClientProperty, String)} for ClientProperty.INSTANCE_RPC_SSL_ENABLED and ClientProperty.RPC_USE_JSSE
+ * Same as {@link #with(ClientProperty, String)} for ClientProperty.INSTANCE_RPC_SSL_ENABLED and
+ * ClientProperty.RPC_USE_JSSE
*
*/
public ClientConfiguration withSsl(boolean sslEnabled, boolean useJsseConfig) {
- return with(ClientProperty.INSTANCE_RPC_SSL_ENABLED, String.valueOf(sslEnabled)).with(ClientProperty.RPC_USE_JSSE, String.valueOf(useJsseConfig));
+ return with(ClientProperty.INSTANCE_RPC_SSL_ENABLED, String.valueOf(sslEnabled))
+ .with(ClientProperty.RPC_USE_JSSE, String.valueOf(useJsseConfig));
}
/**
@@ -515,8 +541,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * Same as {@link #with(ClientProperty, String)} for ClientProperty.RPC_SSL_TRUSTORE_PATH, ClientProperty.RPC_SSL_TRUSTORE_PASSWORD, and
- * ClientProperty.RPC_SSL_TRUSTORE_TYPE
+ * Same as {@link #with(ClientProperty, String)} for ClientProperty.RPC_SSL_TRUSTORE_PATH,
+ * ClientProperty.RPC_SSL_TRUSTORE_PASSWORD, and ClientProperty.RPC_SSL_TRUSTORE_TYPE
*
*/
public ClientConfiguration withTruststore(String path, String password, String type) {
@@ -538,8 +564,9 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * Same as {@link #with(ClientProperty, String)} for ClientProperty.INSTANCE_RPC_SSL_CLIENT_AUTH, ClientProperty.RPC_SSL_KEYSTORE_PATH,
- * ClientProperty.RPC_SSL_KEYSTORE_PASSWORD, and ClientProperty.RPC_SSL_KEYSTORE_TYPE
+ * Same as {@link #with(ClientProperty, String)} for ClientProperty.INSTANCE_RPC_SSL_CLIENT_AUTH,
+ * ClientProperty.RPC_SSL_KEYSTORE_PATH, ClientProperty.RPC_SSL_KEYSTORE_PASSWORD, and
+ * ClientProperty.RPC_SSL_KEYSTORE_TYPE
*
*/
public ClientConfiguration withKeystore(String path, String password, String type) {
@@ -568,24 +595,29 @@ public class ClientConfiguration extends CompositeConfiguration {
* @since 1.9.0
*/
public boolean hasSasl() {
- return getBoolean(ClientProperty.INSTANCE_RPC_SASL_ENABLED.getKey(), Boolean.parseBoolean(ClientProperty.INSTANCE_RPC_SASL_ENABLED.getDefaultValue()));
+ return getBoolean(ClientProperty.INSTANCE_RPC_SASL_ENABLED.getKey(),
+ Boolean.parseBoolean(ClientProperty.INSTANCE_RPC_SASL_ENABLED.getDefaultValue()));
}
/**
- * Same as {@link #with(ClientProperty, String)} for ClientProperty.INSTANCE_RPC_SASL_ENABLED and ClientProperty.GENERAL_KERBEROS_PRINCIPAL.
+ * Same as {@link #with(ClientProperty, String)} for ClientProperty.INSTANCE_RPC_SASL_ENABLED and
+ * ClientProperty.GENERAL_KERBEROS_PRINCIPAL.
*
* @param saslEnabled
* Should SASL(kerberos) be enabled
* @param kerberosServerPrimary
- * The 'primary' component of the Kerberos principal Accumulo servers use to login (e.g. 'accumulo' in 'accumulo/_HOST@REALM')
+ * The 'primary' component of the Kerberos principal Accumulo servers use to login (e.g.
+ * 'accumulo' in 'accumulo/_HOST@REALM')
* @since 1.7.0
*/
public ClientConfiguration withSasl(boolean saslEnabled, String kerberosServerPrimary) {
- return withSasl(saslEnabled).with(ClientProperty.KERBEROS_SERVER_PRIMARY, kerberosServerPrimary);
+ return withSasl(saslEnabled).with(ClientProperty.KERBEROS_SERVER_PRIMARY,
+ kerberosServerPrimary);
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -594,7 +626,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -603,7 +636,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -612,7 +646,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -621,7 +656,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -630,7 +666,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -639,7 +676,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -648,7 +686,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -657,7 +696,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -666,7 +706,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -675,7 +716,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -684,7 +726,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -693,7 +736,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -702,7 +746,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -711,7 +756,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -720,7 +766,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -729,7 +776,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -738,7 +786,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -747,7 +796,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -756,7 +806,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -765,7 +816,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -774,7 +826,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -783,7 +836,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -792,7 +846,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -801,7 +856,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -815,25 +871,30 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
- protected ConfigurationErrorEvent createErrorEvent(int type, String propName, Object propValue, Throwable ex) {
+ protected ConfigurationErrorEvent createErrorEvent(int type, String propName, Object propValue,
+ Throwable ex) {
return super.createErrorEvent(type, propName, propValue, ex);
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
- protected ConfigurationEvent createEvent(int type, String propName, Object propValue, boolean before) {
+ protected ConfigurationEvent createEvent(int type, String propName, Object propValue,
+ boolean before) {
return super.createEvent(type, propName, propValue, before);
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -842,7 +903,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -851,7 +913,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -860,7 +923,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -869,7 +933,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -878,7 +943,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -887,7 +953,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -896,7 +963,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -905,7 +973,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -914,7 +983,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -923,7 +993,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -932,7 +1003,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -941,7 +1013,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -950,7 +1023,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@SuppressWarnings("rawtypes")
@@ -960,7 +1034,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -969,7 +1044,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -978,7 +1054,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -987,7 +1064,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@SuppressWarnings("rawtypes")
@@ -997,7 +1075,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1006,7 +1085,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1015,7 +1095,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1024,7 +1105,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1033,7 +1115,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1042,7 +1125,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1057,7 +1141,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@SuppressWarnings("unchecked")
@@ -1067,7 +1152,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@SuppressWarnings("rawtypes")
@@ -1077,7 +1163,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@SuppressWarnings("rawtypes")
@@ -1087,7 +1174,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1096,7 +1184,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1105,7 +1194,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1114,7 +1204,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1123,7 +1214,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1132,7 +1224,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1141,7 +1234,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1150,7 +1244,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1159,7 +1254,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1168,7 +1264,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1177,7 +1274,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1191,7 +1289,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1200,7 +1299,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1209,7 +1309,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1218,7 +1319,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1227,7 +1329,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@SuppressWarnings("rawtypes")
@@ -1237,7 +1340,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1246,7 +1350,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1255,7 +1360,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1264,7 +1370,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1273,7 +1380,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1282,7 +1390,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1291,7 +1400,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1300,7 +1410,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1309,7 +1420,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
@@ -1318,7 +1430,8 @@ public class ClientConfiguration extends CompositeConfiguration {
}
/**
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API
*/
@Deprecated
@Override
diff --git a/core/src/main/java/org/apache/accumulo/core/client/ClientSideIteratorScanner.java b/core/src/main/java/org/apache/accumulo/core/client/ClientSideIteratorScanner.java
index d4622c6..b940941 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/ClientSideIteratorScanner.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/ClientSideIteratorScanner.java
@@ -48,14 +48,16 @@ import org.apache.accumulo.core.security.Authorizations;
import org.apache.hadoop.io.Text;
/**
- * A scanner that instantiates iterators on the client side instead of on the tablet server. This can be useful for testing iterators or in cases where you
- * don't want iterators affecting the performance of tablet servers.<br>
+ * A scanner that instantiates iterators on the client side instead of on the tablet server. This
+ * can be useful for testing iterators or in cases where you don't want iterators affecting the
+ * performance of tablet servers.<br>
* <br>
* Suggested usage:<br>
* <code>Scanner scanner = new ClientSideIteratorScanner(connector.createScanner(tableName, authorizations));</code><br>
* <br>
- * Iterators added to this scanner will be run in the client JVM. Separate scan iterators can be run on the server side and client side by adding iterators to
- * the source scanner (which will execute server side) and to the client side scanner (which will execute client side).
+ * Iterators added to this scanner will be run in the client JVM. Separate scan iterators can be run
+ * on the server side and client side by adding iterators to the source scanner (which will execute
+ * server side) and to the client side scanner (which will execute client side).
*/
public class ClientSideIteratorScanner extends ScannerOptions implements Scanner {
private int size;
@@ -66,7 +68,8 @@ public class ClientSideIteratorScanner extends ScannerOptions implements Scanner
private SamplerConfiguration iteratorSamplerConfig;
/**
- * @deprecated since 1.7.0 was never intended for public use. However this could have been used by anything extending this class.
+ * @deprecated since 1.7.0 was never intended for public use. However this could have been used by
+ * anything extending this class.
*/
@Deprecated
public class ScannerTranslator extends ScannerTranslatorImpl {
@@ -91,7 +94,8 @@ public class ClientSideIteratorScanner extends ScannerOptions implements Scanner
}
@Override
- public SortedKeyValueIterator<Key,Value> reserveMapFileReader(String mapFileName) throws IOException {
+ public SortedKeyValueIterator<Key,Value> reserveMapFileReader(String mapFileName)
+ throws IOException {
throw new UnsupportedOperationException();
}
@@ -137,7 +141,8 @@ public class ClientSideIteratorScanner extends ScannerOptions implements Scanner
}
/**
- * A class that wraps a Scanner in a SortedKeyValueIterator so that other accumulo iterators can use it as a source.
+ * A class that wraps a Scanner in a SortedKeyValueIterator so that other accumulo iterators can
+ * use it as a source.
*/
private class ScannerTranslatorImpl implements SortedKeyValueIterator<Key,Value> {
protected Scanner scanner;
@@ -157,7 +162,8 @@ public class ClientSideIteratorScanner extends ScannerOptions implements Scanner
}
@Override
- public void init(final SortedKeyValueIterator<Key,Value> source, final Map<String,String> options, final IteratorEnvironment env) throws IOException {
+ public void init(final SortedKeyValueIterator<Key,Value> source,
+ final Map<String,String> options, final IteratorEnvironment env) throws IOException {
throw new UnsupportedOperationException();
}
@@ -175,7 +181,8 @@ public class ClientSideIteratorScanner extends ScannerOptions implements Scanner
}
@Override
- public void seek(final Range range, final Collection<ByteSequence> columnFamilies, final boolean inclusive) throws IOException {
+ public void seek(final Range range, final Collection<ByteSequence> columnFamilies,
+ final boolean inclusive) throws IOException {
if (!inclusive && columnFamilies.size() > 0) {
throw new IllegalArgumentException();
}
@@ -207,7 +214,8 @@ public class ClientSideIteratorScanner extends ScannerOptions implements Scanner
@Override
public SortedKeyValueIterator<Key,Value> deepCopy(final IteratorEnvironment env) {
- return new ScannerTranslatorImpl(scanner, env.isSamplingEnabled() ? env.getSamplerConfiguration() : null);
+ return new ScannerTranslatorImpl(scanner,
+ env.isSamplingEnabled() ? env.getSamplerConfiguration() : null);
}
}
@@ -259,8 +267,10 @@ public class ClientSideIteratorScanner extends ScannerOptions implements Scanner
SortedKeyValueIterator<Key,Value> skvi;
try {
- skvi = IteratorUtil.loadIterators(smi, tm.values(), serverSideIteratorOptions, new ClientSideIteratorEnvironment(getSamplerConfiguration() != null,
- getIteratorSamplerConfigurationInternal()), false, null);
+ skvi = IteratorUtil.loadIterators(smi, tm.values(), serverSideIteratorOptions,
+ new ClientSideIteratorEnvironment(getSamplerConfiguration() != null,
+ getIteratorSamplerConfigurationInternal()),
+ false, null);
} catch (IOException e) {
throw new RuntimeException(e);
}
@@ -340,7 +350,8 @@ public class ClientSideIteratorScanner extends ScannerOptions implements Scanner
@Override
public void setReadaheadThreshold(long batches) {
if (0 > batches) {
- throw new IllegalArgumentException("Number of batches before read-ahead must be non-negative");
+ throw new IllegalArgumentException(
+ "Number of batches before read-ahead must be non-negative");
}
this.readaheadThreshold = batches;
}
@@ -359,8 +370,10 @@ public class ClientSideIteratorScanner extends ScannerOptions implements Scanner
}
/**
- * This is provided for the case where no sampler configuration is set on the scanner, but there is a need to create iterator deep copies that have sampling
- * enabled. If sampler configuration is set on the scanner, then this method does not need to be called inorder to create deep copies with sampling.
+ * This is provided for the case where no sampler configuration is set on the scanner, but there
+ * is a need to create iterator deep copies that have sampling enabled. If sampler configuration
+ * is set on the scanner, then this method does not need to be called inorder to create deep
+ * copies with sampling.
*
* <p>
* Setting this differently than the scanners sampler configuration may cause exceptions.
diff --git a/core/src/main/java/org/apache/accumulo/core/client/ConditionalWriter.java b/core/src/main/java/org/apache/accumulo/core/client/ConditionalWriter.java
index d13dc09..667e5a0 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/ConditionalWriter.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/ConditionalWriter.java
@@ -23,8 +23,8 @@ import org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode;
import org.apache.accumulo.core.data.ConditionalMutation;
/**
- * ConditionalWriter provides the ability to do efficient, atomic read-modify-write operations on rows. These operations are performed on the tablet server
- * while a row lock is held.
+ * ConditionalWriter provides the ability to do efficient, atomic read-modify-write operations on
+ * rows. These operations are performed on the tablet server while a row lock is held.
*
* @since 1.6.0
*/
@@ -49,8 +49,9 @@ public interface ConditionalWriter extends AutoCloseable {
}
/**
- * If this method throws an exception, then its possible the mutation is still being actively processed. Therefore if code chooses to continue after seeing
- * an exception it should take this into consideration.
+ * If this method throws an exception, then its possible the mutation is still being actively
+ * processed. Therefore if code chooses to continue after seeing an exception it should take
+ * this into consideration.
*
* @return status of a conditional mutation
*/
@@ -61,7 +62,9 @@ public interface ConditionalWriter extends AutoCloseable {
throw new AccumuloException(exception);
if (exception instanceof AccumuloSecurityException) {
AccumuloSecurityException ase = (AccumuloSecurityException) exception;
- throw new AccumuloSecurityException(ase.getUser(), SecurityErrorCode.valueOf(ase.getSecurityErrorCode().name()), ase.getTableInfo(), ase);
+ throw new AccumuloSecurityException(ase.getUser(),
+ SecurityErrorCode.valueOf(ase.getSecurityErrorCode().name()), ase.getTableInfo(),
+ ase);
} else
throw new AccumuloException(exception);
}
@@ -71,7 +74,8 @@ public interface ConditionalWriter extends AutoCloseable {
/**
*
- * @return A copy of the mutation previously submitted by a user. The mutation will reference the same data, but the object may be different.
+ * @return A copy of the mutation previously submitted by a user. The mutation will reference
+ * the same data, but the object may be different.
*/
public ConditionalMutation getMutation() {
return mutation;
@@ -100,8 +104,9 @@ public interface ConditionalWriter extends AutoCloseable {
*/
VIOLATED,
/**
- * error occurred after mutation was sent to server, its unknown if the mutation was written. Although the status of the mutation is unknown, Accumulo
- * guarantees the mutation will not be written at a later point in time.
+ * error occurred after mutation was sent to server, its unknown if the mutation was written.
+ * Although the status of the mutation is unknown, Accumulo guarantees the mutation will not be
+ * written at a later point in time.
*/
UNKNOWN,
/**
@@ -112,11 +117,12 @@ public interface ConditionalWriter extends AutoCloseable {
}
/**
- * This method returns one result for each mutation passed to it. This method is thread safe. Multiple threads can safely use a single conditional writer.
- * Sharing a conditional writer between multiple threads may result in batching of request to tablet servers.
+ * This method returns one result for each mutation passed to it. This method is thread safe.
+ * Multiple threads can safely use a single conditional writer. Sharing a conditional writer
+ * between multiple threads may result in batching of request to tablet servers.
*
- * @return Result for each mutation submitted. The mutations may still be processing in the background when this method returns, if so the iterator will
- * block.
+ * @return Result for each mutation submitted. The mutations may still be processing in the
+ * background when this method returns, if so the iterator will block.
*/
Iterator<Result> write(Iterator<ConditionalMutation> mutations);
diff --git a/core/src/main/java/org/apache/accumulo/core/client/ConditionalWriterConfig.java b/core/src/main/java/org/apache/accumulo/core/client/ConditionalWriterConfig.java
index ae4577d..e6099dd 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/ConditionalWriterConfig.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/ConditionalWriterConfig.java
@@ -42,9 +42,10 @@ public class ConditionalWriterConfig {
private String classLoaderContext = null;
/**
- * A set of authorization labels that will be checked against the column visibility of each key in order to filter data. The authorizations passed in must be
- * a subset of the accumulo user's set of authorizations. If the accumulo user has authorizations (A1, A2) and authorizations (A2, A3) are passed, then an
- * exception will be thrown.
+ * A set of authorization labels that will be checked against the column visibility of each key in
+ * order to filter data. The authorizations passed in must be a subset of the accumulo user's set
+ * of authorizations. If the accumulo user has authorizations (A1, A2) and authorizations (A2, A3)
+ * are passed, then an exception will be thrown.
*
* <p>
* Any condition that is not visible with this set of authorizations will fail.
@@ -56,14 +57,15 @@ public class ConditionalWriterConfig {
}
/**
- * Sets the maximum amount of time an unresponsive server will be re-tried. When this timeout is exceeded, the {@link ConditionalWriter} should return the
- * mutation with an exception.<br>
+ * Sets the maximum amount of time an unresponsive server will be re-tried. When this timeout is
+ * exceeded, the {@link ConditionalWriter} should return the mutation with an exception.<br>
* For no timeout, set to zero, or {@link Long#MAX_VALUE} with {@link TimeUnit#MILLISECONDS}.
*
* <p>
- * {@link TimeUnit#MICROSECONDS} or {@link TimeUnit#NANOSECONDS} will be truncated to the nearest {@link TimeUnit#MILLISECONDS}.<br>
- * If this truncation would result in making the value zero when it was specified as non-zero, then a minimum value of one {@link TimeUnit#MILLISECONDS} will
- * be used.
+ * {@link TimeUnit#MICROSECONDS} or {@link TimeUnit#NANOSECONDS} will be truncated to the nearest
+ * {@link TimeUnit#MILLISECONDS}.<br>
+ * If this truncation would result in making the value zero when it was specified as non-zero,
+ * then a minimum value of one {@link TimeUnit#MILLISECONDS} will be used.
*
* <p>
* <b>Default:</b> {@link Long#MAX_VALUE} (no timeout)
@@ -83,7 +85,8 @@ public class ConditionalWriterConfig {
if (timeout == 0)
this.timeout = Long.MAX_VALUE;
else
- // make small, positive values that truncate to 0 when converted use the minimum millis instead
+ // make small, positive values that truncate to 0 when converted use the minimum millis
+ // instead
this.timeout = Math.max(1, timeUnit.toMillis(timeout));
return this;
}
@@ -138,8 +141,8 @@ public class ConditionalWriterConfig {
}
/**
- * Sets the name of the classloader context on this scanner. See the administration chapter of the user manual for details on how to configure and use
- * classloader contexts.
+ * Sets the name of the classloader context on this scanner. See the administration chapter of the
+ * user manual for details on how to configure and use classloader contexts.
*
* @param classLoaderContext
* name of the classloader context
diff --git a/core/src/main/java/org/apache/accumulo/core/client/Connector.java b/core/src/main/java/org/apache/accumulo/core/client/Connector.java
index e36cc82..585ba37 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/Connector.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/Connector.java
@@ -24,10 +24,11 @@ import org.apache.accumulo.core.client.admin.TableOperations;
import org.apache.accumulo.core.security.Authorizations;
/**
- * Connector connects to an Accumulo instance and allows the user to request readers and writers for the instance as well as various objects that permit
- * administrative operations.
+ * Connector connects to an Accumulo instance and allows the user to request readers and writers for
+ * the instance as well as various objects that permit administrative operations.
*
- * The Connector enforces security on the client side by forcing all API calls to be accompanied by user credentials.
+ * The Connector enforces security on the client side by forcing all API calls to be accompanied by
+ * user credentials.
*/
public abstract class Connector {
@@ -37,9 +38,10 @@ public abstract class Connector {
* @param tableName
* the name of the table to query
* @param authorizations
- * A set of authorization labels that will be checked against the column visibility of each key in order to filter data. The authorizations passed in
- * must be a subset of the accumulo user's set of authorizations. If the accumulo user has authorizations (A1, A2) and authorizations (A2, A3) are
- * passed, then an exception will be thrown.
+ * A set of authorization labels that will be checked against the column visibility of
+ * each key in order to filter data. The authorizations passed in must be a subset of the
+ * accumulo user's set of authorizations. If the accumulo user has authorizations (A1,
+ * A2) and authorizations (A2, A3) are passed, then an exception will be thrown.
* @param numQueryThreads
* the number of concurrent threads to spawn for querying
*
@@ -47,7 +49,8 @@ public abstract class Connector {
* @throws TableNotFoundException
* when the specified table doesn't exist
*/
- public abstract BatchScanner createBatchScanner(String tableName, Authorizations authorizations, int numQueryThreads) throws TableNotFoundException;
+ public abstract BatchScanner createBatchScanner(String tableName, Authorizations authorizations,
+ int numQueryThreads) throws TableNotFoundException;
/**
* Factory method to create a BatchDeleter connected to Accumulo.
@@ -55,35 +58,41 @@ public abstract class Connector {
* @param tableName
* the name of the table to query and delete from
* @param authorizations
- * A set of authorization labels that will be checked against the column visibility of each key in order to filter data. The authorizations passed in
- * must be a subset of the accumulo user's set of authorizations. If the accumulo user has authorizations (A1, A2) and authorizations (A2, A3) are
- * passed, then an exception will be thrown.
+ * A set of authorization labels that will be checked against the column visibility of
+ * each key in order to filter data. The authorizations passed in must be a subset of the
+ * accumulo user's set of authorizations. If the accumulo user has authorizations (A1,
+ * A2) and authorizations (A2, A3) are passed, then an exception will be thrown.
* @param numQueryThreads
* the number of concurrent threads to spawn for querying
* @param maxMemory
* size in bytes of the maximum memory to batch before writing
* @param maxLatency
- * size in milliseconds; set to 0 or Long.MAX_VALUE to allow the maximum time to hold a batch before writing
+ * size in milliseconds; set to 0 or Long.MAX_VALUE to allow the maximum time to hold a
+ * batch before writing
* @param maxWriteThreads
* the maximum number of threads to use for writing data to the tablet servers
*
* @return BatchDeleter object for configuring and deleting
* @throws TableNotFoundException
* when the specified table doesn't exist
- * @deprecated since 1.5.0; Use {@link #createBatchDeleter(String, Authorizations, int, BatchWriterConfig)} instead.
+ * @deprecated since 1.5.0; Use
+ * {@link #createBatchDeleter(String, Authorizations, int, BatchWriterConfig)}
+ * instead.
*/
@Deprecated
- public abstract BatchDeleter createBatchDeleter(String tableName, Authorizations authorizations, int numQueryThreads, long maxMemory, long maxLatency,
- int maxWriteThreads) throws TableNotFoundException;
+ public abstract BatchDeleter createBatchDeleter(String tableName, Authorizations authorizations,
+ int numQueryThreads, long maxMemory, long maxLatency, int maxWriteThreads)
+ throws TableNotFoundException;
/**
*
* @param tableName
* the name of the table to query and delete from
* @param authorizations
- * A set of authorization labels that will be checked against the column visibility of each key in order to filter data. The authorizations passed in
- * must be a subset of the accumulo user's set of authorizations. If the accumulo user has authorizations (A1, A2) and authorizations (A2, A3) are
- * passed, then an exception will be thrown.
+ * A set of authorization labels that will be checked against the column visibility of
+ * each key in order to filter data. The authorizations passed in must be a subset of the
+ * accumulo user's set of authorizations. If the accumulo user has authorizations (A1,
+ * A2) and authorizations (A2, A3) are passed, then an exception will be thrown.
* @param numQueryThreads
* the number of concurrent threads to spawn for querying
* @param config
@@ -92,8 +101,8 @@ public abstract class Connector {
* @since 1.5.0
*/
- public abstract BatchDeleter createBatchDeleter(String tableName, Authorizations authorizations, int numQueryThreads, BatchWriterConfig config)
- throws TableNotFoundException;
+ public abstract BatchDeleter createBatchDeleter(String tableName, Authorizations authorizations,
+ int numQueryThreads, BatchWriterConfig config) throws TableNotFoundException;
/**
* Factory method to create a BatchWriter connected to Accumulo.
@@ -103,7 +112,8 @@ public abstract class Connector {
* @param maxMemory
* size in bytes of the maximum memory to batch before writing
* @param maxLatency
- * time in milliseconds; set to 0 or Long.MAX_VALUE to allow the maximum time to hold a batch before writing
+ * time in milliseconds; set to 0 or Long.MAX_VALUE to allow the maximum time to hold a
+ * batch before writing
* @param maxWriteThreads
* the maximum number of threads to use for writing data to the tablet servers
*
@@ -113,7 +123,8 @@ public abstract class Connector {
* @deprecated since 1.5.0; Use {@link #createBatchWriter(String, BatchWriterConfig)} instead.
*/
@Deprecated
- public abstract BatchWriter createBatchWriter(String tableName, long maxMemory, long maxLatency, int maxWriteThreads) throws TableNotFoundException;
+ public abstract BatchWriter createBatchWriter(String tableName, long maxMemory, long maxLatency,
+ int maxWriteThreads) throws TableNotFoundException;
/**
* Factory method to create a BatchWriter connected to Accumulo.
@@ -126,16 +137,19 @@ public abstract class Connector {
* @since 1.5.0
*/
- public abstract BatchWriter createBatchWriter(String tableName, BatchWriterConfig config) throws TableNotFoundException;
+ public abstract BatchWriter createBatchWriter(String tableName, BatchWriterConfig config)
+ throws TableNotFoundException;
/**
- * Factory method to create a Multi-Table BatchWriter connected to Accumulo. Multi-table batch writers can queue data for multiple tables, which is good for
- * ingesting data into multiple tables from the same source
+ * Factory method to create a Multi-Table BatchWriter connected to Accumulo. Multi-table batch
+ * writers can queue data for multiple tables, which is good for ingesting data into multiple
+ * tables from the same source
*
* @param maxMemory
* size in bytes of the maximum memory to batch before writing
* @param maxLatency
- * size in milliseconds; set to 0 or Long.MAX_VALUE to allow the maximum time to hold a batch before writing
+ * size in milliseconds; set to 0 or Long.MAX_VALUE to allow the maximum time to hold a
+ * batch before writing
* @param maxWriteThreads
* the maximum number of threads to use for writing data to the tablet servers
*
@@ -143,11 +157,14 @@ public abstract class Connector {
* @deprecated since 1.5.0; Use {@link #createMultiTableBatchWriter(BatchWriterConfig)} instead.
*/
@Deprecated
- public abstract MultiTableBatchWriter createMultiTableBatchWriter(long maxMemory, long maxLatency, int maxWriteThreads);
+ public abstract MultiTableBatchWriter createMultiTableBatchWriter(long maxMemory, long maxLatency,
+ int maxWriteThreads);
/**
- * Factory method to create a Multi-Table BatchWriter connected to Accumulo. Multi-table batch writers can queue data for multiple tables. Also data for
- * multiple tables can be sent to a server in a single batch. Its an efficient way to ingest data into multiple tables from a single process.
+ * Factory method to create a Multi-Table BatchWriter connected to Accumulo. Multi-table batch
+ * writers can queue data for multiple tables. Also data for multiple tables can be sent to a
+ * server in a single batch. Its an efficient way to ingest data into multiple tables from a
+ * single process.
*
* @param config
* configuration used to create multi-table batch writer
@@ -163,15 +180,17 @@ public abstract class Connector {
* @param tableName
* the name of the table to query data from
* @param authorizations
- * A set of authorization labels that will be checked against the column visibility of each key in order to filter data. The authorizations passed in
- * must be a subset of the accumulo user's set of authorizations. If the accumulo user has authorizations (A1, A2) and authorizations (A2, A3) are
- * passed, then an exception will be thrown.
+ * A set of authorization labels that will be checked against the column visibility of
+ * each key in order to filter data. The authorizations passed in must be a subset of the
+ * accumulo user's set of authorizations. If the accumulo user has authorizations (A1,
+ * A2) and authorizations (A2, A3) are passed, then an exception will be thrown.
*
* @return Scanner object for configuring and querying data with
* @throws TableNotFoundException
* when the specified table doesn't exist
*/
- public abstract Scanner createScanner(String tableName, Authorizations authorizations) throws TableNotFoundException;
+ public abstract Scanner createScanner(String tableName, Authorizations authorizations)
+ throws TableNotFoundException;
/**
* Factory method to create a ConditionalWriter connected to Accumulo.
@@ -186,7 +205,8 @@ public abstract class Connector {
* when the specified table doesn't exist
* @since 1.6.0
*/
- public abstract ConditionalWriter createConditionalWriter(String tableName, ConditionalWriterConfig config) throws TableNotFoundException;
+ public abstract ConditionalWriter createConditionalWriter(String tableName,
+ ConditionalWriterConfig config) throws TableNotFoundException;
/**
* Accessor method for internal instance object.
@@ -210,14 +230,16 @@ public abstract class Connector {
public abstract TableOperations tableOperations();
/**
- * Retrieves a NamespaceOperations object to perform namespace functions, such as create and delete.
+ * Retrieves a NamespaceOperations object to perform namespace functions, such as create and
+ * delete.
*
* @return an object to manipulate namespaces
*/
public abstract NamespaceOperations namespaceOperations();
/**
- * Retrieves a SecurityOperations object to perform user security operations, such as creating users.
+ * Retrieves a SecurityOperations object to perform user security operations, such as creating
+ * users.
*
* @return an object to modify users and permissions
*/
diff --git a/core/src/main/java/org/apache/accumulo/core/client/Durability.java b/core/src/main/java/org/apache/accumulo/core/client/Durability.java
index 08b2092..ff42b54 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/Durability.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/Durability.java
@@ -32,11 +32,13 @@ public enum Durability {
*/
NONE,
/**
- * Write mutations the the write-ahead log. Data may be sitting the the servers output buffers, and not replicated anywhere.
+ * Write mutations the the write-ahead log. Data may be sitting the the servers output buffers,
+ * and not replicated anywhere.
*/
LOG,
/**
- * Write mutations to the write-ahead log, and ensure the data is stored on remote servers, but perhaps not on persistent storage.
+ * Write mutations to the write-ahead log, and ensure the data is stored on remote servers, but
+ * perhaps not on persistent storage.
*/
FLUSH,
/**
diff --git a/core/src/main/java/org/apache/accumulo/core/client/Instance.java b/core/src/main/java/org/apache/accumulo/core/client/Instance.java
index 8a70d4c..bbc06e7 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/Instance.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/Instance.java
@@ -25,7 +25,8 @@ import org.apache.accumulo.core.client.security.tokens.PasswordToken;
import org.apache.accumulo.core.conf.AccumuloConfiguration;
/**
- * This class represents the information a client needs to know to connect to an instance of accumulo.
+ * This class represents the information a client needs to know to connect to an instance of
+ * accumulo.
*
*/
public interface Instance {
@@ -83,10 +84,12 @@ public interface Instance {
* when a generic exception occurs
* @throws AccumuloSecurityException
* when a user's credentials are invalid
- * @deprecated since 1.5, use {@link #getConnector(String, AuthenticationToken)} with {@link PasswordToken}
+ * @deprecated since 1.5, use {@link #getConnector(String, AuthenticationToken)} with
+ * {@link PasswordToken}
*/
@Deprecated
- Connector getConnector(String user, byte[] pass) throws AccumuloException, AccumuloSecurityException;
+ Connector getConnector(String user, byte[] pass)
+ throws AccumuloException, AccumuloSecurityException;
/**
* Returns a connection to accumulo.
@@ -100,10 +103,12 @@ public interface Instance {
* when a generic exception occurs
* @throws AccumuloSecurityException
* when a user's credentials are invalid
- * @deprecated since 1.5, use {@link #getConnector(String, AuthenticationToken)} with {@link PasswordToken}
+ * @deprecated since 1.5, use {@link #getConnector(String, AuthenticationToken)} with
+ * {@link PasswordToken}
*/
@Deprecated
- Connector getConnector(String user, ByteBuffer pass) throws AccumuloException, AccumuloSecurityException;
+ Connector getConnector(String user, ByteBuffer pass)
+ throws AccumuloException, AccumuloSecurityException;
/**
* Returns a connection to this instance of accumulo.
@@ -117,17 +122,22 @@ public interface Instance {
* when a generic exception occurs
* @throws AccumuloSecurityException
* when a user's credentials are invalid
- * @deprecated since 1.5, use {@link #getConnector(String, AuthenticationToken)} with {@link PasswordToken}
+ * @deprecated since 1.5, use {@link #getConnector(String, AuthenticationToken)} with
+ * {@link PasswordToken}
*/
@Deprecated
- Connector getConnector(String user, CharSequence pass) throws AccumuloException, AccumuloSecurityException;
+ Connector getConnector(String user, CharSequence pass)
+ throws AccumuloException, AccumuloSecurityException;
/**
* Returns the AccumuloConfiguration to use when interacting with this instance.
*
- * @return the AccumuloConfiguration that specifies properties related to interacting with this instance
- * @deprecated since 1.6.0. This method makes very little sense in the context of the client API and never should have been exposed.
- * @see InstanceOperations#getSystemConfiguration() for client-side reading of the server-side configuration.
+ * @return the AccumuloConfiguration that specifies properties related to interacting with this
+ * instance
+ * @deprecated since 1.6.0. This method makes very little sense in the context of the client API
+ * and never should have been exposed.
+ * @see InstanceOperations#getSystemConfiguration() for client-side reading of the server-side
+ * configuration.
*/
@Deprecated
AccumuloConfiguration getConfiguration();
@@ -137,7 +147,8 @@ public interface Instance {
*
* @param conf
* accumulo configuration
- * @deprecated since 1.6.0. This method makes very little sense in the context of the client API and never should have been exposed.
+ * @deprecated since 1.6.0. This method makes very little sense in the context of the client API
+ * and never should have been exposed.
* @see InstanceOperations#setProperty(String, String)
*/
@Deprecated
@@ -149,9 +160,10 @@ public interface Instance {
* @param principal
* a valid accumulo user
* @param token
- * Use the token type configured for the Accumulo instance you are connecting to. An Accumulo instance with default configurations will use
- * {@link PasswordToken}
+ * Use the token type configured for the Accumulo instance you are connecting to. An
+ * Accumulo instance with default configurations will use {@link PasswordToken}
* @since 1.5.0
*/
- Connector getConnector(String principal, AuthenticationToken token) throws AccumuloException, AccumuloSecurityException;
+ Connector getConnector(String principal, AuthenticationToken token)
+ throws AccumuloException, AccumuloSecurityException;
}
diff --git a/core/src/main/java/org/apache/accumulo/core/client/IsolatedScanner.java b/core/src/main/java/org/apache/accumulo/core/client/IsolatedScanner.java
index f1065f8..d4120ee 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/IsolatedScanner.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/IsolatedScanner.java
@@ -33,8 +33,10 @@ import org.apache.accumulo.core.data.Value;
import org.apache.hadoop.io.Text;
/**
- * A scanner that presents a row isolated view of an accumulo table. Rows are buffered in memory on the client side. If you think your rows may not fit into
- * memory, then you can provide an alternative row buffer factory to the constructor. This would allow rows to be buffered to disk for example.
+ * A scanner that presents a row isolated view of an accumulo table. Rows are buffered in memory on
+ * the client side. If you think your rows may not fit into memory, then you can provide an
+ * alternative row buffer factory to the constructor. This would allow rows to be buffered to disk
+ * for example.
*
*/
@@ -133,8 +135,8 @@ public class IsolatedScanner extends ScannerOptions implements Scanner {
}
}
- public RowBufferingIterator(Scanner scanner, ScannerOptions opts, Range range, long timeout, int batchSize, long readaheadThreshold,
- RowBufferFactory bufferFactory) {
+ public RowBufferingIterator(Scanner scanner, ScannerOptions opts, Range range, long timeout,
+ int batchSize, long readaheadThreshold, RowBufferFactory bufferFactory) {
this.scanner = scanner;
this.opts = new ScannerOptions(opts);
this.range = range;
@@ -235,7 +237,8 @@ public class IsolatedScanner extends ScannerOptions implements Scanner {
@Override
public Iterator<Entry<Key,Value>> iterator() {
- return new RowBufferingIterator(scanner, this, range, timeOut, batchSize, readaheadThreshold, bufferFactory);
+ return new RowBufferingIterator(scanner, this, range, timeOut, batchSize, readaheadThreshold,
+ bufferFactory);
}
@Deprecated
@@ -294,7 +297,8 @@ public class IsolatedScanner extends ScannerOptions implements Scanner {
@Override
public void setReadaheadThreshold(long batches) {
if (0 > batches) {
- throw new IllegalArgumentException("Number of batches before read-ahead must be non-negative");
+ throw new IllegalArgumentException(
+ "Number of batches before read-ahead must be non-negative");
}
this.readaheadThreshold = batches;
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 fdaacd7..e2a0b62 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
@@ -36,7 +36,8 @@ import org.apache.hadoop.io.Writable;
import org.apache.hadoop.io.WritableUtils;
/**
- * Configure an iterator for minc, majc, and/or scan. By default, IteratorSetting will be configured for scan.
+ * Configure an iterator for minc, majc, and/or scan. By default, IteratorSetting will be configured
+ * for scan.
*
* Every iterator has a priority, a name, a class, a set of scopes, and configuration parameters.
*
@@ -55,7 +56,8 @@ public class IteratorSetting implements Writable {
private Map<String,String> properties;
/**
- * Get layer at which this iterator applies. See {@link #setPriority(int)} for how the priority is used.
+ * Get layer at which this iterator applies. See {@link #setPriority(int)} for how the priority is
+ * used.
*
* @return the priority of this Iterator
*/
@@ -67,8 +69,8 @@ public class IteratorSetting implements Writable {
* Set layer at which this iterator applies.
*
* @param priority
- * determines the order in which iterators are applied (system iterators are always applied first, then user-configured iterators, lowest priority
- * first)
+ * determines the order in which iterators are applied (system iterators are always
+ * applied first, then user-configured iterators, lowest priority first)
*/
public void setPriority(int priority) {
checkArgument(priority > 0, "property must be strictly positive");
@@ -85,7 +87,8 @@ public class IteratorSetting implements Writable {
}
/**
- * Set the iterator's name. Must be a simple alphanumeric identifier. The iterator name also may not contain a dot/period.
+ * Set the iterator's name. Must be a simple alphanumeric identifier. The iterator name also may
+ * not contain a dot/period.
*/
public void setName(String name) {
checkArgument(name != null, "name is null");
@@ -103,8 +106,8 @@ public class IteratorSetting implements Writable {
}
/**
- * Set the name of the class that implements the iterator. The class does not have to be present on the client, but it must be available to all tablet
- * servers.
+ * Set the name of the class that implements the iterator. The class does not have to be present
+ * on the client, but it must be available to all tablet servers.
*/
public void setIteratorClass(String iteratorClass) {
checkArgument(iteratorClass != null, "iteratorClass is null");
@@ -112,7 +115,8 @@ public class IteratorSetting implements Writable {
}
/**
- * Constructs an iterator setting configured for the scan scope with no parameters. (Parameters can be added later.)
+ * Constructs an iterator setting configured for the scan scope with no parameters. (Parameters
+ * can be added later.)
*
* @param priority
* the priority for the iterator (see {@link #setPriority(int)})
@@ -126,7 +130,8 @@ public class IteratorSetting implements Writable {
}
/**
- * Constructs an iterator setting configured for the specified scopes with the specified parameters.
+ * Constructs an iterator setting configured for the specified scopes with the specified
+ * parameters.
*
* @param priority
* the priority for the iterator (see {@link #setPriority(int)})
@@ -137,7 +142,8 @@ public class IteratorSetting implements Writable {
* @param properties
* any properties for the iterator
*/
- public IteratorSetting(int priority, String name, String iteratorClass, Map<String,String> properties) {
+ public IteratorSetting(int priority, String name, String iteratorClass,
+ Map<String,String> properties) {
setPriority(priority);
setName(name);
setIteratorClass(iteratorClass);
@@ -146,22 +152,23 @@ public class IteratorSetting implements Writable {
}
/**
- * Constructs an iterator setting using the given class's SimpleName for the iterator name. The iterator setting will be configured for the scan scope with no
- * parameters.
+ * Constructs an iterator setting using the given class's SimpleName for the iterator name. The
+ * iterator setting will be configured for the scan scope with no parameters.
*
* @param priority
* the priority for the iterator (see {@link #setPriority(int)})
* @param iteratorClass
* the class for the iterator
*/
- public IteratorSetting(int priority, Class<? extends SortedKeyValueIterator<Key,Value>> iteratorClass) {
+ public IteratorSetting(int priority,
+ Class<? extends SortedKeyValueIterator<Key,Value>> iteratorClass) {
this(priority, iteratorClass.getSimpleName(), iteratorClass.getName());
}
/**
*
- * Constructs an iterator setting using the given class's SimpleName for the iterator name and configured for the specified scopes with the specified
- * parameters.
+ * Constructs an iterator setting using the given class's SimpleName for the iterator name and
+ * configured for the specified scopes with the specified parameters.
*
* @param priority
* the priority for the iterator (see {@link #setPriority(int)})
@@ -170,7 +177,9 @@ public class IteratorSetting implements Writable {
* @param properties
* any properties for the iterator
*/
- public IteratorSetting(int priority, Class<? extends SortedKeyValueIterator<Key,Value>> iteratorClass, Map<String,String> properties) {
+ public IteratorSetting(int priority,
+ Class<? extends SortedKeyValueIterator<Key,Value>> iteratorClass,
+ Map<String,String> properties) {
this(priority, iteratorClass.getSimpleName(), iteratorClass.getName(), properties);
}
@@ -184,12 +193,14 @@ public class IteratorSetting implements Writable {
* @param iteratorClass
* the class for the iterator
*/
- public IteratorSetting(int priority, String name, Class<? extends SortedKeyValueIterator<Key,Value>> iteratorClass) {
+ public IteratorSetting(int priority, String name,
+ Class<? extends SortedKeyValueIterator<Key,Value>> iteratorClass) {
this(priority, name, iteratorClass.getName());
}
/**
- * Constructs an iterator setting using the provided name and the provided class's name for the scan scope with the provided parameters.
+ * Constructs an iterator setting using the provided name and the provided class's name for the
+ * scan scope with the provided parameters.
*
* @param priority
* The priority for the iterator (see {@link #setPriority(int)})
@@ -202,7 +213,9 @@ public class IteratorSetting implements Writable {
*
* @since 1.6.0
*/
- public IteratorSetting(int priority, String name, Class<? extends SortedKeyValueIterator<Key,Value>> iteratorClass, Map<String,String> properties) {
+ public IteratorSetting(int priority, String name,
+ Class<? extends SortedKeyValueIterator<Key,Value>> iteratorClass,
+ Map<String,String> properties) {
this(priority, name, iteratorClass.getName(), properties);
}
@@ -335,7 +348,8 @@ public class IteratorSetting implements Writable {
}
/**
- * A convenience class for passing column family and column qualifiers to iterator configuration methods.
+ * A convenience class for passing column family and column qualifiers to iterator configuration
+ * methods.
*/
public static class Column extends Pair<Text,Text> {
diff --git a/core/src/main/java/org/apache/accumulo/core/client/MultiTableBatchWriter.java b/core/src/main/java/org/apache/accumulo/core/client/MultiTableBatchWriter.java
index 5495598..399eda8 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/MultiTableBatchWriter.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/MultiTableBatchWriter.java
@@ -17,8 +17,9 @@
package org.apache.accumulo.core.client;
/**
- * This class enables efficient batch writing to multiple tables. When creating a batch writer for each table, each has its own memory and network resources.
- * Using this class these resources may be shared among multiple tables.
+ * This class enables efficient batch writing to multiple tables. When creating a batch writer for
+ * each table, each has its own memory and network resources. Using this class these resources may
+ * be shared among multiple tables.
*
*/
public interface MultiTableBatchWriter {
@@ -36,7 +37,8 @@ public interface MultiTableBatchWriter {
* @throws TableNotFoundException
* when the table does not exist
*/
- BatchWriter getBatchWriter(String table) throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
+ BatchWriter getBatchWriter(String table)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
/**
* Send mutations for all tables to accumulo.
diff --git a/core/src/main/java/org/apache/accumulo/core/client/MutationsRejectedException.java b/core/src/main/java/org/apache/accumulo/core/client/MutationsRejectedException.java
index 676957a..8bade1c 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/MutationsRejectedException.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/MutationsRejectedException.java
@@ -65,13 +65,17 @@ public class MutationsRejectedException extends AccumuloException {
* @param unknownErrors
* number of unknown errors
*
- * @deprecated since 1.6.0, see {@link #MutationsRejectedException(Instance, List, Map, Collection, int, Throwable)}
+ * @deprecated since 1.6.0, see
+ * {@link #MutationsRejectedException(Instance, List, Map, Collection, int, Throwable)}
*/
@Deprecated
- public MutationsRejectedException(List<ConstraintViolationSummary> cvsList, HashMap<org.apache.accumulo.core.data.KeyExtent,Set<SecurityErrorCode>> hashMap,
+ public MutationsRejectedException(List<ConstraintViolationSummary> cvsList,
+ HashMap<org.apache.accumulo.core.data.KeyExtent,Set<SecurityErrorCode>> hashMap,
Collection<String> serverSideErrors, int unknownErrors, Throwable cause) {
- super("# constraint violations : " + cvsList.size() + " security codes: " + hashMap.values() + " # server errors " + serverSideErrors.size()
- + " # exceptions " + unknownErrors, cause);
+ super(
+ "# constraint violations : " + cvsList.size() + " security codes: " + hashMap.values()
+ + " # server errors " + serverSideErrors.size() + " # exceptions " + unknownErrors,
+ cause);
this.cvsl = cvsList;
this.af = transformKeys(hashMap, TabletIdImpl.KE_2_TID_OLD);
this.es = serverSideErrors;
@@ -88,13 +92,18 @@ public class MutationsRejectedException extends AccumuloException {
* @param unknownErrors
* number of unknown errors
*
- * @deprecated since 1.7.0 see {@link #MutationsRejectedException(Instance, List, Map, Collection, int, Throwable)}
+ * @deprecated since 1.7.0 see
+ * {@link #MutationsRejectedException(Instance, List, Map, Collection, int, Throwable)}
*/
@Deprecated
public MutationsRejectedException(Instance instance, List<ConstraintViolationSummary> cvsList,
- HashMap<org.apache.accumulo.core.data.KeyExtent,Set<SecurityErrorCode>> hashMap, Collection<String> serverSideErrors, int unknownErrors, Throwable cause) {
- super("# constraint violations : " + cvsList.size() + " security codes: " + format(transformKeys(hashMap, TabletIdImpl.KE_2_TID_OLD), instance)
- + " # server errors " + serverSideErrors.size() + " # exceptions " + unknownErrors, cause);
+ HashMap<org.apache.accumulo.core.data.KeyExtent,Set<SecurityErrorCode>> hashMap,
+ Collection<String> serverSideErrors, int unknownErrors, Throwable cause) {
+ super(
+ "# constraint violations : " + cvsList.size() + " security codes: "
+ + format(transformKeys(hashMap, TabletIdImpl.KE_2_TID_OLD), instance)
+ + " # server errors " + serverSideErrors.size() + " # exceptions " + unknownErrors,
+ cause);
this.cvsl = cvsList;
this.af = transformKeys(hashMap, TabletIdImpl.KE_2_TID_OLD);
this.es = serverSideErrors;
@@ -114,9 +123,11 @@ public class MutationsRejectedException extends AccumuloException {
*
* @since 1.7.0
*/
- public MutationsRejectedException(Instance instance, List<ConstraintViolationSummary> cvsList, Map<TabletId,Set<SecurityErrorCode>> hashMap,
- Collection<String> serverSideErrors, int unknownErrors, Throwable cause) {
- super("# constraint violations : " + cvsList.size() + " security codes: " + format(hashMap, instance) + " # server errors " + serverSideErrors.size()
+ public MutationsRejectedException(Instance instance, List<ConstraintViolationSummary> cvsList,
+ Map<TabletId,Set<SecurityErrorCode>> hashMap, Collection<String> serverSideErrors,
+ int unknownErrors, Throwable cause) {
+ super("# constraint violations : " + cvsList.size() + " security codes: "
+ + format(hashMap, instance) + " # server errors " + serverSideErrors.size()
+ " # exceptions " + unknownErrors, cause);
this.cvsl = cvsList;
this.af = hashMap;
@@ -128,7 +139,8 @@ public class MutationsRejectedException extends AccumuloException {
Map<String,Set<SecurityErrorCode>> result = new HashMap<>();
for (Entry<TabletId,Set<SecurityErrorCode>> entry : hashMap.entrySet()) {
- String tableInfo = Tables.getPrintableTableInfoFromId(instance, entry.getKey().getTableId().toString());
+ String tableInfo = Tables.getPrintableTableInfoFromId(instance,
+ entry.getKey().getTableId().toString());
if (!result.containsKey(tableInfo)) {
result.put(tableInfo, new HashSet<SecurityErrorCode>());
diff --git a/core/src/main/java/org/apache/accumulo/core/client/NamespaceExistsException.java b/core/src/main/java/org/apache/accumulo/core/client/NamespaceExistsException.java
index 223ab3f..aa31717 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/NamespaceExistsException.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/NamespaceExistsException.java
@@ -37,9 +37,11 @@ public class NamespaceExistsException extends Exception {
* the specific reason why it failed
*/
public NamespaceExistsException(String namespaceId, String namespaceName, String description) {
- super("Namespace" + (namespaceName != null && !namespaceName.isEmpty() ? " " + namespaceName : "")
- + (namespaceId != null && !namespaceId.isEmpty() ? " (Id=" + namespaceId + ")" : "") + " exists"
- + (description != null && !description.isEmpty() ? " (" + description + ")" : ""));
+ super(
+ "Namespace" + (namespaceName != null && !namespaceName.isEmpty() ? " " + namespaceName : "")
+ + (namespaceId != null && !namespaceId.isEmpty() ? " (Id=" + namespaceId + ")" : "")
+ + " exists"
+ + (description != null && !description.isEmpty() ? " (" + description + ")" : ""));
}
/**
@@ -52,7 +54,8 @@ public class NamespaceExistsException extends Exception {
* @param cause
* the exception that caused this failure
*/
- public NamespaceExistsException(String namespaceId, String namespaceName, String description, Throwable cause) {
+ public NamespaceExistsException(String namespaceId, String namespaceName, String description,
+ Throwable cause) {
this(namespaceId, namespaceName, description);
super.initCause(cause);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/client/NamespaceNotEmptyException.java b/core/src/main/java/org/apache/accumulo/core/client/NamespaceNotEmptyException.java
index d5542bf..854be60 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/NamespaceNotEmptyException.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/NamespaceNotEmptyException.java
@@ -36,9 +36,11 @@ public class NamespaceNotEmptyException extends Exception {
* the specific reason why it failed
*/
public NamespaceNotEmptyException(String namespaceId, String namespaceName, String description) {
- super("Namespace" + (namespaceName != null && !namespaceName.isEmpty() ? " " + namespaceName : "")
- + (namespaceId != null && !namespaceId.isEmpty() ? " (Id=" + namespaceId + ")" : "") + " it not empty, contains at least one table"
- + (description != null && !description.isEmpty() ? " (" + description + ")" : ""));
+ super(
+ "Namespace" + (namespaceName != null && !namespaceName.isEmpty() ? " " + namespaceName : "")
+ + (namespaceId != null && !namespaceId.isEmpty() ? " (Id=" + namespaceId + ")" : "")
+ + " it not empty, contains at least one table"
+ + (description != null && !description.isEmpty() ? " (" + description + ")" : ""));
this.namespace = namespaceName;
}
@@ -52,7 +54,8 @@ public class NamespaceNotEmptyException extends Exception {
* @param cause
* the exception that caused this failure
*/
- public NamespaceNotEmptyException(String namespaceId, String namespaceName, String description, Throwable cause) {
+ public NamespaceNotEmptyException(String namespaceId, String namespaceName, String description,
+ Throwable cause) {
this(namespaceId, namespaceName, description);
super.initCause(cause);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/client/NamespaceNotFoundException.java b/core/src/main/java/org/apache/accumulo/core/client/NamespaceNotFoundException.java
index e330d69..a12ba45 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/NamespaceNotFoundException.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/NamespaceNotFoundException.java
@@ -39,9 +39,11 @@ public class NamespaceNotFoundException extends Exception {
* the specific reason why it failed
*/
public NamespaceNotFoundException(String namespaceId, String namespaceName, String description) {
- super("Namespace" + (namespaceName != null && !namespaceName.isEmpty() ? " " + namespaceName : "")
- + (namespaceId != null && !namespaceId.isEmpty() ? " (Id=" + namespaceId + ")" : "") + " does not exist"
- + (description != null && !description.isEmpty() ? " (" + description + ")" : ""));
+ super(
+ "Namespace" + (namespaceName != null && !namespaceName.isEmpty() ? " " + namespaceName : "")
+ + (namespaceId != null && !namespaceId.isEmpty() ? " (Id=" + namespaceId + ")" : "")
+ + " does not exist"
+ + (description != null && !description.isEmpty() ? " (" + description + ")" : ""));
this.namespace = namespaceName;
}
@@ -55,7 +57,8 @@ public class NamespaceNotFoundException extends Exception {
* @param cause
* the exception that caused this failure
*/
- public NamespaceNotFoundException(String namespaceId, String namespaceName, String description, Throwable cause) {
+ public NamespaceNotFoundException(String namespaceId, String namespaceName, String description,
+ Throwable cause) {
this(namespaceId, namespaceName, description);
super.initCause(cause);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/client/RowIterator.java b/core/src/main/java/org/apache/accumulo/core/client/RowIterator.java
index c8dab71..6fc1455 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/RowIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/RowIterator.java
@@ -44,7 +44,8 @@ public class RowIterator implements Iterator<Iterator<Entry<Key,Value>>> {
private boolean disabled = false;
/**
- * SingleRowIter must be passed a PeekingIterator so that it can peek at the next entry to see if it belongs in the current row or not.
+ * SingleRowIter must be passed a PeekingIterator so that it can peek at the next entry to see
+ * if it belongs in the current row or not.
*/
public SingleRowIter(PeekingIterator<Entry<Key,Value>> source) {
this.source = source;
@@ -83,7 +84,8 @@ public class RowIterator implements Iterator<Iterator<Entry<Key,Value>>> {
}
/**
- * Get a count of entries read from the row (only equals the number of entries in the row when the row has been read fully).
+ * Get a count of entries read from the row (only equals the number of entries in the row when
+ * the row has been read fully).
*/
public long getCount() {
return count;
@@ -120,8 +122,9 @@ public class RowIterator implements Iterator<Iterator<Entry<Key,Value>>> {
/**
* Returns true if there is at least one more row to get.
*
- * If the last row hasn't been fully read, this method will read through the end of the last row so it can determine if the underlying iterator has a next
- * row. The last row is disabled from future use.
+ * If the last row hasn't been fully read, this method will read through the end of the last row
+ * so it can determine if the underlying iterator has a next row. The last row is disabled from
+ * future use.
*/
@Override
public boolean hasNext() {
diff --git a/core/src/main/java/org/apache/accumulo/core/client/SampleNotPresentException.java b/core/src/main/java/org/apache/accumulo/core/client/SampleNotPresentException.java
index c70a898..187cfc0 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/SampleNotPresentException.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/SampleNotPresentException.java
@@ -18,7 +18,8 @@
package org.apache.accumulo.core.client;
/**
- * Exception thrown when a table does not have sampling configured or when sampling is configured but it differs from what was requested.
+ * Exception thrown when a table does not have sampling configured or when sampling is configured
+ * but it differs from what was requested.
*
* @since 1.8.0
*/
diff --git a/core/src/main/java/org/apache/accumulo/core/client/Scanner.java b/core/src/main/java/org/apache/accumulo/core/client/Scanner.java
index 372ee42..03139e4 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/Scanner.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/Scanner.java
@@ -21,14 +21,16 @@ import org.apache.accumulo.core.data.Range;
/**
* Scans a table over a given range.
*
- * "Clients can iterate over multiple column families, and there are several mechanisms for limiting the rows, columns, and timestamps traversed by a scan. For
- * example, we could restrict [a] scan ... to only produce anchors whose columns match [a] regular expression ..., or to only produce anchors whose timestamps
- * fall within ten days of the current time."
+ * "Clients can iterate over multiple column families, and there are several mechanisms for limiting
+ * the rows, columns, and timestamps traversed by a scan. For example, we could restrict [a] scan
+ * ... to only produce anchors whose columns match [a] regular expression ..., or to only produce
+ * anchors whose timestamps fall within ten days of the current time."
*/
public interface Scanner extends ScannerBase {
/**
- * 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.
*
* @param timeOut
* in seconds
@@ -70,24 +72,28 @@ public interface Scanner extends ScannerBase {
void setBatchSize(int size);
/**
- * Returns the batch size (number of Key/Value pairs) that will be fetched at a time from a tablet server.
+ * Returns the batch size (number of Key/Value pairs) that will be fetched at a time from a tablet
+ * server.
*
* @return the batch size configured for this scanner
*/
int getBatchSize();
/**
- * Enables row isolation. Writes that occur to a row after a scan of that row has begun will not be seen if this option is enabled.
+ * Enables row isolation. Writes that occur to a row after a scan of that row has begun will not
+ * be seen if this option is enabled.
*/
void enableIsolation();
/**
- * Disables row isolation. Writes that occur to a row after a scan of that row has begun may be seen if this option is enabled.
+ * Disables row isolation. Writes that occur to a row after a scan of that row has begun may be
+ * seen if this option is enabled.
*/
void disableIsolation();
/**
- * The number of batches of Key/Value pairs returned before the {@link Scanner} will begin to prefetch the next batch
+ * The number of batches of Key/Value pairs returned before the {@link Scanner} will begin to
+ * prefetch the next batch
*
* @return Number of batches before read-ahead begins
* @since 1.6.0
@@ -95,7 +101,8 @@ public interface Scanner extends ScannerBase {
long getReadaheadThreshold();
/**
- * Sets the number of batches of Key/Value pairs returned before the {@link Scanner} will begin to prefetch the next batch
+ * Sets the number of batches of Key/Value pairs returned before the {@link Scanner} will begin to
+ * prefetch the next batch
*
* @param batches
* Non-negative number of batches
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 2110050..6ec3618 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
@@ -37,8 +37,9 @@ public interface ScannerBase extends Iterable<Entry<Key,Value>>, AutoCloseable {
* Add a server-side scan iterator.
*
* @param cfg
- * fully specified scan-time iterator, including all options for the iterator. Any changes to the iterator setting after this call are not propagated
- * to the stored iterator.
+ * fully specified scan-time iterator, including all options for the iterator. Any
+ * changes to the iterator setting after this call are not propagated to the stored
+ * iterator.
* @throws IllegalArgumentException
* if the setting conflicts with existing iterators
*/
@@ -53,8 +54,9 @@ public interface ScannerBase extends Iterable<Entry<Key,Value>>, AutoCloseable {
void removeScanIterator(String iteratorName);
/**
- * Update the options for an iterator. Note that this does <b>not</b> change the iterator options during a scan, it just replaces the given option on a
- * configured iterator before a scan is started.
+ * Update the options for an iterator. Note that this does <b>not</b> change the iterator options
+ * during a scan, it just replaces the given option on a configured iterator before a scan is
+ * started.
*
* @param iteratorName
* the name of the iterator to change
@@ -66,15 +68,17 @@ public interface ScannerBase extends Iterable<Entry<Key,Value>>, AutoCloseable {
void updateScanIteratorOption(String iteratorName, String key, String 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. To fetch multiple column families call this function multiple times.
+ * 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. To fetch multiple column
+ * families call this function multiple times.
*
* <p>
* This can help limit which locality groups are read on the server side.
*
* <p>
- * When used in conjunction with custom iterators, the set of column families fetched is passed to the top iterator's seek method. Custom iterators may change
- * this set of column families when calling seek on their source.
+ * When used in conjunction with custom iterators, the set of column families fetched is passed to
+ * the top iterator's seek method. Custom iterators may change this set of column families when
+ * calling seek on their source.
*
* @param col
* the column family to be fetched
@@ -82,22 +86,28 @@ public interface ScannerBase extends Iterable<Entry<Key,Value>>, AutoCloseable {
void fetchColumnFamily(Text col);
/**
- * Adds a column to the list of columns that will be fetched by this scanner. The column is identified by family and qualifier. By default when no columns
- * have been added the scanner fetches all columns.
+ * Adds a column to the list of columns that will be fetched by this scanner. The column is
+ * identified by family and qualifier. By default when no columns have been added the scanner
+ * fetches all columns.
*
* <p>
- * <b>WARNING</b>. Using this method with custom iterators may have unexpected results. Iterators have control over which column families are fetched. However
- * iterators have no control over which column qualifiers are fetched. When this method is called it activates a system iterator that only allows the
- * requested family/qualifier pairs through. This low level filtering prevents custom iterators from requesting additional column families when calling seek.
+ * <b>WARNING</b>. Using this method with custom iterators may have unexpected results. Iterators
+ * have control over which column families are fetched. However iterators have no control over
+ * which column qualifiers are fetched. When this method is called it activates a system iterator
+ * that only allows the requested family/qualifier pairs through. This low level filtering
+ * prevents custom iterators from requesting additional column families when calling seek.
*
* <p>
- * For an example, assume fetchColumns(A, Q1) and fetchColumns(B,Q1) is called on a scanner and a custom iterator is configured. The families (A,B) will be
- * passed to the seek method of the custom iterator. If the custom iterator seeks its source iterator using the families (A,B,C), it will never see any data
- * from C because the system iterator filtering A:Q1 and B:Q1 will prevent the C family from getting through. ACCUMULO-3905 also has an example of the type of
+ * For an example, assume fetchColumns(A, Q1) and fetchColumns(B,Q1) is called on a scanner and a
+ * custom iterator is configured. The families (A,B) will be passed to the seek method of the
+ * custom iterator. If the custom iterator seeks its source iterator using the families (A,B,C),
+ * it will never see any data from C because the system iterator filtering A:Q1 and B:Q1 will
+ * prevent the C family from getting through. ACCUMULO-3905 also has an example of the type of
* problem this method can cause.
*
* <p>
- * tl;dr If using a custom iterator with a seek method that adds column families, then may want to avoid using this method.
+ * tl;dr If using a custom iterator with a seek method that adds column families, then may want to
+ * avoid using this method.
*
* @param colFam
* the column family of the column to be fetched
@@ -116,7 +126,8 @@ public interface ScannerBase extends Iterable<Entry<Key,Value>>, AutoCloseable {
void fetchColumn(Column column);
/**
- * Clears the columns to be fetched (useful for resetting the scanner for reuse). Once cleared, the scanner will fetch all columns.
+ * Clears the columns to be fetched (useful for resetting the scanner for reuse). Once cleared,
+ * the scanner will fetch all columns.
*/
void clearColumns();
@@ -126,8 +137,8 @@ public interface ScannerBase extends Iterable<Entry<Key,Value>>, AutoCloseable {
void clearScanIterators();
/**
- * 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.
+ * 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.
@@ -138,10 +149,12 @@ public interface ScannerBase extends Iterable<Entry<Key,Value>>, AutoCloseable {
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.
*
* <p>
- * Setting the timeout to zero (with any time unit) or {@link Long#MAX_VALUE} (with {@link TimeUnit#MILLISECONDS}) means no timeout.
+ * 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
@@ -160,7 +173,8 @@ public interface ScannerBase extends Iterable<Entry<Key,Value>>, AutoCloseable {
long getTimeout(TimeUnit timeUnit);
/**
- * Closes any underlying connections on the scanner. This may invalidate any iterators derived from the Scanner, causing them to throw exceptions.
+ * Closes any underlying connections on the scanner. This may invalidate any iterators derived
+ * from the Scanner, causing them to throw exceptions.
*
* @since 1.5.0
*/
@@ -176,12 +190,13 @@ public interface ScannerBase extends Iterable<Entry<Key,Value>>, AutoCloseable {
Authorizations getAuthorizations();
/**
- * Setting this will cause the scanner to read sample data, as long as that sample data was generated with the given configuration. By default this is not set
- * and all data is read.
+ * Setting this will cause the scanner to read sample data, as long as that sample data was
+ * generated with the given configuration. By default this is not set and all data is read.
*
* <p>
- * One way to use this method is as follows, where the sampler configuration is obtained from the table configuration. Sample data can be generated in many
- * different ways, so its important to verify the sample data configuration meets expectations.
+ * One way to use this method is as follows, where the sampler configuration is obtained from the
+ * table configuration. Sample data can be generated in many different ways, so its important to
+ * verify the sample data configuration meets expectations.
*
* <pre>
* <code>
@@ -194,11 +209,13 @@ public interface ScannerBase extends Iterable<Entry<Key,Value>>, AutoCloseable {
* </pre>
*
* <p>
- * Of course this is not the only way to obtain a {@link SamplerConfiguration}, it could be a constant, configuration, etc.
+ * Of course this is not the only way to obtain a {@link SamplerConfiguration}, it could be a
+ * constant, configuration, etc.
*
* <p>
- * If sample data is not present or sample data was generated with a different configuration, then the scanner iterator will throw a
- * {@link SampleNotPresentException}. Also if a table's sampler configuration is changed while a scanner is iterating over a table, a
+ * If sample data is not present or sample data was generated with a different configuration, then
+ * the scanner iterator will throw a {@link SampleNotPresentException}. Also if a table's sampler
+ * configuration is changed while a scanner is iterating over a table, a
* {@link SampleNotPresentException} may be thrown.
*
* @since 1.8.0
@@ -212,17 +229,20 @@ public interface ScannerBase extends Iterable<Entry<Key,Value>>, AutoCloseable {
SamplerConfiguration getSamplerConfiguration();
/**
- * Clears sampler configuration making a scanner read all data. After calling this, {@link #getSamplerConfiguration()} should return null.
+ * Clears sampler configuration making a scanner read all data. After calling this,
+ * {@link #getSamplerConfiguration()} should return null.
*
* @since 1.8.0
*/
void clearSamplerConfiguration();
/**
- * This setting determines how long a scanner will wait to fill the returned batch. By default, a scanner wait until the batch is full.
+ * This setting determines how long a scanner will wait to fill the returned batch. By default, a
+ * scanner wait until the batch is full.
*
* <p>
- * Setting the timeout to zero (with any time unit) or {@link Long#MAX_VALUE} (with {@link TimeUnit#MILLISECONDS}) means no timeout.
+ * 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
@@ -241,8 +261,8 @@ public interface ScannerBase extends Iterable<Entry<Key,Value>>, AutoCloseable {
long getBatchTimeout(TimeUnit timeUnit);
/**
- * Sets the name of the classloader context on this scanner. See the administration chapter of the user manual for details on how to configure and use
- * classloader contexts.
+ * Sets the name of the classloader context on this scanner. See the administration chapter of the
+ * user manual for details on how to configure and use classloader contexts.
*
* @param classLoaderContext
* name of the classloader context
diff --git a/core/src/main/java/org/apache/accumulo/core/client/TableDeletedException.java b/core/src/main/java/org/apache/accumulo/core/client/TableDeletedException.java
index c1b1d6f..a506270 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/TableDeletedException.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/TableDeletedException.java
@@ -19,7 +19,8 @@ package org.apache.accumulo.core.client;
/**
* This exception is thrown if a table is deleted after an operation starts.
*
- * For example if table A exist when a scan is started, but is deleted during the scan then this exception is thrown.
+ * For example if table A exist when a scan is started, but is deleted during the scan then this
+ * exception is thrown.
*
*/
diff --git a/core/src/main/java/org/apache/accumulo/core/client/TableExistsException.java b/core/src/main/java/org/apache/accumulo/core/client/TableExistsException.java
index 72c633c..cd9f7b6 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/TableExistsException.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/TableExistsException.java
@@ -37,8 +37,9 @@ public class TableExistsException extends Exception {
* the specific reason why it failed
*/
public TableExistsException(String tableId, String tableName, String description) {
- super("Table" + (tableName != null && !tableName.isEmpty() ? " " + tableName : "") + (tableId != null && !tableId.isEmpty() ? " (Id=" + tableId + ")" : "")
- + " exists" + (description != null && !description.isEmpty() ? " (" + description + ")" : ""));
+ super("Table" + (tableName != null && !tableName.isEmpty() ? " " + tableName : "")
+ + (tableId != null && !tableId.isEmpty() ? " (Id=" + tableId + ")" : "") + " exists"
+ + (description != null && !description.isEmpty() ? " (" + description + ")" : ""));
}
/**
@@ -51,7 +52,8 @@ public class TableExistsException extends Exception {
* @param cause
* the exception that caused this failure
*/
- public TableExistsException(String tableId, String tableName, String description, Throwable cause) {
+ public TableExistsException(String tableId, String tableName, String description,
+ Throwable cause) {
this(tableId, tableName, description);
super.initCause(cause);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/client/TableNotFoundException.java b/core/src/main/java/org/apache/accumulo/core/client/TableNotFoundException.java
index 1e53936..6eff0b2 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/TableNotFoundException.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/TableNotFoundException.java
@@ -40,8 +40,9 @@ public class TableNotFoundException extends Exception {
* the specific reason why it failed
*/
public TableNotFoundException(String tableId, String tableName, String description) {
- super("Table" + (tableName != null && !tableName.isEmpty() ? " " + tableName : "") + (tableId != null && !tableId.isEmpty() ? " (Id=" + tableId + ")" : "")
- + " does not exist" + (description != null && !description.isEmpty() ? " (" + description + ")" : ""));
+ super("Table" + (tableName != null && !tableName.isEmpty() ? " " + tableName : "")
+ + (tableId != null && !tableId.isEmpty() ? " (Id=" + tableId + ")" : "") + " does not exist"
+ + (description != null && !description.isEmpty() ? " (" + description + ")" : ""));
this.tableName = tableName;
}
@@ -55,7 +56,8 @@ public class TableNotFoundException extends Exception {
* @param cause
* the exception that caused this failure
*/
- public TableNotFoundException(String tableId, String tableName, String description, Throwable cause) {
+ public TableNotFoundException(String tableId, String tableName, String description,
+ Throwable cause) {
this(tableId, tableName, description);
super.initCause(cause);
}
@@ -72,10 +74,12 @@ public class TableNotFoundException extends Exception {
* @param tableName
* the original specified table
* @param e
- * indicates that a table wasn't found because the namespace specified in the table name wasn't found
+ * indicates that a table wasn't found because the namespace specified in the table name
+ * wasn't found
*/
public TableNotFoundException(String tableName, NamespaceNotFoundException e) {
- this(null, tableName, "Namespace " + Tables.qualify(tableName).getFirst() + " does not exist.", e);
+ this(null, tableName, "Namespace " + Tables.qualify(tableName).getFirst() + " does not exist.",
+ e);
}
/**
diff --git a/core/src/main/java/org/apache/accumulo/core/client/TimedOutException.java b/core/src/main/java/org/apache/accumulo/core/client/TimedOutException.java
index e5bba3e..ff8fab3 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/TimedOutException.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/TimedOutException.java
@@ -34,7 +34,8 @@ public class TimedOutException extends RuntimeException {
return set.toString();
}
- return new ArrayList<>(set).subList(0, 10).toString() + " ... " + (set.size() - 10) + " servers not shown";
+ return new ArrayList<>(set).subList(0, 10).toString() + " ... " + (set.size() - 10)
+ + " servers not shown";
}
public TimedOutException(Set<String> timedoutServers) {
diff --git a/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java b/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
index 32fb62d..201de62 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
@@ -48,15 +48,19 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- * An implementation of instance that looks in zookeeper to find information needed to connect to an instance of accumulo.
+ * An implementation of instance that looks in zookeeper to find information needed to connect to an
+ * instance of accumulo.
*
* <p>
- * The advantage of using zookeeper to obtain information about accumulo is that zookeeper is highly available, very responsive, and supports caching.
+ * The advantage of using zookeeper to obtain information about accumulo is that zookeeper is highly
+ * available, very responsive, and supports caching.
*
* <p>
- * Because it is possible for multiple instances of accumulo to share a single set of zookeeper servers, all constructors require an accumulo instance name.
+ * Because it is possible for multiple instances of accumulo to share a single set of zookeeper
+ * servers, all constructors require an accumulo instance name.
*
- * If you do not know the instance names then run accumulo org.apache.accumulo.server.util.ListInstances on an accumulo server.
+ * If you do not know the instance names then run accumulo
+ * org.apache.accumulo.server.util.ListInstances on an accumulo server.
*
*/
@@ -81,7 +85,8 @@ public class ZooKeeperInstance implements Instance {
* @param instanceName
* The name of specific accumulo instance. This is set at initialization time.
* @param zooKeepers
- * A comma separated list of zoo keeper server locations. Each location can contain an optional port, of the format host:port.
+ * A comma separated list of zoo keeper server locations. Each location can contain an
+ * optional port, of the format host:port.
*/
public ZooKeeperInstance(String instanceName, String zooKeepers) {
this(ClientConfiguration.loadDefault().withInstance(instanceName).withZkHosts(zooKeepers));
@@ -92,14 +97,16 @@ public class ZooKeeperInstance implements Instance {
* @param instanceName
* The name of specific accumulo instance. This is set at initialization time.
* @param zooKeepers
- * A comma separated list of zoo keeper server locations. Each location can contain an optional port, of the format host:port.
+ * A comma separated list of zoo keeper server locations. Each location can contain an
+ * optional port, of the format host:port.
* @param sessionTimeout
* zoo keeper session time out in milliseconds.
* @deprecated since 1.6.0; Use {@link #ZooKeeperInstance(ClientConfiguration)} instead.
*/
@Deprecated
public ZooKeeperInstance(String instanceName, String zooKeepers, int sessionTimeout) {
- this(ClientConfiguration.loadDefault().withInstance(instanceName).withZkHosts(zooKeepers).withZkTimeout(sessionTimeout));
+ this(ClientConfiguration.loadDefault().withInstance(instanceName).withZkHosts(zooKeepers)
+ .withZkTimeout(sessionTimeout));
}
/**
@@ -107,7 +114,8 @@ public class ZooKeeperInstance implements Instance {
* @param instanceId
* The UUID that identifies the accumulo instance you want to connect to.
* @param zooKeepers
- * A comma separated list of zoo keeper server locations. Each location can contain an optional port, of the format host:port.
+ * A comma separated list of zoo keeper server locations. Each location can contain an
+ * optional port, of the format host:port.
* @deprecated since 1.6.0; Use {@link #ZooKeeperInstance(ClientConfiguration)} instead.
*/
@Deprecated
@@ -120,23 +128,26 @@ public class ZooKeeperInstance implements Instance {
* @param instanceId
* The UUID that identifies the accumulo instance you want to connect to.
* @param zooKeepers
- * A comma separated list of zoo keeper server locations. Each location can contain an optional port, of the format host:port.
+ * A comma separated list of zoo keeper server locations. Each location can contain an
+ * optional port, of the format host:port.
* @param sessionTimeout
* zoo keeper session time out in milliseconds.
* @deprecated since 1.6.0; Use {@link #ZooKeeperInstance(ClientConfiguration)} instead.
*/
@Deprecated
public ZooKeeperInstance(UUID instanceId, String zooKeepers, int sessionTimeout) {
- this(ClientConfiguration.loadDefault().withInstance(instanceId).withZkHosts(zooKeepers).withZkTimeout(sessionTimeout));
+ this(ClientConfiguration.loadDefault().withInstance(instanceId).withZkHosts(zooKeepers)
+ .withZkTimeout(sessionTimeout));
}
/**
* @param config
- * Client configuration for specifying connection options. See {@link ClientConfiguration} which extends Configuration with convenience methods
+ * Client configuration for specifying connection options. See
+ * {@link ClientConfiguration} which extends Configuration with convenience methods
* specific to Accumulo.
* @since 1.6.0
- * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API; use
- * {@link #ZooKeeperInstance(ClientConfiguration)} instead.
+ * @deprecated since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into
+ * Accumulo API; use {@link #ZooKeeperInstance(ClientConfiguration)} instead.
*/
@Deprecated
public ZooKeeperInstance(Configuration config) {
@@ -155,9 +166,11 @@ public class ZooKeeperInstance implements Instance {
this.instanceId = clientConf.get(ClientProperty.INSTANCE_ID);
this.instanceName = clientConf.get(ClientProperty.INSTANCE_NAME);
if ((instanceId == null) == (instanceName == null))
- throw new IllegalArgumentException("Expected exactly one of instanceName and instanceId to be set");
+ throw new IllegalArgumentException(
+ "Expected exactly one of instanceName and instanceId to be set");
this.zooKeepers = clientConf.get(ClientProperty.INSTANCE_ZK_HOST);
- this.zooKeepersSessionTimeOut = (int) AccumuloConfiguration.getTimeInMillis(clientConf.get(ClientProperty.INSTANCE_ZK_TIMEOUT));
+ this.zooKeepersSessionTimeOut = (int) AccumuloConfiguration
+ .getTimeInMillis(clientConf.get(ClientProperty.INSTANCE_ZK_TIMEOUT));
zooCache = zcf.getZooCache(zooKeepers, zooKeepersSessionTimeOut);
if (null != instanceName) {
// Validates that the provided instanceName actually exists
@@ -167,7 +180,8 @@ public class ZooKeeperInstance implements Instance {
/**
* @param config
- * Client configuration for specifying connection options. See {@link ClientConfiguration} which extends Configuration with convenience methods
+ * Client configuration for specifying connection options. See
+ * {@link ClientConfiguration} which extends Configuration with convenience methods
* specific to Accumulo.
* @since 1.9.0
*/
@@ -192,7 +206,8 @@ public class ZooKeeperInstance implements Instance {
if (zooCache.get(Constants.ZROOT + "/" + instanceId) == null) {
if (instanceName == null)
throw new RuntimeException("Instance id " + instanceId + " does not exist in zookeeper");
- throw new RuntimeException("Instance id " + instanceId + " pointed to by the name " + instanceName + " does not exist in zookeeper");
+ throw new RuntimeException("Instance id " + instanceId + " pointed to by the name "
+ + instanceName + " does not exist in zookeeper");
}
return instanceId;
@@ -213,7 +228,8 @@ public class ZooKeeperInstance implements Instance {
if (timer != null) {
timer.stop();
- log.trace("tid={} Found master at {} in {}", Thread.currentThread().getId(), (loc == null ? "null" : new String(loc, UTF_8)),
+ log.trace("tid={} Found master at {} in {}", Thread.currentThread().getId(),
+ (loc == null ? "null" : new String(loc, UTF_8)),
String.format("%.3f secs", timer.scale(TimeUnit.SECONDS)));
}
@@ -231,7 +247,8 @@ public class ZooKeeperInstance implements Instance {
OpTimer timer = null;
if (log.isTraceEnabled()) {
- log.trace("tid={} Looking up root tablet location in zookeeper.", Thread.currentThread().getId());
+ log.trace("tid={} Looking up root tablet location in zookeeper.",
+ Thread.currentThread().getId());
timer = new OpTimer().start();
}
@@ -239,7 +256,8 @@ public class ZooKeeperInstance implements Instance {
if (timer != null) {
timer.stop();
- log.trace("tid={} Found root tablet at {} in {}", Thread.currentThread().getId(), (loc == null ? "null" : new String(loc, UTF_8)),
+ log.trace("tid={} Found root tablet at {} in {}", Thread.currentThread().getId(),
+ (loc == null ? "null" : new String(loc, UTF_8)),
String.format("%.3f secs", timer.scale(TimeUnit.SECONDS)));
}
@@ -253,7 +271,8 @@ public class ZooKeeperInstance implements Instance {
@Override
public String getInstanceName() {
if (instanceName == null)
- instanceName = InstanceOperationsImpl.lookupInstanceName(zooCache, UUID.fromString(getInstanceID()));
+ instanceName = InstanceOperationsImpl.lookupInstanceName(zooCache,
+ UUID.fromString(getInstanceID()));
return instanceName;
}
@@ -270,31 +289,37 @@ public class ZooKeeperInstance implements Instance {
@Override
@Deprecated
- public Connector getConnector(String user, CharSequence pass) throws AccumuloException, AccumuloSecurityException {
+ public Connector getConnector(String user, CharSequence pass)
+ throws AccumuloException, AccumuloSecurityException {
return getConnector(user, TextUtil.getBytes(new Text(pass.toString())));
}
@Override
@Deprecated
- public Connector getConnector(String user, ByteBuffer pass) throws AccumuloException, AccumuloSecurityException {
+ public Connector getConnector(String user, ByteBuffer pass)
+ throws AccumuloException, AccumuloSecurityException {
return getConnector(user, ByteBufferUtil.toBytes(pass));
}
@Override
- public Connector getConnector(String principal, AuthenticationToken token) throws AccumuloException, AccumuloSecurityException {
- return new ConnectorImpl(new ClientContext(this, new Credentials(principal, token), clientConf));
+ public Connector getConnector(String principal, AuthenticationToken token)
+ throws AccumuloException, AccumuloSecurityException {
+ return new ConnectorImpl(
+ new ClientContext(this, new Credentials(principal, token), clientConf));
}
@Override
@Deprecated
- public Connector getConnector(String principal, byte[] pass) throws AccumuloException, AccumuloSecurityException {
+ public Connector getConnector(String principal, byte[] pass)
+ throws AccumuloException, AccumuloSecurityException {
return getConnector(principal, new PasswordToken(pass));
}
@Override
@Deprecated
public AccumuloConfiguration getConfiguration() {
- return conf = conf == null ? DefaultConfiguration.getInstance() : ClientContext.convertClientConfig(clientConf);
+ return conf = conf == null ? DefaultConfiguration.getInstance()
+ : ClientContext.convertClientConfig(clientConf);
}
@Override
@@ -306,8 +331,9 @@ public class ZooKeeperInstance implements Instance {
/**
* Given a zooCache and instanceId, look up the instance name.
*
- * @deprecated since 1.7.0 {@link ZooCache} is not part of the public API, but its a parameter to this method. Therefore code that uses this method is not
- * guaranteed to be stable. This method was deprecated to discourage its use.
+ * @deprecated since 1.7.0 {@link ZooCache} is not part of the public API, but its a parameter to
+ * this method. Therefore code that uses this method is not guaranteed to be stable.
+ * This method was deprecated to discourage its use.
*/
@Deprecated
public static String lookupInstanceName(ZooCache zooCache, UUID instanceId) {
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/ActiveCompaction.java b/core/src/main/java/org/apache/accumulo/core/client/admin/ActiveCompaction.java
index 5228391..d438016 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/ActiveCompaction.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/ActiveCompaction.java
@@ -34,7 +34,8 @@ public abstract class ActiveCompaction {
*/
MINOR,
/**
- * compaction to flush a tablets memory and merge it with the tablets smallest file. This type compaction is done when a tablet has too many files
+ * compaction to flush a tablets memory and merge it with the tablets smallest file. This type
+ * compaction is done when a tablet has too many files
*/
MERGE,
/**
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/CompactionConfig.java b/core/src/main/java/org/apache/accumulo/core/client/admin/CompactionConfig.java
index 74e77eb..7a220a7 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/CompactionConfig.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/CompactionConfig.java
@@ -43,7 +43,8 @@ public class CompactionConfig {
/**
* @param start
- * First tablet to be compacted contains the row after this row, null means the first tablet in table. The default is null.
+ * First tablet to be compacted contains the row after this row, null means the first
+ * tablet in table. The default is null.
* @return this
*/
@@ -62,7 +63,8 @@ public class CompactionConfig {
/**
*
* @param end
- * Last tablet to be compacted contains this row, null means the last tablet in table. The default is null.
+ * Last tablet to be compacted contains this row, null means the last tablet in table.
+ * The default is null.
* @return this
*/
public CompactionConfig setEndRow(Text end) {
@@ -79,7 +81,8 @@ public class CompactionConfig {
/**
* @param flush
- * If set to true, will flush in memory data of all tablets in range before compacting. If not set, the default is true.
+ * If set to true, will flush in memory data of all tablets in range before compacting.
+ * If not set, the default is true.
* @return this
*/
public CompactionConfig setFlush(boolean flush) {
@@ -96,7 +99,8 @@ public class CompactionConfig {
/**
* @param wait
- * If set to true, will cause compact operation to wait for all tablets in range to compact. If not set, the default is true.
+ * If set to true, will cause compact operation to wait for all tablets in range to
+ * compact. If not set, the default is true.
* @return this
*/
@@ -115,7 +119,8 @@ public class CompactionConfig {
/**
* @param iterators
- * configures the iterators that will be used when compacting tablets. These iterators are merged with current iterators configured for the table.
+ * configures the iterators that will be used when compacting tablets. These iterators
+ * are merged with current iterators configured for the table.
* @return this
*/
public CompactionConfig setIterators(List<IteratorSetting> iterators) {
@@ -124,7 +129,8 @@ public class CompactionConfig {
}
/**
- * @return The previously set iterators. Returns an empty list if not set. The returned list is unmodifiable.
+ * @return The previously set iterators. Returns an empty list if not set. The returned list is
+ * unmodifiable.
*/
public List<IteratorSetting> getIterators() {
return Collections.unmodifiableList(iterators);
@@ -132,7 +138,8 @@ public class CompactionConfig {
/**
* @param csConfig
- * configures the strategy that will be used by each tablet to select files. If no strategy is set, then all files will be compacted.
+ * configures the strategy that will be used by each tablet to select files. If no
+ * strategy is set, then all files will be compacted.
* @return this
*/
public CompactionConfig setCompactionStrategy(CompactionStrategyConfig csConfig) {
@@ -142,8 +149,9 @@ public class CompactionConfig {
}
/**
- * @return The previously set compaction strategy. Defaults to a configuration of org.apache.accumulo.tserver.compaction.EverythingCompactionStrategy which
- * always compacts all files.
+ * @return The previously set compaction strategy. Defaults to a configuration of
+ * org.apache.accumulo.tserver.compaction.EverythingCompactionStrategy which always
+ * compacts all files.
*/
public CompactionStrategyConfig getCompactionStrategy() {
return compactionStrategy;
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/CompactionStrategyConfig.java b/core/src/main/java/org/apache/accumulo/core/client/admin/CompactionStrategyConfig.java
index af3b537..e674e08 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/CompactionStrategyConfig.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/CompactionStrategyConfig.java
@@ -24,8 +24,9 @@ import java.util.HashMap;
import java.util.Map;
/**
- * Configuration object which describes how a Compaction is run. Configuration objects are dependent upon the CompactionStrategy running insider the server.
- * This class is used in conjunction with {@link CompactionConfig}.
+ * Configuration object which describes how a Compaction is run. Configuration objects are dependent
+ * upon the CompactionStrategy running insider the server. This class is used in conjunction with
+ * {@link CompactionConfig}.
*
* @since 1.7.0
*/
@@ -35,7 +36,9 @@ public class CompactionStrategyConfig {
/**
* @param className
- * The name of a class that implements org.apache.accumulo.tserver.compaction.CompactionStrategy. This class must be exist on tservers.
+ * The name of a class that implements
+ * org.apache.accumulo.tserver.compaction.CompactionStrategy. This class must be exist on
+ * tservers.
*/
public CompactionStrategyConfig(String className) {
requireNonNull(className);
@@ -51,8 +54,9 @@ public class CompactionStrategyConfig {
/**
* @param opts
- * The options that will be passed to the init() method of the compaction strategy when its instantiated on a tserver. This method will copy the map.
- * The default is an empty map.
+ * The options that will be passed to the init() method of the compaction strategy when
+ * its instantiated on a tserver. This method will copy the map. The default is an empty
+ * map.
* @return this
*/
public CompactionStrategyConfig setOptions(Map<String,String> opts) {
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/DelegationTokenConfig.java b/core/src/main/java/org/apache/accumulo/core/client/admin/DelegationTokenConfig.java
index b67a3e8..0f0f2f1 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/DelegationTokenConfig.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/DelegationTokenConfig.java
@@ -22,7 +22,8 @@ import static java.util.Objects.requireNonNull;
import java.util.concurrent.TimeUnit;
/**
- * Configuration options for obtaining a delegation token created by {@link SecurityOperations#getDelegationToken(DelegationTokenConfig)}
+ * Configuration options for obtaining a delegation token created by
+ * {@link SecurityOperations#getDelegationToken(DelegationTokenConfig)}
*
* @since 1.7.0
*/
@@ -31,8 +32,8 @@ public class DelegationTokenConfig {
private long lifetime = 0;
/**
- * Requests a specific lifetime for the token that is different than the default system lifetime. The lifetime must not exceed the secret key lifetime
- * configured on the servers.
+ * Requests a specific lifetime for the token that is different than the default system lifetime.
+ * The lifetime must not exceed the secret key lifetime configured on the servers.
*
* @param lifetime
* Token lifetime
@@ -48,7 +49,8 @@ public class DelegationTokenConfig {
}
/**
- * The current token lifetime. A value of zero corresponds to using the system configured lifetime.
+ * The current token lifetime. A value of zero corresponds to using the system configured
+ * lifetime.
*
* @param unit
* The unit of time the lifetime should be returned in
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/FindMax.java b/core/src/main/java/org/apache/accumulo/core/client/admin/FindMax.java
index 00fe950..dea48fd 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/FindMax.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/FindMax.java
@@ -78,7 +78,8 @@ public class FindMax {
}
// remove trailing 0x0 bytes
- while (ret.getLength() > 0 && ret.getBytes()[ret.getLength() - 1] == 0 && ret.compareTo(minBS) > 0) {
+ while (ret.getLength() > 0 && ret.getBytes()[ret.getLength() - 1] == 0
+ && ret.compareTo(minBS) > 0) {
Text t = new Text();
t.set(ret.getBytes(), 0, ret.getLength() - 1);
ret = t;
@@ -87,9 +88,11 @@ public class FindMax {
return ret;
}
- private static Text _findMax(Scanner scanner, Text start, boolean inclStart, Text end, boolean inclEnd) {
+ private static Text _findMax(Scanner scanner, Text start, boolean inclStart, Text end,
+ boolean inclEnd) {
- // System.out.printf("findMax(%s, %s, %s, %s)%n", Key.toPrintableString(start.getBytes(), 0, start.getLength(), 1000), inclStart,
+ // System.out.printf("findMax(%s, %s, %s, %s)%n", Key.toPrintableString(start.getBytes(), 0,
+ // start.getLength(), 1000), inclStart,
// Key.toPrintableString(end.getBytes(), 0, end.getLength(), 1000), inclEnd);
int cmp = start.compareTo(end);
@@ -106,7 +109,8 @@ public class FindMax {
}
Text mid = findMidPoint(start, end);
- // System.out.println("mid = :"+Key.toPrintableString(mid.getBytes(), 0, mid.getLength(), 1000)+":");
+ // System.out.println("mid = :"+Key.toPrintableString(mid.getBytes(), 0, mid.getLength(),
+ // 1000)+":");
scanner.setRange(new Range(mid, mid.equals(start) ? inclStart : true, end, inclEnd));
@@ -151,7 +155,8 @@ public class FindMax {
return end;
}
- public static Text findMax(Scanner scanner, Text start, boolean is, Text end, boolean ie) throws TableNotFoundException {
+ public static Text findMax(Scanner scanner, Text start, boolean is, Text end, boolean ie)
+ throws TableNotFoundException {
scanner.setBatchSize(12);
IteratorSetting cfg = new IteratorSetting(Integer.MAX_VALUE, SortedKeyIterator.class);
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperations.java b/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperations.java
index 79b430c..c5331b2 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperations.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperations.java
@@ -28,10 +28,12 @@ import org.apache.accumulo.core.client.AccumuloSecurityException;
public interface InstanceOperations {
/**
- * Sets an system property in zookeeper. Tablet servers will pull this setting and override the equivalent setting in accumulo-site.xml. Changes can be seen
- * using {@link #getSystemConfiguration()}.
+ * Sets an system property in zookeeper. Tablet servers will pull this setting and override the
+ * equivalent setting in accumulo-site.xml. Changes can be seen using
+ * {@link #getSystemConfiguration()}.
* <p>
- * Only some properties can be changed by this method, an IllegalArgumentException will be thrown if a read-only property is set.
+ * Only some properties can be changed by this method, an IllegalArgumentException will be thrown
+ * if a read-only property is set.
*
* @param property
* the name of a per-table property
@@ -42,10 +44,12 @@ public interface InstanceOperations {
* @throws AccumuloSecurityException
* if the user does not have permission
*/
- void setProperty(final String property, final String value) throws AccumuloException, AccumuloSecurityException;
+ void setProperty(final String property, final String value)
+ throws AccumuloException, AccumuloSecurityException;
/**
- * Removes a system property from zookeeper. Changes can be seen using {@link #getSystemConfiguration()}
+ * Removes a system property from zookeeper. Changes can be seen using
+ * {@link #getSystemConfiguration()}
*
* @param property
* the name of a per-table property
@@ -58,16 +62,17 @@ public interface InstanceOperations {
/**
*
- * @return A map of system properties set in zookeeper. If a property is not set in zookeeper, then it will return the value set in accumulo-site.xml on some
- * server. If nothing is set in an accumulo-site.xml file it will return the default value for each property.
+ * @return A map of system properties set in zookeeper. If a property is not set in zookeeper,
+ * then it will return the value set in accumulo-site.xml on some server. If nothing is
+ * set in an accumulo-site.xml file it will return the default value for each property.
*/
Map<String,String> getSystemConfiguration() throws AccumuloException, AccumuloSecurityException;
/**
*
- * @return A map of system properties set in accumulo-site.xml on some server. If nothing is set in an accumulo-site.xml file it will return the default value
- * for each property.
+ * @return A map of system properties set in accumulo-site.xml on some server. If nothing is set
+ * in an accumulo-site.xml file it will return the default value for each property.
*/
Map<String,String> getSiteConfiguration() throws AccumuloException, AccumuloSecurityException;
@@ -88,7 +93,8 @@ public interface InstanceOperations {
* @return A list of active scans on tablet server.
*/
- List<ActiveScan> getActiveScans(String tserver) throws AccumuloException, AccumuloSecurityException;
+ List<ActiveScan> getActiveScans(String tserver)
+ throws AccumuloException, AccumuloSecurityException;
/**
* List the active compaction running on a tablet server
@@ -99,7 +105,8 @@ public interface InstanceOperations {
* @since 1.5.0
*/
- List<ActiveCompaction> getActiveCompactions(String tserver) throws AccumuloException, AccumuloSecurityException;
+ List<ActiveCompaction> getActiveCompactions(String tserver)
+ throws AccumuloException, AccumuloSecurityException;
/**
* Throws an exception if a tablet server can not be contacted.
@@ -111,12 +118,14 @@ public interface InstanceOperations {
void ping(String tserver) throws AccumuloException;
/**
- * Test to see if the instance can load the given class as the given type. This check does not consider per table classpaths, see
+ * Test to see if the instance can load the given class as the given type. This check does not
+ * consider per table classpaths, see
* {@link TableOperations#testClassLoad(String, String, String)}
*
* @return true if the instance can load the given class as the given type, false otherwise
*/
- boolean testClassLoad(final String className, final String asTypeName) throws AccumuloException, AccumuloSecurityException;
+ boolean testClassLoad(final String className, final String asTypeName)
+ throws AccumuloException, AccumuloSecurityException;
/**
* Waits for the tablet balancer to run and return no migrations.
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/Locations.java b/core/src/main/java/org/apache/accumulo/core/client/admin/Locations.java
index aaecf33..d42d988 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/Locations.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/Locations.java
@@ -24,24 +24,28 @@ import org.apache.accumulo.core.data.Range;
import org.apache.accumulo.core.data.TabletId;
/**
- * A snapshot of metadata information about where a specified set of ranges are located returned by {@link TableOperations#locate(String, java.util.Collection)}
+ * A snapshot of metadata information about where a specified set of ranges are located returned by
+ * {@link TableOperations#locate(String, java.util.Collection)}
*
* @since 1.8.0
*/
public interface Locations {
/**
- * For all of the ranges passed to {@link TableOperations#locate(String, java.util.Collection)}, return a map of the tablets each range overlaps.
+ * For all of the ranges passed to {@link TableOperations#locate(String, java.util.Collection)},
+ * return a map of the tablets each range overlaps.
*/
public Map<Range,List<TabletId>> groupByRange();
/**
- * For all of the ranges passed to {@link TableOperations#locate(String, java.util.Collection)}, return a map of the ranges each tablet overlaps.
+ * For all of the ranges passed to {@link TableOperations#locate(String, java.util.Collection)},
+ * return a map of the ranges each tablet overlaps.
*/
public Map<TabletId,List<Range>> groupByTablet();
/**
- * For any {@link TabletId} known to this object, the method will return the tablet server location for that tablet.
+ * For any {@link TabletId} known to this object, the method will return the tablet server
+ * location for that tablet.
*
* @return A tablet server location in the form of {@code <host>:<port>}
*/
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperations.java b/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperations.java
index b2e7198..f2d0c98 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperations.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperations.java
@@ -32,8 +32,9 @@ import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope;
/**
* Provides an API for administering namespaces
*
- * All tables exist in a namespace. The default namespace has no name, and is used if an explicit namespace is not specified. Fully qualified table names look
- * like "namespaceName.tableName". Tables in the default namespace are fully qualified simply as "tableName".
+ * All tables exist in a namespace. The default namespace has no name, and is used if an explicit
+ * namespace is not specified. Fully qualified table names look like "namespaceName.tableName".
+ * Tables in the default namespace are fully qualified simply as "tableName".
*
* @since 1.6.0
*/
@@ -82,7 +83,8 @@ public interface NamespaceOperations {
boolean exists(String namespace) throws AccumuloException, AccumuloSecurityException;
/**
- * Create an empty namespace with no initial configuration. Valid names for a namespace contain letters, numbers, and the underscore character.
+ * Create an empty namespace with no initial configuration. Valid names for a namespace contain
+ * letters, numbers, and the underscore character.
*
* @param namespace
* the name of the namespace
@@ -94,7 +96,8 @@ public interface NamespaceOperations {
* if the specified namespace already exists
* @since 1.6.0
*/
- void create(String namespace) throws AccumuloException, AccumuloSecurityException, NamespaceExistsException;
+ void create(String namespace)
+ throws AccumuloException, AccumuloSecurityException, NamespaceExistsException;
/**
* Delete an empty namespace
@@ -111,7 +114,8 @@ public interface NamespaceOperations {
* if the namespaces still contains tables
* @since 1.6.0
*/
- void delete(String namespace) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, NamespaceNotEmptyException;
+ void delete(String namespace) throws AccumuloException, AccumuloSecurityException,
+ NamespaceNotFoundException, NamespaceNotEmptyException;
/**
* Rename a namespace
@@ -130,11 +134,12 @@ public interface NamespaceOperations {
* if the new namespace already exists
* @since 1.6.0
*/
- void rename(String oldNamespaceName, String newNamespaceName) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException,
- NamespaceExistsException;
+ void rename(String oldNamespaceName, String newNamespaceName) throws AccumuloException,
+ AccumuloSecurityException, NamespaceNotFoundException, NamespaceExistsException;
/**
- * Sets a property on a namespace which applies to all tables in the namespace. Note that it may take a few seconds to propagate the change everywhere.
+ * Sets a property on a namespace which applies to all tables in the namespace. Note that it may
+ * take a few seconds to propagate the change everywhere.
*
* @param namespace
* the name of the namespace
@@ -150,10 +155,12 @@ public interface NamespaceOperations {
* if the specified namespace doesn't exist
* @since 1.6.0
*/
- void setProperty(String namespace, String property, String value) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException;
+ void setProperty(String namespace, String property, String value)
+ throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException;
/**
- * Removes a property from a namespace. Note that it may take a few seconds to propagate the change everywhere.
+ * Removes a property from a namespace. Note that it may take a few seconds to propagate the
+ * change everywhere.
*
* @param namespace
* the name of the namespace
@@ -167,14 +174,17 @@ public interface NamespaceOperations {
* if the specified namespace doesn't exist
* @since 1.6.0
*/
- void removeProperty(String namespace, String property) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException;
+ void removeProperty(String namespace, String property)
+ throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException;
/**
- * Gets properties of a namespace, which are inherited by tables in this namespace. Note that recently changed properties may not be available immediately.
+ * Gets properties of a namespace, which are inherited by tables in this namespace. Note that
+ * recently changed properties may not be available immediately.
*
* @param namespace
* the name of the namespace
- * @return all properties visible by this namespace (system and per-table properties). Note that recently changed properties may not be visible immediately.
+ * @return all properties visible by this namespace (system and per-table properties). Note that
+ * recently changed properties may not be visible immediately.
* @throws AccumuloException
* if a general error occurs
* @throws AccumuloSecurityException
@@ -183,7 +193,8 @@ public interface NamespaceOperations {
* if the specified namespace doesn't exist
* @since 1.6.0
*/
- Iterable<Entry<String,String>> getProperties(String namespace) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException;
+ Iterable<Entry<String,String>> getProperties(String namespace)
+ throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException;
/**
* Get a mapping of namespace name to internal namespace id.
@@ -212,7 +223,8 @@ public interface NamespaceOperations {
* if the specified namespace doesn't exist
* @since 1.6.0
*/
- void attachIterator(String namespace, IteratorSetting setting) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException;
+ void attachIterator(String namespace, IteratorSetting setting)
+ throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException;
/**
* Add an iterator to a namespace on the given scopes.
@@ -231,8 +243,8 @@ public interface NamespaceOperations {
* if the specified namespace doesn't exist
* @since 1.6.0
*/
- void attachIterator(String namespace, IteratorSetting setting, EnumSet<IteratorScope> scopes) throws AccumuloException, AccumuloSecurityException,
- NamespaceNotFoundException;
+ void attachIterator(String namespace, IteratorSetting setting, EnumSet<IteratorScope> scopes)
+ throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException;
/**
* Remove an iterator from a namespace by name.
@@ -251,8 +263,8 @@ public interface NamespaceOperations {
* if the specified namespace doesn't exist
* @since 1.6.0
*/
- void removeIterator(String namespace, String name, EnumSet<IteratorScope> scopes) throws AccumuloException, AccumuloSecurityException,
- NamespaceNotFoundException;
+ void removeIterator(String namespace, String name, EnumSet<IteratorScope> scopes)
+ throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException;
/**
* Get the settings for an iterator.
@@ -272,8 +284,8 @@ public interface NamespaceOperations {
* if the specified namespace doesn't exist
* @since 1.6.0
*/
- IteratorSetting getIteratorSetting(String namespace, String name, IteratorScope scope) throws AccumuloException, AccumuloSecurityException,
- NamespaceNotFoundException;
+ IteratorSetting getIteratorSetting(String namespace, String name, IteratorScope scope)
+ throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException;
/**
* Get a list of iterators for this namespace.
@@ -289,11 +301,13 @@ public interface NamespaceOperations {
* if the specified namespace doesn't exist
* @since 1.6.0
*/
- Map<String,EnumSet<IteratorScope>> listIterators(String namespace) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException;
+ Map<String,EnumSet<IteratorScope>> listIterators(String namespace)
+ throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException;
/**
- * Check whether a given iterator configuration conflicts with existing configuration; in particular, determine if the name or priority are already in use for
- * the specified scopes. If so, an IllegalArgumentException is thrown, wrapped in an AccumuloException.
+ * Check whether a given iterator configuration conflicts with existing configuration; in
+ * particular, determine if the name or priority are already in use for the specified scopes. If
+ * so, an IllegalArgumentException is thrown, wrapped in an AccumuloException.
*
* @param namespace
* the name of the namespace
@@ -309,8 +323,9 @@ public interface NamespaceOperations {
* if the specified namespace doesn't exist
* @since 1.6.0
*/
- void checkIteratorConflicts(String namespace, IteratorSetting setting, EnumSet<IteratorScope> scopes) throws AccumuloException, AccumuloSecurityException,
- NamespaceNotFoundException;
+ void checkIteratorConflicts(String namespace, IteratorSetting setting,
+ EnumSet<IteratorScope> scopes)
+ throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException;
/**
* Add a new constraint to a namespace.
@@ -328,7 +343,8 @@ public interface NamespaceOperations {
* if the specified namespace doesn't exist
* @since 1.6.0
*/
- int addConstraint(String namespace, String constraintClassName) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException;
+ int addConstraint(String namespace, String constraintClassName)
+ throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException;
/**
* Remove a constraint from a namespace.
@@ -345,7 +361,8 @@ public interface NamespaceOperations {
* if the specified namespace doesn't exist
* @since 1.6.0
*/
- void removeConstraint(String namespace, int id) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException;
+ void removeConstraint(String namespace, int id)
+ throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException;
/**
* List constraints on a namespace with their assigned numbers.
@@ -361,10 +378,12 @@ public interface NamespaceOperations {
* if the specified namespace doesn't exist
* @since 1.6.0
*/
- Map<String,Integer> listConstraints(String namespace) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException;
+ Map<String,Integer> listConstraints(String namespace)
+ throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException;
/**
- * Test to see if the instance can load the given class as the given type. This check uses the table classpath property if it is set.
+ * Test to see if the instance can load the given class as the given type. This check uses the
+ * table classpath property if it is set.
*
* @param namespace
* the name of the namespace
@@ -381,5 +400,6 @@ public interface NamespaceOperations {
* if the specified namespace doesn't exist
* @since 1.6.0
*/
- boolean testClassLoad(String namespace, String className, String asTypeName) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException;
+ boolean testClassLoad(String namespace, String className, String asTypeName)
+ throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException;
}
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/NewTableConfiguration.java b/core/src/main/java/org/apache/accumulo/core/client/admin/NewTableConfiguration.java
index 4694e1e..7d25a25 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/NewTableConfiguration.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/NewTableConfiguration.java
@@ -29,8 +29,8 @@ import org.apache.accumulo.core.iterators.user.VersioningIterator;
import org.apache.accumulo.core.sample.impl.SamplerConfigurationImpl;
/**
- * This object stores table creation parameters. Currently includes: {@link TimeType}, whether to include default iterators, and user-specified initial
- * properties
+ * This object stores table creation parameters. Currently includes: {@link TimeType}, whether to
+ * include default iterators, and user-specified initial properties
*
* @since 1.7.0
*/
@@ -68,8 +68,9 @@ public class NewTableConfiguration {
}
/**
- * Currently the only default iterator is the {@link VersioningIterator}. This method will cause the table to be created without that iterator, or any others
- * which may become defaults in the future.
+ * Currently the only default iterator is the {@link VersioningIterator}. This method will cause
+ * the table to be created without that iterator, or any others which may become defaults in the
+ * future.
*
* @return this
*/
@@ -79,8 +80,8 @@ public class NewTableConfiguration {
}
/**
- * Sets additional properties to be applied to tables created with this configuration. Additional calls to this method replaces properties set by previous
- * calls.
+ * Sets additional properties to be applied to tables created with this configuration. Additional
+ * calls to this method replaces properties set by previous calls.
*
* @param prop
* additional properties to add to the table when it is created
@@ -95,7 +96,8 @@ public class NewTableConfiguration {
}
/**
- * Retrieves the complete set of currently configured table properties to be applied to a table when this configuration object is used.
+ * Retrieves the complete set of currently configured table properties to be applied to a table
+ * when this configuration object is used.
*
* @return the current properties configured
*/
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/ReplicationOperations.java b/core/src/main/java/org/apache/accumulo/core/client/admin/ReplicationOperations.java
index dfb043c..7b47f8b 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/ReplicationOperations.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/ReplicationOperations.java
@@ -39,7 +39,8 @@ public interface ReplicationOperations {
* @param replicaType
* Class name to use to replicate the data
*/
- public void addPeer(String name, String replicaType) throws AccumuloException, AccumuloSecurityException, PeerExistsException;
+ public void addPeer(String name, String replicaType)
+ throws AccumuloException, AccumuloSecurityException, PeerExistsException;
/**
* Removes a cluster with the given name.
@@ -47,32 +48,39 @@ public interface ReplicationOperations {
* @param name
* Name of the cluster to remove
*/
- public void removePeer(String name) throws AccumuloException, AccumuloSecurityException, PeerNotFoundException;
+ public void removePeer(String name)
+ throws AccumuloException, AccumuloSecurityException, PeerNotFoundException;
/**
- * Waits for a table to be fully replicated, given the state of files pending replication for the provided table at the point in time which this method is
- * invoked.
+ * Waits for a table to be fully replicated, given the state of files pending replication for the
+ * provided table at the point in time which this method is invoked.
*
* @param tableName
* The table to wait for
*/
- public void drain(String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
+ public void drain(String tableName)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
/**
- * Given the provided set of files that are pending replication for a table, wait for those files to be fully replicated to all configured peers. This allows
- * for the accurate calculation when a table, at a given point in time, has been fully replicated.
+ * Given the provided set of files that are pending replication for a table, wait for those files
+ * to be fully replicated to all configured peers. This allows for the accurate calculation when a
+ * table, at a given point in time, has been fully replicated.
*
* @param tableName
* The table to wait for
*/
- public void drain(String tableName, Set<String> files) throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
+ public void drain(String tableName, Set<String> files)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
/**
- * Gets all of the referenced files for a table from the metadata table. The result of this method is intended to be directly supplied to
- * {@link #drain(String, Set)}. This helps determine when all data from a given point in time has been fully replicated.
+ * Gets all of the referenced files for a table from the metadata table. The result of this method
+ * is intended to be directly supplied to {@link #drain(String, Set)}. This helps determine when
+ * all data from a given point in time has been fully replicated.
* <p>
- * This also allows callers to get the {@link Set} of files for a table at some time, and later provide that {@link Set} to {@link #drain(String,Set)} to wait
- * for all of those files to be replicated.
+ * This also allows callers to get the {@link Set} of files for a table at some time, and later
+ * provide that {@link Set} to {@link #drain(String,Set)} to wait for all of those files to be
+ * replicated.
*/
- public Set<String> referencedFiles(String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
+ public Set<String> referencedFiles(String tableName)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
}
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperations.java b/core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperations.java
index cb916ef..14a6a3c 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperations.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperations.java
@@ -46,10 +46,12 @@ public interface SecurityOperations {
* if a general error occurs
* @throws AccumuloSecurityException
* if the user does not have permission to create a user
- * @deprecated since 1.5.0; use {@link #createLocalUser(String, PasswordToken)} or the user management functions of your configured authenticator instead.
+ * @deprecated since 1.5.0; use {@link #createLocalUser(String, PasswordToken)} or the user
+ * management functions of your configured authenticator instead.
*/
@Deprecated
- void createUser(String user, byte[] password, Authorizations authorizations) throws AccumuloException, AccumuloSecurityException;
+ void createUser(String user, byte[] password, Authorizations authorizations)
+ throws AccumuloException, AccumuloSecurityException;
/**
* Create a user
@@ -64,7 +66,8 @@ public interface SecurityOperations {
* if the user does not have permission to create a user
* @since 1.5.0
*/
- void createLocalUser(String principal, PasswordToken password) throws AccumuloException, AccumuloSecurityException;
+ void createLocalUser(String principal, PasswordToken password)
+ throws AccumuloException, AccumuloSecurityException;
/**
* Delete a user
@@ -75,7 +78,8 @@ public interface SecurityOperations {
* if a general error occurs
* @throws AccumuloSecurityException
* if the user does not have permission to delete a user
- * @deprecated since 1.5.0; use {@link #dropUser(String)} or the user management functions of your configured authenticator instead.
+ * @deprecated since 1.5.0; use {@link #dropUser(String)} or the user management functions of your
+ * configured authenticator instead.
*/
@Deprecated
void dropUser(String user) throws AccumuloException, AccumuloSecurityException;
@@ -100,7 +104,8 @@ public interface SecurityOperations {
* the name of the user to authenticate
* @param password
* the plaintext password for the user
- * @return true if the user asking is allowed to know and the specified user/password is valid, false otherwise
+ * @return true if the user asking is allowed to know and the specified user/password is valid,
+ * false otherwise
* @throws AccumuloException
* if a general error occurs
* @throws AccumuloSecurityException
@@ -108,7 +113,8 @@ public interface SecurityOperations {
* @deprecated since 1.5.0; use {@link #authenticateUser(String, AuthenticationToken)} instead.
*/
@Deprecated
- boolean authenticateUser(String user, byte[] password) throws AccumuloException, AccumuloSecurityException;
+ boolean authenticateUser(String user, byte[] password)
+ throws AccumuloException, AccumuloSecurityException;
/**
* Verify a username/password combination is valid
@@ -117,14 +123,16 @@ public interface SecurityOperations {
* the name of the user to authenticate
* @param token
* the SecurityToken for the user
- * @return true if the user asking is allowed to know and the specified principal/token is valid, false otherwise
+ * @return true if the user asking is allowed to know and the specified principal/token is valid,
+ * false otherwise
* @throws AccumuloException
* if a general error occurs
* @throws AccumuloSecurityException
* if the user does not have permission to ask
* @since 1.5.0
*/
- boolean authenticateUser(String principal, AuthenticationToken token) throws AccumuloException, AccumuloSecurityException;
+ boolean authenticateUser(String principal, AuthenticationToken token)
+ throws AccumuloException, AccumuloSecurityException;
/**
* Set the user's password
@@ -137,11 +145,12 @@ public interface SecurityOperations {
* if a general error occurs
* @throws AccumuloSecurityException
* if the user does not have permission to modify a user
- * @deprecated since 1.5.0; use {@link #changeLocalUserPassword(String, PasswordToken)} or the user management functions of your configured authenticator
- * instead.
+ * @deprecated since 1.5.0; use {@link #changeLocalUserPassword(String, PasswordToken)} or the
+ * user management functions of your configured authenticator instead.
*/
@Deprecated
- void changeUserPassword(String user, byte[] password) throws AccumuloException, AccumuloSecurityException;
+ void changeUserPassword(String user, byte[] password)
+ throws AccumuloException, AccumuloSecurityException;
/**
* Set the user's password
@@ -156,7 +165,8 @@ public interface SecurityOperations {
* if the user does not have permission to modify a user
* @since 1.5.0
*/
- void changeLocalUserPassword(String principal, PasswordToken token) throws AccumuloException, AccumuloSecurityException;
+ void changeLocalUserPassword(String principal, PasswordToken token)
+ throws AccumuloException, AccumuloSecurityException;
/**
* Set the user's record-level authorizations
@@ -170,7 +180,8 @@ public interface SecurityOperations {
* @throws AccumuloSecurityException
* if the user does not have permission to modify a user
*/
- void changeUserAuthorizations(String principal, Authorizations authorizations) throws AccumuloException, AccumuloSecurityException;
+ void changeUserAuthorizations(String principal, Authorizations authorizations)
+ throws AccumuloException, AccumuloSecurityException;
/**
* Retrieves the user's authorizations for scanning
@@ -183,7 +194,8 @@ public interface SecurityOperations {
* @throws AccumuloSecurityException
* if the user does not have permission to query a user
*/
- Authorizations getUserAuthorizations(String principal) throws AccumuloException, AccumuloSecurityException;
+ Authorizations getUserAuthorizations(String principal)
+ throws AccumuloException, AccumuloSecurityException;
/**
* Verify the user has a particular system permission
@@ -198,7 +210,8 @@ public interface SecurityOperations {
* @throws AccumuloSecurityException
* if the user does not have permission to query a user
*/
- boolean hasSystemPermission(String principal, SystemPermission perm) throws AccumuloException, AccumuloSecurityException;
+ boolean hasSystemPermission(String principal, SystemPermission perm)
+ throws AccumuloException, AccumuloSecurityException;
/**
* Verify the user has a particular table permission
@@ -215,7 +228,8 @@ public interface SecurityOperations {
* @throws AccumuloSecurityException
* if the user does not have permission to query a user
*/
- boolean hasTablePermission(String principal, String table, TablePermission perm) throws AccumuloException, AccumuloSecurityException;
+ boolean hasTablePermission(String principal, String table, TablePermission perm)
+ throws AccumuloException, AccumuloSecurityException;
/**
* Verify the user has a particular namespace permission
@@ -232,7 +246,8 @@ public interface SecurityOperations {
* @throws AccumuloSecurityException
* if the user does not have permission to query a user
*/
- boolean hasNamespacePermission(String principal, String namespace, NamespacePermission perm) throws AccumuloException, AccumuloSecurityException;
+ boolean hasNamespacePermission(String principal, String namespace, NamespacePermission perm)
+ throws AccumuloException, AccumuloSecurityException;
/**
* Grant a user a system permission
@@ -246,7 +261,8 @@ public interface SecurityOperations {
* @throws AccumuloSecurityException
* if the user does not have permission to grant a user permissions
*/
- void grantSystemPermission(String principal, SystemPermission permission) throws AccumuloException, AccumuloSecurityException;
+ void grantSystemPermission(String principal, SystemPermission permission)
+ throws AccumuloException, AccumuloSecurityException;
/**
* Grant a user a specific permission for a specific table
@@ -262,7 +278,8 @@ public interface SecurityOperations {
* @throws AccumuloSecurityException
* if the user does not have permission to grant a user permissions
*/
- void grantTablePermission(String principal, String table, TablePermission permission) throws AccumuloException, AccumuloSecurityException;
+ void grantTablePermission(String principal, String table, TablePermission permission)
+ throws AccumuloException, AccumuloSecurityException;
/**
* Grant a user a specific permission for a specific namespace
@@ -278,7 +295,8 @@ public interface SecurityOperations {
* @throws AccumuloSecurityException
* if the user does not have permission to grant a user permissions
*/
- void grantNamespacePermission(String principal, String namespace, NamespacePermission permission) throws AccumuloException, AccumuloSecurityException;
+ void grantNamespacePermission(String principal, String namespace, NamespacePermission permission)
+ throws AccumuloException, AccumuloSecurityException;
/**
* Revoke a system permission from a user
@@ -292,7 +310,8 @@ public interface SecurityOperations {
* @throws AccumuloSecurityException
* if the user does not have permission to revoke a user's permissions
*/
- void revokeSystemPermission(String principal, SystemPermission permission) throws AccumuloException, AccumuloSecurityException;
+ void revokeSystemPermission(String principal, SystemPermission permission)
+ throws AccumuloException, AccumuloSecurityException;
/**
* Revoke a table permission for a specific user on a specific table
@@ -308,7 +327,8 @@ public interface SecurityOperations {
* @throws AccumuloSecurityException
* if the user does not have permission to revoke a user's permissions
*/
- void revokeTablePermission(String principal, String table, TablePermission permission) throws AccumuloException, AccumuloSecurityException;
+ void revokeTablePermission(String principal, String table, TablePermission permission)
+ throws AccumuloException, AccumuloSecurityException;
/**
* Revoke a namespace permission for a specific user on a specific namespace
@@ -324,7 +344,8 @@ public interface SecurityOperations {
* @throws AccumuloSecurityException
* if the user does not have permission to revoke a user's permissions
*/
- void revokeNamespacePermission(String principal, String namespace, NamespacePermission permission) throws AccumuloException, AccumuloSecurityException;
+ void revokeNamespacePermission(String principal, String namespace, NamespacePermission permission)
+ throws AccumuloException, AccumuloSecurityException;
/**
* Return a list of users in accumulo
@@ -334,7 +355,8 @@ public interface SecurityOperations {
* if a general error occurs
* @throws AccumuloSecurityException
* if the user does not have permission to query users
- * @deprecated since 1.5.0; use {@link #listLocalUsers()} or the user management functions of your configured authenticator instead.
+ * @deprecated since 1.5.0; use {@link #listLocalUsers()} or the user management functions of your
+ * configured authenticator instead.
*/
@Deprecated
Set<String> listUsers() throws AccumuloException, AccumuloSecurityException;
@@ -352,9 +374,11 @@ public interface SecurityOperations {
Set<String> listLocalUsers() throws AccumuloException, AccumuloSecurityException;
/**
- * Obtain a {@link DelegationToken} for use when Kerberos credentials cannot be used (e.g. YARN Jobs)
+ * Obtain a {@link DelegationToken} for use when Kerberos credentials cannot be used (e.g. YARN
+ * Jobs)
*
* @since 1.7.0
*/
- DelegationToken getDelegationToken(DelegationTokenConfig cfg) throws AccumuloException, AccumuloSecurityException;
+ DelegationToken getDelegationToken(DelegationTokenConfig cfg)
+ throws AccumuloException, AccumuloSecurityException;
}
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 3e56736..7ff76c9 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
@@ -74,13 +74,15 @@ public interface TableOperations {
* @throws TableExistsException
* if the table already exists
*/
- void create(String tableName) throws AccumuloException, AccumuloSecurityException, TableExistsException;
+ void create(String tableName)
+ throws AccumuloException, AccumuloSecurityException, TableExistsException;
/**
* @param tableName
* the name of the table
* @param limitVersion
- * Enables/disables the versioning iterator, which will limit the number of Key versions kept.
+ * Enables/disables the versioning iterator, which will limit the number of Key versions
+ * kept.
* @throws AccumuloException
* if a general error occurs
* @throws AccumuloSecurityException
@@ -90,13 +92,15 @@ public interface TableOperations {
* @deprecated since 1.7.0; use {@link #create(String, NewTableConfiguration)} instead.
*/
@Deprecated
- void create(String tableName, boolean limitVersion) throws AccumuloException, AccumuloSecurityException, TableExistsException;
+ void create(String tableName, boolean limitVersion)
+ throws AccumuloException, AccumuloSecurityException, TableExistsException;
/**
* @param tableName
* the name of the table
* @param versioningIter
- * Enables/disables the versioning iterator, which will limit the number of Key versions kept.
+ * Enables/disables the versioning iterator, which will limit the number of Key versions
+ * kept.
* @param timeType
* specifies logical or real-time based time recording for entries in the table
* @throws AccumuloException
@@ -108,15 +112,17 @@ public interface TableOperations {
* @deprecated since 1.7.0; use {@link #create(String, NewTableConfiguration)} instead.
*/
@Deprecated
- void create(String tableName, boolean versioningIter, TimeType timeType) throws AccumuloException, AccumuloSecurityException, TableExistsException;
+ void create(String tableName, boolean versioningIter, TimeType timeType)
+ throws AccumuloException, AccumuloSecurityException, TableExistsException;
/**
* @param tableName
* the name of the table
* @param ntc
- * specifies the new table's configuration variable, which are: 1. enable/disable the versioning iterator, which will limit the number of Key
- * versions kept; 2. specifies logical or real-time based time recording for entries in the table; 3. user defined properties to be merged into the
- * initial properties of the table
+ * specifies the new table's configuration variable, which are: 1. enable/disable the
+ * versioning iterator, which will limit the number of Key versions kept; 2. specifies
+ * logical or real-time based time recording for entries in the table; 3. user defined
+ * properties to be merged into the initial properties of the table
* @throws AccumuloException
* if a general error occurs
* @throws AccumuloSecurityException
@@ -125,7 +131,8 @@ public interface TableOperations {
* if the table already exists
* @since 1.7.0
*/
- void create(String tableName, NewTableConfiguration ntc) throws AccumuloSecurityException, AccumuloException, TableExistsException;
+ void create(String tableName, NewTableConfiguration ntc)
+ throws AccumuloSecurityException, AccumuloException, TableExistsException;
/**
* Imports a table exported via exportTable and copied via hadoop distcp.
@@ -136,11 +143,13 @@ public interface TableOperations {
* Directory that contains the files copied by distcp from exportTable
* @since 1.5.0
*/
- void importTable(String tableName, String importDir) throws TableExistsException, AccumuloException, AccumuloSecurityException;
+ void importTable(String tableName, String importDir)
+ throws TableExistsException, AccumuloException, AccumuloSecurityException;
/**
- * Exports a table. The tables data is not exported, just table metadata and a list of files to distcp. The table being exported must be offline and stay
- * offline for the duration of distcp. To avoid losing access to a table it can be cloned and the clone taken offline for export.
+ * Exports a table. The tables data is not exported, just table metadata and a list of files to
+ * distcp. The table being exported must be offline and stay offline for the duration of distcp.
+ * To avoid losing access to a table it can be cloned and the clone taken offline for export.
*
* <p>
* See docs/examples/README.export
@@ -148,18 +157,21 @@ public interface TableOperations {
* @param tableName
* Name of the table to export.
* @param exportDir
- * An empty directory in HDFS where files containing table metadata and list of files to distcp will be placed.
+ * An empty directory in HDFS where files containing table metadata and list of files to
+ * distcp will be placed.
* @since 1.5.0
*/
- void exportTable(String tableName, String exportDir) throws TableNotFoundException, AccumuloException, AccumuloSecurityException;
+ void exportTable(String tableName, String exportDir)
+ throws TableNotFoundException, AccumuloException, AccumuloSecurityException;
/**
* Ensures that tablets are split along a set of keys.
* <p>
- * Note that while the documentation for Text specifies that its bytestream should be UTF-8, the encoding is not enforced by operations that work with byte
- * arrays.
+ * Note that while the documentation for Text specifies that its bytestream should be UTF-8, the
+ * encoding is not enforced by operations that work with byte arrays.
* <p>
- * For example, you can create 256 evenly-sliced splits via the following code sample even though the given byte sequences are not valid UTF-8.
+ * For example, you can create 256 evenly-sliced splits via the following code sample even though
+ * the given byte sequences are not valid UTF-8.
*
* <pre>
* TableOperations tableOps = connector.tableOperations();
@@ -182,7 +194,8 @@ public interface TableOperations {
* @throws TableNotFoundException
* if the table does not exist
*/
- void addSplits(String tableName, SortedSet<Text> partitionKeys) throws TableNotFoundException, AccumuloException, AccumuloSecurityException;
+ void addSplits(String tableName, SortedSet<Text> partitionKeys)
+ throws TableNotFoundException, AccumuloException, AccumuloSecurityException;
/**
* @param tableName
@@ -207,14 +220,16 @@ public interface TableOperations {
* if the user does not have permission
* @since 1.5.0
*/
- Collection<Text> listSplits(String tableName) throws TableNotFoundException, AccumuloSecurityException, AccumuloException;
+ Collection<Text> listSplits(String tableName)
+ throws TableNotFoundException, AccumuloSecurityException, AccumuloException;
/**
* @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
+ * @return the split points (end-row names) for the table's current split profile, grouped into
+ * fewer splits so as not to exceed maxSplits
* @deprecated since 1.5.0; use {@link #listSplits(String, int)} instead.
*/
@Deprecated
@@ -229,14 +244,16 @@ public interface TableOperations {
* if a general error occurs
* @throws AccumuloSecurityException
* if the user does not have permission
- * @return the split points (end-row names) for the table's current split profile, grouped into fewer splits so as not to exceed maxSplits
+ * @return the split points (end-row names) for the table's current split profile, grouped into
+ * fewer splits so as not to exceed maxSplits
* @since 1.5.0
*/
- Collection<Text> listSplits(String tableName, int maxSplits) throws TableNotFoundException, AccumuloSecurityException, AccumuloException;
+ Collection<Text> listSplits(String tableName, int maxSplits)
+ throws TableNotFoundException, AccumuloSecurityException, AccumuloException;
/**
- * Locates the tablet servers and tablets that would service a collections of ranges. If a range covers multiple tablets, it will occur multiple times in the
- * returned map.
+ * Locates the tablet servers and tablets that would service a collections of ranges. If a range
+ * covers multiple tablets, it will occur multiple times in the returned map.
*
* @param ranges
* The input ranges that should be mapped to tablet servers and tablets.
@@ -245,10 +262,12 @@ public interface TableOperations {
* if the table is offline or goes offline during the operation
* @since 1.8.0
*/
- Locations locate(String tableName, Collection<Range> ranges) throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
+ Locations locate(String tableName, Collection<Range> ranges)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
/**
- * Finds the max row within a given range. To find the max row in a table, pass null for start and end row.
+ * Finds the max row within a given range. To find the max row in a table, pass null for start and
+ * end row.
*
* @param auths
* find the max row that can seen with these auths
@@ -263,7 +282,8 @@ public interface TableOperations {
*
* @return The max row in the range, or null if there is no visible data in the range.
*/
- Text getMaxRow(String tableName, Authorizations auths, Text startRow, boolean startInclusive, Text endRow, boolean endInclusive)
+ Text getMaxRow(String tableName, Authorizations auths, Text startRow, boolean startInclusive,
+ Text endRow, boolean endInclusive)
throws TableNotFoundException, AccumuloException, AccumuloSecurityException;
/**
@@ -276,7 +296,8 @@ public interface TableOperations {
* @param end
* last tablet to be merged contains this row, null means the last tablet
*/
- void merge(String tableName, Text start, Text end) throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
+ void merge(String tableName, Text start, Text end)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
/**
* Delete rows between (start, end]
@@ -288,15 +309,18 @@ public interface TableOperations {
* @param end
* last row to be deleted, inclusive, null means the last row of the table
*/
- void deleteRows(String tableName, Text start, Text end) throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
+ void deleteRows(String tableName, Text start, Text end)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
/**
- * Starts a full major compaction of the tablets in the range (start, end]. The compaction is preformed even for tablets that have only one file.
+ * Starts a full major compaction of the tablets in the range (start, end]. The compaction is
+ * preformed even for tablets that have only one file.
*
* @param tableName
* the table to compact
* @param start
- * first tablet to be compacted contains the row after this row, null means the first tablet in table
+ * first tablet to be compacted contains the row after this row, null means the first
+ * tablet in table
* @param end
* last tablet to be compacted contains this row, null means the last tablet in table
* @param flush
@@ -304,36 +328,42 @@ public interface TableOperations {
* @param wait
* when true, the call will not return until compactions are finished
*/
- void compact(String tableName, Text start, Text end, boolean flush, boolean wait) throws AccumuloSecurityException, TableNotFoundException, AccumuloException;
+ void compact(String tableName, Text start, Text end, boolean flush, boolean wait)
+ throws AccumuloSecurityException, TableNotFoundException, AccumuloException;
/**
- * Starts a full major compaction of the tablets in the range (start, end]. The compaction is preformed even for tablets that have only one file.
+ * Starts a full major compaction of the tablets in the range (start, end]. The compaction is
+ * preformed even for tablets that have only one file.
*
* @param tableName
* the table to compact
* @param start
- * first tablet to be compacted contains the row after this row, null means the first tablet in table
+ * first tablet to be compacted contains the row after this row, null means the first
+ * tablet in table
* @param end
* last tablet to be compacted contains this row, null means the last tablet in table
* @param iterators
- * A set of iterators that will be applied to each tablet compacted. If two or more concurrent calls to compact pass iterators, then only one will
- * succeed and the others will fail.
+ * A set of iterators that will be applied to each tablet compacted. If two or more
+ * concurrent calls to compact pass iterators, then only one will succeed and the others
+ * will fail.
* @param flush
* when true, table memory is flushed before compaction starts
* @param wait
* when true, the call will not return until compactions are finished
* @since 1.5.0
*/
- void compact(String tableName, Text start, Text end, List<IteratorSetting> iterators, boolean flush, boolean wait) throws AccumuloSecurityException,
- TableNotFoundException, AccumuloException;
+ void compact(String tableName, Text start, Text end, List<IteratorSetting> iterators,
+ boolean flush, boolean wait)
+ throws AccumuloSecurityException, TableNotFoundException, AccumuloException;
/**
- * Starts a full major compaction of the tablets in the range (start, end]. If the config does not specify a compaction strategy, then all files in a tablet
- * are compacted. The compaction is performed even for tablets that have only one file.
+ * Starts a full major compaction of the tablets in the range (start, end]. If the config does not
+ * specify a compaction strategy, then all files in a tablet are compacted. The compaction is
+ * performed even for tablets that have only one file.
*
* <p>
- * Only one compact call at a time can pass iterators and/or a compaction strategy. If two threads call compaction with iterators and/or a copmaction
- * strategy, then one will fail.
+ * Only one compact call at a time can pass iterators and/or a compaction strategy. If two threads
+ * call compaction with iterators and/or a copmaction strategy, then one will fail.
*
* @param tableName
* the table to compact
@@ -342,12 +372,14 @@ public interface TableOperations {
*
* @since 1.7.0
*/
- void compact(String tableName, CompactionConfig config) throws AccumuloSecurityException, TableNotFoundException, AccumuloException;
+ void compact(String tableName, CompactionConfig config)
+ throws AccumuloSecurityException, TableNotFoundException, AccumuloException;
/**
- * Cancels a user initiated major compaction of a table initiated with {@link #compact(String, Text, Text, boolean, boolean)} or
- * {@link #compact(String, Text, Text, List, boolean, boolean)}. Compactions of tablets that are currently running may finish, but new compactions of tablets
- * will not start.
+ * Cancels a user initiated major compaction of a table initiated with
+ * {@link #compact(String, Text, Text, boolean, boolean)} or
+ * {@link #compact(String, Text, Text, List, boolean, boolean)}. Compactions of tablets that are
+ * currently running may finish, but new compactions of tablets will not start.
*
* @param tableName
* the name of the table
@@ -359,7 +391,8 @@ public interface TableOperations {
* if the user does not have permission
* @since 1.5.0
*/
- void cancelCompaction(String tableName) throws AccumuloSecurityException, TableNotFoundException, AccumuloException;
+ void cancelCompaction(String tableName)
+ throws AccumuloSecurityException, TableNotFoundException, AccumuloException;
/**
* Delete a table
@@ -373,12 +406,14 @@ public interface TableOperations {
* @throws TableNotFoundException
* if the table does not exist
*/
- void delete(String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
+ void delete(String tableName)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
/**
- * Clone a table from an existing table. The cloned table will have the same data as the source table it was created from. After cloning, the two tables can
- * mutate independently. Initially the cloned table should not use any extra space, however as the source table and cloned table major compact extra space
- * will be used by the clone.
+ * Clone a table from an existing table. The cloned table will have the same data as the source
+ * table it was created from. After cloning, the two tables can mutate independently. Initially
+ * the cloned table should not use any extra space, however as the source table and cloned table
+ * major compact extra space will be used by the clone.
*
* Initially the cloned table is only readable and writable by the user who created it.
*
@@ -394,8 +429,9 @@ public interface TableOperations {
* do not copy these properties from the source table, just revert to system defaults
*/
- void clone(String srcTableName, String newTableName, boolean flush, Map<String,String> propertiesToSet, Set<String> propertiesToExclude)
- throws AccumuloException, AccumuloSecurityException, TableNotFoundException, TableExistsException;
+ void clone(String srcTableName, String newTableName, boolean flush,
+ Map<String,String> propertiesToSet, Set<String> propertiesToExclude) throws AccumuloException,
+ AccumuloSecurityException, TableNotFoundException, TableExistsException;
/**
* Rename a table
@@ -413,7 +449,8 @@ public interface TableOperations {
* @throws TableExistsException
* if the new table name already exists
*/
- void rename(String oldTableName, String newTableName) throws AccumuloSecurityException, TableNotFoundException, AccumuloException, TableExistsException;
+ void rename(String oldTableName, String newTableName) throws AccumuloSecurityException,
+ TableNotFoundException, AccumuloException, TableExistsException;
/**
* Initiate a flush of a table's data that is in memory
@@ -436,19 +473,22 @@ public interface TableOperations {
* @param tableName
* the name of the table
* @param wait
- * if true the call will not return until all data present in memory when the call was is flushed if false will initiate a flush of data in memory,
- * but will not wait for it to complete
+ * if true the call will not return until all data present in memory when the call was is
+ * flushed if false will initiate a flush of data in memory, but will not wait for it to
+ * complete
* @throws AccumuloException
* if a general error occurs
* @throws AccumuloSecurityException
* if the user does not have permission
*/
- void flush(String tableName, Text start, Text end, boolean wait) throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
+ void flush(String tableName, Text start, Text end, boolean wait)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
/**
- * Sets a property on a table. This operation is asynchronous and eventually consistent. Not all tablets in a table will acknowledge this new value
- * immediately nor at the same time. Within a few seconds without another change, all tablets in a table should see the updated value. The clone table feature
- * can be used if consistency is required.
+ * Sets a property on a table. This operation is asynchronous and eventually consistent. Not all
+ * tablets in a table will acknowledge this new value immediately nor at the same time. Within a
+ * few seconds without another change, all tablets in a table should see the updated value. The
+ * clone table feature can be used if consistency is required.
*
* @param tableName
* the name of the table
@@ -461,12 +501,14 @@ public interface TableOperations {
* @throws AccumuloSecurityException
* if the user does not have permission
*/
- void setProperty(String tableName, String property, String value) throws AccumuloException, AccumuloSecurityException;
+ void setProperty(String tableName, String property, String value)
+ throws AccumuloException, AccumuloSecurityException;
/**
- * Removes a property from a table. This operation is asynchronous and eventually consistent. Not all tablets in a table will acknowledge this altered value
- * immediately nor at the same time. Within a few seconds without another change, all tablets in a table should see the altered value. The clone table feature
- * can be used if consistency is required.
+ * Removes a property from a table. This operation is asynchronous and eventually consistent. Not
+ * all tablets in a table will acknowledge this altered value immediately nor at the same time.
+ * Within a few seconds without another change, all tablets in a table should see the altered
+ * value. The clone table feature can be used if consistency is required.
*
* @param tableName
* the name of the table
@@ -477,20 +519,24 @@ public interface TableOperations {
* @throws AccumuloSecurityException
* if the user does not have permission
*/
- void removeProperty(String tableName, String property) throws AccumuloException, AccumuloSecurityException;
+ void removeProperty(String tableName, String property)
+ throws AccumuloException, AccumuloSecurityException;
/**
- * Gets properties of a table. This operation is asynchronous and eventually consistent. It is not guaranteed that all tablets in a table will return the same
- * values. Within a few seconds without another change, all tablets in a table should be consistent. The clone table feature can be used if consistency is
- * required.
+ * Gets properties of a table. This operation is asynchronous and eventually consistent. It is not
+ * guaranteed that all tablets in a table will return the same values. Within a few seconds
+ * without another change, all tablets in a table should be consistent. The clone table feature
+ * can be used if consistency is required.
*
* @param tableName
* the name of the table
- * @return all properties visible by this table (system and per-table properties). Note that recently changed properties may not be visible immediately.
+ * @return all properties visible by this table (system and per-table properties). Note that
+ * recently changed properties may not be visible immediately.
* @throws TableNotFoundException
* if the table does not exist
*/
- Iterable<Entry<String,String>> getProperties(String tableName) throws AccumuloException, TableNotFoundException;
+ Iterable<Entry<String,String>> getProperties(String tableName)
+ throws AccumuloException, TableNotFoundException;
/**
* Sets a table's locality groups. A table's locality groups can be changed at any time.
@@ -506,7 +552,8 @@ public interface TableOperations {
* @throws TableNotFoundException
* if the table does not exist
*/
- void setLocalityGroups(String tableName, Map<String,Set<Text>> groups) throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
+ void setLocalityGroups(String tableName, Map<String,Set<Text>> groups)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
/**
*
@@ -520,7 +567,8 @@ public interface TableOperations {
* @throws TableNotFoundException
* if the table does not exist
*/
- Map<String,Set<Text>> getLocalityGroups(String tableName) throws AccumuloException, TableNotFoundException;
+ Map<String,Set<Text>> getLocalityGroups(String tableName)
+ throws AccumuloException, TableNotFoundException;
/**
* @param tableName
@@ -529,7 +577,8 @@ public interface TableOperations {
* 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
+ * @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
@@ -537,10 +586,12 @@ public interface TableOperations {
* @throws TableNotFoundException
* if the table does not exist
*/
- Set<Range> splitRangeByTablets(String tableName, Range range, int maxSplits) throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
+ Set<Range> splitRangeByTablets(String tableName, Range range, int maxSplits)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
/**
- * Bulk import all the files in a directory into a table. Files can be created using {@link AccumuloFileOutputFormat} and {@link RFile#newWriter()}
+ * Bulk import all the files in a directory into a table. Files can be created using
+ * {@link AccumuloFileOutputFormat} and {@link RFile#newWriter()}
*
* @param tableName
* the name of the table
@@ -549,7 +600,8 @@ public interface TableOperations {
* @param failureDir
* the HDFS directory to place files that failed to be imported, must exist and be empty
* @param setTime
- * override the time values in the input files, and use the current time for all mutations
+ * override the time values in the input files, and use the current time for all
+ * mutations
* @throws IOException
* when there is an error reading/writing to HDFS
* @throws AccumuloException
@@ -560,8 +612,8 @@ public interface TableOperations {
* when the table no longer exists
*
*/
- void importDirectory(String tableName, String dir, String failureDir, boolean setTime) throws TableNotFoundException, IOException, AccumuloException,
- AccumuloSecurityException;
+ void importDirectory(String tableName, String dir, String failureDir, boolean setTime)
+ throws TableNotFoundException, IOException, AccumuloException, AccumuloSecurityException;
/**
* Initiates taking a table offline, but does not wait for action to complete
@@ -573,7 +625,8 @@ public interface TableOperations {
* @throws AccumuloSecurityException
* when the user does not have the proper permissions
*/
- void offline(String tableName) throws AccumuloSecurityException, AccumuloException, TableNotFoundException;
+ void offline(String tableName)
+ throws AccumuloSecurityException, AccumuloException, TableNotFoundException;
/**
*
@@ -587,7 +640,8 @@ public interface TableOperations {
* when the user does not have the proper permissions
* @since 1.6.0
*/
- void offline(String tableName, boolean wait) throws AccumuloSecurityException, AccumuloException, TableNotFoundException;
+ void offline(String tableName, boolean wait)
+ throws AccumuloSecurityException, AccumuloException, TableNotFoundException;
/**
* Initiates bringing a table online, but does not wait for action to complete
@@ -599,7 +653,8 @@ public interface TableOperations {
* @throws AccumuloSecurityException
* when the user does not have the proper permissions
*/
- void online(String tableName) throws AccumuloSecurityException, AccumuloException, TableNotFoundException;
+ void online(String tableName)
+ throws AccumuloSecurityException, AccumuloException, TableNotFoundException;
/**
*
@@ -613,7 +668,8 @@ public interface TableOperations {
* when the user does not have the proper permissions
* @since 1.6.0
*/
- void online(String tableName, boolean wait) throws AccumuloSecurityException, AccumuloException, TableNotFoundException;
+ void online(String tableName, boolean wait)
+ throws AccumuloSecurityException, AccumuloException, TableNotFoundException;
/**
* Clears the tablet locator cache for a specified table
@@ -646,7 +702,8 @@ public interface TableOperations {
* @throws IllegalArgumentException
* if the setting conflicts with any existing iterators
*/
- void attachIterator(String tableName, IteratorSetting setting) throws AccumuloSecurityException, AccumuloException, TableNotFoundException;
+ void attachIterator(String tableName, IteratorSetting setting)
+ throws AccumuloSecurityException, AccumuloException, TableNotFoundException;
/**
* Add an iterator to a table on the given scopes.
@@ -662,8 +719,8 @@ public interface TableOperations {
* @throws IllegalArgumentException
* if the setting conflicts with any existing iterators
*/
- void attachIterator(String tableName, IteratorSetting setting, EnumSet<IteratorScope> scopes) throws AccumuloSecurityException, AccumuloException,
- TableNotFoundException;
+ void attachIterator(String tableName, IteratorSetting setting, EnumSet<IteratorScope> scopes)
+ throws AccumuloSecurityException, AccumuloException, TableNotFoundException;
/**
* Remove an iterator from a table by name.
@@ -679,7 +736,8 @@ public interface TableOperations {
* @throws TableNotFoundException
* throw if the table no longer exists
*/
- void removeIterator(String tableName, String name, EnumSet<IteratorScope> scopes) throws AccumuloSecurityException, AccumuloException, TableNotFoundException;
+ void removeIterator(String tableName, String name, EnumSet<IteratorScope> scopes)
+ throws AccumuloSecurityException, AccumuloException, TableNotFoundException;
/**
* Get the settings for an iterator.
@@ -696,8 +754,8 @@ public interface TableOperations {
* @throws TableNotFoundException
* throw if the table no longer exists
*/
- IteratorSetting getIteratorSetting(String tableName, String name, IteratorScope scope) throws AccumuloSecurityException, AccumuloException,
- TableNotFoundException;
+ IteratorSetting getIteratorSetting(String tableName, String name, IteratorScope scope)
+ throws AccumuloSecurityException, AccumuloException, TableNotFoundException;
/**
* Get a list of iterators for this table.
@@ -706,18 +764,20 @@ public interface TableOperations {
* the name of the table
* @return a set of iterator names
*/
- Map<String,EnumSet<IteratorScope>> listIterators(String tableName) throws AccumuloSecurityException, AccumuloException, TableNotFoundException;
+ Map<String,EnumSet<IteratorScope>> listIterators(String tableName)
+ throws AccumuloSecurityException, AccumuloException, TableNotFoundException;
/**
- * Check whether a given iterator configuration conflicts with existing configuration; in particular, determine if the name or priority are already in use for
- * the specified scopes.
+ * Check whether a given iterator configuration conflicts with existing configuration; in
+ * particular, determine if the name or priority are already in use for the specified scopes.
*
* @param tableName
* the name of the table
* @param setting
* object specifying the properties of the iterator
*/
- void checkIteratorConflicts(String tableName, IteratorSetting setting, EnumSet<IteratorScope> scopes) throws AccumuloException, TableNotFoundException;
+ void checkIteratorConflicts(String tableName, IteratorSetting setting,
+ EnumSet<IteratorScope> scopes) throws AccumuloException, TableNotFoundException;
/**
* Add a new constraint to a table.
@@ -728,12 +788,14 @@ public interface TableOperations {
* the full name of the constraint class
* @return the unique number assigned to the constraint
* @throws AccumuloException
- * thrown if the constraint has already been added to the table or if there are errors in the configuration of existing constraints
+ * thrown if the constraint has already been added to the table or if there are errors
+ * in the configuration of existing constraints
* @throws AccumuloSecurityException
* thrown if the user doesn't have permission to add the constraint
* @since 1.5.0
*/
- int addConstraint(String tableName, String constraintClassName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
+ int addConstraint(String tableName, String constraintClassName)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
/**
* Remove a constraint from a table.
@@ -746,7 +808,8 @@ public interface TableOperations {
* thrown if the user doesn't have permission to remove the constraint
* @since 1.5.0
*/
- void removeConstraint(String tableName, int number) throws AccumuloException, AccumuloSecurityException;
+ void removeConstraint(String tableName, int number)
+ throws AccumuloException, AccumuloSecurityException;
/**
* List constraints on a table with their assigned numbers.
@@ -758,7 +821,8 @@ public interface TableOperations {
* thrown if there are errors in the configuration of existing constraints
* @since 1.5.0
*/
- Map<String,Integer> listConstraints(String tableName) throws AccumuloException, TableNotFoundException;
+ Map<String,Integer> listConstraints(String tableName)
+ throws AccumuloException, TableNotFoundException;
/**
* Gets the number of bytes being used in the files for a set of tables
@@ -768,28 +832,30 @@ public interface TableOperations {
* @return a list of disk usage objects containing linked table names and sizes
* @since 1.6.0
*/
- List<DiskUsage> getDiskUsage(Set<String> tables) throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
+ List<DiskUsage> getDiskUsage(Set<String> tables)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
/**
- * Test to see if the instance can load the given class as the given type. This check uses the table classpath if it is set.
+ * Test to see if the instance can load the given class as the given type. This check uses the
+ * table classpath if it is set.
*
* @return true if the instance can load the given class as the given type, false otherwise
*
* @since 1.5.0
*/
- boolean testClassLoad(String tableName, final String className, final String asTypeName) throws AccumuloException, AccumuloSecurityException,
- TableNotFoundException;
+ boolean testClassLoad(String tableName, final String className, final String asTypeName)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
/**
- * Set or update the sampler configuration for a table. If the table has existing sampler configuration, those properties will be cleared before setting the
- * new table properties.
+ * Set or update the sampler configuration for a table. If the table has existing sampler
+ * configuration, those properties will be cleared before setting the new table properties.
*
* @param tableName
* the name of the table
* @since 1.8.0
*/
- void setSamplerConfiguration(String tableName, SamplerConfiguration samplerConfiguration) throws TableNotFoundException, AccumuloException,
- AccumuloSecurityException;
+ void setSamplerConfiguration(String tableName, SamplerConfiguration samplerConfiguration)
+ throws TableNotFoundException, AccumuloException, AccumuloSecurityException;
/**
* Clear all sampling configuration properties on the table.
@@ -798,7 +864,8 @@ public interface TableOperations {
* the name of the table
* @since 1.8.0
*/
- void clearSamplerConfiguration(String tableName) throws TableNotFoundException, AccumuloException, AccumuloSecurityException;
+ void clearSamplerConfiguration(String tableName)
+ throws TableNotFoundException, AccumuloException, AccumuloSecurityException;
/**
* Reads the sampling configuration properties for a table.
@@ -807,5 +874,6 @@ public interface TableOperations {
* the name of the table
* @since 1.8.0
*/
- SamplerConfiguration getSamplerConfiguration(String tableName) throws TableNotFoundException, AccumuloException, AccumuloSecurityException;
+ SamplerConfiguration getSamplerConfiguration(String tableName)
+ throws TableNotFoundException, AccumuloException, AccumuloSecurityException;
}
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/TimeType.java b/core/src/main/java/org/apache/accumulo/core/client/admin/TimeType.java
index 426d384..0c966f4 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/TimeType.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/TimeType.java
@@ -26,9 +26,10 @@ public enum TimeType {
LOGICAL,
/**
- * This is the default. Tries to ensure that inserted data is stored with the timestamp closest to the machine's time to the nearest millisecond, without
- * going backwards to guarantee insertion sequence. Note that using this time type can cause time to "skip" forward if a machine has a time that is too far
- * off. NTP is recommended when using this type.
+ * This is the default. Tries to ensure that inserted data is stored with the timestamp closest to
+ * the machine's time to the nearest millisecond, without going backwards to guarantee insertion
+ * sequence. Note that using this time type can cause time to "skip" forward if a machine has a
+ * time that is too far off. NTP is recommended when using this type.
*/
MILLIS
}
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/AcceptableThriftTableOperationException.java b/core/src/main/java/org/apache/accumulo/core/client/impl/AcceptableThriftTableOperationException.java
index 98c1bf5..6613117 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/AcceptableThriftTableOperationException.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/AcceptableThriftTableOperationException.java
@@ -24,11 +24,13 @@ import org.apache.accumulo.fate.AcceptableException;
/**
* Concrete implementation of {@link AcceptableException} for table operations.
*/
-public class AcceptableThriftTableOperationException extends ThriftTableOperationException implements AcceptableException {
+public class AcceptableThriftTableOperationException extends ThriftTableOperationException
+ implements AcceptableException {
private static final long serialVersionUID = 1L;
- public AcceptableThriftTableOperationException(String tableId, String tableName, TableOperation op, TableOperationExceptionType type, String description) {
+ public AcceptableThriftTableOperationException(String tableId, String tableName,
+ TableOperation op, TableOperationExceptionType type, String description) {
super(tableId, tableName, op, type, description);
}
}
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ActiveCompactionImpl.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ActiveCompactionImpl.java
index bdd5d51..aa27c50 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/ActiveCompactionImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ActiveCompactionImpl.java
@@ -39,7 +39,8 @@ public class ActiveCompactionImpl extends ActiveCompaction {
private org.apache.accumulo.core.tabletserver.thrift.ActiveCompaction tac;
private Instance instance;
- ActiveCompactionImpl(Instance instance, org.apache.accumulo.core.tabletserver.thrift.ActiveCompaction tac) {
+ ActiveCompactionImpl(Instance instance,
+ org.apache.accumulo.core.tabletserver.thrift.ActiveCompaction tac) {
this.tac = tac;
this.instance = instance;
}
@@ -53,7 +54,8 @@ public class ActiveCompactionImpl extends ActiveCompaction {
@Deprecated
public org.apache.accumulo.core.data.KeyExtent getExtent() {
KeyExtent ke = new KeyExtent(tac.getExtent());
- org.apache.accumulo.core.data.KeyExtent oke = new org.apache.accumulo.core.data.KeyExtent(new Text(ke.getTableId()), ke.getEndRow(), ke.getPrevEndRow());
+ org.apache.accumulo.core.data.KeyExtent oke = new org.apache.accumulo.core.data.KeyExtent(
+ new Text(ke.getTableId()), ke.getEndRow(), ke.getPrevEndRow());
return oke;
}
@@ -107,7 +109,8 @@ public class ActiveCompactionImpl extends ActiveCompaction {
ArrayList<IteratorSetting> ret = new ArrayList<>();
for (IterInfo ii : tac.getSsiList()) {
- IteratorSetting settings = new IteratorSetting(ii.getPriority(), ii.getIterName(), ii.getClassName());
+ IteratorSetting settings = new IteratorSetting(ii.getPriority(), ii.getIterName(),
+ ii.getClassName());
Map<String,String> options = tac.getSsio().get(ii.getIterName());
settings.addOptions(options);
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ActiveScanImpl.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ActiveScanImpl.java
index 9021190..2e22ed7 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/ActiveScanImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ActiveScanImpl.java
@@ -55,7 +55,9 @@ public class ActiveScanImpl extends ActiveScan {
private String user;
private Authorizations authorizations;
- ActiveScanImpl(Instance instance, org.apache.accumulo.core.tabletserver.thrift.ActiveScan activeScan) throws TableNotFoundException {
+ ActiveScanImpl(Instance instance,
+ org.apache.accumulo.core.tabletserver.thrift.ActiveScan activeScan)
+ throws TableNotFoundException {
this.scanId = activeScan.scanId;
this.client = activeScan.client;
this.user = activeScan.user;
@@ -122,7 +124,8 @@ public class ActiveScanImpl extends ActiveScan {
@Override
@Deprecated
public org.apache.accumulo.core.data.KeyExtent getExtent() {
- return new org.apache.accumulo.core.data.KeyExtent(new Text(extent.getTableId()), extent.getEndRow(), extent.getPrevEndRow());
+ return new org.apache.accumulo.core.data.KeyExtent(new Text(extent.getTableId()),
+ extent.getEndRow(), extent.getPrevEndRow());
}
@Override
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/AuthenticationTokenIdentifier.java b/core/src/main/java/org/apache/accumulo/core/client/impl/AuthenticationTokenIdentifier.java
index 41c9120..56b83b7 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/AuthenticationTokenIdentifier.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/AuthenticationTokenIdentifier.java
@@ -56,7 +56,8 @@ public class AuthenticationTokenIdentifier extends TokenIdentifier {
this.cfg = cfg;
}
- public AuthenticationTokenIdentifier(String principal, int keyId, long issueDate, long expirationDate, String instanceId) {
+ public AuthenticationTokenIdentifier(String principal, int keyId, long issueDate,
+ long expirationDate, String instanceId) {
requireNonNull(principal);
impl = new TAuthenticationTokenIdentifier(principal);
impl.setKeyId(keyId);
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/BaseIteratorEnvironment.java b/core/src/main/java/org/apache/accumulo/core/client/impl/BaseIteratorEnvironment.java
index 7b1c441..b0f390b 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/BaseIteratorEnvironment.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/BaseIteratorEnvironment.java
@@ -29,14 +29,16 @@ import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
import org.apache.accumulo.core.security.Authorizations;
/**
- * An implementation of {@link IteratorEnvironment} that throws {@link UnsupportedOperationException} for each operation. This is useful for situations that
- * need to extend {@link IteratorEnvironment} and implement a subset of the methods.
+ * An implementation of {@link IteratorEnvironment} that throws
+ * {@link UnsupportedOperationException} for each operation. This is useful for situations that need
+ * to extend {@link IteratorEnvironment} and implement a subset of the methods.
*/
public class BaseIteratorEnvironment implements IteratorEnvironment {
@Override
- public SortedKeyValueIterator<Key,Value> reserveMapFileReader(String mapFileName) throws IOException {
+ public SortedKeyValueIterator<Key,Value> reserveMapFileReader(String mapFileName)
+ throws IOException {
throw new UnsupportedOperationException();
}
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ClientContext.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ClientContext.java
index f54a7a9..0f53992 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/ClientContext.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ClientContext.java
@@ -47,10 +47,13 @@ import com.google.common.base.Supplier;
import com.google.common.base.Suppliers;
/**
- * This class represents any essential configuration and credentials needed to initiate RPC operations throughout the code. It is intended to represent a shared
- * object that contains these things from when the client was first constructed. It is not public API, and is only an internal representation of the context in
- * which a client is executing RPCs. If additional parameters are added to the public API that need to be used in the internals of Accumulo, they should be
- * added to this object for later retrieval, rather than as a separate parameter. Any state in this object should be available at the time of its construction.
+ * This class represents any essential configuration and credentials needed to initiate RPC
+ * operations throughout the code. It is intended to represent a shared object that contains these
+ * things from when the client was first constructed. It is not public API, and is only an internal
+ * representation of the context in which a client is executing RPCs. If additional parameters are
+ * added to the public API that need to be used in the internals of Accumulo, they should be added
+ * to this object for later retrieval, rather than as a separate parameter. Any state in this object
+ * should be available at the time of its construction.
*/
public class ClientContext {
@@ -62,7 +65,8 @@ public class ClientContext {
private final AccumuloConfiguration rpcConf;
protected Connector conn;
- // These fields are very frequently accessed (each time a connection is created) and expensive to compute, so cache them.
+ // These fields are very frequently accessed (each time a connection is created) and expensive to
+ // compute, so cache them.
private Supplier<Long> timeoutSupplier;
private Supplier<SaslConnectionParams> saslSupplier;
private Supplier<SslConnectionParams> sslSupplier;
@@ -72,14 +76,17 @@ public class ClientContext {
* Instantiate a client context
*/
public ClientContext(Instance instance, Credentials credentials, ClientConfiguration clientConf) {
- this(instance, credentials, convertClientConfig(requireNonNull(clientConf, "clientConf is null")));
+ this(instance, credentials,
+ convertClientConfig(requireNonNull(clientConf, "clientConf is null")));
this.clientConf = clientConf;
}
/**
- * Instantiate a client context from an existing {@link AccumuloConfiguration}. This is primarily intended for subclasses and testing.
+ * Instantiate a client context from an existing {@link AccumuloConfiguration}. This is primarily
+ * intended for subclasses and testing.
*/
- public ClientContext(Instance instance, Credentials credentials, AccumuloConfiguration serverConf) {
+ public ClientContext(Instance instance, Credentials credentials,
+ AccumuloConfiguration serverConf) {
inst = requireNonNull(instance, "instance is null");
creds = requireNonNull(credentials, "credentials is null");
rpcConf = requireNonNull(serverConf, "serverConf is null");
@@ -138,7 +145,8 @@ public class ClientContext {
}
/**
- * Update the credentials in the current context after changing the current user's password or other auth token
+ * Update the credentials in the current context after changing the current user's password or
+ * other auth token
*/
public synchronized void setCredentials(Credentials newCredentials) {
checkArgument(newCredentials != null, "newCredentials is null");
@@ -207,7 +215,8 @@ public class ClientContext {
}
/**
- * A utility method for converting client configuration to a standard configuration object for use internally.
+ * A utility method for converting client configuration to a standard configuration object for use
+ * internally.
*
* @param config
* the original {@link ClientConfiguration}
@@ -228,15 +237,20 @@ public class ClientContext {
org.apache.hadoop.conf.Configuration hadoopConf = getHadoopConfiguration();
if (null != hadoopConf) {
try {
- char[] value = CredentialProviderFactoryShim.getValueFromCredentialProvider(hadoopConf, key);
+ char[] value = CredentialProviderFactoryShim
+ .getValueFromCredentialProvider(hadoopConf, key);
if (null != value) {
log.trace("Loaded sensitive value for {} from CredentialProvider", key);
return new String(value);
} else {
- log.trace("Tried to load sensitive value for {} from CredentialProvider, but none was found", key);
+ log.trace(
+ "Tried to load sensitive value for {} from CredentialProvider, but none was found",
+ key);
}
} catch (IOException e) {
- log.warn("Failed to extract sensitive property ({}) from Hadoop CredentialProvider, falling back to base AccumuloConfiguration", key, e);
+ log.warn(
+ "Failed to extract sensitive property ({}) from Hadoop CredentialProvider, falling back to base AccumuloConfiguration",
+ key, e);
}
}
}
@@ -248,7 +262,8 @@ public class ClientContext {
if (Property.GENERAL_KERBEROS_PRINCIPAL == property) {
if (config.containsKey(ClientProperty.KERBEROS_SERVER_PRIMARY.getKey())) {
// Avoid providing a realm since we don't know what it is...
- return config.getString(ClientProperty.KERBEROS_SERVER_PRIMARY.getKey()) + "/_HOST@" + SaslConnectionParams.getDefaultRealm();
+ return config.getString(ClientProperty.KERBEROS_SERVER_PRIMARY.getKey()) + "/_HOST@"
+ + SaslConnectionParams.getDefaultRealm();
}
}
return defaults.get(property);
@@ -266,13 +281,16 @@ public class ClientContext {
props.put(key, config.getString(key));
}
- // Two client props that don't exist on the server config. Client doesn't need to know about the Kerberos instance from the principle, but servers do
+ // Two client props that don't exist on the server config. Client doesn't need to know about
+ // the Kerberos instance from the principle, but servers do
// Automatically reconstruct the server property when converting a client config.
if (props.containsKey(ClientProperty.KERBEROS_SERVER_PRIMARY.getKey())) {
- final String serverPrimary = props.remove(ClientProperty.KERBEROS_SERVER_PRIMARY.getKey());
+ final String serverPrimary = props
+ .remove(ClientProperty.KERBEROS_SERVER_PRIMARY.getKey());
if (filter.apply(Property.GENERAL_KERBEROS_PRINCIPAL.getKey())) {
// Use the _HOST expansion. It should be unnecessary in "client land".
- props.put(Property.GENERAL_KERBEROS_PRINCIPAL.getKey(), serverPrimary + "/_HOST@" + SaslConnectionParams.getDefaultRealm());
+ props.put(Property.GENERAL_KERBEROS_PRINCIPAL.getKey(),
+ serverPrimary + "/_HOST@" + SaslConnectionParams.getDefaultRealm());
}
}
@@ -286,20 +304,24 @@ public class ClientContext {
}
if (filter.apply(key)) {
- char[] value = CredentialProviderFactoryShim.getValueFromCredentialProvider(hadoopConf, key);
+ char[] value = CredentialProviderFactoryShim
+ .getValueFromCredentialProvider(hadoopConf, key);
if (null != value) {
props.put(key, new String(value));
}
}
}
} catch (IOException e) {
- log.warn("Failed to extract sensitive properties from Hadoop CredentialProvider, falling back to accumulo-site.xml", e);
+ log.warn(
+ "Failed to extract sensitive properties from Hadoop CredentialProvider, falling back to accumulo-site.xml",
+ e);
}
}
}
private org.apache.hadoop.conf.Configuration getHadoopConfiguration() {
- String credProviderPaths = config.getString(Property.GENERAL_SECURITY_CREDENTIAL_PROVIDER_PATHS.getKey());
+ String credProviderPaths = config
+ .getString(Property.GENERAL_SECURITY_CREDENTIAL_PROVIDER_PATHS.getKey());
if (null != credProviderPaths && !credProviderPaths.isEmpty()) {
org.apache.hadoop.conf.Configuration hadoopConf = new org.apache.hadoop.conf.Configuration();
hadoopConf.set(CredentialProviderFactoryShim.CREDENTIAL_PROVIDER_PATH, credProviderPaths);
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ConditionalWriterImpl.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ConditionalWriterImpl.java
index a8aecf6..6d1dc3d 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/ConditionalWriterImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ConditionalWriterImpl.java
@@ -107,8 +107,8 @@ class ConditionalWriterImpl implements ConditionalWriter {
}
}
- private static ThreadPoolExecutor cleanupThreadPool = new ThreadPoolExecutor(1, 1, 3, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(),
- new CleanupThreadFactory());
+ private static ThreadPoolExecutor cleanupThreadPool = new ThreadPoolExecutor(1, 1, 3,
+ TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new CleanupThreadFactory());
static {
cleanupThreadPool.allowCoreThreadTimeOut(true);
@@ -348,10 +348,12 @@ class ConditionalWriterImpl implements ConditionalWriter {
private void reschedule(SendTask task) {
ServerQueue serverQueue = getServerQueue(task.location);
- // just finished processing work for this server, could reschedule if it has more work or immediately process the work
+ // just finished processing work for this server, could reschedule if it has more work or
+ // immediately process the work
// this code reschedules the the server for processing later... there may be other queues with
// more data that need to be processed... also it will give the current server time to build
- // up more data... the thinking is that rescheduling instead or processing immediately will result
+ // up more data... the thinking is that rescheduling instead or processing immediately will
+ // result
// in bigger batches and less RPC overhead
synchronized (serverQueue) {
@@ -398,7 +400,8 @@ class ConditionalWriterImpl implements ConditionalWriter {
this.context = context;
this.auths = config.getAuthorizations();
this.ve = new VisibilityEvaluator(config.getAuthorizations());
- this.threadPool = new ScheduledThreadPoolExecutor(config.getMaxWriteThreads(), new NamingThreadFactory(this.getClass().getSimpleName()));
+ this.threadPool = new ScheduledThreadPoolExecutor(config.getMaxWriteThreads(),
+ new NamingThreadFactory(this.getClass().getSimpleName()));
this.locator = new SyncingTabletLocator(context, tableId);
this.serverQueues = new HashMap<>();
this.tableId = tableId;
@@ -438,7 +441,8 @@ class ConditionalWriterImpl implements ConditionalWriter {
count++;
if (mut.getConditions().size() == 0)
- throw new IllegalArgumentException("ConditionalMutation had no conditions " + new String(mut.getRow(), UTF_8));
+ throw new IllegalArgumentException(
+ "ConditionalMutation had no conditions " + new String(mut.getRow(), UTF_8));
for (Condition cond : mut.getConditions()) {
if (!isVisible(cond.getVisibility())) {
@@ -504,7 +508,8 @@ class ConditionalWriterImpl implements ConditionalWriter {
private HashMap<HostAndPort,SessionID> cachedSessionIDs = new HashMap<>();
- private SessionID reserveSessionID(HostAndPort location, TabletClientService.Iface client, TInfo tinfo) throws ThriftSecurityException, TException {
+ private SessionID reserveSessionID(HostAndPort location, TabletClientService.Iface client,
+ TInfo tinfo) throws ThriftSecurityException, TException {
// avoid cost of repeatedly making RPC to create sessions, reuse sessions
synchronized (cachedSessionIDs) {
SessionID sid = cachedSessionIDs.get(location);
@@ -521,7 +526,8 @@ class ConditionalWriterImpl implements ConditionalWriter {
}
}
- TConditionalSession tcs = client.startConditionalUpdate(tinfo, context.rpcCreds(), ByteBufferUtil.toByteBuffers(auths.getAuthorizations()), tableId,
+ TConditionalSession tcs = client.startConditionalUpdate(tinfo, context.rpcCreds(),
+ ByteBufferUtil.toByteBuffers(auths.getAuthorizations()), tableId,
DurabilityImpl.toThrift(durability), this.classLoaderContext);
synchronized (cachedSessionIDs) {
@@ -598,7 +604,8 @@ class ConditionalWriterImpl implements ConditionalWriter {
while (tresults == null) {
try {
sessionId = reserveSessionID(location, client, tinfo);
- tresults = client.conditionalUpdate(tinfo, sessionId.sessionID, tmutations, compressedIters.getSymbolTable());
+ tresults = client.conditionalUpdate(tinfo, sessionId.sessionID, tmutations,
+ compressedIters.getSymbolTable());
} catch (NoSuchScanIDException nssie) {
sessionId = null;
invalidateSessionID(location);
@@ -627,8 +634,9 @@ class ConditionalWriterImpl implements ConditionalWriter {
queueRetry(ignored, location);
} catch (ThriftSecurityException tse) {
- AccumuloSecurityException ase = new AccumuloSecurityException(context.getCredentials().getPrincipal(), tse.getCode(), Tables.getPrintableTableInfoFromId(
- context.getInstance(), tableId), tse);
+ AccumuloSecurityException ase = new AccumuloSecurityException(
+ context.getCredentials().getPrincipal(), tse.getCode(),
+ Tables.getPrintableTableInfoFromId(context.getInstance(), tableId), tse);
queueException(location, cmidToCm, ase);
} catch (TTransportException e) {
locator.invalidateCache(context.getInstance(), location.toString());
@@ -659,7 +667,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, TabletServerMutations<QCMutation> mutations,
+ Map<Long,CMK> cmidToCm, SessionID sessionId) {
if (sessionId == null) {
queueRetry(cmidToCm, location);
} else {
@@ -674,13 +683,16 @@ class ConditionalWriterImpl implements ConditionalWriter {
}
/**
- * The purpose of this code is to ensure that a conditional mutation will not execute when its status is unknown. This allows a user to read the row when the
- * status is unknown and not have to worry about the tserver applying the mutation after the scan.
+ * The purpose of this code is to ensure that a conditional mutation will not execute when its
+ * status is unknown. This allows a user to read the row when the status is unknown and not have
+ * to worry about the tserver applying the mutation after the scan.
*
* <p>
- * If a conditional mutation is taking a long time to process, then this method will wait for it to finish... unless this exceeds timeout.
+ * If a conditional mutation is taking a long time to process, then this method will wait for it
+ * to finish... unless this exceeds timeout.
*/
- private void invalidateSession(SessionID sessionId, HostAndPort location) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
+ private void invalidateSession(SessionID sessionId, HostAndPort location)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
long sleepTime = 50;
@@ -691,15 +703,18 @@ class ConditionalWriterImpl implements ConditionalWriter {
ZooCacheFactory zcf = new ZooCacheFactory();
while (true) {
- if (!ZooLock.isLockHeld(zcf.getZooCache(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut()), lid)) {
- // ACCUMULO-1152 added a tserver lock check to the tablet location cache, so this invalidation prevents future attempts to contact the
+ if (!ZooLock.isLockHeld(
+ zcf.getZooCache(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut()), lid)) {
+ // ACCUMULO-1152 added a tserver lock check to the tablet location cache, so this
+ // invalidation prevents future attempts to contact the
// tserver even its gone zombie and is still running w/o a lock
locator.invalidateCache(context.getInstance(), location.toString());
return;
}
try {
- // if the mutation is currently processing, this method will block until its done or times out
+ // if the mutation is currently processing, this method will block until its done or times
+ // out
invalidateSession(sessionId.sessionID, location);
return;
@@ -745,8 +760,9 @@ class ConditionalWriterImpl implements ConditionalWriter {
}
}
- private void convertMutations(TabletServerMutations<QCMutation> mutations, Map<Long,CMK> cmidToCm, MutableLong cmid,
- Map<TKeyExtent,List<TConditionalMutation>> tmutations, CompressedIterators compressedIters) {
+ private void convertMutations(TabletServerMutations<QCMutation> mutations, Map<Long,CMK> cmidToCm,
+ MutableLong cmid, Map<TKeyExtent,List<TConditionalMutation>> tmutations,
+ CompressedIterators compressedIters) {
for (Entry<KeyExtent,List<QCMutation>> entry : mutations.getMutations().entrySet()) {
TKeyExtent tke = entry.getKey().toThrift();
@@ -802,10 +818,12 @@ class ConditionalWriterImpl implements ConditionalWriter {
private static final ConditionComparator CONDITION_COMPARATOR = new ConditionComparator();
- private List<TCondition> convertConditions(ConditionalMutation cm, CompressedIterators compressedIters) {
+ private List<TCondition> convertConditions(ConditionalMutation cm,
+ CompressedIterators compressedIters) {
List<TCondition> conditions = new ArrayList<>(cm.getConditions().size());
- // sort conditions inorder to get better lookup performance. Sort on client side so tserver does not have to do it.
+ // sort conditions inorder to get better lookup performance. Sort on client side so tserver does
+ // not have to do it.
Condition[] ca = cm.getConditions().toArray(new Condition[cm.getConditions().size()]);
Arrays.sort(ca, CONDITION_COMPARATOR);
@@ -820,8 +838,10 @@ class ConditionalWriterImpl implements ConditionalWriter {
ByteBuffer iters = compressedIters.compress(cond.getIterators());
- TCondition tc = new TCondition(ByteBufferUtil.toByteBuffers(cond.getFamily()), ByteBufferUtil.toByteBuffers(cond.getQualifier()),
- ByteBufferUtil.toByteBuffers(cond.getVisibility()), ts, hasTs, ByteBufferUtil.toByteBuffers(cond.getValue()), iters);
+ TCondition tc = new TCondition(ByteBufferUtil.toByteBuffers(cond.getFamily()),
+ ByteBufferUtil.toByteBuffers(cond.getQualifier()),
+ ByteBufferUtil.toByteBuffers(cond.getVisibility()), ts, hasTs,
+ ByteBufferUtil.toByteBuffers(cond.getValue()), iters);
conditions.add(tc);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java
index fc4affb..ebf4f30 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java
@@ -54,23 +54,27 @@ public class ConnectorImpl extends Connector {
private InstanceOperations instanceops = null;
private ReplicationOperations replicationops = null;
- public ConnectorImpl(final ClientContext context) throws AccumuloException, AccumuloSecurityException {
+ public ConnectorImpl(final ClientContext context)
+ throws AccumuloException, AccumuloSecurityException {
checkArgument(context != null, "Context is null");
checkArgument(context.getCredentials() != null, "Credentials are null");
checkArgument(context.getCredentials().getToken() != null, "Authentication token is null");
if (context.getCredentials().getToken().isDestroyed())
- throw new AccumuloSecurityException(context.getCredentials().getPrincipal(), SecurityErrorCode.TOKEN_EXPIRED);
+ throw new AccumuloSecurityException(context.getCredentials().getPrincipal(),
+ SecurityErrorCode.TOKEN_EXPIRED);
this.context = context;
- // Skip fail fast for system services; string literal for class name, to avoid dependency on server jar
+ // Skip fail fast for system services; string literal for class name, to avoid dependency on
+ // server jar
final String tokenClassName = context.getCredentials().getToken().getClass().getName();
if (!SYSTEM_TOKEN_NAME.equals(tokenClassName)) {
ServerClient.execute(context, new ClientExec<ClientService.Client>() {
@Override
public void execute(ClientService.Client iface) throws Exception {
if (!iface.authenticate(Tracer.traceInfo(), context.rpcCreds()))
- throw new AccumuloSecurityException("Authentication failed, access denied", SecurityErrorCode.BAD_CREDENTIALS);
+ throw new AccumuloSecurityException("Authentication failed, access denied",
+ SecurityErrorCode.BAD_CREDENTIALS);
}
});
}
@@ -92,49 +96,58 @@ public class ConnectorImpl extends Connector {
}
@Override
- public BatchScanner createBatchScanner(String tableName, Authorizations authorizations, int numQueryThreads) throws TableNotFoundException {
+ public BatchScanner createBatchScanner(String tableName, Authorizations authorizations,
+ int numQueryThreads) throws TableNotFoundException {
checkArgument(tableName != null, "tableName is null");
checkArgument(authorizations != null, "authorizations is null");
- return new TabletServerBatchReader(context, getTableId(tableName), authorizations, numQueryThreads);
+ return new TabletServerBatchReader(context, getTableId(tableName), authorizations,
+ numQueryThreads);
}
@Deprecated
@Override
- public BatchDeleter createBatchDeleter(String tableName, Authorizations authorizations, int numQueryThreads, long maxMemory, long maxLatency,
- int maxWriteThreads) throws TableNotFoundException {
+ public BatchDeleter createBatchDeleter(String tableName, Authorizations authorizations,
+ int numQueryThreads, long maxMemory, long maxLatency, int maxWriteThreads)
+ throws TableNotFoundException {
checkArgument(tableName != null, "tableName is null");
checkArgument(authorizations != null, "authorizations is null");
- return new TabletServerBatchDeleter(context, getTableId(tableName), authorizations, numQueryThreads, new BatchWriterConfig().setMaxMemory(maxMemory)
- .setMaxLatency(maxLatency, TimeUnit.MILLISECONDS).setMaxWriteThreads(maxWriteThreads));
+ return new TabletServerBatchDeleter(context, getTableId(tableName), authorizations,
+ numQueryThreads, new BatchWriterConfig().setMaxMemory(maxMemory)
+ .setMaxLatency(maxLatency, TimeUnit.MILLISECONDS).setMaxWriteThreads(maxWriteThreads));
}
@Override
- public BatchDeleter createBatchDeleter(String tableName, Authorizations authorizations, int numQueryThreads, BatchWriterConfig config)
- throws TableNotFoundException {
+ public BatchDeleter createBatchDeleter(String tableName, Authorizations authorizations,
+ int numQueryThreads, BatchWriterConfig config) throws TableNotFoundException {
checkArgument(tableName != null, "tableName is null");
checkArgument(authorizations != null, "authorizations is null");
- return new TabletServerBatchDeleter(context, getTableId(tableName), authorizations, numQueryThreads, config);
+ return new TabletServerBatchDeleter(context, getTableId(tableName), authorizations,
+ numQueryThreads, config);
}
@Deprecated
@Override
- public BatchWriter createBatchWriter(String tableName, long maxMemory, long maxLatency, int maxWriteThreads) throws TableNotFoundException {
+ public BatchWriter createBatchWriter(String tableName, long maxMemory, long maxLatency,
+ int maxWriteThreads) throws TableNotFoundException {
checkArgument(tableName != null, "tableName is null");
- return new BatchWriterImpl(context, getTableId(tableName), new BatchWriterConfig().setMaxMemory(maxMemory).setMaxLatency(maxLatency, TimeUnit.MILLISECONDS)
- .setMaxWriteThreads(maxWriteThreads));
+ return new BatchWriterImpl(context, getTableId(tableName),
+ new BatchWriterConfig().setMaxMemory(maxMemory)
+ .setMaxLatency(maxLatency, TimeUnit.MILLISECONDS).setMaxWriteThreads(maxWriteThreads));
}
@Override
- public BatchWriter createBatchWriter(String tableName, BatchWriterConfig config) throws TableNotFoundException {
+ public BatchWriter createBatchWriter(String tableName, BatchWriterConfig config)
+ throws TableNotFoundException {
checkArgument(tableName != null, "tableName is null");
return new BatchWriterImpl(context, getTableId(tableName), config);
}
@Deprecated
@Override
- public MultiTableBatchWriter createMultiTableBatchWriter(long maxMemory, long maxLatency, int maxWriteThreads) {
- return new MultiTableBatchWriterImpl(context, new BatchWriterConfig().setMaxMemory(maxMemory).setMaxLatency(maxLatency, TimeUnit.MILLISECONDS)
- .setMaxWriteThreads(maxWriteThreads));
+ public MultiTableBatchWriter createMultiTableBatchWriter(long maxMemory, long maxLatency,
+ int maxWriteThreads) {
+ return new MultiTableBatchWriterImpl(context, new BatchWriterConfig().setMaxMemory(maxMemory)
+ .setMaxLatency(maxLatency, TimeUnit.MILLISECONDS).setMaxWriteThreads(maxWriteThreads));
}
@Override
@@ -143,12 +156,14 @@ public class ConnectorImpl extends Connector {
}
@Override
- public ConditionalWriter createConditionalWriter(String tableName, ConditionalWriterConfig config) throws TableNotFoundException {
+ public ConditionalWriter createConditionalWriter(String tableName, ConditionalWriterConfig config)
+ throws TableNotFoundException {
return new ConditionalWriterImpl(context, getTableId(tableName), config);
}
@Override
- public Scanner createScanner(String tableName, Authorizations authorizations) throws TableNotFoundException {
+ public Scanner createScanner(String tableName, Authorizations authorizations)
+ throws TableNotFoundException {
checkArgument(tableName != null, "tableName is null");
checkArgument(authorizations != null, "authorizations is null");
return new ScannerImpl(context, getTableId(tableName), authorizations);
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/Credentials.java b/core/src/main/java/org/apache/accumulo/core/client/impl/Credentials.java
index 28a704a..a4522a6 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/Credentials.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/Credentials.java
@@ -30,8 +30,10 @@ import org.apache.accumulo.core.security.thrift.TCredentials;
import org.apache.accumulo.core.util.Base64;
/**
- * A wrapper for internal use. This class carries the instance, principal, and authentication token for use in the public API, in a non-serialized form. This is
- * important, so that the authentication token carried in a {@link Connector} can be destroyed, invalidating future RPC operations from that {@link Connector}.
+ * A wrapper for internal use. This class carries the instance, principal, and authentication token
+ * for use in the public API, in a non-serialized form. This is important, so that the
+ * authentication token carried in a {@link Connector} can be destroyed, invalidating future RPC
+ * operations from that {@link Connector}.
* <p>
* See ACCUMULO-1312
*
@@ -46,9 +48,11 @@ public class Credentials {
* Creates a new credentials object.
*
* @param principal
- * unique identifier for the entity (e.g. a user or service) authorized for these credentials
+ * unique identifier for the entity (e.g. a user or service) authorized for these
+ * credentials
* @param token
- * authentication token used to prove that the principal for these credentials has been properly verified
+ * authentication token used to prove that the principal for these credentials has been
+ * properly verified
*/
public Credentials(String principal, AuthenticationToken token) {
this.principal = principal;
@@ -58,7 +62,8 @@ public class Credentials {
/**
* Gets the principal.
*
- * @return unique identifier for the entity (e.g. a user or service) authorized for these credentials
+ * @return unique identifier for the entity (e.g. a user or service) authorized for these
+ * credentials
*/
public String getPrincipal() {
return principal;
@@ -67,15 +72,17 @@ public class Credentials {
/**
* Gets the authentication token.
*
- * @return authentication token used to prove that the principal for these credentials has been properly verified
+ * @return authentication token used to prove that the principal for these credentials has been
+ * properly verified
*/
public AuthenticationToken getToken() {
return token;
}
/**
- * Converts the current object to the relevant thrift type. The object returned from this contains a non-destroyable version of the
- * {@link AuthenticationToken}, so this should be used just before placing on the wire, and references to it should be tightly controlled.
+ * Converts the current object to the relevant thrift type. The object returned from this contains
+ * a non-destroyable version of the {@link AuthenticationToken}, so this should be used just
+ * before placing on the wire, and references to it should be tightly controlled.
*
* @param instance
* client instance
@@ -85,9 +92,11 @@ public class Credentials {
*/
public TCredentials toThrift(Instance instance) {
TCredentials tCreds = new TCredentials(getPrincipal(), getToken().getClass().getName(),
- ByteBuffer.wrap(AuthenticationTokenSerializer.serialize(getToken())), instance.getInstanceID());
+ ByteBuffer.wrap(AuthenticationTokenSerializer.serialize(getToken())),
+ instance.getInstanceID());
if (getToken().isDestroyed())
- throw new RuntimeException("Token has been destroyed", new AccumuloSecurityException(getPrincipal(), SecurityErrorCode.TOKEN_EXPIRED));
+ throw new RuntimeException("Token has been destroyed",
+ new AccumuloSecurityException(getPrincipal(), SecurityErrorCode.TOKEN_EXPIRED));
return tCreds;
}
@@ -99,23 +108,30 @@ public class Credentials {
* @return a new Credentials instance; destroy the token when you're done.
*/
public static Credentials fromThrift(TCredentials serialized) {
- return new Credentials(serialized.getPrincipal(), AuthenticationTokenSerializer.deserialize(serialized.getTokenClassName(), serialized.getToken()));
+ return new Credentials(serialized.getPrincipal(), AuthenticationTokenSerializer
+ .deserialize(serialized.getTokenClassName(), serialized.getToken()));
}
/**
- * Converts the current object to a serialized form. The object returned from this contains a non-destroyable version of the {@link AuthenticationToken}, so
- * references to it should be tightly controlled.
+ * Converts the current object to a serialized form. The object returned from this contains a
+ * non-destroyable version of the {@link AuthenticationToken}, so references to it should be
+ * tightly controlled.
*
* @return serialized form of these credentials
*/
public final String serialize() {
- return (getPrincipal() == null ? "-" : Base64.encodeBase64String(getPrincipal().getBytes(UTF_8))) + ":"
- + (getToken() == null ? "-" : Base64.encodeBase64String(getToken().getClass().getName().getBytes(UTF_8))) + ":"
- + (getToken() == null ? "-" : Base64.encodeBase64String(AuthenticationTokenSerializer.serialize(getToken())));
+ return (getPrincipal() == null ? "-"
+ : Base64.encodeBase64String(getPrincipal().getBytes(UTF_8)))
+ + ":"
+ + (getToken() == null ? "-"
+ : Base64.encodeBase64String(getToken().getClass().getName().getBytes(UTF_8)))
+ + ":" + (getToken() == null ? "-"
+ : Base64.encodeBase64String(AuthenticationTokenSerializer.serialize(getToken())));
}
/**
- * Converts the serialized form to an instance of {@link Credentials}. The original serialized form will not be affected.
+ * Converts the serialized form to an instance of {@link Credentials}. The original serialized
+ * form will not be affected.
*
* @param serializedForm
* serialized form of credentials
@@ -123,8 +139,10 @@ public class Credentials {
*/
public static final Credentials deserialize(String serializedForm) {
String[] split = serializedForm.split(":", 3);
- String principal = split[0].equals("-") ? null : new String(Base64.decodeBase64(split[0]), UTF_8);
- String tokenType = split[1].equals("-") ? null : new String(Base64.decodeBase64(split[1]), UTF_8);
+ String principal = split[0].equals("-") ? null
+ : new String(Base64.decodeBase64(split[0]), UTF_8);
+ String tokenType = split[1].equals("-") ? null
+ : new String(Base64.decodeBase64(split[1]), UTF_8);
AuthenticationToken token = null;
if (!split[2].equals("-")) {
byte[] tokenBytes = Base64.decodeBase64(split[2]);
@@ -143,15 +161,18 @@ public class Credentials {
if (obj == null || !(obj instanceof Credentials))
return false;
Credentials other = Credentials.class.cast(obj);
- boolean pEq = getPrincipal() == null ? (other.getPrincipal() == null) : (getPrincipal().equals(other.getPrincipal()));
+ boolean pEq = getPrincipal() == null ? (other.getPrincipal() == null)
+ : (getPrincipal().equals(other.getPrincipal()));
if (!pEq)
return false;
- boolean tEq = getToken() == null ? (other.getToken() == null) : (getToken().equals(other.getToken()));
+ boolean tEq = getToken() == null ? (other.getToken() == null)
+ : (getToken().equals(other.getToken()));
return tEq;
}
@Override
public String toString() {
- return getClass().getName() + ":" + getPrincipal() + ":" + (getToken() == null ? null : getToken().getClass().getName()) + ":<hidden>";
+ return getClass().getName() + ":" + getPrincipal() + ":"
+ + (getToken() == null ? null : getToken().getClass().getName()) + ":<hidden>";
}
}
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/DelegationTokenImpl.java b/core/src/main/java/org/apache/accumulo/core/client/impl/DelegationTokenImpl.java
index 5e7a12d..f9d1111 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/DelegationTokenImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/DelegationTokenImpl.java
@@ -46,33 +46,39 @@ public class DelegationTokenImpl extends PasswordToken implements DelegationToke
super();
}
- public DelegationTokenImpl(byte[] delegationTokenPassword, AuthenticationTokenIdentifier identifier) {
+ public DelegationTokenImpl(byte[] delegationTokenPassword,
+ AuthenticationTokenIdentifier identifier) {
requireNonNull(delegationTokenPassword);
requireNonNull(identifier);
setPassword(delegationTokenPassword);
this.identifier = identifier;
}
- public DelegationTokenImpl(Instance instance, UserGroupInformation user, AuthenticationTokenIdentifier identifier) {
+ public DelegationTokenImpl(Instance instance, UserGroupInformation user,
+ AuthenticationTokenIdentifier identifier) {
requireNonNull(instance);
requireNonNull(user);
requireNonNull(identifier);
Credentials creds = user.getCredentials();
- Token<? extends TokenIdentifier> token = creds.getToken(new Text(SERVICE_NAME + "-" + instance.getInstanceID()));
+ Token<? extends TokenIdentifier> token = creds
+ .getToken(new Text(SERVICE_NAME + "-" + instance.getInstanceID()));
if (null == token) {
- throw new IllegalArgumentException("Did not find Accumulo delegation token in provided UserGroupInformation");
+ throw new IllegalArgumentException(
+ "Did not find Accumulo delegation token in provided UserGroupInformation");
}
setPasswordFromToken(token, identifier);
}
- public DelegationTokenImpl(Token<? extends TokenIdentifier> token, AuthenticationTokenIdentifier identifier) {
+ public DelegationTokenImpl(Token<? extends TokenIdentifier> token,
+ AuthenticationTokenIdentifier identifier) {
requireNonNull(token);
requireNonNull(identifier);
setPasswordFromToken(token, identifier);
}
- private void setPasswordFromToken(Token<? extends TokenIdentifier> token, AuthenticationTokenIdentifier identifier) {
+ private void setPasswordFromToken(Token<? extends TokenIdentifier> token,
+ AuthenticationTokenIdentifier identifier) {
if (!AuthenticationTokenIdentifier.TOKEN_KIND.equals(token.getKind())) {
String msg = "Expected an AuthenticationTokenIdentifier but got a " + token.getKind();
log.error(msg);
@@ -137,7 +143,8 @@ public class DelegationTokenImpl extends PasswordToken implements DelegationToke
@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
+ // 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(((DelegationTokenImpl) obj).identifier);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/InstanceOperationsImpl.java b/core/src/main/java/org/apache/accumulo/core/client/impl/InstanceOperationsImpl.java
index 64a23da..fab8b98 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/InstanceOperationsImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/InstanceOperationsImpl.java
@@ -62,7 +62,8 @@ public class InstanceOperationsImpl implements InstanceOperations {
}
@Override
- public void setProperty(final String property, final String value) throws AccumuloException, AccumuloSecurityException, IllegalArgumentException {
+ public void setProperty(final String property, final String value)
+ throws AccumuloException, AccumuloSecurityException, IllegalArgumentException {
checkArgument(property != null, "property is null");
checkArgument(value != null, "value is null");
MasterClient.execute(context, new ClientExec<MasterClientService.Client>() {
@@ -74,7 +75,8 @@ public class InstanceOperationsImpl implements InstanceOperations {
}
@Override
- public void removeProperty(final String property) throws AccumuloException, AccumuloSecurityException {
+ public void removeProperty(final String property)
+ throws AccumuloException, AccumuloSecurityException {
checkArgument(property != null, "property is null");
MasterClient.execute(context, new ClientExec<MasterClientService.Client>() {
@Override
@@ -85,29 +87,36 @@ public class InstanceOperationsImpl implements InstanceOperations {
}
@Override
- public Map<String,String> getSystemConfiguration() throws AccumuloException, AccumuloSecurityException {
- return ServerClient.execute(context, new ClientExecReturn<Map<String,String>,ClientService.Client>() {
- @Override
- public Map<String,String> execute(ClientService.Client client) throws Exception {
- return client.getConfiguration(Tracer.traceInfo(), context.rpcCreds(), ConfigurationType.CURRENT);
- }
- });
+ public Map<String,String> getSystemConfiguration()
+ throws AccumuloException, AccumuloSecurityException {
+ return ServerClient.execute(context,
+ new ClientExecReturn<Map<String,String>,ClientService.Client>() {
+ @Override
+ public Map<String,String> execute(ClientService.Client client) throws Exception {
+ return client.getConfiguration(Tracer.traceInfo(), context.rpcCreds(),
+ ConfigurationType.CURRENT);
+ }
+ });
}
@Override
- public Map<String,String> getSiteConfiguration() throws AccumuloException, AccumuloSecurityException {
- return ServerClient.execute(context, new ClientExecReturn<Map<String,String>,ClientService.Client>() {
- @Override
- public Map<String,String> execute(ClientService.Client client) throws Exception {
- return client.getConfiguration(Tracer.traceInfo(), context.rpcCreds(), ConfigurationType.SITE);
- }
- });
+ public Map<String,String> getSiteConfiguration()
+ throws AccumuloException, AccumuloSecurityException {
+ return ServerClient.execute(context,
+ new ClientExecReturn<Map<String,String>,ClientService.Client>() {
+ @Override
+ public Map<String,String> execute(ClientService.Client client) throws Exception {
+ return client.getConfiguration(Tracer.traceInfo(), context.rpcCreds(),
+ ConfigurationType.SITE);
+ }
+ });
}
@Override
public List<String> getTabletServers() {
Instance instance = context.getInstance();
- ZooCache cache = new ZooCacheFactory().getZooCache(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut());
+ ZooCache cache = new ZooCacheFactory().getZooCache(instance.getZooKeepers(),
+ instance.getZooKeepersSessionTimeOut());
String path = ZooUtil.getRoot(instance) + Constants.ZTSERVERS;
List<String> results = new ArrayList<>();
for (String candidate : cache.getChildren(path)) {
@@ -125,14 +134,16 @@ public class InstanceOperationsImpl implements InstanceOperations {
}
@Override
- public List<ActiveScan> getActiveScans(String tserver) throws AccumuloException, AccumuloSecurityException {
+ public List<ActiveScan> getActiveScans(String tserver)
+ throws AccumuloException, AccumuloSecurityException {
final HostAndPort parsedTserver = HostAndPort.fromString(tserver);
Client client = null;
try {
client = ThriftUtil.getTServerClient(parsedTserver, context);
List<ActiveScan> as = new ArrayList<>();
- for (org.apache.accumulo.core.tabletserver.thrift.ActiveScan activeScan : client.getActiveScans(Tracer.traceInfo(), context.rpcCreds())) {
+ for (org.apache.accumulo.core.tabletserver.thrift.ActiveScan activeScan : client
+ .getActiveScans(Tracer.traceInfo(), context.rpcCreds())) {
try {
as.add(new ActiveScanImpl(context.getInstance(), activeScan));
} catch (TableNotFoundException e) {
@@ -153,7 +164,8 @@ public class InstanceOperationsImpl implements InstanceOperations {
}
@Override
- public boolean testClassLoad(final String className, final String asTypeName) throws AccumuloException, AccumuloSecurityException {
+ public boolean testClassLoad(final String className, final String asTypeName)
+ throws AccumuloException, AccumuloSecurityException {
return ServerClient.execute(context, new ClientExecReturn<Boolean,ClientService.Client>() {
@Override
public Boolean execute(ClientService.Client client) throws Exception {
@@ -163,14 +175,16 @@ public class InstanceOperationsImpl implements InstanceOperations {
}
@Override
- public List<ActiveCompaction> getActiveCompactions(String tserver) throws AccumuloException, AccumuloSecurityException {
+ public List<ActiveCompaction> getActiveCompactions(String tserver)
+ throws AccumuloException, AccumuloSecurityException {
final HostAndPort parsedTserver = HostAndPort.fromString(tserver);
Client client = null;
try {
client = ThriftUtil.getTServerClient(parsedTserver, context);
List<ActiveCompaction> as = new ArrayList<>();
- for (org.apache.accumulo.core.tabletserver.thrift.ActiveCompaction activeCompaction : client.getActiveCompactions(Tracer.traceInfo(), context.rpcCreds())) {
+ for (org.apache.accumulo.core.tabletserver.thrift.ActiveCompaction activeCompaction : client
+ .getActiveCompactions(Tracer.traceInfo(), context.rpcCreds())) {
as.add(new ActiveCompactionImpl(context.getInstance(), activeCompaction));
}
return as;
@@ -191,7 +205,8 @@ public class InstanceOperationsImpl implements InstanceOperations {
TTransport transport = null;
try {
transport = ThriftUtil.createTransport(AddressUtil.parseAddress(tserver, false), context);
- TabletClientService.Client client = ThriftUtil.createClient(new TabletClientService.Client.Factory(), transport);
+ TabletClientService.Client client = ThriftUtil
+ .createClient(new TabletClientService.Client.Factory(), transport);
client.getTabletServerStatus(Tracer.traceInfo(), context.rpcCreds());
} catch (TTransportException e) {
throw new AccumuloException(e);
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/MasterClient.java b/core/src/main/java/org/apache/accumulo/core/client/impl/MasterClient.java
index 856536b..39e1f2d 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/MasterClient.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/MasterClient.java
@@ -66,7 +66,8 @@ public class MasterClient {
try {
// Master requests can take a long time: don't ever time out
- MasterClientService.Client client = ThriftUtil.getClientNoTimeout(new MasterClientService.Client.Factory(), master, context);
+ MasterClientService.Client client = ThriftUtil
+ .getClientNoTimeout(new MasterClientService.Client.Factory(), master, context);
return client;
} catch (TTransportException tte) {
Throwable cause = tte.getCause();
@@ -81,15 +82,17 @@ public class MasterClient {
public static void close(MasterClientService.Iface iface) {
TServiceClient client = (TServiceClient) iface;
- if (client != null && client.getInputProtocol() != null && client.getInputProtocol().getTransport() != null) {
+ if (client != null && client.getInputProtocol() != null
+ && client.getInputProtocol().getTransport() != null) {
ThriftTransportPool.getInstance().returnTransport(client.getInputProtocol().getTransport());
} else {
log.debug("Attempt to close null connection to the master", new Exception());
}
}
- public static <T> T execute(ClientContext context, ClientExecReturn<T,MasterClientService.Client> exec) throws AccumuloException, AccumuloSecurityException,
- TableNotFoundException {
+ public static <T> T execute(ClientContext context,
+ ClientExecReturn<T,MasterClientService.Client> exec)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
MasterClientService.Client client = null;
while (true) {
try {
@@ -120,8 +123,9 @@ public class MasterClient {
}
}
- public static void executeGeneric(ClientContext context, ClientExec<MasterClientService.Client> exec) throws AccumuloException, AccumuloSecurityException,
- TableNotFoundException {
+ public static void executeGeneric(ClientContext context,
+ ClientExec<MasterClientService.Client> exec)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
MasterClientService.Client client = null;
while (true) {
try {
@@ -153,13 +157,15 @@ public class MasterClient {
}
}
- public static void executeTable(ClientContext context, ClientExec<MasterClientService.Client> exec) throws AccumuloException, AccumuloSecurityException,
- TableNotFoundException {
+ public static void executeTable(ClientContext context,
+ ClientExec<MasterClientService.Client> exec)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
executeGeneric(context, exec);
}
- public static void executeNamespace(ClientContext context, ClientExec<MasterClientService.Client> exec) throws AccumuloException, AccumuloSecurityException,
- NamespaceNotFoundException {
+ public static void executeNamespace(ClientContext context,
+ ClientExec<MasterClientService.Client> exec)
+ throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException {
try {
executeGeneric(context, exec);
} catch (TableNotFoundException e) {
@@ -168,7 +174,8 @@ public class MasterClient {
}
}
- public static void execute(ClientContext context, ClientExec<MasterClientService.Client> exec) throws AccumuloException, AccumuloSecurityException {
+ public static void execute(ClientContext context, ClientExec<MasterClientService.Client> exec)
+ throws AccumuloException, AccumuloSecurityException {
try {
executeGeneric(context, exec);
} catch (TableNotFoundException e) {
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 a4a5b2f..e1b2306 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
@@ -61,12 +61,14 @@ public class MultiTableBatchWriterImpl implements MultiTableBatchWriter {
@Override
public void close() {
- throw new UnsupportedOperationException("Must close all tables, can not close an individual table");
+ throw new UnsupportedOperationException(
+ "Must close all tables, can not close an individual table");
}
@Override
public void flush() {
- throw new UnsupportedOperationException("Must flush all tables, can not flush an individual table");
+ throw new UnsupportedOperationException(
+ "Must flush all tables, can not flush an individual table");
}
}
@@ -95,16 +97,19 @@ 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()) {
- log.warn(MultiTableBatchWriterImpl.class.getSimpleName() + " not shutdown; did you forget to call close()?");
+ log.warn(MultiTableBatchWriterImpl.class.getSimpleName()
+ + " not shutdown; did you forget to call close()?");
try {
close();
} catch (MutationsRejectedException mre) {
log.error(MultiTableBatchWriterImpl.class.getSimpleName() + " internal error.", mre);
- throw new RuntimeException("Exception when closing " + MultiTableBatchWriterImpl.class.getSimpleName(), mre);
+ throw new RuntimeException(
+ "Exception when closing " + MultiTableBatchWriterImpl.class.getSimpleName(), mre);
}
}
}
@@ -137,7 +142,8 @@ public class MultiTableBatchWriterImpl implements MultiTableBatchWriter {
}
@Override
- public BatchWriter getBatchWriter(String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
+ public BatchWriter getBatchWriter(String tableName)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
checkArgument(tableName != null, "tableName is null");
String tableId = getId(tableName);
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/NamespaceOperationsHelper.java b/core/src/main/java/org/apache/accumulo/core/client/impl/NamespaceOperationsHelper.java
index 9b3a358..e0e9d73 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/NamespaceOperationsHelper.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/NamespaceOperationsHelper.java
@@ -44,16 +44,19 @@ public abstract class NamespaceOperationsHelper implements NamespaceOperations {
}
@Override
- public void attachIterator(String namespace, IteratorSetting setting) throws AccumuloSecurityException, AccumuloException, NamespaceNotFoundException {
+ public void attachIterator(String namespace, IteratorSetting setting)
+ throws AccumuloSecurityException, AccumuloException, NamespaceNotFoundException {
attachIterator(namespace, setting, EnumSet.allOf(IteratorScope.class));
}
@Override
- public void attachIterator(String namespace, IteratorSetting setting, EnumSet<IteratorScope> scopes) throws AccumuloSecurityException, AccumuloException,
- NamespaceNotFoundException {
+ public void attachIterator(String namespace, IteratorSetting setting,
+ EnumSet<IteratorScope> scopes)
+ throws AccumuloSecurityException, AccumuloException, NamespaceNotFoundException {
checkIteratorConflicts(namespace, setting, scopes);
for (IteratorScope scope : scopes) {
- String root = String.format("%s%s.%s", Property.TABLE_ITERATOR_PREFIX, scope.name().toLowerCase(), setting.getName());
+ String root = String.format("%s%s.%s", Property.TABLE_ITERATOR_PREFIX,
+ scope.name().toLowerCase(), setting.getName());
for (Entry<String,String> prop : setting.getOptions().entrySet()) {
this.setProperty(namespace, root + ".opt." + prop.getKey(), prop.getValue());
}
@@ -62,8 +65,8 @@ public abstract class NamespaceOperationsHelper implements NamespaceOperations {
}
@Override
- public void removeIterator(String namespace, String name, EnumSet<IteratorScope> scopes) throws AccumuloSecurityException, AccumuloException,
- NamespaceNotFoundException {
+ public void removeIterator(String namespace, String name, EnumSet<IteratorScope> scopes)
+ throws AccumuloSecurityException, AccumuloException, NamespaceNotFoundException {
if (!exists(namespace))
throw new NamespaceNotFoundException(null, namespace, null);
Map<String,String> copy = new TreeMap<>();
@@ -71,7 +74,8 @@ public abstract class NamespaceOperationsHelper implements NamespaceOperations {
copy.put(property.getKey(), property.getValue());
}
for (IteratorScope scope : scopes) {
- String root = String.format("%s%s.%s", Property.TABLE_ITERATOR_PREFIX, scope.name().toLowerCase(), name);
+ String root = String.format("%s%s.%s", Property.TABLE_ITERATOR_PREFIX,
+ scope.name().toLowerCase(), name);
for (Entry<String,String> property : copy.entrySet()) {
if (property.getKey().equals(root) || property.getKey().startsWith(root + ".opt."))
this.removeProperty(namespace, property.getKey());
@@ -80,15 +84,16 @@ public abstract class NamespaceOperationsHelper implements NamespaceOperations {
}
@Override
- public IteratorSetting getIteratorSetting(String namespace, String name, IteratorScope scope) throws AccumuloSecurityException, AccumuloException,
- NamespaceNotFoundException {
+ public IteratorSetting getIteratorSetting(String namespace, String name, IteratorScope scope)
+ throws AccumuloSecurityException, AccumuloException, NamespaceNotFoundException {
if (!exists(namespace))
throw new NamespaceNotFoundException(null, namespace, null);
int priority = -1;
String classname = null;
Map<String,String> settings = new HashMap<>();
- String root = String.format("%s%s.%s", Property.TABLE_ITERATOR_PREFIX, scope.name().toLowerCase(), name);
+ String root = String.format("%s%s.%s", Property.TABLE_ITERATOR_PREFIX,
+ scope.name().toLowerCase(), name);
String opt = root + ".opt.";
for (Entry<String,String> property : this.getProperties(namespace)) {
if (property.getKey().equals(root)) {
@@ -109,7 +114,8 @@ public abstract class NamespaceOperationsHelper implements NamespaceOperations {
}
@Override
- public Map<String,EnumSet<IteratorScope>> listIterators(String namespace) throws AccumuloSecurityException, AccumuloException, NamespaceNotFoundException {
+ public Map<String,EnumSet<IteratorScope>> listIterators(String namespace)
+ throws AccumuloSecurityException, AccumuloException, NamespaceNotFoundException {
if (!exists(namespace))
throw new NamespaceNotFoundException(null, namespace, null);
Map<String,EnumSet<IteratorScope>> result = new TreeMap<>();
@@ -129,49 +135,57 @@ public abstract class NamespaceOperationsHelper implements NamespaceOperations {
}
@Override
- public void checkIteratorConflicts(String namespace, IteratorSetting setting, EnumSet<IteratorScope> scopes) throws AccumuloException,
- NamespaceNotFoundException, AccumuloSecurityException {
+ public void checkIteratorConflicts(String namespace, IteratorSetting setting,
+ EnumSet<IteratorScope> scopes)
+ throws AccumuloException, NamespaceNotFoundException, AccumuloSecurityException {
if (!exists(namespace))
throw new NamespaceNotFoundException(null, namespace, null);
for (IteratorScope scope : scopes) {
- String scopeStr = String.format("%s%s", Property.TABLE_ITERATOR_PREFIX, scope.name().toLowerCase());
+ String scopeStr = String.format("%s%s", Property.TABLE_ITERATOR_PREFIX,
+ scope.name().toLowerCase());
String nameStr = String.format("%s.%s", scopeStr, setting.getName());
String optStr = String.format("%s.opt.", nameStr);
Map<String,String> optionConflicts = new TreeMap<>();
for (Entry<String,String> property : this.getProperties(namespace)) {
if (property.getKey().startsWith(scopeStr)) {
if (property.getKey().equals(nameStr))
- throw new AccumuloException(new IllegalArgumentException("iterator name conflict for " + setting.getName() + ": " + property.getKey() + "="
- + property.getValue()));
+ throw new AccumuloException(new IllegalArgumentException("iterator name conflict for "
+ + setting.getName() + ": " + property.getKey() + "=" + property.getValue()));
if (property.getKey().startsWith(optStr))
optionConflicts.put(property.getKey(), property.getValue());
if (property.getKey().contains(".opt."))
continue;
String parts[] = property.getValue().split(",");
if (parts.length != 2)
- throw new AccumuloException("Bad value for existing iterator setting: " + property.getKey() + "=" + property.getValue());
+ throw new AccumuloException("Bad value for existing iterator setting: "
+ + property.getKey() + "=" + property.getValue());
try {
if (Integer.parseInt(parts[0]) == setting.getPriority())
- throw new AccumuloException(new IllegalArgumentException("iterator priority conflict: " + property.getKey() + "=" + property.getValue()));
+ throw new AccumuloException(new IllegalArgumentException(
+ "iterator priority conflict: " + property.getKey() + "=" + property.getValue()));
} catch (NumberFormatException e) {
- throw new AccumuloException("Bad value for existing iterator setting: " + property.getKey() + "=" + property.getValue());
+ throw new AccumuloException("Bad value for existing iterator setting: "
+ + property.getKey() + "=" + property.getValue());
}
}
}
if (optionConflicts.size() > 0)
- throw new AccumuloException(new IllegalArgumentException("iterator options conflict for " + setting.getName() + ": " + optionConflicts));
+ throw new AccumuloException(new IllegalArgumentException(
+ "iterator options conflict for " + setting.getName() + ": " + optionConflicts));
}
}
@Override
- public int addConstraint(String namespace, String constraintClassName) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException {
+ public int addConstraint(String namespace, String constraintClassName)
+ throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException {
TreeSet<Integer> constraintNumbers = new TreeSet<>();
TreeMap<String,Integer> constraintClasses = new TreeMap<>();
int i;
for (Entry<String,String> property : this.getProperties(namespace)) {
if (property.getKey().startsWith(Property.TABLE_CONSTRAINT_PREFIX.toString())) {
try {
- i = Integer.parseInt(property.getKey().substring(Property.TABLE_CONSTRAINT_PREFIX.toString().length()));
+ i = Integer.parseInt(
+ property.getKey().substring(Property.TABLE_CONSTRAINT_PREFIX.toString().length()));
} catch (NumberFormatException e) {
throw new AccumuloException("Bad key for existing constraint: " + property.toString());
}
@@ -183,27 +197,33 @@ public abstract class NamespaceOperationsHelper implements NamespaceOperations {
while (constraintNumbers.contains(i))
i++;
if (constraintClasses.containsKey(constraintClassName))
- throw new AccumuloException("Constraint " + constraintClassName + " already exists for namespace " + namespace + " with number "
- + constraintClasses.get(constraintClassName));
- this.setProperty(namespace, Property.TABLE_CONSTRAINT_PREFIX.toString() + i, constraintClassName);
+ throw new AccumuloException(
+ "Constraint " + constraintClassName + " already exists for namespace " + namespace
+ + " with number " + constraintClasses.get(constraintClassName));
+ this.setProperty(namespace, Property.TABLE_CONSTRAINT_PREFIX.toString() + i,
+ constraintClassName);
return i;
}
@Override
- public void removeConstraint(String namespace, int number) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException {
+ public void removeConstraint(String namespace, int number)
+ throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException {
this.removeProperty(namespace, Property.TABLE_CONSTRAINT_PREFIX.toString() + number);
}
@Override
- public Map<String,Integer> listConstraints(String namespace) throws AccumuloException, NamespaceNotFoundException, AccumuloSecurityException {
+ public Map<String,Integer> listConstraints(String namespace)
+ throws AccumuloException, NamespaceNotFoundException, AccumuloSecurityException {
Map<String,Integer> constraints = new TreeMap<>();
for (Entry<String,String> property : this.getProperties(namespace)) {
if (property.getKey().startsWith(Property.TABLE_CONSTRAINT_PREFIX.toString())) {
if (constraints.containsKey(property.getValue()))
- throw new AccumuloException("Same constraint configured twice: " + property.getKey() + "=" + Property.TABLE_CONSTRAINT_PREFIX
- + constraints.get(property.getValue()) + "=" + property.getKey());
+ throw new AccumuloException("Same constraint configured twice: " + property.getKey() + "="
+ + Property.TABLE_CONSTRAINT_PREFIX + constraints.get(property.getValue()) + "="
+ + property.getKey());
try {
- constraints.put(property.getValue(), Integer.parseInt(property.getKey().substring(Property.TABLE_CONSTRAINT_PREFIX.toString().length())));
+ constraints.put(property.getValue(), Integer.parseInt(
+ property.getKey().substring(Property.TABLE_CONSTRAINT_PREFIX.toString().length())));
} catch (NumberFormatException e) {
throw new AccumuloException("Bad key for existing constraint: " + property.toString());
}
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/NamespaceOperationsImpl.java b/core/src/main/java/org/apache/accumulo/core/client/impl/NamespaceOperationsImpl.java
index 7bd97a6..70c7f9d 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/NamespaceOperationsImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/NamespaceOperationsImpl.java
@@ -76,12 +76,13 @@ public class NamespaceOperationsImpl extends NamespaceOperationsHelper {
timer = new OpTimer().start();
}
- TreeSet<String> namespaces = new TreeSet<>(Namespaces.getNameToIdMap(context.getInstance()).keySet());
+ TreeSet<String> namespaces = new TreeSet<>(
+ Namespaces.getNameToIdMap(context.getInstance()).keySet());
if (timer != null) {
timer.stop();
- log.trace("tid={} Fetched {} namespaces in {}", Thread.currentThread().getId(), namespaces.size(),
- String.format("%.3f secs", timer.scale(TimeUnit.SECONDS)));
+ log.trace("tid={} Fetched {} namespaces in {}", Thread.currentThread().getId(),
+ namespaces.size(), String.format("%.3f secs", timer.scale(TimeUnit.SECONDS)));
}
return namespaces;
@@ -94,7 +95,8 @@ public class NamespaceOperationsImpl extends NamespaceOperationsHelper {
OpTimer timer = null;
if (log.isTraceEnabled()) {
- log.trace("tid={} Checking if namespace {} exists", Thread.currentThread().getId(), namespace);
+ log.trace("tid={} Checking if namespace {} exists", Thread.currentThread().getId(),
+ namespace);
timer = new OpTimer().start();
}
@@ -102,18 +104,21 @@ public class NamespaceOperationsImpl extends NamespaceOperationsHelper {
if (timer != null) {
timer.stop();
- log.trace("tid={} Checked existance of {} in {}", Thread.currentThread().getId(), exists, String.format("%.3f secs", timer.scale(TimeUnit.SECONDS)));
+ log.trace("tid={} Checked existance of {} in {}", Thread.currentThread().getId(), exists,
+ String.format("%.3f secs", timer.scale(TimeUnit.SECONDS)));
}
return exists;
}
@Override
- public void create(String namespace) throws AccumuloException, AccumuloSecurityException, NamespaceExistsException {
+ public void create(String namespace)
+ throws AccumuloException, AccumuloSecurityException, NamespaceExistsException {
checkArgument(namespace != null, "namespace is null");
try {
- doNamespaceFateOperation(FateOperation.NAMESPACE_CREATE, Arrays.asList(ByteBuffer.wrap(namespace.getBytes(UTF_8))),
+ doNamespaceFateOperation(FateOperation.NAMESPACE_CREATE,
+ Arrays.asList(ByteBuffer.wrap(namespace.getBytes(UTF_8))),
Collections.<String,String> emptyMap(), namespace);
} catch (NamespaceNotFoundException e) {
// should not happen
@@ -122,14 +127,17 @@ public class NamespaceOperationsImpl extends NamespaceOperationsHelper {
}
@Override
- public void delete(String namespace) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, NamespaceNotEmptyException {
+ public void delete(String namespace) throws AccumuloException, AccumuloSecurityException,
+ NamespaceNotFoundException, NamespaceNotEmptyException {
checkArgument(namespace != null, "namespace is null");
String namespaceId = Namespaces.getNamespaceId(context.getInstance(), namespace);
- if (namespaceId.equals(Namespaces.ACCUMULO_NAMESPACE_ID) || namespaceId.equals(Namespaces.DEFAULT_NAMESPACE_ID)) {
+ if (namespaceId.equals(Namespaces.ACCUMULO_NAMESPACE_ID)
+ || namespaceId.equals(Namespaces.DEFAULT_NAMESPACE_ID)) {
Credentials credentials = context.getCredentials();
log.debug("{} attempted to delete the {} namespace", credentials.getPrincipal(), namespaceId);
- throw new AccumuloSecurityException(credentials.getPrincipal(), SecurityErrorCode.UNSUPPORTED_OPERATION);
+ throw new AccumuloSecurityException(credentials.getPrincipal(),
+ SecurityErrorCode.UNSUPPORTED_OPERATION);
}
if (Namespaces.getTableIds(context.getInstance(), namespaceId).size() > 0) {
@@ -149,17 +157,19 @@ public class NamespaceOperationsImpl extends NamespaceOperationsHelper {
}
@Override
- public void rename(String oldNamespaceName, String newNamespaceName) throws AccumuloSecurityException, NamespaceNotFoundException, AccumuloException,
+ public void rename(String oldNamespaceName, String newNamespaceName)
+ throws AccumuloSecurityException, NamespaceNotFoundException, AccumuloException,
NamespaceExistsException {
- List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(oldNamespaceName.getBytes(UTF_8)), ByteBuffer.wrap(newNamespaceName.getBytes(UTF_8)));
+ List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(oldNamespaceName.getBytes(UTF_8)),
+ ByteBuffer.wrap(newNamespaceName.getBytes(UTF_8)));
Map<String,String> opts = new HashMap<>();
doNamespaceFateOperation(FateOperation.NAMESPACE_RENAME, args, opts, oldNamespaceName);
}
@Override
- public void setProperty(final String namespace, final String property, final String value) throws AccumuloException, AccumuloSecurityException,
- NamespaceNotFoundException {
+ public void setProperty(final String namespace, final String property, final String value)
+ throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException {
checkArgument(namespace != null, "namespace is null");
checkArgument(property != null, "property is null");
checkArgument(value != null, "value is null");
@@ -167,13 +177,15 @@ public class NamespaceOperationsImpl extends NamespaceOperationsHelper {
MasterClient.executeNamespace(context, new ClientExec<MasterClientService.Client>() {
@Override
public void execute(MasterClientService.Client client) throws Exception {
- client.setNamespaceProperty(Tracer.traceInfo(), context.rpcCreds(), namespace, property, value);
+ client.setNamespaceProperty(Tracer.traceInfo(), context.rpcCreds(), namespace, property,
+ value);
}
});
}
@Override
- public void removeProperty(final String namespace, final String property) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException {
+ public void removeProperty(final String namespace, final String property)
+ throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException {
checkArgument(namespace != null, "namespace is null");
checkArgument(property != null, "property is null");
@@ -186,15 +198,18 @@ public class NamespaceOperationsImpl extends NamespaceOperationsHelper {
}
@Override
- public Iterable<Entry<String,String>> getProperties(final String namespace) throws AccumuloException, NamespaceNotFoundException {
+ public Iterable<Entry<String,String>> getProperties(final String namespace)
+ throws AccumuloException, NamespaceNotFoundException {
checkArgument(namespace != null, "namespace is null");
try {
- return ServerClient.executeRaw(context, new ClientExecReturn<Map<String,String>,ClientService.Client>() {
- @Override
- public Map<String,String> execute(ClientService.Client client) throws Exception {
- return client.getNamespaceConfiguration(Tracer.traceInfo(), context.rpcCreds(), namespace);
- }
- }).entrySet();
+ return ServerClient
+ .executeRaw(context, new ClientExecReturn<Map<String,String>,ClientService.Client>() {
+ @Override
+ public Map<String,String> execute(ClientService.Client client) throws Exception {
+ return client.getNamespaceConfiguration(Tracer.traceInfo(), context.rpcCreds(),
+ namespace);
+ }
+ }).entrySet();
} catch (ThriftTableOperationException e) {
switch (e.getType()) {
case NAMESPACE_NOTFOUND:
@@ -217,8 +232,9 @@ public class NamespaceOperationsImpl extends NamespaceOperationsHelper {
}
@Override
- public boolean testClassLoad(final String namespace, final String className, final String asTypeName) throws NamespaceNotFoundException, AccumuloException,
- AccumuloSecurityException {
+ public boolean testClassLoad(final String namespace, final String className,
+ final String asTypeName)
+ throws NamespaceNotFoundException, AccumuloException, AccumuloSecurityException {
checkArgument(namespace != null, "namespace is null");
checkArgument(className != null, "className is null");
checkArgument(asTypeName != null, "asTypeName is null");
@@ -227,7 +243,8 @@ public class NamespaceOperationsImpl extends NamespaceOperationsHelper {
return ServerClient.executeRaw(context, new ClientExecReturn<Boolean,ClientService.Client>() {
@Override
public Boolean execute(ClientService.Client client) throws Exception {
- return client.checkNamespaceClass(Tracer.traceInfo(), context.rpcCreds(), namespace, className, asTypeName);
+ return client.checkNamespaceClass(Tracer.traceInfo(), context.rpcCreds(), namespace,
+ className, asTypeName);
}
});
} catch (ThriftTableOperationException e) {
@@ -247,19 +264,22 @@ public class NamespaceOperationsImpl extends NamespaceOperationsHelper {
}
@Override
- public void attachIterator(String namespace, IteratorSetting setting, EnumSet<IteratorScope> scopes) throws AccumuloSecurityException, AccumuloException,
- NamespaceNotFoundException {
+ public void attachIterator(String namespace, IteratorSetting setting,
+ EnumSet<IteratorScope> scopes)
+ throws AccumuloSecurityException, AccumuloException, NamespaceNotFoundException {
testClassLoad(namespace, setting.getIteratorClass(), SortedKeyValueIterator.class.getName());
super.attachIterator(namespace, setting, scopes);
}
@Override
- public int addConstraint(String namespace, String constraintClassName) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException {
+ public int addConstraint(String namespace, String constraintClassName)
+ throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException {
testClassLoad(namespace, constraintClassName, Constraint.class.getName());
return super.addConstraint(namespace, constraintClassName);
}
- private String doNamespaceFateOperation(FateOperation op, List<ByteBuffer> args, Map<String,String> opts, String namespace) throws AccumuloSecurityException,
+ private String doNamespaceFateOperation(FateOperation op, List<ByteBuffer> args,
+ Map<String,String> opts, String namespace) throws AccumuloSecurityException,
AccumuloException, NamespaceExistsException, NamespaceNotFoundException {
try {
return tableOps.doFateOperation(op, args, opts, namespace);
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/Namespaces.java b/core/src/main/java/org/apache/accumulo/core/client/impl/Namespaces.java
index 39d5822..9f8ff0d 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/Namespaces.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/Namespaces.java
@@ -45,7 +45,8 @@ public class Namespaces {
public String invalidMessage(String namespace) {
if (namespace == null)
return "Namespace cannot be null";
- return "Namespaces must only contain word characters (letters, digits, and underscores): " + namespace;
+ return "Namespaces must only contain word characters (letters, digits, and underscores): "
+ + namespace;
}
};
@@ -85,7 +86,8 @@ public class Namespaces {
if (sm != null) {
sm.checkPermission(TABLES_PERMISSION);
}
- return new ZooCacheFactory().getZooCache(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut());
+ return new ZooCacheFactory().getZooCache(instance.getZooKeepers(),
+ instance.getZooKeepersSessionTimeOut());
}
private static SortedMap<String,String> getMap(Instance instance, boolean nameAsKey) {
@@ -96,7 +98,8 @@ public class Namespaces {
TreeMap<String,String> namespaceMap = new TreeMap<>();
for (String id : namespaceIds) {
- byte[] path = zc.get(ZooUtil.getRoot(instance) + Constants.ZNAMESPACES + "/" + id + Constants.ZNAMESPACE_NAME);
+ byte[] path = zc.get(
+ ZooUtil.getRoot(instance) + Constants.ZNAMESPACES + "/" + id + Constants.ZNAMESPACE_NAME);
if (path != null) {
if (nameAsKey)
namespaceMap.put(new String(path, UTF_8), id);
@@ -113,17 +116,21 @@ public class Namespaces {
return namespaceIds.contains(namespaceId);
}
- public static String getNamespaceId(Instance instance, String namespace) throws NamespaceNotFoundException {
+ public static String getNamespaceId(Instance instance, String namespace)
+ throws NamespaceNotFoundException {
String id = getNameToIdMap(instance).get(namespace);
if (id == null)
- throw new NamespaceNotFoundException(null, namespace, "getNamespaceId() failed to find namespace");
+ throw new NamespaceNotFoundException(null, namespace,
+ "getNamespaceId() failed to find namespace");
return id;
}
- public static String getNamespaceName(Instance instance, String namespaceId) throws NamespaceNotFoundException {
+ public static String getNamespaceName(Instance instance, String namespaceId)
+ throws NamespaceNotFoundException {
String namespaceName = getIdToNameMap(instance).get(namespaceId);
if (namespaceName == null)
- throw new NamespaceNotFoundException(namespaceId, null, "getNamespaceName() failed to find namespace");
+ throw new NamespaceNotFoundException(namespaceId, null,
+ "getNamespaceName() failed to find namespace");
return namespaceName;
}
@@ -135,7 +142,8 @@ public class Namespaces {
return getMap(instance, false);
}
- public static List<String> getTableIds(Instance instance, String namespaceId) throws NamespaceNotFoundException {
+ public static List<String> getTableIds(Instance instance, String namespaceId)
+ throws NamespaceNotFoundException {
String namespace = getNamespaceName(instance, namespaceId);
List<String> names = new LinkedList<>();
for (Entry<String,String> nameToId : Tables.getNameToIdMap(instance).entrySet())
@@ -144,7 +152,8 @@ public class Namespaces {
return names;
}
- public static List<String> getTableNames(Instance instance, String namespaceId) throws NamespaceNotFoundException {
+ public static List<String> getTableNames(Instance instance, String namespaceId)
+ throws NamespaceNotFoundException {
String namespace = getNamespaceName(instance, namespaceId);
List<String> names = new LinkedList<>();
for (String name : Tables.getNameToIdMap(instance).keySet())
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineIterator.java b/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineIterator.java
index aba89a4..783ea77 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineIterator.java
@@ -77,7 +77,8 @@ class OfflineIterator implements Iterator<Entry<Key,Value>> {
private boolean useSample;
private SamplerConfiguration sampleConf;
- public OfflineIteratorEnvironment(Authorizations auths, AccumuloConfiguration acuTableConf, boolean useSample, SamplerConfiguration samplerConf) {
+ public OfflineIteratorEnvironment(Authorizations auths, AccumuloConfiguration acuTableConf,
+ boolean useSample, SamplerConfiguration samplerConf) {
this.authorizations = auths;
this.conf = acuTableConf;
this.useSample = useSample;
@@ -85,7 +86,8 @@ class OfflineIterator implements Iterator<Entry<Key,Value>> {
}
@Override
- public SortedKeyValueIterator<Key,Value> reserveMapFileReader(String mapFileName) throws IOException {
+ public SortedKeyValueIterator<Key,Value> reserveMapFileReader(String mapFileName)
+ throws IOException {
throw new NotImplementedException();
}
@@ -153,13 +155,15 @@ class OfflineIterator implements Iterator<Entry<Key,Value>> {
private ArrayList<SortedKeyValueIterator<Key,Value>> readers;
private AccumuloConfiguration config;
- public OfflineIterator(ScannerOptions options, Instance instance, Credentials credentials, Authorizations authorizations, Text table, Range range) {
+ public OfflineIterator(ScannerOptions options, Instance instance, Credentials credentials,
+ Authorizations authorizations, Text table, Range range) {
this.options = new ScannerOptions(options);
this.instance = instance;
this.range = range;
if (this.options.fetchedColumns.size() > 0) {
- this.range = range.bound(this.options.fetchedColumns.first(), this.options.fetchedColumns.last());
+ this.range = range.bound(this.options.fetchedColumns.first(),
+ this.options.fetchedColumns.last());
}
this.tableId = table.toString();
@@ -216,7 +220,8 @@ class OfflineIterator implements Iterator<Entry<Key,Value>> {
else
startRow = new Text();
- nextRange = new Range(new KeyExtent(tableId, startRow, null).getMetadataEntry(), true, null, false);
+ nextRange = new Range(new KeyExtent(tableId, startRow, null).getMetadataEntry(), true, null,
+ false);
} else {
if (currentExtent.getEndRow() == null) {
@@ -240,7 +245,8 @@ class OfflineIterator implements Iterator<Entry<Key,Value>> {
if (Tables.getTableState(instance, tableId) != TableState.OFFLINE) {
Tables.clearCache(instance);
if (Tables.getTableState(instance, tableId) != TableState.OFFLINE) {
- throw new AccumuloException("Table is online " + tableId + " cannot scan tablet in offline mode " + eloc.getFirst());
+ throw new AccumuloException("Table is online " + tableId
+ + " cannot scan tablet in offline mode " + eloc.getFirst());
}
}
@@ -259,7 +265,8 @@ class OfflineIterator implements Iterator<Entry<Key,Value>> {
throw new AccumuloException(" " + currentExtent + " is not previous extent " + extent);
// Old property is only used to resolve relative paths into absolute paths. For systems upgraded
- // with relative paths, it's assumed that correct instance.dfs.{uri,dir} is still correct in the configuration
+ // with relative paths, it's assumed that correct instance.dfs.{uri,dir} is still correct in the
+ // configuration
@SuppressWarnings("deprecation")
String tablesDir = config.get(Property.INSTANCE_DFS_DIR) + Constants.HDFS_TABLES_DIR;
@@ -278,12 +285,14 @@ class OfflineIterator implements Iterator<Entry<Key,Value>> {
}
iter = createIterator(extent, absFiles);
- iter.seek(range, LocalityGroupUtil.families(options.fetchedColumns), options.fetchedColumns.size() == 0 ? false : true);
+ iter.seek(range, LocalityGroupUtil.families(options.fetchedColumns),
+ options.fetchedColumns.size() == 0 ? false : true);
currentExtent = extent;
}
- private Pair<KeyExtent,String> getTabletFiles(Range nextRange, List<String> relFiles) throws TableNotFoundException {
+ private Pair<KeyExtent,String> getTabletFiles(Range nextRange, List<String> relFiles)
+ throws TableNotFoundException {
Scanner scanner = conn.createScanner(MetadataTable.NAME, Authorizations.EMPTY);
scanner.setBatchSize(100);
scanner.setRange(nextRange);
@@ -315,8 +324,8 @@ class OfflineIterator implements Iterator<Entry<Key,Value>> {
return new Pair<>(extent, location);
}
- private SortedKeyValueIterator<Key,Value> createIterator(KeyExtent extent, List<String> absFiles) throws TableNotFoundException, AccumuloException,
- IOException {
+ private SortedKeyValueIterator<Key,Value> createIterator(KeyExtent extent, List<String> absFiles)
+ throws TableNotFoundException, AccumuloException, IOException {
// TODO share code w/ tablet - ACCUMULO-1303
AccumuloConfiguration acuTableConf = AccumuloConfiguration.getTableConfiguration(conn, tableId);
@@ -330,17 +339,22 @@ class OfflineIterator implements Iterator<Entry<Key,Value>> {
readers.clear();
SamplerConfiguration scannerSamplerConfig = options.getSamplerConfiguration();
- SamplerConfigurationImpl scannerSamplerConfigImpl = scannerSamplerConfig == null ? null : new SamplerConfigurationImpl(scannerSamplerConfig);
- SamplerConfigurationImpl samplerConfImpl = SamplerConfigurationImpl.newSamplerConfig(acuTableConf);
-
- if (scannerSamplerConfigImpl != null && ((samplerConfImpl != null && !scannerSamplerConfigImpl.equals(samplerConfImpl)) || samplerConfImpl == null)) {
+ SamplerConfigurationImpl scannerSamplerConfigImpl = scannerSamplerConfig == null ? null
+ : new SamplerConfigurationImpl(scannerSamplerConfig);
+ SamplerConfigurationImpl samplerConfImpl = SamplerConfigurationImpl
+ .newSamplerConfig(acuTableConf);
+
+ if (scannerSamplerConfigImpl != null
+ && ((samplerConfImpl != null && !scannerSamplerConfigImpl.equals(samplerConfImpl))
+ || samplerConfImpl == null)) {
throw new SampleNotPresentException();
}
// TODO need to close files - ACCUMULO-1303
for (String file : absFiles) {
FileSystem fs = VolumeConfiguration.getVolume(file, conf, config).getFileSystem();
- FileSKVIterator reader = FileOperations.getInstance().newReaderBuilder().forFile(file, fs, conf).withTableConfiguration(acuTableConf).build();
+ FileSKVIterator reader = FileOperations.getInstance().newReaderBuilder()
+ .forFile(file, fs, conf).withTableConfiguration(acuTableConf).build();
if (scannerSamplerConfigImpl != null) {
reader = reader.getSample(scannerSamplerConfigImpl);
if (reader == null)
@@ -351,18 +365,21 @@ class OfflineIterator implements Iterator<Entry<Key,Value>> {
MultiIterator multiIter = new MultiIterator(readers, extent);
- OfflineIteratorEnvironment iterEnv = new OfflineIteratorEnvironment(authorizations, acuTableConf, false, samplerConfImpl == null ? null
- : samplerConfImpl.toSamplerConfiguration());
+ OfflineIteratorEnvironment iterEnv = new OfflineIteratorEnvironment(authorizations,
+ acuTableConf, false,
+ samplerConfImpl == null ? null : samplerConfImpl.toSamplerConfiguration());
byte[] defaultSecurityLabel;
- ColumnVisibility cv = new ColumnVisibility(acuTableConf.get(Property.TABLE_DEFAULT_SCANTIME_VISIBILITY));
+ ColumnVisibility cv = new ColumnVisibility(
+ acuTableConf.get(Property.TABLE_DEFAULT_SCANTIME_VISIBILITY));
defaultSecurityLabel = cv.getExpression();
- SortedKeyValueIterator<Key,Value> visFilter = IteratorUtil.setupSystemScanIterators(multiIter, new HashSet<>(options.fetchedColumns), authorizations,
- defaultSecurityLabel);
+ SortedKeyValueIterator<Key,Value> visFilter = IteratorUtil.setupSystemScanIterators(multiIter,
+ new HashSet<>(options.fetchedColumns), authorizations, defaultSecurityLabel);
- return iterEnv.getTopLevelIterator(IteratorUtil.loadIterators(IteratorScope.scan, visFilter, extent, acuTableConf, options.serverSideIteratorList,
- options.serverSideIteratorOptions, iterEnv, false));
+ return iterEnv.getTopLevelIterator(
+ IteratorUtil.loadIterators(IteratorScope.scan, visFilter, extent, acuTableConf,
+ options.serverSideIteratorList, options.serverSideIteratorOptions, iterEnv, false));
}
@Override
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java b/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java
index 427a7cc..955a8da 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java
@@ -41,7 +41,8 @@ public class OfflineScanner extends ScannerOptions implements Scanner {
private Authorizations authorizations;
private Text tableId;
- public OfflineScanner(Instance instance, Credentials credentials, String tableId, Authorizations authorizations) {
+ public OfflineScanner(Instance instance, Credentials credentials, String tableId,
+ Authorizations authorizations) {
checkArgument(instance != null, "instance is null");
checkArgument(credentials != null, "credentials is null");
checkArgument(tableId != null, "tableId is null");
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationClient.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationClient.java
index 1656d15..6eb1fd0 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationClient.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationClient.java
@@ -46,7 +46,8 @@ public class ReplicationClient {
* the client session for the peer replicant
* @return Client to the ReplicationCoordinator service
*/
- public static ReplicationCoordinator.Client getCoordinatorConnectionWithRetry(ClientContext context) throws AccumuloException {
+ public static ReplicationCoordinator.Client getCoordinatorConnectionWithRetry(
+ ClientContext context) throws AccumuloException {
requireNonNull(context);
Instance instance = context.getInstance();
@@ -55,7 +56,8 @@ public class ReplicationClient {
ReplicationCoordinator.Client result = getCoordinatorConnection(context);
if (result != null)
return result;
- log.debug("Could not get ReplicationCoordinator connection to {}, will retry", instance.getInstanceName());
+ log.debug("Could not get ReplicationCoordinator connection to {}, will retry",
+ instance.getInstanceName());
try {
Thread.sleep(attempts * 250);
} catch (InterruptedException e) {
@@ -63,7 +65,8 @@ public class ReplicationClient {
}
}
- throw new AccumuloException("Timed out trying to communicate with master from " + instance.getInstanceName());
+ throw new AccumuloException(
+ "Timed out trying to communicate with master from " + instance.getInstanceName());
}
public static ReplicationCoordinator.Client getCoordinatorConnection(ClientContext context) {
@@ -78,18 +81,21 @@ public class ReplicationClient {
// This is the master thrift service, we just want the hostname, not the port
String masterThriftService = locations.get(0);
if (masterThriftService.endsWith(":0")) {
- log.warn("Master found for {} did not have real location {}", instance.getInstanceName(), masterThriftService);
+ log.warn("Master found for {} did not have real location {}", instance.getInstanceName(),
+ masterThriftService);
return null;
}
String zkPath = ZooUtil.getRoot(instance) + Constants.ZMASTER_REPLICATION_COORDINATOR_ADDR;
String replCoordinatorAddr;
- log.debug("Using ZooKeeper quorum at {} with path {} to find peer Master information", instance.getZooKeepers(), zkPath);
+ log.debug("Using ZooKeeper quorum at {} with path {} to find peer Master information",
+ instance.getZooKeepers(), zkPath);
// Get the coordinator port for the master we're trying to connect to
try {
- ZooReader reader = new ZooReader(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut());
+ ZooReader reader = new ZooReader(instance.getZooKeepers(),
+ instance.getZooKeepersSessionTimeOut());
replCoordinatorAddr = new String(reader.getData(zkPath, null), UTF_8);
} catch (KeeperException | InterruptedException e) {
log.error("Could not fetch remote coordinator port", e);
@@ -103,7 +109,8 @@ public class ReplicationClient {
try {
// Master requests can take a long time: don't ever time out
- ReplicationCoordinator.Client client = ThriftUtil.getClientNoTimeout(new ReplicationCoordinator.Client.Factory(), coordinatorAddr, context);
+ ReplicationCoordinator.Client client = ThriftUtil.getClientNoTimeout(
+ new ReplicationCoordinator.Client.Factory(), coordinatorAddr, context);
return client;
} catch (TTransportException tte) {
log.debug("Failed to connect to master coordinator service ({})", coordinatorAddr, tte);
@@ -122,12 +129,14 @@ public class ReplicationClient {
* RPC timeout in milliseconds
* @return A ReplicationServicer client to the given host in the given instance
*/
- public static ReplicationServicer.Client getServicerConnection(ClientContext context, HostAndPort server, long timeout) throws TTransportException {
+ public static ReplicationServicer.Client getServicerConnection(ClientContext context,
+ HostAndPort server, long timeout) throws TTransportException {
requireNonNull(context);
requireNonNull(server);
try {
- return ThriftUtil.getClient(new ReplicationServicer.Client.Factory(), server, context, timeout);
+ return ThriftUtil.getClient(new ReplicationServicer.Client.Factory(), server, context,
+ timeout);
} catch (TTransportException tte) {
log.debug("Failed to connect to servicer ({}), will retry...", server, tte);
throw tte;
@@ -136,7 +145,8 @@ public class ReplicationClient {
public static void close(ReplicationCoordinator.Iface iface) {
TServiceClient client = (TServiceClient) iface;
- if (client != null && client.getInputProtocol() != null && client.getInputProtocol().getTransport() != null) {
+ if (client != null && client.getInputProtocol() != null
+ && client.getInputProtocol().getTransport() != null) {
ThriftTransportPool.getInstance().returnTransport(client.getInputProtocol().getTransport());
} else {
log.debug("Attempt to close null connection to the remote system", new Exception());
@@ -145,15 +155,17 @@ public class ReplicationClient {
public static void close(ReplicationServicer.Iface iface) {
TServiceClient client = (TServiceClient) iface;
- if (client != null && client.getInputProtocol() != null && client.getInputProtocol().getTransport() != null) {
+ if (client != null && client.getInputProtocol() != null
+ && client.getInputProtocol().getTransport() != null) {
ThriftTransportPool.getInstance().returnTransport(client.getInputProtocol().getTransport());
} else {
log.debug("Attempt to close null connection to the remote system", new Exception());
}
}
- public static <T> T executeCoordinatorWithReturn(ClientContext context, ClientExecReturn<T,ReplicationCoordinator.Client> exec) throws AccumuloException,
- AccumuloSecurityException {
+ public static <T> T executeCoordinatorWithReturn(ClientContext context,
+ ClientExecReturn<T,ReplicationCoordinator.Client> exec)
+ throws AccumuloException, AccumuloSecurityException {
ReplicationCoordinator.Client client = null;
for (int i = 0; i < 10; i++) {
try {
@@ -178,10 +190,12 @@ public class ReplicationClient {
}
}
- throw new AccumuloException("Could not connect to ReplicationCoordinator at " + context.getInstance().getInstanceName());
+ throw new AccumuloException("Could not connect to ReplicationCoordinator at "
+ + context.getInstance().getInstanceName());
}
- public static <T> T executeServicerWithReturn(ClientContext context, HostAndPort tserver, ClientExecReturn<T,ReplicationServicer.Client> exec, long timeout)
+ public static <T> T executeServicerWithReturn(ClientContext context, HostAndPort tserver,
+ ClientExecReturn<T,ReplicationServicer.Client> exec, long timeout)
throws AccumuloException, AccumuloSecurityException, TTransportException {
ReplicationServicer.Client client = null;
while (true) {
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationOperationsImpl.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationOperationsImpl.java
index da8cc37..527c02a 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationOperationsImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationOperationsImpl.java
@@ -63,20 +63,25 @@ public class ReplicationOperationsImpl implements ReplicationOperations {
}
@Override
- public void addPeer(final String name, final String replicaType) throws AccumuloException, AccumuloSecurityException, PeerExistsException {
+ public void addPeer(final String name, final String replicaType)
+ throws AccumuloException, AccumuloSecurityException, PeerExistsException {
requireNonNull(name);
requireNonNull(replicaType);
- context.getConnector().instanceOperations().setProperty(Property.REPLICATION_PEERS.getKey() + name, replicaType);
+ context.getConnector().instanceOperations()
+ .setProperty(Property.REPLICATION_PEERS.getKey() + name, replicaType);
}
@Override
- public void removePeer(final String name) throws AccumuloException, AccumuloSecurityException, PeerNotFoundException {
+ public void removePeer(final String name)
+ throws AccumuloException, AccumuloSecurityException, PeerNotFoundException {
requireNonNull(name);
- context.getConnector().instanceOperations().removeProperty(Property.REPLICATION_PEERS.getKey() + name);
+ context.getConnector().instanceOperations()
+ .removeProperty(Property.REPLICATION_PEERS.getKey() + name);
}
@Override
- public void drain(String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
+ public void drain(String tableName)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
requireNonNull(tableName);
Set<String> wals = referencedFiles(tableName);
@@ -85,13 +90,15 @@ public class ReplicationOperationsImpl implements ReplicationOperations {
}
@Override
- public void drain(final String tableName, final Set<String> wals) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
+ public void drain(final String tableName, final Set<String> wals)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
requireNonNull(tableName);
final TInfo tinfo = Tracer.traceInfo();
final TCredentials rpcCreds = context.rpcCreds();
- // Ask the master if the table is fully replicated given these WALs, but don't poll inside the master
+ // Ask the master if the table is fully replicated given these WALs, but don't poll inside the
+ // master
boolean drained = false;
while (!drained) {
drained = getMasterDrain(tinfo, rpcCreds, tableName, wals);
@@ -107,8 +114,9 @@ public class ReplicationOperationsImpl implements ReplicationOperations {
}
}
- protected boolean getMasterDrain(final TInfo tinfo, final TCredentials rpcCreds, final String tableName, final Set<String> wals) throws AccumuloException,
- AccumuloSecurityException, TableNotFoundException {
+ protected boolean getMasterDrain(final TInfo tinfo, final TCredentials rpcCreds,
+ final String tableName, final Set<String> wals)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
return MasterClient.execute(context, new ClientExecReturn<Boolean,Client>() {
@Override
public Boolean execute(Client client) throws Exception {
@@ -117,7 +125,8 @@ public class ReplicationOperationsImpl implements ReplicationOperations {
});
}
- protected String getTableId(Connector conn, String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
+ protected String getTableId(Connector conn, String tableName)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
TableOperations tops = conn.tableOperations();
if (!conn.tableOperations().exists(tableName)) {
@@ -136,7 +145,8 @@ public class ReplicationOperationsImpl implements ReplicationOperations {
}
@Override
- public Set<String> referencedFiles(String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
+ public Set<String> referencedFiles(String tableName)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
requireNonNull(tableName);
log.debug("Collecting referenced files for replication of table {}", tableName);
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/RootTabletLocator.java b/core/src/main/java/org/apache/accumulo/core/client/impl/RootTabletLocator.java
index fb002e3..ecd6b78 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/RootTabletLocator.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/RootTabletLocator.java
@@ -57,7 +57,8 @@ public class RootTabletLocator extends TabletLocator {
}
@Override
- public <T extends Mutation> void binMutations(ClientContext context, List<T> mutations, Map<String,TabletServerMutations<T>> binnedMutations, List<T> failures)
+ public <T extends Mutation> void binMutations(ClientContext context, List<T> mutations,
+ Map<String,TabletServerMutations<T>> binnedMutations, List<T> failures)
throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
TabletLocation rootTabletLocation = getRootTabletLocation(context);
if (rootTabletLocation != null) {
@@ -72,13 +73,15 @@ public class RootTabletLocator extends TabletLocator {
}
@Override
- public List<Range> binRanges(ClientContext context, List<Range> ranges, Map<String,Map<KeyExtent,List<Range>>> binnedRanges) throws AccumuloException,
- AccumuloSecurityException, TableNotFoundException {
+ public List<Range> binRanges(ClientContext context, List<Range> ranges,
+ Map<String,Map<KeyExtent,List<Range>>> binnedRanges)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
TabletLocation rootTabletLocation = getRootTabletLocation(context);
if (rootTabletLocation != null) {
for (Range range : ranges) {
- TabletLocatorImpl.addRange(binnedRanges, rootTabletLocation.tablet_location, RootTable.EXTENT, range);
+ TabletLocatorImpl.addRange(binnedRanges, rootTabletLocation.tablet_location,
+ RootTable.EXTENT, range);
}
return Collections.emptyList();
}
@@ -93,7 +96,8 @@ public class RootTabletLocator extends TabletLocator {
@Override
public void invalidateCache(Instance instance, String server) {
- ZooCache zooCache = zcf.getZooCache(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut());
+ ZooCache zooCache = zcf.getZooCache(instance.getZooKeepers(),
+ instance.getZooKeepersSessionTimeOut());
String root = ZooUtil.getRoot(instance) + Constants.ZTSERVERS;
zooCache.clear(root + "/" + server);
}
@@ -104,14 +108,16 @@ public class RootTabletLocator extends TabletLocator {
protected TabletLocation getRootTabletLocation(ClientContext context) {
Instance instance = context.getInstance();
String zRootLocPath = ZooUtil.getRoot(instance) + RootTable.ZROOT_TABLET_LOCATION;
- ZooCache zooCache = zcf.getZooCache(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut());
+ ZooCache zooCache = zcf.getZooCache(instance.getZooKeepers(),
+ instance.getZooKeepersSessionTimeOut());
Logger log = LoggerFactory.getLogger(this.getClass());
OpTimer timer = null;
if (log.isTraceEnabled()) {
- log.trace("tid={} Looking up root tablet location in zookeeper.", Thread.currentThread().getId());
+ log.trace("tid={} Looking up root tablet location in zookeeper.",
+ Thread.currentThread().getId());
timer = new OpTimer().start();
}
@@ -119,7 +125,8 @@ public class RootTabletLocator extends TabletLocator {
if (timer != null) {
timer.stop();
- log.trace("tid={} Found root tablet at {} in {}", Thread.currentThread().getId(), (loc == null ? "null" : new String(loc)),
+ log.trace("tid={} Found root tablet at {} in {}", Thread.currentThread().getId(),
+ (loc == null ? "null" : new String(loc)),
String.format("%.3f secs", timer.scale(TimeUnit.SECONDS)));
}
@@ -136,8 +143,8 @@ public class RootTabletLocator extends TabletLocator {
}
@Override
- public TabletLocation locateTablet(ClientContext context, Text row, boolean skipRow, boolean retry) throws AccumuloException, AccumuloSecurityException,
- TableNotFoundException {
+ public TabletLocation locateTablet(ClientContext context, Text row, boolean skipRow,
+ boolean retry) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
TabletLocation location = getRootTabletLocation(context);
// Always retry when finding the root tablet
while (retry && location == null) {
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 89406f4..07c62eb 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
@@ -32,9 +32,10 @@ import org.apache.accumulo.core.security.Authorizations;
/**
* provides scanner functionality
*
- * "Clients can iterate over multiple column families, and there are several mechanisms for limiting the rows, columns, and timestamps traversed by a scan. For
- * example, we could restrict [a] scan ... to only produce anchors whose columns match [a] regular expression ..., or to only produce anchors whose timestamps
- * fall within ten days of the current time."
+ * "Clients can iterate over multiple column families, and there are several mechanisms for limiting
+ * the rows, columns, and timestamps traversed by a scan. For example, we could restrict [a] scan
+ * ... to only produce anchors whose columns match [a] regular expression ..., or to only produce
+ * anchors whose timestamps fall within ten days of the current time."
*
*/
public class ScannerImpl extends ScannerOptions implements Scanner {
@@ -92,7 +93,8 @@ public class ScannerImpl extends ScannerOptions implements Scanner {
@Override
public synchronized Iterator<Entry<Key,Value>> iterator() {
- return new ScannerIterator(context, tableId, authorizations, range, size, getTimeOut(), this, isolated, readaheadThreshold);
+ return new ScannerIterator(context, tableId, authorizations, range, size, getTimeOut(), this,
+ isolated, readaheadThreshold);
}
@Override
@@ -131,7 +133,8 @@ public class ScannerImpl extends ScannerOptions implements Scanner {
@Override
public synchronized void setReadaheadThreshold(long batches) {
if (0 > batches) {
- throw new IllegalArgumentException("Number of batches before read-ahead must be non-negative");
+ throw new IllegalArgumentException(
+ "Number of batches before read-ahead must be non-negative");
}
readaheadThreshold = batches;
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerIterator.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerIterator.java
index ae55cc0..bc80f55 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerIterator.java
@@ -66,7 +66,8 @@ public class ScannerIterator implements Iterator<Entry<Key,Value>> {
private static final List<KeyValue> EMPTY_LIST = Collections.emptyList();
- private static ThreadPoolExecutor readaheadPool = new ThreadPoolExecutor(0, Integer.MAX_VALUE, 3l, TimeUnit.SECONDS, new SynchronousQueue<Runnable>(),
+ private static ThreadPoolExecutor readaheadPool = new ThreadPoolExecutor(0, Integer.MAX_VALUE, 3l,
+ TimeUnit.SECONDS, new SynchronousQueue<Runnable>(),
new NamingThreadFactory("Accumulo scanner read ahead thread"));
private class Reader implements Runnable {
@@ -89,7 +90,8 @@ public class ScannerIterator implements Iterator<Entry<Key,Value>> {
synchQ.add(currentBatch);
return;
}
- } catch (IsolationException | ScanTimedOutException | AccumuloException | AccumuloSecurityException | TableDeletedException | TableOfflineException
+ } catch (IsolationException | ScanTimedOutException | AccumuloException
+ | AccumuloSecurityException | TableDeletedException | TableOfflineException
| SampleNotPresentException e) {
log.trace("{}", e.getMessage(), e);
synchQ.add(e);
@@ -104,8 +106,8 @@ public class ScannerIterator implements Iterator<Entry<Key,Value>> {
}
- ScannerIterator(ClientContext context, String tableId, Authorizations authorizations, Range range, int size, int timeOut, ScannerOptions options,
- boolean isolated, long readaheadThreshold) {
+ ScannerIterator(ClientContext context, String tableId, Authorizations authorizations, Range range,
+ int size, int timeOut, ScannerOptions options, boolean isolated, long readaheadThreshold) {
this.timeOut = timeOut;
this.readaheadThreshold = readaheadThreshold;
@@ -117,8 +119,10 @@ public class ScannerIterator implements Iterator<Entry<Key,Value>> {
range = range.bound(this.options.fetchedColumns.first(), this.options.fetchedColumns.last());
}
- scanState = new ScanState(context, tableId, authorizations, new Range(range), options.fetchedColumns, size, options.serverSideIteratorList,
- options.serverSideIteratorOptions, isolated, readaheadThreshold, options.getSamplerConfiguration(), options.batchTimeOut, options.classLoaderContext);
+ scanState = new ScanState(context, tableId, authorizations, new Range(range),
+ options.fetchedColumns, size, options.serverSideIteratorList,
+ options.serverSideIteratorOptions, isolated, readaheadThreshold,
+ options.getSamplerConfiguration(), options.batchTimeOut, options.classLoaderContext);
// If we want to start readahead immediately, don't wait for hasNext to be called
if (0l == readaheadThreshold) {
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 a986d87..838d003 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
@@ -75,7 +75,8 @@ public class ScannerOptions implements ScannerBase {
if (ii.iterName.equals(si.getName()))
throw new IllegalArgumentException("Iterator name is already in use " + si.getName());
if (ii.getPriority() == si.getPriority())
- throw new IllegalArgumentException("Iterator priority is already in use " + si.getPriority());
+ throw new IllegalArgumentException(
+ "Iterator priority is already in use " + si.getPriority());
}
serverSideIteratorList.add(new IterInfo(si.getPriority(), si.getIteratorClass(), si.getName()));
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/SecurityOperationsImpl.java b/core/src/main/java/org/apache/accumulo/core/client/impl/SecurityOperationsImpl.java
index 73f17a7..71059b1 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/SecurityOperationsImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/SecurityOperationsImpl.java
@@ -48,7 +48,8 @@ public class SecurityOperationsImpl implements SecurityOperations {
private final ClientContext context;
- private void execute(ClientExec<ClientService.Client> exec) throws AccumuloException, AccumuloSecurityException {
+ private void execute(ClientExec<ClientService.Client> exec)
+ throws AccumuloException, AccumuloSecurityException {
try {
ServerClient.executeRaw(context, exec);
} catch (ThriftTableOperationException ttoe) {
@@ -68,7 +69,8 @@ public class SecurityOperationsImpl implements SecurityOperations {
}
}
- private <T> T execute(ClientExecReturn<T,ClientService.Client> exec) throws AccumuloException, AccumuloSecurityException {
+ private <T> T execute(ClientExecReturn<T,ClientService.Client> exec)
+ throws AccumuloException, AccumuloSecurityException {
try {
return ServerClient.executeRaw(context, exec);
} catch (ThriftTableOperationException ttoe) {
@@ -95,13 +97,15 @@ public class SecurityOperationsImpl implements SecurityOperations {
@Deprecated
@Override
- public void createUser(String user, byte[] password, final Authorizations authorizations) throws AccumuloException, AccumuloSecurityException {
+ public void createUser(String user, byte[] password, final Authorizations authorizations)
+ throws AccumuloException, AccumuloSecurityException {
createLocalUser(user, new PasswordToken(password));
changeUserAuthorizations(user, authorizations);
}
@Override
- public void createLocalUser(final String principal, final PasswordToken password) throws AccumuloException, AccumuloSecurityException {
+ public void createLocalUser(final String principal, final PasswordToken password)
+ throws AccumuloException, AccumuloSecurityException {
checkArgument(principal != null, "principal is null");
if (null == context.getSaslParams()) {
checkArgument(password != null, "password is null");
@@ -110,9 +114,11 @@ public class SecurityOperationsImpl implements SecurityOperations {
@Override
public void execute(ClientService.Client client) throws Exception {
if (null == context.getSaslParams()) {
- client.createLocalUser(Tracer.traceInfo(), context.rpcCreds(), principal, ByteBuffer.wrap(password.getPassword()));
+ client.createLocalUser(Tracer.traceInfo(), context.rpcCreds(), principal,
+ ByteBuffer.wrap(password.getPassword()));
} else {
- client.createLocalUser(Tracer.traceInfo(), context.rpcCreds(), principal, ByteBuffer.wrap(new byte[0]));
+ client.createLocalUser(Tracer.traceInfo(), context.rpcCreds(), principal,
+ ByteBuffer.wrap(new byte[0]));
}
}
});
@@ -125,7 +131,8 @@ public class SecurityOperationsImpl implements SecurityOperations {
}
@Override
- public void dropLocalUser(final String principal) throws AccumuloException, AccumuloSecurityException {
+ public void dropLocalUser(final String principal)
+ throws AccumuloException, AccumuloSecurityException {
checkArgument(principal != null, "principal is null");
execute(new ClientExec<ClientService.Client>() {
@Override
@@ -137,38 +144,44 @@ public class SecurityOperationsImpl implements SecurityOperations {
@Deprecated
@Override
- public boolean authenticateUser(String user, byte[] password) throws AccumuloException, AccumuloSecurityException {
+ public boolean authenticateUser(String user, byte[] password)
+ throws AccumuloException, AccumuloSecurityException {
return authenticateUser(user, new PasswordToken(password));
}
@Override
- public boolean authenticateUser(final String principal, final AuthenticationToken token) throws AccumuloException, AccumuloSecurityException {
+ public boolean authenticateUser(final String principal, final AuthenticationToken token)
+ throws AccumuloException, AccumuloSecurityException {
checkArgument(principal != null, "principal is null");
checkArgument(token != null, "token is null");
final Credentials toAuth = new Credentials(principal, token);
return execute(new ClientExecReturn<Boolean,ClientService.Client>() {
@Override
public Boolean execute(ClientService.Client client) throws Exception {
- return client.authenticateUser(Tracer.traceInfo(), context.rpcCreds(), toAuth.toThrift(context.getInstance()));
+ return client.authenticateUser(Tracer.traceInfo(), context.rpcCreds(),
+ toAuth.toThrift(context.getInstance()));
}
});
}
@Override
@Deprecated
- public void changeUserPassword(String user, byte[] password) throws AccumuloException, AccumuloSecurityException {
+ public void changeUserPassword(String user, byte[] password)
+ throws AccumuloException, AccumuloSecurityException {
changeLocalUserPassword(user, new PasswordToken(password));
}
@Override
- public void changeLocalUserPassword(final String principal, final PasswordToken token) throws AccumuloException, AccumuloSecurityException {
+ public void changeLocalUserPassword(final String principal, final PasswordToken token)
+ throws AccumuloException, AccumuloSecurityException {
checkArgument(principal != null, "principal is null");
checkArgument(token != null, "token is null");
final Credentials toChange = new Credentials(principal, token);
execute(new ClientExec<ClientService.Client>() {
@Override
public void execute(ClientService.Client client) throws Exception {
- client.changeLocalUserPassword(Tracer.traceInfo(), context.rpcCreds(), principal, ByteBuffer.wrap(token.getPassword()));
+ client.changeLocalUserPassword(Tracer.traceInfo(), context.rpcCreds(), principal,
+ ByteBuffer.wrap(token.getPassword()));
}
});
if (context.getCredentials().getPrincipal().equals(principal)) {
@@ -177,42 +190,49 @@ public class SecurityOperationsImpl implements SecurityOperations {
}
@Override
- public void changeUserAuthorizations(final String principal, final Authorizations authorizations) throws AccumuloException, AccumuloSecurityException {
+ public void changeUserAuthorizations(final String principal, final Authorizations authorizations)
+ throws AccumuloException, AccumuloSecurityException {
checkArgument(principal != null, "principal is null");
checkArgument(authorizations != null, "authorizations is null");
execute(new ClientExec<ClientService.Client>() {
@Override
public void execute(ClientService.Client client) throws Exception {
- client.changeAuthorizations(Tracer.traceInfo(), context.rpcCreds(), principal, ByteBufferUtil.toByteBuffers(authorizations.getAuthorizations()));
+ client.changeAuthorizations(Tracer.traceInfo(), context.rpcCreds(), principal,
+ ByteBufferUtil.toByteBuffers(authorizations.getAuthorizations()));
}
});
}
@Override
- public Authorizations getUserAuthorizations(final String principal) throws AccumuloException, AccumuloSecurityException {
+ public Authorizations getUserAuthorizations(final String principal)
+ throws AccumuloException, AccumuloSecurityException {
checkArgument(principal != null, "principal is null");
return execute(new ClientExecReturn<Authorizations,ClientService.Client>() {
@Override
public Authorizations execute(ClientService.Client client) throws Exception {
- return new Authorizations(client.getUserAuthorizations(Tracer.traceInfo(), context.rpcCreds(), principal));
+ return new Authorizations(
+ client.getUserAuthorizations(Tracer.traceInfo(), context.rpcCreds(), principal));
}
});
}
@Override
- public boolean hasSystemPermission(final String principal, final SystemPermission perm) throws AccumuloException, AccumuloSecurityException {
+ public boolean hasSystemPermission(final String principal, final SystemPermission perm)
+ throws AccumuloException, AccumuloSecurityException {
checkArgument(principal != null, "principal is null");
checkArgument(perm != null, "perm is null");
return execute(new ClientExecReturn<Boolean,ClientService.Client>() {
@Override
public Boolean execute(ClientService.Client client) throws Exception {
- return client.hasSystemPermission(Tracer.traceInfo(), context.rpcCreds(), principal, perm.getId());
+ return client.hasSystemPermission(Tracer.traceInfo(), context.rpcCreds(), principal,
+ perm.getId());
}
});
}
@Override
- public boolean hasTablePermission(final String principal, final String table, final TablePermission perm) throws AccumuloException, AccumuloSecurityException {
+ public boolean hasTablePermission(final String principal, final String table,
+ final TablePermission perm) throws AccumuloException, AccumuloSecurityException {
checkArgument(principal != null, "principal is null");
checkArgument(table != null, "table is null");
checkArgument(perm != null, "perm is null");
@@ -220,11 +240,13 @@ public class SecurityOperationsImpl implements SecurityOperations {
return execute(new ClientExecReturn<Boolean,ClientService.Client>() {
@Override
public Boolean execute(ClientService.Client client) throws Exception {
- return client.hasTablePermission(Tracer.traceInfo(), context.rpcCreds(), principal, table, perm.getId());
+ return client.hasTablePermission(Tracer.traceInfo(), context.rpcCreds(), principal, table,
+ perm.getId());
}
});
} catch (AccumuloSecurityException e) {
- if (e.getSecurityErrorCode() == org.apache.accumulo.core.client.security.SecurityErrorCode.NAMESPACE_DOESNT_EXIST)
+ if (e
+ .getSecurityErrorCode() == org.apache.accumulo.core.client.security.SecurityErrorCode.NAMESPACE_DOESNT_EXIST)
throw new AccumuloSecurityException(null, SecurityErrorCode.TABLE_DOESNT_EXIST, e);
else
throw e;
@@ -232,34 +254,37 @@ public class SecurityOperationsImpl implements SecurityOperations {
}
@Override
- public boolean hasNamespacePermission(final String principal, final String namespace, final NamespacePermission permission) throws AccumuloException,
- AccumuloSecurityException {
+ public boolean hasNamespacePermission(final String principal, final String namespace,
+ final NamespacePermission permission) throws AccumuloException, AccumuloSecurityException {
checkArgument(principal != null, "principal is null");
checkArgument(namespace != null, "namespace is null");
checkArgument(permission != null, "permission is null");
return execute(new ClientExecReturn<Boolean,ClientService.Client>() {
@Override
public Boolean execute(ClientService.Client client) throws Exception {
- return client.hasNamespacePermission(Tracer.traceInfo(), context.rpcCreds(), principal, namespace, permission.getId());
+ return client.hasNamespacePermission(Tracer.traceInfo(), context.rpcCreds(), principal,
+ namespace, permission.getId());
}
});
}
@Override
- public void grantSystemPermission(final String principal, final SystemPermission permission) throws AccumuloException, AccumuloSecurityException {
+ public void grantSystemPermission(final String principal, final SystemPermission permission)
+ throws AccumuloException, AccumuloSecurityException {
checkArgument(principal != null, "principal is null");
checkArgument(permission != null, "permission is null");
execute(new ClientExec<ClientService.Client>() {
@Override
public void execute(ClientService.Client client) throws Exception {
- client.grantSystemPermission(Tracer.traceInfo(), context.rpcCreds(), principal, permission.getId());
+ client.grantSystemPermission(Tracer.traceInfo(), context.rpcCreds(), principal,
+ permission.getId());
}
});
}
@Override
- public void grantTablePermission(final String principal, final String table, final TablePermission permission) throws AccumuloException,
- AccumuloSecurityException {
+ public void grantTablePermission(final String principal, final String table,
+ final TablePermission permission) throws AccumuloException, AccumuloSecurityException {
checkArgument(principal != null, "principal is null");
checkArgument(table != null, "table is null");
checkArgument(permission != null, "permission is null");
@@ -267,11 +292,13 @@ public class SecurityOperationsImpl implements SecurityOperations {
execute(new ClientExec<ClientService.Client>() {
@Override
public void execute(ClientService.Client client) throws Exception {
- client.grantTablePermission(Tracer.traceInfo(), context.rpcCreds(), principal, table, permission.getId());
+ client.grantTablePermission(Tracer.traceInfo(), context.rpcCreds(), principal, table,
+ permission.getId());
}
});
} catch (AccumuloSecurityException e) {
- if (e.getSecurityErrorCode() == org.apache.accumulo.core.client.security.SecurityErrorCode.NAMESPACE_DOESNT_EXIST)
+ if (e
+ .getSecurityErrorCode() == org.apache.accumulo.core.client.security.SecurityErrorCode.NAMESPACE_DOESNT_EXIST)
throw new AccumuloSecurityException(null, SecurityErrorCode.TABLE_DOESNT_EXIST, e);
else
throw e;
@@ -279,34 +306,37 @@ public class SecurityOperationsImpl implements SecurityOperations {
}
@Override
- public void grantNamespacePermission(final String principal, final String namespace, final NamespacePermission permission) throws AccumuloException,
- AccumuloSecurityException {
+ public void grantNamespacePermission(final String principal, final String namespace,
+ final NamespacePermission permission) throws AccumuloException, AccumuloSecurityException {
checkArgument(principal != null, "principal is null");
checkArgument(namespace != null, "namespace is null");
checkArgument(permission != null, "permission is null");
execute(new ClientExec<ClientService.Client>() {
@Override
public void execute(ClientService.Client client) throws Exception {
- client.grantNamespacePermission(Tracer.traceInfo(), context.rpcCreds(), principal, namespace, permission.getId());
+ client.grantNamespacePermission(Tracer.traceInfo(), context.rpcCreds(), principal,
+ namespace, permission.getId());
}
});
}
@Override
- public void revokeSystemPermission(final String principal, final SystemPermission permission) throws AccumuloException, AccumuloSecurityException {
+ public void revokeSystemPermission(final String principal, final SystemPermission permission)
+ throws AccumuloException, AccumuloSecurityException {
checkArgument(principal != null, "principal is null");
checkArgument(permission != null, "permission is null");
execute(new ClientExec<ClientService.Client>() {
@Override
public void execute(ClientService.Client client) throws Exception {
- client.revokeSystemPermission(Tracer.traceInfo(), context.rpcCreds(), principal, permission.getId());
+ client.revokeSystemPermission(Tracer.traceInfo(), context.rpcCreds(), principal,
+ permission.getId());
}
});
}
@Override
- public void revokeTablePermission(final String principal, final String table, final TablePermission permission) throws AccumuloException,
- AccumuloSecurityException {
+ public void revokeTablePermission(final String principal, final String table,
+ final TablePermission permission) throws AccumuloException, AccumuloSecurityException {
checkArgument(principal != null, "principal is null");
checkArgument(table != null, "table is null");
checkArgument(permission != null, "permission is null");
@@ -314,11 +344,13 @@ public class SecurityOperationsImpl implements SecurityOperations {
execute(new ClientExec<ClientService.Client>() {
@Override
public void execute(ClientService.Client client) throws Exception {
- client.revokeTablePermission(Tracer.traceInfo(), context.rpcCreds(), principal, table, permission.getId());
+ client.revokeTablePermission(Tracer.traceInfo(), context.rpcCreds(), principal, table,
+ permission.getId());
}
});
} catch (AccumuloSecurityException e) {
- if (e.getSecurityErrorCode() == org.apache.accumulo.core.client.security.SecurityErrorCode.NAMESPACE_DOESNT_EXIST)
+ if (e
+ .getSecurityErrorCode() == org.apache.accumulo.core.client.security.SecurityErrorCode.NAMESPACE_DOESNT_EXIST)
throw new AccumuloSecurityException(null, SecurityErrorCode.TABLE_DOESNT_EXIST, e);
else
throw e;
@@ -326,15 +358,16 @@ public class SecurityOperationsImpl implements SecurityOperations {
}
@Override
- public void revokeNamespacePermission(final String principal, final String namespace, final NamespacePermission permission) throws AccumuloException,
- AccumuloSecurityException {
+ public void revokeNamespacePermission(final String principal, final String namespace,
+ final NamespacePermission permission) throws AccumuloException, AccumuloSecurityException {
checkArgument(principal != null, "principal is null");
checkArgument(namespace != null, "namespace is null");
checkArgument(permission != null, "permission is null");
execute(new ClientExec<ClientService.Client>() {
@Override
public void execute(ClientService.Client client) throws Exception {
- client.revokeNamespacePermission(Tracer.traceInfo(), context.rpcCreds(), principal, namespace, permission.getId());
+ client.revokeNamespacePermission(Tracer.traceInfo(), context.rpcCreds(), principal,
+ namespace, permission.getId());
}
});
}
@@ -356,7 +389,8 @@ public class SecurityOperationsImpl implements SecurityOperations {
}
@Override
- public DelegationToken getDelegationToken(DelegationTokenConfig cfg) throws AccumuloException, AccumuloSecurityException {
+ public DelegationToken getDelegationToken(DelegationTokenConfig cfg)
+ throws AccumuloException, AccumuloSecurityException {
final TDelegationTokenConfig tConfig;
if (null != cfg) {
tConfig = DelegationTokenConfigSerializer.serialize(cfg);
@@ -374,10 +408,12 @@ public class SecurityOperationsImpl implements SecurityOperations {
});
} catch (TableNotFoundException e) {
// should never happen
- throw new AssertionError("Received TableNotFoundException on method which should not throw that exception", e);
+ throw new AssertionError(
+ "Received TableNotFoundException on method which should not throw that exception", e);
}
- AuthenticationTokenIdentifier identifier = new AuthenticationTokenIdentifier(thriftToken.getIdentifier());
+ AuthenticationTokenIdentifier identifier = new AuthenticationTokenIdentifier(
+ thriftToken.getIdentifier());
// Get the password out of the thrift delegation token
return new DelegationTokenImpl(thriftToken.getPassword(), identifier);
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ServerClient.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ServerClient.java
index 373d704..6e49585 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/ServerClient.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ServerClient.java
@@ -45,7 +45,8 @@ import org.slf4j.LoggerFactory;
public class ServerClient {
private static final Logger log = LoggerFactory.getLogger(ServerClient.class);
- public static <T> T execute(ClientContext context, ClientExecReturn<T,ClientService.Client> exec) throws AccumuloException, AccumuloSecurityException {
+ public static <T> T execute(ClientContext context, ClientExecReturn<T,ClientService.Client> exec)
+ throws AccumuloException, AccumuloSecurityException {
try {
return executeRaw(context, exec);
} catch (ThriftSecurityException e) {
@@ -57,7 +58,8 @@ public class ServerClient {
}
}
- public static void execute(ClientContext context, ClientExec<ClientService.Client> exec) throws AccumuloException, AccumuloSecurityException {
+ public static void execute(ClientContext context, ClientExec<ClientService.Client> exec)
+ throws AccumuloException, AccumuloSecurityException {
try {
executeRaw(context, exec);
} catch (ThriftSecurityException e) {
@@ -69,7 +71,8 @@ public class ServerClient {
}
}
- public static <T> T executeRaw(ClientContext context, ClientExecReturn<T,ClientService.Client> exec) throws Exception {
+ public static <T> T executeRaw(ClientContext context,
+ ClientExecReturn<T,ClientService.Client> exec) throws Exception {
while (true) {
ClientService.Client client = null;
String server = null;
@@ -88,7 +91,8 @@ public class ServerClient {
}
}
- public static void executeRaw(ClientContext context, ClientExec<ClientService.Client> exec) throws Exception {
+ public static void executeRaw(ClientContext context, ClientExec<ClientService.Client> exec)
+ throws Exception {
while (true) {
ClientService.Client client = null;
String server = null;
@@ -110,37 +114,43 @@ public class ServerClient {
static volatile boolean warnedAboutTServersBeingDown = false;
- public static Pair<String,ClientService.Client> getConnection(ClientContext context) throws TTransportException {
+ public static Pair<String,ClientService.Client> getConnection(ClientContext context)
+ throws TTransportException {
return getConnection(context, true);
}
- public static Pair<String,ClientService.Client> getConnection(ClientContext context, boolean preferCachedConnections) throws TTransportException {
+ public static Pair<String,ClientService.Client> getConnection(ClientContext context,
+ boolean preferCachedConnections) throws TTransportException {
return getConnection(context, preferCachedConnections, context.getClientTimeoutInMillis());
}
- public static Pair<String,ClientService.Client> getConnection(ClientContext context, boolean preferCachedConnections, long rpcTimeout)
- throws TTransportException {
+ public static Pair<String,ClientService.Client> getConnection(ClientContext context,
+ boolean preferCachedConnections, long rpcTimeout) throws TTransportException {
checkArgument(context != null, "context is null");
// create list of servers
ArrayList<ThriftTransportKey> servers = new ArrayList<>();
// add tservers
Instance instance = context.getInstance();
- ZooCache zc = new ZooCacheFactory().getZooCache(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut());
+ ZooCache zc = new ZooCacheFactory().getZooCache(instance.getZooKeepers(),
+ instance.getZooKeepersSessionTimeOut());
for (String tserver : zc.getChildren(ZooUtil.getRoot(instance) + Constants.ZTSERVERS)) {
String path = ZooUtil.getRoot(instance) + Constants.ZTSERVERS + "/" + tserver;
byte[] data = ZooUtil.getLockData(zc, path);
if (data != null) {
String strData = new String(data, UTF_8);
if (!strData.equals("master"))
- servers.add(new ThriftTransportKey(new ServerServices(strData).getAddress(Service.TSERV_CLIENT), rpcTimeout, context));
+ servers.add(new ThriftTransportKey(
+ new ServerServices(strData).getAddress(Service.TSERV_CLIENT), rpcTimeout, context));
}
}
boolean opened = false;
try {
- Pair<String,TTransport> pair = ThriftTransportPool.getInstance().getAnyTransport(servers, preferCachedConnections);
- ClientService.Client client = ThriftUtil.createClient(new ClientService.Client.Factory(), pair.getSecond());
+ Pair<String,TTransport> pair = ThriftTransportPool.getInstance().getAnyTransport(servers,
+ preferCachedConnections);
+ ClientService.Client client = ThriftUtil.createClient(new ClientService.Client.Factory(),
+ pair.getSecond());
opened = true;
warnedAboutTServersBeingDown = false;
return new Pair<>(pair.getFirst(), client);
@@ -159,7 +169,8 @@ public class ServerClient {
}
public static void close(ClientService.Client client) {
- if (client != null && client.getInputProtocol() != null && client.getInputProtocol().getTransport() != null) {
+ if (client != null && client.getInputProtocol() != null
+ && client.getInputProtocol().getTransport() != null) {
ThriftTransportPool.getInstance().returnTransport(client.getInputProtocol().getTransport());
} else {
log.debug("Attempt to close null connection to a server", new Exception());
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/SyncingTabletLocator.java b/core/src/main/java/org/apache/accumulo/core/client/impl/SyncingTabletLocator.java
index 9275a1e..271afc3 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/SyncingTabletLocator.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/SyncingTabletLocator.java
@@ -32,8 +32,9 @@ import org.apache.hadoop.io.Text;
import org.apache.log4j.Logger;
/**
- * Syncs itself with the static collection of TabletLocators, so that when the server clears it, it will automatically get the most up-to-date version. Caching
- * TabletLocators locally is safe when using SyncingTabletLocator.
+ * Syncs itself with the static collection of TabletLocators, so that when the server clears it, it
+ * will automatically get the most up-to-date version. Caching TabletLocators locally is safe when
+ * using SyncingTabletLocator.
*/
public class SyncingTabletLocator extends TabletLocator {
private static final Logger log = Logger.getLogger(SyncingTabletLocator.class);
@@ -76,20 +77,22 @@ public class SyncingTabletLocator extends TabletLocator {
}
@Override
- public TabletLocation locateTablet(ClientContext context, Text row, boolean skipRow, boolean retry) throws AccumuloException, AccumuloSecurityException,
- TableNotFoundException {
+ public TabletLocation locateTablet(ClientContext context, Text row, boolean skipRow,
+ boolean retry) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
return syncLocator().locateTablet(context, row, skipRow, retry);
}
@Override
- public <T extends Mutation> void binMutations(ClientContext context, List<T> mutations, Map<String,TabletServerMutations<T>> binnedMutations, List<T> failures)
+ public <T extends Mutation> void binMutations(ClientContext context, List<T> mutations,
+ Map<String,TabletServerMutations<T>> binnedMutations, List<T> failures)
throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
syncLocator().binMutations(context, mutations, binnedMutations, failures);
}
@Override
- public List<Range> binRanges(ClientContext context, List<Range> ranges, Map<String,Map<KeyExtent,List<Range>>> binnedRanges) throws AccumuloException,
- AccumuloSecurityException, TableNotFoundException {
+ public List<Range> binRanges(ClientContext context, List<Range> ranges,
+ Map<String,Map<KeyExtent,List<Range>>> binnedRanges)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
return syncLocator().binRanges(context, ranges, binnedRanges);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/TableMap.java b/core/src/main/java/org/apache/accumulo/core/client/impl/TableMap.java
index 3f3d90c..8bd2db3 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/TableMap.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/TableMap.java
@@ -75,7 +75,8 @@ public class TableMap {
namespaceIdToNameMap.put(namespaceId, namespaceName);
}
} catch (NamespaceNotFoundException e) {
- log.error("Table (" + tableId + ") contains reference to namespace (" + namespaceId + ") that doesn't exist", e);
+ log.error("Table (" + tableId + ") contains reference to namespace (" + namespaceId
+ + ") that doesn't exist", e);
continue;
}
}
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsHelper.java b/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsHelper.java
index a81241a..baf53ef 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsHelper.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsHelper.java
@@ -36,19 +36,22 @@ import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope;
public abstract class TableOperationsHelper implements TableOperations {
@Override
- public void attachIterator(String tableName, IteratorSetting setting) throws AccumuloSecurityException, AccumuloException, TableNotFoundException {
+ public void attachIterator(String tableName, IteratorSetting setting)
+ throws AccumuloSecurityException, AccumuloException, TableNotFoundException {
attachIterator(tableName, setting, EnumSet.allOf(IteratorScope.class));
}
@Override
- public void attachIterator(String tableName, IteratorSetting setting, EnumSet<IteratorScope> scopes) throws AccumuloSecurityException, AccumuloException,
- TableNotFoundException {
+ public void attachIterator(String tableName, IteratorSetting setting,
+ EnumSet<IteratorScope> scopes)
+ throws AccumuloSecurityException, AccumuloException, TableNotFoundException {
checkArgument(tableName != null, "tableName is null");
checkArgument(setting != null, "setting is null");
checkArgument(scopes != null, "scopes is null");
checkIteratorConflicts(tableName, setting, scopes);
for (IteratorScope scope : scopes) {
- String root = String.format("%s%s.%s", Property.TABLE_ITERATOR_PREFIX, scope.name().toLowerCase(), setting.getName());
+ String root = String.format("%s%s.%s", Property.TABLE_ITERATOR_PREFIX,
+ scope.name().toLowerCase(), setting.getName());
for (Entry<String,String> prop : setting.getOptions().entrySet()) {
this.setProperty(tableName, root + ".opt." + prop.getKey(), prop.getValue());
}
@@ -57,14 +60,15 @@ public abstract class TableOperationsHelper implements TableOperations {
}
@Override
- public void removeIterator(String tableName, String name, EnumSet<IteratorScope> scopes) throws AccumuloSecurityException, AccumuloException,
- TableNotFoundException {
+ public void removeIterator(String tableName, String name, EnumSet<IteratorScope> scopes)
+ throws AccumuloSecurityException, AccumuloException, TableNotFoundException {
Map<String,String> copy = new TreeMap<>();
for (Entry<String,String> property : this.getProperties(tableName)) {
copy.put(property.getKey(), property.getValue());
}
for (IteratorScope scope : scopes) {
- String root = String.format("%s%s.%s", Property.TABLE_ITERATOR_PREFIX, scope.name().toLowerCase(), name);
+ String root = String.format("%s%s.%s", Property.TABLE_ITERATOR_PREFIX,
+ scope.name().toLowerCase(), name);
for (Entry<String,String> property : copy.entrySet()) {
if (property.getKey().equals(root) || property.getKey().startsWith(root + ".opt."))
this.removeProperty(tableName, property.getKey());
@@ -73,8 +77,8 @@ public abstract class TableOperationsHelper implements TableOperations {
}
@Override
- public IteratorSetting getIteratorSetting(String tableName, String name, IteratorScope scope) throws AccumuloSecurityException, AccumuloException,
- TableNotFoundException {
+ public IteratorSetting getIteratorSetting(String tableName, String name, IteratorScope scope)
+ throws AccumuloSecurityException, AccumuloException, TableNotFoundException {
checkArgument(tableName != null, "tableName is null");
checkArgument(name != null, "name is null");
checkArgument(scope != null, "scope is null");
@@ -82,7 +86,8 @@ public abstract class TableOperationsHelper implements TableOperations {
String classname = null;
Map<String,String> settings = new HashMap<>();
- String root = String.format("%s%s.%s", Property.TABLE_ITERATOR_PREFIX, scope.name().toLowerCase(), name);
+ String root = String.format("%s%s.%s", Property.TABLE_ITERATOR_PREFIX,
+ scope.name().toLowerCase(), name);
String opt = root + ".opt.";
for (Entry<String,String> property : this.getProperties(tableName)) {
if (property.getKey().equals(root)) {
@@ -103,7 +108,8 @@ public abstract class TableOperationsHelper implements TableOperations {
}
@Override
- public Map<String,EnumSet<IteratorScope>> listIterators(String tableName) throws AccumuloSecurityException, AccumuloException, TableNotFoundException {
+ public Map<String,EnumSet<IteratorScope>> listIterators(String tableName)
+ throws AccumuloSecurityException, AccumuloException, TableNotFoundException {
Map<String,EnumSet<IteratorScope>> result = new TreeMap<>();
for (Entry<String,String> property : this.getProperties(tableName)) {
String name = property.getKey();
@@ -121,49 +127,57 @@ public abstract class TableOperationsHelper implements TableOperations {
}
@Override
- public void checkIteratorConflicts(String tableName, IteratorSetting setting, EnumSet<IteratorScope> scopes) throws AccumuloException, TableNotFoundException {
+ public void checkIteratorConflicts(String tableName, IteratorSetting setting,
+ EnumSet<IteratorScope> scopes) throws AccumuloException, TableNotFoundException {
checkArgument(tableName != null, "tableName is null");
checkArgument(setting != null, "setting is null");
checkArgument(scopes != null, "scopes is null");
for (IteratorScope scope : scopes) {
- String scopeStr = String.format("%s%s", Property.TABLE_ITERATOR_PREFIX, scope.name().toLowerCase());
+ String scopeStr = String.format("%s%s", Property.TABLE_ITERATOR_PREFIX,
+ scope.name().toLowerCase());
String nameStr = String.format("%s.%s", scopeStr, setting.getName());
String optStr = String.format("%s.opt.", nameStr);
Map<String,String> optionConflicts = new TreeMap<>();
for (Entry<String,String> property : this.getProperties(tableName)) {
if (property.getKey().startsWith(scopeStr)) {
if (property.getKey().equals(nameStr))
- throw new AccumuloException(new IllegalArgumentException("iterator name conflict for " + setting.getName() + ": " + property.getKey() + "="
- + property.getValue()));
+ throw new AccumuloException(new IllegalArgumentException("iterator name conflict for "
+ + setting.getName() + ": " + property.getKey() + "=" + property.getValue()));
if (property.getKey().startsWith(optStr))
optionConflicts.put(property.getKey(), property.getValue());
if (property.getKey().contains(".opt."))
continue;
String parts[] = property.getValue().split(",");
if (parts.length != 2)
- throw new AccumuloException("Bad value for existing iterator setting: " + property.getKey() + "=" + property.getValue());
+ throw new AccumuloException("Bad value for existing iterator setting: "
+ + property.getKey() + "=" + property.getValue());
try {
if (Integer.parseInt(parts[0]) == setting.getPriority())
- throw new AccumuloException(new IllegalArgumentException("iterator priority conflict: " + property.getKey() + "=" + property.getValue()));
+ throw new AccumuloException(new IllegalArgumentException(
+ "iterator priority conflict: " + property.getKey() + "=" + property.getValue()));
} catch (NumberFormatException e) {
- throw new AccumuloException("Bad value for existing iterator setting: " + property.getKey() + "=" + property.getValue());
+ throw new AccumuloException("Bad value for existing iterator setting: "
+ + property.getKey() + "=" + property.getValue());
}
}
}
if (optionConflicts.size() > 0)
- throw new AccumuloException(new IllegalArgumentException("iterator options conflict for " + setting.getName() + ": " + optionConflicts));
+ throw new AccumuloException(new IllegalArgumentException(
+ "iterator options conflict for " + setting.getName() + ": " + optionConflicts));
}
}
@Override
- public int addConstraint(String tableName, String constraintClassName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
+ public int addConstraint(String tableName, String constraintClassName)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
TreeSet<Integer> constraintNumbers = new TreeSet<>();
TreeMap<String,Integer> constraintClasses = new TreeMap<>();
int i;
for (Entry<String,String> property : this.getProperties(tableName)) {
if (property.getKey().startsWith(Property.TABLE_CONSTRAINT_PREFIX.toString())) {
try {
- i = Integer.parseInt(property.getKey().substring(Property.TABLE_CONSTRAINT_PREFIX.toString().length()));
+ i = Integer.parseInt(
+ property.getKey().substring(Property.TABLE_CONSTRAINT_PREFIX.toString().length()));
} catch (NumberFormatException e) {
throw new AccumuloException("Bad key for existing constraint: " + property.toString());
}
@@ -175,27 +189,32 @@ public abstract class TableOperationsHelper implements TableOperations {
while (constraintNumbers.contains(i))
i++;
if (constraintClasses.containsKey(constraintClassName))
- throw new AccumuloException("Constraint " + constraintClassName + " already exists for table " + tableName + " with number "
- + constraintClasses.get(constraintClassName));
- this.setProperty(tableName, Property.TABLE_CONSTRAINT_PREFIX.toString() + i, constraintClassName);
+ throw new AccumuloException("Constraint " + constraintClassName + " already exists for table "
+ + tableName + " with number " + constraintClasses.get(constraintClassName));
+ this.setProperty(tableName, Property.TABLE_CONSTRAINT_PREFIX.toString() + i,
+ constraintClassName);
return i;
}
@Override
- public void removeConstraint(String tableName, int number) throws AccumuloException, AccumuloSecurityException {
+ public void removeConstraint(String tableName, int number)
+ throws AccumuloException, AccumuloSecurityException {
this.removeProperty(tableName, Property.TABLE_CONSTRAINT_PREFIX.toString() + number);
}
@Override
- public Map<String,Integer> listConstraints(String tableName) throws AccumuloException, TableNotFoundException {
+ public Map<String,Integer> listConstraints(String tableName)
+ throws AccumuloException, TableNotFoundException {
Map<String,Integer> constraints = new TreeMap<>();
for (Entry<String,String> property : this.getProperties(tableName)) {
if (property.getKey().startsWith(Property.TABLE_CONSTRAINT_PREFIX.toString())) {
if (constraints.containsKey(property.getValue()))
- throw new AccumuloException("Same constraint configured twice: " + property.getKey() + "=" + Property.TABLE_CONSTRAINT_PREFIX
- + constraints.get(property.getValue()) + "=" + property.getKey());
+ throw new AccumuloException("Same constraint configured twice: " + property.getKey() + "="
+ + Property.TABLE_CONSTRAINT_PREFIX + constraints.get(property.getValue()) + "="
+ + property.getKey());
try {
- constraints.put(property.getValue(), Integer.parseInt(property.getKey().substring(Property.TABLE_CONSTRAINT_PREFIX.toString().length())));
+ constraints.put(property.getValue(), Integer.parseInt(
+ property.getKey().substring(Property.TABLE_CONSTRAINT_PREFIX.toString().length())));
} catch (NumberFormatException e) {
throw new AccumuloException("Bad key for existing constraint: " + property.toString());
}
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 cc43b1d..9632cc0 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
@@ -150,12 +150,13 @@ public class TableOperationsImpl extends TableOperationsHelper {
timer = new OpTimer().start();
}
- TreeSet<String> tableNames = new TreeSet<>(Tables.getNameToIdMap(context.getInstance()).keySet());
+ TreeSet<String> tableNames = new TreeSet<>(
+ Tables.getNameToIdMap(context.getInstance()).keySet());
if (timer != null) {
timer.stop();
- log.trace("tid={} Fetched {} table names in {}", Thread.currentThread().getId(), tableNames.size(),
- String.format("%.3f secs", timer.scale(TimeUnit.SECONDS)));
+ log.trace("tid={} Fetched {} table names in {}", Thread.currentThread().getId(),
+ tableNames.size(), String.format("%.3f secs", timer.scale(TimeUnit.SECONDS)));
}
return tableNames;
@@ -178,26 +179,30 @@ public class TableOperationsImpl extends TableOperationsHelper {
if (timer != null) {
timer.stop();
- log.trace("tid={} Checked existance of {} in {}", Thread.currentThread().getId(), exists, String.format("%.3f secs", timer.scale(TimeUnit.SECONDS)));
+ log.trace("tid={} Checked existance of {} in {}", Thread.currentThread().getId(), exists,
+ String.format("%.3f secs", timer.scale(TimeUnit.SECONDS)));
}
return exists;
}
@Override
- public void create(String tableName) throws AccumuloException, AccumuloSecurityException, TableExistsException {
+ public void create(String tableName)
+ throws AccumuloException, AccumuloSecurityException, TableExistsException {
create(tableName, new NewTableConfiguration());
}
@Override
@Deprecated
- public void create(String tableName, boolean limitVersion) throws AccumuloException, AccumuloSecurityException, TableExistsException {
+ public void create(String tableName, boolean limitVersion)
+ throws AccumuloException, AccumuloSecurityException, TableExistsException {
create(tableName, limitVersion, TimeType.MILLIS);
}
@Override
@Deprecated
- public void create(String tableName, boolean limitVersion, TimeType timeType) throws AccumuloException, AccumuloSecurityException, TableExistsException {
+ public void create(String tableName, boolean limitVersion, TimeType timeType)
+ throws AccumuloException, AccumuloSecurityException, TableExistsException {
checkArgument(tableName != null, "tableName is null");
checkArgument(timeType != null, "timeType is null");
@@ -210,16 +215,19 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
@Override
- public void create(String tableName, NewTableConfiguration ntc) throws AccumuloException, AccumuloSecurityException, TableExistsException {
+ public void create(String tableName, NewTableConfiguration ntc)
+ throws AccumuloException, AccumuloSecurityException, TableExistsException {
checkArgument(tableName != null, "tableName is null");
checkArgument(ntc != null, "ntc is null");
- List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(UTF_8)), ByteBuffer.wrap(ntc.getTimeType().name().getBytes(UTF_8)));
+ List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(UTF_8)),
+ ByteBuffer.wrap(ntc.getTimeType().name().getBytes(UTF_8)));
Map<String,String> opts = ntc.getProperties();
try {
- doTableFateOperation(tableName, AccumuloException.class, FateOperation.TABLE_CREATE, args, opts);
+ doTableFateOperation(tableName, AccumuloException.class, FateOperation.TABLE_CREATE, args,
+ opts);
} catch (TableNotFoundException e) {
// should not happen
throw new AssertionError(e);
@@ -241,14 +249,17 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
}
- // This method is for retrying in the case of network failures; anything else it passes to the caller to deal with
- private void executeFateOperation(long opid, FateOperation op, List<ByteBuffer> args, Map<String,String> opts, boolean autoCleanUp)
+ // This method is for retrying in the case of network failures; anything else it passes to the
+ // caller to deal with
+ private void executeFateOperation(long opid, FateOperation op, List<ByteBuffer> args,
+ Map<String,String> opts, boolean autoCleanUp)
throws ThriftSecurityException, TException, ThriftTableOperationException {
while (true) {
MasterClientService.Iface client = null;
try {
client = MasterClient.getConnectionWithRetry(context);
- client.executeFateOperation(Tracer.traceInfo(), context.rpcCreds(), opid, op, args, opts, autoCleanUp);
+ client.executeFateOperation(Tracer.traceInfo(), context.rpcCreds(), opid, op, args, opts,
+ autoCleanUp);
break;
} catch (TTransportException tte) {
log.debug("Failed to call executeFateOperation(), retrying ... ", tte);
@@ -259,7 +270,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
}
- private String waitForFateOperation(long opid) throws ThriftSecurityException, TException, ThriftTableOperationException {
+ private String waitForFateOperation(long opid)
+ throws ThriftSecurityException, TException, ThriftTableOperationException {
while (true) {
MasterClientService.Iface client = null;
try {
@@ -290,13 +302,17 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
}
- String doFateOperation(FateOperation op, List<ByteBuffer> args, Map<String,String> opts, String tableOrNamespaceName) throws AccumuloSecurityException,
- TableExistsException, TableNotFoundException, AccumuloException, NamespaceExistsException, NamespaceNotFoundException {
+ String doFateOperation(FateOperation op, List<ByteBuffer> args, Map<String,String> opts,
+ String tableOrNamespaceName)
+ throws AccumuloSecurityException, TableExistsException, TableNotFoundException,
+ AccumuloException, NamespaceExistsException, NamespaceNotFoundException {
return doFateOperation(op, args, opts, tableOrNamespaceName, true);
}
- String doFateOperation(FateOperation op, List<ByteBuffer> args, Map<String,String> opts, String tableOrNamespaceName, boolean wait)
- throws AccumuloSecurityException, TableExistsException, TableNotFoundException, AccumuloException, NamespaceExistsException, NamespaceNotFoundException {
+ String doFateOperation(FateOperation op, List<ByteBuffer> args, Map<String,String> opts,
+ String tableOrNamespaceName, boolean wait)
+ throws AccumuloSecurityException, TableExistsException, TableNotFoundException,
+ AccumuloException, NamespaceExistsException, NamespaceNotFoundException {
Long opid = null;
try {
@@ -311,11 +327,14 @@ public class TableOperationsImpl extends TableOperationsHelper {
} catch (ThriftSecurityException e) {
switch (e.getCode()) {
case TABLE_DOESNT_EXIST:
- throw new TableNotFoundException(null, tableOrNamespaceName, "Target table does not exist");
+ throw new TableNotFoundException(null, tableOrNamespaceName,
+ "Target table does not exist");
case NAMESPACE_DOESNT_EXIST:
- throw new NamespaceNotFoundException(null, tableOrNamespaceName, "Target namespace does not exist");
+ throw new NamespaceNotFoundException(null, tableOrNamespaceName,
+ "Target namespace does not exist");
default:
- String tableInfo = Tables.getPrintableTableInfoFromName(context.getInstance(), tableOrNamespaceName);
+ String tableInfo = Tables.getPrintableTableInfoFromName(context.getInstance(),
+ tableOrNamespaceName);
throw new AccumuloSecurityException(e.user, e.code, tableInfo, e);
}
} catch (ThriftTableOperationException e) {
@@ -329,7 +348,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
case NAMESPACE_NOTFOUND:
throw new NamespaceNotFoundException(e);
case OFFLINE:
- throw new TableOfflineException(context.getInstance(), Tables.getTableId(context.getInstance(), tableOrNamespaceName));
+ throw new TableOfflineException(context.getInstance(),
+ Tables.getTableId(context.getInstance(), tableOrNamespaceName));
default:
throw new AccumuloException(e.description, e);
}
@@ -354,7 +374,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
private CountDownLatch latch;
private AtomicReference<Throwable> exception;
- SplitEnv(String tableName, String tableId, ExecutorService executor, CountDownLatch latch, AtomicReference<Throwable> exception) {
+ SplitEnv(String tableName, String tableId, ExecutorService executor, CountDownLatch latch,
+ AtomicReference<Throwable> exception) {
this.tableName = tableName;
this.tableId = tableId;
this.executor = executor;
@@ -388,7 +409,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
int mid = splits.size() / 2;
- // split the middle split point to ensure that child task split different tablets and can therefore
+ // split the middle split point to ensure that child task split different tablets and can
+ // therefore
// run in parallel
addSplits(env.tableName, new TreeSet<>(splits.subList(mid, mid + 1)), env.tableId);
env.latch.countDown();
@@ -404,7 +426,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
@Override
- public void addSplits(String tableName, SortedSet<Text> partitionKeys) throws TableNotFoundException, AccumuloException, AccumuloSecurityException {
+ public void addSplits(String tableName, SortedSet<Text> partitionKeys)
+ throws TableNotFoundException, AccumuloException, AccumuloSecurityException {
String tableId = Tables.getTableId(context.getInstance(), tableName);
List<Text> splits = new ArrayList<>(partitionKeys);
@@ -415,26 +438,32 @@ public class TableOperationsImpl extends TableOperationsHelper {
CountDownLatch latch = new CountDownLatch(splits.size());
AtomicReference<Throwable> exception = new AtomicReference<>(null);
- ExecutorService executor = Executors.newFixedThreadPool(16, new NamingThreadFactory("addSplits"));
+ ExecutorService executor = Executors.newFixedThreadPool(16,
+ new NamingThreadFactory("addSplits"));
try {
- executor.execute(new SplitTask(new SplitEnv(tableName, tableId, executor, latch, exception), splits));
+ executor.execute(
+ new SplitTask(new SplitEnv(tableName, tableId, executor, latch, exception), splits));
while (!latch.await(100, TimeUnit.MILLISECONDS)) {
if (exception.get() != null) {
executor.shutdownNow();
Throwable excep = exception.get();
- // Below all exceptions are wrapped and rethrown. This is done so that the user knows what code path got them here. If the wrapping was not done, the
+ // Below all exceptions are wrapped and rethrown. This is done so that the user knows what
+ // code path got them here. If the wrapping was not done, the
// user would only have the stack trace for the background thread.
if (excep instanceof TableNotFoundException) {
TableNotFoundException tnfe = (TableNotFoundException) excep;
- throw new TableNotFoundException(tableId, tableName, "Table not found by background thread", tnfe);
+ throw new TableNotFoundException(tableId, tableName,
+ "Table not found by background thread", tnfe);
} else if (excep instanceof TableOfflineException) {
- log.debug("TableOfflineException occurred in background thread. Throwing new exception", excep);
+ log.debug("TableOfflineException occurred in background thread. Throwing new exception",
+ excep);
throw new TableOfflineException(context.getInstance(), tableId);
} else if (excep instanceof AccumuloSecurityException) {
// base == background accumulo security exception
AccumuloSecurityException base = (AccumuloSecurityException) excep;
- throw new AccumuloSecurityException(base.getUser(), base.asThriftException().getCode(), base.getTableInfo(), excep);
+ throw new AccumuloSecurityException(base.getUser(), base.asThriftException().getCode(),
+ base.getTableInfo(), excep);
} else if (excep instanceof AccumuloServerException) {
throw new AccumuloServerException((AccumuloServerException) excep);
} else if (excep instanceof Error) {
@@ -451,8 +480,9 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
}
- private void addSplits(String tableName, SortedSet<Text> partitionKeys, String tableId) throws AccumuloException, AccumuloSecurityException,
- TableNotFoundException, AccumuloServerException {
+ private void addSplits(String tableName, SortedSet<Text> partitionKeys, String tableId)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException,
+ AccumuloServerException {
TabletLocator tabLocator = TabletLocator.getLocator(context, tableId);
for (Text split : partitionKeys) {
@@ -486,18 +516,21 @@ public class TableOperationsImpl extends TableOperationsHelper {
OpTimer timer = null;
if (log.isTraceEnabled()) {
- log.trace("tid={} Splitting tablet {} on {} at {}", Thread.currentThread().getId(), tl.tablet_extent, address, split);
+ log.trace("tid={} Splitting tablet {} on {} at {}", Thread.currentThread().getId(),
+ tl.tablet_extent, address, split);
timer = new OpTimer().start();
}
- client.splitTablet(Tracer.traceInfo(), context.rpcCreds(), tl.tablet_extent.toThrift(), TextUtil.getByteBuffer(split));
+ client.splitTablet(Tracer.traceInfo(), context.rpcCreds(), tl.tablet_extent.toThrift(),
+ TextUtil.getByteBuffer(split));
// just split it, might as well invalidate it in the cache
tabLocator.invalidateCache(tl.tablet_extent);
if (timer != null) {
timer.stop();
- log.trace("Split tablet in {}", String.format("%.3f secs", timer.scale(TimeUnit.SECONDS)));
+ log.trace("Split tablet in {}",
+ String.format("%.3f secs", timer.scale(TimeUnit.SECONDS)));
}
} finally {
@@ -518,7 +551,9 @@ public class TableOperationsImpl extends TableOperationsHelper {
// Do not silently spin when we repeatedly fail to get the location for a tablet
locationFailures++;
if (5 == locationFailures || 0 == locationFailures % 50) {
- log.warn("Having difficulty locating hosting tabletserver for split {} on table {}. Seen {} failures.", split, tableName, locationFailures);
+ log.warn(
+ "Having difficulty locating hosting tabletserver for split {} on table {}. Seen {} failures.",
+ split, tableName, locationFailures);
}
tabLocator.invalidateCache(tl.tablet_extent);
@@ -534,15 +569,18 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
@Override
- public void merge(String tableName, Text start, Text end) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
+ public void merge(String tableName, Text start, Text end)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
checkArgument(tableName != null, "tableName is null");
ByteBuffer EMPTY = ByteBuffer.allocate(0);
- List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(UTF_8)), start == null ? EMPTY : TextUtil.getByteBuffer(start),
+ List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(UTF_8)),
+ start == null ? EMPTY : TextUtil.getByteBuffer(start),
end == null ? EMPTY : TextUtil.getByteBuffer(end));
Map<String,String> opts = new HashMap<>();
try {
- doTableFateOperation(tableName, TableNotFoundException.class, FateOperation.TABLE_MERGE, args, opts);
+ doTableFateOperation(tableName, TableNotFoundException.class, FateOperation.TABLE_MERGE, args,
+ opts);
} catch (TableExistsException e) {
// should not happen
throw new AssertionError(e);
@@ -550,15 +588,18 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
@Override
- public void deleteRows(String tableName, Text start, Text end) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
+ public void deleteRows(String tableName, Text start, Text end)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
checkArgument(tableName != null, "tableName is null");
ByteBuffer EMPTY = ByteBuffer.allocate(0);
- List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(UTF_8)), start == null ? EMPTY : TextUtil.getByteBuffer(start),
+ List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(UTF_8)),
+ start == null ? EMPTY : TextUtil.getByteBuffer(start),
end == null ? EMPTY : TextUtil.getByteBuffer(end));
Map<String,String> opts = new HashMap<>();
try {
- doTableFateOperation(tableName, TableNotFoundException.class, FateOperation.TABLE_DELETE_RANGE, args, opts);
+ doTableFateOperation(tableName, TableNotFoundException.class,
+ FateOperation.TABLE_DELETE_RANGE, args, opts);
} catch (TableExistsException e) {
// should not happen
throw new AssertionError(e);
@@ -566,7 +607,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
@Override
- public Collection<Text> listSplits(String tableName) throws TableNotFoundException, AccumuloSecurityException {
+ public Collection<Text> listSplits(String tableName)
+ throws TableNotFoundException, AccumuloSecurityException {
checkArgument(tableName != null, "tableName is null");
@@ -616,7 +658,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
@Override
- public Collection<Text> listSplits(String tableName, int maxSplits) throws TableNotFoundException, AccumuloSecurityException {
+ public Collection<Text> listSplits(String tableName, int maxSplits)
+ throws TableNotFoundException, AccumuloSecurityException {
Collection<Text> endRows = listSplits(tableName);
if (endRows.size() <= maxSplits)
@@ -651,14 +694,16 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
@Override
- public void delete(String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
+ public void delete(String tableName)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
checkArgument(tableName != null, "tableName is null");
List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(UTF_8)));
Map<String,String> opts = new HashMap<>();
try {
- doTableFateOperation(tableName, TableNotFoundException.class, FateOperation.TABLE_DELETE, args, opts);
+ doTableFateOperation(tableName, TableNotFoundException.class, FateOperation.TABLE_DELETE,
+ args, opts);
} catch (TableExistsException e) {
// should not happen
throw new AssertionError(e);
@@ -667,8 +712,10 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
@Override
- public void clone(String srcTableName, String newTableName, boolean flush, Map<String,String> propertiesToSet, Set<String> propertiesToExclude)
- throws AccumuloSecurityException, TableNotFoundException, AccumuloException, TableExistsException {
+ public void clone(String srcTableName, String newTableName, boolean flush,
+ Map<String,String> propertiesToSet, Set<String> propertiesToExclude)
+ throws AccumuloSecurityException, TableNotFoundException, AccumuloException,
+ TableExistsException {
checkArgument(srcTableName != null, "srcTableName is null");
checkArgument(newTableName != null, "newTableName is null");
@@ -684,7 +731,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
if (propertiesToSet == null)
propertiesToSet = Collections.emptyMap();
- List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(srcTableId.getBytes(UTF_8)), ByteBuffer.wrap(newTableName.getBytes(UTF_8)));
+ List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(srcTableId.getBytes(UTF_8)),
+ ByteBuffer.wrap(newTableName.getBytes(UTF_8)));
Map<String,String> opts = new HashMap<>();
for (Entry<String,String> entry : propertiesToSet.entrySet()) {
if (entry.getKey().startsWith(CLONE_EXCLUDE_PREFIX))
@@ -696,16 +744,19 @@ public class TableOperationsImpl extends TableOperationsHelper {
opts.put(CLONE_EXCLUDE_PREFIX + prop, "");
}
- doTableFateOperation(newTableName, AccumuloException.class, FateOperation.TABLE_CLONE, args, opts);
+ doTableFateOperation(newTableName, AccumuloException.class, FateOperation.TABLE_CLONE, args,
+ opts);
}
@Override
- public void rename(String oldTableName, String newTableName) throws AccumuloSecurityException, TableNotFoundException, AccumuloException,
- TableExistsException {
+ public void rename(String oldTableName, String newTableName) throws AccumuloSecurityException,
+ TableNotFoundException, AccumuloException, TableExistsException {
- List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(oldTableName.getBytes(UTF_8)), ByteBuffer.wrap(newTableName.getBytes(UTF_8)));
+ List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(oldTableName.getBytes(UTF_8)),
+ ByteBuffer.wrap(newTableName.getBytes(UTF_8)));
Map<String,String> opts = new HashMap<>();
- doTableFateOperation(oldTableName, TableNotFoundException.class, FateOperation.TABLE_RENAME, args, opts);
+ doTableFateOperation(oldTableName, TableNotFoundException.class, FateOperation.TABLE_RENAME,
+ args, opts);
}
@Override
@@ -719,7 +770,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
@Override
- public void flush(String tableName, Text start, Text end, boolean wait) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
+ public void flush(String tableName, Text start, Text end, boolean wait)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
checkArgument(tableName != null, "tableName is null");
String tableId = Tables.getTableId(context.getInstance(), tableName);
@@ -727,19 +779,22 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
@Override
- public void compact(String tableName, Text start, Text end, boolean flush, boolean wait) throws AccumuloSecurityException, TableNotFoundException,
- AccumuloException {
+ public void compact(String tableName, Text start, Text end, boolean flush, boolean wait)
+ throws AccumuloSecurityException, TableNotFoundException, AccumuloException {
compact(tableName, start, end, new ArrayList<IteratorSetting>(), flush, wait);
}
@Override
- public void compact(String tableName, Text start, Text end, List<IteratorSetting> iterators, boolean flush, boolean wait) throws AccumuloSecurityException,
- TableNotFoundException, AccumuloException {
- compact(tableName, new CompactionConfig().setStartRow(start).setEndRow(end).setIterators(iterators).setFlush(flush).setWait(wait));
+ public void compact(String tableName, Text start, Text end, List<IteratorSetting> iterators,
+ boolean flush, boolean wait)
+ throws AccumuloSecurityException, TableNotFoundException, AccumuloException {
+ compact(tableName, new CompactionConfig().setStartRow(start).setEndRow(end)
+ .setIterators(iterators).setFlush(flush).setWait(wait));
}
@Override
- public void compact(String tableName, CompactionConfig config) throws AccumuloSecurityException, TableNotFoundException, AccumuloException {
+ public void compact(String tableName, CompactionConfig config)
+ throws AccumuloSecurityException, TableNotFoundException, AccumuloException {
checkArgument(tableName != null, "tableName is null");
ByteBuffer EMPTY = ByteBuffer.allocate(0);
@@ -754,9 +809,12 @@ public class TableOperationsImpl extends TableOperationsHelper {
// Make sure the specified compaction strategy exists on a tabletserver
final String compactionStrategyName = config.getCompactionStrategy().getClassName();
- if (!CompactionStrategyConfigUtil.DEFAULT_STRATEGY.getClassName().equals(compactionStrategyName)) {
- if (!testClassLoad(tableName, compactionStrategyName, "org.apache.accumulo.tserver.compaction.CompactionStrategy")) {
- throw new AccumuloException("TabletServer could not load CompactionStrategy class " + compactionStrategyName);
+ if (!CompactionStrategyConfigUtil.DEFAULT_STRATEGY.getClassName()
+ .equals(compactionStrategyName)) {
+ if (!testClassLoad(tableName, compactionStrategyName,
+ "org.apache.accumulo.tserver.compaction.CompactionStrategy")) {
+ throw new AccumuloException(
+ "TabletServer could not load CompactionStrategy class " + compactionStrategyName);
}
}
@@ -768,9 +826,11 @@ public class TableOperationsImpl extends TableOperationsHelper {
if (config.getFlush())
_flush(tableId, start, end, true);
- List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableId.getBytes(UTF_8)), start == null ? EMPTY : TextUtil.getByteBuffer(start), end == null ? EMPTY
- : TextUtil.getByteBuffer(end), ByteBuffer.wrap(IteratorUtil.encodeIteratorSettings(config.getIterators())), ByteBuffer
- .wrap(CompactionStrategyConfigUtil.encode(config.getCompactionStrategy())));
+ List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableId.getBytes(UTF_8)),
+ start == null ? EMPTY : TextUtil.getByteBuffer(start),
+ end == null ? EMPTY : TextUtil.getByteBuffer(end),
+ ByteBuffer.wrap(IteratorUtil.encodeIteratorSettings(config.getIterators())),
+ ByteBuffer.wrap(CompactionStrategyConfigUtil.encode(config.getCompactionStrategy())));
Map<String,String> opts = new HashMap<>();
try {
@@ -787,14 +847,16 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
@Override
- public void cancelCompaction(String tableName) throws AccumuloSecurityException, TableNotFoundException, AccumuloException {
+ public void cancelCompaction(String tableName)
+ throws AccumuloSecurityException, TableNotFoundException, AccumuloException {
String tableId = Tables.getTableId(context.getInstance(), tableName);
List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableId.getBytes(UTF_8)));
Map<String,String> opts = new HashMap<>();
try {
- doTableFateOperation(tableName, TableNotFoundException.class, FateOperation.TABLE_CANCEL_COMPACT, args, opts);
+ doTableFateOperation(tableName, TableNotFoundException.class,
+ FateOperation.TABLE_CANCEL_COMPACT, args, opts);
} catch (TableExistsException e) {
// should not happen
throw new AssertionError(e);
@@ -802,12 +864,14 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
- private void _flush(String tableId, Text start, Text end, boolean wait) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
+ private void _flush(String tableId, Text start, Text end, boolean wait)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
try {
long flushID;
- // used to pass the table name. but the tableid associated with a table name could change between calls.
+ // used to pass the table name. but the tableid associated with a table name could change
+ // between calls.
// so pass the tableid to both calls
while (true) {
@@ -828,7 +892,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
MasterClientService.Iface client = null;
try {
client = MasterClient.getConnectionWithRetry(context);
- client.waitForFlush(Tracer.traceInfo(), context.rpcCreds(), tableId, TextUtil.getByteBuffer(start), TextUtil.getByteBuffer(end), flushID,
+ client.waitForFlush(Tracer.traceInfo(), context.rpcCreds(), tableId,
+ TextUtil.getByteBuffer(start), TextUtil.getByteBuffer(end), flushID,
wait ? Long.MAX_VALUE : 1);
break;
} catch (TTransportException tte) {
@@ -859,7 +924,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
@Override
- public void setProperty(final String tableName, final String property, final String value) throws AccumuloException, AccumuloSecurityException {
+ public void setProperty(final String tableName, final String property, final String value)
+ throws AccumuloException, AccumuloSecurityException {
checkArgument(tableName != null, "tableName is null");
checkArgument(property != null, "property is null");
checkArgument(value != null, "value is null");
@@ -867,7 +933,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
MasterClient.executeTable(context, new ClientExec<MasterClientService.Client>() {
@Override
public void execute(MasterClientService.Client client) throws Exception {
- client.setTableProperty(Tracer.traceInfo(), context.rpcCreds(), tableName, property, value);
+ client.setTableProperty(Tracer.traceInfo(), context.rpcCreds(), tableName, property,
+ value);
}
});
} catch (TableNotFoundException e) {
@@ -876,7 +943,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
@Override
- public void removeProperty(final String tableName, final String property) throws AccumuloException, AccumuloSecurityException {
+ public void removeProperty(final String tableName, final String property)
+ throws AccumuloException, AccumuloSecurityException {
checkArgument(tableName != null, "tableName is null");
checkArgument(property != null, "property is null");
try {
@@ -892,15 +960,18 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
@Override
- public Iterable<Entry<String,String>> getProperties(final String tableName) throws AccumuloException, TableNotFoundException {
+ public Iterable<Entry<String,String>> getProperties(final String tableName)
+ throws AccumuloException, TableNotFoundException {
checkArgument(tableName != null, "tableName is null");
try {
- return ServerClient.executeRaw(context, new ClientExecReturn<Map<String,String>,ClientService.Client>() {
- @Override
- public Map<String,String> execute(ClientService.Client client) throws Exception {
- return client.getTableConfiguration(Tracer.traceInfo(), context.rpcCreds(), tableName);
- }
- }).entrySet();
+ return ServerClient
+ .executeRaw(context, new ClientExecReturn<Map<String,String>,ClientService.Client>() {
+ @Override
+ public Map<String,String> execute(ClientService.Client client) throws Exception {
+ return client.getTableConfiguration(Tracer.traceInfo(), context.rpcCreds(),
+ tableName);
+ }
+ }).entrySet();
} catch (ThriftTableOperationException e) {
switch (e.getType()) {
case NOTFOUND:
@@ -919,13 +990,15 @@ public class TableOperationsImpl extends TableOperationsHelper {
}
@Override
- public void setLocalityGroups(String tableName, Map<String,Set<Text>> groups) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
+ public void setLocalityGroups(String tableName, Map<String,Set<Text>> groups)
+ throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
// ensure locality groups do not overlap
HashSet<Text> all = new HashSet<>();
for (Entry<String,Set<Text>> entry : groups.entrySet()) {
if (!Collections.disjoint(all, entry.getValue())) {
- throw new IllegalArgumentException("Group " + entry.getKey() + " overlaps with another group");
+ throw new IllegalArgumentException(
+ "Group " + entry.getKey() + " overlaps with another group");
}
all.addAll(entry.getValue());
@@ -938,7 +1011,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
... 111203 lines suppressed ...
--
To stop receiving notification emails like this one, please contact
ctubbsii@apache.org.