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 2019/04/20 05:29:26 UTC
[accumulo] 02/02: Apply formatter changes for #496
This is an automated email from the ASF dual-hosted git repository.
ctubbsii pushed a commit to branch 1.9
in repository https://gitbox.apache.org/repos/asf/accumulo.git
commit 0a9837f3f8395d89c5cd7bab7805c4aae28919be
Author: Christopher Tubbs <ct...@apache.org>
AuthorDate: Sat Apr 20 00:05:59 2019 -0400
Apply formatter changes for #496
---
.../java/org/apache/accumulo/core/Constants.java | 4 +-
.../org/apache/accumulo/core/cli/ClientOpts.java | 12 +-
.../accumulo/core/client/ClientConfiguration.java | 2 +-
.../core/client/MutationsRejectedException.java | 6 +-
.../accumulo/core/client/ZooKeeperInstance.java | 4 +-
.../core/client/impl/ActiveCompactionImpl.java | 4 +-
.../accumulo/core/client/impl/ClientContext.java | 16 +-
.../core/client/impl/ConditionalWriterImpl.java | 6 +-
.../accumulo/core/client/impl/ConnectorImpl.java | 4 +-
.../accumulo/core/client/impl/Credentials.java | 12 +-
.../core/client/impl/DelegationTokenImpl.java | 4 +-
.../core/client/impl/InstanceOperationsImpl.java | 4 +-
.../accumulo/core/client/impl/MasterClient.java | 4 +-
.../client/impl/NamespaceOperationsHelper.java | 8 +-
.../core/client/impl/NamespaceOperationsImpl.java | 6 +-
.../accumulo/core/client/impl/OfflineIterator.java | 26 +--
.../core/client/impl/ReplicationClient.java | 8 +-
.../core/client/impl/RootTabletLocator.java | 8 +-
.../core/client/impl/SecurityOperationsImpl.java | 4 +-
.../accumulo/core/client/impl/ServerClient.java | 8 +-
.../core/client/impl/TableOperationsHelper.java | 8 +-
.../core/client/impl/TableOperationsImpl.java | 28 +--
.../apache/accumulo/core/client/impl/Tables.java | 12 +-
.../core/client/impl/TabletLocatorImpl.java | 18 +-
.../core/client/impl/TabletServerBatchReader.java | 4 +-
.../impl/TabletServerBatchReaderIterator.java | 20 +-
.../core/client/impl/TabletServerBatchWriter.java | 23 ++-
.../accumulo/core/client/impl/ThriftScanner.java | 34 ++--
.../core/client/impl/ThriftTransportPool.java | 4 +-
.../core/client/mapred/AbstractInputFormat.java | 16 +-
.../client/mapred/AccumuloFileOutputFormat.java | 8 +-
.../core/client/mapred/AccumuloInputFormat.java | 2 +-
.../core/client/mapred/AccumuloRowInputFormat.java | 2 +-
.../core/client/mapreduce/AbstractInputFormat.java | 20 +-
.../client/mapreduce/AccumuloFileOutputFormat.java | 4 +-
.../core/client/mapreduce/AccumuloInputFormat.java | 2 +-
.../client/mapreduce/AccumuloOutputFormat.java | 4 +-
.../core/client/mapreduce/RangeInputSplit.java | 4 +-
.../client/mapreduce/impl/BatchInputSplit.java | 4 +-
.../mapreduce/lib/impl/ConfiguratorBase.java | 12 +-
.../mapreduce/lib/impl/FileOutputConfigurator.java | 4 +-
.../mapreduce/lib/impl/InputConfigurator.java | 43 ++--
.../mapreduce/lib/util/InputConfigurator.java | 4 +-
.../accumulo/core/client/mock/MockAccumulo.java | 4 +-
.../accumulo/core/client/mock/MockScannerBase.java | 8 +-
.../core/client/mock/MockTableOperations.java | 4 +-
.../accumulo/core/client/rfile/RFileScanner.java | 4 +-
.../core/client/sample/RowColumnSampler.java | 4 +-
.../security/tokens/AuthenticationToken.java | 2 +-
.../core/conf/CredentialProviderFactoryShim.java | 23 ++-
.../core/conf/ObservableConfiguration.java | 4 +-
.../org/apache/accumulo/core/conf/Property.java | 54 ++---
.../apache/accumulo/core/conf/PropertyType.java | 8 +-
.../accumulo/core/conf/SiteConfiguration.java | 12 +-
.../java/org/apache/accumulo/core/data/Key.java | 4 +-
.../org/apache/accumulo/core/data/KeyExtent.java | 12 +-
.../org/apache/accumulo/core/data/Mutation.java | 4 +-
.../apache/accumulo/core/data/impl/KeyExtent.java | 4 +-
.../accumulo/core/data/impl/TabletIdImpl.java | 36 ++--
.../accumulo/core/file/BloomFilterLayer.java | 16 +-
.../apache/accumulo/core/file/FileOperations.java | 12 +-
.../core/file/blockfile/cache/CachedBlock.java | 8 +-
.../core/file/blockfile/cache/ClassSize.java | 4 +-
.../core/file/blockfile/cache/LruBlockCache.java | 8 +-
.../accumulo/core/file/rfile/CreateEmpty.java | 8 +-
.../accumulo/core/file/rfile/KeyShortener.java | 8 +-
.../accumulo/core/file/rfile/MultiLevelIndex.java | 4 +-
.../apache/accumulo/core/file/rfile/PrintInfo.java | 4 +-
.../org/apache/accumulo/core/file/rfile/RFile.java | 36 ++--
.../accumulo/core/file/rfile/RFileOperations.java | 15 +-
.../accumulo/core/file/rfile/SplitLarge.java | 4 +-
.../core/file/rfile/VisMetricsGatherer.java | 4 +-
.../accumulo/core/file/rfile/bcfile/BCFile.java | 54 ++---
.../core/file/rfile/bcfile/Compression.java | 39 ++--
.../core/iterators/AggregatingIterator.java | 8 +-
.../apache/accumulo/core/iterators/Combiner.java | 10 +-
.../accumulo/core/iterators/IteratorAdapter.java | 4 +-
.../accumulo/core/iterators/IteratorUtil.java | 29 +--
.../apache/accumulo/core/iterators/OrIterator.java | 6 +-
.../core/iterators/conf/ColumnToClassMapping.java | 4 +-
.../iterators/system/LocalityGroupIterator.java | 4 +-
.../core/iterators/user/CfCqSliceOpts.java | 10 +-
.../iterators/user/CfCqSliceSeekingFilter.java | 8 +-
.../core/iterators/user/IntersectingIterator.java | 20 +-
.../core/iterators/user/LargeRowFilter.java | 12 +-
.../core/iterators/user/RowDeletingIterator.java | 5 +-
.../core/iterators/user/SeekingFilter.java | 8 +-
.../core/iterators/user/TransformingIterator.java | 8 +-
.../core/metadata/MetadataLocationObtainer.java | 16 +-
.../apache/accumulo/core/metadata/RootTable.java | 4 +-
.../core/metadata/TableMetadataServicer.java | 4 +-
.../core/metadata/schema/MetadataSchema.java | 16 +-
.../core/replication/ReplicationTable.java | 4 +-
.../accumulo/core/rpc/TTimeoutTransport.java | 8 +-
.../org/apache/accumulo/core/rpc/ThriftUtil.java | 20 +-
.../core/sample/impl/SamplerConfigurationImpl.java | 4 +-
.../accumulo/core/security/ColumnVisibility.java | 2 +
.../CachingHDFSSecretKeyEncryptionStrategy.java | 12 +-
.../core/security/crypto/CryptoModuleFactory.java | 27 +--
.../core/security/crypto/DefaultCryptoModule.java | 28 +--
.../NonCachingSecretKeyEncryptionStrategy.java | 8 +-
.../accumulo/core/trace/DistributedTrace.java | 12 +-
.../org/apache/accumulo/core/util/CreateToken.java | 8 +-
.../org/apache/accumulo/core/util/HostAndPort.java | 4 +-
.../accumulo/core/util/LocalityGroupUtil.java | 4 +-
.../java/org/apache/accumulo/core/util/Merge.java | 4 +-
.../accumulo/core/util/ThriftMessageUtil.java | 4 +-
.../core/util/format/DateStringFormatter.java | 4 +-
.../core/util/format/DefaultFormatter.java | 4 +-
.../accumulo/core/util/format/HexFormatter.java | 4 +-
.../apache/accumulo/core/cli/TestClientOpts.java | 4 +-
.../accumulo/core/client/IteratorSettingTest.java | 8 +-
.../accumulo/core/client/TestThrift1474.java | 4 +-
.../core/client/ZooKeeperInstanceTest.java | 4 +-
.../core/client/impl/ScannerOptionsTest.java | 4 +-
.../core/client/impl/TabletLocatorImplTest.java | 221 +++++++++++----------
.../core/client/impl/ThriftTransportKeyTest.java | 36 ++--
.../core/client/lexicoder/PairLexicoderTest.java | 12 +-
.../mapred/AccumuloFileOutputFormatTest.java | 4 +-
.../client/mapred/AccumuloInputFormatTest.java | 8 +-
.../client/mapreduce/AccumuloInputFormatTest.java | 8 +-
.../client/mapreduce/impl/BatchInputSplitTest.java | 8 +-
.../lib/partition/RangePartitionerTest.java | 8 +-
.../core/client/mock/MockConnectorTest.java | 6 +-
.../accumulo/core/client/mock/MockScannerTest.java | 4 +-
.../accumulo/core/client/rfile/RFileTest.java | 28 +--
.../client/security/SecurityErrorCodeTest.java | 3 +-
.../security/tokens/DelegationTokenImplTest.java | 28 +--
.../client/security/tokens/KerberosTokenTest.java | 4 +-
.../conf/CredentialProviderFactoryShimTest.java | 16 +-
.../core/data/ConstraintViolationSummaryTest.java | 4 +-
.../apache/accumulo/core/data/KeyExtentTest.java | 4 +-
.../org/apache/accumulo/core/data/KeyTest.java | 4 +-
.../org/apache/accumulo/core/data/RangeTest.java | 30 +--
.../core/file/BloomFilterLayerLookupTest.java | 8 +-
.../file/blockfile/cache/TestLruBlockCache.java | 56 +++---
.../accumulo/core/file/rfile/BlockIndexTest.java | 4 +-
.../core/file/rfile/MultiThreadedRFileTest.java | 12 +-
.../accumulo/core/file/rfile/RFileMetricsTest.java | 4 +-
.../apache/accumulo/core/file/rfile/RFileTest.java | 60 +++---
.../accumulo/core/file/rfile/RelativeKeyTest.java | 16 +-
.../core/file/rfile/bcfile/CompressionTest.java | 8 +-
.../file/streams/RateLimitedOutputStreamTest.java | 4 +-
.../iterators/FirstEntryInRowIteratorTest.java | 2 +-
.../conf/AggregatorConfigurationTest.java | 15 +-
.../core/iterators/system/ColumnFilterTest.java | 12 +-
.../iterators/system/VisibilityFilterTest.java | 8 +-
.../accumulo/core/iterators/user/CombinerTest.java | 4 +-
.../accumulo/core/iterators/user/FilterTest.java | 12 +-
.../core/iterators/user/RowFilterTest.java | 32 +--
.../iterators/user/TransformingIteratorTest.java | 20 +-
.../core/iterators/user/VisibilityFilterTest.java | 4 +-
.../rpc/SaslClientDigestCallbackHandlerTest.java | 4 +-
.../core/rpc/SaslConnectionParamsTest.java | 28 +--
.../AuthenticationTokenIdentifierTest.java | 4 +-
.../core/security/AuthenticationTokenTest.java | 8 +-
.../accumulo/core/security/crypto/CryptoTest.java | 42 ++--
.../core/util/AsyncSocketAppenderTest.java | 8 +-
.../accumulo/core/util/LocalityGroupUtilTest.java | 4 +-
.../org/apache/accumulo/core/util/PairTest.java | 4 +-
.../core/util/format/DefaultFormatterTest.java | 2 +-
.../core/util/format/FormatterFactoryTest.java | 6 +-
.../examples/simple/client/RandomBatchScanner.java | 4 +-
.../examples/simple/client/RandomBatchWriter.java | 4 +-
.../examples/simple/client/ReadWriteExample.java | 4 +-
.../simple/client/SequentialBatchWriter.java | 4 +-
.../examples/simple/client/TracingExample.java | 4 +-
.../simple/constraints/NumericValueConstraint.java | 4 +-
.../accumulo/examples/simple/dirlist/Viewer.java | 4 +-
.../examples/simple/filedata/ChunkCombiner.java | 4 +-
.../examples/simple/filedata/FileDataIngest.java | 8 +-
.../simple/helloworld/InsertWithBatchWriter.java | 4 +-
.../simple/mapreduce/bulk/BulkIngestExample.java | 4 +-
.../simple/mapreduce/bulk/GenerateTestData.java | 4 +-
.../accumulo/examples/simple/reservations/ARS.java | 12 +-
.../examples/simple/shard/ContinuousQuery.java | 4 +-
.../accumulo/examples/simple/shard/Index.java | 4 +-
.../accumulo/examples/simple/shard/Query.java | 4 +-
.../java/org/apache/accumulo/fate/AdminUtil.java | 2 +-
.../main/java/org/apache/accumulo/fate/Fate.java | 8 +-
.../java/org/apache/accumulo/fate/ZooStore.java | 4 +-
.../accumulo/fate/zookeeper/ZooReaderWriter.java | 4 +-
.../apache/accumulo/fate/zookeeper/ZooUtil.java | 6 +-
.../apache/accumulo/fate/ReadOnlyStoreTest.java | 4 +-
.../org/apache/accumulo/fate/util/RetryTest.java | 16 +-
.../accumulo/fate/zookeeper/ZooCacheTest.java | 12 +-
.../fate/zookeeper/ZooReaderWriterTest.java | 14 +-
.../iteratortest/IteratorTestCaseFinder.java | 4 +-
.../accumulo/iteratortest/IteratorTestInput.java | 3 +-
.../testcases/IsolatedDeepCopiesTestCase.java | 4 +-
.../iteratortest/testcases/ReSeekTestCase.java | 8 +-
.../iteratortest/framework/JUnitFrameworkTest.java | 6 +-
.../apache/accumulo/maven/plugin/StartMojo.java | 4 +-
.../standalone/StandaloneAccumuloCluster.java | 4 +-
.../standalone/StandaloneClusterControl.java | 4 +-
.../accumulo/minicluster/MiniAccumuloRunner.java | 3 +-
.../impl/MiniAccumuloClusterControl.java | 6 +-
.../minicluster/impl/MiniAccumuloClusterImpl.java | 8 +-
.../MiniAccumuloClusterExistingZooKeepersTest.java | 8 +-
.../MiniAccumuloClusterStartStopTest.java | 4 +-
.../minicluster/MiniAccumuloClusterTest.java | 4 +-
.../minicluster/impl/CleanShutdownMacTest.java | 8 +-
.../impl/MiniAccumuloClusterImplTest.java | 4 +-
.../impl/MiniAccumuloConfigImplTest.java | 8 +-
.../main/java/org/apache/accumulo/proxy/Proxy.java | 24 +--
.../org/apache/accumulo/proxy/ProxyServer.java | 102 +++++-----
.../main/java/org/apache/accumulo/proxy/Util.java | 4 +-
.../java/org/apache/accumulo/server/Accumulo.java | 4 +-
.../accumulo/server/AccumuloServerContext.java | 4 +-
.../apache/accumulo/server/ServerConstants.java | 8 +-
.../accumulo/server/client/BulkImporter.java | 64 +++---
.../server/client/ClientServiceHandler.java | 22 +-
.../server/conf/ServerConfigurationFactory.java | 16 +-
.../accumulo/server/conf/TableConfiguration.java | 4 +-
.../accumulo/server/conf/ZooConfiguration.java | 4 +-
.../server/conf/ZooConfigurationFactory.java | 4 +-
.../server/constraints/MetadataConstraints.java | 27 +--
.../accumulo/server/fs/PerTableVolumeChooser.java | 3 +-
.../accumulo/server/fs/PreferredVolumeChooser.java | 4 +-
.../org/apache/accumulo/server/fs/VolumeUtil.java | 12 +-
.../apache/accumulo/server/init/Initialize.java | 57 +++---
.../accumulo/server/master/LiveTServerSet.java | 48 ++---
.../balancer/HostRegexTableLoadBalancer.java | 38 ++--
.../server/master/balancer/RegexGroupBalancer.java | 12 +-
.../server/master/balancer/TableLoadBalancer.java | 4 +-
.../server/master/balancer/TabletBalancer.java | 2 +-
.../server/master/state/MetaDataStateStore.java | 8 +-
.../server/master/state/MetaDataTableScanner.java | 4 +-
.../server/metrics/MetricsConfiguration.java | 4 +-
.../server/metrics/MetricsSystemHelper.java | 4 +-
.../apache/accumulo/server/monitor/LogService.java | 18 +-
.../accumulo/server/problems/ProblemReports.java | 4 +-
.../server/replication/ReplicaSystemHelper.java | 4 +-
.../server/replication/ReplicationUtil.java | 12 +-
.../server/replication/StatusFormatter.java | 9 +-
.../server/rpc/CustomNonBlockingServer.java | 4 +-
.../rpc/SaslServerDigestCallbackHandler.java | 4 +-
.../rpc/TCredentialsUpdatingInvocationHandler.java | 11 +-
.../apache/accumulo/server/rpc/TServerUtils.java | 50 ++---
.../server/security/AuditedSecurityOperation.java | 146 +++++++-------
.../server/security/SystemCredentials.java | 4 +-
.../server/security/UserImpersonation.java | 4 +-
.../AuthenticationTokenSecretManager.java | 8 +-
.../ZooAuthenticationKeyDistributor.java | 2 +-
.../security/handler/KerberosAuthenticator.java | 6 +-
.../server/security/handler/ZKPermHandler.java | 16 +-
.../accumulo/server/tables/TableManager.java | 21 +-
.../tabletserver/LargestFirstMemoryManager.java | 8 +-
.../org/apache/accumulo/server/util/Admin.java | 24 +--
.../apache/accumulo/server/util/ChangeSecret.java | 12 +-
.../org/apache/accumulo/server/util/FileUtil.java | 24 +--
.../accumulo/server/util/FindOfflineTablets.java | 13 +-
.../apache/accumulo/server/util/LocalityCheck.java | 4 +-
.../accumulo/server/util/LoginProperties.java | 4 +-
.../accumulo/server/util/MetadataTableUtil.java | 42 ++--
.../apache/accumulo/server/util/RandomWriter.java | 8 +-
.../accumulo/server/util/RandomizeVolumes.java | 10 +-
.../server/util/RemoveEntriesForMissingFiles.java | 4 +-
.../accumulo/server/util/SendLogToChainsaw.java | 4 +-
.../accumulo/server/util/SystemPropUtil.java | 12 +-
.../server/util/VerifyTabletAssignments.java | 6 +-
.../accumulo/server/zookeeper/ZooQueueLock.java | 4 +-
.../org/apache/accumulo/server/AccumuloTest.java | 12 +-
.../accumulo/server/ServerConstantsTest.java | 4 +-
.../accumulo/server/client/BulkImporterTest.java | 4 +-
.../apache/accumulo/server/fs/ViewFSUtilsTest.java | 14 +-
.../accumulo/server/fs/VolumeManagerImplTest.java | 8 +-
.../apache/accumulo/server/fs/VolumeUtilTest.java | 4 +-
.../BaseHostRegexTableLoadBalancerTest.java | 4 +-
.../master/balancer/ChaoticLoadBalancerTest.java | 4 +-
.../master/balancer/DefaultLoadBalancerTest.java | 4 +-
.../server/master/balancer/GroupBalancerTest.java | 4 +-
.../balancer/HostRegexTableLoadBalancerTest.java | 12 +-
.../master/balancer/TableLoadBalancerTest.java | 4 +-
.../server/problems/ProblemReportTest.java | 16 +-
.../server/replication/StatusCombinerTest.java | 44 ++--
.../apache/accumulo/server/rpc/RpcWrapperTest.java | 10 +-
.../server/rpc/SaslDigestCallbackHandlerTest.java | 20 +-
.../server/rpc/SaslServerConnectionParamsTest.java | 4 +-
.../security/delegation/AuthenticationKeyTest.java | 12 +-
.../AuthenticationTokenKeyManagerTest.java | 8 +-
.../AuthenticationTokenSecretManagerTest.java | 84 ++++----
.../ZooAuthenticationKeyDistributorTest.java | 51 +++--
.../ZooAuthenticationKeyWatcherTest.java | 2 +-
.../security/handler/ZKAuthenticatorTest.java | 8 +-
.../IllegalTableTransitionExceptionTest.java | 8 +-
.../org/apache/accumulo/server/util/AdminTest.java | 2 +-
.../accumulo/server/util/DefaultMapTest.java | 4 +-
.../apache/accumulo/server/util/FileUtilTest.java | 4 +-
.../server/util/ReplicationTableUtilTest.java | 6 +-
.../accumulo/server/util/TServerUtilsTest.java | 4 +-
.../accumulo/gc/GarbageCollectionAlgorithm.java | 12 +-
.../apache/accumulo/gc/SimpleGarbageCollector.java | 32 +--
.../replication/CloseWriteAheadLogReferences.java | 4 +-
.../gc/GarbageCollectWriteAheadLogsTest.java | 20 +-
.../apache/accumulo/master/FateServiceHandler.java | 84 ++++----
.../java/org/apache/accumulo/master/Master.java | 61 +++---
.../master/MasterClientServiceHandler.java | 16 +-
.../apache/accumulo/master/TabletGroupWatcher.java | 28 +--
.../master/metrics/fate/Metrics2FateMetrics.java | 4 +-
.../accumulo/master/recovery/RecoveryManager.java | 13 +-
.../master/replication/ReplicationDriver.java | 4 +-
.../master/replication/SequentialWorkAssigner.java | 10 +-
.../master/replication/UnorderedWorkAssigner.java | 8 +-
.../accumulo/master/replication/WorkMaker.java | 4 +-
.../accumulo/master/tableOps/BulkImport.java | 4 +-
.../apache/accumulo/master/tableOps/ChooseDir.java | 7 +-
.../apache/accumulo/master/tableOps/CleanUp.java | 8 +-
.../accumulo/master/tableOps/CloneTable.java | 4 +-
.../accumulo/master/tableOps/CopyFailed.java | 10 +-
.../accumulo/master/tableOps/CreateNamespace.java | 4 +-
.../apache/accumulo/master/tableOps/LoadFiles.java | 8 +-
.../accumulo/master/tableOps/RenameTable.java | 4 +-
.../accumulo/master/tableOps/WriteExportFiles.java | 14 +-
.../master/tserverOps/ShutdownTServer.java | 4 +-
.../master/metrics/fate/FateMetricValuesTest.java | 4 +-
...DistributedWorkQueueWorkAssignerHelperTest.java | 4 +-
.../replication/UnorderedWorkAssignerTest.java | 12 +-
.../master/state/RootTabletStateStoreTest.java | 4 +-
.../accumulo/master/tableOps/ImportTableTest.java | 4 +-
.../java/org/apache/accumulo/monitor/Monitor.java | 48 ++---
.../apache/accumulo/monitor/ZooKeeperStatus.java | 4 +-
.../accumulo/monitor/servlets/BasicServlet.java | 4 +-
.../accumulo/monitor/servlets/MasterServlet.java | 4 +-
.../accumulo/monitor/servlets/ProblemServlet.java | 6 +-
.../monitor/servlets/ReplicationServlet.java | 14 +-
.../accumulo/monitor/servlets/TServersServlet.java | 36 ++--
.../accumulo/monitor/servlets/TablesServlet.java | 8 +-
.../accumulo/monitor/servlets/VisServlet.java | 4 +-
.../accumulo/monitor/servlets/trace/Basic.java | 8 +-
.../accumulo/monitor/ShowTraceLinkTypeTest.java | 2 +-
.../accumulo/monitor/ZooKeeperStatusTest.java | 4 +-
.../apache/accumulo/tracer/SendSpansViaThrift.java | 4 +-
.../org/apache/accumulo/tracer/TraceFormatter.java | 4 +-
.../org/apache/accumulo/tracer/TraceServer.java | 24 +--
.../org/apache/accumulo/tracer/ZooTraceClient.java | 4 +-
.../accumulo/tracer/AsyncSpanReceiverTest.java | 2 +-
.../accumulo/tserver/ActiveAssignmentRunnable.java | 4 +-
.../accumulo/tserver/ConditionCheckerContext.java | 4 +-
.../org/apache/accumulo/tserver/FileManager.java | 12 +-
.../org/apache/accumulo/tserver/InMemoryMap.java | 14 +-
.../org/apache/accumulo/tserver/NativeMap.java | 8 +-
.../tserver/TabletIteratorEnvironment.java | 4 +-
.../org/apache/accumulo/tserver/TabletServer.java | 170 ++++++++--------
.../tserver/TabletServerResourceManager.java | 20 +-
.../accumulo/tserver/TservConstraintEnv.java | 2 +-
.../compaction/DefaultCompactionStrategy.java | 4 +-
.../tserver/compaction/MajorCompactionRequest.java | 6 +-
.../tserver/constraints/ConstraintChecker.java | 9 +-
.../org/apache/accumulo/tserver/log/DfsLogger.java | 38 ++--
.../org/apache/accumulo/tserver/log/LogSorter.java | 6 +-
.../accumulo/tserver/log/SortedLogRecovery.java | 6 +-
.../metrics/Metrics2TabletServerMetrics.java | 28 +--
.../metrics/Metrics2TabletServerUpdateMetrics.java | 24 +--
.../tserver/metrics/TabletServerMinCMetrics.java | 4 +-
.../tserver/metrics/TabletServerScanMetrics.java | 4 +-
.../tserver/metrics/TabletServerUpdateMetrics.java | 4 +-
.../tserver/replication/AccumuloReplicaSystem.java | 24 +--
.../BatchWriterReplicationReplayer.java | 4 +-
.../tserver/replication/ReplicationProcessor.java | 8 +-
.../replication/ReplicationServicerHandler.java | 4 +-
.../tserver/tablet/BulkImportCacheCleaner.java | 4 +-
.../accumulo/tserver/tablet/CompactionWatcher.java | 4 +-
.../apache/accumulo/tserver/tablet/Compactor.java | 12 +-
.../accumulo/tserver/tablet/DatafileManager.java | 12 +-
.../accumulo/tserver/tablet/MinorCompactor.java | 6 +-
.../apache/accumulo/tserver/tablet/RootFiles.java | 4 +-
.../accumulo/tserver/tablet/ScanDataSource.java | 32 +--
.../org/apache/accumulo/tserver/tablet/Tablet.java | 93 +++++----
.../apache/accumulo/tserver/tablet/TabletData.java | 6 +-
.../apache/accumulo/tserver/InMemoryMapTest.java | 4 +-
.../tserver/LargestFirstMemoryManagerTest.java | 6 +-
.../tserver/TabletServerSyncCheckTest.java | 6 +-
.../accumulo/tserver/TservConstraintEnvTest.java | 4 +-
.../accumulo/tserver/WalRemovalOrderTest.java | 4 +-
.../compaction/DefaultCompactionStrategyTest.java | 4 +-
.../apache/accumulo/tserver/log/DfsLoggerTest.java | 28 +--
.../apache/accumulo/tserver/log/LogEventsTest.java | 6 +-
.../tserver/log/SortedLogRecoveryTest.java | 16 +-
.../tserver/log/TestUpgradePathForWALogs.java | 8 +-
.../replication/AccumuloReplicaSystemTest.java | 40 ++--
.../replication/ReplicationProcessorTest.java | 4 +-
.../tserver/tablet/DatafileManagerTest.java | 4 +-
.../accumulo/tserver/tablet/RootFilesTest.java | 8 +-
.../apache/accumulo/tserver/tablet/TabletTest.java | 2 +-
.../main/java/org/apache/accumulo/shell/Shell.java | 26 +--
.../org/apache/accumulo/shell/ShellOptionsJC.java | 4 +-
.../accumulo/shell/commands/AddAuthsCommand.java | 4 +-
.../accumulo/shell/commands/AddSplitsCommand.java | 4 +-
.../accumulo/shell/commands/CloneTableCommand.java | 4 +-
.../accumulo/shell/commands/CompactCommand.java | 36 ++--
.../accumulo/shell/commands/ConfigCommand.java | 12 +-
.../shell/commands/CreateNamespaceCommand.java | 4 +-
.../shell/commands/CreateTableCommand.java | 12 +-
.../accumulo/shell/commands/CreateUserCommand.java | 8 +-
.../apache/accumulo/shell/commands/DUCommand.java | 12 +-
.../accumulo/shell/commands/DeleteIterCommand.java | 8 +-
.../shell/commands/DeleteNamespaceCommand.java | 4 +-
.../accumulo/shell/commands/DeleteRowsCommand.java | 4 +-
.../shell/commands/DeleteScanIterCommand.java | 8 +-
.../accumulo/shell/commands/ExecfileCommand.java | 4 +-
.../accumulo/shell/commands/FateCommand.java | 18 +-
.../accumulo/shell/commands/GetAuthsCommand.java | 4 +-
.../accumulo/shell/commands/GetGroupsCommand.java | 4 +-
.../accumulo/shell/commands/GetSplitsCommand.java | 24 +--
.../accumulo/shell/commands/GrepCommand.java | 4 +-
.../accumulo/shell/commands/InsertCommand.java | 10 +-
.../accumulo/shell/commands/ListBulkCommand.java | 4 +-
.../accumulo/shell/commands/ListIterCommand.java | 4 +-
.../accumulo/shell/commands/MergeCommand.java | 4 +-
.../accumulo/shell/commands/NamespacesCommand.java | 8 +-
.../apache/accumulo/shell/commands/OptUtil.java | 4 +-
.../accumulo/shell/commands/PasswdCommand.java | 8 +-
.../accumulo/shell/commands/ScanCommand.java | 16 +-
.../accumulo/shell/commands/SetAuthsCommand.java | 4 +-
.../accumulo/shell/commands/SetIterCommand.java | 20 +-
.../shell/commands/SetScanIterCommand.java | 4 +-
.../commands/ShellPluginConfigurationCommand.java | 8 +-
.../accumulo/shell/commands/TableOperation.java | 16 +-
.../accumulo/shell/commands/TablesCommand.java | 7 +-
.../accumulo/shell/commands/TraceCommand.java | 8 +-
.../accumulo/shell/ShellSetInstanceTest.java | 6 +-
.../java/org/apache/accumulo/shell/ShellTest.java | 4 +-
.../org/apache/accumulo/shell/ShellUtilTest.java | 4 +-
.../shell/commands/DeleteTableCommandTest.java | 4 +-
.../shell/format/DeleterFormatterTest.java | 2 +-
.../main/java/org/apache/accumulo/start/Main.java | 16 +-
.../start/classloader/AccumuloClassLoader.java | 32 +--
.../classloader/vfs/AccumuloVFSClassLoader.java | 20 +-
.../start/classloader/vfs/ContextManager.java | 4 +-
.../classloader/vfs/UniqueFileReplicator.java | 4 +-
.../java/org/apache/accumulo/start/MainTest.java | 4 +-
.../vfs/AccumuloReloadingVFSClassLoaderTest.java | 20 +-
.../vfs/AccumuloVFSClassLoaderTest.java | 4 +-
.../start/classloader/vfs/ContextManagerTest.java | 8 +-
.../accumulo/harness/AccumuloClusterHarness.java | 12 +-
.../accumulo/harness/SharedMiniClusterBase.java | 4 +-
.../conf/AccumuloClusterPropertyConfiguration.java | 4 +-
.../conf/AccumuloMiniClusterConfiguration.java | 4 +-
.../StandaloneAccumuloClusterConfiguration.java | 52 ++---
.../org/apache/accumulo/test/AuditMessageIT.java | 2 +-
.../accumulo/test/BadDeleteMarkersCreatedIT.java | 4 +-
.../java/org/apache/accumulo/test/CleanWalIT.java | 8 +-
.../apache/accumulo/test/ClientSideIteratorIT.java | 4 +-
.../apache/accumulo/test/ConditionalWriterIT.java | 150 +++++++-------
.../org/apache/accumulo/test/ExistingMacIT.java | 4 +-
.../apache/accumulo/test/FairVolumeChooser.java | 3 +-
.../java/org/apache/accumulo/test/FindMaxIT.java | 4 +-
.../apache/accumulo/test/GarbageCollectWALIT.java | 4 +-
.../accumulo/test/GenerateSequentialRFile.java | 6 +-
.../org/apache/accumulo/test/GetMasterStats.java | 4 +-
.../org/apache/accumulo/test/HardListIterator.java | 6 +-
.../org/apache/accumulo/test/InMemoryMapIT.java | 4 +-
.../accumulo/test/InterruptibleScannersIT.java | 4 +-
.../accumulo/test/IsolationAndDeepCopyIT.java | 4 +-
.../org/apache/accumulo/test/MemoryUsageTest.java | 4 +-
.../accumulo/test/MetaConstraintRetryIT.java | 4 +-
.../test/MissingWalHeaderCompletesRecoveryIT.java | 8 +-
.../org/apache/accumulo/test/NamespacesIT.java | 17 +-
.../java/org/apache/accumulo/test/SampleIT.java | 28 +--
.../org/apache/accumulo/test/ShellConfigIT.java | 2 +-
.../org/apache/accumulo/test/ShellServerIT.java | 20 +-
.../apache/accumulo/test/TableOperationsIT.java | 16 +-
.../org/apache/accumulo/test/TestBinaryRows.java | 20 +-
.../java/org/apache/accumulo/test/TestIngest.java | 4 +-
.../org/apache/accumulo/test/TotalQueuedIT.java | 4 +-
.../apache/accumulo/test/TransportCachingIT.java | 4 +-
.../accumulo/test/UserCompactionStrategyIT.java | 20 +-
.../java/org/apache/accumulo/test/VolumeIT.java | 8 +-
.../test/continuous/ContinuousBatchWalker.java | 4 +-
.../accumulo/test/continuous/ContinuousIngest.java | 12 +-
.../accumulo/test/continuous/ContinuousMoru.java | 6 +-
.../accumulo/test/continuous/ContinuousQuery.java | 4 +-
.../test/continuous/UndefinedAnalyzer.java | 16 +-
.../simple/filedata/ChunkInputFormatIT.java | 4 +-
.../functional/BalanceAfterCommsFailureIT.java | 4 +-
.../accumulo/test/functional/BloomFilterIT.java | 4 +-
.../accumulo/test/functional/BulkFailureIT.java | 8 +-
.../accumulo/test/functional/BulkFileIT.java | 4 +-
.../test/functional/BulkSplitOptimizationIT.java | 4 +-
.../accumulo/test/functional/ClassLoaderIT.java | 4 +-
.../test/functional/ConfigurableCompactionIT.java | 4 +-
.../test/functional/DeleteEverythingIT.java | 4 +-
.../test/functional/DynamicThreadPoolsIT.java | 4 +-
.../accumulo/test/functional/ExamplesIT.java | 20 +-
.../test/functional/FateConcurrencyIT.java | 5 +-
.../test/functional/FunctionalTestUtils.java | 4 +-
.../test/functional/GarbageCollectorIT.java | 4 +-
.../accumulo/test/functional/KerberosIT.java | 46 +++--
.../accumulo/test/functional/KerberosProxyIT.java | 59 +++---
.../test/functional/KerberosRenewalIT.java | 4 +-
.../accumulo/test/functional/LargeRowIT.java | 4 +-
.../accumulo/test/functional/MapReduceIT.java | 4 +-
.../test/functional/MasterAssignmentIT.java | 8 +-
.../accumulo/test/functional/NativeMapIT.java | 24 +--
.../accumulo/test/functional/ReadWriteIT.java | 8 +-
.../test/functional/RegexGroupBalanceIT.java | 4 +-
.../apache/accumulo/test/functional/ScanIdIT.java | 4 +-
.../accumulo/test/functional/ScanIteratorIT.java | 4 +-
.../test/functional/SessionDurabilityIT.java | 4 +-
.../accumulo/test/functional/SplitRecoveryIT.java | 16 +-
.../functional/TabletStateChangeIteratorIT.java | 12 +-
.../apache/accumulo/test/functional/TimeoutIT.java | 4 +-
.../accumulo/test/functional/WALSunnyDayIT.java | 4 +-
.../accumulo/test/functional/ZombieTServer.java | 12 +-
.../CloseWriteAheadLogReferencesIT.java | 4 +-
.../test/mapred/AccumuloFileOutputFormatIT.java | 9 +-
.../test/mapred/AccumuloInputFormatIT.java | 9 +-
.../test/mapred/AccumuloOutputFormatIT.java | 4 +-
.../apache/accumulo/test/mapred/TokenFileIT.java | 4 +-
.../test/mapreduce/AccumuloFileOutputFormatIT.java | 9 +-
.../test/mapreduce/AccumuloInputFormatIT.java | 19 +-
.../accumulo/test/mapreduce/TokenFileIT.java | 4 +-
.../apache/accumulo/test/master/MergeStateIT.java | 9 +-
.../accumulo/test/master/SuspendedTabletsIT.java | 17 +-
.../test/performance/scan/CollectTabletStats.java | 12 +-
.../accumulo/test/proxy/ProxyDurabilityIT.java | 4 +-
.../accumulo/test/proxy/SimpleProxyBase.java | 59 +++---
.../accumulo/test/proxy/TestProxyReadWrite.java | 14 +-
.../test/proxy/TestProxyTableOperations.java | 4 +-
.../apache/accumulo/test/randomwalk/Module.java | 4 +-
.../accumulo/test/randomwalk/bulk/BulkPlusOne.java | 4 +-
.../test/randomwalk/bulk/ConsistencyCheck.java | 4 +-
.../test/randomwalk/concurrent/BulkImport.java | 4 +-
.../test/randomwalk/concurrent/Config.java | 8 +-
.../test/randomwalk/concurrent/IsolatedScan.java | 4 +-
.../test/randomwalk/concurrent/StartAll.java | 4 +-
.../test/randomwalk/multitable/CopyTool.java | 4 +-
.../test/randomwalk/security/AlterTable.java | 6 +-
.../test/randomwalk/security/AlterTablePerm.java | 8 +-
.../test/randomwalk/security/CreateTable.java | 6 +-
.../test/randomwalk/security/CreateUser.java | 6 +-
.../test/randomwalk/security/DropUser.java | 6 +-
.../accumulo/test/randomwalk/security/TableOp.java | 10 +-
.../test/randomwalk/security/Validate.java | 4 +-
.../test/randomwalk/sequential/BatchVerify.java | 4 +-
.../randomwalk/sequential/MapRedVerifyTool.java | 8 +-
.../randomwalk/sequential/SequentialFixture.java | 4 +-
.../accumulo/test/randomwalk/shard/BulkInsert.java | 6 +-
.../test/randomwalk/shard/CompactFilter.java | 4 +-
.../test/randomwalk/shard/DeleteSomeDocs.java | 8 +-
.../accumulo/test/randomwalk/shard/DeleteWord.java | 4 +-
.../test/randomwalk/shard/ExportIndex.java | 8 +-
.../accumulo/test/randomwalk/shard/Grep.java | 4 +-
.../accumulo/test/randomwalk/shard/Reindex.java | 4 +-
.../accumulo/test/randomwalk/shard/Search.java | 4 +-
.../accumulo/test/randomwalk/shard/Split.java | 4 +-
.../test/randomwalk/shard/VerifyIndex.java | 4 +-
.../test/replication/CyclicReplicationIT.java | 12 +-
.../test/replication/FinishedWorkUpdaterIT.java | 20 +-
...GarbageCollectorCommunicatesWithTServersIT.java | 12 +-
.../replication/MultiInstanceReplicationIT.java | 12 +-
.../RemoveCompleteReplicationRecordsIT.java | 4 +-
.../accumulo/test/replication/ReplicationIT.java | 20 +-
.../accumulo/test/replication/StatusMakerIT.java | 26 +--
.../test/replication/UnorderedWorkAssignerIT.java | 7 +-
.../UnorderedWorkAssignerReplicationIT.java | 16 +-
.../UnusedWalDoesntCloseReplicationStatusIT.java | 10 +-
.../accumulo/test/replication/WorkMakerIT.java | 4 +-
.../test/replication/merkle/MerkleTreeNode.java | 4 +-
.../test/replication/merkle/cli/CompareTables.java | 8 +-
.../replication/merkle/cli/ComputeRootHash.java | 2 +-
.../replication/merkle/cli/GenerateHashes.java | 4 +-
.../test/server/security/SystemCredentialsIT.java | 4 +-
.../apache/accumulo/test/start/KeywordStartIT.java | 8 +-
.../test/stress/random/RandomMutations.java | 4 +-
.../apache/accumulo/test/stress/random/Scan.java | 4 +-
.../org/apache/accumulo/test/util/CertUtils.java | 8 +-
.../test/TraceRepoDeserializationTest.java | 30 +--
.../accumulo/test/fate/zookeeper/ZooLockTest.java | 44 ++--
.../accumulo/test/iterator/AgeOffFilterTest.java | 4 +-
.../test/iterator/CfCqSliceFilterTest.java | 4 +-
.../test/iterator/WholeRowIteratorTest.java | 2 +-
.../apache/accumulo/test/util/CertUtilsTest.java | 4 +-
574 files changed, 3398 insertions(+), 3381 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 ed1680b..41389b1 100644
--- a/core/src/main/java/org/apache/accumulo/core/Constants.java
+++ b/core/src/main/java/org/apache/accumulo/core/Constants.java
@@ -126,8 +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/cli/ClientOpts.java b/core/src/main/java/org/apache/accumulo/core/cli/ClientOpts.java
index e88c6d8..f1ec42d 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
@@ -152,8 +152,8 @@ public class ClientOpts extends Help {
// 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) {
@@ -252,8 +252,8 @@ public class ClientOpts extends Help {
* 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
@@ -399,8 +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/client/ClientConfiguration.java b/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java
index 5f2be86..5449d9b 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
@@ -271,7 +271,7 @@ public class ClientConfiguration extends CompositeConfiguration {
* @since 1.9.0
*/
public static ClientConfiguration create() {
- return new ClientConfiguration(Collections.<Configuration> emptyList());
+ return new ClientConfiguration(Collections.<Configuration>emptyList());
}
/**
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 f6c2956..7c2a337 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
@@ -139,8 +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>());
@@ -175,7 +175,7 @@ public class MutationsRejectedException extends AccumuloException {
*/
@Deprecated
public Map<org.apache.accumulo.core.data.KeyExtent,Set<SecurityErrorCode>>
- getAuthorizationFailuresMap() {
+ getAuthorizationFailuresMap() {
return transformKeys(af, TabletIdImpl.TID_2_KE_OLD);
}
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 563f2a9..7d45806 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
@@ -272,8 +272,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;
}
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 aa27c50..40a68d8 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
@@ -109,8 +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/ClientContext.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ClientContext.java
index 05cd058..7eec2a9 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
@@ -237,8 +237,8 @@ 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);
@@ -283,8 +283,8 @@ public class ClientContext {
// 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(),
@@ -302,8 +302,8 @@ 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));
}
@@ -317,8 +317,8 @@ public class ClientContext {
}
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 hConf = new org.apache.hadoop.conf.Configuration();
hConf.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 6d1dc3d..5b55f1b 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
@@ -634,9 +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());
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 359800d..e7c305d 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
@@ -46,8 +46,8 @@ import org.apache.accumulo.core.security.Authorizations;
import org.apache.accumulo.core.trace.Tracer;
public class ConnectorImpl extends Connector {
- private static final String SYSTEM_TOKEN_NAME = "org.apache.accumulo.server.security."
- + "SystemCredentials$SystemToken";
+ private static final String SYSTEM_TOKEN_NAME =
+ "org.apache.accumulo.server.security." + "SystemCredentials$SystemToken";
private final ClientContext context;
private SecurityOperations secops = null;
private TableOperationsImpl tableops = null;
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 a4522a6..6822658 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
@@ -139,10 +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]);
@@ -165,8 +165,8 @@ public class Credentials {
: (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;
}
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 f9d1111..e9f0bf2 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
@@ -61,8 +61,8 @@ public class DelegationTokenImpl extends PasswordToken implements DelegationToke
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");
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 c0f2774..fa6d6be 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
@@ -226,8 +226,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 39e1f2d..73c5ee4 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,8 +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();
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 e0e9d73..c51b860 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
@@ -92,8 +92,8 @@ public abstract class NamespaceOperationsHelper implements NamespaceOperations {
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)) {
@@ -141,8 +141,8 @@ public abstract class NamespaceOperationsHelper implements NamespaceOperations {
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<>();
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 a64e23f..6e436af 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
@@ -78,8 +78,8 @@ 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();
@@ -121,7 +121,7 @@ public class NamespaceOperationsImpl extends NamespaceOperationsHelper {
try {
doNamespaceFateOperation(FateOperation.NAMESPACE_CREATE,
Arrays.asList(ByteBuffer.wrap(namespace.getBytes(UTF_8))),
- Collections.<String,String> emptyMap(), namespace);
+ Collections.<String,String>emptyMap(), namespace);
} catch (NamespaceNotFoundException e) {
// should not happen
throw new AssertionError(e);
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 783ea77..9f496b5 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
@@ -162,8 +162,8 @@ class OfflineIterator implements Iterator<Entry<Key,Value>> {
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();
@@ -220,8 +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) {
@@ -339,10 +339,10 @@ 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);
+ SamplerConfigurationImpl scannerSamplerConfigImpl =
+ scannerSamplerConfig == null ? null : new SamplerConfigurationImpl(scannerSamplerConfig);
+ SamplerConfigurationImpl samplerConfImpl =
+ SamplerConfigurationImpl.newSamplerConfig(acuTableConf);
if (scannerSamplerConfigImpl != null
&& ((samplerConfImpl != null && !scannerSamplerConfigImpl.equals(samplerConfImpl))
@@ -365,13 +365,13 @@ 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,
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 6eb1fd0..ed5e375 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,8 +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();
@@ -94,8 +94,8 @@ public class ReplicationClient {
// 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);
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 ecd6b78..12829cc 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
@@ -96,8 +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);
}
@@ -108,8 +108,8 @@ 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());
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 0b2860d..2d394a7 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
@@ -410,8 +410,8 @@ public class SecurityOperationsImpl implements SecurityOperations {
"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 6e49585..899bea4 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
@@ -147,10 +147,10 @@ public class ServerClient {
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);
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 baf53ef..7fa8640 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
@@ -86,8 +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)) {
@@ -133,8 +133,8 @@ public abstract class TableOperationsHelper implements TableOperations {
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<>();
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 93afdee..27ce0c8 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
@@ -151,8 +151,8 @@ 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();
@@ -334,8 +334,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
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) {
@@ -439,8 +439,8 @@ 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));
@@ -1162,8 +1162,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
Map<String,String> props = context.getConnector().instanceOperations().getSystemConfiguration();
AccumuloConfiguration conf = new ConfigurationCopy(props);
- FileSystem fs = VolumeConfiguration.getVolume(dir, CachedConfiguration.getInstance(), conf)
- .getFileSystem();
+ FileSystem fs =
+ VolumeConfiguration.getVolume(dir, CachedConfiguration.getInstance(), conf).getFileSystem();
if (dir.contains(":")) {
ret = new Path(dir);
@@ -1420,8 +1420,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
@Override
public void clearLocatorCache(String tableName) throws TableNotFoundException {
checkArgument(tableName != null, "tableName is null");
- TabletLocator tabLocator = TabletLocator.getLocator(context,
- Tables.getTableId(context.getInstance(), tableName));
+ TabletLocator tabLocator =
+ TabletLocator.getLocator(context, Tables.getTableId(context.getInstance(), tableName));
tabLocator.invalidateCache();
}
@@ -1673,8 +1673,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
throws AccumuloException, TableNotFoundException, AccumuloSecurityException {
clearSamplerOptions(tableName);
- List<Pair<String,String>> props = new SamplerConfigurationImpl(samplerConfiguration)
- .toTableProperties();
+ List<Pair<String,String>> props =
+ new SamplerConfigurationImpl(samplerConfiguration).toTableProperties();
for (Pair<String,String> pair : props) {
setProperty(tableName, pair.getFirst(), pair.getSecond());
}
@@ -1715,8 +1715,8 @@ public class TableOperationsImpl extends TableOperationsHelper {
for (Entry<KeyExtent,List<Range>> entry2 : entry.getValue().entrySet()) {
TabletIdImpl tabletId = new TabletIdImpl(entry2.getKey());
tabletLocations.put(tabletId, location);
- List<Range> prev = groupedByTablets.put(tabletId,
- Collections.unmodifiableList(entry2.getValue()));
+ List<Range> prev =
+ groupedByTablets.put(tabletId, Collections.unmodifiableList(entry2.getValue()));
if (prev != null) {
throw new RuntimeException(
"Unexpected : tablet at multiple locations : " + location + " " + tabletId);
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java b/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
index b3a6d67..50f6343 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
@@ -44,12 +44,12 @@ public class Tables {
public static final String VALID_NAME_REGEX = "^(\\w+\\.)?(\\w+)$";
- private static final SecurityPermission TABLES_PERMISSION = new SecurityPermission(
- "tablesPermission");
+ private static final SecurityPermission TABLES_PERMISSION =
+ new SecurityPermission("tablesPermission");
// Per instance cache will expire after 10 minutes in case we encounter an instance not used
// frequently
- private static Cache<String,TableMap> instanceToMapCache = CacheBuilder.newBuilder()
- .expireAfterAccess(10, TimeUnit.MINUTES).build();
+ private static Cache<String,TableMap> instanceToMapCache =
+ CacheBuilder.newBuilder().expireAfterAccess(10, TimeUnit.MINUTES).build();
/**
* Return the cached ZooCache for provided instance. ZooCache is initially created with a watcher
@@ -215,8 +215,8 @@ public class Tables {
public static TableState getTableState(Instance instance, String tableId,
boolean clearCachedState) {
- String statePath = ZooUtil.getRoot(instance) + Constants.ZTABLES + "/" + tableId
- + Constants.ZTABLE_STATE;
+ String statePath =
+ ZooUtil.getRoot(instance) + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_STATE;
if (clearCachedState) {
Tables.clearCacheByPath(instance, statePath);
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocatorImpl.java b/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocatorImpl.java
index 823115f..fd76e3b 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocatorImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocatorImpl.java
@@ -503,8 +503,8 @@ public class TabletLocatorImpl extends TabletLocator {
TabletLocation ptl = parent.locateTablet(context, metadataRow, false, retry);
if (ptl != null) {
- TabletLocations locations = locationObtainer.lookupTablet(context, ptl, metadataRow,
- lastTabletRow, parent);
+ TabletLocations locations =
+ locationObtainer.lookupTablet(context, ptl, metadataRow, lastTabletRow, parent);
while (locations != null && locations.getLocations().isEmpty()
&& locations.getLocationless().isEmpty()) {
// try the next tablet, the current tablet does not have any tablets that overlap the row
@@ -513,8 +513,8 @@ public class TabletLocatorImpl extends TabletLocator {
// System.out.println("er "+er+" ltr "+lastTabletRow);
ptl = parent.locateTablet(context, er, true, retry);
if (ptl != null)
- locations = locationObtainer.lookupTablet(context, ptl, metadataRow, lastTabletRow,
- parent);
+ locations =
+ locationObtainer.lookupTablet(context, ptl, metadataRow, lastTabletRow, parent);
else
break;
} else {
@@ -537,9 +537,9 @@ public class TabletLocatorImpl extends TabletLocator {
// create new location if current prevEndRow == endRow
if ((lastEndRow != null) && (ke.getPrevEndRow() != null)
&& ke.getPrevEndRow().equals(lastEndRow)) {
- locToCache = new TabletLocation(
- new KeyExtent(ke.getTableId(), ke.getEndRow(), lastEndRow),
- tabletLocation.tablet_location, tabletLocation.tablet_session);
+ locToCache =
+ new TabletLocation(new KeyExtent(ke.getTableId(), ke.getEndRow(), lastEndRow),
+ tabletLocation.tablet_location, tabletLocation.tablet_session);
} else {
locToCache = tabletLocation;
}
@@ -729,8 +729,8 @@ public class TabletLocatorImpl extends TabletLocator {
Collections.shuffle(tabletServers);
for (String tserver : tabletServers) {
- List<TabletLocation> locations = locationObtainer.lookupTablets(context, tserver,
- binnedRanges.get(tserver), parent);
+ List<TabletLocation> locations =
+ locationObtainer.lookupTablets(context, tserver, binnedRanges.get(tserver), parent);
for (TabletLocation tabletLocation : locations) {
updateCache(tabletLocation, lcSession);
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReader.java b/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReader.java
index 2be6d67..12e2ec0 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReader.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReader.java
@@ -64,8 +64,8 @@ public class TabletServerBatchReader extends ScannerOptions implements BatchScan
this.tableId = tableId;
this.numThreads = numQueryThreads;
- queryThreadPool = new SimpleThreadPool(numQueryThreads,
- "batch scanner " + batchReaderInstance + "-");
+ queryThreadPool =
+ new SimpleThreadPool(numQueryThreads, "batch scanner " + batchReaderInstance + "-");
ranges = null;
ex = new Throwable();
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java b/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java
index d6dae58..baf41c1 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java
@@ -185,8 +185,8 @@ public class TabletServerBatchReaderIterator implements Iterator<Entry<Key,Value
throw new RuntimeException(fatalException);
if (queryThreadPool.isShutdown()) {
- String shortMsg = "The BatchScanner was unexpectedly closed while this Iterator "
- + "was still in use.";
+ String shortMsg =
+ "The BatchScanner was unexpectedly closed while this Iterator " + "was still in use.";
log.error(shortMsg
+ " Ensure that a reference to the BatchScanner is retained so that it can be closed"
+ " when this Iterator is exhausted. Not retaining a reference to the BatchScanner"
@@ -486,8 +486,8 @@ public class TabletServerBatchReaderIterator implements Iterator<Entry<Key,Value
if (timedoutServers.size() > 0) {
// go ahead and fail any timed out servers
- for (Iterator<Entry<String,Map<KeyExtent,List<Range>>>> iterator = binnedRanges.entrySet()
- .iterator(); iterator.hasNext();) {
+ for (Iterator<Entry<String,Map<KeyExtent,List<Range>>>> iterator =
+ binnedRanges.entrySet().iterator(); iterator.hasNext();) {
Entry<String,Map<KeyExtent,List<Range>>> entry = iterator.next();
if (timedoutServers.contains(entry.getKey())) {
failures.putAll(entry.getValue());
@@ -514,16 +514,16 @@ public class TabletServerBatchReaderIterator implements Iterator<Entry<Key,Value
for (Entry<KeyExtent,List<Range>> entry : tabletsRanges.entrySet()) {
tabletSubset.put(entry.getKey(), entry.getValue());
if (tabletSubset.size() >= maxTabletsPerRequest) {
- QueryTask queryTask = new QueryTask(tsLocation, tabletSubset, failures, receiver,
- columns);
+ QueryTask queryTask =
+ new QueryTask(tsLocation, tabletSubset, failures, receiver, columns);
queryTasks.add(queryTask);
tabletSubset = new HashMap<>();
}
}
if (tabletSubset.size() > 0) {
- QueryTask queryTask = new QueryTask(tsLocation, tabletSubset, failures, receiver,
- columns);
+ QueryTask queryTask =
+ new QueryTask(tsLocation, tabletSubset, failures, receiver, columns);
queryTasks.add(queryTask);
}
}
@@ -548,8 +548,8 @@ public class TabletServerBatchReaderIterator implements Iterator<Entry<Key,Value
failures.putAll(retFailures);
// translate full scans and remove them from unscanned
- HashSet<KeyExtent> fullScans = new HashSet<>(
- Translator.translate(scanResult.fullScans, Translators.TKET));
+ HashSet<KeyExtent> fullScans =
+ new HashSet<>(Translator.translate(scanResult.fullScans, Translators.TKET));
unscanned.keySet().removeAll(fullScans);
// remove partial scan from unscanned
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java b/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
index 0226b6a..77850c5 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
@@ -123,8 +123,8 @@ public class TabletServerBatchWriter {
// latency timers
private final Timer jtimer = new Timer("BatchWriterLatencyTimer", true);
- private final Map<String,TimeoutTracker> timeoutTrackers = Collections
- .synchronizedMap(new HashMap<String,TabletServerBatchWriter.TimeoutTracker>());
+ private final Map<String,TimeoutTracker> timeoutTrackers =
+ Collections.synchronizedMap(new HashMap<String,TabletServerBatchWriter.TimeoutTracker>());
// stats
private long totalMemUsed = 0;
@@ -213,8 +213,8 @@ public class TabletServerBatchWriter {
public void run() {
try {
synchronized (TabletServerBatchWriter.this) {
- if ((System.currentTimeMillis()
- - lastProcessingStartTime) > TabletServerBatchWriter.this.maxLatency)
+ if ((System.currentTimeMillis() - lastProcessingStartTime)
+ > TabletServerBatchWriter.this.maxLatency)
startProcessing();
}
} catch (Throwable t) {
@@ -579,7 +579,8 @@ public class TabletServerBatchWriter {
private void checkForFailures() throws MutationsRejectedException {
if (somethingFailed) {
List<ConstraintViolationSummary> cvsList = violations.asList();
- HashMap<TabletId,Set<org.apache.accumulo.core.client.security.SecurityErrorCode>> af = new HashMap<>();
+ HashMap<TabletId,Set<org.apache.accumulo.core.client.security.SecurityErrorCode>> af =
+ new HashMap<>();
for (Entry<KeyExtent,Set<SecurityErrorCode>> entry : authorizationFailures.entrySet()) {
HashSet<org.apache.accumulo.core.client.security.SecurityErrorCode> codes = new HashSet<>();
@@ -784,8 +785,8 @@ public class TabletServerBatchWriter {
addMutations(binnedMutations);
}
- private synchronized void addMutations(
- Map<String,TabletServerMutations<Mutation>> binnedMutations) {
+ private synchronized void
+ addMutations(Map<String,TabletServerMutations<Mutation>> binnedMutations) {
int count = 0;
@@ -974,8 +975,8 @@ public class TabletServerBatchWriter {
timeoutTracker.madeProgress();
} else {
- long usid = client.startUpdate(tinfo, context.rpcCreds(),
- DurabilityImpl.toThrift(durability));
+ long usid =
+ client.startUpdate(tinfo, context.rpcCreds(), DurabilityImpl.toThrift(durability));
List<TMutation> updates = new ArrayList<>();
for (Entry<KeyExtent,List<Mutation>> entry : tabMuts.entrySet()) {
@@ -996,8 +997,8 @@ public class TabletServerBatchWriter {
UpdateErrors updateErrors = client.closeUpdate(tinfo, usid);
- Map<KeyExtent,Long> failures = Translator.translate(updateErrors.failedExtents,
- Translators.TKET);
+ Map<KeyExtent,Long> failures =
+ Translator.translate(updateErrors.failedExtents, Translators.TKET);
updatedConstraintViolations(
Translator.translate(updateErrors.violationSummaries, Translators.TCVST));
updateAuthorizationFailures(
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftScanner.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftScanner.java
index 742b3b7..7c3b11f 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftScanner.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftScanner.java
@@ -75,8 +75,8 @@ import org.slf4j.LoggerFactory;
public class ThriftScanner {
private static final Logger log = LoggerFactory.getLogger(ThriftScanner.class);
- public static final Map<TabletType,Set<String>> serversWaitedForWrites = new EnumMap<>(
- TabletType.class);
+ public static final Map<TabletType,Set<String>> serversWaitedForWrites =
+ new EnumMap<>(TabletType.class);
static {
for (TabletType ttype : TabletType.values()) {
@@ -231,8 +231,8 @@ public class ThriftScanner {
String error = null;
int tooManyFilesCount = 0;
long sleepMillis = 100;
- final long maxSleepTime = context.getConfiguration()
- .getTimeInMillis(Property.GENERAL_MAX_SCANNER_RETRY_PERIOD);
+ final long maxSleepTime =
+ context.getConfiguration().getTimeInMillis(Property.GENERAL_MAX_SCANNER_RETRY_PERIOD);
List<KeyValue> results = null;
@@ -318,9 +318,9 @@ public class ThriftScanner {
} catch (TApplicationException tae) {
throw new AccumuloServerException(loc.tablet_location, tae);
} catch (TSampleNotPresentException tsnpe) {
- String message = "Table "
- + Tables.getPrintableTableInfoFromId(instance, scanState.tableId)
- + " does not have sampling configured or built";
+ String message =
+ "Table " + Tables.getPrintableTableInfoFromId(instance, scanState.tableId)
+ + " does not have sampling configured or built";
throw new SampleNotPresentException(message, tsnpe);
} catch (NotServingTabletException e) {
error = "Scan failed, not serving tablet " + loc;
@@ -450,14 +450,14 @@ public class ThriftScanner {
TabletType ttype = TabletType.type(loc.tablet_extent);
boolean waitForWrites = !serversWaitedForWrites.get(ttype).contains(loc.tablet_location);
- InitialScan is = client.startScan(tinfo, scanState.context.rpcCreds(),
- loc.tablet_extent.toThrift(), scanState.range.toThrift(),
- Translator.translate(scanState.columns, Translators.CT), scanState.size,
- scanState.serverSideIteratorList, scanState.serverSideIteratorOptions,
- scanState.authorizations.getAuthorizationsBB(), waitForWrites, scanState.isolated,
- scanState.readaheadThreshold,
- SamplerConfigurationImpl.toThrift(scanState.samplerConfig), scanState.batchTimeOut,
- scanState.classLoaderContext);
+ InitialScan is =
+ client.startScan(tinfo, scanState.context.rpcCreds(), loc.tablet_extent.toThrift(),
+ scanState.range.toThrift(), Translator.translate(scanState.columns, Translators.CT),
+ scanState.size, scanState.serverSideIteratorList,
+ scanState.serverSideIteratorOptions, scanState.authorizations.getAuthorizationsBB(),
+ waitForWrites, scanState.isolated, scanState.readaheadThreshold,
+ SamplerConfigurationImpl.toThrift(scanState.samplerConfig), scanState.batchTimeOut,
+ scanState.classLoaderContext);
if (waitForWrites)
serversWaitedForWrites.get(ttype).add(loc.tablet_location);
@@ -470,8 +470,8 @@ public class ThriftScanner {
} else {
// log.debug("Calling continue scan : "+scanState.range+" loc = "+loc);
- String msg = "Continuing scan tserver=" + loc.tablet_location + " scanid="
- + scanState.scanID;
+ String msg =
+ "Continuing scan tserver=" + loc.tablet_location + " scanid=" + scanState.scanID;
Thread.currentThread().setName(msg);
if (log.isTraceEnabled()) {
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java
index dc3e71e..720b136 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java
@@ -45,8 +45,8 @@ import com.google.common.base.Preconditions;
import com.google.common.collect.Iterables;
public class ThriftTransportPool {
- private static SecurityPermission TRANSPORT_POOL_PERMISSION = new SecurityPermission(
- "transportPoolPermission");
+ private static SecurityPermission TRANSPORT_POOL_PERMISSION =
+ new SecurityPermission("transportPoolPermission");
private static final Random random = new Random();
private long killTime = 1000 * 3;
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapred/AbstractInputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapred/AbstractInputFormat.java
index 4e80c18..6b158f8 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapred/AbstractInputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapred/AbstractInputFormat.java
@@ -592,8 +592,8 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V> {
.createScanner(baseSplit.getTableName(), authorizations);
} else {
ClientConfiguration clientConf = getClientConfiguration(job);
- ClientContext context = new ClientContext(instance, new Credentials(principal, token),
- clientConf);
+ ClientContext context =
+ new ClientContext(instance, new Credentials(principal, token), clientConf);
scanner = new ScannerImpl(context, baseSplit.getTableId(), authorizations);
}
if (isIsolated) {
@@ -729,8 +729,8 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V> {
throw new IllegalArgumentException(
"AutoAdjustRanges must be enabled when using BatchScanner optimization");
- List<Range> ranges = autoAdjust ? Range.mergeOverlapping(tableConfig.getRanges())
- : tableConfig.getRanges();
+ List<Range> ranges =
+ autoAdjust ? Range.mergeOverlapping(tableConfig.getRanges()) : tableConfig.getRanges();
if (ranges.isEmpty()) {
ranges = new ArrayList<>(1);
ranges.add(new Range());
@@ -797,8 +797,8 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V> {
for (Range r : extentRanges.getValue())
clippedRanges.add(ke.clip(r));
- BatchInputSplit split = new BatchInputSplit(tableName, tableId, clippedRanges,
- new String[] {location});
+ BatchInputSplit split =
+ new BatchInputSplit(tableName, tableId, clippedRanges, new String[] {location});
SplitUtils.updateSplit(split, instance, tableConfig, principal, token, auths, logLevel);
splits.add(split);
@@ -807,8 +807,8 @@ public abstract class AbstractInputFormat<K,V> implements InputFormat<K,V> {
for (Range r : extentRanges.getValue()) {
if (autoAdjust) {
// divide ranges into smaller ranges, based on the tablets
- RangeInputSplit split = new RangeInputSplit(tableName, tableId, ke.clip(r),
- new String[] {location});
+ RangeInputSplit split =
+ new RangeInputSplit(tableName, tableId, ke.clip(r), new String[] {location});
SplitUtils.updateSplit(split, instance, tableConfig, principal, token, auths,
logLevel);
split.setOffline(tableConfig.isOfflineScan());
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloFileOutputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloFileOutputFormat.java
index aa5f379..94a16ef 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloFileOutputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloFileOutputFormat.java
@@ -167,12 +167,12 @@ public class AccumuloFileOutputFormat extends FileOutputFormat<Key,Value> {
Progressable progress) throws IOException {
// get the path of the temporary output file
final Configuration conf = job;
- final AccumuloConfiguration acuConf = FileOutputConfigurator.getAccumuloConfiguration(CLASS,
- job);
+ final AccumuloConfiguration acuConf =
+ FileOutputConfigurator.getAccumuloConfiguration(CLASS, job);
final String extension = acuConf.get(Property.TABLE_FILE_TYPE);
- final Path file = new Path(getWorkOutputPath(job),
- getUniqueName(job, "part") + "." + extension);
+ final Path file =
+ new Path(getWorkOutputPath(job), getUniqueName(job, "part") + "." + extension);
final int visCacheSize = ConfiguratorBase.getVisibilityCacheSize(conf);
return new RecordWriter<Key,Value>() {
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloInputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloInputFormat.java
index b060f6a..1f4642b 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloInputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloInputFormat.java
@@ -58,7 +58,7 @@ public class AccumuloInputFormat extends InputFormatBase<Key,Value> {
// correct one to use.
if (split instanceof org.apache.accumulo.core.client.mapreduce.RangeInputSplit) {
org.apache.accumulo.core.client.mapreduce.RangeInputSplit accSplit =
- (org.apache.accumulo.core.client.mapreduce.RangeInputSplit) split;
+ (org.apache.accumulo.core.client.mapreduce.RangeInputSplit) split;
Level level = accSplit.getLogLevel();
if (null != level) {
log.setLevel(level);
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloRowInputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloRowInputFormat.java
index e2d0ab3..c204ed3 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloRowInputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloRowInputFormat.java
@@ -57,7 +57,7 @@ public class AccumuloRowInputFormat
JobConf job, Reporter reporter) throws IOException {
log.setLevel(getLogLevel(job));
RecordReaderBase<Text,PeekingIterator<Entry<Key,Value>>> recordReader =
- new RecordReaderBase<Text,PeekingIterator<Entry<Key,Value>>>() {
+ new RecordReaderBase<Text,PeekingIterator<Entry<Key,Value>>>() {
RowIterator rowIterator;
@Override
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java
index 169fcd3..ad731b3 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java
@@ -249,8 +249,8 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V> {
* @see #setConnectorInfo(Job, String, String)
*/
protected static AuthenticationToken getAuthenticationToken(JobContext context) {
- AuthenticationToken token = InputConfigurator.getAuthenticationToken(CLASS,
- context.getConfiguration());
+ AuthenticationToken token =
+ InputConfigurator.getAuthenticationToken(CLASS, context.getConfiguration());
return ConfiguratorBase.unwrapAuthenticationToken(context, token);
}
@@ -624,8 +624,8 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V> {
authorizations);
} else {
ClientConfiguration clientConf = getClientConfiguration(attempt);
- ClientContext context = new ClientContext(instance, new Credentials(principal, token),
- clientConf);
+ ClientContext context =
+ new ClientContext(instance, new Credentials(principal, token), clientConf);
scanner = new ScannerImpl(context, split.getTableId(), authorizations);
}
if (isIsolated) {
@@ -778,8 +778,8 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V> {
throw new IllegalArgumentException(
"AutoAdjustRanges must be enabled when using BatchScanner optimization");
- List<Range> ranges = autoAdjust ? Range.mergeOverlapping(tableConfig.getRanges())
- : tableConfig.getRanges();
+ List<Range> ranges =
+ autoAdjust ? Range.mergeOverlapping(tableConfig.getRanges()) : tableConfig.getRanges();
if (ranges.isEmpty()) {
ranges = new ArrayList<>(1);
ranges.add(new Range());
@@ -849,8 +849,8 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V> {
ArrayList<Range> clippedRanges = new ArrayList<>();
for (Range r : extentRanges.getValue())
clippedRanges.add(ke.clip(r));
- BatchInputSplit split = new BatchInputSplit(tableName, tableId, clippedRanges,
- new String[] {location});
+ BatchInputSplit split =
+ new BatchInputSplit(tableName, tableId, clippedRanges, new String[] {location});
SplitUtils.updateSplit(split, instance, tableConfig, principal, token, auths, logLevel);
splits.add(split);
@@ -859,8 +859,8 @@ public abstract class AbstractInputFormat<K,V> extends InputFormat<K,V> {
for (Range r : extentRanges.getValue()) {
if (autoAdjust) {
// divide ranges into smaller ranges, based on the tablets
- RangeInputSplit split = new RangeInputSplit(tableName, tableId, ke.clip(r),
- new String[] {location});
+ RangeInputSplit split =
+ new RangeInputSplit(tableName, tableId, ke.clip(r), new String[] {location});
SplitUtils.updateSplit(split, instance, tableConfig, principal, token, auths,
logLevel);
split.setOffline(tableConfig.isOfflineScan());
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java
index 10ad85f..a763f55 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java
@@ -165,8 +165,8 @@ public class AccumuloFileOutputFormat extends FileOutputFormat<Key,Value> {
public RecordWriter<Key,Value> getRecordWriter(TaskAttemptContext context) throws IOException {
// get the path of the temporary output file
final Configuration conf = context.getConfiguration();
- final AccumuloConfiguration acuConf = FileOutputConfigurator.getAccumuloConfiguration(CLASS,
- context.getConfiguration());
+ final AccumuloConfiguration acuConf =
+ FileOutputConfigurator.getAccumuloConfiguration(CLASS, context.getConfiguration());
final String extension = acuConf.get(Property.TABLE_FILE_TYPE);
final Path file = this.getDefaultWorkFile(context, "." + extension);
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormat.java
index 84b3ce4..6aa82ae 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormat.java
@@ -57,7 +57,7 @@ public class AccumuloInputFormat extends InputFormatBase<Key,Value> {
// correct one to use.
if (split instanceof org.apache.accumulo.core.client.mapreduce.RangeInputSplit) {
org.apache.accumulo.core.client.mapreduce.RangeInputSplit accSplit =
- (org.apache.accumulo.core.client.mapreduce.RangeInputSplit) split;
+ (org.apache.accumulo.core.client.mapreduce.RangeInputSplit) split;
Level level = accSplit.getLogLevel();
if (null != level) {
log.setLevel(level);
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
index 8b82e7c..06e4405 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
@@ -214,8 +214,8 @@ public class AccumuloOutputFormat extends OutputFormat<Text,Mutation> {
* @see #setConnectorInfo(Job, String, String)
*/
protected static AuthenticationToken getAuthenticationToken(JobContext context) {
- AuthenticationToken token = OutputConfigurator.getAuthenticationToken(CLASS,
- context.getConfiguration());
+ AuthenticationToken token =
+ OutputConfigurator.getAuthenticationToken(CLASS, context.getConfiguration());
return ConfiguratorBase.unwrapAuthenticationToken(context, token);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
index f0e9ae4..a7a55c9 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
@@ -111,8 +111,8 @@ public class RangeInputSplit extends InputSplit implements Writable {
// just look at the column family progress
return getProgress(range.getStartKey().getColumnFamilyData(),
range.getEndKey().getColumnFamilyData(), currentKey.getColumnFamilyData());
- } else if (range.getStartKey().compareTo(range.getEndKey(),
- PartialKey.ROW_COLFAM_COLQUAL) != 0) {
+ } else if (range.getStartKey().compareTo(range.getEndKey(), PartialKey.ROW_COLFAM_COLQUAL)
+ != 0) {
// just look at the column qualifier progress
return getProgress(range.getStartKey().getColumnQualifierData(),
range.getEndKey().getColumnQualifierData(), currentKey.getColumnQualifierData());
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/impl/BatchInputSplit.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/impl/BatchInputSplit.java
index d055214..050b69c 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/impl/BatchInputSplit.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/impl/BatchInputSplit.java
@@ -76,8 +76,8 @@ public class BatchInputSplit extends RangeInputSplit {
// just look at the row progress
rangeProgress[i] = SplitUtils.getProgress(range.getStartKey().getRowData(),
range.getEndKey().getRowData(), currentKey.getRowData());
- } else if (range.getStartKey().compareTo(range.getEndKey(),
- PartialKey.ROW_COLFAM) != 0) {
+ } else if (range.getStartKey().compareTo(range.getEndKey(), PartialKey.ROW_COLFAM)
+ != 0) {
// just look at the column family progress
rangeProgress[i] = SplitUtils.getProgress(range.getStartKey().getColumnFamilyData(),
range.getEndKey().getColumnFamilyData(), currentKey.getColumnFamilyData());
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java
index 79ae9af..df87b8c 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java
@@ -407,8 +407,8 @@ public class ConfiguratorBase {
*/
public static ClientConfiguration getClientConfiguration(Class<?> implementingClass,
Configuration conf) {
- String clientConfigString = conf
- .get(enumToConfKey(implementingClass, InstanceOpts.CLIENT_CONFIG));
+ String clientConfigString =
+ conf.get(enumToConfKey(implementingClass, InstanceOpts.CLIENT_CONFIG));
if (null != clientConfigString) {
return ClientConfiguration.deserialize(clientConfigString);
}
@@ -497,8 +497,8 @@ public class ConfiguratorBase {
requireNonNull(token);
if (token instanceof DelegationTokenStub) {
DelegationTokenStub delTokenStub = (DelegationTokenStub) token;
- Token<? extends TokenIdentifier> hadoopToken = job.getCredentials()
- .getToken(new Text(delTokenStub.getServiceName()));
+ Token<? extends TokenIdentifier> hadoopToken =
+ job.getCredentials().getToken(new Text(delTokenStub.getServiceName()));
AuthenticationTokenIdentifier identifier = new AuthenticationTokenIdentifier();
try {
identifier
@@ -527,8 +527,8 @@ public class ConfiguratorBase {
requireNonNull(token);
if (token instanceof DelegationTokenStub) {
DelegationTokenStub delTokenStub = (DelegationTokenStub) token;
- Token<? extends TokenIdentifier> hadoopToken = job.getCredentials()
- .getToken(new Text(delTokenStub.getServiceName()));
+ Token<? extends TokenIdentifier> hadoopToken =
+ job.getCredentials().getToken(new Text(delTokenStub.getServiceName()));
AuthenticationTokenIdentifier identifier = new AuthenticationTokenIdentifier();
try {
identifier
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/FileOutputConfigurator.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/FileOutputConfigurator.java
index 9a9c051..7c374c7 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/FileOutputConfigurator.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/FileOutputConfigurator.java
@@ -108,8 +108,8 @@ public class FileOutputConfigurator extends ConfiguratorBase {
public static AccumuloConfiguration getAccumuloConfiguration(Class<?> implementingClass,
Configuration conf) {
String prefix = enumToConfKey(implementingClass, Opts.ACCUMULO_PROPERTIES) + ".";
- ConfigurationCopy acuConf = new ConfigurationCopy(
- AccumuloConfiguration.getDefaultConfiguration());
+ ConfigurationCopy acuConf =
+ new ConfigurationCopy(AccumuloConfiguration.getDefaultConfiguration());
for (Entry<String,String> entry : conf)
if (entry.getKey().startsWith(prefix)) {
String propString = entry.getKey().substring(prefix.length());
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java
index 6c06d89..c978060 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java
@@ -259,12 +259,12 @@ public class InputConfigurator extends ConfiguratorBase {
public static List<Range> getRanges(Class<?> implementingClass, Configuration conf)
throws IOException {
- Collection<String> encodedRanges = conf
- .getStringCollection(enumToConfKey(implementingClass, ScanOpts.RANGES));
+ Collection<String> encodedRanges =
+ conf.getStringCollection(enumToConfKey(implementingClass, ScanOpts.RANGES));
List<Range> ranges = new ArrayList<>();
for (String rangeString : encodedRanges) {
- ByteArrayInputStream bais = new ByteArrayInputStream(
- Base64.decodeBase64(rangeString.getBytes(UTF_8)));
+ ByteArrayInputStream bais =
+ new ByteArrayInputStream(Base64.decodeBase64(rangeString.getBytes(UTF_8)));
Range range = new Range();
range.readFields(new DataInputStream(bais));
ranges.add(range);
@@ -297,8 +297,8 @@ public class InputConfigurator extends ConfiguratorBase {
try {
while (tokens.hasMoreTokens()) {
String itstring = tokens.nextToken();
- ByteArrayInputStream bais = new ByteArrayInputStream(
- Base64.decodeBase64(itstring.getBytes(UTF_8)));
+ ByteArrayInputStream bais =
+ new ByteArrayInputStream(Base64.decodeBase64(itstring.getBytes(UTF_8)));
list.add(new IteratorSetting(new DataInputStream(bais)));
bais.close();
}
@@ -331,8 +331,8 @@ public class InputConfigurator extends ConfiguratorBase {
conf.setStrings(enumToConfKey(implementingClass, ScanOpts.COLUMNS), columnStrings);
}
- public static String[] serializeColumns(
- Collection<Pair<Text,Text>> columnFamilyColumnQualifierPairs) {
+ public static String[]
+ serializeColumns(Collection<Pair<Text,Text>> columnFamilyColumnQualifierPairs) {
checkArgument(columnFamilyColumnQualifierPairs != null,
"columnFamilyColumnQualifierPairs is null");
ArrayList<String> columnStrings = new ArrayList<>(columnFamilyColumnQualifierPairs.size());
@@ -386,8 +386,8 @@ public class InputConfigurator extends ConfiguratorBase {
int idx = col.indexOf(":");
Text cf = new Text(idx < 0 ? Base64.decodeBase64(col.getBytes(UTF_8))
: Base64.decodeBase64(col.substring(0, idx).getBytes(UTF_8)));
- Text cq = idx < 0 ? null
- : new Text(Base64.decodeBase64(col.substring(idx + 1).getBytes(UTF_8)));
+ Text cq =
+ idx < 0 ? null : new Text(Base64.decodeBase64(col.substring(idx + 1).getBytes(UTF_8)));
columns.add(new Pair<>(cf, cq));
}
return columns;
@@ -690,8 +690,8 @@ public class InputConfigurator extends ConfiguratorBase {
private static Map<String,InputTableConfig> getInputTableConfigs(Class<?> implementingClass,
Configuration conf, String tableName) {
Map<String,InputTableConfig> configs = new HashMap<>();
- Map.Entry<String,InputTableConfig> defaultConfig = getDefaultInputTableConfig(implementingClass,
- conf, tableName);
+ Map.Entry<String,InputTableConfig> defaultConfig =
+ getDefaultInputTableConfig(implementingClass, conf, tableName);
if (defaultConfig != null)
configs.put(defaultConfig.getKey(), defaultConfig.getValue());
String configString = conf.get(enumToConfKey(implementingClass, ScanOpts.TABLE_CONFIGS));
@@ -727,8 +727,8 @@ public class InputConfigurator extends ConfiguratorBase {
*/
public static InputTableConfig getInputTableConfig(Class<?> implementingClass, Configuration conf,
String tableName) {
- Map<String,InputTableConfig> queryConfigs = getInputTableConfigs(implementingClass, conf,
- tableName);
+ Map<String,InputTableConfig> queryConfigs =
+ getInputTableConfigs(implementingClass, conf, tableName);
return queryConfigs.get(tableName);
}
@@ -753,10 +753,9 @@ public class InputConfigurator extends ConfiguratorBase {
return DeprecationUtil.makeMockLocator();
Instance instance = getInstance(implementingClass, conf);
ClientConfiguration clientConf = getClientConfiguration(implementingClass, conf);
- ClientContext context = new ClientContext(instance,
- new Credentials(getPrincipal(implementingClass, conf),
- getAuthenticationToken(implementingClass, conf)),
- clientConf);
+ ClientContext context =
+ new ClientContext(instance, new Credentials(getPrincipal(implementingClass, conf),
+ getAuthenticationToken(implementingClass, conf)), clientConf);
return TabletLocator.getLocator(context, tableId);
}
@@ -905,8 +904,8 @@ public class InputConfigurator extends ConfiguratorBase {
* @return the config object built from the single input table properties set on the job
* @since 1.6.0
*/
- protected static Map.Entry<String,InputTableConfig> getDefaultInputTableConfig(
- Class<?> implementingClass, Configuration conf, String tableName) {
+ protected static Map.Entry<String,InputTableConfig>
+ getDefaultInputTableConfig(Class<?> implementingClass, Configuration conf, String tableName) {
if (tableName != null) {
InputTableConfig queryConfig = new InputTableConfig();
List<IteratorSetting> itrs = getIterators(implementingClass, conf);
@@ -959,8 +958,8 @@ public class InputConfigurator extends ConfiguratorBase {
else
startRow = new Text();
- Range metadataRange = new Range(new KeyExtent(tableId, startRow, null).getMetadataEntry(),
- true, null, false);
+ Range metadataRange =
+ new Range(new KeyExtent(tableId, startRow, null).getMetadataEntry(), true, null, false);
Scanner scanner = conn.createScanner(MetadataTable.NAME, Authorizations.EMPTY);
MetadataSchema.TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.fetch(scanner);
scanner.fetchColumnFamily(MetadataSchema.TabletsSection.LastLocationColumnFamily.NAME);
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/util/InputConfigurator.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/util/InputConfigurator.java
index e182cbf..b821e4e 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/util/InputConfigurator.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/util/InputConfigurator.java
@@ -204,8 +204,8 @@ public class InputConfigurator extends ConfiguratorBase {
* @deprecated since 1.6.0; Configure your job with the appropriate InputFormat or OutputFormat.
*/
@Deprecated
- public static String[] serializeColumns(
- Collection<Pair<Text,Text>> columnFamilyColumnQualifierPairs) {
+ public static String[]
+ serializeColumns(Collection<Pair<Text,Text>> columnFamilyColumnQualifierPairs) {
return org.apache.accumulo.core.client.mapreduce.lib.impl.InputConfigurator
.serializeColumns(columnFamilyColumnQualifierPairs);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mock/MockAccumulo.java b/core/src/main/java/org/apache/accumulo/core/client/mock/MockAccumulo.java
index 12b89f7..7e94652 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mock/MockAccumulo.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/MockAccumulo.java
@@ -119,8 +119,8 @@ public class MockAccumulo {
}
MockNamespace n = namespaces.get(namespace);
- MockTable t = new MockTable(n, timeType, Integer.toString(tableIdCounter.incrementAndGet()),
- props);
+ MockTable t =
+ new MockTable(n, timeType, Integer.toString(tableIdCounter.incrementAndGet()), props);
t.userPermissions.put(username, EnumSet.allOf(TablePermission.class));
t.setNamespaceName(namespace);
t.setNamespace(n);
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mock/MockScannerBase.java b/core/src/main/java/org/apache/accumulo/core/client/mock/MockScannerBase.java
index 72bc6fe..653a384 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mock/MockScannerBase.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/MockScannerBase.java
@@ -135,13 +135,13 @@ public class MockScannerBase extends ScannerOptions {
throws IOException {
byte[] defaultLabels = {};
inner = new ColumnFamilySkippingIterator(new DeletingIterator(inner, false));
- SortedKeyValueIterator<Key,Value> cqf = ColumnQualifierFilter.wrap(inner,
- new HashSet<>(fetchedColumns));
+ SortedKeyValueIterator<Key,Value> cqf =
+ ColumnQualifierFilter.wrap(inner, new HashSet<>(fetchedColumns));
SortedKeyValueIterator<Key,Value> vf = VisibilityFilter.wrap(cqf, auths, defaultLabels);
AccumuloConfiguration conf = new MockConfiguration(table.settings);
MockIteratorEnvironment iterEnv = new MockIteratorEnvironment(auths);
- SortedKeyValueIterator<Key,Value> result = iterEnv
- .getTopLevelIterator(IteratorUtil.loadIterators(IteratorScope.scan, vf, null, conf,
+ SortedKeyValueIterator<Key,Value> result =
+ iterEnv.getTopLevelIterator(IteratorUtil.loadIterators(IteratorScope.scan, vf, null, conf,
serverSideIteratorList, serverSideIteratorOptions, iterEnv, false));
return result;
}
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java b/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
index a996c1a..d76d29c 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
@@ -222,8 +222,8 @@ class MockTableOperations extends TableOperationsHelper {
throw new TableNotFoundException(null, tableName, null);
}
- Set<Entry<String,String>> props = new HashSet<>(
- acu.namespaces.get(namespace).settings.entrySet());
+ Set<Entry<String,String>> props =
+ new HashSet<>(acu.namespaces.get(namespace).settings.entrySet());
Set<Entry<String,String>> tableProps = acu.tables.get(tableName).settings.entrySet();
for (Entry<String,String> e : tableProps) {
diff --git a/core/src/main/java/org/apache/accumulo/core/client/rfile/RFileScanner.java b/core/src/main/java/org/apache/accumulo/core/client/rfile/RFileScanner.java
index 9320fc0..01d571d 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/rfile/RFileScanner.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/rfile/RFileScanner.java
@@ -295,8 +295,8 @@ class RFileScanner extends ScannerOptions implements Scanner {
if (opts.useSystemIterators) {
SortedSet<Column> cols = this.getFetchedColumns();
families = LocalityGroupUtil.families(cols);
- iterator = IteratorUtil.setupSystemScanIterators(iterator, cols, getAuthorizations(),
- EMPTY_BYTES);
+ iterator =
+ IteratorUtil.setupSystemScanIterators(iterator, cols, getAuthorizations(), EMPTY_BYTES);
}
try {
diff --git a/core/src/main/java/org/apache/accumulo/core/client/sample/RowColumnSampler.java b/core/src/main/java/org/apache/accumulo/core/client/sample/RowColumnSampler.java
index 82cd577..ebd0c51 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/sample/RowColumnSampler.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/sample/RowColumnSampler.java
@@ -69,8 +69,8 @@ public class RowColumnSampler extends AbstractHashSampler {
private boolean qualifier = true;
private boolean visibility = true;
- private static final Set<String> VALID_OPTIONS = ImmutableSet.of("row", "family", "qualifier",
- "visibility");
+ private static final Set<String> VALID_OPTIONS =
+ ImmutableSet.of("row", "family", "qualifier", "visibility");
private boolean hashField(SamplerConfiguration config, String field) {
String optValue = config.getOptions().get(field);
diff --git a/core/src/main/java/org/apache/accumulo/core/client/security/tokens/AuthenticationToken.java b/core/src/main/java/org/apache/accumulo/core/client/security/tokens/AuthenticationToken.java
index 0d1deef..732d06f 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/security/tokens/AuthenticationToken.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/security/tokens/AuthenticationToken.java
@@ -97,7 +97,7 @@ public interface AuthenticationToken extends Writable, Destroyable, Cloneable {
try {
@SuppressWarnings("unchecked")
Class<? extends AuthenticationToken> tmpTokenType =
- (Class<? extends AuthenticationToken>) Class.forName(tokenClassName);
+ (Class<? extends AuthenticationToken>) Class.forName(tokenClassName);
tokenType = tmpTokenType;
} catch (ClassNotFoundException e) {
throw new IllegalArgumentException("Class not available " + tokenClassName, e);
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/CredentialProviderFactoryShim.java b/core/src/main/java/org/apache/accumulo/core/conf/CredentialProviderFactoryShim.java
index df4343e..a498416 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/CredentialProviderFactoryShim.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/CredentialProviderFactoryShim.java
@@ -43,21 +43,21 @@ public class CredentialProviderFactoryShim {
private static final Logger log = LoggerFactory.getLogger(CredentialProviderFactoryShim.class);
public static final String HADOOP_CRED_PROVIDER_FACTORY_CLASS_NAME =
- "org.apache.hadoop.security.alias.JavaKeyStoreProvider$Factory";
+ "org.apache.hadoop.security.alias.JavaKeyStoreProvider$Factory";
public static final String HADOOP_CRED_PROVIDER_FACTORY_GET_PROVIDERS_METHOD_NAME =
- "getProviders";
+ "getProviders";
public static final String HADOOP_CRED_PROVIDER_CLASS_NAME =
- "org.apache.hadoop.security.alias.CredentialProvider";
+ "org.apache.hadoop.security.alias.CredentialProvider";
public static final String HADOOP_CRED_PROVIDER_GET_CREDENTIAL_ENTRY_METHOD_NAME =
- "getCredentialEntry";
+ "getCredentialEntry";
public static final String HADOOP_CRED_PROVIDER_GET_ALIASES_METHOD_NAME = "getAliases";
public static final String HADOOP_CRED_PROVIDER_CREATE_CREDENTIAL_ENTRY_METHOD_NAME =
- "createCredentialEntry";
+ "createCredentialEntry";
public static final String HADOOP_CRED_PROVIDER_FLUSH_METHOD_NAME = "flush";
public static final String HADOOP_CRED_ENTRY_CLASS_NAME =
- "org.apache.hadoop.security.alias.CredentialProvider$CredentialEntry";
+ "org.apache.hadoop.security.alias.CredentialProvider$CredentialEntry";
public static final String HADOOP_CRED_ENTRY_GET_CREDENTIAL_METHOD_NAME = "getCredential";
public static final String CREDENTIAL_PROVIDER_PATH = "hadoop.security.credential.provider.path";
@@ -73,7 +73,8 @@ public class CredentialProviderFactoryShim {
// access to cachedProviders should be synchronized when necessary (for example see
// getCredentialProviders)
- private static final ConcurrentHashMap<String,List<Object>> cachedProviders = new ConcurrentHashMap<>();
+ private static final ConcurrentHashMap<String,List<Object>> cachedProviders =
+ new ConcurrentHashMap<>();
/**
* Determine if we can load the necessary CredentialProvider classes. Only loaded the first time,
@@ -159,8 +160,8 @@ public class CredentialProviderFactoryShim {
// Load Hadoop CredentialProvider.getAliases()
try {
- getAliasesMethod = hadoopCredProviderClz
- .getMethod(HADOOP_CRED_PROVIDER_GET_ALIASES_METHOD_NAME);
+ getAliasesMethod =
+ hadoopCredProviderClz.getMethod(HADOOP_CRED_PROVIDER_GET_ALIASES_METHOD_NAME);
} catch (SecurityException e) {
log.trace("Could not find {} method on {}", HADOOP_CRED_PROVIDER_GET_ALIASES_METHOD_NAME,
HADOOP_CRED_PROVIDER_CLASS_NAME, e);
@@ -211,8 +212,8 @@ public class CredentialProviderFactoryShim {
// Load Hadoop CredentialEntry.getCredential()
try {
- getCredentialMethod = hadoopCredentialEntryClz
- .getMethod(HADOOP_CRED_ENTRY_GET_CREDENTIAL_METHOD_NAME);
+ getCredentialMethod =
+ hadoopCredentialEntryClz.getMethod(HADOOP_CRED_ENTRY_GET_CREDENTIAL_METHOD_NAME);
} catch (SecurityException e) {
log.trace("Could not find {} method on {}", HADOOP_CRED_ENTRY_GET_CREDENTIAL_METHOD_NAME,
HADOOP_CRED_ENTRY_CLASS_NAME, e);
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/ObservableConfiguration.java b/core/src/main/java/org/apache/accumulo/core/conf/ObservableConfiguration.java
index f93d498..9201bd2 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/ObservableConfiguration.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/ObservableConfiguration.java
@@ -74,8 +74,8 @@ public abstract class ObservableConfiguration extends AccumuloConfiguration {
return snapshot(observers);
}
- private static Collection<ConfigurationObserver> snapshot(
- Collection<ConfigurationObserver> observers) {
+ private static Collection<ConfigurationObserver>
+ snapshot(Collection<ConfigurationObserver> observers) {
Collection<ConfigurationObserver> c = new java.util.ArrayList<>();
synchronized (observers) {
c.addAll(observers);
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/Property.java b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
index ede2b8a..7cca3c8 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/Property.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
@@ -1045,14 +1045,14 @@ public enum Property {
}
private void precomputeAnnotations() {
- isSensitive = hasAnnotation(Sensitive.class)
- || hasPrefixWithAnnotation(getKey(), Sensitive.class);
- isDeprecated = hasAnnotation(Deprecated.class)
- || hasPrefixWithAnnotation(getKey(), Deprecated.class);
- isExperimental = hasAnnotation(Experimental.class)
- || hasPrefixWithAnnotation(getKey(), Experimental.class);
- isInterpolated = hasAnnotation(Interpolated.class)
- || hasPrefixWithAnnotation(getKey(), Interpolated.class);
+ isSensitive =
+ hasAnnotation(Sensitive.class) || hasPrefixWithAnnotation(getKey(), Sensitive.class);
+ isDeprecated =
+ hasAnnotation(Deprecated.class) || hasPrefixWithAnnotation(getKey(), Deprecated.class);
+ isExperimental =
+ hasAnnotation(Experimental.class) || hasPrefixWithAnnotation(getKey(), Experimental.class);
+ isInterpolated =
+ hasAnnotation(Interpolated.class) || hasPrefixWithAnnotation(getKey(), Interpolated.class);
annotationsComputed = true;
}
@@ -1159,18 +1159,18 @@ public enum Property {
* Properties we check the value of within the TabletServer request handling or maintenance
* processing loops.
*/
- public static final EnumSet<Property> HOT_PATH_PROPERTIES = EnumSet.of(
- Property.TSERV_CLIENT_TIMEOUT, Property.TSERV_TOTAL_MUTATION_QUEUE_MAX,
- Property.TSERV_ARCHIVE_WALOGS, Property.GC_TRASH_IGNORE, Property.TSERV_MAJC_DELAY,
- Property.TABLE_MINC_LOGS_MAX, Property.TSERV_MAJC_MAXCONCURRENT,
- Property.REPLICATION_WORKER_THREADS, Property.TABLE_DURABILITY, Property.INSTANCE_ZK_TIMEOUT,
- Property.TABLE_CLASSPATH, Property.MASTER_METADATA_SUSPENDABLE,
- Property.TABLE_FAILURES_IGNORE, Property.TABLE_SCAN_MAXMEM,
- Property.TSERV_SLOW_FILEPERMIT_MILLIS);
-
- private static final EnumSet<Property> fixedProperties = EnumSet.of(Property.TSERV_CLIENTPORT,
- Property.TSERV_NATIVEMAP_ENABLED, Property.TSERV_SCAN_MAX_OPENFILES,
- Property.MASTER_CLIENTPORT, Property.GC_PORT);
+ public static final EnumSet<Property> HOT_PATH_PROPERTIES =
+ EnumSet.of(Property.TSERV_CLIENT_TIMEOUT, Property.TSERV_TOTAL_MUTATION_QUEUE_MAX,
+ Property.TSERV_ARCHIVE_WALOGS, Property.GC_TRASH_IGNORE, Property.TSERV_MAJC_DELAY,
+ Property.TABLE_MINC_LOGS_MAX, Property.TSERV_MAJC_MAXCONCURRENT,
+ Property.REPLICATION_WORKER_THREADS, Property.TABLE_DURABILITY,
+ Property.INSTANCE_ZK_TIMEOUT, Property.TABLE_CLASSPATH,
+ Property.MASTER_METADATA_SUSPENDABLE, Property.TABLE_FAILURES_IGNORE,
+ Property.TABLE_SCAN_MAXMEM, Property.TSERV_SLOW_FILEPERMIT_MILLIS);
+
+ private static final EnumSet<Property> fixedProperties =
+ EnumSet.of(Property.TSERV_CLIENTPORT, Property.TSERV_NATIVEMAP_ENABLED,
+ Property.TSERV_SCAN_MAX_OPENFILES, Property.MASTER_CLIENTPORT, Property.GC_PORT);
/**
* Checks if the given property may be changed via Zookeeper, but not recognized until the restart
@@ -1219,10 +1219,12 @@ public enum Property {
* @return true if this is property is a class property
*/
public static boolean isClassProperty(String key) {
- return (key.startsWith(Property.TABLE_CONSTRAINT_PREFIX.getKey()) && key
- .substring(Property.TABLE_CONSTRAINT_PREFIX.getKey().length()).split("\\.").length == 1)
- || (key.startsWith(Property.TABLE_ITERATOR_PREFIX.getKey()) && key
- .substring(Property.TABLE_ITERATOR_PREFIX.getKey().length()).split("\\.").length == 2)
+ return (key.startsWith(Property.TABLE_CONSTRAINT_PREFIX.getKey())
+ && key.substring(Property.TABLE_CONSTRAINT_PREFIX.getKey().length()).split("\\.").length
+ == 1)
+ || (key.startsWith(Property.TABLE_ITERATOR_PREFIX.getKey())
+ && key.substring(Property.TABLE_ITERATOR_PREFIX.getKey().length()).split("\\.").length
+ == 2)
|| key.equals(Property.TABLE_LOAD_BALANCER.getKey());
}
@@ -1311,8 +1313,8 @@ public enum Property {
* from each key
*/
public static Map<String,String> getCompactionStrategyOptions(AccumuloConfiguration tableConf) {
- Map<String,String> longNames = tableConf
- .getAllPropertiesWithPrefix(Property.TABLE_COMPACTION_STRATEGY_PREFIX);
+ Map<String,String> longNames =
+ tableConf.getAllPropertiesWithPrefix(Property.TABLE_COMPACTION_STRATEGY_PREFIX);
Map<String,String> result = new HashMap<>();
for (Entry<String,String> entry : longNames.entrySet()) {
result.put(
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/PropertyType.java b/core/src/main/java/org/apache/accumulo/core/conf/PropertyType.java
index 0fc500a..a3f0eba 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/PropertyType.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/PropertyType.java
@@ -38,7 +38,7 @@ import com.google.common.collect.Collections2;
* valid values match. All of these fields are optional.
*/
public enum PropertyType {
- PREFIX(null, Predicates.<String> alwaysFalse(), null),
+ PREFIX(null, Predicates.<String>alwaysFalse(), null),
TIMEDURATION("duration", boundedUnits(0, Long.MAX_VALUE, true, "", "ms", "s", "m", "h", "d"),
"A non-negative integer optionally followed by a unit of time (whitespace"
@@ -87,7 +87,7 @@ public enum PropertyType {
+ " '5%', '0.2%', '0.0005'.\n"
+ "Examples of invalid fractions/percentages are '', '10 percent'," + " 'Hulk Hogan'"),
- PATH("path", Predicates.<String> alwaysTrue(),
+ PATH("path", Predicates.<String>alwaysTrue(),
"A string that represents a filesystem path, which can be either relative"
+ " or absolute to some directory. The filesystem depends on the property."
+ " The following environment variables will be substituted: "
@@ -112,14 +112,14 @@ public enum PropertyType {
DURABILITY("durability", in(true, null, "none", "log", "flush", "sync"),
"One of 'none', 'log', 'flush' or 'sync'."),
- STRING("string", Predicates.<String> alwaysTrue(),
+ STRING("string", Predicates.<String>alwaysTrue(),
"An arbitrary string of characters whose format is unspecified and"
+ " interpreted based on the context of the property to which it applies."),
BOOLEAN("boolean", in(false, null, "true", "false"),
"Has a value of either 'true' or 'false' (case-insensitive)"),
- URI("uri", Predicates.<String> alwaysTrue(), "A valid URI");
+ URI("uri", Predicates.<String>alwaysTrue(), "A valid URI");
private String shortname, format;
private Predicate<String> predicate;
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java b/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java
index 14c5183..9ed8f81 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java
@@ -110,8 +110,8 @@ public class SiteConfiguration extends AccumuloConfiguration {
if (null != hadoopConf) {
// Try to find the sensitive value from the CredentialProvider
try {
- char[] value = CredentialProviderFactoryShim.getValueFromCredentialProvider(hadoopConf,
- key);
+ char[] value =
+ CredentialProviderFactoryShim.getValueFromCredentialProvider(hadoopConf, key);
if (null != value) {
return new String(value);
}
@@ -126,8 +126,8 @@ public class SiteConfiguration extends AccumuloConfiguration {
* Check the available-on-load configs and fall-back to the possibly-update Configuration
* object.
*/
- String value = staticConfigs.containsKey(key) ? staticConfigs.get(key)
- : getXmlConfig().get(key);
+ String value =
+ staticConfigs.containsKey(key) ? staticConfigs.get(key) : getXmlConfig().get(key);
if (value == null || !property.getType().isValidFormat(value)) {
if (value != null)
@@ -156,8 +156,8 @@ public class SiteConfiguration extends AccumuloConfiguration {
}
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));
}
diff --git a/core/src/main/java/org/apache/accumulo/core/data/Key.java b/core/src/main/java/org/apache/accumulo/core/data/Key.java
index 4615904..668673d 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/Key.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/Key.java
@@ -867,8 +867,8 @@ public class Key implements WritableComparable<Key>, Cloneable {
*/
public int compareTo(Key other, PartialKey part) {
// check for matching row
- int result = WritableComparator.compareBytes(row, 0, row.length, other.row, 0,
- other.row.length);
+ int result =
+ WritableComparator.compareBytes(row, 0, row.length, other.row, 0, other.row.length);
if (result != 0 || part.equals(PartialKey.ROW))
return result;
diff --git a/core/src/main/java/org/apache/accumulo/core/data/KeyExtent.java b/core/src/main/java/org/apache/accumulo/core/data/KeyExtent.java
index 5028ece..05228ae 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/KeyExtent.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/KeyExtent.java
@@ -52,8 +52,8 @@ public class KeyExtent implements WritableComparable<KeyExtent> {
}
public KeyExtent(Text table, Text endRow, Text prevEndRow) {
- this.wrapped = new org.apache.accumulo.core.data.impl.KeyExtent(table.toString(), endRow,
- prevEndRow);
+ this.wrapped =
+ new org.apache.accumulo.core.data.impl.KeyExtent(table.toString(), endRow, prevEndRow);
}
public KeyExtent(KeyExtent extent) {
@@ -182,8 +182,8 @@ public class KeyExtent implements WritableComparable<KeyExtent> {
return wrapped.isRootTablet();
}
- private static SortedSet<org.apache.accumulo.core.data.impl.KeyExtent> unwrap(
- Set<KeyExtent> tablets) {
+ private static SortedSet<org.apache.accumulo.core.data.impl.KeyExtent>
+ unwrap(Set<KeyExtent> tablets) {
SortedSet<org.apache.accumulo.core.data.impl.KeyExtent> trans = new TreeSet<>();
for (KeyExtent wrapper : tablets) {
trans.add(wrapper.wrapped);
@@ -196,8 +196,8 @@ public class KeyExtent implements WritableComparable<KeyExtent> {
return new KeyExtent(new Text(ke.getTableId()), ke.getEndRow(), ke.getPrevEndRow());
}
- private static SortedSet<KeyExtent> wrap(
- Collection<org.apache.accumulo.core.data.impl.KeyExtent> unwrapped) {
+ private static SortedSet<KeyExtent>
+ wrap(Collection<org.apache.accumulo.core.data.impl.KeyExtent> unwrapped) {
SortedSet<KeyExtent> wrapped = new TreeSet<>();
for (org.apache.accumulo.core.data.impl.KeyExtent wrappee : unwrapped) {
wrapped.add(wrap(wrappee));
diff --git a/core/src/main/java/org/apache/accumulo/core/data/Mutation.java b/core/src/main/java/org/apache/accumulo/core/data/Mutation.java
index 338444d..6f90adb 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/Mutation.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/Mutation.java
@@ -1220,8 +1220,8 @@ public class Mutation implements Writable {
this.serialize();
}
ByteBuffer data = serializedSnapshot();
- TMutation tmutation = new TMutation(ByteBuffer.wrap(row), data,
- ByteBufferUtil.toByteBuffers(values), entries);
+ TMutation tmutation =
+ new TMutation(ByteBuffer.wrap(row), data, ByteBufferUtil.toByteBuffers(values), entries);
if (!this.replicationSources.isEmpty()) {
tmutation.setSources(new ArrayList<>(replicationSources));
}
diff --git a/core/src/main/java/org/apache/accumulo/core/data/impl/KeyExtent.java b/core/src/main/java/org/apache/accumulo/core/data/impl/KeyExtent.java
index 4f84ad1..9b0c333 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/impl/KeyExtent.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/impl/KeyExtent.java
@@ -542,8 +542,8 @@ public class KeyExtent implements WritableComparable<KeyExtent> {
"< must come at end of Metadata row " + flattenedExtent);
}
- String tableId = new String(flattenedExtent.getBytes(), 0, flattenedExtent.getLength() - 1,
- UTF_8);
+ String tableId =
+ new String(flattenedExtent.getBytes(), 0, flattenedExtent.getLength() - 1, UTF_8);
this.setTableId(tableId);
this.setEndRow(null, false, false);
} else {
diff --git a/core/src/main/java/org/apache/accumulo/core/data/impl/TabletIdImpl.java b/core/src/main/java/org/apache/accumulo/core/data/impl/TabletIdImpl.java
index 04992db..617f91b 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/impl/TabletIdImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/impl/TabletIdImpl.java
@@ -29,27 +29,27 @@ public class TabletIdImpl implements TabletId {
@SuppressWarnings("deprecation")
public static final Function<org.apache.accumulo.core.data.KeyExtent,TabletId> KE_2_TID_OLD =
- new Function<org.apache.accumulo.core.data.KeyExtent,TabletId>() {
- @Override
- public TabletId apply(org.apache.accumulo.core.data.KeyExtent input) {
- // Ensure parameter isn't null; see also:
- // http://sourceforge.net/p/findbugs/bugs/1139/
- // https://code.google.com/p/guava-libraries/issues/detail?id=920
- return input == null ? null : new TabletIdImpl(input);
- }
- };
+ new Function<org.apache.accumulo.core.data.KeyExtent,TabletId>() {
+ @Override
+ public TabletId apply(org.apache.accumulo.core.data.KeyExtent input) {
+ // Ensure parameter isn't null; see also:
+ // http://sourceforge.net/p/findbugs/bugs/1139/
+ // https://code.google.com/p/guava-libraries/issues/detail?id=920
+ return input == null ? null : new TabletIdImpl(input);
+ }
+ };
@SuppressWarnings("deprecation")
public static final Function<TabletId,org.apache.accumulo.core.data.KeyExtent> TID_2_KE_OLD =
- new Function<TabletId,org.apache.accumulo.core.data.KeyExtent>() {
- @Override
- public org.apache.accumulo.core.data.KeyExtent apply(TabletId input) {
- if (input == null)
- return null;
- return new org.apache.accumulo.core.data.KeyExtent(input.getTableId(), input.getEndRow(),
- input.getPrevEndRow());
- }
- };
+ new Function<TabletId,org.apache.accumulo.core.data.KeyExtent>() {
+ @Override
+ public org.apache.accumulo.core.data.KeyExtent apply(TabletId input) {
+ if (input == null)
+ return null;
+ return new org.apache.accumulo.core.data.KeyExtent(input.getTableId(), input.getEndRow(),
+ input.getPrevEndRow());
+ }
+ };
@Deprecated
public TabletIdImpl(org.apache.accumulo.core.data.KeyExtent ke) {
diff --git a/core/src/main/java/org/apache/accumulo/core/file/BloomFilterLayer.java b/core/src/main/java/org/apache/accumulo/core/file/BloomFilterLayer.java
index e244c5a..12788d6 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/BloomFilterLayer.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/BloomFilterLayer.java
@@ -394,8 +394,8 @@ public class BloomFilterLayer {
}
@Override
- public SortedKeyValueIterator<org.apache.accumulo.core.data.Key,Value> deepCopy(
- IteratorEnvironment env) {
+ public SortedKeyValueIterator<org.apache.accumulo.core.data.Key,Value>
+ deepCopy(IteratorEnvironment env) {
return new BloomFilterLayer.Reader((FileSKVIterator) reader.deepCopy(env), bfl);
}
@@ -457,8 +457,8 @@ public class BloomFilterLayer {
ArrayList<Integer> vals = new ArrayList<>(valsSet);
Collections.sort(vals);
- ConfigurationCopy acuconf = new ConfigurationCopy(
- AccumuloConfiguration.getDefaultConfiguration());
+ ConfigurationCopy acuconf =
+ new ConfigurationCopy(AccumuloConfiguration.getDefaultConfiguration());
acuconf.set(Property.TABLE_BLOOM_ENABLED, "true");
acuconf.set(Property.TABLE_BLOOM_KEY_FUNCTOR,
"accumulo.core.file.keyfunctor.ColumnFamilyFunctor");
@@ -505,8 +505,8 @@ public class BloomFilterLayer {
int row = r.nextInt(Integer.MAX_VALUE);
String fi = String.format("%010d", row);
// bmfr.seek(new Range(new Text("r"+fi)));
- org.apache.accumulo.core.data.Key k1 = new org.apache.accumulo.core.data.Key(
- new Text("r" + fi), new Text("cf1"));
+ org.apache.accumulo.core.data.Key k1 =
+ new org.apache.accumulo.core.data.Key(new Text("r" + fi), new Text("cf1"));
bmfr.seek(new Range(k1, true, k1.followingKey(PartialKey.ROW_COLFAM), false),
new ArrayList<ByteSequence>(), false);
if (valsSet.contains(row)) {
@@ -530,8 +530,8 @@ public class BloomFilterLayer {
String fi = String.format("%010d", row);
// bmfr.seek(new Range(new Text("r"+fi)));
- org.apache.accumulo.core.data.Key k1 = new org.apache.accumulo.core.data.Key(
- new Text("r" + fi), new Text("cf1"));
+ org.apache.accumulo.core.data.Key k1 =
+ new org.apache.accumulo.core.data.Key(new Text("r" + fi), new Text("cf1"));
bmfr.seek(new Range(k1, true, k1.followingKey(PartialKey.ROW_COLFAM), false),
new ArrayList<ByteSequence>(), false);
diff --git a/core/src/main/java/org/apache/accumulo/core/file/FileOperations.java b/core/src/main/java/org/apache/accumulo/core/file/FileOperations.java
index 6a9886b..233a525 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/FileOperations.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/FileOperations.java
@@ -38,8 +38,8 @@ import com.google.common.cache.Cache;
public abstract class FileOperations {
- private static final HashSet<String> validExtensions = new HashSet<>(
- Arrays.asList(Constants.MAPFILE_EXTENSION, RFile.EXTENSION));
+ private static final HashSet<String> validExtensions =
+ new HashSet<>(Arrays.asList(Constants.MAPFILE_EXTENSION, RFile.EXTENSION));
public static Set<String> getValidExtensions() {
return validExtensions;
@@ -139,8 +139,8 @@ public abstract class FileOperations {
*/
@SuppressWarnings("unchecked")
public NeedsFile<NeedsRange<OpenScanReaderOperationBuilder>> newScanReaderBuilder() {
- return (NeedsFile<NeedsRange<OpenScanReaderOperationBuilder>>)
- (NeedsFile<?>) new OpenScanReaderOperation();
+ return (NeedsFile<
+ NeedsRange<OpenScanReaderOperationBuilder>>) (NeedsFile<?>) new OpenScanReaderOperation();
}
/**
@@ -176,8 +176,8 @@ public abstract class FileOperations {
/**
* Options common to all FileOperations.
*/
- protected static class
- FileAccessOperation<SubclassType extends FileAccessOperation<SubclassType>> {
+ protected static class FileAccessOperation<
+ SubclassType extends FileAccessOperation<SubclassType>> {
private AccumuloConfiguration tableConfiguration;
private String filename;
diff --git a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/CachedBlock.java b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/CachedBlock.java
index 5cd9ee9..4b0f13c 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/CachedBlock.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/CachedBlock.java
@@ -29,8 +29,8 @@ import java.util.Objects;
*/
public class CachedBlock implements HeapSize, Comparable<CachedBlock>, CacheEntry {
- public final static long PER_BLOCK_OVERHEAD = ClassSize
- .align(ClassSize.OBJECT + (3 * ClassSize.REFERENCE) + (2 * SizeConstants.SIZEOF_LONG)
+ public final static long PER_BLOCK_OVERHEAD =
+ ClassSize.align(ClassSize.OBJECT + (3 * ClassSize.REFERENCE) + (2 * SizeConstants.SIZEOF_LONG)
+ ClassSize.STRING + ClassSize.BYTE_BUFFER);
static enum BlockPriority {
@@ -59,8 +59,8 @@ public class CachedBlock implements HeapSize, Comparable<CachedBlock>, CacheEntr
this.blockName = blockName;
this.buf = buf;
this.accessTime = accessTime;
- this.size = ClassSize.align(blockName.length()) + ClassSize.align(buf.length)
- + PER_BLOCK_OVERHEAD;
+ this.size =
+ ClassSize.align(blockName.length()) + ClassSize.align(buf.length) + PER_BLOCK_OVERHEAD;
if (inMemory) {
this.priority = BlockPriority.MEMORY;
} else {
diff --git a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/ClassSize.java b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/ClassSize.java
index 602357f..bfd50d6 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/ClassSize.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/ClassSize.java
@@ -125,8 +125,8 @@ public class ClassSize {
CONCURRENT_HASHMAP = align((2 * SizeConstants.SIZEOF_INT) + ARRAY + (6 * REFERENCE) + OBJECT);
- CONCURRENT_HASHMAP_ENTRY = align(
- REFERENCE + OBJECT + (3 * REFERENCE) + (2 * SizeConstants.SIZEOF_INT));
+ CONCURRENT_HASHMAP_ENTRY =
+ align(REFERENCE + OBJECT + (3 * REFERENCE) + (2 * SizeConstants.SIZEOF_INT));
CONCURRENT_HASHMAP_SEGMENT = align(
REFERENCE + OBJECT + (3 * SizeConstants.SIZEOF_INT) + SizeConstants.SIZEOF_FLOAT + ARRAY);
diff --git a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/LruBlockCache.java b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/LruBlockCache.java
index b8a29ac..610c16a 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/LruBlockCache.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/LruBlockCache.java
@@ -104,8 +104,8 @@ public class LruBlockCache implements BlockCache, HeapSize {
private final EvictionThread evictionThread;
/** Statistics thread schedule pool (for heavy debugging, could remove) */
- private final ScheduledExecutorService scheduleThreadPool = Executors.newScheduledThreadPool(1,
- new NamingThreadFactory("LRUBlockCacheStats"));
+ private final ScheduledExecutorService scheduleThreadPool =
+ Executors.newScheduledThreadPool(1, new NamingThreadFactory("LRUBlockCacheStats"));
/** Current size of cache */
private final AtomicLong size;
@@ -687,8 +687,8 @@ public class LruBlockCache implements BlockCache, HeapSize {
}
}
- public final static long CACHE_FIXED_OVERHEAD = ClassSize
- .align((3 * SizeConstants.SIZEOF_LONG) + (8 * ClassSize.REFERENCE)
+ public final static long CACHE_FIXED_OVERHEAD =
+ ClassSize.align((3 * SizeConstants.SIZEOF_LONG) + (8 * ClassSize.REFERENCE)
+ (5 * SizeConstants.SIZEOF_FLOAT) + SizeConstants.SIZEOF_BOOLEAN + ClassSize.OBJECT);
// HeapSize implementation
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
index 64b3501..d2c9c84 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/CreateEmpty.java
@@ -82,10 +82,10 @@ public class CreateEmpty {
for (String arg : opts.files) {
Path path = new Path(arg);
log.info("Writing to file '" + path + "'");
- FileSKVWriter writer = (new RFileOperations()).newWriterBuilder()
- .forFile(arg, path.getFileSystem(conf), conf)
- .withTableConfiguration(DefaultConfiguration.getDefaultConfiguration())
- .withCompression(opts.codec).build();
+ FileSKVWriter writer =
+ (new RFileOperations()).newWriterBuilder().forFile(arg, path.getFileSystem(conf), conf)
+ .withTableConfiguration(DefaultConfiguration.getDefaultConfiguration())
+ .withCompression(opts.codec).build();
writer.close();
}
}
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/KeyShortener.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/KeyShortener.java
index 590659d..d3868e5 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/KeyShortener.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/KeyShortener.java
@@ -123,16 +123,16 @@ public class KeyShortener {
}
return sanityCheck(prev, current, new Key(shortenedRow.toArray(), EMPTY, EMPTY, EMPTY, 0));
} else if (prev.getColumnFamilyData().compareTo(current.getColumnFamilyData()) < 0) {
- ByteSequence shortenedFam = shorten(prev.getColumnFamilyData(),
- current.getColumnFamilyData());
+ ByteSequence shortenedFam =
+ shorten(prev.getColumnFamilyData(), current.getColumnFamilyData());
if (shortenedFam == null) {
return prev;
}
return sanityCheck(prev, current,
new Key(prev.getRowData().toArray(), shortenedFam.toArray(), EMPTY, EMPTY, 0));
} else if (prev.getColumnQualifierData().compareTo(current.getColumnQualifierData()) < 0) {
- ByteSequence shortenedQual = shorten(prev.getColumnQualifierData(),
- current.getColumnQualifierData());
+ ByteSequence shortenedQual =
+ shorten(prev.getColumnQualifierData(), current.getColumnQualifierData());
if (shortenedQual == null) {
return prev;
}
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/MultiLevelIndex.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/MultiLevelIndex.java
index 77bb39a..3b33fdb 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/MultiLevelIndex.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/MultiLevelIndex.java
@@ -810,8 +810,8 @@ public class MultiLevelIndex {
private IndexBlock getIndexBlock(IndexEntry ie) throws IOException {
IndexBlock iblock = new IndexBlock();
- ABlockReader in = blockStore.getMetaBlock(ie.getOffset(), ie.getCompressedSize(),
- ie.getRawSize());
+ ABlockReader in =
+ blockStore.getMetaBlock(ie.getOffset(), ie.getCompressedSize(), ie.getRawSize());
iblock.readFields(in, version);
in.close();
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java
index 94a9330..eaa2d12 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java
@@ -155,8 +155,8 @@ public class PrintInfo implements KeywordExecutable {
System.out.println(
"Reading file: " + path.makeQualified(fs.getUri(), fs.getWorkingDirectory()).toString());
- CachableBlockFile.Reader _rdr = new CachableBlockFile.Reader(fs, path, conf, null, null,
- SiteConfiguration.getInstance());
+ CachableBlockFile.Reader _rdr =
+ new CachableBlockFile.Reader(fs, path, conf, null, null, SiteConfiguration.getInstance());
Reader iter = new RFile.Reader(_rdr);
MetricsGatherer<Map<String,ArrayList<VisibilityMetric>>> vmg = new VisMetricsGatherer();
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/RFile.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/RFile.java
index 14c7018..9f1f793 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/RFile.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/RFile.java
@@ -170,8 +170,8 @@ public class RFile {
columnFamilies = new HashMap<>();
previousColumnFamilies = pcf;
- indexWriter = new MultiLevelIndex.BufferedWriter(
- new MultiLevelIndex.Writer(bfw, indexBlockSize));
+ indexWriter =
+ new MultiLevelIndex.BufferedWriter(new MultiLevelIndex.Writer(bfw, indexBlockSize));
}
public LocalityGroupMetadata(String name, Set<ByteSequence> cfset, int indexBlockSize,
@@ -183,8 +183,8 @@ public class RFile {
columnFamilies.put(cf, new MutableLong(0));
}
- indexWriter = new MultiLevelIndex.BufferedWriter(
- new MultiLevelIndex.Writer(bfw, indexBlockSize));
+ indexWriter =
+ new MultiLevelIndex.BufferedWriter(new MultiLevelIndex.Writer(bfw, indexBlockSize));
}
private Key getFirstKey() {
@@ -681,10 +681,10 @@ public class RFile {
if (columnFamilies == null) {
startedDefaultLocalityGroup = true;
- currentLocalityGroup = new LocalityGroupMetadata(previousColumnFamilies, indexBlockSize,
- fileWriter);
- sampleLocalityGroup = new LocalityGroupMetadata(previousColumnFamilies, indexBlockSize,
- fileWriter);
+ currentLocalityGroup =
+ new LocalityGroupMetadata(previousColumnFamilies, indexBlockSize, fileWriter);
+ sampleLocalityGroup =
+ new LocalityGroupMetadata(previousColumnFamilies, indexBlockSize, fileWriter);
} else {
if (!Collections.disjoint(columnFamilies, previousColumnFamilies)) {
HashSet<ByteSequence> overlap = new HashSet<>(columnFamilies);
@@ -692,10 +692,10 @@ public class RFile {
throw new IllegalArgumentException(
"Column families over lap with previous locality group : " + overlap);
}
- currentLocalityGroup = new LocalityGroupMetadata(name, columnFamilies, indexBlockSize,
- fileWriter);
- sampleLocalityGroup = new LocalityGroupMetadata(name, columnFamilies, indexBlockSize,
- fileWriter);
+ currentLocalityGroup =
+ new LocalityGroupMetadata(name, columnFamilies, indexBlockSize, fileWriter);
+ sampleLocalityGroup =
+ new LocalityGroupMetadata(name, columnFamilies, indexBlockSize, fileWriter);
previousColumnFamilies.addAll(columnFamilies);
}
@@ -955,8 +955,8 @@ public class RFile {
// and speed up others.
MutableByteSequence valbs = new MutableByteSequence(new byte[64], 0, 0);
- SkippR skippr = RelativeKey.fastSkip(currBlock, startKey, valbs, prevKey, getTopKey(),
- entriesLeft);
+ SkippR skippr =
+ RelativeKey.fastSkip(currBlock, startKey, valbs, prevKey, getTopKey(), entriesLeft);
if (skippr.skipped > 0) {
entriesLeft -= skippr.skipped;
val = new Value(valbs.toArray());
@@ -1043,8 +1043,8 @@ public class RFile {
}
}
- SkippR skippr = RelativeKey.fastSkip(currBlock, startKey, valbs, prevKey, currKey,
- entriesLeft);
+ SkippR skippr =
+ RelativeKey.fastSkip(currBlock, startKey, valbs, prevKey, currKey, entriesLeft);
prevKey = skippr.prevKey;
entriesLeft -= skippr.skipped;
val = new Value(valbs.toArray());
@@ -1422,8 +1422,8 @@ public class RFile {
@Override
public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive)
throws IOException {
- lgCache = LocalityGroupIterator.seek(this, lgContext, range, columnFamilies, inclusive,
- lgCache);
+ lgCache =
+ LocalityGroupIterator.seek(this, lgContext, range, columnFamilies, inclusive, lgCache);
}
int getNumLocalityGroupsSeeked() {
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/RFileOperations.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/RFileOperations.java
index 131dee1..b595fc4 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/RFileOperations.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/RFileOperations.java
@@ -43,10 +43,10 @@ public class RFileOperations extends FileOperations {
private static final Collection<ByteSequence> EMPTY_CF_SET = Collections.emptySet();
private static RFile.Reader getReader(FileReaderOperation<?> options) throws IOException {
- CachableBlockFile.Reader _cbr = new CachableBlockFile.Reader(options.getFileSystem(),
- new Path(options.getFilename()), options.getConfiguration(), options.getFileLenCache(),
- options.getDataCache(), options.getIndexCache(), options.getRateLimiter(),
- options.getTableConfiguration());
+ CachableBlockFile.Reader _cbr =
+ new CachableBlockFile.Reader(options.getFileSystem(), new Path(options.getFilename()),
+ options.getConfiguration(), options.getFileLenCache(), options.getDataCache(),
+ options.getIndexCache(), options.getRateLimiter(), options.getTableConfiguration());
return new RFile.Reader(_cbr);
}
@@ -95,8 +95,7 @@ public class RFileOperations extends FileOperations {
String compression = options.getCompression();
compression = compression == null
- ? options.getTableConfiguration().get(Property.TABLE_FILE_COMPRESSION_TYPE)
- : compression;
+ ? options.getTableConfiguration().get(Property.TABLE_FILE_COMPRESSION_TYPE) : compression;
FSDataOutputStream outputStream = options.getOutputStream();
@@ -126,8 +125,8 @@ public class RFileOperations extends FileOperations {
new RateLimitedOutputStream(outputStream, options.getRateLimiter()), compression, conf,
acuconf);
- RFile.Writer writer = new RFile.Writer(_cbw, (int) blockSize, (int) indexBlockSize,
- samplerConfig, sampler);
+ RFile.Writer writer =
+ new RFile.Writer(_cbw, (int) blockSize, (int) indexBlockSize, samplerConfig, sampler);
return writer;
}
}
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/SplitLarge.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/SplitLarge.java
index 017ec5a..00f85b5 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/SplitLarge.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/SplitLarge.java
@@ -60,8 +60,8 @@ public class SplitLarge {
for (String file : opts.files) {
AccumuloConfiguration aconf = DefaultConfiguration.getDefaultConfiguration();
Path path = new Path(file);
- CachableBlockFile.Reader rdr = new CachableBlockFile.Reader(fs, path, conf, null, null,
- aconf);
+ CachableBlockFile.Reader rdr =
+ new CachableBlockFile.Reader(fs, path, conf, null, null, aconf);
try (Reader iter = new RFile.Reader(rdr)) {
if (!file.endsWith(".rf")) {
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/VisMetricsGatherer.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/VisMetricsGatherer.java
index 1c05473..17aa0b6 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/VisMetricsGatherer.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/VisMetricsGatherer.java
@@ -133,8 +133,8 @@ public class VisMetricsGatherer
if (hash) {
String md5String = "";
try {
- byte[] md5Bytes = MessageDigest.getInstance("MD5")
- .digest(entry.getKey().getBytes(UTF_8));
+ byte[] md5Bytes =
+ MessageDigest.getInstance("MD5").digest(entry.getKey().getBytes(UTF_8));
md5String = new String(md5Bytes, UTF_8);
} catch (NoSuchAlgorithmException e) {
out.println("Failed to convert key to MD5 hash: " + e.getMessage());
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/BCFile.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/BCFile.java
index bf4f3db..66569fc 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/BCFile.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/BCFile.java
@@ -154,8 +154,8 @@ public final class BCFile {
fsOutputBuffer.setCapacity(getFSOutputBufferSize(conf));
- this.fsBufferedOutput = new SimpleBufferedOutputStream(this.fsOut,
- fsOutputBuffer.getBytes());
+ this.fsBufferedOutput =
+ new SimpleBufferedOutputStream(this.fsOut, fsOutputBuffer.getBytes());
// *This* is very important. Without this, when the crypto stream is closed (in order to
// flush its last bytes),
@@ -375,13 +375,13 @@ public final class BCFile {
this.cryptoModule = CryptoModuleFactory.getCryptoModule(accumuloConfiguration);
this.cryptoParams = new BCFileCryptoModuleParameters();
CryptoModuleFactory.fillParamsObjectFromConfiguration(cryptoParams, accumuloConfiguration);
- this.cryptoParams = (BCFileCryptoModuleParameters) cryptoModule
- .generateNewRandomSessionKey(cryptoParams);
+ this.cryptoParams =
+ (BCFileCryptoModuleParameters) cryptoModule.generateNewRandomSessionKey(cryptoParams);
- this.secretKeyEncryptionStrategy = CryptoModuleFactory
- .getSecretKeyEncryptionStrategy(accumuloConfiguration);
- this.cryptoParams = (BCFileCryptoModuleParameters) secretKeyEncryptionStrategy
- .encryptSecretKey(cryptoParams);
+ this.secretKeyEncryptionStrategy =
+ CryptoModuleFactory.getSecretKeyEncryptionStrategy(accumuloConfiguration);
+ this.cryptoParams =
+ (BCFileCryptoModuleParameters) secretKeyEncryptionStrategy.encryptSecretKey(cryptoParams);
// secretKeyEncryptionStrategy.encryptSecretKey(cryptoParameters);
@@ -404,8 +404,8 @@ public final class BCFile {
}
// add metaBCFileIndex to metaIndex as the last meta block
- BlockAppender appender = prepareMetaBlock(DataIndex.BLOCK_NAME,
- getDefaultCompressionAlgorithm());
+ BlockAppender appender =
+ prepareMetaBlock(DataIndex.BLOCK_NAME, getDefaultCompressionAlgorithm());
try {
dataIndex.write(appender);
} finally {
@@ -452,8 +452,8 @@ public final class BCFile {
}
MetaBlockRegister mbr = new MetaBlockRegister(name, compressAlgo);
- WBlockState wbs = new WBlockState(compressAlgo, out, fsOutputBuffer, conf, cryptoModule,
- cryptoParams);
+ WBlockState wbs =
+ new WBlockState(compressAlgo, out, fsOutputBuffer, conf, cryptoModule, cryptoParams);
BlockAppender ba = new BlockAppender(mbr, wbs);
blkInProgress = true;
metaBlkSeen = true;
@@ -557,7 +557,7 @@ public final class BCFile {
// sha256 of some random data
private static final byte[] NO_CPYPTO_KEY =
- "ce18cf53c4c5077f771249b38033fa14bcb31cca0e5e95a371ee72daa8342ea2".getBytes(UTF_8);
+ "ce18cf53c4c5077f771249b38033fa14bcb31cca0e5e95a371ee72daa8342ea2".getBytes(UTF_8);
// This class is used as a place holder in the cache for RFiles that have no crypto....
private static final BCFileCryptoModuleParameters NO_CRYPTO = new BCFileCryptoModuleParameters() {
@@ -850,10 +850,10 @@ public final class BCFile {
// TODO: Do I need this? Hmmm, maybe I do.
if (accumuloConfiguration
.getBoolean(Property.CRYPTO_OVERRIDE_KEY_STRATEGY_WITH_CONFIGURED_STRATEGY)) {
- Map<String,String> cryptoConfFromAccumuloConf = accumuloConfiguration
- .getAllPropertiesWithPrefix(Property.CRYPTO_PREFIX);
- Map<String,String> instanceConf = accumuloConfiguration
- .getAllPropertiesWithPrefix(Property.INSTANCE_PREFIX);
+ Map<String,String> cryptoConfFromAccumuloConf =
+ accumuloConfiguration.getAllPropertiesWithPrefix(Property.CRYPTO_PREFIX);
+ Map<String,String> instanceConf =
+ accumuloConfiguration.getAllPropertiesWithPrefix(Property.INSTANCE_PREFIX);
cryptoConfFromAccumuloConf.putAll(instanceConf);
@@ -941,10 +941,10 @@ public final class BCFile {
if (accumuloConfiguration
.getBoolean(Property.CRYPTO_OVERRIDE_KEY_STRATEGY_WITH_CONFIGURED_STRATEGY)) {
- Map<String,String> cryptoConfFromAccumuloConf = accumuloConfiguration
- .getAllPropertiesWithPrefix(Property.CRYPTO_PREFIX);
- Map<String,String> instanceConf = accumuloConfiguration
- .getAllPropertiesWithPrefix(Property.INSTANCE_PREFIX);
+ Map<String,String> cryptoConfFromAccumuloConf =
+ accumuloConfiguration.getAllPropertiesWithPrefix(Property.CRYPTO_PREFIX);
+ Map<String,String> instanceConf =
+ accumuloConfiguration.getAllPropertiesWithPrefix(Property.INSTANCE_PREFIX);
cryptoConfFromAccumuloConf.putAll(instanceConf);
@@ -1039,8 +1039,8 @@ public final class BCFile {
.getSecretKeyEncryptionStrategy(params.getKeyEncryptionStrategyClass());
// This call should put the decrypted session key within the cryptoParameters object
- cryptoParams = (BCFileCryptoModuleParameters) secretKeyEncryptionStrategy
- .decryptSecretKey(params);
+ cryptoParams =
+ (BCFileCryptoModuleParameters) secretKeyEncryptionStrategy.decryptSecretKey(params);
}
}
@@ -1132,8 +1132,8 @@ public final class BCFile {
private BlockReader createReader(Algorithm compressAlgo, BlockRegion region)
throws IOException {
- RBlockState rbs = new RBlockState(compressAlgo, in, region, conf, cryptoModule, version,
- cryptoParams);
+ RBlockState rbs =
+ new RBlockState(compressAlgo, in, region, conf, cryptoModule, version, cryptoParams);
return new BlockReader(rbs);
}
@@ -1257,8 +1257,8 @@ public final class BCFile {
// for write
public DataIndex(String defaultCompressionAlgorithmName, boolean trackBlocks) {
this.trackBlocks = trackBlocks;
- this.defaultCompressionAlgorithm = Compression
- .getCompressionAlgorithmByName(defaultCompressionAlgorithmName);
+ this.defaultCompressionAlgorithm =
+ Compression.getCompressionAlgorithmByName(defaultCompressionAlgorithmName);
listRegions = new ArrayList<>();
}
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/Compression.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/Compression.java
index 1288279..d35bbc7 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/Compression.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/Compression.java
@@ -156,8 +156,8 @@ public final class Compression {
@Override
CompressionCodec createNewCodec(int bufferSize) {
- String extClazz = (conf.get(CONF_LZO_CLASS) == null ? System.getProperty(CONF_LZO_CLASS)
- : null);
+ String extClazz =
+ (conf.get(CONF_LZO_CLASS) == null ? System.getProperty(CONF_LZO_CLASS) : null);
String clazz = (extClazz != null) ? extClazz : defaultClazz;
try {
LOG.info("Trying to load Lzo codec class: " + clazz);
@@ -210,8 +210,8 @@ public final class Compression {
bos1 = downStream;
}
CompressionOutputStream cos = codec.createOutputStream(bos1, compressor);
- BufferedOutputStream bos2 = new BufferedOutputStream(
- new FinishOnFlushCompressionStream(cos), DATA_OBUF_SIZE);
+ BufferedOutputStream bos2 =
+ new BufferedOutputStream(new FinishOnFlushCompressionStream(cos), DATA_OBUF_SIZE);
return bos2;
}
@@ -290,8 +290,8 @@ public final class Compression {
}
// always uses the default buffer size
CompressionOutputStream cos = codec.createOutputStream(bos1, compressor);
- BufferedOutputStream bos2 = new BufferedOutputStream(
- new FinishOnFlushCompressionStream(cos), DATA_OBUF_SIZE);
+ BufferedOutputStream bos2 =
+ new BufferedOutputStream(new FinishOnFlushCompressionStream(cos), DATA_OBUF_SIZE);
return bos2;
}
@@ -319,7 +319,7 @@ public final class Compression {
@Override
public void initializeDefaultCodec() {
- }
+ }
@Override
protected CompressionCodec createNewCodec(final int bufferSize) {
@@ -384,9 +384,8 @@ public final class Compression {
@Override
protected CompressionCodec createNewCodec(final int bufferSize) {
- String extClazz = (conf.get(CONF_SNAPPY_CLASS) == null
- ? System.getProperty(CONF_SNAPPY_CLASS)
- : null);
+ String extClazz =
+ (conf.get(CONF_SNAPPY_CLASS) == null ? System.getProperty(CONF_SNAPPY_CLASS) : null);
String clazz = (extClazz != null) ? extClazz : defaultClazz;
try {
LOG.info("Trying to load snappy codec class: " + clazz);
@@ -422,8 +421,8 @@ public final class Compression {
}
// use the default codec
CompressionOutputStream cos = snappyCodec.createOutputStream(bos1, compressor);
- BufferedOutputStream bos2 = new BufferedOutputStream(
- new FinishOnFlushCompressionStream(cos), DATA_OBUF_SIZE);
+ BufferedOutputStream bos2 =
+ new BufferedOutputStream(new FinishOnFlushCompressionStream(cos), DATA_OBUF_SIZE);
return bos2;
}
@@ -483,14 +482,14 @@ public final class Compression {
/**
* Guava cache to have a limited factory pattern defined in the Algorithm enum.
*/
- private static LoadingCache<Entry<Algorithm,Integer>,CompressionCodec> codecCache = CacheBuilder
- .newBuilder().maximumSize(25)
- .build(new CacheLoader<Entry<Algorithm,Integer>,CompressionCodec>() {
- @Override
- public CompressionCodec load(Entry<Algorithm,Integer> key) {
- return key.getKey().createNewCodec(key.getValue());
- }
- });
+ private static LoadingCache<Entry<Algorithm,Integer>,CompressionCodec> codecCache =
+ CacheBuilder.newBuilder().maximumSize(25)
+ .build(new CacheLoader<Entry<Algorithm,Integer>,CompressionCodec>() {
+ @Override
+ public CompressionCodec load(Entry<Algorithm,Integer> key) {
+ return key.getKey().createNewCodec(key.getValue());
+ }
+ });
// We require that all compression related settings are configured
// statically in the Configuration object.
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/AggregatingIterator.java b/core/src/main/java/org/apache/accumulo/core/iterators/AggregatingIterator.java
index 10e8adc..5ddb99a 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/AggregatingIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/AggregatingIterator.java
@@ -43,8 +43,8 @@ import org.slf4j.LoggerFactory;
public class AggregatingIterator implements SortedKeyValueIterator<Key,Value>, OptionDescriber {
private SortedKeyValueIterator<Key,Value> iterator;
- private ColumnToClassMapping<org.apache.accumulo.core.iterators.aggregation.Aggregator>
- aggregators;
+ private ColumnToClassMapping<
+ org.apache.accumulo.core.iterators.aggregation.Aggregator> aggregators;
private Key workKey = new Key();
@@ -95,8 +95,8 @@ public class AggregatingIterator implements SortedKeyValueIterator<Key,Value>, O
private void findTop() throws IOException {
// check if aggregation is needed
if (iterator.hasTop()) {
- org.apache.accumulo.core.iterators.aggregation.Aggregator aggr = aggregators
- .getObject(iterator.getTopKey());
+ org.apache.accumulo.core.iterators.aggregation.Aggregator aggr =
+ aggregators.getObject(iterator.getTopKey());
if (aggr != null) {
aggregateRowColumn(aggr);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java b/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java
index b66d785..9a94216 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java
@@ -76,13 +76,13 @@ import com.google.common.collect.Lists;
*/
public abstract class Combiner extends WrappingIterator implements OptionDescriber {
- static final Logger sawDeleteLog = LoggerFactory
- .getLogger(Combiner.class.getName() + ".SawDelete");
+ static final Logger sawDeleteLog =
+ LoggerFactory.getLogger(Combiner.class.getName() + ".SawDelete");
protected static final String COLUMNS_OPTION = "columns";
protected static final String ALL_OPTION = "all";
protected static final String REDUCE_ON_FULL_COMPACTION_ONLY_OPTION =
- "reduceOnFullCompactionOnly";
+ "reduceOnFullCompactionOnly";
private boolean isMajorCompaction;
private boolean reduceOnFullCompactionOnly;
@@ -182,8 +182,8 @@ public abstract class Combiner extends WrappingIterator implements OptionDescrib
private Key workKey = new Key();
@VisibleForTesting
- static final Cache<String,Boolean> loggedMsgCache = CacheBuilder.newBuilder()
- .expireAfterWrite(1, TimeUnit.HOURS).maximumSize(10000).build();
+ static final Cache<String,Boolean> loggedMsgCache =
+ CacheBuilder.newBuilder().expireAfterWrite(1, TimeUnit.HOURS).maximumSize(10000).build();
private void sawDelete() {
if (isMajorCompaction && !reduceOnFullCompactionOnly) {
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/IteratorAdapter.java b/core/src/main/java/org/apache/accumulo/core/iterators/IteratorAdapter.java
index b5a7800..254ac44 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/IteratorAdapter.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/IteratorAdapter.java
@@ -41,8 +41,8 @@ public class IteratorAdapter implements Iterator<Entry<Key,Value>> {
@Override
public Entry<Key,Value> next() {
try {
- Entry<Key,Value> result = new KeyValue(new Key(inner.getTopKey()),
- new Value(inner.getTopValue()).get());
+ Entry<Key,Value> result =
+ new KeyValue(new Key(inner.getTopKey()), new Value(inner.getTopValue()).get());
inner.next();
return result;
} catch (IOException ex) {
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/IteratorUtil.java b/core/src/main/java/org/apache/accumulo/core/iterators/IteratorUtil.java
index 4a2bf48..ed92475 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/IteratorUtil.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/IteratorUtil.java
@@ -194,8 +194,7 @@ public class IteratorUtil {
}
public static <K extends WritableComparable<?>,V extends Writable> SortedKeyValueIterator<K,V>
- loadIterators(
- IteratorScope scope, SortedKeyValueIterator<K,V> source, KeyExtent extent,
+ loadIterators(IteratorScope scope, SortedKeyValueIterator<K,V> source, KeyExtent extent,
AccumuloConfiguration conf, IteratorEnvironment env) throws IOException {
List<IterInfo> emptyList = Collections.emptyList();
Map<String,Map<String,String>> emptyMap = Collections.emptyMap();
@@ -203,8 +202,7 @@ public class IteratorUtil {
}
public static <K extends WritableComparable<?>,V extends Writable> SortedKeyValueIterator<K,V>
- loadIterators(
- IteratorScope scope, SortedKeyValueIterator<K,V> source, KeyExtent extent,
+ loadIterators(IteratorScope scope, SortedKeyValueIterator<K,V> source, KeyExtent extent,
AccumuloConfiguration conf, List<IteratorSetting> iterators, IteratorEnvironment env)
throws IOException {
@@ -220,8 +218,7 @@ public class IteratorUtil {
}
public static <K extends WritableComparable<?>,V extends Writable> SortedKeyValueIterator<K,V>
- loadIterators(
- IteratorScope scope, SortedKeyValueIterator<K,V> source, KeyExtent extent,
+ loadIterators(IteratorScope scope, SortedKeyValueIterator<K,V> source, KeyExtent extent,
AccumuloConfiguration conf, List<IterInfo> ssiList, Map<String,Map<String,String>> ssio,
IteratorEnvironment env) throws IOException {
return loadIterators(scope, source, extent, conf, ssiList, ssio, env, true);
@@ -250,8 +247,7 @@ public class IteratorUtil {
}
public static <K extends WritableComparable<?>,V extends Writable> SortedKeyValueIterator<K,V>
- loadIterators(
- IteratorScope scope, SortedKeyValueIterator<K,V> source, KeyExtent extent,
+ loadIterators(IteratorScope scope, SortedKeyValueIterator<K,V> source, KeyExtent extent,
AccumuloConfiguration conf, List<IterInfo> ssiList, Map<String,Map<String,String>> ssio,
IteratorEnvironment env, boolean useAccumuloClassLoader) throws IOException {
List<IterInfo> iters = new ArrayList<>(ssiList);
@@ -262,8 +258,7 @@ public class IteratorUtil {
}
public static <K extends WritableComparable<?>,V extends Writable> SortedKeyValueIterator<K,V>
- loadIterators(
- IteratorScope scope, SortedKeyValueIterator<K,V> source, KeyExtent extent,
+ loadIterators(IteratorScope scope, SortedKeyValueIterator<K,V> source, KeyExtent extent,
AccumuloConfiguration conf, List<IterInfo> ssiList, Map<String,Map<String,String>> ssio,
IteratorEnvironment env, boolean useAccumuloClassLoader, String classLoaderContext)
throws IOException {
@@ -275,16 +270,14 @@ public class IteratorUtil {
}
public static <K extends WritableComparable<?>,V extends Writable> SortedKeyValueIterator<K,V>
- loadIterators(
- SortedKeyValueIterator<K,V> source, Collection<IterInfo> iters,
+ loadIterators(SortedKeyValueIterator<K,V> source, Collection<IterInfo> iters,
Map<String,Map<String,String>> iterOpts, IteratorEnvironment env,
boolean useAccumuloClassLoader, String context) throws IOException {
return loadIterators(source, iters, iterOpts, env, useAccumuloClassLoader, context, null);
}
public static <K extends WritableComparable<?>,V extends Writable> SortedKeyValueIterator<K,V>
- loadIterators(
- SortedKeyValueIterator<K,V> source, Collection<IterInfo> iters,
+ loadIterators(SortedKeyValueIterator<K,V> source, Collection<IterInfo> iters,
Map<String,Map<String,String>> iterOpts, IteratorEnvironment env,
boolean useAccumuloClassLoader, String context,
Map<String,Class<? extends SortedKeyValueIterator<K,V>>> classCache) throws IOException {
@@ -331,11 +324,9 @@ public class IteratorUtil {
}
@SuppressWarnings("unchecked")
- private static
- <K extends WritableComparable<?>,V extends Writable> Class<? extends SortedKeyValueIterator<K,V>>
- loadClass(
- boolean useAccumuloClassLoader, String context, IterInfo iterInfo)
- throws ClassNotFoundException, IOException {
+ private static <K extends WritableComparable<?>,V extends Writable>
+ Class<? extends SortedKeyValueIterator<K,V>> loadClass(boolean useAccumuloClassLoader,
+ String context, IterInfo iterInfo) throws ClassNotFoundException, IOException {
Class<? extends SortedKeyValueIterator<K,V>> clazz;
if (useAccumuloClassLoader) {
if (context != null && !context.equals(""))
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/OrIterator.java b/core/src/main/java/org/apache/accumulo/core/iterators/OrIterator.java
index 59ada93..15317b0 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/OrIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/OrIterator.java
@@ -105,8 +105,8 @@ public class OrIterator implements SortedKeyValueIterator<Key,Value>, OptionDesc
this.iter = Objects.requireNonNull(iter);
this.term = Objects.requireNonNull(term);
// The desired column families for this source is the term itself
- this.seekColfams = Collections.<ByteSequence> singletonList(
- new ArrayByteSequence(term.getBytes(), 0, term.getLength()));
+ this.seekColfams = Collections.<
+ ByteSequence>singletonList(new ArrayByteSequence(term.getBytes(), 0, term.getLength()));
// No current range until we're seek()'ed for the first time
this.currentRange = null;
}
@@ -317,7 +317,7 @@ public class OrIterator implements SortedKeyValueIterator<Key,Value>, OptionDesc
options.put(COLUMNS_KEY, "A comma-separated list of families");
return new IteratorOptions("OrIterator",
"Produces a sorted stream of qualifiers based on families", options,
- Collections.<String> emptyList());
+ Collections.<String>emptyList());
}
@Override
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/conf/ColumnToClassMapping.java b/core/src/main/java/org/apache/accumulo/core/iterators/conf/ColumnToClassMapping.java
index 7f6692a..979d507 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/conf/ColumnToClassMapping.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/conf/ColumnToClassMapping.java
@@ -59,8 +59,8 @@ public class ColumnToClassMapping<K> {
Class<?> clazz;
if (context != null && !context.equals(""))
- clazz = AccumuloVFSClassLoader.getContextManager().getClassLoader(context)
- .loadClass(className);
+ clazz =
+ AccumuloVFSClassLoader.getContextManager().getClassLoader(context).loadClass(className);
else
clazz = AccumuloVFSClassLoader.loadClass(className, c);
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/system/LocalityGroupIterator.java b/core/src/main/java/org/apache/accumulo/core/iterators/system/LocalityGroupIterator.java
index d955585..c1820a4 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/system/LocalityGroupIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/system/LocalityGroupIterator.java
@@ -286,8 +286,8 @@ public class LocalityGroupIterator extends HeapIterator implements Interruptible
}
} else { // otherwise capture the parameters, and use the static seek method to locate the
// locality groups to use.
- lgSeekCache.lastColumnFamilies = (cfSet == null ? ImmutableSet.copyOf(columnFamilies)
- : cfSet);
+ lgSeekCache.lastColumnFamilies =
+ (cfSet == null ? ImmutableSet.copyOf(columnFamilies) : cfSet);
lgSeekCache.lastInclusive = inclusive;
lgSeekCache.lastUsed = _seek(hiter, lgContext, range, columnFamilies, inclusive);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/user/CfCqSliceOpts.java b/core/src/main/java/org/apache/accumulo/core/iterators/user/CfCqSliceOpts.java
index 128bffc..ddb4dcc 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/user/CfCqSliceOpts.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/user/CfCqSliceOpts.java
@@ -92,12 +92,12 @@ public class CfCqSliceOpts {
maxCq = optStr == null ? new Text() : new Text(optStr.getBytes(UTF_8));
optStr = options.get(OPT_MIN_INCLUSIVE);
- minInclusive = optStr == null || optStr.isEmpty() ? true
- : Boolean.valueOf(options.get(OPT_MIN_INCLUSIVE));
+ minInclusive =
+ optStr == null || optStr.isEmpty() ? true : Boolean.valueOf(options.get(OPT_MIN_INCLUSIVE));
optStr = options.get(OPT_MAX_INCLUSIVE);
- maxInclusive = optStr == null || optStr.isEmpty() ? true
- : Boolean.valueOf(options.get(OPT_MAX_INCLUSIVE));
+ maxInclusive =
+ optStr == null || optStr.isEmpty() ? true : Boolean.valueOf(options.get(OPT_MAX_INCLUSIVE));
}
static class Describer implements OptionDescriber {
@@ -112,7 +112,7 @@ public class CfCqSliceOpts {
options.put(OPT_MAX_INCLUSIVE, OPT_MAX_INCLUSIVE_DESC);
return new OptionDescriber.IteratorOptions("ColumnSliceFilter",
"Returns all key/value pairs where the column is between the specified values", options,
- Collections.<String> emptyList());
+ Collections.<String>emptyList());
}
@Override
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/user/CfCqSliceSeekingFilter.java b/core/src/main/java/org/apache/accumulo/core/iterators/user/CfCqSliceSeekingFilter.java
index 31accfa..66a389f 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/user/CfCqSliceSeekingFilter.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/user/CfCqSliceSeekingFilter.java
@@ -43,12 +43,12 @@ public class CfCqSliceSeekingFilter extends SeekingFilter implements OptionDescr
private static final FilterResult SKIP_TO_HINT = FilterResult.of(false, AdvanceResult.USE_HINT);
private static final FilterResult SKIP_TO_NEXT = FilterResult.of(false, AdvanceResult.NEXT);
- private static final FilterResult SKIP_TO_NEXT_ROW = FilterResult.of(false,
- AdvanceResult.NEXT_ROW);
+ private static final FilterResult SKIP_TO_NEXT_ROW =
+ FilterResult.of(false, AdvanceResult.NEXT_ROW);
private static final FilterResult SKIP_TO_NEXT_CF = FilterResult.of(false, AdvanceResult.NEXT_CF);
private static final FilterResult INCLUDE_AND_NEXT = FilterResult.of(true, AdvanceResult.NEXT);
- private static final FilterResult INCLUDE_AND_NEXT_CF = FilterResult.of(true,
- AdvanceResult.NEXT_CF);
+ private static final FilterResult INCLUDE_AND_NEXT_CF =
+ FilterResult.of(true, AdvanceResult.NEXT_CF);
private CfCqSliceOpts cso;
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/user/IntersectingIterator.java b/core/src/main/java/org/apache/accumulo/core/iterators/user/IntersectingIterator.java
index 1b61612..10b2bd8 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/user/IntersectingIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/user/IntersectingIterator.java
@@ -111,8 +111,8 @@ public class IntersectingIterator implements SortedKeyValueIterator<Key,Value> {
this.term = term;
this.notFlag = notFlag;
// The desired column families for this source is the term itself
- this.seekColfams = Collections.<ByteSequence> singletonList(
- new ArrayByteSequence(term.getBytes(), 0, term.getLength()));
+ this.seekColfams = Collections.<
+ ByteSequence>singletonList(new ArrayByteSequence(term.getBytes(), 0, term.getLength()));
}
public String getTermString() {
@@ -200,8 +200,8 @@ public class IntersectingIterator implements SortedKeyValueIterator<Key,Value> {
break;
}
}
- int partitionCompare = currentPartition
- .compareTo(getPartition(sources[sourceID].iter.getTopKey()));
+ int partitionCompare =
+ currentPartition.compareTo(getPartition(sources[sourceID].iter.getTopKey()));
// check if this source is already at or beyond currentRow
// if not, then seek to at least the current row
@@ -221,8 +221,8 @@ public class IntersectingIterator implements SortedKeyValueIterator<Key,Value> {
// now we must make sure we're in the right columnFamily in the current row
// Note: Iterators are auto-magically set to the correct columnFamily
if (sources[sourceID].term != null) {
- int termCompare = sources[sourceID].term
- .compareTo(getTerm(sources[sourceID].iter.getTopKey()));
+ int termCompare =
+ sources[sourceID].term.compareTo(getTerm(sources[sourceID].iter.getTopKey()));
// check if this source is already on the right columnFamily
// if not, then seek forwards to the right columnFamily
if (termCompare > 0) {
@@ -285,8 +285,8 @@ public class IntersectingIterator implements SortedKeyValueIterator<Key,Value> {
return true;
}
}
- int partitionCompare = currentPartition
- .compareTo(getPartition(sources[sourceID].iter.getTopKey()));
+ int partitionCompare =
+ currentPartition.compareTo(getPartition(sources[sourceID].iter.getTopKey()));
// check if this source is already at or beyond currentRow
// if not, then seek to at least the current row
if (partitionCompare > 0) {
@@ -309,8 +309,8 @@ public class IntersectingIterator implements SortedKeyValueIterator<Key,Value> {
// Note: Iterators are auto-magically set to the correct columnFamily
if (sources[sourceID].term != null) {
- int termCompare = sources[sourceID].term
- .compareTo(getTerm(sources[sourceID].iter.getTopKey()));
+ int termCompare =
+ sources[sourceID].term.compareTo(getTerm(sources[sourceID].iter.getTopKey()));
// check if this source is already on the right columnFamily
// if not, then seek forwards to the right columnFamily
if (termCompare > 0) {
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/user/LargeRowFilter.java b/core/src/main/java/org/apache/accumulo/core/iterators/user/LargeRowFilter.java
index 6bbcf6c..f5c5192 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/user/LargeRowFilter.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/user/LargeRowFilter.java
@@ -256,12 +256,12 @@ public class LargeRowFilter implements SortedKeyValueIterator<Key,Value>, Option
@Override
public IteratorOptions describeOptions() {
- String description = "This iterator suppresses rows that exceed a specified"
- + " number of columns. Once\n"
- + "a row exceeds the threshold, a marker is emitted and the row is always\n"
- + "suppressed by this iterator after that point in time.\n"
- + " This iterator works in a similar way to the RowDeletingIterator. See its\n"
- + " javadoc about locality groups.\n";
+ String description =
+ "This iterator suppresses rows that exceed a specified" + " number of columns. Once\n"
+ + "a row exceeds the threshold, a marker is emitted and the row is always\n"
+ + "suppressed by this iterator after that point in time.\n"
+ + " This iterator works in a similar way to the RowDeletingIterator. See its\n"
+ + " javadoc about locality groups.\n";
return new IteratorOptions(this.getClass().getSimpleName(), description,
Collections.singletonMap(MAX_COLUMNS, "Number Of Columns To Begin Suppression"), null);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/user/RowDeletingIterator.java b/core/src/main/java/org/apache/accumulo/core/iterators/user/RowDeletingIterator.java
index 2d65263..d73a545 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/user/RowDeletingIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/user/RowDeletingIterator.java
@@ -96,8 +96,9 @@ public class RowDeletingIterator implements SortedKeyValueIterator<Key,Value> {
public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options,
IteratorEnvironment env) throws IOException {
this.source = source;
- this.propogateDeletes = (env.getIteratorScope() == IteratorScope.majc
- && !env.isFullMajorCompaction()) || env.getIteratorScope() == IteratorScope.minc;
+ this.propogateDeletes =
+ (env.getIteratorScope() == IteratorScope.majc && !env.isFullMajorCompaction())
+ || env.getIteratorScope() == IteratorScope.minc;
}
@Override
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/user/SeekingFilter.java b/core/src/main/java/org/apache/accumulo/core/iterators/user/SeekingFilter.java
index 79ee0ba..0c22c60 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/user/SeekingFilter.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/user/SeekingFilter.java
@@ -54,10 +54,10 @@ public abstract class SeekingFilter extends WrappingIterator {
}
public static class FilterResult {
- private static final EnumMap<AdvanceResult,FilterResult> PASSES = new EnumMap<>(
- AdvanceResult.class);
- private static final EnumMap<AdvanceResult,FilterResult> FAILS = new EnumMap<>(
- AdvanceResult.class);
+ private static final EnumMap<AdvanceResult,FilterResult> PASSES =
+ new EnumMap<>(AdvanceResult.class);
+ private static final EnumMap<AdvanceResult,FilterResult> FAILS =
+ new EnumMap<>(AdvanceResult.class);
static {
for (AdvanceResult ar : AdvanceResult.values()) {
PASSES.put(ar, new FilterResult(true, ar));
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/user/TransformingIterator.java b/core/src/main/java/org/apache/accumulo/core/iterators/user/TransformingIterator.java
index fb5022d..82d33f0 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/user/TransformingIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/user/TransformingIterator.java
@@ -193,8 +193,8 @@ abstract public class TransformingIterator extends WrappingIterator implements O
copy.keyPos = keyPos;
copy.keys.addAll(keys);
copy.seekRange = (seekRange == null) ? null : new Range(seekRange);
- copy.seekColumnFamilies = (seekColumnFamilies == null) ? null
- : new HashSet<>(seekColumnFamilies);
+ copy.seekColumnFamilies =
+ (seekColumnFamilies == null) ? null : new HashSet<>(seekColumnFamilies);
copy.seekColumnFamiliesInclusive = seekColumnFamiliesInclusive;
copy.ve = ve;
@@ -671,8 +671,8 @@ abstract public class TransformingIterator extends WrappingIterator implements O
* the column families that have been fetched at seek time
* @return the untransformed column families that would transform info {@code columnFamilies}
*/
- protected Collection<ByteSequence> untransformColumnFamilies(
- Collection<ByteSequence> columnFamilies) {
+ protected Collection<ByteSequence>
+ untransformColumnFamilies(Collection<ByteSequence> columnFamilies) {
return columnFamilies;
}
diff --git a/core/src/main/java/org/apache/accumulo/core/metadata/MetadataLocationObtainer.java b/core/src/main/java/org/apache/accumulo/core/metadata/MetadataLocationObtainer.java
index e71712b..0be5f93 100644
--- a/core/src/main/java/org/apache/accumulo/core/metadata/MetadataLocationObtainer.java
+++ b/core/src/main/java/org/apache/accumulo/core/metadata/MetadataLocationObtainer.java
@@ -102,10 +102,10 @@ public class MetadataLocationObtainer implements TabletLocationObtainer {
List<IterInfo> serverSideIteratorList = new ArrayList<>();
serverSideIteratorList.add(new IterInfo(10000, WholeRowIterator.class.getName(), "WRI"));
Map<String,Map<String,String>> serverSideIteratorOptions = Collections.emptyMap();
- boolean more = ThriftScanner.getBatchFromServer(context, range, src.tablet_extent,
- src.tablet_location, encodedResults, locCols, serverSideIteratorList,
- serverSideIteratorOptions, Constants.SCAN_BATCH_SIZE, Authorizations.EMPTY, false, 0L,
- null);
+ boolean more =
+ ThriftScanner.getBatchFromServer(context, range, src.tablet_extent, src.tablet_location,
+ encodedResults, locCols, serverSideIteratorList, serverSideIteratorOptions,
+ Constants.SCAN_BATCH_SIZE, Authorizations.EMPTY, false, 0L, null);
decodeRows(encodedResults, results);
@@ -113,10 +113,10 @@ public class MetadataLocationObtainer implements TabletLocationObtainer {
range = new Range(results.lastKey().followingKey(PartialKey.ROW_COLFAM_COLQUAL_COLVIS_TIME),
true, new Key(stopRow).followingKey(PartialKey.ROW), false);
encodedResults.clear();
- more = ThriftScanner.getBatchFromServer(context, range, src.tablet_extent,
- src.tablet_location, encodedResults, locCols, serverSideIteratorList,
- serverSideIteratorOptions, Constants.SCAN_BATCH_SIZE, Authorizations.EMPTY, false, 0L,
- null);
+ more =
+ ThriftScanner.getBatchFromServer(context, range, src.tablet_extent, src.tablet_location,
+ encodedResults, locCols, serverSideIteratorList, serverSideIteratorOptions,
+ Constants.SCAN_BATCH_SIZE, Authorizations.EMPTY, false, 0L, null);
decodeRows(encodedResults, results);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/metadata/RootTable.java b/core/src/main/java/org/apache/accumulo/core/metadata/RootTable.java
index 6d71d7f..d87554f 100644
--- a/core/src/main/java/org/apache/accumulo/core/metadata/RootTable.java
+++ b/core/src/main/java/org/apache/accumulo/core/metadata/RootTable.java
@@ -44,7 +44,7 @@ public class RootTable {
public static final String ZROOT_TABLET_PATH = ZROOT_TABLET + "/dir";
public static final KeyExtent EXTENT = new KeyExtent(ID, null, null);
- public static final KeyExtent OLD_EXTENT = new KeyExtent(MetadataTable.ID,
- KeyExtent.getMetadataEntry(MetadataTable.ID, null), null);
+ public static final KeyExtent OLD_EXTENT =
+ new KeyExtent(MetadataTable.ID, KeyExtent.getMetadataEntry(MetadataTable.ID, null), null);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/metadata/TableMetadataServicer.java b/core/src/main/java/org/apache/accumulo/core/metadata/TableMetadataServicer.java
index da7cad8..7b12e5a 100644
--- a/core/src/main/java/org/apache/accumulo/core/metadata/TableMetadataServicer.java
+++ b/core/src/main/java/org/apache/accumulo/core/metadata/TableMetadataServicer.java
@@ -62,8 +62,8 @@ abstract class TableMetadataServicer extends MetadataServicer {
public void getTabletLocations(SortedMap<KeyExtent,String> tablets)
throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
- Scanner scanner = context.getConnector().createScanner(getServicingTableName(),
- Authorizations.EMPTY);
+ Scanner scanner =
+ context.getConnector().createScanner(getServicingTableName(), Authorizations.EMPTY);
TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.fetch(scanner);
scanner.fetchColumnFamily(TabletsSection.CurrentLocationColumnFamily.NAME);
diff --git a/core/src/main/java/org/apache/accumulo/core/metadata/schema/MetadataSchema.java b/core/src/main/java/org/apache/accumulo/core/metadata/schema/MetadataSchema.java
index 1a96340..8e58a27 100644
--- a/core/src/main/java/org/apache/accumulo/core/metadata/schema/MetadataSchema.java
+++ b/core/src/main/java/org/apache/accumulo/core/metadata/schema/MetadataSchema.java
@@ -144,8 +144,8 @@ public class MetadataSchema {
* Column family for storing suspension location, as a demand for assignment.
*/
public static class SuspendLocationColumn {
- public static final ColumnFQ SUSPEND_COLUMN = new ColumnFQ(new Text("suspend"),
- new Text("loc"));
+ public static final ColumnFQ SUSPEND_COLUMN =
+ new ColumnFQ(new Text("suspend"), new Text("loc"));
}
/**
@@ -214,8 +214,8 @@ public class MetadataSchema {
* Holds delete markers for potentially unused files/directories
*/
public static class DeletesSection {
- private static final Section section = new Section(RESERVED_PREFIX + "del", true,
- RESERVED_PREFIX + "dem", false);
+ private static final Section section =
+ new Section(RESERVED_PREFIX + "del", true, RESERVED_PREFIX + "dem", false);
public static Range getRange() {
return section.getRange();
@@ -231,8 +231,8 @@ public class MetadataSchema {
* Holds bulk-load-in-progress processing flags
*/
public static class BlipSection {
- private static final Section section = new Section(RESERVED_PREFIX + "blip", true,
- RESERVED_PREFIX + "bliq", false);
+ private static final Section section =
+ new Section(RESERVED_PREFIX + "blip", true, RESERVED_PREFIX + "bliq", false);
public static Range getRange() {
return section.getRange();
@@ -256,8 +256,8 @@ public class MetadataSchema {
public static class ReplicationSection {
public static final Text COLF = new Text("stat");
private static final ArrayByteSequence COLF_BYTE_SEQ = new ArrayByteSequence(COLF.toString());
- private static final Section section = new Section(RESERVED_PREFIX + "repl", true,
- RESERVED_PREFIX + "repm", false);
+ private static final Section section =
+ new Section(RESERVED_PREFIX + "repl", true, RESERVED_PREFIX + "repm", false);
public static Range getRange() {
return section.getRange();
diff --git a/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTable.java b/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTable.java
index d8987c3..ddec4e8 100644
--- a/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTable.java
+++ b/core/src/main/java/org/apache/accumulo/core/replication/ReplicationTable.java
@@ -54,8 +54,8 @@ public class ReplicationTable {
public static final Set<Text> STATUS_LG_COLFAMS = Collections.singleton(StatusSection.NAME);
public static final String WORK_LG_NAME = WorkSection.NAME.toString();
public static final Set<Text> WORK_LG_COLFAMS = Collections.singleton(WorkSection.NAME);
- public static final Map<String,Set<Text>> LOCALITY_GROUPS = ImmutableMap.of(STATUS_LG_NAME,
- STATUS_LG_COLFAMS, WORK_LG_NAME, WORK_LG_COLFAMS);
+ public static final Map<String,Set<Text>> LOCALITY_GROUPS =
+ ImmutableMap.of(STATUS_LG_NAME, STATUS_LG_COLFAMS, WORK_LG_NAME, WORK_LG_COLFAMS);
public static Scanner getScanner(Connector conn) throws ReplicationTableOfflineException {
try {
diff --git a/core/src/main/java/org/apache/accumulo/core/rpc/TTimeoutTransport.java b/core/src/main/java/org/apache/accumulo/core/rpc/TTimeoutTransport.java
index 8041440..87a1f24 100644
--- a/core/src/main/java/org/apache/accumulo/core/rpc/TTimeoutTransport.java
+++ b/core/src/main/java/org/apache/accumulo/core/rpc/TTimeoutTransport.java
@@ -41,8 +41,8 @@ public class TTimeoutTransport {
synchronized (TTimeoutTransport.class) {
if (null == GET_INPUT_STREAM_METHOD) {
try {
- GET_INPUT_STREAM_METHOD = NetUtils.class.getMethod("getInputStream", Socket.class,
- Long.TYPE);
+ GET_INPUT_STREAM_METHOD =
+ NetUtils.class.getMethod("getInputStream", Socket.class, Long.TYPE);
} catch (Exception e) {
throw new RuntimeException(e);
}
@@ -73,8 +73,8 @@ public class TTimeoutTransport {
socket.setTcpNoDelay(true);
socket.connect(addr);
InputStream input = new BufferedInputStream(getInputStream(socket, timeoutMillis), 1024 * 10);
- OutputStream output = new BufferedOutputStream(
- NetUtils.getOutputStream(socket, timeoutMillis), 1024 * 10);
+ OutputStream output =
+ new BufferedOutputStream(NetUtils.getOutputStream(socket, timeoutMillis), 1024 * 10);
return new TIOStreamTransport(input, output);
} catch (IOException e) {
try {
diff --git a/core/src/main/java/org/apache/accumulo/core/rpc/ThriftUtil.java b/core/src/main/java/org/apache/accumulo/core/rpc/ThriftUtil.java
index b7bad90..bc4a91e 100644
--- a/core/src/main/java/org/apache/accumulo/core/rpc/ThriftUtil.java
+++ b/core/src/main/java/org/apache/accumulo/core/rpc/ThriftUtil.java
@@ -58,8 +58,8 @@ public class ThriftUtil {
private static final Logger log = LoggerFactory.getLogger(ThriftUtil.class);
private static final TraceProtocolFactory protocolFactory = new TraceProtocolFactory();
- private static final TFramedTransport.Factory transportFactory = new TFramedTransport.Factory(
- Integer.MAX_VALUE);
+ private static final TFramedTransport.Factory transportFactory =
+ new TFramedTransport.Factory(Integer.MAX_VALUE);
private static final Map<Integer,TTransportFactory> factoryCache = new HashMap<>();
public static final String GSSAPI = "GSSAPI", DIGEST_MD5 = "DIGEST-MD5";
@@ -143,8 +143,8 @@ public class ThriftUtil {
*/
public static <T extends TServiceClient> T getClient(TServiceClientFactory<T> factory,
HostAndPort address, ClientContext context, long timeout) throws TTransportException {
- TTransport transport = ThriftTransportPool.getInstance().getTransport(address, timeout,
- context);
+ TTransport transport =
+ ThriftTransportPool.getInstance().getTransport(address, timeout, context);
return createClient(factory, transport);
}
@@ -257,8 +257,8 @@ public class ThriftUtil {
// TSSLTransportFactory handles timeout 0 -> forever natively
if (sslParams.useJsse()) {
- transport = TSSLTransportFactory.getClientSocket(address.getHost(), address.getPort(),
- timeout);
+ transport =
+ TSSLTransportFactory.getClientSocket(address.getHost(), address.getPort(), timeout);
} else {
// JDK6's factory doesn't appear to pass the protocol onto the Socket properly so we have
// to do some magic to make sure that happens. Not an issue in JDK7
@@ -272,12 +272,12 @@ public class ThriftUtil {
// Wrap the real factory with our own that will set the protocol on the Socket before
// returning it
ProtocolOverridingSSLSocketFactory wrappingSslSockFactory =
- new ProtocolOverridingSSLSocketFactory(sslSockFactory,
- new String[] {sslParams.getClientProtocol()});
+ new ProtocolOverridingSSLSocketFactory(sslSockFactory,
+ new String[] {sslParams.getClientProtocol()});
// Create the TSocket from that
- transport = createClient(wrappingSslSockFactory, address.getHost(), address.getPort(),
- timeout);
+ transport =
+ createClient(wrappingSslSockFactory, address.getHost(), address.getPort(), timeout);
// TSSLTransportFactory leaves transports open, so no need to open here
}
diff --git a/core/src/main/java/org/apache/accumulo/core/sample/impl/SamplerConfigurationImpl.java b/core/src/main/java/org/apache/accumulo/core/sample/impl/SamplerConfigurationImpl.java
index 339e1b9..4ecbe58 100644
--- a/core/src/main/java/org/apache/accumulo/core/sample/impl/SamplerConfigurationImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/sample/impl/SamplerConfigurationImpl.java
@@ -179,8 +179,8 @@ public class SamplerConfigurationImpl implements Writable {
return;
}
- Map<String,String> sampleProps = new SamplerConfigurationImpl(samplerConfiguration)
- .toTablePropertiesMap();
+ Map<String,String> sampleProps =
+ new SamplerConfigurationImpl(samplerConfiguration).toTablePropertiesMap();
checkArgument(Collections.disjoint(props.keySet(), sampleProps.keySet()),
"Properties and derived sampler properties are not disjoint");
diff --git a/core/src/main/java/org/apache/accumulo/core/security/ColumnVisibility.java b/core/src/main/java/org/apache/accumulo/core/security/ColumnVisibility.java
index 06fd946..e73d8ee 100644
--- a/core/src/main/java/org/apache/accumulo/core/security/ColumnVisibility.java
+++ b/core/src/main/java/org/apache/accumulo/core/security/ColumnVisibility.java
@@ -214,12 +214,14 @@ public class ColumnVisibility {
return normalize(root, expression, new NodeComparator(expression));
}
+ // @formatter:off
/*
* Walks an expression's AST in order to:
* 1) roll up expressions with the same operant (`a&(b&c) becomes a&b&c`)
* 2) sort labels lexicographically (permutations of `a&b&c` are re-ordered to appear as `a&b&c`)
* 3) dedupes labels (`a&b&a` becomes `a&b`)
*/
+ // @formatter:on
public static Node normalize(Node root, byte[] expression, NodeComparator comparator) {
if (root.type != NodeType.TERM) {
TreeSet<Node> rolledUp = new TreeSet<>(comparator);
diff --git a/core/src/main/java/org/apache/accumulo/core/security/crypto/CachingHDFSSecretKeyEncryptionStrategy.java b/core/src/main/java/org/apache/accumulo/core/security/crypto/CachingHDFSSecretKeyEncryptionStrategy.java
index 5eeddf7..b3197ee 100644
--- a/core/src/main/java/org/apache/accumulo/core/security/crypto/CachingHDFSSecretKeyEncryptionStrategy.java
+++ b/core/src/main/java/org/apache/accumulo/core/security/crypto/CachingHDFSSecretKeyEncryptionStrategy.java
@@ -41,8 +41,8 @@ import org.slf4j.LoggerFactory;
*/
public class CachingHDFSSecretKeyEncryptionStrategy implements SecretKeyEncryptionStrategy {
- private static final Logger log = LoggerFactory
- .getLogger(CachingHDFSSecretKeyEncryptionStrategy.class);
+ private static final Logger log =
+ LoggerFactory.getLogger(CachingHDFSSecretKeyEncryptionStrategy.class);
private SecretKeyCache secretKeyCache = new SecretKeyCache();
@Override
@@ -84,8 +84,8 @@ public class CachingHDFSSecretKeyEncryptionStrategy implements SecretKeyEncrypti
if (Cipher.UNWRAP_MODE == encryptionMode) {
try {
- Key plaintextKey = cipher.unwrap(params.getEncryptedKey(), params.getAlgorithmName(),
- Cipher.SECRET_KEY);
+ Key plaintextKey =
+ cipher.unwrap(params.getEncryptedKey(), params.getAlgorithmName(), Cipher.SECRET_KEY);
params.setPlaintextKey(plaintextKey.getEncoded());
} catch (InvalidKeyException e) {
log.error("{}", e.getMessage(), e);
@@ -183,8 +183,8 @@ public class CachingHDFSSecretKeyEncryptionStrategy implements SecretKeyEncrypti
@SuppressWarnings("deprecation")
private String getFullPathToKey(CryptoModuleParameters params) {
- String pathToKeyName = params.getAllOptions()
- .get(Property.CRYPTO_DEFAULT_KEY_STRATEGY_KEY_LOCATION.getKey());
+ String pathToKeyName =
+ params.getAllOptions().get(Property.CRYPTO_DEFAULT_KEY_STRATEGY_KEY_LOCATION.getKey());
String instanceDirectory = params.getAllOptions().get(Property.INSTANCE_DFS_DIR.getKey());
if (pathToKeyName == null) {
diff --git a/core/src/main/java/org/apache/accumulo/core/security/crypto/CryptoModuleFactory.java b/core/src/main/java/org/apache/accumulo/core/security/crypto/CryptoModuleFactory.java
index 809a904..bcf0e6e 100644
--- a/core/src/main/java/org/apache/accumulo/core/security/crypto/CryptoModuleFactory.java
+++ b/core/src/main/java/org/apache/accumulo/core/security/crypto/CryptoModuleFactory.java
@@ -33,7 +33,8 @@ public class CryptoModuleFactory {
private static final Logger log = LoggerFactory.getLogger(CryptoModuleFactory.class);
private static final Map<String,CryptoModule> cryptoModulesCache = new HashMap<>();
- private static final Map<String,SecretKeyEncryptionStrategy> secretKeyEncryptionStrategyCache = new HashMap<>();
+ private static final Map<String,SecretKeyEncryptionStrategy> secretKeyEncryptionStrategyCache =
+ new HashMap<>();
/**
* This method returns a crypto module based on settings in the given configuration parameter.
@@ -125,8 +126,8 @@ public class CryptoModuleFactory {
return cryptoModule;
}
- public static SecretKeyEncryptionStrategy getSecretKeyEncryptionStrategy(
- AccumuloConfiguration conf) {
+ public static SecretKeyEncryptionStrategy
+ getSecretKeyEncryptionStrategy(AccumuloConfiguration conf) {
String className = conf.get(Property.CRYPTO_SECRET_KEY_ENCRYPTION_STRATEGY_CLASS);
return getSecretKeyEncryptionStrategy(className);
}
@@ -155,8 +156,8 @@ public class CryptoModuleFactory {
}
@SuppressWarnings("rawtypes")
- private static SecretKeyEncryptionStrategy instantiateSecreteKeyEncryptionStrategy(
- String className) {
+ private static SecretKeyEncryptionStrategy
+ instantiateSecreteKeyEncryptionStrategy(String className) {
log.debug("About to instantiate secret key encryption strategy " + className);
@@ -264,18 +265,18 @@ public class CryptoModuleFactory {
return cipherTransform.split("/");
}
- public static CryptoModuleParameters createParamsObjectFromAccumuloConfiguration(
- AccumuloConfiguration conf) {
+ public static CryptoModuleParameters
+ createParamsObjectFromAccumuloConfiguration(AccumuloConfiguration conf) {
CryptoModuleParameters params = new CryptoModuleParameters();
return fillParamsObjectFromConfiguration(params, conf);
}
- public static CryptoModuleParameters fillParamsObjectFromConfiguration(
- CryptoModuleParameters params, AccumuloConfiguration conf) {
+ public static CryptoModuleParameters
+ fillParamsObjectFromConfiguration(CryptoModuleParameters params, AccumuloConfiguration conf) {
// Get all the options from the configuration
- Map<String,String> cryptoOpts = new HashMap<>(
- conf.getAllPropertiesWithPrefix(Property.CRYPTO_PREFIX));
+ Map<String,String> cryptoOpts =
+ new HashMap<>(conf.getAllPropertiesWithPrefix(Property.CRYPTO_PREFIX));
cryptoOpts.putAll(conf.getAllPropertiesWithPrefix(Property.INSTANCE_PREFIX));
cryptoOpts.remove(Property.INSTANCE_SECRET.getKey());
cryptoOpts.put(Property.CRYPTO_BLOCK_STREAM_SIZE.getKey(),
@@ -288,8 +289,8 @@ public class CryptoModuleFactory {
Map<String,String> cryptoOpts) {
// Parse the cipher suite for the mode and padding options
- String[] cipherTransformParts = parseCipherTransform(
- cryptoOpts.get(Property.CRYPTO_CIPHER_SUITE.getKey()));
+ String[] cipherTransformParts =
+ parseCipherTransform(cryptoOpts.get(Property.CRYPTO_CIPHER_SUITE.getKey()));
// If no encryption has been specified, then we abort here.
if (cipherTransformParts[0] == null || cipherTransformParts[0].equals("NullCipher")) {
diff --git a/core/src/main/java/org/apache/accumulo/core/security/crypto/DefaultCryptoModule.java b/core/src/main/java/org/apache/accumulo/core/security/crypto/DefaultCryptoModule.java
index b7ba44f..0ec9bf1 100644
--- a/core/src/main/java/org/apache/accumulo/core/security/crypto/DefaultCryptoModule.java
+++ b/core/src/main/java/org/apache/accumulo/core/security/crypto/DefaultCryptoModule.java
@@ -112,8 +112,8 @@ public class DefaultCryptoModule implements CryptoModule {
}
private String getCipherTransformation(CryptoModuleParameters params) {
- String cipherSuite = params.getAlgorithmName() + "/" + params.getEncryptionMode() + "/"
- + params.getPadding();
+ String cipherSuite =
+ params.getAlgorithmName() + "/" + params.getEncryptionMode() + "/" + params.getPadding();
return cipherSuite;
}
@@ -170,8 +170,8 @@ public class DefaultCryptoModule implements CryptoModule {
return true;
}
- allIsWell = validateNotEmpty(params.getPadding(), allIsWell, errorBuf,
- "No padding was specified.");
+ allIsWell =
+ validateNotEmpty(params.getPadding(), allIsWell, errorBuf, "No padding was specified.");
allIsWell = validateNotZero(params.getKeyLength(), allIsWell, errorBuf,
"No key length was specified.");
allIsWell = validateNotEmpty(params.getEncryptionMode(), allIsWell, errorBuf,
@@ -197,8 +197,8 @@ public class DefaultCryptoModule implements CryptoModule {
+ " decrypt operation:\n");
boolean allIsWell = true;
- allIsWell = validateNotEmpty(params.getPadding(), allIsWell, errorBuf,
- "No padding was specified.");
+ allIsWell =
+ validateNotEmpty(params.getPadding(), allIsWell, errorBuf, "No padding was specified.");
allIsWell = validateNotZero(params.getKeyLength(), allIsWell, errorBuf,
"No key length was specified.");
allIsWell = validateNotEmpty(params.getEncryptionMode(), allIsWell, errorBuf,
@@ -267,8 +267,8 @@ public class DefaultCryptoModule implements CryptoModule {
// Encrypt the secret key
- SecretKeyEncryptionStrategy keyEncryptionStrategy = CryptoModuleFactory
- .getSecretKeyEncryptionStrategy(params.getKeyEncryptionStrategyClass());
+ SecretKeyEncryptionStrategy keyEncryptionStrategy =
+ CryptoModuleFactory.getSecretKeyEncryptionStrategy(params.getKeyEncryptionStrategyClass());
params = keyEncryptionStrategy.encryptSecretKey(params);
// Now the encrypted version of the key and any opaque ID are within the params object.
@@ -292,8 +292,8 @@ public class DefaultCryptoModule implements CryptoModule {
throw new RuntimeException("Encryption cipher must be a block cipher");
}
- CipherOutputStream cipherOutputStream = new CipherOutputStream(
- params.getPlaintextOutputStream(), cipher);
+ CipherOutputStream cipherOutputStream =
+ new CipherOutputStream(params.getPlaintextOutputStream(), cipher);
BlockedOutputStream blockedOutputStream = new BlockedOutputStream(cipherOutputStream,
cipher.getBlockSize(), params.getBlockStreamSize());
@@ -418,8 +418,8 @@ public class DefaultCryptoModule implements CryptoModule {
byte[] bytesToPutBack = tempByteOut.toByteArray();
- PushbackInputStream pushbackStream = new PushbackInputStream(
- params.getEncryptedInputStream(), bytesToPutBack.length);
+ PushbackInputStream pushbackStream =
+ new PushbackInputStream(params.getEncryptedInputStream(), bytesToPutBack.length);
pushbackStream.unread(bytesToPutBack);
params.setPlaintextInputStream(pushbackStream);
@@ -450,8 +450,8 @@ public class DefaultCryptoModule implements CryptoModule {
throw new RuntimeException(e);
}
- InputStream blockedDecryptingInputStream = new CipherInputStream(
- params.getEncryptedInputStream(), cipher);
+ InputStream blockedDecryptingInputStream =
+ new CipherInputStream(params.getEncryptedInputStream(), cipher);
if (params.getBlockStreamSize() > 0)
blockedDecryptingInputStream = new BlockedInputStream(blockedDecryptingInputStream,
diff --git a/core/src/main/java/org/apache/accumulo/core/security/crypto/NonCachingSecretKeyEncryptionStrategy.java b/core/src/main/java/org/apache/accumulo/core/security/crypto/NonCachingSecretKeyEncryptionStrategy.java
index bfe207a..ea30873 100644
--- a/core/src/main/java/org/apache/accumulo/core/security/crypto/NonCachingSecretKeyEncryptionStrategy.java
+++ b/core/src/main/java/org/apache/accumulo/core/security/crypto/NonCachingSecretKeyEncryptionStrategy.java
@@ -39,8 +39,8 @@ import org.slf4j.LoggerFactory;
//TODO ACCUMULO-2530 Update properties to use a URI instead of a relative path to secret key
public class NonCachingSecretKeyEncryptionStrategy implements SecretKeyEncryptionStrategy {
- private static final Logger log = LoggerFactory
- .getLogger(NonCachingSecretKeyEncryptionStrategy.class);
+ private static final Logger log =
+ LoggerFactory.getLogger(NonCachingSecretKeyEncryptionStrategy.class);
private void doKeyEncryptionOperation(int encryptionMode, CryptoModuleParameters params,
String pathToKeyName, Path pathToKey, FileSystem fs) throws IOException {
@@ -138,8 +138,8 @@ public class NonCachingSecretKeyEncryptionStrategy implements SecretKeyEncryptio
@SuppressWarnings("deprecation")
private String getFullPathToKey(CryptoModuleParameters params) {
- String pathToKeyName = params.getAllOptions()
- .get(Property.CRYPTO_DEFAULT_KEY_STRATEGY_KEY_LOCATION.getKey());
+ String pathToKeyName =
+ params.getAllOptions().get(Property.CRYPTO_DEFAULT_KEY_STRATEGY_KEY_LOCATION.getKey());
String instanceDirectory = params.getAllOptions().get(Property.INSTANCE_DFS_DIR.getKey());
if (pathToKeyName == null) {
diff --git a/core/src/main/java/org/apache/accumulo/core/trace/DistributedTrace.java b/core/src/main/java/org/apache/accumulo/core/trace/DistributedTrace.java
index 010717a..77bb7ba 100644
--- a/core/src/main/java/org/apache/accumulo/core/trace/DistributedTrace.java
+++ b/core/src/main/java/org/apache/accumulo/core/trace/DistributedTrace.java
@@ -98,11 +98,11 @@ public class DistributedTrace {
public static void enable(String hostname, String service, ClientConfiguration conf) {
String spanReceivers = conf.get(ClientProperty.TRACE_SPAN_RECEIVERS);
String zookeepers = conf.get(ClientProperty.INSTANCE_ZK_HOST);
- long timeout = AccumuloConfiguration
- .getTimeInMillis(conf.get(ClientProperty.INSTANCE_ZK_TIMEOUT));
+ long timeout =
+ AccumuloConfiguration.getTimeInMillis(conf.get(ClientProperty.INSTANCE_ZK_TIMEOUT));
String zkPath = conf.get(ClientProperty.TRACE_ZK_PATH);
- Map<String,String> properties = conf
- .getAllPropertiesWithPrefix(ClientProperty.TRACE_SPAN_RECEIVER_PREFIX);
+ Map<String,String> properties =
+ conf.getAllPropertiesWithPrefix(ClientProperty.TRACE_SPAN_RECEIVER_PREFIX);
enableTracing(hostname, service, spanReceivers, zookeepers, timeout, zkPath, properties);
}
@@ -115,8 +115,8 @@ public class DistributedTrace {
String zookeepers = conf.get(Property.INSTANCE_ZK_HOST);
long timeout = conf.getTimeInMillis(Property.INSTANCE_ZK_TIMEOUT);
String zkPath = conf.get(Property.TRACE_ZK_PATH);
- Map<String,String> properties = conf
- .getAllPropertiesWithPrefix(Property.TRACE_SPAN_RECEIVER_PREFIX);
+ Map<String,String> properties =
+ conf.getAllPropertiesWithPrefix(Property.TRACE_SPAN_RECEIVER_PREFIX);
enableTracing(hostname, service, spanReceivers, zookeepers, timeout, zkPath, properties);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/util/CreateToken.java b/core/src/main/java/org/apache/accumulo/core/util/CreateToken.java
index a42198e..059e7fa 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/CreateToken.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/CreateToken.java
@@ -97,8 +97,8 @@ public class CreateToken implements KeywordExecutable {
principal = getConsoleReader().readLine("Username (aka principal): ");
}
- AuthenticationToken token = Class.forName(opts.tokenClassName)
- .asSubclass(AuthenticationToken.class).newInstance();
+ AuthenticationToken token =
+ Class.forName(opts.tokenClassName).asSubclass(AuthenticationToken.class).newInstance();
Properties props = new Properties();
for (TokenProperty tp : token.getProperties()) {
String input;
@@ -114,8 +114,8 @@ public class CreateToken implements KeywordExecutable {
props.put(tp.getKey(), input);
token.init(props);
}
- String tokenBase64 = Base64
- .encodeBase64String(AuthenticationTokenSerializer.serialize(token));
+ String tokenBase64 =
+ Base64.encodeBase64String(AuthenticationTokenSerializer.serialize(token));
String tokenFile = opts.tokenFile;
if (tokenFile == null) {
diff --git a/core/src/main/java/org/apache/accumulo/core/util/HostAndPort.java b/core/src/main/java/org/apache/accumulo/core/util/HostAndPort.java
index ca21023..59968f5 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/HostAndPort.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/HostAndPort.java
@@ -35,8 +35,8 @@ import com.google.common.base.Strings;
* Example usage:
*
* <pre>
- * HostAndPort hp = HostAndPort.fromString("[2001:db8::1]").withDefaultPort(80)
- * .requireBracketsForIPv6();
+ * HostAndPort hp =
+ * HostAndPort.fromString("[2001:db8::1]").withDefaultPort(80).requireBracketsForIPv6();
* hp.getHost(); // returns "2001:db8::1"
* hp.getPort(); // returns 80
* hp.toString(); // returns "[2001:db8::1]:80"
diff --git a/core/src/main/java/org/apache/accumulo/core/util/LocalityGroupUtil.java b/core/src/main/java/org/apache/accumulo/core/util/LocalityGroupUtil.java
index 040f8d0..3e854b7 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/LocalityGroupUtil.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/LocalityGroupUtil.java
@@ -97,8 +97,8 @@ public class LocalityGroupUtil {
}
}
- public static Map<String,Set<ByteSequence>> getLocalityGroupsIgnoringErrors(
- AccumuloConfiguration acuconf, String tableId) {
+ public static Map<String,Set<ByteSequence>>
+ getLocalityGroupsIgnoringErrors(AccumuloConfiguration acuconf, String tableId) {
try {
return getLocalityGroups(acuconf);
} catch (LocalityGroupConfigurationError | RuntimeException e) {
diff --git a/core/src/main/java/org/apache/accumulo/core/util/Merge.java b/core/src/main/java/org/apache/accumulo/core/util/Merge.java
index 4b01131..91ca5e7 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/Merge.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/Merge.java
@@ -93,8 +93,8 @@ public class Merge {
return;
}
if (opts.goalSize == null || opts.goalSize < 1) {
- AccumuloConfiguration tableConfig = new ConfigurationCopy(
- conn.tableOperations().getProperties(opts.getTableName()));
+ AccumuloConfiguration tableConfig =
+ new ConfigurationCopy(conn.tableOperations().getProperties(opts.getTableName()));
opts.goalSize = tableConfig.getMemoryInBytes(Property.TABLE_SPLIT_THRESHOLD);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/util/ThriftMessageUtil.java b/core/src/main/java/org/apache/accumulo/core/util/ThriftMessageUtil.java
index 34e9a6a..f9f6517 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/ThriftMessageUtil.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/ThriftMessageUtil.java
@@ -92,8 +92,8 @@ public class ThriftMessageUtil {
public <T extends TBase<?,?>> T deserialize(byte[] serialized, int offset, int length, T instance)
throws IOException {
requireNonNull(instance);
- TCompactProtocol proto = new TCompactProtocol(
- new TMemoryInputTransport(serialized, offset, length));
+ TCompactProtocol proto =
+ new TCompactProtocol(new TMemoryInputTransport(serialized, offset, length));
try {
instance.read(proto);
} catch (TException e) {
diff --git a/core/src/main/java/org/apache/accumulo/core/util/format/DateStringFormatter.java b/core/src/main/java/org/apache/accumulo/core/util/format/DateStringFormatter.java
index 3f74524..5327761 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/format/DateStringFormatter.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/format/DateStringFormatter.java
@@ -34,8 +34,8 @@ import org.apache.accumulo.core.data.Value;
* <pre>
* final DateFormatSupplier dfSupplier = DateFormatSupplier.createSimpleFormatSupplier(
* DateFormatSupplier.HUMAN_READABLE_FORMAT, TimeZone.getTimeZone("UTC"));
- * final FormatterConfig config = new FormatterConfig().setPrintTimestamps(true)
- * .setDateFormatSupplier(dfSupplier);
+ * final FormatterConfig config =
+ * new FormatterConfig().setPrintTimestamps(true).setDateFormatSupplier(dfSupplier);
* </pre>
*/
@Deprecated
diff --git a/core/src/main/java/org/apache/accumulo/core/util/format/DefaultFormatter.java b/core/src/main/java/org/apache/accumulo/core/util/format/DefaultFormatter.java
index 6abee26..85e24f7 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/format/DefaultFormatter.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/format/DefaultFormatter.java
@@ -31,8 +31,8 @@ public class DefaultFormatter implements Formatter {
protected FormatterConfig config;
/** Used as default DateFormat for some static methods */
- private static final ThreadLocal<DateFormat> formatter = DateFormatSupplier
- .createDefaultFormatSupplier();
+ private static final ThreadLocal<DateFormat> formatter =
+ DateFormatSupplier.createDefaultFormatSupplier();
@Override
public void initialize(Iterable<Entry<Key,Value>> scanner, FormatterConfig config) {
diff --git a/core/src/main/java/org/apache/accumulo/core/util/format/HexFormatter.java b/core/src/main/java/org/apache/accumulo/core/util/format/HexFormatter.java
index 4f11ce5..4baa2ab 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/format/HexFormatter.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/format/HexFormatter.java
@@ -29,8 +29,8 @@ import org.apache.hadoop.io.Text;
*/
public class HexFormatter implements Formatter, ScanInterpreter {
- private char chars[] = new char[] {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b',
- 'c', 'd', 'e', 'f'};
+ private char chars[] =
+ new char[] {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
private Iterator<Entry<Key,Value>> iter;
private FormatterConfig config;
diff --git a/core/src/test/java/org/apache/accumulo/core/cli/TestClientOpts.java b/core/src/test/java/org/apache/accumulo/core/cli/TestClientOpts.java
index dc6f658..10cc877 100644
--- a/core/src/test/java/org/apache/accumulo/core/cli/TestClientOpts.java
+++ b/core/src/test/java/org/apache/accumulo/core/cli/TestClientOpts.java
@@ -51,8 +51,8 @@ import com.beust.jcommander.JCommander;
public class TestClientOpts {
@Rule
- public TemporaryFolder tmpDir = new TemporaryFolder(
- new File(System.getProperty("user.dir") + "/target"));
+ public TemporaryFolder tmpDir =
+ new TemporaryFolder(new File(System.getProperty("user.dir") + "/target"));
@Rule
public TestName testName = new TestName();
diff --git a/core/src/test/java/org/apache/accumulo/core/client/IteratorSettingTest.java b/core/src/test/java/org/apache/accumulo/core/client/IteratorSettingTest.java
index c1e89eb..910dce5 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/IteratorSettingTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/IteratorSettingTest.java
@@ -96,13 +96,13 @@ public class IteratorSettingTest {
@Test
public void testEquivalentConstructor() {
IteratorSetting setting1 = new IteratorSetting(100, Combiner.class);
- IteratorSetting setting2 = new IteratorSetting(100, "Combiner", Combiner.class,
- new HashMap<String,String>());
+ IteratorSetting setting2 =
+ new IteratorSetting(100, "Combiner", Combiner.class, new HashMap<String,String>());
assertEquals(setting1, setting2);
- IteratorSetting notEqual1 = new IteratorSetting(100, "FooCombiner", Combiner.class,
- new HashMap<String,String>());
+ IteratorSetting notEqual1 =
+ new IteratorSetting(100, "FooCombiner", Combiner.class, new HashMap<String,String>());
assertNotEquals(setting1, notEqual1);
diff --git a/core/src/test/java/org/apache/accumulo/core/client/TestThrift1474.java b/core/src/test/java/org/apache/accumulo/core/client/TestThrift1474.java
index fd87616..0493d14 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/TestThrift1474.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/TestThrift1474.java
@@ -63,8 +63,8 @@ public class TestThrift1474 {
serverTransport.listen();
int port = serverTransport.getServerSocket().getLocalPort();
TestServer handler = new TestServer();
- ThriftTest.Processor<ThriftTest.Iface> processor = new ThriftTest.Processor<ThriftTest.Iface>(
- handler);
+ ThriftTest.Processor<ThriftTest.Iface> processor =
+ new ThriftTest.Processor<ThriftTest.Iface>(handler);
TThreadPoolServer.Args args = new TThreadPoolServer.Args(serverTransport);
args.stopTimeoutVal = 10;
diff --git a/core/src/test/java/org/apache/accumulo/core/client/ZooKeeperInstanceTest.java b/core/src/test/java/org/apache/accumulo/core/client/ZooKeeperInstanceTest.java
index f35098f..636b6fe 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/ZooKeeperInstanceTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/ZooKeeperInstanceTest.java
@@ -164,8 +164,8 @@ public class ZooKeeperInstanceTest {
.andReturn(IID_STRING.getBytes(UTF_8));
expect(zc.get(Constants.ZROOT + "/" + IID_STRING)).andReturn("yup".getBytes());
replay(zc, factory);
- ClientConfiguration cfg = ClientConfiguration.loadDefault().withInstance(instanceName)
- .withZkHosts(zookeepers);
+ ClientConfiguration cfg =
+ ClientConfiguration.loadDefault().withInstance(instanceName).withZkHosts(zookeepers);
ZooKeeperInstance zki = new ZooKeeperInstance(cfg, factory);
assertEquals(zookeepers, zki.getZooKeepers());
assertEquals(instanceName, zki.getInstanceName());
diff --git a/core/src/test/java/org/apache/accumulo/core/client/impl/ScannerOptionsTest.java b/core/src/test/java/org/apache/accumulo/core/client/impl/ScannerOptionsTest.java
index 4b3feb2..d959aec 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/impl/ScannerOptionsTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/impl/ScannerOptionsTest.java
@@ -65,8 +65,8 @@ public class ScannerOptionsTest {
public void testFetchColumn() {
try (ScannerOptions options = new ScannerOptions()) {
assertEquals(0, options.getFetchedColumns().size());
- IteratorSetting.Column col = new IteratorSetting.Column(new Text("family"),
- new Text("qualifier"));
+ IteratorSetting.Column col =
+ new IteratorSetting.Column(new Text("family"), new Text("qualifier"));
options.fetchColumn(col);
SortedSet<Column> fetchedColumns = options.getFetchedColumns();
assertEquals(1, fetchedColumns.size());
diff --git a/core/src/test/java/org/apache/accumulo/core/client/impl/TabletLocatorImplTest.java b/core/src/test/java/org/apache/accumulo/core/client/impl/TabletLocatorImplTest.java
index 28a23a9..0ba87e5 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/impl/TabletLocatorImplTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/impl/TabletLocatorImplTest.java
@@ -144,8 +144,8 @@ public class TabletLocatorImplTest {
TestTabletLocationObtainer ttlo = new TestTabletLocationObtainer(tservers);
RootTabletLocator rtl = new TestRootTabletLocator();
- TabletLocatorImpl rootTabletCache = new TabletLocatorImpl(MetadataTable.ID, rtl, ttlo,
- new YesLockChecker());
+ TabletLocatorImpl rootTabletCache =
+ new TabletLocatorImpl(MetadataTable.ID, rtl, ttlo, new YesLockChecker());
TabletLocatorImpl tab1TabletCache = new TabletLocatorImpl(table, rootTabletCache, ttlo, tslc);
setLocation(tservers, rootTabLoc, RTE, MTE, metaTabLoc);
@@ -365,8 +365,8 @@ public class TabletLocatorImplTest {
public void testRemoveOverlapping2() {
// test removes when cache does not contain all tablets in a table
- TreeMap<Text,TabletLocation> mc = createMetaCache(nke("0", "r", "g"), "l1", nke("0", null, "r"),
- "l1");
+ TreeMap<Text,TabletLocation> mc =
+ createMetaCache(nke("0", "r", "g"), "l1", nke("0", null, "r"), "l1");
runTest(mc, nke("0", "a", null), nkes(nke("0", "r", "g"), nke("0", null, "r")));
runTest(mc, nke("0", "g", null), nkes(nke("0", "r", "g"), nke("0", null, "r")));
@@ -711,10 +711,10 @@ public class TabletLocatorImplTest {
TestTabletLocationObtainer ttlo = new TestTabletLocationObtainer(tservers);
RootTabletLocator rtl = new TestRootTabletLocator();
- TabletLocatorImpl rootTabletCache = new TabletLocatorImpl(MetadataTable.ID, rtl, ttlo,
- new YesLockChecker());
- TabletLocatorImpl tab1TabletCache = new TabletLocatorImpl("tab1", rootTabletCache, ttlo,
- new YesLockChecker());
+ TabletLocatorImpl rootTabletCache =
+ new TabletLocatorImpl(MetadataTable.ID, rtl, ttlo, new YesLockChecker());
+ TabletLocatorImpl tab1TabletCache =
+ new TabletLocatorImpl("tab1", rootTabletCache, ttlo, new YesLockChecker());
locateTabletTest(tab1TabletCache, "r1", null, null);
@@ -831,8 +831,8 @@ public class TabletLocatorImplTest {
// simulate a hole in the metadata, caused by a partial split
KeyExtent mte11 = new KeyExtent(MetadataTable.ID, tab1e1.getMetadataEntry(), RTE.getEndRow());
- KeyExtent mte12 = new KeyExtent(MetadataTable.ID, tab1e21.getMetadataEntry(),
- tab1e1.getMetadataEntry());
+ KeyExtent mte12 =
+ new KeyExtent(MetadataTable.ID, tab1e21.getMetadataEntry(), tab1e1.getMetadataEntry());
deleteServer(tservers, "tserver10");
setLocation(tservers, "tserver4", RTE, mte12, "tserver10");
setLocation(tservers, "tserver10", mte12, tab1e21, "tserver12");
@@ -879,10 +879,10 @@ public class TabletLocatorImplTest {
TabletLocatorImpl metaCache = createLocators("foo", nke("foo", null, null), "l1");
List<Range> ranges = nrl(nr(null, null));
- Map<String,Map<KeyExtent,List<Range>>> expected = createExpectedBinnings("l1",
- nol(nke("foo", null, null), nrl(nr(null, null)))
+ Map<String,Map<KeyExtent,List<Range>>> expected =
+ createExpectedBinnings("l1", nol(nke("foo", null, null), nrl(nr(null, null)))
- );
+ );
runTest(tableName, ranges, metaCache, expected);
@@ -907,14 +907,14 @@ public class TabletLocatorImplTest {
Text tableName = new Text("foo");
List<Range> ranges = nrl(nr(null, null));
- TabletLocatorImpl metaCache = createLocators("foo", nke("foo", "g", null), "l1",
- nke("foo", null, "g"), "l2");
+ TabletLocatorImpl metaCache =
+ createLocators("foo", nke("foo", "g", null), "l1", nke("foo", null, "g"), "l2");
- Map<String,Map<KeyExtent,List<Range>>> expected = createExpectedBinnings("l1",
- nol(nke("foo", "g", null), nrl(nr(null, null))), "l2",
- nol(nke("foo", null, "g"), nrl(nr(null, null)))
+ Map<String,Map<KeyExtent,List<Range>>> expected =
+ createExpectedBinnings("l1", nol(nke("foo", "g", null), nrl(nr(null, null))), "l2",
+ nol(nke("foo", null, "g"), nrl(nr(null, null)))
- );
+ );
runTest(tableName, ranges, metaCache, expected);
}
@@ -949,48 +949,48 @@ public class TabletLocatorImplTest {
// test is same as above, but has an additional range that spans the first two tablets
ranges = nrl(nr(null, "c"), nr("f", "i"), nr("s", "y"), nr("z", null));
- expected = createExpectedBinnings("l1",
- nol(nke("foo", "g", null), nrl(nr(null, "c"), nr("f", "i"))), "l2",
- nol(nke("foo", "m", "g"), nrl(nr("f", "i")), nke("foo", null, "m"),
- nrl(nr("s", "y"), nr("z", null)))
+ expected =
+ createExpectedBinnings("l1", nol(nke("foo", "g", null), nrl(nr(null, "c"), nr("f", "i"))),
+ "l2", nol(nke("foo", "m", "g"), nrl(nr("f", "i")), nke("foo", null, "m"),
+ nrl(nr("s", "y"), nr("z", null)))
- );
+ );
runTest(tableName, ranges, metaCache, expected);
// test where start of range is not inclusive and same as tablet endrow
ranges = nrl(nr("g", false, "m", true));
- expected = createExpectedBinnings("l2",
- nol(nke("foo", "m", "g"), nrl(nr("g", false, "m", true)))
+ expected =
+ createExpectedBinnings("l2", nol(nke("foo", "m", "g"), nrl(nr("g", false, "m", true)))
- );
+ );
runTest(tableName, ranges, metaCache, expected);
// test where start of range is inclusive and same as tablet endrow
ranges = nrl(nr("g", true, "m", true));
- expected = createExpectedBinnings("l1",
- nol(nke("foo", "g", null), nrl(nr("g", true, "m", true))), "l2",
- nol(nke("foo", "m", "g"), nrl(nr("g", true, "m", true)))
+ expected =
+ createExpectedBinnings("l1", nol(nke("foo", "g", null), nrl(nr("g", true, "m", true))),
+ "l2", nol(nke("foo", "m", "g"), nrl(nr("g", true, "m", true)))
- );
+ );
runTest(tableName, ranges, metaCache, expected);
ranges = nrl(nr("g", true, "m", false));
- expected = createExpectedBinnings("l1",
- nol(nke("foo", "g", null), nrl(nr("g", true, "m", false))), "l2",
- nol(nke("foo", "m", "g"), nrl(nr("g", true, "m", false)))
+ expected =
+ createExpectedBinnings("l1", nol(nke("foo", "g", null), nrl(nr("g", true, "m", false))),
+ "l2", nol(nke("foo", "m", "g"), nrl(nr("g", true, "m", false)))
- );
+ );
runTest(tableName, ranges, metaCache, expected);
ranges = nrl(nr("g", false, "m", false));
- expected = createExpectedBinnings("l2",
- nol(nke("foo", "m", "g"), nrl(nr("g", false, "m", false)))
+ expected =
+ createExpectedBinnings("l2", nol(nke("foo", "m", "g"), nrl(nr("g", false, "m", false)))
- );
+ );
runTest(tableName, ranges, metaCache, expected);
}
@@ -1000,26 +1000,26 @@ public class TabletLocatorImplTest {
Text tableName = new Text("foo");
List<Range> ranges = nrl(new Range(new Text("1")));
- TabletLocatorImpl metaCache = createLocators("foo", nke("foo", "0", null), "l1",
- nke("foo", "1", "0"), "l2", nke("foo", "2", "1"), "l3", nke("foo", "3", "2"), "l4",
- nke("foo", null, "3"), "l5");
+ TabletLocatorImpl metaCache =
+ createLocators("foo", nke("foo", "0", null), "l1", nke("foo", "1", "0"), "l2",
+ nke("foo", "2", "1"), "l3", nke("foo", "3", "2"), "l4", nke("foo", null, "3"), "l5");
- Map<String,Map<KeyExtent,List<Range>>> expected = createExpectedBinnings("l2",
- nol(nke("foo", "1", "0"), nrl(new Range(new Text("1"))))
+ Map<String,Map<KeyExtent,List<Range>>> expected =
+ createExpectedBinnings("l2", nol(nke("foo", "1", "0"), nrl(new Range(new Text("1"))))
- );
+ );
runTest(tableName, ranges, metaCache, expected);
Key rowColKey = new Key(new Text("3"), new Text("cf1"), new Text("cq1"));
- Range range = new Range(rowColKey, true, new Key(new Text("3")).followingKey(PartialKey.ROW),
- false);
+ Range range =
+ new Range(rowColKey, true, new Key(new Text("3")).followingKey(PartialKey.ROW), false);
ranges = nrl(range);
- Map<String,Map<KeyExtent,List<Range>>> expected4 = createExpectedBinnings("l4",
- nol(nke("foo", "3", "2"), nrl(range))
+ Map<String,Map<KeyExtent,List<Range>>> expected4 =
+ createExpectedBinnings("l4", nol(nke("foo", "3", "2"), nrl(range))
- );
+ );
runTest(tableName, ranges, metaCache, expected4, nrl());
@@ -1035,10 +1035,10 @@ public class TabletLocatorImplTest {
range = new Range(new Text("2"), false, new Text("3"), false);
ranges = nrl(range);
- Map<String,Map<KeyExtent,List<Range>>> expected6 = createExpectedBinnings("l4",
- nol(nke("foo", "3", "2"), nrl(range))
+ Map<String,Map<KeyExtent,List<Range>>> expected6 =
+ createExpectedBinnings("l4", nol(nke("foo", "3", "2"), nrl(range))
- );
+ );
runTest(tableName, ranges, metaCache, expected6, nrl());
range = new Range(new Text("2"), true, new Text("3"), false);
@@ -1051,10 +1051,10 @@ public class TabletLocatorImplTest {
range = new Range(new Text("2"), false, new Text("3"), true);
ranges = nrl(range);
- Map<String,Map<KeyExtent,List<Range>>> expected8 = createExpectedBinnings("l4",
- nol(nke("foo", "3", "2"), nrl(range))
+ Map<String,Map<KeyExtent,List<Range>>> expected8 =
+ createExpectedBinnings("l4", nol(nke("foo", "3", "2"), nrl(range))
- );
+ );
runTest(tableName, ranges, metaCache, expected8, nrl());
range = new Range(new Text("2"), true, new Text("3"), true);
@@ -1076,10 +1076,10 @@ public class TabletLocatorImplTest {
TabletLocatorImpl metaCache = createLocators("foo", nke("foo", "0", null), "l1",
nke("foo", "1", "0"), "l2", nke("foo", "3", "2"), "l4", nke("foo", null, "3"), "l5");
- Map<String,Map<KeyExtent,List<Range>>> expected1 = createExpectedBinnings("l2",
- nol(nke("foo", "1", "0"), nrl(new Range(new Text("1"))))
+ Map<String,Map<KeyExtent,List<Range>>> expected1 =
+ createExpectedBinnings("l2", nol(nke("foo", "1", "0"), nrl(new Range(new Text("1"))))
- );
+ );
runTest(tableName, ranges, metaCache, expected1);
@@ -1093,23 +1093,23 @@ public class TabletLocatorImplTest {
runTest(tableName, ranges, metaCache, expected1, nrl(new Range(new Text("2"))));
ranges = nrl(nr("0", "2"), nr("3", "4"));
- Map<String,Map<KeyExtent,List<Range>>> expected3 = createExpectedBinnings("l4",
- nol(nke("foo", "3", "2"), nrl(nr("3", "4"))), "l5",
- nol(nke("foo", null, "3"), nrl(nr("3", "4")))
+ Map<String,Map<KeyExtent,List<Range>>> expected3 =
+ createExpectedBinnings("l4", nol(nke("foo", "3", "2"), nrl(nr("3", "4"))), "l5",
+ nol(nke("foo", null, "3"), nrl(nr("3", "4")))
- );
+ );
runTest(tableName, ranges, metaCache, expected3, nrl(nr("0", "2")));
- ranges = nrl(nr("0", "1"), nr("0", "11"), nr("1", "2"), nr("0", "4"), nr("2", "4"),
- nr("21", "4"));
- Map<String,Map<KeyExtent,List<Range>>> expected4 = createExpectedBinnings("l1",
- nol(nke("foo", "0", null), nrl(nr("0", "1"))), "l2",
- nol(nke("foo", "1", "0"), nrl(nr("0", "1"))), "l4",
- nol(nke("foo", "3", "2"), nrl(nr("21", "4"))), "l5",
- nol(nke("foo", null, "3"), nrl(nr("21", "4")))
+ ranges =
+ nrl(nr("0", "1"), nr("0", "11"), nr("1", "2"), nr("0", "4"), nr("2", "4"), nr("21", "4"));
+ Map<String,Map<KeyExtent,List<Range>>> expected4 =
+ createExpectedBinnings("l1", nol(nke("foo", "0", null), nrl(nr("0", "1"))), "l2",
+ nol(nke("foo", "1", "0"), nrl(nr("0", "1"))), "l4",
+ nol(nke("foo", "3", "2"), nrl(nr("21", "4"))), "l5",
+ nol(nke("foo", null, "3"), nrl(nr("21", "4")))
- );
+ );
runTest(tableName, ranges, metaCache, expected4,
nrl(nr("0", "11"), nr("1", "2"), nr("0", "4"), nr("2", "4")));
@@ -1121,8 +1121,8 @@ public class TabletLocatorImplTest {
KeyExtent ke1 = nke("foo", null, null);
TabletLocatorImpl metaCache = createLocators("foo", ke1, "l1");
- List<Mutation> ml = nml(nm("a", "cf1:cq1=v1", "cf1:cq2=v2"),
- nm("c", "cf1:cq1=v3", "cf1:cq2=v4"));
+ List<Mutation> ml =
+ nml(nm("a", "cf1:cq1=v1", "cf1:cq2=v2"), nm("c", "cf1:cq1=v3", "cf1:cq2=v4"));
Map<String,Map<KeyExtent,List<String>>> emb = cemb(nol("a", "l1", ke1), nol("c", "l1", ke1));
runTest(metaCache, ml, emb);
@@ -1141,8 +1141,8 @@ public class TabletLocatorImplTest {
// no tablets for table
TabletLocatorImpl metaCache = createLocators("foo");
- List<Mutation> ml = nml(nm("a", "cf1:cq1=v1", "cf1:cq2=v2"),
- nm("c", "cf1:cq1=v3", "cf1:cq2=v4"));
+ List<Mutation> ml =
+ nml(nm("a", "cf1:cq1=v1", "cf1:cq2=v2"), nm("c", "cf1:cq1=v3", "cf1:cq2=v4"));
Map<String,Map<KeyExtent,List<String>>> emb = cemb();
runTest(metaCache, ml, emb, "a", "c");
}
@@ -1156,8 +1156,8 @@ public class TabletLocatorImplTest {
TabletLocatorImpl metaCache = createLocators("foo", ke1, "l1", ke2, "l2", ke3, "l3");
- List<Mutation> ml = nml(nm("a", "cf1:cq1=v1", "cf1:cq2=v2"),
- nm("i", "cf1:cq1=v3", "cf1:cq2=v4"));
+ List<Mutation> ml =
+ nml(nm("a", "cf1:cq1=v1", "cf1:cq2=v2"), nm("i", "cf1:cq1=v3", "cf1:cq2=v4"));
Map<String,Map<KeyExtent,List<String>>> emb = cemb(nol("a", "l1", ke1), nol("i", "l2", ke2));
runTest(metaCache, ml, emb);
@@ -1191,8 +1191,8 @@ public class TabletLocatorImplTest {
TabletLocatorImpl metaCache = createLocators("foo", ke1, "l1", ke3, "l3");
- List<Mutation> ml = nml(nm("a", "cf1:cq1=v1", "cf1:cq2=v2"),
- nm("i", "cf1:cq1=v3", "cf1:cq2=v4"));
+ List<Mutation> ml =
+ nml(nm("a", "cf1:cq1=v1", "cf1:cq2=v2"), nm("i", "cf1:cq1=v3", "cf1:cq2=v4"));
Map<String,Map<KeyExtent,List<String>>> emb = cemb(nol("a", "l1", ke1));
runTest(metaCache, ml, emb, "i");
@@ -1229,23 +1229,23 @@ public class TabletLocatorImplTest {
KeyExtent ke1 = nke("foo", null, null);
TServers tservers = new TServers();
- TabletLocatorImpl metaCache = createLocators(tservers, "tserver1", "tserver2", "foo", ke1,
- "l1");
+ TabletLocatorImpl metaCache =
+ createLocators(tservers, "tserver1", "tserver2", "foo", ke1, "l1");
List<Mutation> ml = nml(nm("a", "cf1:cq1=v1", "cf1:cq2=v2"),
nm("m", "cf1:cq1=v3", "cf1:cq2=v4"), nm("z", "cf1:cq1=v5"));
- Map<String,Map<KeyExtent,List<String>>> emb = cemb(nol("a", "l1", ke1), nol("m", "l1", ke1),
- nol("z", "l1", ke1));
+ Map<String,Map<KeyExtent,List<String>>> emb =
+ cemb(nol("a", "l1", ke1), nol("m", "l1", ke1), nol("z", "l1", ke1));
if (i == 0 || i == 2)
runTest(metaCache, ml, emb);
- List<Range> ranges = nrl(new Range(new Text("a")), new Range(new Text("m")),
- new Range(new Text("z")));
+ List<Range> ranges =
+ nrl(new Range(new Text("a")), new Range(new Text("m")), new Range(new Text("z")));
- Map<String,Map<KeyExtent,List<Range>>> expected1 = createExpectedBinnings("l1",
- nol(nke("foo", null, null), ranges)
+ Map<String,Map<KeyExtent,List<Range>>> expected1 =
+ createExpectedBinnings("l1", nol(nke("foo", null, null), ranges)
- );
+ );
if (i == 1 || i == 2)
runTest(new Text("foo"), ranges, metaCache, expected1);
@@ -1261,10 +1261,10 @@ public class TabletLocatorImplTest {
if (i == 0 || i == 2)
runTest(metaCache, ml, emb, "a", "m");
- Map<String,Map<KeyExtent,List<Range>>> expected2 = createExpectedBinnings("l2",
- nol(nke("foo", null, "n"), nrl(new Range(new Text("z"))))
+ Map<String,Map<KeyExtent,List<Range>>> expected2 =
+ createExpectedBinnings("l2", nol(nke("foo", null, "n"), nrl(new Range(new Text("z"))))
- );
+ );
if (i == 1 || i == 2)
runTest(new Text("foo"), ranges, metaCache, expected2,
@@ -1275,9 +1275,10 @@ public class TabletLocatorImplTest {
if (i == 0 || i == 2)
runTest(metaCache, ml, emb);
- Map<String,Map<KeyExtent,List<Range>>> expected3 = createExpectedBinnings("l2",
- nol(nke("foo", null, "n"), nrl(new Range(new Text("z")))), "l3",
- nol(nke("foo", "n", null), nrl(new Range(new Text("a")), new Range(new Text("m"))))
+ Map<String,
+ Map<KeyExtent,List<Range>>> expected3 = createExpectedBinnings("l2",
+ nol(nke("foo", null, "n"), nrl(new Range(new Text("z")))), "l3",
+ nol(nke("foo", "n", null), nrl(new Range(new Text("a")), new Range(new Text("m"))))
);
@@ -1296,10 +1297,10 @@ public class TabletLocatorImplTest {
TestTabletLocationObtainer ttlo = new TestTabletLocationObtainer(tservers);
RootTabletLocator rtl = new TestRootTabletLocator();
- TabletLocatorImpl rootTabletCache = new TabletLocatorImpl(MetadataTable.ID, rtl, ttlo,
- new YesLockChecker());
- TabletLocatorImpl tab0TabletCache = new TabletLocatorImpl("0", rootTabletCache, ttlo,
- new YesLockChecker());
+ TabletLocatorImpl rootTabletCache =
+ new TabletLocatorImpl(MetadataTable.ID, rtl, ttlo, new YesLockChecker());
+ TabletLocatorImpl tab0TabletCache =
+ new TabletLocatorImpl("0", rootTabletCache, ttlo, new YesLockChecker());
setLocation(tservers, "tserver1", RTE, mte1, "tserver2");
setLocation(tservers, "tserver1", RTE, mte2, "tserver3");
@@ -1325,10 +1326,10 @@ public class TabletLocatorImplTest {
TestTabletLocationObtainer ttlo = new TestTabletLocationObtainer(tservers);
RootTabletLocator rtl = new TestRootTabletLocator();
- TabletLocatorImpl rootTabletCache = new TabletLocatorImpl(MetadataTable.ID, rtl, ttlo,
- new YesLockChecker());
- TabletLocatorImpl tab0TabletCache = new TabletLocatorImpl("0", rootTabletCache, ttlo,
- new YesLockChecker());
+ TabletLocatorImpl rootTabletCache =
+ new TabletLocatorImpl(MetadataTable.ID, rtl, ttlo, new YesLockChecker());
+ TabletLocatorImpl tab0TabletCache =
+ new TabletLocatorImpl("0", rootTabletCache, ttlo, new YesLockChecker());
setLocation(tservers, "tserver1", RTE, mte1, "tserver2");
setLocation(tservers, "tserver1", RTE, mte2, "tserver3");
@@ -1359,10 +1360,10 @@ public class TabletLocatorImplTest {
RootTabletLocator rtl = new TestRootTabletLocator();
- TabletLocatorImpl rootTabletCache = new TabletLocatorImpl(MetadataTable.ID, rtl, ttlo,
- new YesLockChecker());
- TabletLocatorImpl tab0TabletCache = new TabletLocatorImpl("1", rootTabletCache, ttlo,
- new YesLockChecker());
+ TabletLocatorImpl rootTabletCache =
+ new TabletLocatorImpl(MetadataTable.ID, rtl, ttlo, new YesLockChecker());
+ TabletLocatorImpl tab0TabletCache =
+ new TabletLocatorImpl("1", rootTabletCache, ttlo, new YesLockChecker());
setLocation(tservers, "tserver1", RTE, mte1, "tserver2");
setLocation(tservers, "tserver1", RTE, mte2, "tserver3");
@@ -1408,8 +1409,8 @@ public class TabletLocatorImplTest {
final HashSet<String> activeLocks = new HashSet<>();
TServers tservers = new TServers();
- TabletLocatorImpl metaCache = createLocators(tservers, "tserver1", "tserver2", "foo",
- new TabletServerLockChecker() {
+ TabletLocatorImpl metaCache =
+ createLocators(tservers, "tserver1", "tserver2", "foo", new TabletServerLockChecker() {
@Override
public boolean isLockHeld(String tserver, String session) {
return activeLocks.contains(tserver + ":" + session);
@@ -1493,9 +1494,9 @@ public class TabletLocatorImplTest {
runTest(metaCache, ml, emb);
List<Range> ranges = nrl(new Range("a"), nr("b", "o"), nr("r", "z"));
- Map<String,Map<KeyExtent,List<Range>>> expected = createExpectedBinnings("L1",
- nol(ke11, nrl(new Range("a"), nr("b", "o"))), "L2",
- nol(ke12, nrl(nr("b", "o"), nr("r", "z"))));
+ Map<String,Map<KeyExtent,List<Range>>> expected =
+ createExpectedBinnings("L1", nol(ke11, nrl(new Range("a"), nr("b", "o"))), "L2",
+ nol(ke12, nrl(nr("b", "o"), nr("r", "z"))));
runTest(null, ranges, metaCache, expected);
diff --git a/core/src/test/java/org/apache/accumulo/core/client/impl/ThriftTransportKeyTest.java b/core/src/test/java/org/apache/accumulo/core/client/impl/ThriftTransportKeyTest.java
index 9afe22a..d2cd44c 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/impl/ThriftTransportKeyTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/impl/ThriftTransportKeyTest.java
@@ -80,8 +80,8 @@ public class ThriftTransportKeyTest {
clientConf.withSasl(true, primary);
// A first instance of the SASL cnxn params
- SaslConnectionParams saslParams1 = user1
- .doAs(new PrivilegedExceptionAction<SaslConnectionParams>() {
+ SaslConnectionParams saslParams1 =
+ user1.doAs(new PrivilegedExceptionAction<SaslConnectionParams>() {
@Override
public SaslConnectionParams run() throws Exception {
return new SaslConnectionParams(clientConf, token);
@@ -89,18 +89,18 @@ public class ThriftTransportKeyTest {
});
// A second instance of what should be the same SaslConnectionParams
- SaslConnectionParams saslParams2 = user1
- .doAs(new PrivilegedExceptionAction<SaslConnectionParams>() {
+ SaslConnectionParams saslParams2 =
+ user1.doAs(new PrivilegedExceptionAction<SaslConnectionParams>() {
@Override
public SaslConnectionParams run() throws Exception {
return new SaslConnectionParams(clientConf, token);
}
});
- ThriftTransportKey ttk1 = new ThriftTransportKey(HostAndPort.fromParts("localhost", 9997), 1l,
- null, saslParams1),
- ttk2 = new ThriftTransportKey(HostAndPort.fromParts("localhost", 9997), 1l, null,
- saslParams2);
+ ThriftTransportKey ttk1 =
+ new ThriftTransportKey(HostAndPort.fromParts("localhost", 9997), 1l, null, saslParams1),
+ ttk2 =
+ new ThriftTransportKey(HostAndPort.fromParts("localhost", 9997), 1l, null, saslParams2);
// Should equals() and hashCode() to make sure we don't throw away thrift cnxns
assertEquals(ttk1, ttk2);
@@ -111,8 +111,8 @@ public class ThriftTransportKeyTest {
public void testSaslPrincipalIsSignificant() throws IOException, InterruptedException {
UserGroupInformation user1 = UserGroupInformation.createUserForTesting("user1", new String[0]);
final KerberosToken token = EasyMock.createMock(KerberosToken.class);
- SaslConnectionParams saslParams1 = user1
- .doAs(new PrivilegedExceptionAction<SaslConnectionParams>() {
+ SaslConnectionParams saslParams1 =
+ user1.doAs(new PrivilegedExceptionAction<SaslConnectionParams>() {
@Override
public SaslConnectionParams run() throws Exception {
final ClientConfiguration clientConf = ClientConfiguration.loadDefault();
@@ -128,8 +128,8 @@ public class ThriftTransportKeyTest {
});
UserGroupInformation user2 = UserGroupInformation.createUserForTesting("user2", new String[0]);
- SaslConnectionParams saslParams2 = user2
- .doAs(new PrivilegedExceptionAction<SaslConnectionParams>() {
+ SaslConnectionParams saslParams2 =
+ user2.doAs(new PrivilegedExceptionAction<SaslConnectionParams>() {
@Override
public SaslConnectionParams run() throws Exception {
final ClientConfiguration clientConf = ClientConfiguration.loadDefault();
@@ -144,10 +144,10 @@ public class ThriftTransportKeyTest {
}
});
- ThriftTransportKey ttk1 = new ThriftTransportKey(HostAndPort.fromParts("localhost", 9997), 1l,
- null, saslParams1),
- ttk2 = new ThriftTransportKey(HostAndPort.fromParts("localhost", 9997), 1l, null,
- saslParams2);
+ ThriftTransportKey ttk1 =
+ new ThriftTransportKey(HostAndPort.fromParts("localhost", 9997), 1l, null, saslParams1),
+ ttk2 =
+ new ThriftTransportKey(HostAndPort.fromParts("localhost", 9997), 1l, null, saslParams2);
assertNotEquals(ttk1, ttk2);
assertNotEquals(ttk1.hashCode(), ttk2.hashCode());
@@ -162,8 +162,8 @@ public class ThriftTransportKeyTest {
replay(clientCtx);
- ThriftTransportKey ttk = new ThriftTransportKey(HostAndPort.fromParts("localhost", 9999),
- 120 * 1000, clientCtx);
+ ThriftTransportKey ttk =
+ new ThriftTransportKey(HostAndPort.fromParts("localhost", 9999), 120 * 1000, clientCtx);
assertTrue("Normal ThriftTransportKey doesn't equal itself", ttk.equals(ttk));
}
diff --git a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/PairLexicoderTest.java b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/PairLexicoderTest.java
index 9871e48..85c7c92 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/PairLexicoderTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/PairLexicoderTest.java
@@ -26,8 +26,8 @@ public class PairLexicoderTest extends AbstractLexicoderTest {
@Test
public void testSortOrder() {
- PairLexicoder<String,String> plexc = new PairLexicoder<>(new StringLexicoder(),
- new StringLexicoder());
+ PairLexicoder<String,String> plexc =
+ new PairLexicoder<>(new StringLexicoder(), new StringLexicoder());
assertSortOrder(plexc,
Arrays.asList(new ComparablePair<>("a", "b"), new ComparablePair<>("a", "bc"),
@@ -35,8 +35,8 @@ public class PairLexicoderTest extends AbstractLexicoderTest {
new ComparablePair<>("ab", ""), new ComparablePair<>("ab", "d"),
new ComparablePair<>("b", "f"), new ComparablePair<>("b", "a")));
- PairLexicoder<Long,String> plexc2 = new PairLexicoder<>(new LongLexicoder(),
- new StringLexicoder());
+ PairLexicoder<Long,String> plexc2 =
+ new PairLexicoder<>(new LongLexicoder(), new StringLexicoder());
assertSortOrder(plexc2,
Arrays.asList(new ComparablePair<>(0x100l, "a"), new ComparablePair<>(0x100l, "ab"),
@@ -45,8 +45,8 @@ public class PairLexicoderTest extends AbstractLexicoderTest {
@Test
public void testDecodes() {
- PairLexicoder<String,String> plexc = new PairLexicoder<>(new StringLexicoder(),
- new StringLexicoder());
+ PairLexicoder<String,String> plexc =
+ new PairLexicoder<>(new StringLexicoder(), new StringLexicoder());
assertDecodes(plexc, new ComparablePair<>("a", "b"));
}
}
diff --git a/core/src/test/java/org/apache/accumulo/core/client/mapred/AccumuloFileOutputFormatTest.java b/core/src/test/java/org/apache/accumulo/core/client/mapred/AccumuloFileOutputFormatTest.java
index 872a952..e9bf51f 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/mapred/AccumuloFileOutputFormatTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/mapred/AccumuloFileOutputFormatTest.java
@@ -51,8 +51,8 @@ public class AccumuloFileOutputFormatTest {
AccumuloFileOutputFormat.setCompressionType(job, e);
AccumuloFileOutputFormat.setSampler(job, samplerConfig);
- AccumuloConfiguration acuconf = FileOutputConfigurator
- .getAccumuloConfiguration(AccumuloFileOutputFormat.class, job);
+ AccumuloConfiguration acuconf =
+ FileOutputConfigurator.getAccumuloConfiguration(AccumuloFileOutputFormat.class, job);
assertEquals(7, acuconf.getCount(Property.TABLE_FILE_REPLICATION));
assertEquals(300l, acuconf.getMemoryInBytes(Property.TABLE_FILE_BLOCK_SIZE));
diff --git a/core/src/test/java/org/apache/accumulo/core/client/mapred/AccumuloInputFormatTest.java b/core/src/test/java/org/apache/accumulo/core/client/mapred/AccumuloInputFormatTest.java
index f93adc4..a7b4360 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/mapred/AccumuloInputFormatTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/mapred/AccumuloInputFormatTest.java
@@ -51,8 +51,8 @@ public class AccumuloInputFormatTest {
*/
@Test
public void testSetIterator() throws IOException {
- IteratorSetting is = new IteratorSetting(1, "WholeRow",
- "org.apache.accumulo.core.iterators.WholeRowIterator");
+ IteratorSetting is =
+ new IteratorSetting(1, "WholeRow", "org.apache.accumulo.core.iterators.WholeRowIterator");
AccumuloInputFormat.addIterator(job, is);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
is.write(new DataOutputStream(baos));
@@ -66,8 +66,8 @@ public class AccumuloInputFormatTest {
new IteratorSetting(1, "WholeRow", WholeRowIterator.class));
AccumuloInputFormat.addIterator(job, new IteratorSetting(2, "Versions",
"org.apache.accumulo.core.iterators.VersioningIterator"));
- IteratorSetting iter = new IteratorSetting(3, "Count",
- "org.apache.accumulo.core.iterators.CountingIterator");
+ IteratorSetting iter =
+ new IteratorSetting(3, "Count", "org.apache.accumulo.core.iterators.CountingIterator");
iter.addOption("v1", "1");
iter.addOption("junk", "\0omg:!\\xyzzy");
AccumuloInputFormat.addIterator(job, iter);
diff --git a/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java b/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java
index 52f2af5..2d42468 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java
@@ -45,8 +45,8 @@ public class AccumuloInputFormatTest {
public void testSetIterator() throws IOException {
Job job = Job.getInstance();
- IteratorSetting is = new IteratorSetting(1, "WholeRow",
- "org.apache.accumulo.core.iterators.WholeRowIterator");
+ IteratorSetting is =
+ new IteratorSetting(1, "WholeRow", "org.apache.accumulo.core.iterators.WholeRowIterator");
AccumuloInputFormat.addIterator(job, is);
Configuration conf = job.getConfiguration();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -63,8 +63,8 @@ public class AccumuloInputFormatTest {
new IteratorSetting(1, "WholeRow", WholeRowIterator.class));
AccumuloInputFormat.addIterator(job, new IteratorSetting(2, "Versions",
"org.apache.accumulo.core.iterators.VersioningIterator"));
- IteratorSetting iter = new IteratorSetting(3, "Count",
- "org.apache.accumulo.core.iterators.CountingIterator");
+ IteratorSetting iter =
+ new IteratorSetting(3, "Count", "org.apache.accumulo.core.iterators.CountingIterator");
iter.addOption("v1", "1");
iter.addOption("junk", "\0omg:!\\xyzzy");
AccumuloInputFormat.addIterator(job, iter);
diff --git a/core/src/test/java/org/apache/accumulo/core/client/mapreduce/impl/BatchInputSplitTest.java b/core/src/test/java/org/apache/accumulo/core/client/mapreduce/impl/BatchInputSplitTest.java
index cba6433..62ccaff 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/mapreduce/impl/BatchInputSplitTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/mapreduce/impl/BatchInputSplitTest.java
@@ -48,8 +48,8 @@ public class BatchInputSplitTest {
@Test
public void testSimpleWritable() throws IOException {
Range[] ranges = new Range[] {new Range(new Key("a"), new Key("b"))};
- BatchInputSplit split = new BatchInputSplit("table", "1", Arrays.asList(ranges),
- new String[] {"localhost"});
+ BatchInputSplit split =
+ new BatchInputSplit("table", "1", Arrays.asList(ranges), new String[] {"localhost"});
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
@@ -70,8 +70,8 @@ public class BatchInputSplitTest {
@Test
public void testAllFieldsWritable() throws IOException {
Range[] ranges = new Range[] {new Range(new Key("a"), new Key("b"))};
- BatchInputSplit split = new BatchInputSplit("table", "1", Arrays.asList(ranges),
- new String[] {"localhost"});
+ BatchInputSplit split =
+ new BatchInputSplit("table", "1", Arrays.asList(ranges), new String[] {"localhost"});
Set<Pair<Text,Text>> fetchedColumns = new HashSet<>();
diff --git a/core/src/test/java/org/apache/accumulo/core/client/mapreduce/lib/partition/RangePartitionerTest.java b/core/src/test/java/org/apache/accumulo/core/client/mapreduce/lib/partition/RangePartitionerTest.java
index e194a76..d9f0683 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/mapreduce/lib/partition/RangePartitionerTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/mapreduce/lib/partition/RangePartitionerTest.java
@@ -66,8 +66,8 @@ public class RangePartitionerTest {
for (int i = 0; i < strings.length; ++i) {
int endRange = rangeEnds[i];
int startRange = endRange + 1 - numSubBins;
- int part = prepPartitioner(numSubBins).findPartition(new Text(strings[i]), cutArray,
- numSubBins);
+ int part =
+ prepPartitioner(numSubBins).findPartition(new Text(strings[i]), cutArray, numSubBins);
assertTrue(part >= startRange);
assertTrue(part <= endRange);
}
@@ -76,8 +76,8 @@ public class RangePartitionerTest {
private void checkExpectedBins(int numSubBins, String[] strings, int[] bins) throws IOException {
assertTrue(strings.length == bins.length);
for (int i = 0; i < strings.length; ++i) {
- int bin = bins[i], part = prepPartitioner(numSubBins).findPartition(new Text(strings[i]),
- cutArray, numSubBins);
+ int bin = bins[i], part =
+ prepPartitioner(numSubBins).findPartition(new Text(strings[i]), cutArray, numSubBins);
assertTrue(bin == part);
}
}
diff --git a/core/src/test/java/org/apache/accumulo/core/client/mock/MockConnectorTest.java b/core/src/test/java/org/apache/accumulo/core/client/mock/MockConnectorTest.java
index d9e9d5a..6f0df2f 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/mock/MockConnectorTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/mock/MockConnectorTest.java
@@ -116,7 +116,7 @@ public class MockConnectorTest {
fail("addMutations should throw IAE for null iterable");
} catch (IllegalArgumentException iae) {}
- bw.addMutations(Collections.<Mutation> emptyList());
+ bw.addMutations(Collections.<Mutation>emptyList());
Mutation bad = new Mutation("bad");
try {
@@ -212,8 +212,8 @@ public class MockConnectorTest {
c.tableOperations().delete("test");
c.tableOperations().create("test");
- BatchDeleter deleter = c.createBatchDeleter("test", Authorizations.EMPTY, 2,
- new BatchWriterConfig());
+ BatchDeleter deleter =
+ c.createBatchDeleter("test", Authorizations.EMPTY, 2, new BatchWriterConfig());
// first make sure it deletes fine when its empty
deleter.setRanges(Collections.singletonList(new Range(("r1"))));
deleter.delete();
diff --git a/core/src/test/java/org/apache/accumulo/core/client/mock/MockScannerTest.java b/core/src/test/java/org/apache/accumulo/core/client/mock/MockScannerTest.java
index 3cbe233..d7e445e 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/mock/MockScannerTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/mock/MockScannerTest.java
@@ -90,8 +90,8 @@ public class MockScannerTest {
@Test
public void testEnvironment() throws Exception {
- MockScannerBase.MockIteratorEnvironment env = new MockScannerBase.MockIteratorEnvironment(
- Authorizations.EMPTY);
+ MockScannerBase.MockIteratorEnvironment env =
+ new MockScannerBase.MockIteratorEnvironment(Authorizations.EMPTY);
assertFalse(env.isSamplingEnabled());
assertNull(env.getSamplerConfiguration());
try {
diff --git a/core/src/test/java/org/apache/accumulo/core/client/rfile/RFileTest.java b/core/src/test/java/org/apache/accumulo/core/client/rfile/RFileTest.java
index 1d9656b..3999ce9 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/rfile/RFileTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/rfile/RFileTest.java
@@ -128,14 +128,14 @@ public class RFileTest {
Range range1 = Range.exact(rowStr(5));
scanner.setRange(range1);
Iterator<Entry<Key,Value>> scnIter1 = scanner.iterator();
- Iterator<Entry<Key,Value>> mapIter1 = testData.subMap(range1.getStartKey(), range1.getEndKey())
- .entrySet().iterator();
+ Iterator<Entry<Key,Value>> mapIter1 =
+ testData.subMap(range1.getStartKey(), range1.getEndKey()).entrySet().iterator();
Range range2 = new Range(rowStr(3), true, rowStr(4), true);
scanner.setRange(range2);
Iterator<Entry<Key,Value>> scnIter2 = scanner.iterator();
- Iterator<Entry<Key,Value>> mapIter2 = testData.subMap(range2.getStartKey(), range2.getEndKey())
- .entrySet().iterator();
+ Iterator<Entry<Key,Value>> mapIter2 =
+ testData.subMap(range2.getStartKey(), range2.getEndKey()).entrySet().iterator();
while (scnIter1.hasNext() || scnIter2.hasNext()) {
if (scnIter1.hasNext()) {
@@ -199,8 +199,8 @@ public class RFileTest {
Map<String,String> props = new HashMap<>();
props.put(Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE.getKey(), "1K");
props.put(Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE_INDEX.getKey(), "1K");
- RFileWriter writer = RFile.newWriter().to(testFile).withFileSystem(localFs)
- .withTableProperties(props).build();
+ RFileWriter writer =
+ RFile.newWriter().to(testFile).withFileSystem(localFs).withTableProperties(props).build();
SortedMap<Key,Value> testData1 = createTestData(10, 10, 10);
writer.append(testData1.entrySet());
@@ -359,8 +359,8 @@ public class RFileTest {
assertFalse(scanner.iterator().hasNext());
scanner.close();
- scanner = RFile.newScanner().from(testFile).withFileSystem(localFs).withoutSystemIterators()
- .build();
+ scanner =
+ RFile.newScanner().from(testFile).withFileSystem(localFs).withoutSystemIterators().build();
assertEquals(ImmutableMap.of(k2, v2, k1, v1), toMap(scanner));
scanner.setRange(new Range("r2"));
assertFalse(scanner.iterator().hasNext());
@@ -375,8 +375,8 @@ public class RFileTest {
// set a lower bound row
Range bounds = new Range(rowStr(3), false, null, true);
- Scanner scanner = RFile.newScanner().from(testFile).withFileSystem(localFs).withBounds(bounds)
- .build();
+ Scanner scanner =
+ RFile.newScanner().from(testFile).withFileSystem(localFs).withBounds(bounds).build();
assertEquals(createTestData(4, 6, 0, 10, 10), toMap(scanner));
scanner.close();
@@ -442,8 +442,8 @@ public class RFileTest {
SamplerConfiguration sc = new SamplerConfiguration(RowSampler.class)
.setOptions(ImmutableMap.of("hasher", "murmur3_32", "modulus", "19"));
- RFileWriter writer = RFile.newWriter().to(testFile).withFileSystem(localFs).withSampler(sc)
- .build();
+ RFileWriter writer =
+ RFile.newWriter().to(testFile).withFileSystem(localFs).withSampler(sc).build();
writer.append(testData1.entrySet());
writer.close();
@@ -644,8 +644,8 @@ public class RFileTest {
@Test
public void testMultipleFilesAndCache() throws Exception {
SortedMap<Key,Value> testData = createTestData(100, 10, 10);
- List<String> files = Arrays.asList(createTmpTestFile(), createTmpTestFile(),
- createTmpTestFile());
+ List<String> files =
+ Arrays.asList(createTmpTestFile(), createTmpTestFile(), createTmpTestFile());
LocalFileSystem localFs = FileSystem.getLocal(new Configuration());
diff --git a/core/src/test/java/org/apache/accumulo/core/client/security/SecurityErrorCodeTest.java b/core/src/test/java/org/apache/accumulo/core/client/security/SecurityErrorCodeTest.java
index 5bf99ef..b6d3338 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/security/SecurityErrorCodeTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/security/SecurityErrorCodeTest.java
@@ -35,8 +35,7 @@ public class SecurityErrorCodeTest {
for (SecurityErrorCode sec : SecurityErrorCode.values())
secNames1.add(sec.name());
- for (org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode sec :
- org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode
+ for (org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode sec : org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode
.values())
secNames2.add(sec.name());
diff --git a/core/src/test/java/org/apache/accumulo/core/client/security/tokens/DelegationTokenImplTest.java b/core/src/test/java/org/apache/accumulo/core/client/security/tokens/DelegationTokenImplTest.java
index 57f67b6..ac96b26 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/security/tokens/DelegationTokenImplTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/security/tokens/DelegationTokenImplTest.java
@@ -33,11 +33,11 @@ public class DelegationTokenImplTest {
@Test
public void testSerialization() throws IOException {
- AuthenticationTokenIdentifier identifier = new AuthenticationTokenIdentifier("user", 1, 1000l,
- 2000l, "instanceid");
+ AuthenticationTokenIdentifier identifier =
+ new AuthenticationTokenIdentifier("user", 1, 1000l, 2000l, "instanceid");
// We don't need a real serialized Token for the password
- DelegationTokenImpl token = new DelegationTokenImpl(new byte[] {'f', 'a', 'k', 'e'},
- identifier);
+ DelegationTokenImpl token =
+ new DelegationTokenImpl(new byte[] {'f', 'a', 'k', 'e'}, identifier);
assertEquals(token, token);
assertEquals(token.hashCode(), token.hashCode());
@@ -53,24 +53,24 @@ public class DelegationTokenImplTest {
@Test
public void testEquality() throws IOException {
- AuthenticationTokenIdentifier identifier = new AuthenticationTokenIdentifier("user", 1, 1000l,
- 2000l, "instanceid");
+ AuthenticationTokenIdentifier identifier =
+ new AuthenticationTokenIdentifier("user", 1, 1000l, 2000l, "instanceid");
// We don't need a real serialized Token for the password
- DelegationTokenImpl token = new DelegationTokenImpl(new byte[] {'f', 'a', 'k', 'e'},
- identifier);
+ DelegationTokenImpl token =
+ new DelegationTokenImpl(new byte[] {'f', 'a', 'k', 'e'}, identifier);
- AuthenticationTokenIdentifier identifier2 = new AuthenticationTokenIdentifier("user1", 1, 1000l,
- 2000l, "instanceid");
+ AuthenticationTokenIdentifier identifier2 =
+ new AuthenticationTokenIdentifier("user1", 1, 1000l, 2000l, "instanceid");
// We don't need a real serialized Token for the password
- DelegationTokenImpl token2 = new DelegationTokenImpl(new byte[] {'f', 'a', 'k', 'e'},
- identifier2);
+ DelegationTokenImpl token2 =
+ new DelegationTokenImpl(new byte[] {'f', 'a', 'k', 'e'}, identifier2);
assertNotEquals(token, token2);
assertNotEquals(token.hashCode(), token2.hashCode());
// We don't need a real serialized Token for the password
- DelegationTokenImpl token3 = new DelegationTokenImpl(new byte[] {'f', 'a', 'k', 'e', '0'},
- identifier);
+ DelegationTokenImpl token3 =
+ new DelegationTokenImpl(new byte[] {'f', 'a', 'k', 'e', '0'}, identifier);
assertNotEquals(token, token3);
assertNotEquals(token.hashCode(), token3.hashCode());
diff --git a/core/src/test/java/org/apache/accumulo/core/client/security/tokens/KerberosTokenTest.java b/core/src/test/java/org/apache/accumulo/core/client/security/tokens/KerberosTokenTest.java
index b53f32e..416116a 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/security/tokens/KerberosTokenTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/security/tokens/KerberosTokenTest.java
@@ -33,8 +33,8 @@ public class KerberosTokenTest {
@Test
public void testAuthMethodAcceptance() {
// There is also KERBEROS_SSL but that appears to be deprecated/OBE
- Set<AuthenticationMethod> allowedMethods = new HashSet<>(
- Arrays.asList(AuthenticationMethod.KERBEROS, AuthenticationMethod.PROXY));
+ Set<AuthenticationMethod> allowedMethods =
+ new HashSet<>(Arrays.asList(AuthenticationMethod.KERBEROS, AuthenticationMethod.PROXY));
for (AuthenticationMethod authMethod : AuthenticationMethod.values()) {
final boolean allowable = allowedMethods.contains(authMethod);
try {
diff --git a/core/src/test/java/org/apache/accumulo/core/conf/CredentialProviderFactoryShimTest.java b/core/src/test/java/org/apache/accumulo/core/conf/CredentialProviderFactoryShimTest.java
index 7bb4ec1..95d2a2b 100644
--- a/core/src/test/java/org/apache/accumulo/core/conf/CredentialProviderFactoryShimTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/conf/CredentialProviderFactoryShimTest.java
@@ -46,8 +46,8 @@ import org.slf4j.LoggerFactory;
*/
public class CredentialProviderFactoryShimTest {
- private static final Logger log = LoggerFactory
- .getLogger(CredentialProviderFactoryShimTest.class);
+ private static final Logger log =
+ LoggerFactory.getLogger(CredentialProviderFactoryShimTest.class);
private static final String populatedKeyStoreName = "/accumulo.jceks",
emptyKeyStoreName = "/empty.jceks";
@@ -62,8 +62,8 @@ public class CredentialProviderFactoryShimTest {
Assume.assumeNoException(e);
}
- URL populatedKeyStoreUrl = CredentialProviderFactoryShimTest.class
- .getResource(populatedKeyStoreName),
+ URL populatedKeyStoreUrl =
+ CredentialProviderFactoryShimTest.class.getResource(populatedKeyStoreName),
emptyKeyStoreUrl = CredentialProviderFactoryShimTest.class.getResource(emptyKeyStoreName);
assertNotNull("Could not find " + populatedKeyStoreName, populatedKeyStoreUrl);
@@ -94,8 +94,8 @@ public class CredentialProviderFactoryShimTest {
assertEquals(expectation.keySet(), new HashSet<>(keys));
for (String expectedKey : keys) {
- char[] value = CredentialProviderFactoryShim.getValueFromCredentialProvider(conf,
- expectedKey);
+ char[] value =
+ CredentialProviderFactoryShim.getValueFromCredentialProvider(conf, expectedKey);
assertNotNull(value);
assertEquals(expectation.get(expectedKey), new String(value));
}
@@ -215,8 +215,8 @@ public class CredentialProviderFactoryShimTest {
public void existingConfigurationReturned() {
Configuration conf = new Configuration(false);
conf.set("foo", "bar");
- Configuration conf2 = CredentialProviderFactoryShim.getConfiguration(conf,
- "jceks:///file/accumulo.jceks");
+ Configuration conf2 =
+ CredentialProviderFactoryShim.getConfiguration(conf, "jceks:///file/accumulo.jceks");
// Same object
assertSame(conf, conf2);
assertEquals("bar", conf.get("foo"));
diff --git a/core/src/test/java/org/apache/accumulo/core/data/ConstraintViolationSummaryTest.java b/core/src/test/java/org/apache/accumulo/core/data/ConstraintViolationSummaryTest.java
index d6a6a70..8787423 100644
--- a/core/src/test/java/org/apache/accumulo/core/data/ConstraintViolationSummaryTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/data/ConstraintViolationSummaryTest.java
@@ -24,8 +24,8 @@ public class ConstraintViolationSummaryTest {
@Test
public void testToString() {
- ConstraintViolationSummary cvs = new ConstraintViolationSummary("fooClass", (short) 1,
- "fooDescription", 100L);
+ ConstraintViolationSummary cvs =
+ new ConstraintViolationSummary("fooClass", (short) 1, "fooDescription", 100L);
assertEquals("ConstraintViolationSummary(constrainClass:fooClass,"
+ " violationCode:1, violationDescription:fooDescription,"
+ " numberOfViolatingMutations:100)", cvs.toString());
diff --git a/core/src/test/java/org/apache/accumulo/core/data/KeyExtentTest.java b/core/src/test/java/org/apache/accumulo/core/data/KeyExtentTest.java
index 79968be..e7abea9 100644
--- a/core/src/test/java/org/apache/accumulo/core/data/KeyExtentTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/data/KeyExtentTest.java
@@ -300,11 +300,11 @@ public class KeyExtentTest {
results = KeyExtent.getKeyExtentsForRange(null, null, null);
assertTrue("Non-empty set returned from no extents", results.isEmpty());
- results = KeyExtent.getKeyExtentsForRange(null, null, Collections.<KeyExtent> emptySet());
+ results = KeyExtent.getKeyExtentsForRange(null, null, Collections.<KeyExtent>emptySet());
assertTrue("Non-empty set returned from no extents", results.isEmpty());
KeyExtent t = nke("t", null, null);
- results = KeyExtent.getKeyExtentsForRange(null, null, Collections.<KeyExtent> singleton(t));
+ results = KeyExtent.getKeyExtentsForRange(null, null, Collections.<KeyExtent>singleton(t));
assertEquals("Single tablet should always be returned", 1, results.size());
assertEquals(t, results.iterator().next());
}
diff --git a/core/src/test/java/org/apache/accumulo/core/data/KeyTest.java b/core/src/test/java/org/apache/accumulo/core/data/KeyTest.java
index 7c83cdc..99d8e58 100644
--- a/core/src/test/java/org/apache/accumulo/core/data/KeyTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/data/KeyTest.java
@@ -207,8 +207,8 @@ public class KeyTest {
ColumnVisibility colVisibility2 = new ColumnVisibility("v1");
Key bytesColVisibilityKey2 = new Key(row, colFamily, colQualifier, colVisibility2, ts);
- Key textColVisibilityKey2 = new Key(new Text(row), new Text(colFamily), new Text(colQualifier),
- colVisibility2, ts);
+ Key textColVisibilityKey2 =
+ new Key(new Text(row), new Text(colFamily), new Text(colQualifier), colVisibility2, ts);
assertEquals(bytesColVisibilityKey2, textColVisibilityKey2);
}
}
diff --git a/core/src/test/java/org/apache/accumulo/core/data/RangeTest.java b/core/src/test/java/org/apache/accumulo/core/data/RangeTest.java
index 43099b8..4ec2ebf 100644
--- a/core/src/test/java/org/apache/accumulo/core/data/RangeTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/data/RangeTest.java
@@ -251,8 +251,8 @@ public class RangeTest {
check(Range.mergeOverlapping(rl), expected);
rl = newRangeList(ke2, ke3, ke4);
- expected = newRangeList(
- new KeyExtent("tab1", new Text("bails"), new Text("Bank")).toMetadataRange());
+ expected =
+ newRangeList(new KeyExtent("tab1", new Text("bails"), new Text("Bank")).toMetadataRange());
check(Range.mergeOverlapping(rl), expected);
}
@@ -266,11 +266,11 @@ public class RangeTest {
// System.out.println("b1:"+b1+" b2:"+b2+" b3:"+b3+" b4:"+b4);
- List<Range> rl = newRangeList(
- new Range(new Key(new Text("a")), b1, new Key(new Text("m")), b2),
- new Range(new Key(new Text("b")), b3, new Key(new Text("n")), b4));
- List<Range> expected = newRangeList(
- new Range(new Key(new Text("a")), b1, new Key(new Text("n")), b4));
+ List<Range> rl =
+ newRangeList(new Range(new Key(new Text("a")), b1, new Key(new Text("m")), b2),
+ new Range(new Key(new Text("b")), b3, new Key(new Text("n")), b4));
+ List<Range> expected =
+ newRangeList(new Range(new Key(new Text("a")), b1, new Key(new Text("n")), b4));
check(Range.mergeOverlapping(rl), expected);
rl = newRangeList(new Range(new Key(new Text("a")), b1, new Key(new Text("m")), b2),
@@ -603,9 +603,11 @@ public class RangeTest {
runClipTest(fence, range);
// scanner was not handling edge case properly...
- Range scanRange = new Range(new Key("10;007cdc5b0".getBytes(), "~tab".getBytes(),
- "~pr".getBytes(), "".getBytes(), 130962, false), false,
- new Key(new Text("10<")).followingKey(PartialKey.ROW), false);
+ Range scanRange =
+ new Range(
+ new Key("10;007cdc5b0".getBytes(), "~tab".getBytes(), "~pr".getBytes(), "".getBytes(),
+ 130962, false),
+ false, new Key(new Text("10<")).followingKey(PartialKey.ROW), false);
// below is the proper check the scanner now does instead of just comparing the row bytes
scanRange.afterEndKey(new Key(new Text("10<")).followingKey(PartialKey.ROW));
}
@@ -865,8 +867,8 @@ public class RangeTest {
@Test
public void testReadFields_Check() throws Exception {
- Range r = new Range(new Key(new Text("soup")), true, false, new Key(new Text("nuts")), true,
- false);
+ Range r =
+ new Range(new Key(new Text("soup")), true, false, new Key(new Text("nuts")), true, false);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
r.write(dos);
@@ -894,8 +896,8 @@ public class RangeTest {
@Test
public void testThrift_Check() {
- Range r = new Range(new Key(new Text("soup")), true, false, new Key(new Text("nuts")), true,
- false);
+ Range r =
+ new Range(new Key(new Text("soup")), true, false, new Key(new Text("nuts")), true, false);
TRange tr = r.toThrift();
try {
@SuppressWarnings("unused")
diff --git a/core/src/test/java/org/apache/accumulo/core/file/BloomFilterLayerLookupTest.java b/core/src/test/java/org/apache/accumulo/core/file/BloomFilterLayerLookupTest.java
index 45599de..3596df8 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/BloomFilterLayerLookupTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/BloomFilterLayerLookupTest.java
@@ -55,8 +55,8 @@ public class BloomFilterLayerLookupTest {
public TestName testName = new TestName();
@Rule
- public TemporaryFolder tempDir = new TemporaryFolder(
- new File(System.getProperty("user.dir") + "/target"));
+ public TemporaryFolder tempDir =
+ new TemporaryFolder(new File(System.getProperty("user.dir") + "/target"));
@Test
public void test() throws IOException {
@@ -68,8 +68,8 @@ public class BloomFilterLayerLookupTest {
ArrayList<Integer> vals = new ArrayList<>(valsSet);
Collections.sort(vals);
- ConfigurationCopy acuconf = new ConfigurationCopy(
- AccumuloConfiguration.getDefaultConfiguration());
+ ConfigurationCopy acuconf =
+ new ConfigurationCopy(AccumuloConfiguration.getDefaultConfiguration());
acuconf.set(Property.TABLE_BLOOM_ENABLED, "true");
acuconf.set(Property.TABLE_BLOOM_KEY_FUNCTOR, ColumnFamilyFunctor.class.getName());
acuconf.set(Property.TABLE_FILE_TYPE, RFile.EXTENSION);
diff --git a/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java b/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
index a64c1a2..690c3cb 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
@@ -153,13 +153,13 @@ public class TestLruBlockCache {
long maxSize = 100000;
long blockSize = calculateBlockSizeDefault(maxSize, 10);
- LruBlockCache cache = new LruBlockCache(maxSize, blockSize, false,
- (int) Math.ceil(1.2 * maxSize / blockSize), LruBlockCache.DEFAULT_LOAD_FACTOR,
- LruBlockCache.DEFAULT_CONCURRENCY_LEVEL, 0.98f, // min
- 0.99f, // acceptable
- 0.25f, // single
- 0.50f, // multi
- 0.25f);// memory
+ LruBlockCache cache =
+ new LruBlockCache(maxSize, blockSize, false, (int) Math.ceil(1.2 * maxSize / blockSize),
+ LruBlockCache.DEFAULT_LOAD_FACTOR, LruBlockCache.DEFAULT_CONCURRENCY_LEVEL, 0.98f, // min
+ 0.99f, // acceptable
+ 0.25f, // single
+ 0.50f, // multi
+ 0.25f);// memory
Block[] singleBlocks = generateFixedBlocks(5, 10000, "single");
Block[] multiBlocks = generateFixedBlocks(5, 10000, "multi");
@@ -216,13 +216,13 @@ public class TestLruBlockCache {
long maxSize = 100000;
long blockSize = calculateBlockSize(maxSize, 10);
- LruBlockCache cache = new LruBlockCache(maxSize, blockSize, false,
- (int) Math.ceil(1.2 * maxSize / blockSize), LruBlockCache.DEFAULT_LOAD_FACTOR,
- LruBlockCache.DEFAULT_CONCURRENCY_LEVEL, 0.98f, // min
- 0.99f, // acceptable
- 0.33f, // single
- 0.33f, // multi
- 0.34f);// memory
+ LruBlockCache cache =
+ new LruBlockCache(maxSize, blockSize, false, (int) Math.ceil(1.2 * maxSize / blockSize),
+ LruBlockCache.DEFAULT_LOAD_FACTOR, LruBlockCache.DEFAULT_CONCURRENCY_LEVEL, 0.98f, // min
+ 0.99f, // acceptable
+ 0.33f, // single
+ 0.33f, // multi
+ 0.34f);// memory
Block[] singleBlocks = generateFixedBlocks(5, blockSize, "single");
Block[] multiBlocks = generateFixedBlocks(5, blockSize, "multi");
@@ -336,13 +336,13 @@ public class TestLruBlockCache {
long maxSize = 100000;
long blockSize = calculateBlockSize(maxSize, 10);
- LruBlockCache cache = new LruBlockCache(maxSize, blockSize, false,
- (int) Math.ceil(1.2 * maxSize / blockSize), LruBlockCache.DEFAULT_LOAD_FACTOR,
- LruBlockCache.DEFAULT_CONCURRENCY_LEVEL, 0.66f, // min
- 0.99f, // acceptable
- 0.33f, // single
- 0.33f, // multi
- 0.34f);// memory
+ LruBlockCache cache =
+ new LruBlockCache(maxSize, blockSize, false, (int) Math.ceil(1.2 * maxSize / blockSize),
+ LruBlockCache.DEFAULT_LOAD_FACTOR, LruBlockCache.DEFAULT_CONCURRENCY_LEVEL, 0.66f, // min
+ 0.99f, // acceptable
+ 0.33f, // single
+ 0.33f, // multi
+ 0.34f);// memory
Block[] singleBlocks = generateFixedBlocks(20, blockSize, "single");
Block[] multiBlocks = generateFixedBlocks(5, blockSize, "multi");
@@ -397,13 +397,13 @@ public class TestLruBlockCache {
long maxSize = 300000;
long blockSize = calculateBlockSize(maxSize, 31);
- LruBlockCache cache = new LruBlockCache(maxSize, blockSize, false,
- (int) Math.ceil(1.2 * maxSize / blockSize), LruBlockCache.DEFAULT_LOAD_FACTOR,
- LruBlockCache.DEFAULT_CONCURRENCY_LEVEL, 0.98f, // min
- 0.99f, // acceptable
- 0.33f, // single
- 0.33f, // multi
- 0.34f);// memory
+ LruBlockCache cache =
+ new LruBlockCache(maxSize, blockSize, false, (int) Math.ceil(1.2 * maxSize / blockSize),
+ LruBlockCache.DEFAULT_LOAD_FACTOR, LruBlockCache.DEFAULT_CONCURRENCY_LEVEL, 0.98f, // min
+ 0.99f, // acceptable
+ 0.33f, // single
+ 0.33f, // multi
+ 0.34f);// memory
Block[] singleBlocks = generateFixedBlocks(10, blockSize, "single");
Block[] multiBlocks = generateFixedBlocks(10, blockSize, "multi");
diff --git a/core/src/test/java/org/apache/accumulo/core/file/rfile/BlockIndexTest.java b/core/src/test/java/org/apache/accumulo/core/file/rfile/BlockIndexTest.java
index c886965..76d01d2 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/rfile/BlockIndexTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/rfile/BlockIndexTest.java
@@ -96,8 +96,8 @@ public class BlockIndexTest {
BlockIndexEntry bie;
- bie = blockIndex.seekBlock(new Key(RFileTest.formatString("", row), "cf1", "cq1"),
- cacheBlock);
+ bie =
+ blockIndex.seekBlock(new Key(RFileTest.formatString("", row), "cf1", "cq1"), cacheBlock);
if (i == 0)
assertSame(null, bie);
else
diff --git a/core/src/test/java/org/apache/accumulo/core/file/rfile/MultiThreadedRFileTest.java b/core/src/test/java/org/apache/accumulo/core/file/rfile/MultiThreadedRFileTest.java
index f68f4c2..53b73f0 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/rfile/MultiThreadedRFileTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/rfile/MultiThreadedRFileTest.java
@@ -68,8 +68,8 @@ public class MultiThreadedRFileTest {
private static final Collection<ByteSequence> EMPTY_COL_FAMS = new ArrayList<>();
@Rule
- public TemporaryFolder tempFolder = new TemporaryFolder(
- new File(System.getProperty("user.dir") + "/target"));
+ public TemporaryFolder tempFolder =
+ new TemporaryFolder(new File(System.getProperty("user.dir") + "/target"));
private static void checkIndex(Reader reader) throws IOException {
FileSKVIterator indexIter = reader.getIndex();
@@ -148,8 +148,8 @@ public class MultiThreadedRFileTest {
dos = fs.create(path, true);
CachableBlockFile.Writer _cbw = new CachableBlockFile.Writer(PositionedOutputs.wrap(dos),
"gz", conf, accumuloConfiguration);
- SamplerConfigurationImpl samplerConfig = SamplerConfigurationImpl
- .newSamplerConfig(accumuloConfiguration);
+ SamplerConfigurationImpl samplerConfig =
+ SamplerConfigurationImpl.newSamplerConfig(accumuloConfiguration);
Sampler sampler = null;
if (samplerConfig != null) {
sampler = SamplerFactory.newSampler(samplerConfig, accumuloConfiguration);
@@ -208,8 +208,8 @@ public class MultiThreadedRFileTest {
@Test
public void testMultipleReaders() throws IOException {
- final List<Throwable> threadExceptions = Collections
- .synchronizedList(new ArrayList<Throwable>());
+ final List<Throwable> threadExceptions =
+ Collections.synchronizedList(new ArrayList<Throwable>());
Map<String,MutableInt> messages = new HashMap<>();
Map<String,String> stackTrace = new HashMap<>();
diff --git a/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileMetricsTest.java b/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileMetricsTest.java
index db058f9..f5bfd2a 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileMetricsTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileMetricsTest.java
@@ -48,8 +48,8 @@ import com.google.common.util.concurrent.AtomicLongMap;
public class RFileMetricsTest {
@Rule
- public TemporaryFolder tempFolder = new TemporaryFolder(
- new File(System.getProperty("user.dir") + "/target"));
+ public TemporaryFolder tempFolder =
+ new TemporaryFolder(new File(System.getProperty("user.dir") + "/target"));
static {
Logger.getLogger(org.apache.hadoop.io.compress.CodecPool.class).setLevel(Level.OFF);
diff --git a/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java b/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java
index eee225d..d669743 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java
@@ -110,8 +110,8 @@ public class RFileTest {
private static final Collection<ByteSequence> EMPTY_COL_FAMS = new ArrayList<>();
@Rule
- public TemporaryFolder tempFolder = new TemporaryFolder(
- new File(System.getProperty("user.dir") + "/target"));
+ public TemporaryFolder tempFolder =
+ new TemporaryFolder(new File(System.getProperty("user.dir") + "/target"));
static class SeekableByteArrayInputStream extends ByteArrayInputStream
implements Seekable, PositionedReadable {
@@ -225,8 +225,8 @@ public class RFileTest {
CachableBlockFile.Writer _cbw = new CachableBlockFile.Writer(PositionedOutputs.wrap(dos),
"gz", conf, accumuloConfiguration);
- SamplerConfigurationImpl samplerConfig = SamplerConfigurationImpl
- .newSamplerConfig(accumuloConfiguration);
+ SamplerConfigurationImpl samplerConfig =
+ SamplerConfigurationImpl.newSamplerConfig(accumuloConfiguration);
Sampler sampler = null;
if (samplerConfig != null) {
@@ -1738,8 +1738,8 @@ public class RFileTest {
}
private AccumuloConfiguration setAndGetAccumuloConfig(String cryptoConfSetting) {
- ConfigurationCopy result = new ConfigurationCopy(
- AccumuloConfiguration.getDefaultConfiguration());
+ ConfigurationCopy result =
+ new ConfigurationCopy(AccumuloConfiguration.getDefaultConfiguration());
Configuration conf = new Configuration(false);
conf.addResource(cryptoConfSetting);
for (Entry<String,String> e : conf) {
@@ -2031,8 +2031,8 @@ public class RFileTest {
trf.openReader();
- FileSKVIterator sample = trf.reader
- .getSample(SamplerConfigurationImpl.newSamplerConfig(sampleConf));
+ FileSKVIterator sample =
+ trf.reader.getSample(SamplerConfigurationImpl.newSamplerConfig(sampleConf));
checkSample(sample, sampleData);
@@ -2148,8 +2148,8 @@ public class RFileTest {
assertTrue(sampleDataLG2.size() > 0);
trf.openReader(false);
- FileSKVIterator sample = trf.reader
- .getSample(SamplerConfigurationImpl.newSamplerConfig(sampleConf));
+ FileSKVIterator sample =
+ trf.reader.getSample(SamplerConfigurationImpl.newSamplerConfig(sampleConf));
checkSample(sample, sampleDataLG1, newColFamByteSequence("metaA", "metaB"), true);
checkSample(sample, sampleDataLG1, newColFamByteSequence("metaA"), true);
@@ -2284,50 +2284,50 @@ public class RFileTest {
MetadataSchema.TabletsSection.getRange().getEndKey().getRow()));
// table tablet's directory
- Key tableDirKey = new Key(tableExtent,
- TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.getColumnFamily(),
- TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.getColumnQualifier(), 0);
+ Key tableDirKey =
+ new Key(tableExtent, TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.getColumnFamily(),
+ TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.getColumnQualifier(), 0);
mfw.append(tableDirKey, new Value(/* TABLE_TABLETS_TABLET_DIR */"/table_info".getBytes()));
// table tablet time
- Key tableTimeKey = new Key(tableExtent,
- TabletsSection.ServerColumnFamily.TIME_COLUMN.getColumnFamily(),
- TabletsSection.ServerColumnFamily.TIME_COLUMN.getColumnQualifier(), 0);
+ Key tableTimeKey =
+ new Key(tableExtent, TabletsSection.ServerColumnFamily.TIME_COLUMN.getColumnFamily(),
+ TabletsSection.ServerColumnFamily.TIME_COLUMN.getColumnQualifier(), 0);
mfw.append(tableTimeKey, new Value((/* TabletTime.LOGICAL_TIME_ID */'L' + "0").getBytes()));
// table tablet's prevrow
- Key tablePrevRowKey = new Key(tableExtent,
- TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.getColumnFamily(),
- TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.getColumnQualifier(), 0);
+ Key tablePrevRowKey =
+ new Key(tableExtent, TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.getColumnFamily(),
+ TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.getColumnQualifier(), 0);
mfw.append(tablePrevRowKey, KeyExtent.encodePrevEndRow(null));
// ----------] default tablet info
Text defaultExtent = new Text(KeyExtent.getMetadataEntry(MetadataTable.ID, null));
// default's directory
- Key defaultDirKey = new Key(defaultExtent,
- TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.getColumnFamily(),
- TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.getColumnQualifier(), 0);
+ Key defaultDirKey =
+ new Key(defaultExtent, TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.getColumnFamily(),
+ TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.getColumnQualifier(), 0);
mfw.append(defaultDirKey, new Value(Constants.DEFAULT_TABLET_LOCATION.getBytes()));
// default's time
- Key defaultTimeKey = new Key(defaultExtent,
- TabletsSection.ServerColumnFamily.TIME_COLUMN.getColumnFamily(),
- TabletsSection.ServerColumnFamily.TIME_COLUMN.getColumnQualifier(), 0);
+ Key defaultTimeKey =
+ new Key(defaultExtent, TabletsSection.ServerColumnFamily.TIME_COLUMN.getColumnFamily(),
+ TabletsSection.ServerColumnFamily.TIME_COLUMN.getColumnQualifier(), 0);
mfw.append(defaultTimeKey, new Value((/* TabletTime.LOGICAL_TIME_ID */'L' + "0").getBytes()));
// default's prevrow
- Key defaultPrevRowKey = new Key(defaultExtent,
- TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.getColumnFamily(),
- TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.getColumnQualifier(), 0);
+ Key defaultPrevRowKey =
+ new Key(defaultExtent, TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.getColumnFamily(),
+ TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.getColumnQualifier(), 0);
mfw.append(defaultPrevRowKey,
KeyExtent.encodePrevEndRow(MetadataSchema.TabletsSection.getRange().getEndKey().getRow()));
testRfile.closeWriter();
if (true) {
- FileOutputStream fileOutputStream = new FileOutputStream(
- tempFolder.newFile("testEncryptedRootFile.rf"));
+ FileOutputStream fileOutputStream =
+ new FileOutputStream(tempFolder.newFile("testEncryptedRootFile.rf"));
fileOutputStream.write(testRfile.baos.toByteArray());
fileOutputStream.flush();
fileOutputStream.close();
diff --git a/core/src/test/java/org/apache/accumulo/core/file/rfile/RelativeKeyTest.java b/core/src/test/java/org/apache/accumulo/core/file/rfile/RelativeKeyTest.java
index 70bd772..87c606c 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/rfile/RelativeKeyTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/rfile/RelativeKeyTest.java
@@ -181,8 +181,8 @@ public class RelativeKeyTest {
Key currKey = null;
MutableByteSequence value = new MutableByteSequence(new byte[64], 0, 0);
- RelativeKey.SkippR skippr = RelativeKey.fastSkip(in, seekKey, value, prevKey, currKey,
- expectedKeys.size());
+ RelativeKey.SkippR skippr =
+ RelativeKey.fastSkip(in, seekKey, value, prevKey, currKey, expectedKeys.size());
assertEquals(1, skippr.skipped);
assertEquals(new Key(), skippr.prevKey);
assertEquals(expectedKeys.get(0), skippr.rk.getKey());
@@ -234,8 +234,8 @@ public class RelativeKeyTest {
Key currKey = null;
MutableByteSequence value = new MutableByteSequence(new byte[64], 0, 0);
- RelativeKey.SkippR skippr = RelativeKey.fastSkip(in, seekKey, value, prevKey, currKey,
- expectedKeys.size());
+ RelativeKey.SkippR skippr =
+ RelativeKey.fastSkip(in, seekKey, value, prevKey, currKey, expectedKeys.size());
assertEquals(seekIndex + 1, skippr.skipped);
assertEquals(expectedKeys.get(seekIndex - 1), skippr.prevKey);
@@ -253,8 +253,8 @@ public class RelativeKeyTest {
int left = expectedKeys.size();
- skippr = RelativeKey.fastSkip(in, expectedKeys.get(i), value, prevKey, currKey,
- expectedKeys.size());
+ skippr =
+ RelativeKey.fastSkip(in, expectedKeys.get(i), value, prevKey, currKey, expectedKeys.size());
assertEquals(i + 1, skippr.skipped);
left -= skippr.skipped;
assertEquals(expectedKeys.get(i - 1), skippr.prevKey);
@@ -274,8 +274,8 @@ public class RelativeKeyTest {
fKey = expectedKeys.get(i).followingKey(PartialKey.ROW_COLFAM);
int j;
for (j = i; expectedKeys.get(j).compareTo(fKey) < 0; j++) {}
- skippr = RelativeKey.fastSkip(in, fKey, value, expectedKeys.get(i - 1), expectedKeys.get(i),
- left);
+ skippr =
+ RelativeKey.fastSkip(in, fKey, value, expectedKeys.get(i - 1), expectedKeys.get(i), left);
assertEquals(j - i, skippr.skipped);
assertEquals(expectedKeys.get(j - 1), skippr.prevKey);
assertEquals(expectedKeys.get(j), skippr.rk.getKey());
diff --git a/core/src/test/java/org/apache/accumulo/core/file/rfile/bcfile/CompressionTest.java b/core/src/test/java/org/apache/accumulo/core/file/rfile/bcfile/CompressionTest.java
index 06080b1..8aac1e1 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/rfile/bcfile/CompressionTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/rfile/bcfile/CompressionTest.java
@@ -53,8 +53,8 @@ public class CompressionTest {
String extClazz = System.getProperty(Compression.Algorithm.CONF_LZO_CLASS);
String clazz = (extClazz != null) ? extClazz : "org.apache.hadoop.io.compress.LzoCodec";
try {
- CompressionCodec codec = (CompressionCodec) ReflectionUtils.newInstance(Class.forName(clazz),
- myConf);
+ CompressionCodec codec =
+ (CompressionCodec) ReflectionUtils.newInstance(Class.forName(clazz), myConf);
assertNotNull(codec);
isSupported.put(Compression.Algorithm.LZO, true);
@@ -66,8 +66,8 @@ public class CompressionTest {
extClazz = System.getProperty(Compression.Algorithm.CONF_SNAPPY_CLASS);
clazz = (extClazz != null) ? extClazz : "org.apache.hadoop.io.compress.SnappyCodec";
try {
- CompressionCodec codec = (CompressionCodec) ReflectionUtils.newInstance(Class.forName(clazz),
- myConf);
+ CompressionCodec codec =
+ (CompressionCodec) ReflectionUtils.newInstance(Class.forName(clazz), myConf);
assertNotNull(codec);
diff --git a/core/src/test/java/org/apache/accumulo/core/file/streams/RateLimitedOutputStreamTest.java b/core/src/test/java/org/apache/accumulo/core/file/streams/RateLimitedOutputStreamTest.java
index 25cbb43..d86a0bf 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/streams/RateLimitedOutputStreamTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/streams/RateLimitedOutputStreamTest.java
@@ -34,8 +34,8 @@ public class RateLimitedOutputStreamTest {
Random randGen = new Random();
MockRateLimiter rateLimiter = new MockRateLimiter();
long bytesWritten = 0;
- try (RateLimitedOutputStream os = new RateLimitedOutputStream(new NullOutputStream(),
- rateLimiter)) {
+ try (RateLimitedOutputStream os =
+ new RateLimitedOutputStream(new NullOutputStream(), rateLimiter)) {
for (int i = 0; i < 100; ++i) {
byte[] bytes = new byte[Math.abs(randGen.nextInt() % 65536)];
os.write(bytes);
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/FirstEntryInRowIteratorTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/FirstEntryInRowIteratorTest.java
index 2fc816b..0c2b449 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/FirstEntryInRowIteratorTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/FirstEntryInRowIteratorTest.java
@@ -43,7 +43,7 @@ public class FirstEntryInRowIteratorTest {
feiri.init(counter, Collections.singletonMap(FirstEntryInRowIterator.NUM_SCANS_STRING_NAME,
Integer.toString(numScans)), env);
- feiri.seek(range, Collections.<ByteSequence> emptySet(), false);
+ feiri.seek(range, Collections.<ByteSequence>emptySet(), false);
while (feiri.hasTop()) {
resultMap.put(feiri.getTopKey(), feiri.getTopValue());
feiri.next();
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/aggregation/conf/AggregatorConfigurationTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/aggregation/conf/AggregatorConfigurationTest.java
index 3ea684e..90fa596 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/aggregation/conf/AggregatorConfigurationTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/aggregation/conf/AggregatorConfigurationTest.java
@@ -48,11 +48,12 @@ public class AggregatorConfigurationTest {
private void runTest(Text colf) {
String encodedCols;
org.apache.accumulo.core.iterators.conf.PerColumnIteratorConfig ac3 =
- new org.apache.accumulo.core.iterators.conf.PerColumnIteratorConfig(colf, "com.foo.SuperAgg");
+ new org.apache.accumulo.core.iterators.conf.PerColumnIteratorConfig(colf,
+ "com.foo.SuperAgg");
encodedCols = ac3.encodeColumns();
org.apache.accumulo.core.iterators.conf.PerColumnIteratorConfig ac4 =
- org.apache.accumulo.core.iterators.conf.PerColumnIteratorConfig
- .decodeColumns(encodedCols, "com.foo.SuperAgg");
+ org.apache.accumulo.core.iterators.conf.PerColumnIteratorConfig.decodeColumns(encodedCols,
+ "com.foo.SuperAgg");
assertEquals(colf, ac4.getColumnFamily());
assertNull(ac4.getColumnQualifier());
@@ -61,12 +62,12 @@ public class AggregatorConfigurationTest {
@SuppressWarnings("deprecation")
private void runTest(Text colf, Text colq) {
org.apache.accumulo.core.iterators.conf.PerColumnIteratorConfig ac =
- new org.apache.accumulo.core.iterators.conf.PerColumnIteratorConfig(colf, colq,
- "com.foo.SuperAgg");
+ new org.apache.accumulo.core.iterators.conf.PerColumnIteratorConfig(colf, colq,
+ "com.foo.SuperAgg");
String encodedCols = ac.encodeColumns();
org.apache.accumulo.core.iterators.conf.PerColumnIteratorConfig ac2 =
- org.apache.accumulo.core.iterators.conf.PerColumnIteratorConfig
- .decodeColumns(encodedCols, "com.foo.SuperAgg");
+ org.apache.accumulo.core.iterators.conf.PerColumnIteratorConfig.decodeColumns(encodedCols,
+ "com.foo.SuperAgg");
assertEquals(colf, ac2.getColumnFamily());
assertEquals(colq, ac2.getColumnQualifier());
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/system/ColumnFilterTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/system/ColumnFilterTest.java
index 1e14362..ec2b2d1 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/system/ColumnFilterTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/system/ColumnFilterTest.java
@@ -77,9 +77,9 @@ public class ColumnFilterTest {
columns.add(newColumn("cf1"));
columns.add(newColumn("cf2", "cq1"));
- SortedKeyValueIterator<Key,Value> cf = ColumnQualifierFilter.wrap(new SortedMapIterator(data),
- columns);
- cf.seek(new Range(), Collections.<ByteSequence> emptySet(), false);
+ SortedKeyValueIterator<Key,Value> cf =
+ ColumnQualifierFilter.wrap(new SortedMapIterator(data), columns);
+ cf.seek(new Range(), Collections.<ByteSequence>emptySet(), false);
assertTrue(cf.hasTop());
assertEquals(newKey("r1", "cf1", "cq1"), cf.getTopKey());
@@ -102,9 +102,9 @@ public class ColumnFilterTest {
columns.add(newColumn("cf2", "cq1"));
- SortedKeyValueIterator<Key,Value> cf = ColumnQualifierFilter.wrap(new SortedMapIterator(data),
- columns);
- cf.seek(new Range(), Collections.<ByteSequence> emptySet(), false);
+ SortedKeyValueIterator<Key,Value> cf =
+ ColumnQualifierFilter.wrap(new SortedMapIterator(data), columns);
+ cf.seek(new Range(), Collections.<ByteSequence>emptySet(), false);
assertTrue(cf.hasTop());
assertEquals(newKey("r1", "cf2", "cq1"), cf.getTopKey());
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/system/VisibilityFilterTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/system/VisibilityFilterTest.java
index f7db5b1..2b78b0c 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/system/VisibilityFilterTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/system/VisibilityFilterTest.java
@@ -42,8 +42,8 @@ public class VisibilityFilterTest {
TreeMap<Key,Value> tm = new TreeMap<>();
tm.put(new Key("r1", "cf1", "cq1", "A&"), new Value(new byte[0]));
- SortedKeyValueIterator<Key,Value> filter = VisibilityFilter.wrap(new SortedMapIterator(tm),
- new Authorizations("A"), "".getBytes());
+ SortedKeyValueIterator<Key,Value> filter =
+ VisibilityFilter.wrap(new SortedMapIterator(tm), new Authorizations("A"), "".getBytes());
// suppress logging
Level prevLevel = Logger.getLogger(VisibilityFilter.class).getLevel();
@@ -62,8 +62,8 @@ public class VisibilityFilterTest {
tm.put(new Key("r1", "cf1", "cq1", ""), new Value(new byte[0]));
tm.put(new Key("r1", "cf1", "cq2", "C"), new Value(new byte[0]));
tm.put(new Key("r1", "cf1", "cq3", ""), new Value(new byte[0]));
- SortedKeyValueIterator<Key,Value> filter = VisibilityFilter.wrap(new SortedMapIterator(tm),
- Authorizations.EMPTY, "".getBytes());
+ SortedKeyValueIterator<Key,Value> filter =
+ VisibilityFilter.wrap(new SortedMapIterator(tm), Authorizations.EMPTY, "".getBytes());
filter.seek(new Range(), new HashSet<ByteSequence>(), false);
assertTrue(filter.hasTop());
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/user/CombinerTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/user/CombinerTest.java
index 1e188cc..1f7a082 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/user/CombinerTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/user/CombinerTest.java
@@ -81,8 +81,8 @@ public class CombinerTest {
}
}
- static final IteratorEnvironment SCAN_IE = new CombinerIteratorEnvironment(IteratorScope.scan,
- false);
+ static final IteratorEnvironment SCAN_IE =
+ new CombinerIteratorEnvironment(IteratorScope.scan, false);
static Key newKey(int row, int colf, int colq, long ts, boolean deleted) {
Key k = newKey(row, colf, colq, ts);
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/user/FilterTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/user/FilterTest.java
index 0dabd0d..53fab02 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/user/FilterTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/user/FilterTest.java
@@ -359,8 +359,8 @@ public class FilterTest {
}
assertTrue(tm.size() == 1000);
- SortedKeyValueIterator<Key,Value> a = ColumnQualifierFilter.wrap(new SortedMapIterator(tm),
- hsc);
+ SortedKeyValueIterator<Key,Value> a =
+ ColumnQualifierFilter.wrap(new SortedMapIterator(tm), hsc);
a.seek(new Range(), EMPTY_COL_FAMS, false);
assertEquals(size(a), 1000);
@@ -397,8 +397,8 @@ public class FilterTest {
}
assertTrue(tm.size() == 1000);
- SortedKeyValueIterator<Key,Value> a = VisibilityFilter.wrap(new SortedMapIterator(tm), auths,
- le2.getExpression());
+ SortedKeyValueIterator<Key,Value> a =
+ VisibilityFilter.wrap(new SortedMapIterator(tm), auths, le2.getExpression());
a.seek(new Range(), EMPTY_COL_FAMS, false);
int size = size(a);
assertTrue("size was " + size, size == 750);
@@ -412,8 +412,8 @@ public class FilterTest {
hsc.add(column);
}
- SortedKeyValueIterator<Key,Value> a = ColumnQualifierFilter.wrap(new SortedMapIterator(tm),
- hsc);
+ SortedKeyValueIterator<Key,Value> a =
+ ColumnQualifierFilter.wrap(new SortedMapIterator(tm), hsc);
a.seek(new Range(), EMPTY_COL_FAMS, false);
return a;
}
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/user/RowFilterTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/user/RowFilterTest.java
index 2f11603..6e7277e 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/user/RowFilterTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/user/RowFilterTest.java
@@ -180,13 +180,13 @@ public class RowFilterTest {
@Test
public void test1() throws Exception {
- ColumnFamilySkippingIterator source = new ColumnFamilySkippingIterator(
- new SortedMapIterator(createKeyValues()));
+ ColumnFamilySkippingIterator source =
+ new ColumnFamilySkippingIterator(new SortedMapIterator(createKeyValues()));
RowFilter filter = new SummingRowFilter();
- filter.init(source, Collections.<String,String> emptyMap(), new DefaultIteratorEnvironment());
+ filter.init(source, Collections.<String,String>emptyMap(), new DefaultIteratorEnvironment());
- filter.seek(new Range(), Collections.<ByteSequence> emptySet(), false);
+ filter.seek(new Range(), Collections.<ByteSequence>emptySet(), false);
assertEquals(new HashSet<>(Arrays.asList("2", "3")), getRows(filter));
@@ -195,13 +195,13 @@ public class RowFilterTest {
filter.seek(new Range(), ImmutableSet.of(cf), true);
assertEquals(new HashSet<>(Arrays.asList("1", "3", "0", "4")), getRows(filter));
- filter.seek(new Range("0", "4"), Collections.<ByteSequence> emptySet(), false);
+ filter.seek(new Range("0", "4"), Collections.<ByteSequence>emptySet(), false);
assertEquals(new HashSet<>(Arrays.asList("2", "3")), getRows(filter));
- filter.seek(new Range("2"), Collections.<ByteSequence> emptySet(), false);
+ filter.seek(new Range("2"), Collections.<ByteSequence>emptySet(), false);
assertEquals(new HashSet<>(Arrays.asList("2")), getRows(filter));
- filter.seek(new Range("4"), Collections.<ByteSequence> emptySet(), false);
+ filter.seek(new Range("4"), Collections.<ByteSequence>emptySet(), false);
assertEquals(new HashSet<String>(), getRows(filter));
filter.seek(new Range("4"), ImmutableSet.of(cf), true);
@@ -214,12 +214,12 @@ public class RowFilterTest {
SortedMapIterator source = new SortedMapIterator(createKeyValues());
RowFilter filter0 = new TrueFilter();
- filter0.init(source, Collections.<String,String> emptyMap(), new DefaultIteratorEnvironment());
+ filter0.init(source, Collections.<String,String>emptyMap(), new DefaultIteratorEnvironment());
RowFilter filter = new TrueFilter();
- filter.init(filter0, Collections.<String,String> emptyMap(), new DefaultIteratorEnvironment());
+ filter.init(filter0, Collections.<String,String>emptyMap(), new DefaultIteratorEnvironment());
- filter.seek(new Range(), Collections.<ByteSequence> emptySet(), false);
+ filter.seek(new Range(), Collections.<ByteSequence>emptySet(), false);
assertEquals(new HashSet<>(Arrays.asList("0", "1", "2", "3", "4")), getRows(filter));
}
@@ -230,12 +230,12 @@ public class RowFilterTest {
SortedMapIterator source = new SortedMapIterator(createKeyValues());
RowFilter filter0 = new RowZeroOrOneFilter();
- filter0.init(source, Collections.<String,String> emptyMap(), new DefaultIteratorEnvironment());
+ filter0.init(source, Collections.<String,String>emptyMap(), new DefaultIteratorEnvironment());
RowFilter filter = new RowOneOrTwoFilter();
- filter.init(filter0, Collections.<String,String> emptyMap(), new DefaultIteratorEnvironment());
+ filter.init(filter0, Collections.<String,String>emptyMap(), new DefaultIteratorEnvironment());
- filter.seek(new Range(), Collections.<ByteSequence> emptySet(), false);
+ filter.seek(new Range(), Collections.<ByteSequence>emptySet(), false);
assertEquals(new HashSet<>(Arrays.asList("1")), getRows(filter));
}
@@ -245,9 +245,9 @@ public class RowFilterTest {
SortedMapIterator source = new SortedMapIterator(createKeyValues());
RowFilter filter = new RowZeroOrOneFilter();
- filter.init(source, Collections.<String,String> emptyMap(), new DefaultIteratorEnvironment());
+ filter.init(source, Collections.<String,String>emptyMap(), new DefaultIteratorEnvironment());
- filter.seek(new Range(), Collections.<ByteSequence> emptySet(), false);
+ filter.seek(new Range(), Collections.<ByteSequence>emptySet(), false);
// Save off the first key and value
Key firstKey = filter.getTopKey();
@@ -268,7 +268,7 @@ public class RowFilterTest {
RowFilter copy = (RowFilter) filter.deepCopy(new DefaultIteratorEnvironment());
// Because it's a copy, we should be able to safely seek this one without affecting the original
- copy.seek(new Range(), Collections.<ByteSequence> emptySet(), false);
+ copy.seek(new Range(), Collections.<ByteSequence>emptySet(), false);
assertTrue("deepCopy'ed RowFilter did not have a top key", copy.hasTop());
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/user/TransformingIteratorTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/user/TransformingIteratorTest.java
index 77a2a79..76d64a5 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/user/TransformingIteratorTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/user/TransformingIteratorTest.java
@@ -59,8 +59,8 @@ import com.google.common.collect.ImmutableMap;
public class TransformingIteratorTest {
- private static Authorizations authorizations = new Authorizations("vis0", "vis1", "vis2", "vis3",
- "vis4");
+ private static Authorizations authorizations =
+ new Authorizations("vis0", "vis1", "vis2", "vis3", "vis4");
private static final Map<String,String> EMPTY_OPTS = ImmutableMap.of();
private TransformingIterator titer;
@@ -83,8 +83,8 @@ public class TransformingIteratorTest {
boolean setupAuths) throws IOException {
SortedMapIterator source = new SortedMapIterator(data);
ColumnFamilySkippingIterator cfsi = new ColumnFamilySkippingIterator(source);
- SortedKeyValueIterator<Key,Value> visFilter = VisibilityFilter.wrap(cfsi, authorizations,
- new byte[0]);
+ SortedKeyValueIterator<Key,Value> visFilter =
+ VisibilityFilter.wrap(cfsi, authorizations, new byte[0]);
ReuseIterator reuserIter = new ReuseIterator();
reuserIter.init(visFilter, EMPTY_OPTS, null);
try {
@@ -261,8 +261,8 @@ public class TransformingIteratorTest {
newKey = it.replaceKeyParts(originalKey, new Text("testCQ"), new Text("testCV"));
assertEquals(createDeleteKey("r", "cf", "testCQ", "testCV", 42), newKey);
- newKey = it.replaceKeyParts(originalKey, new Text("testCF"), new Text("testCQ"),
- new Text("testCV"));
+ newKey =
+ it.replaceKeyParts(originalKey, new Text("testCF"), new Text("testCQ"), new Text("testCV"));
assertEquals(createDeleteKey("r", "testCF", "testCQ", "testCV", 42), newKey);
}
@@ -396,8 +396,8 @@ public class TransformingIteratorTest {
@Test
public void testValidateOptions() {
TransformingIterator ti = new ColFamReversingKeyTransformingIterator();
- IteratorSetting is = new IteratorSetting(100, "cfrkt",
- ColFamReversingKeyTransformingIterator.class);
+ IteratorSetting is =
+ new IteratorSetting(100, "cfrkt", ColFamReversingKeyTransformingIterator.class);
TransformingIterator.setAuthorizations(is, new Authorizations("A", "B"));
TransformingIterator.setMaxBufferSize(is, 10000000);
assertTrue(ti.validateOptions(is.getOptions()));
@@ -601,8 +601,8 @@ public class TransformingIteratorTest {
}
@Override
- protected Collection<ByteSequence> untransformColumnFamilies(
- Collection<ByteSequence> columnFamilies) {
+ protected Collection<ByteSequence>
+ untransformColumnFamilies(Collection<ByteSequence> columnFamilies) {
HashSet<ByteSequence> untransformed = new HashSet<>();
for (ByteSequence cf : columnFamilies)
untransformed.add(untransformColumnFamily(cf));
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/user/VisibilityFilterTest.java b/core/src/test/java/org/apache/accumulo/core/iterators/user/VisibilityFilterTest.java
index 0243791..9ff963a 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/user/VisibilityFilterTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/user/VisibilityFilterTest.java
@@ -207,8 +207,8 @@ public class VisibilityFilterTest {
@Test
public void testSerializedAuthorizations() throws IOException {
- Map<String,String> options = Collections.singletonMap("auths",
- new Authorizations("x", "def", "y").serialize());
+ Map<String,String> options =
+ Collections.singletonMap("auths", new Authorizations("x", "def", "y").serialize());
TreeMap<Key,Value> source = createSourceWithHiddenData(1, 2);
verify(source, 3, options, GOOD, GOOD, GOOD_VIS, 1);
diff --git a/core/src/test/java/org/apache/accumulo/core/rpc/SaslClientDigestCallbackHandlerTest.java b/core/src/test/java/org/apache/accumulo/core/rpc/SaslClientDigestCallbackHandlerTest.java
index 916f0de..8cf1135 100644
--- a/core/src/test/java/org/apache/accumulo/core/rpc/SaslClientDigestCallbackHandlerTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/rpc/SaslClientDigestCallbackHandlerTest.java
@@ -24,8 +24,8 @@ public class SaslClientDigestCallbackHandlerTest {
@Test
public void testEquality() {
- SaslClientDigestCallbackHandler handler1 = new SaslClientDigestCallbackHandler("user",
- "mypass".toCharArray()),
+ SaslClientDigestCallbackHandler handler1 =
+ new SaslClientDigestCallbackHandler("user", "mypass".toCharArray()),
handler2 = new SaslClientDigestCallbackHandler("user", "mypass".toCharArray());
assertEquals(handler1, handler2);
assertEquals(handler1.hashCode(), handler2.hashCode());
diff --git a/core/src/test/java/org/apache/accumulo/core/rpc/SaslConnectionParamsTest.java b/core/src/test/java/org/apache/accumulo/core/rpc/SaslConnectionParamsTest.java
index 98868db..ee18b82 100644
--- a/core/src/test/java/org/apache/accumulo/core/rpc/SaslConnectionParamsTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/rpc/SaslConnectionParamsTest.java
@@ -75,8 +75,8 @@ public class SaslConnectionParamsTest {
final SaslConnectionParams saslParams = new SaslConnectionParams(clientConf, token);
assertEquals(primary, saslParams.getKerberosServerPrimary());
- final QualityOfProtection defaultQop = QualityOfProtection
- .get(Property.RPC_SASL_QOP.getDefaultValue());
+ final QualityOfProtection defaultQop =
+ QualityOfProtection.get(Property.RPC_SASL_QOP.getDefaultValue());
assertEquals(defaultQop, saslParams.getQualityOfProtection());
Map<String,String> properties = saslParams.getSaslProperties();
@@ -106,8 +106,8 @@ public class SaslConnectionParamsTest {
final SaslConnectionParams saslParams = new SaslConnectionParams(rpcConf, token);
assertEquals(primary, saslParams.getKerberosServerPrimary());
- final QualityOfProtection defaultQop = QualityOfProtection
- .get(Property.RPC_SASL_QOP.getDefaultValue());
+ final QualityOfProtection defaultQop =
+ QualityOfProtection.get(Property.RPC_SASL_QOP.getDefaultValue());
assertEquals(defaultQop, saslParams.getQualityOfProtection());
Map<String,String> properties = saslParams.getSaslProperties();
@@ -138,8 +138,8 @@ public class SaslConnectionParamsTest {
final SaslConnectionParams saslParams = new SaslConnectionParams(rpcConf, token);
assertEquals(primary, saslParams.getKerberosServerPrimary());
- final QualityOfProtection defaultQop = QualityOfProtection
- .get(Property.RPC_SASL_QOP.getDefaultValue());
+ final QualityOfProtection defaultQop =
+ QualityOfProtection.get(Property.RPC_SASL_QOP.getDefaultValue());
assertEquals(defaultQop, saslParams.getQualityOfProtection());
assertEquals(SaslMechanism.DIGEST_MD5, saslParams.getMechanism());
@@ -159,8 +159,8 @@ public class SaslConnectionParamsTest {
@Test
public void testEquality() throws Exception {
final KerberosToken token = EasyMock.createMock(KerberosToken.class);
- SaslConnectionParams params1 = testUser
- .doAs(new PrivilegedExceptionAction<SaslConnectionParams>() {
+ SaslConnectionParams params1 =
+ testUser.doAs(new PrivilegedExceptionAction<SaslConnectionParams>() {
@Override
public SaslConnectionParams run() throws Exception {
final ClientConfiguration clientConf = ClientConfiguration.loadDefault();
@@ -176,8 +176,8 @@ public class SaslConnectionParamsTest {
}
});
- SaslConnectionParams params2 = testUser
- .doAs(new PrivilegedExceptionAction<SaslConnectionParams>() {
+ SaslConnectionParams params2 =
+ testUser.doAs(new PrivilegedExceptionAction<SaslConnectionParams>() {
@Override
public SaslConnectionParams run() throws Exception {
final ClientConfiguration clientConf = ClientConfiguration.loadDefault();
@@ -198,8 +198,8 @@ public class SaslConnectionParamsTest {
final DelegationTokenImpl delToken1 = new DelegationTokenImpl(new byte[0],
new AuthenticationTokenIdentifier("user", 1, 10l, 20l, "instanceid"));
- SaslConnectionParams params3 = testUser
- .doAs(new PrivilegedExceptionAction<SaslConnectionParams>() {
+ SaslConnectionParams params3 =
+ testUser.doAs(new PrivilegedExceptionAction<SaslConnectionParams>() {
@Override
public SaslConnectionParams run() throws Exception {
final ClientConfiguration clientConf = ClientConfiguration.loadDefault();
@@ -222,8 +222,8 @@ public class SaslConnectionParamsTest {
final DelegationTokenImpl delToken2 = new DelegationTokenImpl(new byte[0],
new AuthenticationTokenIdentifier("user", 1, 10l, 20l, "instanceid"));
- SaslConnectionParams params4 = testUser
- .doAs(new PrivilegedExceptionAction<SaslConnectionParams>() {
+ SaslConnectionParams params4 =
+ testUser.doAs(new PrivilegedExceptionAction<SaslConnectionParams>() {
@Override
public SaslConnectionParams run() throws Exception {
final ClientConfiguration clientConf = ClientConfiguration.loadDefault();
diff --git a/core/src/test/java/org/apache/accumulo/core/security/AuthenticationTokenIdentifierTest.java b/core/src/test/java/org/apache/accumulo/core/security/AuthenticationTokenIdentifierTest.java
index 72d80c0..8554125 100644
--- a/core/src/test/java/org/apache/accumulo/core/security/AuthenticationTokenIdentifierTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/security/AuthenticationTokenIdentifierTest.java
@@ -57,8 +57,8 @@ public class AuthenticationTokenIdentifierTest {
String principal = "user";
AuthenticationTokenIdentifier token = new AuthenticationTokenIdentifier(principal);
assertEquals(token, token);
- AuthenticationTokenIdentifier newToken = new AuthenticationTokenIdentifier(principal, 1, 5l,
- 10l, "uuid");
+ AuthenticationTokenIdentifier newToken =
+ new AuthenticationTokenIdentifier(principal, 1, 5l, 10l, "uuid");
assertNotEquals(token, newToken);
assertNotEquals(token.hashCode(), newToken.hashCode());
AuthenticationTokenIdentifier dblNewToken = new AuthenticationTokenIdentifier(principal);
diff --git a/core/src/test/java/org/apache/accumulo/core/security/AuthenticationTokenTest.java b/core/src/test/java/org/apache/accumulo/core/security/AuthenticationTokenTest.java
index 9cc2256..78a8fd3 100644
--- a/core/src/test/java/org/apache/accumulo/core/security/AuthenticationTokenTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/security/AuthenticationTokenTest.java
@@ -45,13 +45,13 @@ public class AuthenticationTokenTest {
assertFalse(allZero);
byte[] serialized = AuthenticationTokenSerializer.serialize(new PasswordToken(randomBytes));
- PasswordToken passwordToken = AuthenticationTokenSerializer.deserialize(PasswordToken.class,
- serialized);
+ PasswordToken passwordToken =
+ AuthenticationTokenSerializer.deserialize(PasswordToken.class, serialized);
assertArrayEquals(randomBytes, passwordToken.getPassword());
serialized = AuthenticationTokenSerializer.serialize(new NullToken());
- AuthenticationToken nullToken = AuthenticationTokenSerializer.deserialize(NullToken.class,
- serialized);
+ AuthenticationToken nullToken =
+ AuthenticationTokenSerializer.deserialize(NullToken.class, serialized);
assertEquals(new NullToken(), nullToken);
}
diff --git a/core/src/test/java/org/apache/accumulo/core/security/crypto/CryptoTest.java b/core/src/test/java/org/apache/accumulo/core/security/crypto/CryptoTest.java
index 8d76154..1705fcc 100644
--- a/core/src/test/java/org/apache/accumulo/core/security/crypto/CryptoTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/security/crypto/CryptoTest.java
@@ -60,7 +60,7 @@ public class CryptoTest {
public static final String CRYPTO_ON_CONF = "crypto-on-accumulo-site.xml";
public static final String CRYPTO_OFF_CONF = "crypto-off-accumulo-site.xml";
public static final String CRYPTO_ON_KEK_OFF_CONF =
- "crypto-on-no-key-encryption-accumulo-site.xml";
+ "crypto-on-no-key-encryption-accumulo-site.xml";
@Rule
public ExpectedException exception = ExpectedException.none();
@@ -69,8 +69,8 @@ public class CryptoTest {
public void testNoCryptoStream() throws IOException {
AccumuloConfiguration conf = setAndGetAccumuloConfig(CRYPTO_OFF_CONF);
- CryptoModuleParameters params = CryptoModuleFactory
- .createParamsObjectFromAccumuloConfiguration(conf);
+ CryptoModuleParameters params =
+ CryptoModuleFactory.createParamsObjectFromAccumuloConfiguration(conf);
assertNotNull(params);
assertEquals("NullCipher", params.getAlgorithmName());
@@ -94,8 +94,8 @@ public class CryptoTest {
public void testCryptoModuleParamsParsing() {
AccumuloConfiguration conf = setAndGetAccumuloConfig(CRYPTO_ON_CONF);
- CryptoModuleParameters params = CryptoModuleFactory
- .createParamsObjectFromAccumuloConfiguration(conf);
+ CryptoModuleParameters params =
+ CryptoModuleFactory.createParamsObjectFromAccumuloConfiguration(conf);
assertNotNull(params);
assertEquals("AES", params.getAlgorithmName());
@@ -112,8 +112,8 @@ public class CryptoTest {
public void testCryptoModuleDoesntLeakSensitive() throws IOException {
AccumuloConfiguration conf = setAndGetAccumuloConfig(CRYPTO_ON_CONF);
- CryptoModuleParameters params = CryptoModuleFactory
- .createParamsObjectFromAccumuloConfiguration(conf);
+ CryptoModuleParameters params =
+ CryptoModuleFactory.createParamsObjectFromAccumuloConfiguration(conf);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
params.setPlaintextOutputStream(baos);
@@ -137,8 +137,8 @@ public class CryptoTest {
public void testCryptoModuleParamsValidation1() throws IOException {
AccumuloConfiguration conf = setAndGetAccumuloConfig(CRYPTO_ON_CONF);
- CryptoModuleParameters params = CryptoModuleFactory
- .createParamsObjectFromAccumuloConfiguration(conf);
+ CryptoModuleParameters params =
+ CryptoModuleFactory.createParamsObjectFromAccumuloConfiguration(conf);
CryptoModule cryptoModule = CryptoModuleFactory.getCryptoModule(conf);
assertTrue(cryptoModule instanceof DefaultCryptoModule);
@@ -151,8 +151,8 @@ public class CryptoTest {
public void testCryptoModuleParamsValidation2() throws IOException {
AccumuloConfiguration conf = setAndGetAccumuloConfig(CRYPTO_ON_CONF);
- CryptoModuleParameters params = CryptoModuleFactory
- .createParamsObjectFromAccumuloConfiguration(conf);
+ CryptoModuleParameters params =
+ CryptoModuleFactory.createParamsObjectFromAccumuloConfiguration(conf);
CryptoModule cryptoModule = CryptoModuleFactory.getCryptoModule(conf);
assertTrue(cryptoModule instanceof DefaultCryptoModule);
@@ -188,8 +188,8 @@ public class CryptoTest {
AccumuloConfiguration conf = setAndGetAccumuloConfig(CRYPTO_ON_KEK_OFF_CONF);
CryptoModule cryptoModule = CryptoModuleFactory.getCryptoModule(conf);
- CryptoModuleParameters params = CryptoModuleFactory
- .createParamsObjectFromAccumuloConfiguration(conf);
+ CryptoModuleParameters params =
+ CryptoModuleFactory.createParamsObjectFromAccumuloConfiguration(conf);
assertTrue(cryptoModule instanceof DefaultCryptoModule);
@@ -248,8 +248,8 @@ public class CryptoTest {
AccumuloConfiguration conf = setAndGetAccumuloConfig(CRYPTO_ON_CONF);
CryptoModule cryptoModule = CryptoModuleFactory.getCryptoModule(conf);
- CryptoModuleParameters params = CryptoModuleFactory
- .createParamsObjectFromAccumuloConfiguration(conf);
+ CryptoModuleParameters params =
+ CryptoModuleFactory.createParamsObjectFromAccumuloConfiguration(conf);
assertTrue(cryptoModule instanceof DefaultCryptoModule);
assertNotNull(params.getKeyEncryptionStrategyClass());
@@ -284,8 +284,8 @@ public class CryptoTest {
AccumuloConfiguration conf = setAndGetAccumuloConfig(CRYPTO_ON_CONF);
CryptoModule cryptoModule = CryptoModuleFactory.getCryptoModule(conf);
- CryptoModuleParameters params = CryptoModuleFactory
- .createParamsObjectFromAccumuloConfiguration(conf);
+ CryptoModuleParameters params =
+ CryptoModuleFactory.createParamsObjectFromAccumuloConfiguration(conf);
assertTrue(cryptoModule instanceof DefaultCryptoModule);
assertNotNull(params.getKeyEncryptionStrategyClass());
@@ -318,8 +318,8 @@ public class CryptoTest {
AccumuloConfiguration conf = setAndGetAccumuloConfig(CRYPTO_ON_CONF);
CryptoModule cryptoModule = CryptoModuleFactory.getCryptoModule(conf);
- CryptoModuleParameters params = CryptoModuleFactory
- .createParamsObjectFromAccumuloConfiguration(conf);
+ CryptoModuleParameters params =
+ CryptoModuleFactory.createParamsObjectFromAccumuloConfiguration(conf);
assertTrue(cryptoModule instanceof DefaultCryptoModule);
assertNotNull(params.getKeyEncryptionStrategyClass());
@@ -350,8 +350,8 @@ public class CryptoTest {
}
private AccumuloConfiguration setAndGetAccumuloConfig(String cryptoConfSetting) {
- ConfigurationCopy result = new ConfigurationCopy(
- AccumuloConfiguration.getDefaultConfiguration());
+ ConfigurationCopy result =
+ new ConfigurationCopy(AccumuloConfiguration.getDefaultConfiguration());
Configuration conf = new Configuration(false);
conf.addResource(cryptoConfSetting);
for (Entry<String,String> e : conf) {
diff --git a/core/src/test/java/org/apache/accumulo/core/util/AsyncSocketAppenderTest.java b/core/src/test/java/org/apache/accumulo/core/util/AsyncSocketAppenderTest.java
index 9b4bf40..f84f31d 100644
--- a/core/src/test/java/org/apache/accumulo/core/util/AsyncSocketAppenderTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/util/AsyncSocketAppenderTest.java
@@ -67,10 +67,10 @@ public class AsyncSocketAppenderTest {
public void testAppend() {
asa = new AsyncSocketAppender(sa);
assertFalse(asa.isAttached(sa));
- LoggingEvent event1 = new LoggingEvent("java.lang.String", Logger.getRootLogger(), Level.INFO,
- "event1", null);
- LoggingEvent event2 = new LoggingEvent("java.lang.Integer", Logger.getRootLogger(), Level.WARN,
- "event2", null);
+ LoggingEvent event1 =
+ new LoggingEvent("java.lang.String", Logger.getRootLogger(), Level.INFO, "event1", null);
+ LoggingEvent event2 =
+ new LoggingEvent("java.lang.Integer", Logger.getRootLogger(), Level.WARN, "event2", null);
sa.activateOptions();
sa.doAppend(event1);
sa.doAppend(event2);
diff --git a/core/src/test/java/org/apache/accumulo/core/util/LocalityGroupUtilTest.java b/core/src/test/java/org/apache/accumulo/core/util/LocalityGroupUtilTest.java
index c45996d..f73a5dd 100644
--- a/core/src/test/java/org/apache/accumulo/core/util/LocalityGroupUtilTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/util/LocalityGroupUtilTest.java
@@ -86,8 +86,8 @@ public class LocalityGroupUtilTest {
in2.add(new ArrayByteSequence(test1));
in.add(new Text(test2));
in2.add(new ArrayByteSequence(test2));
- Set<ByteSequence> out = LocalityGroupUtil
- .decodeColumnFamilies(LocalityGroupUtil.encodeColumnFamilies(in));
+ Set<ByteSequence> out =
+ LocalityGroupUtil.decodeColumnFamilies(LocalityGroupUtil.encodeColumnFamilies(in));
assertEquals(in2, out);
}
diff --git a/core/src/test/java/org/apache/accumulo/core/util/PairTest.java b/core/src/test/java/org/apache/accumulo/core/util/PairTest.java
index 93cbd89..5486d32 100644
--- a/core/src/test/java/org/apache/accumulo/core/util/PairTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/util/PairTest.java
@@ -107,11 +107,11 @@ public class PairTest {
assertEquals(entry.getKey(), pair0.getFirst());
assertEquals(entry.getValue(), pair0.getSecond());
- Pair<Object,Object> pair = Pair.<Object,Object,Integer,String> fromEntry(entry);
+ Pair<Object,Object> pair = Pair.<Object,Object,Integer,String>fromEntry(entry);
assertEquals(entry.getKey(), pair.getFirst());
assertEquals(entry.getValue(), pair.getSecond());
- Pair<Number,CharSequence> pair2 = Pair.<Number,CharSequence,Integer,String> fromEntry(entry);
+ Pair<Number,CharSequence> pair2 = Pair.<Number,CharSequence,Integer,String>fromEntry(entry);
assertEquals(entry.getKey(), pair2.getFirst());
assertEquals(entry.getValue(), pair2.getSecond());
}
diff --git a/core/src/test/java/org/apache/accumulo/core/util/format/DefaultFormatterTest.java b/core/src/test/java/org/apache/accumulo/core/util/format/DefaultFormatterTest.java
index 5b97bbf..5d87e5f 100644
--- a/core/src/test/java/org/apache/accumulo/core/util/format/DefaultFormatterTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/util/format/DefaultFormatterTest.java
@@ -35,7 +35,7 @@ public class DefaultFormatterTest {
public static final TimeZone UTC = TimeZone.getTimeZone("UTC");
public static final TimeZone EST = TimeZone.getTimeZone("EST");
DefaultFormatter df;
- Iterable<Entry<Key,Value>> empty = Collections.<Key,Value> emptyMap().entrySet();
+ Iterable<Entry<Key,Value>> empty = Collections.<Key,Value>emptyMap().entrySet();
@Before
public void setUp() {
diff --git a/core/src/test/java/org/apache/accumulo/core/util/format/FormatterFactoryTest.java b/core/src/test/java/org/apache/accumulo/core/util/format/FormatterFactoryTest.java
index bb4dcc9..b8971bc 100644
--- a/core/src/test/java/org/apache/accumulo/core/util/format/FormatterFactoryTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/util/format/FormatterFactoryTest.java
@@ -32,15 +32,15 @@ public class FormatterFactoryTest {
@Before
public void setUp() {
- scanner = Collections.<Key,Value> emptyMap().entrySet();
+ scanner = Collections.<Key,Value>emptyMap().entrySet();
}
@Test
public void testGetDefaultFormatter() {
final FormatterConfig timestampConfig = new FormatterConfig().setPrintTimestamps(true);
Formatter defaultFormatter = FormatterFactory.getDefaultFormatter(scanner, timestampConfig);
- Formatter bogusFormatter = FormatterFactory.getFormatter(Formatter.class, scanner,
- timestampConfig);
+ Formatter bogusFormatter =
+ FormatterFactory.getFormatter(Formatter.class, scanner, timestampConfig);
assertEquals(defaultFormatter.getClass(), bogusFormatter.getClass());
}
diff --git a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchScanner.java b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchScanner.java
index b5d1caa..c66610f 100644
--- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchScanner.java
+++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchScanner.java
@@ -169,8 +169,8 @@ public class RandomBatchScanner {
opts.parseArgs(RandomBatchScanner.class.getName(), args, bsOpts);
Connector connector = opts.getConnector();
- BatchScanner batchReader = connector.createBatchScanner(opts.getTableName(), opts.auths,
- bsOpts.scanThreads);
+ BatchScanner batchReader =
+ connector.createBatchScanner(opts.getTableName(), opts.auths, bsOpts.scanThreads);
batchReader.setTimeout(bsOpts.scanTimeout, TimeUnit.MILLISECONDS);
Random r;
diff --git a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchWriter.java b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchWriter.java
index 4c5206d..d6f4433 100644
--- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchWriter.java
+++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/RandomBatchWriter.java
@@ -143,8 +143,8 @@ public class RandomBatchWriter {
r = new Random(opts.seed);
}
Connector connector = opts.getConnector();
- BatchWriter bw = connector.createBatchWriter(opts.getTableName(),
- bwOpts.getBatchWriterConfig());
+ BatchWriter bw =
+ connector.createBatchWriter(opts.getTableName(), bwOpts.getBatchWriterConfig());
// reuse the ColumnVisibility object to improve performance
ColumnVisibility cv = opts.visiblity;
diff --git a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/ReadWriteExample.java b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/ReadWriteExample.java
index cd66309..7e341c7 100644
--- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/ReadWriteExample.java
+++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/ReadWriteExample.java
@@ -82,8 +82,8 @@ public class ReadWriteExample {
conn = opts.getConnector();
// add the authorizations to the user
- Authorizations userAuthorizations = conn.securityOperations()
- .getUserAuthorizations(opts.getPrincipal());
+ Authorizations userAuthorizations =
+ conn.securityOperations().getUserAuthorizations(opts.getPrincipal());
ByteArraySet auths = new ByteArraySet(userAuthorizations.getAuthorizations());
auths.addAll(opts.auths.getAuthorizations());
if (!auths.isEmpty())
diff --git a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/SequentialBatchWriter.java b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/SequentialBatchWriter.java
index bd89099..8412e53 100644
--- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/SequentialBatchWriter.java
+++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/SequentialBatchWriter.java
@@ -57,8 +57,8 @@ public class SequentialBatchWriter {
BatchWriterOpts bwOpts = new BatchWriterOpts();
opts.parseArgs(SequentialBatchWriter.class.getName(), args, bwOpts);
Connector connector = opts.getConnector();
- BatchWriter bw = connector.createBatchWriter(opts.getTableName(),
- bwOpts.getBatchWriterConfig());
+ BatchWriter bw =
+ connector.createBatchWriter(opts.getTableName(), bwOpts.getBatchWriterConfig());
long end = opts.start + opts.num;
diff --git a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/TracingExample.java b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/TracingExample.java
index bd9a72d..3dd6962 100644
--- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/TracingExample.java
+++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/client/TracingExample.java
@@ -101,8 +101,8 @@ public class TracingExample {
TraceScope scope = Trace.startSpan("Client Write", Sampler.ALWAYS);
System.out.println("TraceID: " + Long.toHexString(scope.getSpan().getTraceId()));
- BatchWriter batchWriter = opts.getConnector().createBatchWriter(opts.getTableName(),
- new BatchWriterConfig());
+ BatchWriter batchWriter =
+ opts.getConnector().createBatchWriter(opts.getTableName(), new BatchWriterConfig());
Mutation m = new Mutation("row");
m.put("cf", "cq", "value");
diff --git a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/constraints/NumericValueConstraint.java b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/constraints/NumericValueConstraint.java
index 21363f2..b2b82f4 100644
--- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/constraints/NumericValueConstraint.java
+++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/constraints/NumericValueConstraint.java
@@ -34,8 +34,8 @@ public class NumericValueConstraint implements Constraint {
static final short NON_NUMERIC_VALUE = 1;
static final String VIOLATION_MESSAGE = "Value is not numeric";
- private static final List<Short> VIOLATION_LIST = Collections
- .unmodifiableList(Arrays.asList(NON_NUMERIC_VALUE));
+ private static final List<Short> VIOLATION_LIST =
+ Collections.unmodifiableList(Arrays.asList(NON_NUMERIC_VALUE));
private boolean isNumeric(byte bytes[]) {
for (byte b : bytes) {
diff --git a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/dirlist/Viewer.java b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/dirlist/Viewer.java
index 500aab8..a7c2635 100644
--- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/dirlist/Viewer.java
+++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/dirlist/Viewer.java
@@ -128,8 +128,8 @@ public class Viewer extends JFrame implements TreeSelectionListener, TreeExpansi
}
public void init() throws TableNotFoundException {
- DefaultMutableTreeNode root = new DefaultMutableTreeNode(
- new NodeInfo(topPath, q.getData(topPath)));
+ DefaultMutableTreeNode root =
+ new DefaultMutableTreeNode(new NodeInfo(topPath, q.getData(topPath)));
populate(root);
populateChildren(root);
diff --git a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/ChunkCombiner.java b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/ChunkCombiner.java
index 9e5db02..438ac20 100644
--- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/ChunkCombiner.java
+++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/ChunkCombiner.java
@@ -58,8 +58,8 @@ public class ChunkCombiner implements SortedKeyValueIterator<Key,Value> {
private SortedKeyValueIterator<Key,Value> source;
private SortedKeyValueIterator<Key,Value> refsSource;
- private static final Collection<ByteSequence> refsColf = Collections
- .singleton(FileDataIngest.REFS_CF_BS);
+ private static final Collection<ByteSequence> refsColf =
+ Collections.singleton(FileDataIngest.REFS_CF_BS);
private Map<Text,byte[]> lastRowVC = Collections.emptyMap();
private Key topKey = null;
diff --git a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java
index b4466d4..f0e4dc5 100644
--- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java
+++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java
@@ -48,10 +48,10 @@ public class FileDataIngest {
public static final Text REFS_CF = new Text("refs");
public static final String REFS_ORIG_FILE = "name";
public static final String REFS_FILE_EXT = "filext";
- public static final ByteSequence CHUNK_CF_BS = new ArrayByteSequence(CHUNK_CF.getBytes(), 0,
- CHUNK_CF.getLength());
- public static final ByteSequence REFS_CF_BS = new ArrayByteSequence(REFS_CF.getBytes(), 0,
- REFS_CF.getLength());
+ public static final ByteSequence CHUNK_CF_BS =
+ new ArrayByteSequence(CHUNK_CF.getBytes(), 0, CHUNK_CF.getLength());
+ public static final ByteSequence REFS_CF_BS =
+ new ArrayByteSequence(REFS_CF.getBytes(), 0, REFS_CF.getLength());
int chunkSize;
byte[] chunkSizeBytes;
diff --git a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/InsertWithBatchWriter.java b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/InsertWithBatchWriter.java
index 08a43da..6e798ae 100644
--- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/InsertWithBatchWriter.java
+++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/InsertWithBatchWriter.java
@@ -42,8 +42,8 @@ public class InsertWithBatchWriter {
opts.parseArgs(InsertWithBatchWriter.class.getName(), args, bwOpts);
Connector connector = opts.getConnector();
- MultiTableBatchWriter mtbw = connector
- .createMultiTableBatchWriter(bwOpts.getBatchWriterConfig());
+ MultiTableBatchWriter mtbw =
+ connector.createMultiTableBatchWriter(bwOpts.getBatchWriterConfig());
if (!connector.tableOperations().exists(opts.getTableName()))
connector.tableOperations().create(opts.getTableName());
diff --git a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/BulkIngestExample.java b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/BulkIngestExample.java
index 61cb53a..f1aaa92 100644
--- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/BulkIngestExample.java
+++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/BulkIngestExample.java
@@ -88,8 +88,8 @@ public class BulkIngestExample extends Configured implements Tool {
int index = 0;
for (Text value : values) {
- Key outputKey = new Key(key, new Text("colf"), new Text(String.format("col_%07d", index)),
- timestamp);
+ Key outputKey =
+ new Key(key, new Text("colf"), new Text(String.format("col_%07d", index)), timestamp);
index++;
Value outputValue = new Value(value.getBytes(), 0, value.getLength());
diff --git a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/GenerateTestData.java b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/GenerateTestData.java
index 80a2a50..8ae1e9a 100644
--- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/GenerateTestData.java
+++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/GenerateTestData.java
@@ -42,8 +42,8 @@ public class GenerateTestData {
opts.parseArgs(GenerateTestData.class.getName(), args);
FileSystem fs = FileSystem.get(new Configuration());
- PrintStream out = new PrintStream(
- new BufferedOutputStream(fs.create(new Path(opts.outputFile))));
+ PrintStream out =
+ new PrintStream(new BufferedOutputStream(fs.create(new Path(opts.outputFile))));
for (int i = 0; i < opts.numRows; i++) {
out.println(String.format("row_%010d\tvalue_%010d", i + opts.startRow, i + opts.startRow));
diff --git a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/reservations/ARS.java b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/reservations/ARS.java
index 574bb3d..b60a1bc 100644
--- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/reservations/ARS.java
+++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/reservations/ARS.java
@@ -97,8 +97,8 @@ public class ARS {
// it is important to use an isolated scanner so that only whole mutations are seen
try (
- ConditionalWriter cwriter = conn.createConditionalWriter(rTable,
- new ConditionalWriterConfig());
+ ConditionalWriter cwriter =
+ conn.createConditionalWriter(rTable, new ConditionalWriterConfig());
Scanner scanner = new IsolatedScanner(conn.createScanner(rTable, Authorizations.EMPTY))) {
while (true) {
Status status = cwriter.write(update).getStatus();
@@ -181,8 +181,8 @@ public class ARS {
// its important to use an isolated scanner so that only whole mutations are seen
try (
- ConditionalWriter cwriter = conn.createConditionalWriter(rTable,
- new ConditionalWriterConfig());
+ ConditionalWriter cwriter =
+ conn.createConditionalWriter(rTable, new ConditionalWriterConfig());
Scanner scanner = new IsolatedScanner(conn.createScanner(rTable, Authorizations.EMPTY))) {
while (true) {
scanner.setRange(new Range(row));
@@ -205,8 +205,8 @@ public class ARS {
}
if (reservation != null) {
- ConditionalMutation update = new ConditionalMutation(row,
- new Condition("tx", "seq").setValue(seq + ""));
+ ConditionalMutation update =
+ new ConditionalMutation(row, new Condition("tx", "seq").setValue(seq + ""));
update.putDelete("res", reservation);
update.put("tx", "seq", (seq + 1) + "");
diff --git a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/ContinuousQuery.java b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/ContinuousQuery.java
index 355569a..e1c48d9 100644
--- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/ContinuousQuery.java
+++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/ContinuousQuery.java
@@ -66,8 +66,8 @@ public class ContinuousQuery {
Connector conn = opts.getConnector();
- ArrayList<Text[]> randTerms = findRandomTerms(conn.createScanner(opts.doc2Term, opts.auths),
- opts.numTerms);
+ ArrayList<Text[]> randTerms =
+ findRandomTerms(conn.createScanner(opts.doc2Term, opts.auths), opts.numTerms);
Random rand = new Random();
diff --git a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/Index.java b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/Index.java
index 5f285cb..4d744ba 100644
--- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/Index.java
+++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/Index.java
@@ -112,8 +112,8 @@ public class Index {
String splitRegex = "\\W+";
- BatchWriter bw = opts.getConnector().createBatchWriter(opts.getTableName(),
- bwOpts.getBatchWriterConfig());
+ BatchWriter bw =
+ opts.getConnector().createBatchWriter(opts.getTableName(), bwOpts.getBatchWriterConfig());
for (String filename : opts.files) {
index(opts.partitions, new File(filename), splitRegex, bw);
}
diff --git a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/Query.java b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/Query.java
index 432610d..27a2da3 100644
--- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/Query.java
+++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/shard/Query.java
@@ -95,8 +95,8 @@ public class Query {
BatchScanner bs = conn.createBatchScanner(opts.getTableName(), opts.auths, bsOpts.scanThreads);
bs.setTimeout(bsOpts.scanTimeout, TimeUnit.MILLISECONDS);
if (opts.useSample) {
- SamplerConfiguration samplerConfig = conn.tableOperations()
- .getSamplerConfiguration(opts.getTableName());
+ SamplerConfiguration samplerConfig =
+ conn.tableOperations().getSamplerConfiguration(opts.getTableName());
CutoffIntersectingIterator.validateSamplerConfig(
conn.tableOperations().getSamplerConfiguration(opts.getTableName()));
bs.setSamplerConfiguration(samplerConfig);
diff --git a/fate/src/main/java/org/apache/accumulo/fate/AdminUtil.java b/fate/src/main/java/org/apache/accumulo/fate/AdminUtil.java
index 2b37302..41fddfe 100644
--- a/fate/src/main/java/org/apache/accumulo/fate/AdminUtil.java
+++ b/fate/src/main/java/org/apache/accumulo/fate/AdminUtil.java
@@ -205,7 +205,7 @@ public class AdminUtil<T> {
EnumSet<TStatus> filterStatus) {
FateStatus status = getTransactionStatus(zs, filterTxid, filterStatus,
- Collections.<Long,List<String>> emptyMap(), Collections.<Long,List<String>> emptyMap());
+ Collections.<Long,List<String>>emptyMap(), Collections.<Long,List<String>>emptyMap());
return status.getTransactions();
}
diff --git a/fate/src/main/java/org/apache/accumulo/fate/Fate.java b/fate/src/main/java/org/apache/accumulo/fate/Fate.java
index c11e2eb..5e29a7a 100644
--- a/fate/src/main/java/org/apache/accumulo/fate/Fate.java
+++ b/fate/src/main/java/org/apache/accumulo/fate/Fate.java
@@ -48,8 +48,8 @@ public class Fate<T> {
private T environment;
private ExecutorService executor;
- private static final EnumSet<TStatus> FINISHED_STATES = EnumSet.of(TStatus.FAILED,
- TStatus.SUCCESSFUL, TStatus.UNKNOWN);
+ private static final EnumSet<TStatus> FINISHED_STATES =
+ EnumSet.of(TStatus.FAILED, TStatus.SUCCESSFUL, TStatus.UNKNOWN);
private AtomicBoolean keepRunning = new AtomicBoolean(true);
@@ -180,8 +180,8 @@ public class Fate<T> {
@Override
public Thread newThread(Runnable r) {
- Thread t = new Thread(new LoggingRunnable(log, r),
- "Repo runner " + runnerCount.getAndIncrement());
+ Thread t =
+ new Thread(new LoggingRunnable(log, r), "Repo runner " + runnerCount.getAndIncrement());
t.setDaemon(true);
return t;
}
diff --git a/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java b/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java
index 08b66bc..46b67df 100644
--- a/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java
+++ b/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java
@@ -165,8 +165,8 @@ public class ZooStore<T> implements TStore<T> {
// have reserved id, status should not change
try {
- TStatus status = TStatus
- .valueOf(new String(zk.getData(path + "/" + txdir, null), UTF_8));
+ TStatus status =
+ TStatus.valueOf(new String(zk.getData(path + "/" + txdir, null), UTF_8));
if (status == TStatus.IN_PROGRESS || status == TStatus.FAILED_IN_PROGRESS) {
return tid;
} else {
diff --git a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooReaderWriter.java b/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooReaderWriter.java
index 4376af78..8f842b3 100644
--- a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooReaderWriter.java
+++ b/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooReaderWriter.java
@@ -36,8 +36,8 @@ import org.slf4j.LoggerFactory;
public class ZooReaderWriter extends ZooReader implements IZooReaderWriter {
private static final Logger log = LoggerFactory.getLogger(ZooReaderWriter.class);
- private static SecurityPermission ZOOWRITER_PERMISSION = new SecurityPermission(
- "zookeeperWriterPermission");
+ private static SecurityPermission ZOOWRITER_PERMISSION =
+ new SecurityPermission("zookeeperWriterPermission");
private static ZooReaderWriter instance = null;
private final String scheme;
diff --git a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooUtil.java b/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooUtil.java
index c967d0e..bbd4611 100644
--- a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooUtil.java
+++ b/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooUtil.java
@@ -43,9 +43,9 @@ import org.slf4j.LoggerFactory;
public class ZooUtil {
- public static final RetryFactory DEFAULT_RETRY = Retry.builder().maxRetries(10)
- .retryAfter(250, MILLISECONDS).incrementBy(250, MILLISECONDS).maxWait(5, TimeUnit.SECONDS)
- .logInterval(3, TimeUnit.MINUTES).createFactory();
+ public static final RetryFactory DEFAULT_RETRY =
+ Retry.builder().maxRetries(10).retryAfter(250, MILLISECONDS).incrementBy(250, MILLISECONDS)
+ .maxWait(5, TimeUnit.SECONDS).logInterval(3, TimeUnit.MINUTES).createFactory();
private static final Logger log = LoggerFactory.getLogger(ZooUtil.class);
diff --git a/fate/src/test/java/org/apache/accumulo/fate/ReadOnlyStoreTest.java b/fate/src/test/java/org/apache/accumulo/fate/ReadOnlyStoreTest.java
index c4914dd..8a02bbd 100644
--- a/fate/src/test/java/org/apache/accumulo/fate/ReadOnlyStoreTest.java
+++ b/fate/src/test/java/org/apache/accumulo/fate/ReadOnlyStoreTest.java
@@ -49,7 +49,7 @@ public class ReadOnlyStoreTest {
EasyMock.expect(mock.waitForStatusChange(0xdeadbeefl, EnumSet.allOf(TStatus.class)))
.andReturn(TStatus.UNKNOWN);
EasyMock.expect(mock.getProperty(0xdeadbeefl, "com.example.anyproperty")).andReturn("property");
- EasyMock.expect(mock.list()).andReturn(Collections.<Long> emptyList());
+ EasyMock.expect(mock.list()).andReturn(Collections.<Long>emptyList());
EasyMock.replay(repo);
EasyMock.replay(mock);
@@ -67,7 +67,7 @@ public class ReadOnlyStoreTest {
assertEquals(TStatus.UNKNOWN,
store.waitForStatusChange(0xdeadbeefl, EnumSet.allOf(TStatus.class)));
assertEquals("property", store.getProperty(0xdeadbeefl, "com.example.anyproperty"));
- assertEquals(Collections.<Long> emptyList(), store.list());
+ assertEquals(Collections.<Long>emptyList(), store.list());
EasyMock.verify(repo);
EasyMock.verify(mock);
diff --git a/fate/src/test/java/org/apache/accumulo/fate/util/RetryTest.java b/fate/src/test/java/org/apache/accumulo/fate/util/RetryTest.java
index 13e6afd..17518fd 100644
--- a/fate/src/test/java/org/apache/accumulo/fate/util/RetryTest.java
+++ b/fate/src/test/java/org/apache/accumulo/fate/util/RetryTest.java
@@ -59,9 +59,9 @@ public class RetryTest {
retry = Retry.builder().maxRetries(MAX_RETRIES).retryAfter(INITIAL_WAIT, MS)
.incrementBy(WAIT_INC, MS).maxWait(MAX_RETRIES * WAIT_INC, MS).logInterval(LOG_INTERVAL, MS)
.createRetry();
- unlimitedRetry = Retry.builder().infiniteRetries().retryAfter(INITIAL_WAIT, MS)
- .incrementBy(WAIT_INC, MS).maxWait(MAX_RETRIES * WAIT_INC, MS).logInterval(LOG_INTERVAL, MS)
- .createRetry();
+ unlimitedRetry =
+ Retry.builder().infiniteRetries().retryAfter(INITIAL_WAIT, MS).incrementBy(WAIT_INC, MS)
+ .maxWait(MAX_RETRIES * WAIT_INC, MS).logInterval(LOG_INTERVAL, MS).createRetry();
}
@Test
@@ -244,8 +244,8 @@ public class RetryTest {
@Test
public void testMaxWait() {
- NeedsMaxWait builder = Retry.builder().maxRetries(10).retryAfter(15, MILLISECONDS)
- .incrementBy(10, MILLISECONDS);
+ NeedsMaxWait builder =
+ Retry.builder().maxRetries(10).retryAfter(15, MILLISECONDS).incrementBy(10, MILLISECONDS);
builder.maxWait(15, MILLISECONDS);
builder.maxWait(16, MILLISECONDS);
@@ -289,9 +289,9 @@ public class RetryTest {
@Test
public void properArgumentsInUnlimitedRetry() {
long startWait = 50L, maxWait = 5000L, waitIncrement = 500L, logInterval = 10000L;
- RetryFactory factory = Retry.builder().infiniteRetries().retryAfter(startWait, MS)
- .incrementBy(waitIncrement, MS).maxWait(maxWait, MS).logInterval(logInterval, MS)
- .createFactory();
+ RetryFactory factory =
+ Retry.builder().infiniteRetries().retryAfter(startWait, MS).incrementBy(waitIncrement, MS)
+ .maxWait(maxWait, MS).logInterval(logInterval, MS).createFactory();
Retry retry = factory.createRetry();
assertEquals(-1, retry.getMaxRetries());
diff --git a/fate/src/test/java/org/apache/accumulo/fate/zookeeper/ZooCacheTest.java b/fate/src/test/java/org/apache/accumulo/fate/zookeeper/ZooCacheTest.java
index f7ca315..36dbca5 100644
--- a/fate/src/test/java/org/apache/accumulo/fate/zookeeper/ZooCacheTest.java
+++ b/fate/src/test/java/org/apache/accumulo/fate/zookeeper/ZooCacheTest.java
@@ -48,8 +48,8 @@ import org.junit.Test;
public class ZooCacheTest {
private static final String ZPATH = "/some/path/in/zk";
private static final byte[] DATA = {(byte) 1, (byte) 2, (byte) 3, (byte) 4};
- private static final List<String> CHILDREN = java.util.Arrays
- .asList(new String[] {"huey", "dewey", "louie"});
+ private static final List<String> CHILDREN =
+ java.util.Arrays.asList(new String[] {"huey", "dewey", "louie"});
private ZooReader zr;
private ZooKeeper zk;
@@ -261,8 +261,8 @@ public class ZooCacheTest {
private void testWatchDataNode(byte[] initialData, Watcher.Event.EventType eventType,
boolean stillCached) throws Exception {
- WatchedEvent event = new WatchedEvent(eventType, Watcher.Event.KeeperState.SyncConnected,
- ZPATH);
+ WatchedEvent event =
+ new WatchedEvent(eventType, Watcher.Event.KeeperState.SyncConnected, ZPATH);
TestWatcher exw = new TestWatcher(event);
zc = new ZooCache(zr, exw);
@@ -333,8 +333,8 @@ public class ZooCacheTest {
private void testWatchChildrenNode(List<String> initialChildren,
Watcher.Event.EventType eventType, boolean stillCached) throws Exception {
- WatchedEvent event = new WatchedEvent(eventType, Watcher.Event.KeeperState.SyncConnected,
- ZPATH);
+ WatchedEvent event =
+ new WatchedEvent(eventType, Watcher.Event.KeeperState.SyncConnected, ZPATH);
TestWatcher exw = new TestWatcher(event);
zc = new ZooCache(zr, exw);
diff --git a/fate/src/test/java/org/apache/accumulo/fate/zookeeper/ZooReaderWriterTest.java b/fate/src/test/java/org/apache/accumulo/fate/zookeeper/ZooReaderWriterTest.java
index 67e1956..aa86228 100644
--- a/fate/src/test/java/org/apache/accumulo/fate/zookeeper/ZooReaderWriterTest.java
+++ b/fate/src/test/java/org/apache/accumulo/fate/zookeeper/ZooReaderWriterTest.java
@@ -101,7 +101,7 @@ public class ZooReaderWriterTest {
public void testMutateNodeCreationFails() throws Exception {
final String path = "/foo";
final byte[] value = new byte[] {0};
- final List<ACL> acls = Collections.<ACL> emptyList();
+ final List<ACL> acls = Collections.<ACL>emptyList();
Mutator mutator = new Mutator() {
@Override
public byte[] mutate(byte[] currentValue) throws Exception {
@@ -123,7 +123,7 @@ public class ZooReaderWriterTest {
public void testMutateWithBadVersion() throws Exception {
final String path = "/foo";
final byte[] value = new byte[] {0};
- final List<ACL> acls = Collections.<ACL> emptyList();
+ final List<ACL> acls = Collections.<ACL>emptyList();
final byte[] mutatedBytes = new byte[] {1};
Mutator mutator = new Mutator() {
@Override
@@ -132,8 +132,8 @@ public class ZooReaderWriterTest {
}
};
- Method getDataMethod = ZooReaderWriter.class.getMethod("getData", String.class, boolean.class,
- Stat.class);
+ Method getDataMethod =
+ ZooReaderWriter.class.getMethod("getData", String.class, boolean.class, Stat.class);
zrw = EasyMock.createMockBuilder(ZooReaderWriter.class)
.addMockedMethods("getRetryFactory", "getZooKeeper").addMockedMethod(getDataMethod)
.createMock();
@@ -161,7 +161,7 @@ public class ZooReaderWriterTest {
public void testMutateWithRetryOnSetData() throws Exception {
final String path = "/foo";
final byte[] value = new byte[] {0};
- final List<ACL> acls = Collections.<ACL> emptyList();
+ final List<ACL> acls = Collections.<ACL>emptyList();
final byte[] mutatedBytes = new byte[] {1};
Mutator mutator = new Mutator() {
@Override
@@ -170,8 +170,8 @@ public class ZooReaderWriterTest {
}
};
- Method getDataMethod = ZooReaderWriter.class.getMethod("getData", String.class, boolean.class,
- Stat.class);
+ Method getDataMethod =
+ ZooReaderWriter.class.getMethod("getData", String.class, boolean.class, Stat.class);
zrw = EasyMock.createMockBuilder(ZooReaderWriter.class)
.addMockedMethods("getRetryFactory", "getZooKeeper").addMockedMethod(getDataMethod)
.createMock();
diff --git a/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestCaseFinder.java b/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestCaseFinder.java
index 4d61f8c..537197a 100644
--- a/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestCaseFinder.java
+++ b/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestCaseFinder.java
@@ -48,8 +48,8 @@ public class IteratorTestCaseFinder {
} catch (IOException e) {
throw new RuntimeException(e);
}
- ImmutableSet<ClassInfo> classes = cp
- .getTopLevelClasses(IteratorTestCase.class.getPackage().getName());
+ ImmutableSet<ClassInfo> classes =
+ cp.getTopLevelClasses(IteratorTestCase.class.getPackage().getName());
final List<IteratorTestCase> testCases = new ArrayList<>();
// final Set<Class<? extends IteratorTestCase>> classes =
diff --git a/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestInput.java b/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestInput.java
index eeb9357..617cb46 100644
--- a/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestInput.java
+++ b/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/IteratorTestInput.java
@@ -59,8 +59,7 @@ public class IteratorTestInput {
*/
public IteratorTestInput(Class<? extends SortedKeyValueIterator<Key,Value>> iteratorClass,
Map<String,String> iteratorOptions, Range range, SortedMap<Key,Value> input) {
- this(iteratorClass, iteratorOptions, range, input, Collections.<ByteSequence> emptySet(),
- false);
+ this(iteratorClass, iteratorOptions, range, input, Collections.<ByteSequence>emptySet(), false);
}
/**
diff --git a/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/testcases/IsolatedDeepCopiesTestCase.java b/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/testcases/IsolatedDeepCopiesTestCase.java
index 66eb937..32c9c4e 100644
--- a/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/testcases/IsolatedDeepCopiesTestCase.java
+++ b/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/testcases/IsolatedDeepCopiesTestCase.java
@@ -80,8 +80,8 @@ public class IsolatedDeepCopiesTestCase extends OutputVerifyingTestCase {
// occasionally deep copy one of the existing iterators
if (random.nextInt(3) == 0) {
log.debug("Deep-copying and re-seeking an iterator");
- SortedKeyValueIterator<Key,Value> newcopy = getRandomElement(iterators)
- .deepCopy(new SimpleIteratorEnvironment());
+ SortedKeyValueIterator<Key,Value> newcopy =
+ getRandomElement(iterators).deepCopy(new SimpleIteratorEnvironment());
newcopy.seek(
new Range(getTopKey(iterators), true, range.getEndKey(), range.isEndKeyInclusive()),
seekColumnFamilies, seekInclusive);
diff --git a/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/testcases/ReSeekTestCase.java b/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/testcases/ReSeekTestCase.java
index ad2d8b6..b447275 100644
--- a/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/testcases/ReSeekTestCase.java
+++ b/iterator-test-harness/src/main/java/org/apache/accumulo/iteratortest/testcases/ReSeekTestCase.java
@@ -91,14 +91,14 @@ public class ReSeekTestCase extends OutputVerifyingTestCase {
// Make a new instance of the iterator
skvi = IteratorTestUtil.instantiateIterator(testInput);
- final SortedKeyValueIterator<Key,Value> sourceCopy = IteratorTestUtil
- .createSource(testInput);
+ final SortedKeyValueIterator<Key,Value> sourceCopy =
+ IteratorTestUtil.createSource(testInput);
skvi.init(sourceCopy, testInput.getIteratorOptions(), new SimpleIteratorEnvironment());
// The new range, resume where we left off (non-inclusive), with same families filter
- final Range newRange = new Range(reSeekStartKey, false, origRange.getEndKey(),
- origRange.isEndKeyInclusive());
+ final Range newRange =
+ new Range(reSeekStartKey, false, origRange.getEndKey(), origRange.isEndKeyInclusive());
log.debug("Re-seeking to {}", newRange);
// Seek there
diff --git a/iterator-test-harness/src/test/java/org/apache/accumulo/iteratortest/framework/JUnitFrameworkTest.java b/iterator-test-harness/src/test/java/org/apache/accumulo/iteratortest/framework/JUnitFrameworkTest.java
index 469721e..cd80205 100644
--- a/iterator-test-harness/src/test/java/org/apache/accumulo/iteratortest/framework/JUnitFrameworkTest.java
+++ b/iterator-test-harness/src/test/java/org/apache/accumulo/iteratortest/framework/JUnitFrameworkTest.java
@@ -59,8 +59,8 @@ public class JUnitFrameworkTest extends BaseJUnit4IteratorTest {
public static Object[][] parameters() {
IteratorTestInput input = getIteratorInput();
IteratorTestOutput output = getIteratorOutput();
- List<IteratorTestCase> tests = Collections
- .<IteratorTestCase> singletonList(new NoopIteratorTestCase());
+ List<IteratorTestCase> tests =
+ Collections.<IteratorTestCase>singletonList(new NoopIteratorTestCase());
return BaseJUnit4IteratorTest.createParameters(input, output, tests);
}
@@ -75,7 +75,7 @@ public class JUnitFrameworkTest extends BaseJUnit4IteratorTest {
}
private static IteratorTestInput getIteratorInput() {
- return new IteratorTestInput(IdentityIterator.class, Collections.<String,String> emptyMap(),
+ return new IteratorTestInput(IdentityIterator.class, Collections.<String,String>emptyMap(),
new Range(), DATA);
}
diff --git a/maven-plugin/src/main/java/org/apache/accumulo/maven/plugin/StartMojo.java b/maven-plugin/src/main/java/org/apache/accumulo/maven/plugin/StartMojo.java
index 6ec32e5..ff12418 100644
--- a/maven-plugin/src/main/java/org/apache/accumulo/maven/plugin/StartMojo.java
+++ b/maven-plugin/src/main/java/org/apache/accumulo/maven/plugin/StartMojo.java
@@ -57,8 +57,8 @@ public class StartMojo extends AbstractAccumuloMojo {
private String miniClasspath;
- static Set<MiniAccumuloClusterImpl> runningClusters = Collections
- .synchronizedSet(new HashSet<MiniAccumuloClusterImpl>());
+ static Set<MiniAccumuloClusterImpl> runningClusters =
+ Collections.synchronizedSet(new HashSet<MiniAccumuloClusterImpl>());
@Override
public void execute() throws MojoExecutionException {
diff --git a/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneAccumuloCluster.java b/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneAccumuloCluster.java
index 8b8825e..332d86d 100644
--- a/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneAccumuloCluster.java
+++ b/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneAccumuloCluster.java
@@ -52,8 +52,8 @@ public class StandaloneAccumuloCluster implements AccumuloCluster {
@SuppressWarnings("unused")
private static final Logger log = LoggerFactory.getLogger(StandaloneAccumuloCluster.class);
- static final List<ServerType> ALL_SERVER_TYPES = Collections
- .unmodifiableList(Arrays.asList(ServerType.MASTER, ServerType.TABLET_SERVER,
+ static final List<ServerType> ALL_SERVER_TYPES =
+ Collections.unmodifiableList(Arrays.asList(ServerType.MASTER, ServerType.TABLET_SERVER,
ServerType.TRACER, ServerType.GARBAGE_COLLECTOR, ServerType.MONITOR));
private Instance instance;
diff --git a/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneClusterControl.java b/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneClusterControl.java
index 7818aab..7d5f79c 100644
--- a/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneClusterControl.java
+++ b/minicluster/src/main/java/org/apache/accumulo/cluster/standalone/StandaloneClusterControl.java
@@ -368,8 +368,8 @@ public class StandaloneClusterControl implements ClusterControl {
}
protected File getConfDir() {
- String confPath = null == clientAccumuloConfDir ? System.getenv("ACCUMULO_CONF_DIR")
- : clientAccumuloConfDir;
+ String confPath =
+ null == clientAccumuloConfDir ? System.getenv("ACCUMULO_CONF_DIR") : clientAccumuloConfDir;
File confDir;
if (null == confPath) {
String homePath = null == accumuloHome ? System.getenv("ACCUMULO_HOME") : accumuloHome;
diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java
index 02c0723..a4949e2 100644
--- a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java
+++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java
@@ -166,8 +166,7 @@ public class MiniAccumuloRunner {
}
String rootPass = opts.prop.containsKey(ROOT_PASSWORD_PROP)
- ? opts.prop.getProperty(ROOT_PASSWORD_PROP)
- : "secret";
+ ? opts.prop.getProperty(ROOT_PASSWORD_PROP) : "secret";
MiniAccumuloConfig config = new MiniAccumuloConfig(miniDir, rootPass);
diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterControl.java b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterControl.java
index eebf5ff..34cc5c6 100644
--- a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterControl.java
+++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterControl.java
@@ -134,7 +134,7 @@ public class MiniAccumuloClusterControl implements ClusterControl {
@Override
public synchronized void start(ServerType server, String hostname) throws IOException {
- start(server, hostname, Collections.<String,String> emptyMap(), Integer.MAX_VALUE);
+ start(server, hostname, Collections.<String,String>emptyMap(), Integer.MAX_VALUE);
}
public synchronized void start(ServerType server, String hostname,
@@ -147,8 +147,8 @@ public class MiniAccumuloClusterControl implements ClusterControl {
case TABLET_SERVER:
synchronized (tabletServerProcesses) {
int count = 0;
- for (int i = tabletServerProcesses.size(); count < limit
- && i < cluster.getConfig().getNumTservers(); i++, ++count) {
+ for (int i = tabletServerProcesses.size();
+ count < limit && i < cluster.getConfig().getNumTservers(); i++, ++count) {
tabletServerProcesses.add(cluster._exec(TabletServer.class, server, configOverrides));
}
}
diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
index 866038b..4da843a 100644
--- a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
+++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
@@ -510,8 +510,8 @@ public class MiniAccumuloClusterImpl implements AccumuloCluster {
fileWriter.append("<configuration>\n");
for (Entry<String,String> entry : settings) {
- String value = entry.getValue().replace("&", "&").replace("<", "<").replace(">",
- ">");
+ String value =
+ entry.getValue().replace("&", "&").replace("<", "<").replace(">", ">");
fileWriter.append(
"<property><name>" + entry.getKey() + "</name><value>" + value + "</value></property>\n");
}
@@ -635,8 +635,8 @@ public class MiniAccumuloClusterImpl implements AccumuloCluster {
args.add("--clear-instance-name");
// If we aren't using SASL, add in the root password
- final String saslEnabled = config.getSiteConfig()
- .get(Property.INSTANCE_RPC_SASL_ENABLED.getKey());
+ final String saslEnabled =
+ config.getSiteConfig().get(Property.INSTANCE_RPC_SASL_ENABLED.getKey());
if (null == saslEnabled || !Boolean.parseBoolean(saslEnabled)) {
args.add("--password");
args.add(config.getRootPassword());
diff --git a/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterExistingZooKeepersTest.java b/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterExistingZooKeepersTest.java
index ef7d184..6b02d12 100644
--- a/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterExistingZooKeepersTest.java
+++ b/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterExistingZooKeepersTest.java
@@ -45,8 +45,8 @@ public class MiniAccumuloClusterExistingZooKeepersTest {
private static final String SECRET = "superSecret";
- private static final Logger log = LoggerFactory
- .getLogger(MiniAccumuloClusterExistingZooKeepersTest.class);
+ private static final Logger log =
+ LoggerFactory.getLogger(MiniAccumuloClusterExistingZooKeepersTest.class);
private TestingServer zooKeeper;
private MiniAccumuloCluster accumulo;
@@ -100,8 +100,8 @@ public class MiniAccumuloClusterExistingZooKeepersTest {
String zkTablePath = String.format("/accumulo/%s/tables/%s/name", instance.getInstanceID(),
tableIds.get(tableName));
- try (CuratorFramework client = CuratorFrameworkFactory.newClient(zooKeeper.getConnectString(),
- new RetryOneTime(1))) {
+ try (CuratorFramework client =
+ CuratorFrameworkFactory.newClient(zooKeeper.getConnectString(), new RetryOneTime(1))) {
client.start();
assertNotNull(client.checkExists().forPath(zkTablePath));
assertEquals(tableName, new String(client.getData().forPath(zkTablePath)));
diff --git a/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterStartStopTest.java b/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterStartStopTest.java
index ed87ab3..67d421a 100644
--- a/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterStartStopTest.java
+++ b/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterStartStopTest.java
@@ -34,8 +34,8 @@ import org.slf4j.LoggerFactory;
public class MiniAccumuloClusterStartStopTest {
private static final Logger log = LoggerFactory.getLogger(MiniAccumuloClusterStartStopTest.class);
- private File baseDir = new File(
- System.getProperty("user.dir") + "/target/mini-tests/" + this.getClass().getName());
+ private File baseDir =
+ new File(System.getProperty("user.dir") + "/target/mini-tests/" + this.getClass().getName());
private MiniAccumuloCluster accumulo;
@Rule
diff --git a/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterTest.java b/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterTest.java
index 04a8cbf..611ced3 100644
--- a/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterTest.java
+++ b/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterTest.java
@@ -158,8 +158,8 @@ public class MiniAccumuloClusterTest {
}
@Rule
- public TemporaryFolder folder = new TemporaryFolder(
- new File(System.getProperty("user.dir") + "/target"));
+ public TemporaryFolder folder =
+ new TemporaryFolder(new File(System.getProperty("user.dir") + "/target"));
@Test(timeout = 60000)
public void testPerTableClasspath() throws Exception {
diff --git a/minicluster/src/test/java/org/apache/accumulo/minicluster/impl/CleanShutdownMacTest.java b/minicluster/src/test/java/org/apache/accumulo/minicluster/impl/CleanShutdownMacTest.java
index 72bfbf5..2b9fe17 100644
--- a/minicluster/src/test/java/org/apache/accumulo/minicluster/impl/CleanShutdownMacTest.java
+++ b/minicluster/src/test/java/org/apache/accumulo/minicluster/impl/CleanShutdownMacTest.java
@@ -33,8 +33,8 @@ import org.junit.rules.TemporaryFolder;
public class CleanShutdownMacTest {
@Rule
- public TemporaryFolder tmpDir = new TemporaryFolder(
- new File(System.getProperty("user.dir") + "/target"));
+ public TemporaryFolder tmpDir =
+ new TemporaryFolder(new File(System.getProperty("user.dir") + "/target"));
@SuppressWarnings("unchecked")
@Test
@@ -48,9 +48,9 @@ public class CleanShutdownMacTest {
cluster.setShutdownExecutor(mockService);
EasyMock.expect(future.get()).andReturn(0).anyTimes();
- EasyMock.expect(mockService.<Integer> submit(EasyMock.anyObject(Callable.class)))
+ EasyMock.expect(mockService.<Integer>submit(EasyMock.anyObject(Callable.class)))
.andReturn(future).anyTimes();
- EasyMock.expect(mockService.shutdownNow()).andReturn(Collections.<Runnable> emptyList()).once();
+ EasyMock.expect(mockService.shutdownNow()).andReturn(Collections.<Runnable>emptyList()).once();
EasyMock.replay(mockService, future);
diff --git a/minicluster/src/test/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImplTest.java b/minicluster/src/test/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImplTest.java
index 27ba642..5688d96 100644
--- a/minicluster/src/test/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImplTest.java
+++ b/minicluster/src/test/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImplTest.java
@@ -66,8 +66,8 @@ public class MiniAccumuloClusterImplTest {
FileUtils.deleteQuietly(testDir);
assertTrue(testDir.mkdir());
- MiniAccumuloConfigImpl config = new MiniAccumuloConfigImpl(testDir, "superSecret")
- .setJDWPEnabled(true);
+ MiniAccumuloConfigImpl config =
+ new MiniAccumuloConfigImpl(testDir, "superSecret").setJDWPEnabled(true);
// expressly set number of tservers since we assert it later, in case the default changes
config.setNumTservers(NUM_TSERVERS);
accumulo = new MiniAccumuloClusterImpl(config);
diff --git a/minicluster/src/test/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImplTest.java b/minicluster/src/test/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImplTest.java
index 814d13d..8ce73db 100644
--- a/minicluster/src/test/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImplTest.java
+++ b/minicluster/src/test/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImplTest.java
@@ -34,8 +34,8 @@ import org.junit.rules.TemporaryFolder;
public class MiniAccumuloConfigImplTest {
- static TemporaryFolder tempFolder = new TemporaryFolder(
- new File(System.getProperty("user.dir") + "/target"));
+ static TemporaryFolder tempFolder =
+ new TemporaryFolder(new File(System.getProperty("user.dir") + "/target"));
@BeforeClass
public static void setUp() throws IOException {
@@ -79,8 +79,8 @@ public class MiniAccumuloConfigImplTest {
@Test
public void testMemoryConfig() {
- MiniAccumuloConfigImpl config = new MiniAccumuloConfigImpl(tempFolder.getRoot(), "password")
- .initialize();
+ MiniAccumuloConfigImpl config =
+ new MiniAccumuloConfigImpl(tempFolder.getRoot(), "password").initialize();
config.setDefaultMemory(96, MemoryUnit.MEGABYTE);
assertEquals(96 * 1024 * 1024l, config.getMemory(ServerType.MASTER));
assertEquals(96 * 1024 * 1024l, config.getMemory(ServerType.TABLET_SERVER));
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java b/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java
index 89c755d..526a4da 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java
@@ -198,8 +198,8 @@ public class Proxy implements KeywordExecutable {
properties.getProperty(THRIFT_THREAD_POOL_SIZE_KEY, THRIFT_THREAD_POOL_SIZE_DEFAULT));
final long maxFrameSize = AccumuloConfiguration.getMemoryInBytes(
properties.getProperty(THRIFT_MAX_FRAME_SIZE_KEY, THRIFT_MAX_FRAME_SIZE_DEFAULT));
- final int simpleTimerThreadpoolSize = Integer
- .parseInt(Property.GENERAL_SIMPLETIMER_THREADPOOL_SIZE.getDefaultValue());
+ final int simpleTimerThreadpoolSize =
+ Integer.parseInt(Property.GENERAL_SIMPLETIMER_THREADPOOL_SIZE.getDefaultValue());
// How frequently to try to resize the thread pool
final long threadpoolResizeInterval = 1000l * 5;
// No timeout
@@ -212,15 +212,15 @@ public class Proxy implements KeywordExecutable {
ProxyServer impl = new ProxyServer(properties);
// Wrap the implementation -- translate some exceptions
- AccumuloProxy.Iface wrappedImpl = RpcWrapper.service(impl,
- new AccumuloProxy.Processor<AccumuloProxy.Iface>(impl));
+ AccumuloProxy.Iface wrappedImpl =
+ RpcWrapper.service(impl, new AccumuloProxy.Processor<AccumuloProxy.Iface>(impl));
// Create the processor from the implementation
TProcessor processor = new AccumuloProxy.Processor<>(wrappedImpl);
// Get the type of thrift server to instantiate
- final String serverTypeStr = properties.getProperty(THRIFT_SERVER_TYPE,
- THRIFT_SERVER_TYPE_DEFAULT);
+ final String serverTypeStr =
+ properties.getProperty(THRIFT_SERVER_TYPE, THRIFT_SERVER_TYPE_DEFAULT);
ThriftServerType serverType = DEFAULT_SERVER_TYPE;
if (!THRIFT_SERVER_TYPE_DEFAULT.equals(serverTypeStr)) {
serverType = ThriftServerType.get(serverTypeStr);
@@ -277,14 +277,14 @@ public class Proxy implements KeywordExecutable {
}
// Hook up support for tracing for thrift calls
- TimedProcessor timedProcessor = new TimedProcessor(metricsFactory, processor, serverName,
- threadName);
+ TimedProcessor timedProcessor =
+ new TimedProcessor(metricsFactory, processor, serverName, threadName);
// Create the thrift server with our processor and properties
- ServerAddress serverAddr = TServerUtils.startTServer(serverType, timedProcessor,
- protocolFactory, serverName, threadName, numThreads, simpleTimerThreadpoolSize,
- threadpoolResizeInterval, maxFrameSize, sslParams, saslParams, serverSocketTimeout,
- address);
+ ServerAddress serverAddr =
+ TServerUtils.startTServer(serverType, timedProcessor, protocolFactory, serverName,
+ threadName, numThreads, simpleTimerThreadpoolSize, threadpoolResizeInterval,
+ maxFrameSize, sslParams, saslParams, serverSocketTimeout, address);
return serverAddr;
}
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/ProxyServer.java b/proxy/src/main/java/org/apache/accumulo/proxy/ProxyServer.java
index 84cef6a..0a22a8d 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/ProxyServer.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/ProxyServer.java
@@ -131,8 +131,8 @@ import com.google.common.cache.RemovalNotification;
public class ProxyServer implements AccumuloProxy.Iface {
public static final Logger logger = LoggerFactory.getLogger(ProxyServer.class);
- public static final String RPC_ACCUMULO_PRINCIPAL_MISMATCH_MSG = "RPC"
- + " principal did not match requested Accumulo principal";
+ public static final String RPC_ACCUMULO_PRINCIPAL_MISMATCH_MSG =
+ "RPC" + " principal did not match requested Accumulo principal";
protected Instance instance;
protected Class<? extends AuthenticationToken> tokenClass;
@@ -213,8 +213,8 @@ public class ProxyServer implements AccumuloProxy.Iface {
throw new RuntimeException(e);
}
- final String serverTypeStr = props.getProperty(Proxy.THRIFT_SERVER_TYPE,
- Proxy.THRIFT_SERVER_TYPE_DEFAULT);
+ final String serverTypeStr =
+ props.getProperty(Proxy.THRIFT_SERVER_TYPE, Proxy.THRIFT_SERVER_TYPE_DEFAULT);
ThriftServerType tempServerType = Proxy.DEFAULT_SERVER_TYPE;
if (!Proxy.THRIFT_SERVER_TYPE_DEFAULT.equals(serverTypeStr)) {
tempServerType = ThriftServerType.get(serverTypeStr);
@@ -416,8 +416,8 @@ public class ProxyServer implements AccumuloProxy.Iface {
if (compactionStrategy != null) {
org.apache.accumulo.core.client.admin.CompactionStrategyConfig ccc =
- new org.apache.accumulo.core.client.admin.CompactionStrategyConfig(
- compactionStrategy.getClassName());
+ new org.apache.accumulo.core.client.admin.CompactionStrategyConfig(
+ compactionStrategy.getClassName());
if (compactionStrategy.options != null)
ccc.setOptions(compactionStrategy.options);
compactionConfig.setCompactionStrategy(ccc);
@@ -442,8 +442,8 @@ public class ProxyServer implements AccumuloProxy.Iface {
}
}
- private List<IteratorSetting> getIteratorSettings(
- List<org.apache.accumulo.proxy.thrift.IteratorSetting> iterators) {
+ private List<IteratorSetting>
+ getIteratorSettings(List<org.apache.accumulo.proxy.thrift.IteratorSetting> iterators) {
List<IteratorSetting> result = new ArrayList<>();
if (iterators != null) {
for (org.apache.accumulo.proxy.thrift.IteratorSetting is : iterators) {
@@ -463,8 +463,8 @@ public class ProxyServer implements AccumuloProxy.Iface {
if (type == null)
type = org.apache.accumulo.proxy.thrift.TimeType.MILLIS;
- NewTableConfiguration tConfig = new NewTableConfiguration()
- .setTimeType(TimeType.valueOf(type.toString()));
+ NewTableConfiguration tConfig =
+ new NewTableConfiguration().setTimeType(TimeType.valueOf(type.toString()));
if (!versioningIter)
tConfig = tConfig.withoutDefaultIterators();
getConnector(login).tableOperations().create(tableName, tConfig);
@@ -528,8 +528,8 @@ public class ProxyServer implements AccumuloProxy.Iface {
org.apache.accumulo.proxy.thrift.AccumuloSecurityException,
org.apache.accumulo.proxy.thrift.TableNotFoundException, TException {
try {
- Map<String,Set<Text>> groups = getConnector(login).tableOperations()
- .getLocalityGroups(tableName);
+ Map<String,Set<Text>> groups =
+ getConnector(login).tableOperations().getLocalityGroups(tableName);
Map<String,Set<String>> ret = new HashMap<>();
for (Entry<String,Set<Text>> entry : groups.entrySet()) {
Set<String> value = new HashSet<>();
@@ -595,8 +595,8 @@ public class ProxyServer implements AccumuloProxy.Iface {
org.apache.accumulo.proxy.thrift.AccumuloSecurityException,
org.apache.accumulo.proxy.thrift.TableNotFoundException, TException {
try {
- Collection<Text> splits = getConnector(login).tableOperations().listSplits(tableName,
- maxSplits);
+ Collection<Text> splits =
+ getConnector(login).tableOperations().listSplits(tableName, maxSplits);
List<ByteBuffer> ret = new ArrayList<>();
for (Text split : splits) {
ret.add(TextUtil.getByteBuffer(split));
@@ -752,8 +752,8 @@ public class ProxyServer implements AccumuloProxy.Iface {
org.apache.accumulo.proxy.thrift.AccumuloSecurityException,
org.apache.accumulo.proxy.thrift.TableNotFoundException, TException {
try {
- List<org.apache.accumulo.core.client.admin.DiskUsage> diskUsages = getConnector(login)
- .tableOperations().getDiskUsage(tables);
+ List<org.apache.accumulo.core.client.admin.DiskUsage> diskUsages =
+ getConnector(login).tableOperations().getDiskUsage(tables);
List<DiskUsage> retUsages = new ArrayList<>();
for (org.apache.accumulo.core.client.admin.DiskUsage diskUsage : diskUsages) {
DiskUsage usage = new DiskUsage();
@@ -807,11 +807,11 @@ public class ProxyServer implements AccumuloProxy.Iface {
org.apache.accumulo.proxy.thrift.AccumuloSecurityException, TException {
List<org.apache.accumulo.proxy.thrift.ActiveScan> result = new ArrayList<>();
try {
- List<ActiveScan> activeScans = getConnector(login).instanceOperations()
- .getActiveScans(tserver);
+ List<ActiveScan> activeScans =
+ getConnector(login).instanceOperations().getActiveScans(tserver);
for (ActiveScan scan : activeScans) {
org.apache.accumulo.proxy.thrift.ActiveScan pscan =
- new org.apache.accumulo.proxy.thrift.ActiveScan();
+ new org.apache.accumulo.proxy.thrift.ActiveScan();
pscan.client = scan.getClient();
pscan.user = scan.getUser();
pscan.table = scan.getTable();
@@ -826,7 +826,7 @@ public class ProxyServer implements AccumuloProxy.Iface {
if (scan.getColumns() != null) {
for (Column c : scan.getColumns()) {
org.apache.accumulo.proxy.thrift.Column column =
- new org.apache.accumulo.proxy.thrift.Column();
+ new org.apache.accumulo.proxy.thrift.Column();
column.setColFamily(c.getColumnFamily());
column.setColQualifier(c.getColumnQualifier());
column.setColVisibility(c.getColumnVisibility());
@@ -841,8 +841,8 @@ public class ProxyServer implements AccumuloProxy.Iface {
int priority = Integer.parseInt(parts[1]);
String classname = parts[2];
org.apache.accumulo.proxy.thrift.IteratorSetting settings =
- new org.apache.accumulo.proxy.thrift.IteratorSetting(
- priority, name, classname, scan.getSsio().get(name));
+ new org.apache.accumulo.proxy.thrift.IteratorSetting(priority, name, classname,
+ scan.getSsio().get(name));
pscan.iterators.add(settings);
}
}
@@ -868,11 +868,11 @@ public class ProxyServer implements AccumuloProxy.Iface {
try {
List<org.apache.accumulo.proxy.thrift.ActiveCompaction> result = new ArrayList<>();
- List<ActiveCompaction> active = getConnector(login).instanceOperations()
- .getActiveCompactions(tserver);
+ List<ActiveCompaction> active =
+ getConnector(login).instanceOperations().getActiveCompactions(tserver);
for (ActiveCompaction comp : active) {
org.apache.accumulo.proxy.thrift.ActiveCompaction pcomp =
- new org.apache.accumulo.proxy.thrift.ActiveCompaction();
+ new org.apache.accumulo.proxy.thrift.ActiveCompaction();
pcomp.age = comp.getAge();
pcomp.entriesRead = comp.getEntriesRead();
pcomp.entriesWritten = comp.getEntriesWritten();
@@ -892,9 +892,8 @@ public class ProxyServer implements AccumuloProxy.Iface {
if (comp.getIterators() != null) {
for (IteratorSetting setting : comp.getIterators()) {
org.apache.accumulo.proxy.thrift.IteratorSetting psetting =
- new org.apache.accumulo.proxy.thrift.IteratorSetting(
- setting.getPriority(), setting.getName(), setting.getIteratorClass(),
- setting.getOptions());
+ new org.apache.accumulo.proxy.thrift.IteratorSetting(setting.getPriority(),
+ setting.getName(), setting.getIteratorClass(), setting.getOptions());
pcomp.iterators.add(psetting);
}
}
@@ -1249,9 +1248,9 @@ public class ProxyServer implements AccumuloProxy.Iface {
ranges.add(new Range());
} else {
for (org.apache.accumulo.proxy.thrift.Range range : opts.ranges) {
- Range aRange = new Range(
- range.getStart() == null ? null : Util.fromThrift(range.getStart()), true,
- range.getStop() == null ? null : Util.fromThrift(range.getStop()), false);
+ Range aRange =
+ new Range(range.getStart() == null ? null : Util.fromThrift(range.getStart()), true,
+ range.getStop() == null ? null : Util.fromThrift(range.getStop()), false);
ranges.add(aRange);
}
}
@@ -1561,8 +1560,8 @@ public class ProxyServer implements AccumuloProxy.Iface {
throw new IllegalArgumentException("Invalid durability value: " + durability.ordinal());
}
- private IteratorSetting getIteratorSetting(
- org.apache.accumulo.proxy.thrift.IteratorSetting setting) {
+ private IteratorSetting
+ getIteratorSetting(org.apache.accumulo.proxy.thrift.IteratorSetting setting) {
return new IteratorSetting(setting.priority, setting.name, setting.iteratorClass,
setting.getProperties());
}
@@ -1571,8 +1570,8 @@ public class ProxyServer implements AccumuloProxy.Iface {
return IteratorScope.valueOf(scope.toString().toLowerCase());
}
- private EnumSet<IteratorScope> getIteratorScopes(
- Set<org.apache.accumulo.proxy.thrift.IteratorScope> scopes) {
+ private EnumSet<IteratorScope>
+ getIteratorScopes(Set<org.apache.accumulo.proxy.thrift.IteratorScope> scopes) {
EnumSet<IteratorScope> scopes_ = EnumSet.noneOf(IteratorScope.class);
for (org.apache.accumulo.proxy.thrift.IteratorScope scope : scopes) {
scopes_.add(getIteratorScope(scope));
@@ -1580,10 +1579,10 @@ public class ProxyServer implements AccumuloProxy.Iface {
return scopes_;
}
- private EnumSet<org.apache.accumulo.proxy.thrift.IteratorScope> getProxyIteratorScopes(
- Set<IteratorScope> scopes) {
- EnumSet<org.apache.accumulo.proxy.thrift.IteratorScope> scopes_ = EnumSet
- .noneOf(org.apache.accumulo.proxy.thrift.IteratorScope.class);
+ private EnumSet<org.apache.accumulo.proxy.thrift.IteratorScope>
+ getProxyIteratorScopes(Set<IteratorScope> scopes) {
+ EnumSet<org.apache.accumulo.proxy.thrift.IteratorScope> scopes_ =
+ EnumSet.noneOf(org.apache.accumulo.proxy.thrift.IteratorScope.class);
for (IteratorScope scope : scopes) {
scopes_.add(
org.apache.accumulo.proxy.thrift.IteratorScope.valueOf(scope.toString().toUpperCase()));
@@ -1629,8 +1628,8 @@ public class ProxyServer implements AccumuloProxy.Iface {
org.apache.accumulo.proxy.thrift.TableNotFoundException,
org.apache.accumulo.proxy.thrift.TableExistsException, TException {
try {
- propertiesToExclude = propertiesToExclude == null ? new HashSet<String>()
- : propertiesToExclude;
+ propertiesToExclude =
+ propertiesToExclude == null ? new HashSet<String>() : propertiesToExclude;
propertiesToSet = propertiesToSet == null ? new HashMap<String,String>() : propertiesToSet;
getConnector(login).tableOperations().clone(tableName, newTableName, flush, propertiesToSet,
@@ -1691,8 +1690,8 @@ public class ProxyServer implements AccumuloProxy.Iface {
org.apache.accumulo.proxy.thrift.AccumuloSecurityException,
org.apache.accumulo.proxy.thrift.TableNotFoundException, TException {
try {
- Map<String,EnumSet<IteratorScope>> iterMap = getConnector(login).tableOperations()
- .listIterators(tableName);
+ Map<String,EnumSet<IteratorScope>> iterMap =
+ getConnector(login).tableOperations().listIterators(tableName);
Map<String,Set<org.apache.accumulo.proxy.thrift.IteratorScope>> result = new HashMap<>();
for (Map.Entry<String,EnumSet<IteratorScope>> entry : iterMap.entrySet()) {
result.put(entry.getKey(), getProxyIteratorScopes(entry.getValue()));
@@ -1975,13 +1974,14 @@ public class ProxyServer implements AccumuloProxy.Iface {
}
@Override
- public Map<String,Set<org.apache.accumulo.proxy.thrift.IteratorScope>> listNamespaceIterators(
- ByteBuffer login, String namespaceName)
- throws org.apache.accumulo.proxy.thrift.AccumuloException,
- org.apache.accumulo.proxy.thrift.AccumuloSecurityException,
- org.apache.accumulo.proxy.thrift.NamespaceNotFoundException, TException {
+ public Map<String,Set<org.apache.accumulo.proxy.thrift.IteratorScope>>
+ listNamespaceIterators(ByteBuffer login, String namespaceName)
+ throws org.apache.accumulo.proxy.thrift.AccumuloException,
+ org.apache.accumulo.proxy.thrift.AccumuloSecurityException,
+ org.apache.accumulo.proxy.thrift.NamespaceNotFoundException, TException {
try {
- Map<String,Set<org.apache.accumulo.proxy.thrift.IteratorScope>> namespaceIters = new HashMap<>();
+ Map<String,Set<org.apache.accumulo.proxy.thrift.IteratorScope>> namespaceIters =
+ new HashMap<>();
for (Map.Entry<String,EnumSet<IteratorScope>> entry : getConnector(login)
.namespaceOperations().listIterators(namespaceName).entrySet()) {
namespaceIters.put(entry.getKey(), getProxyIteratorScopes(entry.getValue()));
@@ -2182,8 +2182,8 @@ public class ProxyServer implements AccumuloProxy.Iface {
for (Condition tcond : cu.getValue().conditions) {
org.apache.accumulo.core.data.Condition cond =
- new org.apache.accumulo.core.data.Condition(
- tcond.column.getColFamily(), tcond.column.getColQualifier());
+ new org.apache.accumulo.core.data.Condition(tcond.column.getColFamily(),
+ tcond.column.getColQualifier());
if (tcond.getColumn().getColVisibility() != null
&& tcond.getColumn().getColVisibility().length > 0) {
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/Util.java b/proxy/src/main/java/org/apache/accumulo/proxy/Util.java
index e5910d1..3d2bfc1 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/Util.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/Util.java
@@ -37,8 +37,8 @@ public class Util {
return ByteBuffer.wrap(new BigInteger(numbytes * 5, random).toString(32).getBytes(UTF_8));
}
- public static IteratorSetting iteratorSetting2ProxyIteratorSetting(
- org.apache.accumulo.core.client.IteratorSetting is) {
+ public static IteratorSetting
+ iteratorSetting2ProxyIteratorSetting(org.apache.accumulo.core.client.IteratorSetting is) {
return new IteratorSetting(is.getPriority(), is.getName(), is.getIteratorClass(),
is.getOptions());
}
diff --git a/server/base/src/main/java/org/apache/accumulo/server/Accumulo.java b/server/base/src/main/java/org/apache/accumulo/server/Accumulo.java
index 820d5e6..1924c12 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/Accumulo.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/Accumulo.java
@@ -172,8 +172,8 @@ public class Accumulo {
// Set up polling log4j updates and log-forwarding using information advertised in zookeeper by
// the monitor
- MonitorLog4jWatcher logConfigWatcher = new MonitorLog4jWatcher(instance.getInstanceID(),
- logConfigFile);
+ MonitorLog4jWatcher logConfigWatcher =
+ new MonitorLog4jWatcher(instance.getInstanceID(), logConfigFile);
logConfigWatcher.setDelay(5000L);
logConfigWatcher.start();
diff --git a/server/base/src/main/java/org/apache/accumulo/server/AccumuloServerContext.java b/server/base/src/main/java/org/apache/accumulo/server/AccumuloServerContext.java
index eae2868..73a2a66 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/AccumuloServerContext.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/AccumuloServerContext.java
@@ -81,8 +81,8 @@ public class AccumuloServerContext extends ClientContext {
void enforceKerberosLogin() {
final AccumuloConfiguration conf = confFactory.getSiteConfiguration();
// Unwrap _HOST into the FQDN to make the kerberos principal we'll compare against
- final String kerberosPrincipal = SecurityUtil
- .getServerPrincipal(conf.get(Property.GENERAL_KERBEROS_PRINCIPAL));
+ final String kerberosPrincipal =
+ SecurityUtil.getServerPrincipal(conf.get(Property.GENERAL_KERBEROS_PRINCIPAL));
UserGroupInformation loginUser;
try {
// The system user should be logged in via keytab when the process is started, not the
diff --git a/server/base/src/main/java/org/apache/accumulo/server/ServerConstants.java b/server/base/src/main/java/org/apache/accumulo/server/ServerConstants.java
index 2992af6..b2d8d0a 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/ServerConstants.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/ServerConstants.java
@@ -90,8 +90,8 @@ public class ServerConstants {
// these are functions to delay loading the Accumulo configuration unless we must
public static synchronized String[] getBaseUris() {
if (baseUris == null) {
- baseUris = checkBaseUris(VolumeConfiguration.getVolumeUris(SiteConfiguration.getInstance()),
- false);
+ baseUris =
+ checkBaseUris(VolumeConfiguration.getVolumeUris(SiteConfiguration.getInstance()), false);
}
return baseUris;
@@ -179,8 +179,8 @@ public class ServerConstants {
public static synchronized List<Pair<Path,Path>> getVolumeReplacements() {
if (replacementsList == null) {
- String replacements = SiteConfiguration.getInstance()
- .get(Property.INSTANCE_VOLUMES_REPLACEMENTS);
+ String replacements =
+ SiteConfiguration.getInstance().get(Property.INSTANCE_VOLUMES_REPLACEMENTS);
replacements = replacements.trim();
diff --git a/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java b/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
index 62abbcc..8d29a85 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
@@ -81,8 +81,8 @@ public class BulkImporter {
public static List<String> bulkLoad(ClientContext context, long tid, String tableId,
List<String> files, String errorDir, boolean setTime) throws IOException, AccumuloException,
AccumuloSecurityException, ThriftTableOperationException {
- AssignmentStats stats = new BulkImporter(context, tid, tableId, setTime).importFiles(files,
- new Path(errorDir));
+ AssignmentStats stats =
+ new BulkImporter(context, tid, tableId, setTime).importFiles(files, new Path(errorDir));
List<String> result = new ArrayList<>();
for (Path p : stats.completeFailures.keySet()) {
result.add(p.toString());
@@ -112,8 +112,8 @@ public class BulkImporter {
AccumuloException, AccumuloSecurityException, ThriftTableOperationException {
int numThreads = context.getConfiguration().getCount(Property.TSERV_BULK_PROCESS_THREADS);
- int numAssignThreads = context.getConfiguration()
- .getCount(Property.TSERV_BULK_ASSIGNMENT_THREADS);
+ int numAssignThreads =
+ context.getConfiguration().getCount(Property.TSERV_BULK_ASSIGNMENT_THREADS);
timer = new StopWatch<>(Timers.class);
timer.start(Timers.TOTAL);
@@ -128,19 +128,19 @@ public class BulkImporter {
}
AssignmentStats assignmentStats = new AssignmentStats(paths.size());
- final Map<Path,List<KeyExtent>> completeFailures = Collections
- .synchronizedSortedMap(new TreeMap<Path,List<KeyExtent>>());
+ final Map<Path,List<KeyExtent>> completeFailures =
+ Collections.synchronizedSortedMap(new TreeMap<Path,List<KeyExtent>>());
ClientService.Client client = null;
final TabletLocator locator = TabletLocator.getLocator(context, tableId);
try {
- final Map<Path,List<TabletLocation>> assignments = Collections
- .synchronizedSortedMap(new TreeMap<Path,List<TabletLocation>>());
+ final Map<Path,List<TabletLocation>> assignments =
+ Collections.synchronizedSortedMap(new TreeMap<Path,List<TabletLocation>>());
timer.start(Timers.EXAMINE_MAP_FILES);
- ExecutorService threadPool = Executors.newFixedThreadPool(numThreads,
- new NamingThreadFactory("findOverlapping"));
+ ExecutorService threadPool =
+ Executors.newFixedThreadPool(numThreads, new NamingThreadFactory("findOverlapping"));
for (Path path : paths) {
final Path mapFile = path;
@@ -365,11 +365,11 @@ public class BulkImporter {
throw new RuntimeException(e);
}
- final Map<Path,List<AssignmentInfo>> ais = Collections
- .synchronizedMap(new TreeMap<Path,List<AssignmentInfo>>());
+ final Map<Path,List<AssignmentInfo>> ais =
+ Collections.synchronizedMap(new TreeMap<Path,List<AssignmentInfo>>());
- ExecutorService threadPool = Executors.newFixedThreadPool(numThreads,
- new NamingThreadFactory("estimateSizes"));
+ ExecutorService threadPool =
+ Executors.newFixedThreadPool(numThreads, new NamingThreadFactory("estimateSizes"));
for (final Entry<Path,List<TabletLocation>> entry : assignments.entrySet()) {
if (entry.getValue().size() == 1) {
@@ -398,8 +398,8 @@ public class BulkImporter {
if (estimatedSizes == null) {
// estimation failed, do a simple estimation
estimatedSizes = new TreeMap<>();
- long estSize = (long) (mapFileSizes.get(entry.getKey())
- / (double) entry.getValue().size());
+ long estSize =
+ (long) (mapFileSizes.get(entry.getKey()) / (double) entry.getValue().size());
for (TabletLocation tl : entry.getValue())
estimatedSizes.put(tl.tablet_extent, estSize);
}
@@ -449,8 +449,8 @@ public class BulkImporter {
VolumeManager fs, String tableId, Map<Path,List<TabletLocation>> assignments,
Collection<Path> paths, int numThreads, int numMapThreads) {
timer.start(Timers.EXAMINE_MAP_FILES);
- Map<Path,List<AssignmentInfo>> assignInfo = estimateSizes(context.getConfiguration(), conf, fs,
- assignments, paths, numMapThreads);
+ Map<Path,List<AssignmentInfo>> assignInfo =
+ estimateSizes(context.getConfiguration(), conf, fs, assignments, paths, numMapThreads);
timer.stop(Timers.EXAMINE_MAP_FILES);
Map<Path,List<KeyExtent>> ret;
@@ -553,8 +553,8 @@ public class BulkImporter {
// group assignments by tabletserver
- Map<Path,List<KeyExtent>> assignmentFailures = Collections
- .synchronizedMap(new TreeMap<Path,List<KeyExtent>>());
+ Map<Path,List<KeyExtent>> assignmentFailures =
+ Collections.synchronizedMap(new TreeMap<Path,List<KeyExtent>>());
TreeMap<String,Map<KeyExtent,List<PathSize>>> assignmentsPerTabletServer = new TreeMap<>();
@@ -590,8 +590,8 @@ public class BulkImporter {
apt.put(entry.getKey(), entry.getValue());
}
- ExecutorService threadPool = Executors.newFixedThreadPool(numThreads,
- new NamingThreadFactory("submit"));
+ ExecutorService threadPool =
+ Executors.newFixedThreadPool(numThreads, new NamingThreadFactory("submit"));
for (Entry<String,Map<KeyExtent,List<PathSize>>> entry : assignmentsPerTabletServer
.entrySet()) {
@@ -620,17 +620,19 @@ public class BulkImporter {
throws AccumuloException, AccumuloSecurityException {
try {
long timeInMillis = context.getConfiguration().getTimeInMillis(Property.TSERV_BULK_TIMEOUT);
- TabletClientService.Iface client = ThriftUtil.getTServerClient(location, context,
- timeInMillis);
+ TabletClientService.Iface client =
+ ThriftUtil.getTServerClient(location, context, timeInMillis);
try {
- HashMap<KeyExtent,Map<String,org.apache.accumulo.core.data.thrift.MapFileInfo>> files = new HashMap<>();
+ HashMap<KeyExtent,Map<String,org.apache.accumulo.core.data.thrift.MapFileInfo>> files =
+ new HashMap<>();
for (Entry<KeyExtent,List<PathSize>> entry : assignmentsPerTablet.entrySet()) {
- HashMap<String,org.apache.accumulo.core.data.thrift.MapFileInfo> tabletFiles = new HashMap<>();
+ HashMap<String,org.apache.accumulo.core.data.thrift.MapFileInfo> tabletFiles =
+ new HashMap<>();
files.put(entry.getKey(), tabletFiles);
for (PathSize pathSize : entry.getValue()) {
- org.apache.accumulo.core.data.thrift.MapFileInfo mfi = new org.apache.accumulo.core.data.thrift.MapFileInfo(
- pathSize.estSize);
+ org.apache.accumulo.core.data.thrift.MapFileInfo mfi =
+ new org.apache.accumulo.core.data.thrift.MapFileInfo(pathSize.estSize);
tabletFiles.put(pathSize.path.toString(), mfi);
}
}
@@ -683,9 +685,9 @@ public class BulkImporter {
String filename = file.toString();
// log.debug(filename + " finding overlapping tablets " + startRow + " -> " + endRow);
FileSystem fs = vm.getVolumeByPath(file).getFileSystem();
- FileSKVIterator reader = FileOperations.getInstance().newReaderBuilder()
- .forFile(filename, fs, fs.getConf()).withTableConfiguration(context.getConfiguration())
- .seekToBeginning().build();
+ FileSKVIterator reader =
+ FileOperations.getInstance().newReaderBuilder().forFile(filename, fs, fs.getConf())
+ .withTableConfiguration(context.getConfiguration()).seekToBeginning().build();
try {
Text row = startRow;
if (row == null)
diff --git a/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java b/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
index 3d76cca..de992e5 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
@@ -325,8 +325,8 @@ public class ClientServiceHandler implements ClientService.Iface {
public Map<String,String> getTableConfiguration(TInfo tinfo, TCredentials credentials,
String tableName) throws TException, ThriftTableOperationException {
String tableId = checkTableId(instance, tableName, null);
- AccumuloConfiguration config = context.getServerConfigurationFactory()
- .getTableConfiguration(tableId);
+ AccumuloConfiguration config =
+ context.getServerConfigurationFactory().getTableConfiguration(tableId);
return conf(credentials, config);
}
@@ -401,8 +401,8 @@ public class ClientServiceHandler implements ClientService.Iface {
try {
shouldMatch = loader.loadClass(interfaceMatch);
- AccumuloConfiguration conf = context.getServerConfigurationFactory()
- .getTableConfiguration(tableId);
+ AccumuloConfiguration conf =
+ context.getServerConfigurationFactory().getTableConfiguration(tableId);
String context = conf.get(Property.TABLE_CLASSPATH);
@@ -437,8 +437,8 @@ public class ClientServiceHandler implements ClientService.Iface {
try {
shouldMatch = loader.loadClass(interfaceMatch);
- AccumuloConfiguration conf = context.getServerConfigurationFactory()
- .getNamespaceConfiguration(namespaceId);
+ AccumuloConfiguration conf =
+ context.getServerConfigurationFactory().getNamespaceConfiguration(namespaceId);
String context = conf.get(Property.TABLE_CLASSPATH);
@@ -476,9 +476,9 @@ public class ClientServiceHandler implements ClientService.Iface {
}
// use the same set of tableIds that were validated above to avoid race conditions
- Map<TreeSet<String>,Long> diskUsage = TableDiskUsage.getDiskUsage(
- context.getServerConfigurationFactory().getConfiguration(), tableIds, fs,
- context.getConnector());
+ Map<TreeSet<String>,Long> diskUsage =
+ TableDiskUsage.getDiskUsage(context.getServerConfigurationFactory().getConfiguration(),
+ tableIds, fs, context.getConnector());
List<TDiskUsage> retUsages = new ArrayList<>();
for (Map.Entry<TreeSet<String>,Long> usageItem : diskUsage.entrySet()) {
retUsages.add(new TDiskUsage(new ArrayList<>(usageItem.getKey()), usageItem.getValue()));
@@ -507,8 +507,8 @@ public class ClientServiceHandler implements ClientService.Iface {
throw new ThriftTableOperationException(null, ns, null,
TableOperationExceptionType.NAMESPACE_NOTFOUND, why);
}
- AccumuloConfiguration config = context.getServerConfigurationFactory()
- .getNamespaceConfiguration(namespaceId);
+ AccumuloConfiguration config =
+ context.getServerConfigurationFactory().getNamespaceConfiguration(namespaceId);
return conf(credentials, config);
}
diff --git a/server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfigurationFactory.java b/server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfigurationFactory.java
index f3dda25..d4e432e 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfigurationFactory.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfigurationFactory.java
@@ -36,10 +36,10 @@ import org.apache.accumulo.fate.zookeeper.ZooCacheFactory;
public class ServerConfigurationFactory extends ServerConfiguration {
private static final Map<String,Map<String,TableConfiguration>> tableConfigs = new HashMap<>(1);
- private static final Map<String,Map<String,NamespaceConfiguration>> namespaceConfigs = new HashMap<>(
- 1);
- private static final Map<String,Map<String,NamespaceConfiguration>> tableParentConfigs = new HashMap<>(
- 1);
+ private static final Map<String,Map<String,NamespaceConfiguration>> namespaceConfigs =
+ new HashMap<>(1);
+ private static final Map<String,Map<String,NamespaceConfiguration>> tableParentConfigs =
+ new HashMap<>(1);
private static void addInstanceToCaches(String iid) {
synchronized (tableConfigs) {
@@ -59,8 +59,8 @@ public class ServerConfigurationFactory extends ServerConfiguration {
}
}
- private static final SecurityPermission CONFIGURATION_PERMISSION = new SecurityPermission(
- "configurationPermission");
+ private static final SecurityPermission CONFIGURATION_PERMISSION =
+ new SecurityPermission("configurationPermission");
private static final SecurityManager SM = System.getSecurityManager();
private static void checkPermissions() {
@@ -141,8 +141,8 @@ public class ServerConfigurationFactory extends ServerConfiguration {
public synchronized AccumuloConfiguration getConfiguration() {
if (systemConfig == null) {
checkPermissions();
- systemConfig = new ZooConfigurationFactory().getInstance(instance, zcf,
- getSiteConfiguration());
+ systemConfig =
+ new ZooConfigurationFactory().getInstance(instance, zcf, getSiteConfiguration());
}
return systemConfig;
}
diff --git a/server/base/src/main/java/org/apache/accumulo/server/conf/TableConfiguration.java b/server/base/src/main/java/org/apache/accumulo/server/conf/TableConfiguration.java
index 750ff71..4374d1a 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/conf/TableConfiguration.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/conf/TableConfiguration.java
@@ -205,8 +205,8 @@ public class TableConfiguration extends ObservableConfiguration {
List<IterInfo> iters = new ArrayList<>();
Map<String,Map<String,String>> allOptions = new HashMap<>();
IteratorUtil.parseIterConf(scope, iters, allOptions, this);
- ParsedIteratorConfig newPic = new ParsedIteratorConfig(iters, allOptions,
- get(Property.TABLE_CLASSPATH), count);
+ ParsedIteratorConfig newPic =
+ new ParsedIteratorConfig(iters, allOptions, get(Property.TABLE_CLASSPATH), count);
ref.compareAndSet(pic, newPic);
pic = newPic;
}
diff --git a/server/base/src/main/java/org/apache/accumulo/server/conf/ZooConfiguration.java b/server/base/src/main/java/org/apache/accumulo/server/conf/ZooConfiguration.java
index 9f3a916..77f446b 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/conf/ZooConfiguration.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/conf/ZooConfiguration.java
@@ -38,8 +38,8 @@ public class ZooConfiguration extends AccumuloConfiguration {
private final ZooCache propCache;
private final AccumuloConfiguration parent;
- private final Map<String,String> fixedProps = Collections
- .synchronizedMap(new HashMap<String,String>());
+ private final Map<String,String> fixedProps =
+ Collections.synchronizedMap(new HashMap<String,String>());
private final String propPathPrefix;
protected ZooConfiguration(String instanceId, ZooCache propCache, AccumuloConfiguration parent) {
diff --git a/server/base/src/main/java/org/apache/accumulo/server/conf/ZooConfigurationFactory.java b/server/base/src/main/java/org/apache/accumulo/server/conf/ZooConfigurationFactory.java
index bba9425..9edeb3e 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/conf/ZooConfigurationFactory.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/conf/ZooConfigurationFactory.java
@@ -84,8 +84,8 @@ class ZooConfigurationFactory {
propCache = zcf.getZooCache(parent.get(Property.INSTANCE_ZK_HOST),
(int) parent.getTimeInMillis(Property.INSTANCE_ZK_TIMEOUT), watcher);
} else {
- propCache = zcf.getZooCache(inst.getZooKeepers(), inst.getZooKeepersSessionTimeOut(),
- watcher);
+ propCache =
+ zcf.getZooCache(inst.getZooKeepers(), inst.getZooKeepersSessionTimeOut(), watcher);
}
config = new ZooConfiguration(instanceId, propCache, parent);
instances.put(instanceId, config);
diff --git a/server/base/src/main/java/org/apache/accumulo/server/constraints/MetadataConstraints.java b/server/base/src/main/java/org/apache/accumulo/server/constraints/MetadataConstraints.java
index c9f7c71..99b5cb6 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/constraints/MetadataConstraints.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/constraints/MetadataConstraints.java
@@ -60,20 +60,21 @@ public class MetadataConstraints implements Constraint {
{
for (int i = 0; i < 256; i++) {
- validTableNameChars[i] = ((i >= 'a' && i <= 'z') || (i >= '0' && i <= '9')) || i == '!'
- || i == '+';
+ validTableNameChars[i] =
+ ((i >= 'a' && i <= 'z') || (i >= '0' && i <= '9')) || i == '!' || i == '+';
}
}
- private static final HashSet<ColumnFQ> validColumnQuals = new HashSet<>(Arrays.asList(
- TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN,
- TabletsSection.TabletColumnFamily.OLD_PREV_ROW_COLUMN,
- TabletsSection.SuspendLocationColumn.SUSPEND_COLUMN,
- TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN,
- TabletsSection.TabletColumnFamily.SPLIT_RATIO_COLUMN,
- TabletsSection.ServerColumnFamily.TIME_COLUMN, TabletsSection.ServerColumnFamily.LOCK_COLUMN,
- TabletsSection.ServerColumnFamily.FLUSH_COLUMN,
- TabletsSection.ServerColumnFamily.COMPACT_COLUMN));
+ private static final HashSet<ColumnFQ> validColumnQuals =
+ new HashSet<>(Arrays.asList(TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN,
+ TabletsSection.TabletColumnFamily.OLD_PREV_ROW_COLUMN,
+ TabletsSection.SuspendLocationColumn.SUSPEND_COLUMN,
+ TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN,
+ TabletsSection.TabletColumnFamily.SPLIT_RATIO_COLUMN,
+ TabletsSection.ServerColumnFamily.TIME_COLUMN,
+ TabletsSection.ServerColumnFamily.LOCK_COLUMN,
+ TabletsSection.ServerColumnFamily.FLUSH_COLUMN,
+ TabletsSection.ServerColumnFamily.COMPACT_COLUMN));
private static final HashSet<Text> validColumnFams = new HashSet<>(Arrays.asList(
TabletsSection.BulkFileColumnFamily.NAME, LogColumnFamily.NAME, ScanFileColumnFamily.NAME,
@@ -256,8 +257,8 @@ public class MetadataConstraints implements Constraint {
Text per = KeyExtent.decodePrevEndRow(new Value(columnUpdate.getValue()));
- boolean prevEndRowLessThanEndRow = per == null || ke.getEndRow() == null
- || per.compareTo(ke.getEndRow()) < 0;
+ boolean prevEndRowLessThanEndRow =
+ per == null || ke.getEndRow() == null || per.compareTo(ke.getEndRow()) < 0;
if (!prevEndRowLessThanEndRow) {
violations = addViolation(violations, 3);
diff --git a/server/base/src/main/java/org/apache/accumulo/server/fs/PerTableVolumeChooser.java b/server/base/src/main/java/org/apache/accumulo/server/fs/PerTableVolumeChooser.java
index 682d6c8..974f810 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/fs/PerTableVolumeChooser.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/fs/PerTableVolumeChooser.java
@@ -33,7 +33,8 @@ public class PerTableVolumeChooser implements VolumeChooser {
private final VolumeChooser fallbackVolumeChooser = new RandomVolumeChooser();
// TODO Add hint of expected size to construction, see ACCUMULO-3410
/* Track VolumeChooser instances so they can keep state. */
- private final ConcurrentHashMap<String,VolumeChooser> tableSpecificChooser = new ConcurrentHashMap<>();
+ private final ConcurrentHashMap<String,VolumeChooser> tableSpecificChooser =
+ new ConcurrentHashMap<>();
// TODO has to be lazily initialized currently because of the reliance on HdfsZooInstance. see
// ACCUMULO-3411
private volatile ServerConfigurationFactory serverConfs;
diff --git a/server/base/src/main/java/org/apache/accumulo/server/fs/PreferredVolumeChooser.java b/server/base/src/main/java/org/apache/accumulo/server/fs/PreferredVolumeChooser.java
index 1f03fee..16da478 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/fs/PreferredVolumeChooser.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/fs/PreferredVolumeChooser.java
@@ -61,8 +61,8 @@ public class PreferredVolumeChooser extends RandomVolumeChooser {
};
@SuppressWarnings("unchecked")
- private final Map<String,Set<String>> parsedPreferredVolumes = Collections
- .synchronizedMap(new LRUMap(1000));
+ private final Map<String,Set<String>> parsedPreferredVolumes =
+ Collections.synchronizedMap(new LRUMap(1000));
// TODO has to be lazily initialized currently because of the reliance on HdfsZooInstance. see
// ACCUMULO-3411
private volatile ServerConfigurationFactory serverConfs;
diff --git a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java
index 512100b..1ca1a3b 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java
@@ -167,8 +167,8 @@ public class VolumeUtil {
}
public static String switchRootTableVolume(String location) throws IOException {
- String newLocation = switchVolume(location, FileType.TABLE,
- ServerConstants.getVolumeReplacements());
+ String newLocation =
+ switchVolume(location, FileType.TABLE, ServerConstants.getVolumeReplacements());
if (newLocation != null) {
MetadataTableUtil.setRootTabletDir(newLocation);
log.info("Volume replaced: " + location + " -> " + newLocation);
@@ -274,10 +274,10 @@ public class VolumeUtil {
throw new IllegalArgumentException("Unexpected table dir " + dir);
}
- Path newDir = new Path(
- vm.choose(Optional.of(extent.getTableId()), ServerConstants.getBaseUris()) + Path.SEPARATOR
- + ServerConstants.TABLE_DIR + Path.SEPARATOR + dir.getParent().getName()
- + Path.SEPARATOR + dir.getName());
+ Path newDir =
+ new Path(vm.choose(Optional.of(extent.getTableId()), ServerConstants.getBaseUris())
+ + Path.SEPARATOR + ServerConstants.TABLE_DIR + Path.SEPARATOR
+ + dir.getParent().getName() + Path.SEPARATOR + dir.getName());
log.info("Updating directory for " + extent + " from " + dir + " to " + newDir);
if (extent.isRootTablet()) {
diff --git a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
index 4fab114..8319253 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
@@ -198,8 +198,8 @@ public class Initialize implements KeywordExecutable {
// race
// condition where a tserver compacts away Status updates because it didn't see the Combiner
// configured
- IteratorSetting setting = new IteratorSetting(9, ReplicationTableUtil.COMBINER_NAME,
- StatusCombiner.class);
+ IteratorSetting setting =
+ new IteratorSetting(9, ReplicationTableUtil.COMBINER_NAME, StatusCombiner.class);
Combiner.setColumns(setting, Collections.singletonList(new Column(ReplicationSection.COLF)));
for (IteratorScope scope : IteratorScope.values()) {
String root = String.format("%s%s.%s", Property.TABLE_ITERATOR_PREFIX,
@@ -355,7 +355,7 @@ public class Initialize implements KeywordExecutable {
UUID uuid = UUID.randomUUID();
// the actual disk locations of the root table and tablets
String[] configuredVolumes = VolumeConfiguration.getVolumeUris(SiteConfiguration.getInstance());
- final String rootTabletDir = new Path(fs.choose(Optional.<String> absent(), configuredVolumes)
+ final String rootTabletDir = new Path(fs.choose(Optional.<String>absent(), configuredVolumes)
+ Path.SEPARATOR + ServerConstants.TABLE_DIR + Path.SEPARATOR + RootTable.ID
+ RootTable.ROOT_TABLET_LOCATION).toString();
@@ -390,8 +390,8 @@ public class Initialize implements KeywordExecutable {
return false;
}
- final ServerConfigurationFactory confFactory = new ServerConfigurationFactory(
- HdfsZooInstance.getInstance());
+ final ServerConfigurationFactory confFactory =
+ new ServerConfigurationFactory(HdfsZooInstance.getInstance());
// When we're using Kerberos authentication, we need valid credentials to perform
// initialization. If the user provided some, use them.
@@ -467,35 +467,38 @@ public class Initialize implements KeywordExecutable {
// initialize initial system tables config in zookeeper
initSystemTablesConfig();
- String tableMetadataTabletDir = fs.choose(Optional.<String> absent(),
- ServerConstants.getBaseUris()) + Constants.HDFS_TABLES_DIR + Path.SEPARATOR
- + MetadataTable.ID + TABLE_TABLETS_TABLET_DIR;
- String replicationTableDefaultTabletDir = fs.choose(Optional.<String> absent(),
- ServerConstants.getBaseUris()) + Constants.HDFS_TABLES_DIR + Path.SEPARATOR
- + ReplicationTable.ID + Constants.DEFAULT_TABLET_LOCATION;
- String defaultMetadataTabletDir = fs.choose(Optional.<String> absent(),
- ServerConstants.getBaseUris()) + Constants.HDFS_TABLES_DIR + Path.SEPARATOR
- + MetadataTable.ID + Constants.DEFAULT_TABLET_LOCATION;
+ String tableMetadataTabletDir =
+ fs.choose(Optional.<String>absent(), ServerConstants.getBaseUris())
+ + Constants.HDFS_TABLES_DIR + Path.SEPARATOR + MetadataTable.ID
+ + TABLE_TABLETS_TABLET_DIR;
+ String replicationTableDefaultTabletDir =
+ fs.choose(Optional.<String>absent(), ServerConstants.getBaseUris())
+ + Constants.HDFS_TABLES_DIR + Path.SEPARATOR + ReplicationTable.ID
+ + Constants.DEFAULT_TABLET_LOCATION;
+ String defaultMetadataTabletDir =
+ fs.choose(Optional.<String>absent(), ServerConstants.getBaseUris())
+ + Constants.HDFS_TABLES_DIR + Path.SEPARATOR + MetadataTable.ID
+ + Constants.DEFAULT_TABLET_LOCATION;
// create table and default tablets directories
createDirectories(fs, rootTabletDir, tableMetadataTabletDir, defaultMetadataTabletDir,
replicationTableDefaultTabletDir);
- String ext = FileOperations
- .getNewFileExtension(AccumuloConfiguration.getDefaultConfiguration());
+ String ext =
+ FileOperations.getNewFileExtension(AccumuloConfiguration.getDefaultConfiguration());
// populate the metadata tables tablet with info about the replication table's one initial
// tablet
String metadataFileName = tableMetadataTabletDir + Path.SEPARATOR + "0_1." + ext;
- Tablet replicationTablet = new Tablet(ReplicationTable.ID, replicationTableDefaultTabletDir,
- null, null);
+ Tablet replicationTablet =
+ new Tablet(ReplicationTable.ID, replicationTableDefaultTabletDir, null, null);
createMetadataFile(fs, metadataFileName, replicationTablet);
// populate the root tablet with info about the metadata table's two initial tablets
String rootTabletFileName = rootTabletDir + Path.SEPARATOR + "00000_00000." + ext;
Text splitPoint = TabletsSection.getRange().getEndKey().getRow();
- Tablet tablesTablet = new Tablet(MetadataTable.ID, tableMetadataTabletDir, null, splitPoint,
- metadataFileName);
+ Tablet tablesTablet =
+ new Tablet(MetadataTable.ID, tableMetadataTabletDir, null, splitPoint, metadataFileName);
Tablet defaultTablet = new Tablet(MetadataTable.ID, defaultMetadataTabletDir, splitPoint, null);
createMetadataFile(fs, rootTabletFileName, tablesTablet, defaultTablet);
}
@@ -522,9 +525,9 @@ public class Initialize implements KeywordExecutable {
createEntriesForTablet(sorted, tablet);
}
FileSystem fs = volmanager.getVolumeByPath(new Path(fileName)).getFileSystem();
- FileSKVWriter tabletWriter = FileOperations.getInstance().newWriterBuilder()
- .forFile(fileName, fs, fs.getConf())
- .withTableConfiguration(AccumuloConfiguration.getDefaultConfiguration()).build();
+ FileSKVWriter tabletWriter =
+ FileOperations.getInstance().newWriterBuilder().forFile(fileName, fs, fs.getConf())
+ .withTableConfiguration(AccumuloConfiguration.getDefaultConfiguration()).build();
tabletWriter.startDefaultLocalityGroup();
for (Entry<Key,Value> entry : sorted.entrySet()) {
@@ -720,8 +723,8 @@ public class Initialize implements KeywordExecutable {
+ " (this may not be applicable for your security setup): ", '*');
if (rootpass == null)
System.exit(0);
- confirmpass = getConsoleReader().readLine("Confirm initial password for " + rootUser + ": ",
- '*');
+ confirmpass =
+ getConsoleReader().readLine("Confirm initial password for " + rootUser + ": ", '*');
if (confirmpass == null)
System.exit(0);
if (!rootpass.equals(confirmpass))
@@ -808,8 +811,8 @@ public class Initialize implements KeywordExecutable {
Path iidPath = new Path(aBasePath, ServerConstants.INSTANCE_ID_DIR);
Path versionPath = new Path(aBasePath, ServerConstants.VERSION_DIR);
- UUID uuid = UUID
- .fromString(ZooUtil.getInstanceIDFromHdfs(iidPath, SiteConfiguration.getInstance()));
+ UUID uuid =
+ UUID.fromString(ZooUtil.getInstanceIDFromHdfs(iidPath, SiteConfiguration.getInstance()));
for (Pair<Path,Path> replacementVolume : ServerConstants.getVolumeReplacements()) {
if (aBasePath.equals(replacementVolume.getFirst()))
log.error(aBasePath + " is set to be replaced in " + Property.INSTANCE_VOLUMES_REPLACEMENTS
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java b/server/base/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
index 163ed5f..1835ccc 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
@@ -93,15 +93,15 @@ public class LiveTServerSet implements Watcher {
// see ACCUMULO-3597
TTransport transport = ThriftUtil.createTransport(address, context);
try {
- TabletClientService.Client client = ThriftUtil
- .createClient(new TabletClientService.Client.Factory(), transport);
+ TabletClientService.Client client =
+ ThriftUtil.createClient(new TabletClientService.Client.Factory(), transport);
loadTablet(client, lock, extent);
} finally {
transport.close();
}
} else {
- TabletClientService.Client client = ThriftUtil
- .getClient(new TabletClientService.Client.Factory(), address, context);
+ TabletClientService.Client client =
+ ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, context);
try {
loadTablet(client, lock, extent);
} finally {
@@ -112,8 +112,8 @@ public class LiveTServerSet implements Watcher {
public void unloadTablet(ZooLock lock, KeyExtent extent, TUnloadTabletGoal goal,
long requestTime) throws TException {
- TabletClientService.Client client = ThriftUtil
- .getClient(new TabletClientService.Client.Factory(), address, context);
+ TabletClientService.Client client =
+ ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, context);
try {
client.unloadTablet(Tracer.traceInfo(), context.rpcCreds(), lockString(lock),
extent.toThrift(), goal, requestTime);
@@ -133,10 +133,10 @@ public class LiveTServerSet implements Watcher {
TTransport transport = ThriftUtil.createTransport(address, context);
try {
- TabletClientService.Client client = ThriftUtil
- .createClient(new TabletClientService.Client.Factory(), transport);
- TabletServerStatus status = client.getTabletServerStatus(Tracer.traceInfo(),
- context.rpcCreds());
+ TabletClientService.Client client =
+ ThriftUtil.createClient(new TabletClientService.Client.Factory(), transport);
+ TabletServerStatus status =
+ client.getTabletServerStatus(Tracer.traceInfo(), context.rpcCreds());
if (status != null) {
status.setResponseTime(System.currentTimeMillis() - start);
}
@@ -148,8 +148,8 @@ public class LiveTServerSet implements Watcher {
}
public void halt(ZooLock lock) throws TException, ThriftSecurityException {
- TabletClientService.Client client = ThriftUtil
- .getClient(new TabletClientService.Client.Factory(), address, context);
+ TabletClientService.Client client =
+ ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, context);
try {
client.halt(Tracer.traceInfo(), context.rpcCreds(), lockString(lock));
} finally {
@@ -158,8 +158,8 @@ public class LiveTServerSet implements Watcher {
}
public void fastHalt(ZooLock lock) throws TException {
- TabletClientService.Client client = ThriftUtil
- .getClient(new TabletClientService.Client.Factory(), address, context);
+ TabletClientService.Client client =
+ ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, context);
try {
client.fastHalt(Tracer.traceInfo(), context.rpcCreds(), lockString(lock));
} finally {
@@ -169,8 +169,8 @@ public class LiveTServerSet implements Watcher {
public void flush(ZooLock lock, String tableId, byte[] startRow, byte[] endRow)
throws TException {
- TabletClientService.Client client = ThriftUtil
- .getClient(new TabletClientService.Client.Factory(), address, context);
+ TabletClientService.Client client =
+ ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, context);
try {
client.flush(Tracer.traceInfo(), context.rpcCreds(), lockString(lock), tableId,
startRow == null ? null : ByteBuffer.wrap(startRow),
@@ -181,8 +181,8 @@ public class LiveTServerSet implements Watcher {
}
public void chop(ZooLock lock, KeyExtent extent) throws TException {
- TabletClientService.Client client = ThriftUtil
- .getClient(new TabletClientService.Client.Factory(), address, context);
+ TabletClientService.Client client =
+ ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, context);
try {
client.chop(Tracer.traceInfo(), context.rpcCreds(), lockString(lock), extent.toThrift());
} finally {
@@ -192,8 +192,8 @@ public class LiveTServerSet implements Watcher {
public void splitTablet(ZooLock lock, KeyExtent extent, Text splitPoint)
throws TException, ThriftSecurityException, NotServingTabletException {
- TabletClientService.Client client = ThriftUtil
- .getClient(new TabletClientService.Client.Factory(), address, context);
+ TabletClientService.Client client =
+ ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, context);
try {
client.splitTablet(Tracer.traceInfo(), context.rpcCreds(), extent.toThrift(),
ByteBuffer.wrap(splitPoint.getBytes(), 0, splitPoint.getLength()));
@@ -204,8 +204,8 @@ public class LiveTServerSet implements Watcher {
public void compact(ZooLock lock, String tableId, byte[] startRow, byte[] endRow)
throws TException {
- TabletClientService.Client client = ThriftUtil
- .getClient(new TabletClientService.Client.Factory(), address, context);
+ TabletClientService.Client client =
+ ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, context);
try {
client.compact(Tracer.traceInfo(), context.rpcCreds(), lockString(lock), tableId,
startRow == null ? null : ByteBuffer.wrap(startRow),
@@ -216,8 +216,8 @@ public class LiveTServerSet implements Watcher {
}
public boolean isActive(long tid) throws TException {
- TabletClientService.Client client = ThriftUtil
- .getClient(new TabletClientService.Client.Factory(), address, context);
+ TabletClientService.Client client =
+ ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, context);
try {
return client.isActive(Tracer.traceInfo(), tid);
} finally {
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
index 8bedcf1..3934b7f 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
@@ -91,21 +91,21 @@ public class HostRegexTableLoadBalancer extends TableLoadBalancer implements Con
private static final Logger LOG = LoggerFactory.getLogger(HostRegexTableLoadBalancer.class);
public static final String HOST_BALANCER_PREFIX = PROP_PREFIX + "balancer.host.regex.";
- public static final String HOST_BALANCER_OOB_CHECK_KEY = PROP_PREFIX
- + "balancer.host.regex.oob.period";
+ public static final String HOST_BALANCER_OOB_CHECK_KEY =
+ PROP_PREFIX + "balancer.host.regex.oob.period";
private static final String HOST_BALANCER_OOB_DEFAULT = "5m";
@Deprecated
- public static final String HOST_BALANCER_POOL_RECHECK_KEY = PROP_PREFIX
- + "balancer.host.regex.pool.check";
- public static final String HOST_BALANCER_REGEX_USING_IPS_KEY = PROP_PREFIX
- + "balancer.host.regex.is.ip";
- public static final String HOST_BALANCER_REGEX_MAX_MIGRATIONS_KEY = PROP_PREFIX
- + "balancer.host.regex.concurrent.migrations";
+ public static final String HOST_BALANCER_POOL_RECHECK_KEY =
+ PROP_PREFIX + "balancer.host.regex.pool.check";
+ public static final String HOST_BALANCER_REGEX_USING_IPS_KEY =
+ PROP_PREFIX + "balancer.host.regex.is.ip";
+ public static final String HOST_BALANCER_REGEX_MAX_MIGRATIONS_KEY =
+ PROP_PREFIX + "balancer.host.regex.concurrent.migrations";
private static final int HOST_BALANCER_REGEX_MAX_MIGRATIONS_DEFAULT = 250;
protected static final String DEFAULT_POOL = "HostTableLoadBalancer.ALL";
private static final int DEFAULT_OUTSTANDING_MIGRATIONS = 0;
- public static final String HOST_BALANCER_OUTSTANDING_MIGRATIONS_KEY = PROP_PREFIX
- + "balancer.host.regex.max.outstanding.migrations";
+ public static final String HOST_BALANCER_OUTSTANDING_MIGRATIONS_KEY =
+ PROP_PREFIX + "balancer.host.regex.max.outstanding.migrations";
protected long oobCheckMillis = AccumuloConfiguration.getTimeInMillis(HOST_BALANCER_OOB_DEFAULT);
@@ -133,7 +133,7 @@ public class HostRegexTableLoadBalancer extends TableLoadBalancer implements Con
* @return current servers grouped by pool name, if not a match it is put into a default pool.
*/
protected synchronized Map<String,SortedMap<TServerInstance,TabletServerStatus>>
- splitCurrentByRegex(SortedMap<TServerInstance,TabletServerStatus> current) {
+ splitCurrentByRegex(SortedMap<TServerInstance,TabletServerStatus> current) {
LOG.debug("Performing pool recheck - regrouping tablet servers based on regular expressions");
Map<String,SortedMap<TServerInstance,TabletServerStatus>> newPools = new HashMap<>();
for (Entry<TServerInstance,TabletServerStatus> e : current.entrySet()) {
@@ -328,8 +328,8 @@ public class HostRegexTableLoadBalancer extends TableLoadBalancer implements Con
// group the unassigned into tables
Map<String,Map<KeyExtent,TServerInstance>> groupedUnassigned = new HashMap<>();
for (Entry<KeyExtent,TServerInstance> e : unassigned.entrySet()) {
- Map<KeyExtent,TServerInstance> tableUnassigned = groupedUnassigned
- .get(e.getKey().getTableId());
+ Map<KeyExtent,TServerInstance> tableUnassigned =
+ groupedUnassigned.get(e.getKey().getTableId());
if (tableUnassigned == null) {
tableUnassigned = new HashMap<>();
groupedUnassigned.put(e.getKey().getTableId(), tableUnassigned);
@@ -371,8 +371,8 @@ public class HostRegexTableLoadBalancer extends TableLoadBalancer implements Con
Map<String,String> tableIdMap = t.tableIdMap();
long now = System.currentTimeMillis();
- Map<String,SortedMap<TServerInstance,TabletServerStatus>> currentGrouped = splitCurrentByRegex(
- current);
+ Map<String,SortedMap<TServerInstance,TabletServerStatus>> currentGrouped =
+ splitCurrentByRegex(current);
if ((now - this.lastOOBCheck) > this.oobCheckMillis) {
try {
// Check to see if a tablet is assigned outside the bounds of the pool. If so, migrate it.
@@ -405,8 +405,8 @@ public class HostRegexTableLoadBalancer extends TableLoadBalancer implements Con
continue;
}
String poolName = getPoolNameForTable(table);
- SortedMap<TServerInstance,TabletServerStatus> currentView = currentGrouped
- .get(poolName);
+ SortedMap<TServerInstance,TabletServerStatus> currentView =
+ currentGrouped.get(poolName);
if (null != currentView) {
int skip = random.nextInt(currentView.size());
Iterator<TServerInstance> iter = currentView.keySet().iterator();
@@ -479,8 +479,8 @@ public class HostRegexTableLoadBalancer extends TableLoadBalancer implements Con
for (String s : tableIdMap.values()) {
String tableName = tableIdToTableName.get(s);
String regexTableName = getPoolNameForTable(tableName);
- SortedMap<TServerInstance,TabletServerStatus> currentView = currentGrouped
- .get(regexTableName);
+ SortedMap<TServerInstance,TabletServerStatus> currentView =
+ currentGrouped.get(regexTableName);
if (null == currentView) {
LOG.warn("Skipping balance for table {} as no tablet servers are online.", tableName);
continue;
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/RegexGroupBalancer.java b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/RegexGroupBalancer.java
index 1c7115b..21b761e 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/RegexGroupBalancer.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/RegexGroupBalancer.java
@@ -47,12 +47,12 @@ import com.google.common.base.Function;
public class RegexGroupBalancer extends GroupBalancer {
- public static final String REGEX_PROPERTY = Property.TABLE_ARBITRARY_PROP_PREFIX.getKey()
- + "balancer.group.regex.pattern";
- public static final String DEFAUT_GROUP_PROPERTY = Property.TABLE_ARBITRARY_PROP_PREFIX.getKey()
- + "balancer.group.regex.default";
- public static final String WAIT_TIME_PROPERTY = Property.TABLE_ARBITRARY_PROP_PREFIX.getKey()
- + "balancer.group.regex.wait.time";
+ public static final String REGEX_PROPERTY =
+ Property.TABLE_ARBITRARY_PROP_PREFIX.getKey() + "balancer.group.regex.pattern";
+ public static final String DEFAUT_GROUP_PROPERTY =
+ Property.TABLE_ARBITRARY_PROP_PREFIX.getKey() + "balancer.group.regex.default";
+ public static final String WAIT_TIME_PROPERTY =
+ Property.TABLE_ARBITRARY_PROP_PREFIX.getKey() + "balancer.group.regex.wait.time";
private final String tableId;
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/TableLoadBalancer.java b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/TableLoadBalancer.java
index b7b73ef..0fdee37 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/TableLoadBalancer.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/TableLoadBalancer.java
@@ -118,8 +118,8 @@ public class TableLoadBalancer extends TabletBalancer {
// separate the unassigned into tables
Map<String,Map<KeyExtent,TServerInstance>> groupedUnassigned = new HashMap<>();
for (Entry<KeyExtent,TServerInstance> e : unassigned.entrySet()) {
- Map<KeyExtent,TServerInstance> tableUnassigned = groupedUnassigned
- .get(e.getKey().getTableId());
+ Map<KeyExtent,TServerInstance> tableUnassigned =
+ groupedUnassigned.get(e.getKey().getTableId());
if (tableUnassigned == null) {
tableUnassigned = new HashMap<>();
groupedUnassigned.put(e.getKey().getTableId(), tableUnassigned);
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/TabletBalancer.java b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/TabletBalancer.java
index b881455..7f3d03e 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/TabletBalancer.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/TabletBalancer.java
@@ -155,7 +155,7 @@ public abstract class TabletBalancer {
* OutstandingMigrations is not thread safe.
*/
protected static class OutstandingMigrations extends BalancerProblem {
- public Set<KeyExtent> migrations = Collections.<KeyExtent> emptySet();
+ public Set<KeyExtent> migrations = Collections.<KeyExtent>emptySet();
public OutstandingMigrations(Logger logger) {
super(logger);
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/state/MetaDataStateStore.java b/server/base/src/main/java/org/apache/accumulo/server/master/state/MetaDataStateStore.java
index 3a301b4..39653c7 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/state/MetaDataStateStore.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/state/MetaDataStateStore.java
@@ -144,15 +144,15 @@ public class MetaDataStateStore extends TabletStateStore {
List<Path> logs = logsForDeadServers.get(tls.current);
if (logs != null) {
for (Path log : logs) {
- LogEntry entry = new LogEntry(tls.extent, 0, tls.current.hostPort(),
- log.toString());
+ LogEntry entry =
+ new LogEntry(tls.extent, 0, tls.current.hostPort(), log.toString());
m.put(entry.getColumnFamily(), entry.getColumnQualifier(), entry.getValue());
}
}
}
if (suspensionTimestamp >= 0) {
- SuspendingTServer suspender = new SuspendingTServer(tls.current.getLocation(),
- suspensionTimestamp);
+ SuspendingTServer suspender =
+ new SuspendingTServer(tls.current.getLocation(), suspensionTimestamp);
suspender.setSuspension(m);
}
}
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java b/server/base/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java
index d28b54d..8d08993 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java
@@ -84,8 +84,8 @@ public class MetaDataTableScanner implements ClosableIterator<TabletLocationStat
scanner.fetchColumnFamily(LogColumnFamily.NAME);
scanner.fetchColumnFamily(ChoppedColumnFamily.NAME);
scanner.addScanIterator(new IteratorSetting(1000, "wholeRows", WholeRowIterator.class));
- IteratorSetting tabletChange = new IteratorSetting(1001, "tabletChange",
- TabletStateChangeIterator.class);
+ IteratorSetting tabletChange =
+ new IteratorSetting(1001, "tabletChange", TabletStateChangeIterator.class);
if (state != null) {
TabletStateChangeIterator.setCurrentServers(tabletChange, state.onlineTabletServers());
TabletStateChangeIterator.setOnlineTables(tabletChange, state.onlineTables());
diff --git a/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java b/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java
index f73e511..b1f470e 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java
@@ -31,8 +31,8 @@ import org.apache.commons.configuration.reloading.FileChangedReloadingStrategy;
public class MetricsConfiguration {
- private static final org.slf4j.Logger log = org.slf4j.LoggerFactory
- .getLogger(MetricsConfiguration.class);
+ private static final org.slf4j.Logger log =
+ org.slf4j.LoggerFactory.getLogger(MetricsConfiguration.class);
private static final String metricsFileName = "accumulo-metrics.xml";
diff --git a/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsSystemHelper.java b/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsSystemHelper.java
index bd6bcca..d5d2f98 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsSystemHelper.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsSystemHelper.java
@@ -43,8 +43,8 @@ public class MetricsSystemHelper {
private static class MetricsSystemHolder {
// Singleton, rely on JVM to initialize the MetricsSystem only when it is accessed.
- private static final MetricsSystem metricsSystem = DefaultMetricsSystem
- .initialize(Metrics.PREFIX);
+ private static final MetricsSystem metricsSystem =
+ DefaultMetricsSystem.initialize(Metrics.PREFIX);
}
public static MetricsSystem getInstance() {
diff --git a/server/base/src/main/java/org/apache/accumulo/server/monitor/LogService.java b/server/base/src/main/java/org/apache/accumulo/server/monitor/LogService.java
index ee28279..16cb316 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/monitor/LogService.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/monitor/LogService.java
@@ -133,17 +133,17 @@ public class LogService extends org.apache.log4j.AppenderSkeleton {
private static final int MAX_LOGS = 50;
- private LinkedHashMap<String,DedupedLogEvent> events = new LinkedHashMap<String,DedupedLogEvent>(
- MAX_LOGS + 1, (float) .75, true) {
+ private LinkedHashMap<String,DedupedLogEvent> events =
+ new LinkedHashMap<String,DedupedLogEvent>(MAX_LOGS + 1, (float) .75, true) {
- private static final long serialVersionUID = 1L;
+ private static final long serialVersionUID = 1L;
- @Override
- @SuppressWarnings("rawtypes")
- protected boolean removeEldestEntry(Map.Entry eldest) {
- return size() > MAX_LOGS;
- }
- };
+ @Override
+ @SuppressWarnings("rawtypes")
+ protected boolean removeEldestEntry(Map.Entry eldest) {
+ return size() > MAX_LOGS;
+ }
+ };
public LogService() {
synchronized (LogService.class) {
diff --git a/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java b/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
index 0dc5436..44e7c79 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
@@ -206,8 +206,8 @@ public class ProblemReports implements Iterable<ProblemReport> {
try {
List<String> children;
if (table == null || isMeta(table)) {
- children = zoo
- .getChildren(ZooUtil.getRoot(context.getInstance()) + Constants.ZPROBLEMS);
+ children =
+ zoo.getChildren(ZooUtil.getRoot(context.getInstance()) + Constants.ZPROBLEMS);
} else {
children = Collections.emptyList();
}
diff --git a/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicaSystemHelper.java b/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicaSystemHelper.java
index aa067f7..a53ca1d 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicaSystemHelper.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicaSystemHelper.java
@@ -59,8 +59,8 @@ public class ReplicaSystemHelper {
*/
public void recordNewStatus(Path filePath, Status status, ReplicationTarget target)
throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
- BatchWriter bw = context.getConnector().createBatchWriter(ReplicationTable.NAME,
- new BatchWriterConfig());
+ BatchWriter bw =
+ context.getConnector().createBatchWriter(ReplicationTable.NAME, new BatchWriterConfig());
try {
log.debug("Recording new status for {}, {}", filePath.toString(),
ProtobufUtil.toString(status));
diff --git a/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java b/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java
index 26cf94b..b7f28fd 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/replication/ReplicationUtil.java
@@ -81,8 +81,8 @@ public class ReplicationUtil {
int activeTservers = mmi.getTServerInfoSize();
// The number of threads each tserver will use at most to replicate data
- int replicationThreadsPerServer = Integer
- .parseInt(context.getConfiguration().get(Property.REPLICATION_WORKER_THREADS));
+ int replicationThreadsPerServer =
+ Integer.parseInt(context.getConfiguration().get(Property.REPLICATION_WORKER_THREADS));
// The total number of "slots" we have to replicate data
return activeTservers * replicationThreadsPerServer;
@@ -137,8 +137,8 @@ public class ReplicationUtil {
continue;
}
- TableConfiguration tableConf = context.getServerConfigurationFactory()
- .getTableConfiguration(localId);
+ TableConfiguration tableConf =
+ context.getServerConfigurationFactory().getTableConfiguration(localId);
if (null == tableConf) {
log.trace("Could not get configuration for table {} (it no longer exists)", table);
continue;
@@ -146,8 +146,8 @@ public class ReplicationUtil {
for (Entry<String,String> prop : tableConf
.getAllPropertiesWithPrefix(Property.TABLE_REPLICATION_TARGET).entrySet()) {
- String peerName = prop.getKey()
- .substring(Property.TABLE_REPLICATION_TARGET.getKey().length());
+ String peerName =
+ prop.getKey().substring(Property.TABLE_REPLICATION_TARGET.getKey().length());
String remoteIdentifier = prop.getValue();
ReplicationTarget target = new ReplicationTarget(peerName, remoteIdentifier, localId);
diff --git a/server/base/src/main/java/org/apache/accumulo/server/replication/StatusFormatter.java b/server/base/src/main/java/org/apache/accumulo/server/replication/StatusFormatter.java
index 3007ec7..33fcf4f 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/replication/StatusFormatter.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/replication/StatusFormatter.java
@@ -48,8 +48,9 @@ import com.google.protobuf.InvalidProtocolBufferException;
public class StatusFormatter implements Formatter {
private static final Logger log = LoggerFactory.getLogger(StatusFormatter.class);
- private static final Set<Text> REPLICATION_COLFAMS = Collections.unmodifiableSet(Sets.newHashSet(
- ReplicationSection.COLF, StatusSection.NAME, WorkSection.NAME, OrderSection.NAME));
+ private static final Set<Text> REPLICATION_COLFAMS =
+ Collections.unmodifiableSet(Sets.newHashSet(ReplicationSection.COLF, StatusSection.NAME,
+ WorkSection.NAME, OrderSection.NAME));
private Iterator<Entry<Key,Value>> iterator;
private FormatterConfig config;
@@ -70,8 +71,8 @@ public class StatusFormatter implements Formatter {
@Override
public String next() {
Entry<Key,Value> entry = iterator.next();
- DateFormat timestampFormat = config.willPrintTimestamps() ? config.getDateFormatSupplier().get()
- : null;
+ DateFormat timestampFormat =
+ config.willPrintTimestamps() ? config.getDateFormatSupplier().get() : null;
// If we expected this to be a protobuf, try to parse it, adding a message when it fails to
// parse
diff --git a/server/base/src/main/java/org/apache/accumulo/server/rpc/CustomNonBlockingServer.java b/server/base/src/main/java/org/apache/accumulo/server/rpc/CustomNonBlockingServer.java
index 4abb53a..b468b01 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/rpc/CustomNonBlockingServer.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/rpc/CustomNonBlockingServer.java
@@ -53,8 +53,8 @@ public class CustomNonBlockingServer extends THsHaServer {
// start the selector
try {
// Hack in our SelectAcceptThread impl
- SelectAcceptThread selectAcceptThread_ = new CustomSelectAcceptThread(
- (TNonblockingServerTransport) serverTransport_);
+ SelectAcceptThread selectAcceptThread_ =
+ new CustomSelectAcceptThread((TNonblockingServerTransport) serverTransport_);
// Set the private field before continuing.
selectAcceptThreadField.set(this, selectAcceptThread_);
diff --git a/server/base/src/main/java/org/apache/accumulo/server/rpc/SaslServerDigestCallbackHandler.java b/server/base/src/main/java/org/apache/accumulo/server/rpc/SaslServerDigestCallbackHandler.java
index 44b4cca..1789941 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/rpc/SaslServerDigestCallbackHandler.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/rpc/SaslServerDigestCallbackHandler.java
@@ -81,8 +81,8 @@ public class SaslServerDigestCallbackHandler extends SaslDigestCallbackHandler {
}
if (pc != null) {
- AuthenticationTokenIdentifier tokenIdentifier = getIdentifier(nc.getDefaultName(),
- secretManager);
+ AuthenticationTokenIdentifier tokenIdentifier =
+ getIdentifier(nc.getDefaultName(), secretManager);
char[] password = getPassword(secretManager, tokenIdentifier);
UserGroupInformation user = null;
user = tokenIdentifier.getUser();
diff --git a/server/base/src/main/java/org/apache/accumulo/server/rpc/TCredentialsUpdatingInvocationHandler.java b/server/base/src/main/java/org/apache/accumulo/server/rpc/TCredentialsUpdatingInvocationHandler.java
index 1e5f177..37f6005 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/rpc/TCredentialsUpdatingInvocationHandler.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/rpc/TCredentialsUpdatingInvocationHandler.java
@@ -41,10 +41,11 @@ import org.slf4j.LoggerFactory;
* principal of "frank" equals "frank" from "frank/hostname@DOMAIN").
*/
public class TCredentialsUpdatingInvocationHandler<I> implements InvocationHandler {
- private static final Logger log = LoggerFactory
- .getLogger(TCredentialsUpdatingInvocationHandler.class);
+ private static final Logger log =
+ LoggerFactory.getLogger(TCredentialsUpdatingInvocationHandler.class);
- private static final ConcurrentHashMap<String,Class<? extends AuthenticationToken>> TOKEN_CLASS_CACHE = new ConcurrentHashMap<>();
+ private static final ConcurrentHashMap<String,
+ Class<? extends AuthenticationToken>> TOKEN_CLASS_CACHE = new ConcurrentHashMap<>();
private final I instance;
private final UserImpersonation impersonation;
@@ -166,8 +167,8 @@ public class TCredentialsUpdatingInvocationHandler<I> implements InvocationHandl
}
// return the current one and throw away the one we just created if some other thread created it
// first
- Class<? extends AuthenticationToken> current = TOKEN_CLASS_CACHE.putIfAbsent(tokenClassName,
- typedClz);
+ Class<? extends AuthenticationToken> current =
+ TOKEN_CLASS_CACHE.putIfAbsent(tokenClassName, typedClz);
return current != null ? current : typedClz;
}
diff --git a/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java b/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java
index f2a4bd9..dd64a5d 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java
@@ -139,8 +139,8 @@ public class TServerUtils {
if (portSearchProperty != null)
portSearch = config.getBoolean(portSearchProperty);
- final int simpleTimerThreadpoolSize = config
- .getCount(Property.GENERAL_SIMPLETIMER_THREADPOOL_SIZE);
+ final int simpleTimerThreadpoolSize =
+ config.getCount(Property.GENERAL_SIMPLETIMER_THREADPOOL_SIZE);
final ThriftServerType serverType = service.getThriftServerType();
if (ThriftServerType.SASL == serverType) {
@@ -194,8 +194,8 @@ public class TServerUtils {
final int numThreads, final int numSTThreads, long timeBetweenThreadChecks,
long maxMessageSize) throws TTransportException {
- final TNonblockingServerSocket transport = new TNonblockingServerSocket(
- new InetSocketAddress(address.getHost(), address.getPort()));
+ final TNonblockingServerSocket transport =
+ new TNonblockingServerSocket(new InetSocketAddress(address.getHost(), address.getPort()));
final CustomNonBlockingServer.Args options = new CustomNonBlockingServer.Args(transport);
options.protocolFactory(protocolFactory);
@@ -204,8 +204,8 @@ public class TServerUtils {
options.stopTimeoutVal(5);
// Create our own very special thread pool.
- ThreadPoolExecutor pool = createSelfResizingThreadPool(serverName, numThreads, numSTThreads,
- timeBetweenThreadChecks);
+ ThreadPoolExecutor pool =
+ createSelfResizingThreadPool(serverName, numThreads, numSTThreads, timeBetweenThreadChecks);
options.executorService(pool);
options.processorFactory(new TProcessorFactory(processor));
@@ -284,8 +284,8 @@ public class TServerUtils {
ThriftUtil.transportFactory(maxMessageSize), protocolFactory, pool);
if (address.getPort() == 0) {
- address = HostAndPort.fromParts(address.getHost(),
- transport.getServerSocket().getLocalPort());
+ address =
+ HostAndPort.fromParts(address.getHost(), transport.getServerSocket().getLocalPort());
log.info("Blocking Server bound on {}", address);
}
@@ -351,8 +351,8 @@ public class TServerUtils {
SslConnectionParams params) throws TTransportException {
TServerSocket tServerSock;
if (params.useJsse()) {
- tServerSock = TSSLTransportFactory.getServerSocket(port, timeout, params.isClientAuth(),
- address);
+ tServerSock =
+ TSSLTransportFactory.getServerSocket(port, timeout, params.isClientAuth(), address);
} else {
tServerSock = TSSLTransportFactory.getServerSocket(port, timeout, address,
params.getTTransportParams());
@@ -366,8 +366,8 @@ public class TServerUtils {
// Be nice for the user and automatically remove protocols that might not exist in their JVM.
// Keeps us from forcing config alterations too
// e.g. TLSv1.1 and TLSv1.2 don't exist in JDK6
- Set<String> socketEnabledProtocols = new HashSet<>(
- Arrays.asList(sslServerSock.getEnabledProtocols()));
+ Set<String> socketEnabledProtocols =
+ new HashSet<>(Arrays.asList(sslServerSock.getEnabledProtocols()));
// Keep only the enabled protocols that were specified by the configuration
socketEnabledProtocols.retainAll(Arrays.asList(protocols));
if (socketEnabledProtocols.isEmpty()) {
@@ -411,8 +411,8 @@ public class TServerUtils {
}
if (address.getPort() == 0) {
- address = HostAndPort.fromParts(address.getHost(),
- transport.getServerSocket().getLocalPort());
+ address =
+ HostAndPort.fromParts(address.getHost(), transport.getServerSocket().getLocalPort());
log.info("SSL Thread Pool Server bound on {}", address);
}
@@ -495,21 +495,21 @@ public class TServerUtils {
}
// Make sure the TTransportFactory is performing a UGI.doAs
- TTransportFactory ugiTransportFactory = new UGIAssumingTransportFactory(saslTransportFactory,
- serverUser);
+ TTransportFactory ugiTransportFactory =
+ new UGIAssumingTransportFactory(saslTransportFactory, serverUser);
if (address.getPort() == 0) {
// If we chose a port dynamically, make a new use it (along with the proper hostname)
- address = HostAndPort.fromParts(address.getHost(),
- transport.getServerSocket().getLocalPort());
+ address =
+ HostAndPort.fromParts(address.getHost(), transport.getServerSocket().getLocalPort());
log.info("SASL thrift server bound on {}", address);
}
- ThreadPoolExecutor pool = createSelfResizingThreadPool(serverName, numThreads, numSTThreads,
- timeBetweenThreadChecks);
+ ThreadPoolExecutor pool =
+ createSelfResizingThreadPool(serverName, numThreads, numSTThreads, timeBetweenThreadChecks);
- final TThreadPoolServer server = createTThreadPoolServer(transport, processor,
- ugiTransportFactory, protocolFactory, pool);
+ final TThreadPoolServer server =
+ createTThreadPoolServer(transport, processor, ugiTransportFactory, protocolFactory, pool);
return new ServerAddress(server, address);
}
@@ -569,9 +569,9 @@ public class TServerUtils {
switch (serverType) {
case SSL:
log.debug("Instantiating SSL Thrift server");
- serverAddress = createSslThreadPoolServer(address, processor, protocolFactory,
- serverSocketTimeout, sslParams, serverName, numThreads, numSTThreads,
- timeBetweenThreadChecks);
+ serverAddress =
+ createSslThreadPoolServer(address, processor, protocolFactory, serverSocketTimeout,
+ sslParams, serverName, numThreads, numSTThreads, timeBetweenThreadChecks);
break;
case SASL:
log.debug("Instantiating SASL Thrift server");
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java b/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java
index 321dd93..7e76388 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java
@@ -135,9 +135,9 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CAN_SCAN_AUDIT_TEMPLATE = "action: scan;"
- + " targetTable: %s; authorizations: %s; range: %s; columns: %s;"
- + " iterators: %s; iteratorOptions: %s;";
+ public static final String CAN_SCAN_AUDIT_TEMPLATE =
+ "action: scan;" + " targetTable: %s; authorizations: %s; range: %s; columns: %s;"
+ + " iterators: %s; iteratorOptions: %s;";
private static final int MAX_ELEMENTS_TO_LOG = 10;
private static List<String> truncate(Collection<?> list) {
@@ -159,8 +159,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
List<ByteBuffer> authorizations) throws ThriftSecurityException {
if (shouldAudit(credentials, tableId)) {
Range convertedRange = new Range(range);
- List<String> convertedColumns = truncate(
- Translator.translate(columns, new Translator.TColumnTranslator()));
+ List<String> convertedColumns =
+ truncate(Translator.translate(columns, new Translator.TColumnTranslator()));
String tableName = getTableName(tableId);
try {
@@ -179,9 +179,9 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CAN_SCAN_BATCH_AUDIT_TEMPLATE = "action: scan;"
- + " targetTable: %s; authorizations: %s; range: %s; columns: %s;"
- + " iterators: %s; iteratorOptions: %s;";
+ public static final String CAN_SCAN_BATCH_AUDIT_TEMPLATE =
+ "action: scan;" + " targetTable: %s; authorizations: %s; range: %s; columns: %s;"
+ + " iterators: %s; iteratorOptions: %s;";
@Override
public boolean canScan(TCredentials credentials, String tableId, String namespaceId,
@@ -190,15 +190,15 @@ public class AuditedSecurityOperation extends SecurityOperation {
throws ThriftSecurityException {
if (shouldAudit(credentials, tableId)) {
@SuppressWarnings({"unchecked", "rawtypes"})
- Map<KeyExtent,List<Range>> convertedBatch = Translator.translate(tbatch,
- new Translator.TKeyExtentTranslator(),
- new Translator.ListTranslator(new Translator.TRangeTranslator()));
+ Map<KeyExtent,List<Range>> convertedBatch =
+ Translator.translate(tbatch, new Translator.TKeyExtentTranslator(),
+ new Translator.ListTranslator(new Translator.TRangeTranslator()));
Map<KeyExtent,List<String>> truncated = new HashMap<>();
for (Entry<KeyExtent,List<Range>> entry : convertedBatch.entrySet()) {
truncated.put(entry.getKey(), truncate(entry.getValue()));
}
- List<Column> convertedColumns = Translator.translate(tcolumns,
- new Translator.TColumnTranslator());
+ List<Column> convertedColumns =
+ Translator.translate(tcolumns, new Translator.TColumnTranslator());
String tableName = getTableName(tableId);
try {
@@ -217,8 +217,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CHANGE_AUTHORIZATIONS_AUDIT_TEMPLATE = "action:"
- + " changeAuthorizations; targetUser: %s; authorizations: %s";
+ public static final String CHANGE_AUTHORIZATIONS_AUDIT_TEMPLATE =
+ "action:" + " changeAuthorizations; targetUser: %s; authorizations: %s";
@Override
public void changeAuthorizations(TCredentials credentials, String user,
@@ -232,8 +232,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CHANGE_PASSWORD_AUDIT_TEMPLATE = "action:"
- + " changePassword; targetUser: %s;";
+ public static final String CHANGE_PASSWORD_AUDIT_TEMPLATE =
+ "action:" + " changePassword; targetUser: %s;";
@Override
public void changePassword(TCredentials credentials, Credentials newInfo)
@@ -247,8 +247,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CREATE_USER_AUDIT_TEMPLATE = "action: createUser;"
- + " targetUser: %s; Authorizations: %s;";
+ public static final String CREATE_USER_AUDIT_TEMPLATE =
+ "action: createUser;" + " targetUser: %s; Authorizations: %s;";
@Override
public void createUser(TCredentials credentials, Credentials newUser,
@@ -262,8 +262,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CAN_CREATE_TABLE_AUDIT_TEMPLATE = "action:"
- + " createTable; targetTable: %s;";
+ public static final String CAN_CREATE_TABLE_AUDIT_TEMPLATE =
+ "action:" + " createTable; targetTable: %s;";
@Override
public boolean canCreateTable(TCredentials c, String tableName, String namespaceId)
@@ -278,8 +278,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CAN_DELETE_TABLE_AUDIT_TEMPLATE = "action:"
- + " deleteTable; targetTable: %s;";
+ public static final String CAN_DELETE_TABLE_AUDIT_TEMPLATE =
+ "action:" + " deleteTable; targetTable: %s;";
@Override
public boolean canDeleteTable(TCredentials c, String tableId, String namespaceId)
@@ -295,8 +295,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CAN_RENAME_TABLE_AUDIT_TEMPLATE = "action:"
- + " renameTable; targetTable: %s; newTableName: %s;";
+ public static final String CAN_RENAME_TABLE_AUDIT_TEMPLATE =
+ "action:" + " renameTable; targetTable: %s; newTableName: %s;";
@Override
public boolean canRenameTable(TCredentials c, String tableId, String oldTableName,
@@ -311,8 +311,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CAN_SPLIT_TABLE_AUDIT_TEMPLATE = "action:"
- + " splitTable; targetTable: %s; targetNamespace: %s;";
+ public static final String CAN_SPLIT_TABLE_AUDIT_TEMPLATE =
+ "action:" + " splitTable; targetTable: %s; targetNamespace: %s;";
@Override
public boolean canSplitTablet(TCredentials credentials, String table, String namespaceId)
@@ -327,8 +327,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CAN_PERFORM_SYSTEM_ACTION_AUDIT_TEMPLATE = "action:"
- + " performSystemAction; principal: %s;";
+ public static final String CAN_PERFORM_SYSTEM_ACTION_AUDIT_TEMPLATE =
+ "action:" + " performSystemAction; principal: %s;";
@Override
public boolean canPerformSystemActions(TCredentials credentials) throws ThriftSecurityException {
@@ -343,8 +343,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CAN_FLUSH_TABLE_AUDIT_TEMPLATE = "action:"
- + " flushTable; targetTable: %s; targetNamespace: %s;";
+ public static final String CAN_FLUSH_TABLE_AUDIT_TEMPLATE =
+ "action:" + " flushTable; targetTable: %s; targetNamespace: %s;";
@Override
public boolean canFlush(TCredentials c, String tableId, String namespaceId)
@@ -359,8 +359,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CAN_ALTER_TABLE_AUDIT_TEMPLATE = "action:"
- + " alterTable; targetTable: %s; targetNamespace: %s;";
+ public static final String CAN_ALTER_TABLE_AUDIT_TEMPLATE =
+ "action:" + " alterTable; targetTable: %s; targetNamespace: %s;";
@Override
public boolean canAlterTable(TCredentials c, String tableId, String namespaceId)
@@ -375,16 +375,16 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CAN_CLONE_TABLE_AUDIT_TEMPLATE = "action:"
- + " cloneTable; targetTable: %s; newTableName: %s";
+ public static final String CAN_CLONE_TABLE_AUDIT_TEMPLATE =
+ "action:" + " cloneTable; targetTable: %s; newTableName: %s";
@Override
public boolean canCloneTable(TCredentials c, String tableId, String tableName,
String destinationNamespaceId, String sourceNamespaceId) throws ThriftSecurityException {
String oldTableName = getTableName(tableId);
try {
- boolean result = super.canCloneTable(c, tableId, tableName, destinationNamespaceId,
- sourceNamespaceId);
+ boolean result =
+ super.canCloneTable(c, tableId, tableName, destinationNamespaceId, sourceNamespaceId);
audit(c, result, CAN_CLONE_TABLE_AUDIT_TEMPLATE, oldTableName, tableName);
return result;
} catch (ThriftSecurityException ex) {
@@ -393,8 +393,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CAN_DELETE_RANGE_AUDIT_TEMPLATE = "action:"
- + " deleteData; targetTable: %s; startRange: %s; endRange: %s;";
+ public static final String CAN_DELETE_RANGE_AUDIT_TEMPLATE =
+ "action:" + " deleteData; targetTable: %s; startRange: %s; endRange: %s;";
@Override
public boolean canDeleteRange(TCredentials c, String tableId, String tableName, Text startRow,
@@ -411,8 +411,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CAN_BULK_IMPORT_AUDIT_TEMPLATE = "action:"
- + " bulkImport; targetTable: %s; dataDir: %s; failDir: %s;";
+ public static final String CAN_BULK_IMPORT_AUDIT_TEMPLATE =
+ "action:" + " bulkImport; targetTable: %s; dataDir: %s; failDir: %s;";
@Override
public boolean canBulkImport(TCredentials c, String tableId, String tableName, String dir,
@@ -427,8 +427,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CAN_COMPACT_TABLE_AUDIT_TEMPLATE = "action:"
- + " compactTable; targetTable: %s; targetNamespace: %s;";
+ public static final String CAN_COMPACT_TABLE_AUDIT_TEMPLATE =
+ "action:" + " compactTable; targetTable: %s; targetNamespace: %s;";
@Override
public boolean canCompact(TCredentials c, String tableId, String namespaceId)
@@ -443,8 +443,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CAN_CHANGE_AUTHORIZATIONS_AUDIT_TEMPLATE = "action:"
- + " changeAuthorizations; targetUser: %s;";
+ public static final String CAN_CHANGE_AUTHORIZATIONS_AUDIT_TEMPLATE =
+ "action:" + " changeAuthorizations; targetUser: %s;";
@Override
public boolean canChangeAuthorizations(TCredentials c, String user)
@@ -459,8 +459,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CAN_CHANGE_PASSWORD_AUDIT_TEMPLATE = "action:"
- + " changePassword; targetUser: %s;";
+ public static final String CAN_CHANGE_PASSWORD_AUDIT_TEMPLATE =
+ "action:" + " changePassword; targetUser: %s;";
@Override
public boolean canChangePassword(TCredentials c, String user) throws ThriftSecurityException {
@@ -503,8 +503,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CAN_GRANT_SYSTEM_AUDIT_TEMPLATE = "action:"
- + " grantSystem; targetUser: %s; targetPermission: %s;";
+ public static final String CAN_GRANT_SYSTEM_AUDIT_TEMPLATE =
+ "action:" + " grantSystem; targetUser: %s; targetPermission: %s;";
@Override
public boolean canGrantSystem(TCredentials c, String user, SystemPermission sysPerm)
@@ -521,8 +521,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CAN_GRANT_TABLE_AUDIT_TEMPLATE = "action:"
- + " grantTable; targetUser: %s; targetTable: %s; targetNamespace: %s;";
+ public static final String CAN_GRANT_TABLE_AUDIT_TEMPLATE =
+ "action:" + " grantTable; targetUser: %s; targetTable: %s; targetNamespace: %s;";
@Override
public boolean canGrantTable(TCredentials c, String user, String table, String namespaceId)
@@ -537,8 +537,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CAN_REVOKE_SYSTEM_AUDIT_TEMPLATE = "action:"
- + " revokeSystem; targetUser: %s;, targetPermission: %s;";
+ public static final String CAN_REVOKE_SYSTEM_AUDIT_TEMPLATE =
+ "action:" + " revokeSystem; targetUser: %s;, targetPermission: %s;";
@Override
public boolean canRevokeSystem(TCredentials c, String user, SystemPermission sysPerm)
@@ -553,8 +553,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CAN_REVOKE_TABLE_AUDIT_TEMPLATE = "action:"
- + " revokeTable; targetUser: %s; targetTable %s; targetNamespace: %s;";
+ public static final String CAN_REVOKE_TABLE_AUDIT_TEMPLATE =
+ "action:" + " revokeTable; targetUser: %s; targetTable %s; targetNamespace: %s;";
@Override
public boolean canRevokeTable(TCredentials c, String user, String table, String namespaceId)
@@ -569,8 +569,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CAN_IMPORT_AUDIT_TEMPLATE = "action: import;"
- + " targetTable: %s; dataDir: %s;";
+ public static final String CAN_IMPORT_AUDIT_TEMPLATE =
+ "action: import;" + " targetTable: %s; dataDir: %s;";
@Override
public boolean canImport(TCredentials credentials, String tableName, String importDir,
@@ -586,8 +586,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CAN_EXPORT_AUDIT_TEMPLATE = "action: export;"
- + " targetTable: %s; dataDir: %s;";
+ public static final String CAN_EXPORT_AUDIT_TEMPLATE =
+ "action: export;" + " targetTable: %s; dataDir: %s;";
@Override
public boolean canExport(TCredentials credentials, String tableId, String tableName,
@@ -616,8 +616,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String GRANT_SYSTEM_PERMISSION_AUDIT_TEMPLATE = "action:"
- + " grantSystemPermission; permission: %s; targetUser: %s;";
+ public static final String GRANT_SYSTEM_PERMISSION_AUDIT_TEMPLATE =
+ "action:" + " grantSystemPermission; permission: %s; targetUser: %s;";
@Override
public void grantSystemPermission(TCredentials credentials, String user,
@@ -631,8 +631,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String GRANT_TABLE_PERMISSION_AUDIT_TEMPLATE = "action:"
- + " grantTablePermission; permission: %s; targetTable: %s; targetUser: %s;";
+ public static final String GRANT_TABLE_PERMISSION_AUDIT_TEMPLATE =
+ "action:" + " grantTablePermission; permission: %s; targetTable: %s; targetUser: %s;";
@Override
public void grantTablePermission(TCredentials credentials, String user, String tableId,
@@ -647,8 +647,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String REVOKE_SYSTEM_PERMISSION_AUDIT_TEMPLATE = "action:"
- + " revokeSystemPermission; permission: %s; targetUser: %s;";
+ public static final String REVOKE_SYSTEM_PERMISSION_AUDIT_TEMPLATE =
+ "action:" + " revokeSystemPermission; permission: %s; targetUser: %s;";
@Override
public void revokeSystemPermission(TCredentials credentials, String user,
@@ -663,8 +663,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String REVOKE_TABLE_PERMISSION_AUDIT_TEMPLATE = "action:"
- + " revokeTablePermission; permission: %s; targetTable: %s; targetUser: %s;";
+ public static final String REVOKE_TABLE_PERMISSION_AUDIT_TEMPLATE =
+ "action:" + " revokeTablePermission; permission: %s; targetTable: %s; targetUser: %s;";
@Override
public void revokeTablePermission(TCredentials credentials, String user, String tableId,
@@ -679,8 +679,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String HAS_SYSTEM_PERMISSION_AUDIT_TEMPLATE = "action:"
- + " hasSystemPermission; permission: %s; targetUser: %s;";
+ public static final String HAS_SYSTEM_PERMISSION_AUDIT_TEMPLATE =
+ "action:" + " hasSystemPermission; permission: %s; targetUser: %s;";
@Override
public boolean hasSystemPermission(TCredentials credentials, String user,
@@ -695,8 +695,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CAN_ONLINE_OFFLINE_TABLE_AUDIT_TEMPLATE = "action:"
- + " %s; targetTable: %s;";
+ public static final String CAN_ONLINE_OFFLINE_TABLE_AUDIT_TEMPLATE =
+ "action:" + " %s; targetTable: %s;";
@Override
public boolean canOnlineOfflineTable(TCredentials credentials, String tableId, FateOperation op,
@@ -719,8 +719,8 @@ public class AuditedSecurityOperation extends SecurityOperation {
}
}
- public static final String CAN_MERGE_TABLE_AUDIT_TEMPLATE = "action:"
- + " mergeTable; targetTable: %s; targetNamespace: %s;";
+ public static final String CAN_MERGE_TABLE_AUDIT_TEMPLATE =
+ "action:" + " mergeTable; targetTable: %s; targetNamespace: %s;";
@Override
public boolean canMerge(TCredentials c, String tableId, String namespaceId)
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/SystemCredentials.java b/server/base/src/main/java/org/apache/accumulo/server/security/SystemCredentials.java
index 597aafb..5d0cd6e 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/SystemCredentials.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/SystemCredentials.java
@@ -46,8 +46,8 @@ import org.apache.hadoop.io.Writable;
*/
public final class SystemCredentials extends Credentials {
- private static final SecurityPermission SYSTEM_CREDENTIALS_PERMISSION = new SecurityPermission(
- "systemCredentialsPermission");
+ private static final SecurityPermission SYSTEM_CREDENTIALS_PERMISSION =
+ new SecurityPermission("systemCredentialsPermission");
private static final String SYSTEM_PRINCIPAL = "!SYSTEM";
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/UserImpersonation.java b/server/base/src/main/java/org/apache/accumulo/server/security/UserImpersonation.java
index a791293..e88350f 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/UserImpersonation.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/UserImpersonation.java
@@ -299,7 +299,7 @@ public class UserImpersonation {
usersWithHosts.setUsers(users);
}
String[] userValues = StringUtils.split(userString, ',');
- users.addAll(Arrays.<String> asList(userValues));
+ users.addAll(Arrays.<String>asList(userValues));
}
} else if (HOSTS.equals(usersOrHosts)) {
String hostsString = entry.getValue().trim();
@@ -312,7 +312,7 @@ public class UserImpersonation {
usersWithHosts.setHosts(hosts);
}
String[] hostValues = StringUtils.split(hostsString, ',');
- hosts.addAll(Arrays.<String> asList(hostValues));
+ hosts.addAll(Arrays.<String>asList(hostValues));
}
} else {
log.debug("Ignoring key " + aclKey);
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/delegation/AuthenticationTokenSecretManager.java b/server/base/src/main/java/org/apache/accumulo/server/security/delegation/AuthenticationTokenSecretManager.java
index f5048b0..0731e71 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/delegation/AuthenticationTokenSecretManager.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/delegation/AuthenticationTokenSecretManager.java
@@ -151,8 +151,8 @@ public class AuthenticationTokenSecretManager extends SecretManager<Authenticati
* A configuration object for obtaining the delegation token
* @return A delegation token for {@code username} created using the {@link #currentKey}.
*/
- public Entry<Token<AuthenticationTokenIdentifier>,AuthenticationTokenIdentifier> generateToken(
- String username, DelegationTokenConfig cfg) throws AccumuloException {
+ public Entry<Token<AuthenticationTokenIdentifier>,AuthenticationTokenIdentifier>
+ generateToken(String username, DelegationTokenConfig cfg) throws AccumuloException {
requireNonNull(username);
requireNonNull(cfg);
@@ -172,8 +172,8 @@ public class AuthenticationTokenSecretManager extends SecretManager<Authenticati
}
// The use of the ServiceLoader inside Token doesn't work to automatically get the Identifier
// Explicitly returning the identifier also saves an extra deserialization
- Token<AuthenticationTokenIdentifier> token = new Token<>(id.getBytes(), password, id.getKind(),
- new Text(svcName.toString()));
+ Token<AuthenticationTokenIdentifier> token =
+ new Token<>(id.getBytes(), password, id.getKind(), new Text(svcName.toString()));
return Maps.immutableEntry(token, id);
}
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/delegation/ZooAuthenticationKeyDistributor.java b/server/base/src/main/java/org/apache/accumulo/server/security/delegation/ZooAuthenticationKeyDistributor.java
index d94c2b0..73a866e 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/delegation/ZooAuthenticationKeyDistributor.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/delegation/ZooAuthenticationKeyDistributor.java
@@ -105,7 +105,7 @@ public class ZooAuthenticationKeyDistributor {
// Shortcircuit to avoid a list creation
if (children.isEmpty()) {
- return Collections.<AuthenticationKey> emptyList();
+ return Collections.<AuthenticationKey>emptyList();
}
// Deserialize each byte[] into an AuthenticationKey
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/handler/KerberosAuthenticator.java b/server/base/src/main/java/org/apache/accumulo/server/security/handler/KerberosAuthenticator.java
index 046903f..c81df08 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/handler/KerberosAuthenticator.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/handler/KerberosAuthenticator.java
@@ -52,9 +52,9 @@ public class KerberosAuthenticator implements Authenticator {
private static final Logger log = LoggerFactory.getLogger(KerberosAuthenticator.class);
private static final Set<Class<? extends AuthenticationToken>> SUPPORTED_TOKENS = Sets.newHashSet(
- Arrays.<Class<? extends AuthenticationToken>> asList(KerberosToken.class, SystemToken.class));
- private static final Set<String> SUPPORTED_TOKEN_NAMES = Sets
- .newHashSet(KerberosToken.class.getName(), SystemToken.class.getName());
+ Arrays.<Class<? extends AuthenticationToken>>asList(KerberosToken.class, SystemToken.class));
+ private static final Set<String> SUPPORTED_TOKEN_NAMES =
+ Sets.newHashSet(KerberosToken.class.getName(), SystemToken.class.getName());
private final ZKAuthenticator zkAuthenticator = new ZKAuthenticator();
private String zkUserPath;
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java b/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java
index 633e6ee..53072fc 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java
@@ -171,8 +171,8 @@ public class ZKPermHandler implements PermissionHandler {
@Override
public boolean hasCachedNamespacePermission(String user, String namespace,
NamespacePermission permission) throws AccumuloSecurityException, NamespaceNotFoundException {
- byte[] serializedPerms = zooCache
- .get(ZKUserPath + "/" + user + ZKUserNamespacePerms + "/" + namespace);
+ byte[] serializedPerms =
+ zooCache.get(ZKUserPath + "/" + user + ZKUserNamespacePerms + "/" + namespace);
if (serializedPerms != null) {
return ZKSecurityTool.convertNamespacePermissions(serializedPerms).contains(permission);
}
@@ -239,8 +239,8 @@ public class ZKPermHandler implements PermissionHandler {
public void grantNamespacePermission(String user, String namespace,
NamespacePermission permission) throws AccumuloSecurityException {
Set<NamespacePermission> namespacePerms;
- byte[] serializedPerms = zooCache
- .get(ZKUserPath + "/" + user + ZKUserNamespacePerms + "/" + namespace);
+ byte[] serializedPerms =
+ zooCache.get(ZKUserPath + "/" + user + ZKUserNamespacePerms + "/" + namespace);
if (serializedPerms != null)
namespacePerms = ZKSecurityTool.convertNamespacePermissions(serializedPerms);
else
@@ -326,15 +326,15 @@ public class ZKPermHandler implements PermissionHandler {
@Override
public void revokeNamespacePermission(String user, String namespace,
NamespacePermission permission) throws AccumuloSecurityException {
- byte[] serializedPerms = zooCache
- .get(ZKUserPath + "/" + user + ZKUserNamespacePerms + "/" + namespace);
+ byte[] serializedPerms =
+ zooCache.get(ZKUserPath + "/" + user + ZKUserNamespacePerms + "/" + namespace);
// User had no namespace permission, nothing to revoke.
if (serializedPerms == null)
return;
- Set<NamespacePermission> namespacePerms = ZKSecurityTool
- .convertNamespacePermissions(serializedPerms);
+ Set<NamespacePermission> namespacePerms =
+ ZKSecurityTool.convertNamespacePermissions(serializedPerms);
try {
if (namespacePerms.remove(permission)) {
zooCache.clear();
diff --git a/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java b/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java
index 95f791c..ce49e5e 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java
@@ -52,14 +52,14 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.Preconditions;
public class TableManager {
- private static SecurityPermission TABLE_MANAGER_PERMISSION = new SecurityPermission(
- "tableManagerPermission");
+ private static SecurityPermission TABLE_MANAGER_PERMISSION =
+ new SecurityPermission("tableManagerPermission");
private static final Logger log = LoggerFactory.getLogger(TableManager.class);
- private static final Set<TableObserver> observers = Collections
- .synchronizedSet(new HashSet<TableObserver>());
- private static final Map<String,TableState> tableStateCache = Collections
- .synchronizedMap(new HashMap<String,TableState>());
+ private static final Set<TableObserver> observers =
+ Collections.synchronizedSet(new HashSet<TableObserver>());
+ private static final Map<String,TableState> tableStateCache =
+ Collections.synchronizedMap(new HashMap<String,TableState>());
private static final byte[] ZERO_BYTE = new byte[] {'0'};
private static TableManager tableManager = null;
@@ -143,8 +143,8 @@ public class TableManager {
if (StringUtils.isNotEmpty(message))
this.message = message;
else {
- String defaultMessage = "Error transitioning from " + oldState + " state to " + newState
- + " state";
+ String defaultMessage =
+ "Error transitioning from " + oldState + " state to " + newState + " state";
this.message = defaultMessage;
}
}
@@ -218,8 +218,9 @@ public class TableManager {
synchronized (tableStateCache) {
for (String tableId : zooStateCache
.getChildren(ZooUtil.getRoot(instance) + Constants.ZTABLES))
- if (zooStateCache.get(ZooUtil.getRoot(instance) + Constants.ZTABLES + "/" + tableId
- + Constants.ZTABLE_STATE) != null)
+ if (zooStateCache.get(
+ ZooUtil.getRoot(instance) + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_STATE)
+ != null)
updateTableStateCache(tableId);
}
}
diff --git a/server/base/src/main/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManager.java b/server/base/src/main/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManager.java
index 3b888eb..ada1e27 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManager.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManager.java
@@ -188,8 +188,8 @@ public class LargestFirstMemoryManager implements MemoryManager {
final long timeMemoryLoad = timeMemoryLoad(memTabletSize, idleTime);
ingestMemory += memTabletSize;
if (minorCompactingSize == 0 && memTabletSize > 0) {
- TabletInfo tabletInfo = new TabletInfo(ts.getExtent(), memTabletSize, idleTime,
- timeMemoryLoad);
+ TabletInfo tabletInfo =
+ new TabletInfo(ts.getExtent(), memTabletSize, idleTime, timeMemoryLoad);
try {
// If the table was deleted, getMinCIdleThreshold will throw an exception
if (idleTime > getMinCIdleThreshold(ts.getExtent())) {
@@ -242,8 +242,8 @@ public class LargestFirstMemoryManager implements MemoryManager {
if (startMinC) {
long toBeCompacted = compactionMemory;
- outer: for (int i = numWaitingMincs; i < maxMinCs
- && !largestMemTablets.isEmpty(); /* empty */) {
+ outer: for (int i = numWaitingMincs;
+ i < maxMinCs && !largestMemTablets.isEmpty(); /* empty */) {
Entry<Long,List<TabletInfo>> lastEntry = largestMemTablets.lastEntry();
for (TabletInfo largest : lastEntry.getValue()) {
toBeCompacted += largest.memTableSize;
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java b/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
index cf84595..f4d0339 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
@@ -229,8 +229,8 @@ public class Admin implements KeywordExecutable {
rc = 5;
System.out.println("\n*** Looking for missing files ***\n");
if (checkTabletsCommand.tableName == null) {
- if (RemoveEntriesForMissingFiles.checkAllTables(context,
- checkTabletsCommand.fixFiles) != 0)
+ if (RemoveEntriesForMissingFiles.checkAllTables(context, checkTabletsCommand.fixFiles)
+ != 0)
rc = 6;
} else {
if (RemoveEntriesForMissingFiles.checkTable(context, checkTabletsCommand.tableName,
@@ -376,8 +376,8 @@ public class Admin implements KeywordExecutable {
for (String server : servers) {
for (int port : context.getConfiguration().getPort(Property.TSERV_CLIENTPORT)) {
HostAndPort address = AddressUtil.parseAddress(server, port);
- final String finalServer = qualifyWithZooKeeperSessionId(zTServerRoot, zc,
- address.toString());
+ final String finalServer =
+ qualifyWithZooKeeperSessionId(zTServerRoot, zc, address.toString());
log.info("Stopping server " + finalServer);
MasterClient.execute(context, new ClientExec<MasterClientService.Client>() {
@Override
@@ -432,14 +432,14 @@ public class Admin implements KeywordExecutable {
private static final MessageFormat createTableFormat = new MessageFormat("createtable {0}\n");
private static final MessageFormat createUserFormat = new MessageFormat("createuser {0}\n");
private static final MessageFormat nsConfigFormat = new MessageFormat("config -ns {0} -s {1}\n");
- private static final MessageFormat sysPermFormat = new MessageFormat(
- "grant System.{0} -s -u {1}\n");
- private static final MessageFormat nsPermFormat = new MessageFormat(
- "grant Namespace.{0} -ns {1} -u {2}\n");
- private static final MessageFormat tablePermFormat = new MessageFormat(
- "grant Table.{0} -t {1} -u {2}\n");
- private static final MessageFormat userAuthsFormat = new MessageFormat(
- "setauths -u {0} -s {1}\n");
+ private static final MessageFormat sysPermFormat =
+ new MessageFormat("grant System.{0} -s -u {1}\n");
+ private static final MessageFormat nsPermFormat =
+ new MessageFormat("grant Namespace.{0} -ns {1} -u {2}\n");
+ private static final MessageFormat tablePermFormat =
+ new MessageFormat("grant Table.{0} -t {1} -u {2}\n");
+ private static final MessageFormat userAuthsFormat =
+ new MessageFormat("setauths -u {0} -s {1}\n");
private DefaultConfiguration defaultConfig;
private Map<String,String> siteConfig, systemConfig;
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java b/server/base/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java
index 8089a7d..72f9d92 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java
@@ -98,8 +98,8 @@ public class ChangeSecret {
}
private static void verifyAccumuloIsDown(Instance inst, String oldPassword) throws Exception {
- ZooReader zooReader = new ZooReaderWriter(inst.getZooKeepers(),
- inst.getZooKeepersSessionTimeOut(), oldPassword);
+ ZooReader zooReader =
+ new ZooReaderWriter(inst.getZooKeepers(), inst.getZooKeepersSessionTimeOut(), oldPassword);
String root = ZooUtil.getRoot(inst);
final List<String> ephemerals = new ArrayList<>();
recurse(zooReader, root, new Visitor() {
@@ -121,10 +121,10 @@ public class ChangeSecret {
private static void rewriteZooKeeperInstance(final Instance inst, final String newInstanceId,
String oldPass, String newPass) throws Exception {
- final ZooReaderWriter orig = new ZooReaderWriter(inst.getZooKeepers(),
- inst.getZooKeepersSessionTimeOut(), oldPass);
- final IZooReaderWriter new_ = new ZooReaderWriter(inst.getZooKeepers(),
- inst.getZooKeepersSessionTimeOut(), newPass);
+ final ZooReaderWriter orig =
+ new ZooReaderWriter(inst.getZooKeepers(), inst.getZooKeepersSessionTimeOut(), oldPass);
+ final IZooReaderWriter new_ =
+ new ZooReaderWriter(inst.getZooKeepers(), inst.getZooKeepersSessionTimeOut(), newPass);
String root = ZooUtil.getRoot(inst);
recurse(orig, root, new Visitor() {
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/FileUtil.java b/server/base/src/main/java/org/apache/accumulo/server/util/FileUtil.java
index 9d02130..c3718e4 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/FileUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/FileUtil.java
@@ -84,7 +84,7 @@ public class FileUtil {
private static Path createTmpDir(AccumuloConfiguration acuConf, VolumeManager fs)
throws IOException {
- String accumuloDir = fs.choose(Optional.<String> absent(), ServerConstants.getBaseUris());
+ String accumuloDir = fs.choose(Optional.<String>absent(), ServerConstants.getBaseUris());
Path result = null;
while (result == null) {
@@ -221,8 +221,8 @@ public class FileUtil {
+ prevEndRow + ", reducing in tmpDir = " + tmpDir);
long t1 = System.currentTimeMillis();
- mapFiles = reduceFiles(acuconf, conf, fs, prevEndRow, endRow, mapFiles, maxToOpen, tmpDir,
- 0);
+ mapFiles =
+ reduceFiles(acuconf, conf, fs, prevEndRow, endRow, mapFiles, maxToOpen, tmpDir, 0);
long t2 = System.currentTimeMillis();
log.debug("Finished reducing indexes for " + endRow + " " + prevEndRow + " in "
@@ -243,7 +243,7 @@ public class FileUtil {
}
List<SortedKeyValueIterator<Key,Value>> iters =
- new ArrayList<SortedKeyValueIterator<Key,Value>>(readers);
+ new ArrayList<SortedKeyValueIterator<Key,Value>>(readers);
MultiIterator mmfi = new MultiIterator(iters, true);
// skip the prevendrow
@@ -305,8 +305,8 @@ public class FileUtil {
+ prevEndRow + ", reducing in tmpDir = " + tmpDir);
long t1 = System.currentTimeMillis();
- mapFiles = reduceFiles(acuConf, conf, fs, prevEndRow, endRow, mapFiles, maxToOpen, tmpDir,
- 0);
+ mapFiles =
+ reduceFiles(acuConf, conf, fs, prevEndRow, endRow, mapFiles, maxToOpen, tmpDir, 0);
long t2 = System.currentTimeMillis();
log.debug("Finished reducing indexes for " + endRow + " " + prevEndRow + " in "
@@ -335,7 +335,7 @@ public class FileUtil {
}
List<SortedKeyValueIterator<Key,Value>> iters =
- new ArrayList<SortedKeyValueIterator<Key,Value>>(readers);
+ new ArrayList<SortedKeyValueIterator<Key,Value>>(readers);
MultiIterator mmfi = new MultiIterator(iters, true);
// skip the prevendrow
@@ -380,8 +380,8 @@ public class FileUtil {
// sanity check
for (Key key : ret.values()) {
- boolean inRange = (key.compareRow(prevEndRow) > 0
- && (endRow == null || key.compareRow(endRow) < 1));
+ boolean inRange =
+ (key.compareRow(prevEndRow) > 0 && (endRow == null || key.compareRow(endRow) < 1));
if (!inRange) {
throw new IOException("Found mid point is not in range " + key + " " + prevEndRow + " "
+ endRow + " " + mapFiles);
@@ -521,9 +521,9 @@ public class FileUtil {
for (FileRef ref : mapFiles) {
Path path = ref.path();
FileSystem ns = fs.getVolumeByPath(path).getFileSystem();
- FileSKVIterator reader = FileOperations.getInstance().newReaderBuilder()
- .forFile(path.toString(), ns, ns.getConf()).withTableConfiguration(acuConf)
- .seekToBeginning().build();
+ FileSKVIterator reader =
+ FileOperations.getInstance().newReaderBuilder().forFile(path.toString(), ns, ns.getConf())
+ .withTableConfiguration(acuConf).seekToBeginning().build();
try {
if (!reader.hasTop())
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/FindOfflineTablets.java b/server/base/src/main/java/org/apache/accumulo/server/util/FindOfflineTablets.java
index 3bf6b0a..cfdfcdd 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/FindOfflineTablets.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/FindOfflineTablets.java
@@ -51,8 +51,8 @@ public class FindOfflineTablets {
public static void main(String[] args) throws Exception {
ClientOpts opts = new ClientOpts();
opts.parseArgs(FindOfflineTablets.class.getName(), args);
- AccumuloServerContext context = new AccumuloServerContext(
- new ServerConfigurationFactory(opts.getInstance()));
+ AccumuloServerContext context =
+ new AccumuloServerContext(new ServerConfigurationFactory(opts.getInstance()));
findOffline(context, null);
}
@@ -91,8 +91,8 @@ public class FindOfflineTablets {
return 0;
System.out.println("Scanning " + RootTable.NAME);
- Iterator<TabletLocationState> rootScanner = new MetaDataTableScanner(context,
- MetadataSchema.TabletsSection.getRange(), RootTable.NAME);
+ Iterator<TabletLocationState> rootScanner =
+ new MetaDataTableScanner(context, MetadataSchema.TabletsSection.getRange(), RootTable.NAME);
if ((offline = checkTablets(rootScanner, tservers)) > 0)
return offline;
@@ -121,8 +121,9 @@ public class FindOfflineTablets {
while (scanner.hasNext() && !System.out.checkError()) {
TabletLocationState locationState = scanner.next();
TabletState state = locationState.getState(tservers.getCurrentServers());
- if (state != null && state != TabletState.HOSTED && TableManager.getInstance()
- .getTableState(locationState.extent.getTableId()) != TableState.OFFLINE) {
+ if (state != null && state != TabletState.HOSTED
+ && TableManager.getInstance().getTableState(locationState.extent.getTableId())
+ != TableState.OFFLINE) {
System.out
.println(locationState + " is " + state + " #walogs:" + locationState.walogs.size());
offline++;
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/LocalityCheck.java b/server/base/src/main/java/org/apache/accumulo/server/util/LocalityCheck.java
index 8849359..a0a8896 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/LocalityCheck.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/LocalityCheck.java
@@ -91,8 +91,8 @@ public class LocalityCheck {
Path filePath = new Path(file);
FileSystem ns = fs.getVolumeByPath(filePath).getFileSystem();
FileStatus fileStatus = ns.getFileStatus(filePath);
- BlockLocation[] fileBlockLocations = ns.getFileBlockLocations(fileStatus, 0,
- fileStatus.getLen());
+ BlockLocation[] fileBlockLocations =
+ ns.getFileBlockLocations(fileStatus, 0, fileStatus.getLen());
for (BlockLocation blockLocation : fileBlockLocations) {
allBlocks++;
for (String location : blockLocation.getHosts()) {
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/LoginProperties.java b/server/base/src/main/java/org/apache/accumulo/server/util/LoginProperties.java
index 1399f44..d0683e8 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/LoginProperties.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/LoginProperties.java
@@ -42,8 +42,8 @@ public class LoginProperties implements KeywordExecutable {
@Override
public void execute(String[] args) throws Exception {
- AccumuloConfiguration config = new ServerConfigurationFactory(HdfsZooInstance.getInstance())
- .getConfiguration();
+ AccumuloConfiguration config =
+ new ServerConfigurationFactory(HdfsZooInstance.getInstance()).getConfiguration();
Authenticator authenticator = AccumuloVFSClassLoader.getClassLoader()
.loadClass(config.get(Property.INSTANCE_SECURITY_AUTHENTICATOR))
.asSubclass(Authenticator.class).newInstance();
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java b/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
index dc44e7f..4de5326 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
@@ -383,8 +383,8 @@ public class MetadataTableUtil {
public static Mutation createDeleteMutation(String tableId, String pathToRemove)
throws IOException {
Path path = VolumeManagerImpl.get().getFullPath(tableId, pathToRemove);
- Mutation delFlag = new Mutation(
- new Text(MetadataSchema.DeletesSection.getRowPrefix() + path.toString()));
+ Mutation delFlag =
+ new Mutation(new Text(MetadataSchema.DeletesSection.getRowPrefix() + path.toString()));
delFlag.put(EMPTY_TEXT, EMPTY_TEXT, new Value(new byte[] {}));
return delFlag;
}
@@ -440,8 +440,8 @@ public class MetadataTableUtil {
new DataFileValue(lowSize, lowEntries, entry.getValue().getTime()));
long highSize = (long) Math.ceil((entry.getValue().getSize() * (1.0 - splitRatio)));
- long highEntries = (long) Math
- .ceil((entry.getValue().getNumEntries() * (1.0 - splitRatio)));
+ long highEntries =
+ (long) Math.ceil((entry.getValue().getNumEntries() * (1.0 - splitRatio)));
highDatafileSizes.put(entry.getKey(),
new DataFileValue(highSize, highEntries, entry.getValue().getTime()));
}
@@ -536,9 +536,9 @@ public class MetadataTableUtil {
}
}
- public static Pair<List<LogEntry>,SortedMap<FileRef,DataFileValue>> getFileAndLogEntries(
- ClientContext context, KeyExtent extent)
- throws KeeperException, InterruptedException, IOException {
+ public static Pair<List<LogEntry>,SortedMap<FileRef,DataFileValue>>
+ getFileAndLogEntries(ClientContext context, KeyExtent extent)
+ throws KeeperException, InterruptedException, IOException {
ArrayList<LogEntry> result = new ArrayList<>();
TreeMap<FileRef,DataFileValue> sizes = new TreeMap<>();
@@ -652,11 +652,11 @@ public class MetadataTableUtil {
LogEntryIterator(ClientContext context)
throws IOException, KeeperException, InterruptedException {
zookeeperEntries = getLogEntries(context, RootTable.EXTENT).iterator();
- rootTableEntries = getLogEntries(context, new KeyExtent(MetadataTable.ID, null, null))
- .iterator();
+ rootTableEntries =
+ getLogEntries(context, new KeyExtent(MetadataTable.ID, null, null)).iterator();
try {
- Scanner scanner = context.getConnector().createScanner(MetadataTable.NAME,
- Authorizations.EMPTY);
+ Scanner scanner =
+ context.getConnector().createScanner(MetadataTable.NAME, Authorizations.EMPTY);
log.info("Setting range to " + MetadataSchema.TabletsSection.getRange());
scanner.setRange(MetadataSchema.TabletsSection.getRange());
scanner.fetchColumnFamily(LogColumnFamily.NAME);
@@ -812,8 +812,8 @@ public class MetadataTableUtil {
while (cloneIter.hasNext()) {
Map<Key,Value> cloneTablet = cloneIter.next();
- Text cloneEndRow = new KeyExtent(cloneTablet.keySet().iterator().next().getRow(), (Text) null)
- .getEndRow();
+ Text cloneEndRow =
+ new KeyExtent(cloneTablet.keySet().iterator().next().getRow(), (Text) null).getEndRow();
HashSet<String> cloneFiles = new HashSet<>();
boolean cloneSuccessful = false;
@@ -831,8 +831,8 @@ public class MetadataTableUtil {
Map<Key,Value> srcTablet = srcIter.next();
srcTablets.add(srcTablet);
- Text srcEndRow = new KeyExtent(srcTablet.keySet().iterator().next().getRow(), (Text) null)
- .getEndRow();
+ Text srcEndRow =
+ new KeyExtent(srcTablet.keySet().iterator().next().getRow(), (Text) null).getEndRow();
int cmp = compareEndRows(cloneEndRow, srcEndRow);
if (cmp < 0)
@@ -846,8 +846,8 @@ public class MetadataTableUtil {
while (cmp > 0) {
srcTablet = srcIter.next();
srcTablets.add(srcTablet);
- srcEndRow = new KeyExtent(srcTablet.keySet().iterator().next().getRow(), (Text) null)
- .getEndRow();
+ srcEndRow =
+ new KeyExtent(srcTablet.keySet().iterator().next().getRow(), (Text) null).getEndRow();
cmp = compareEndRows(cloneEndRow, srcEndRow);
if (cmp < 0)
throw new TabletIterator.TabletDeletedException(
@@ -955,8 +955,8 @@ public class MetadataTableUtil {
public static void removeBulkLoadEntries(Connector conn, String tableId, long tid)
throws Exception {
try (
- Scanner mscanner = new IsolatedScanner(
- conn.createScanner(MetadataTable.NAME, Authorizations.EMPTY));
+ Scanner mscanner =
+ new IsolatedScanner(conn.createScanner(MetadataTable.NAME, Authorizations.EMPTY));
BatchWriter bw = conn.createBatchWriter(MetadataTable.NAME, new BatchWriterConfig())) {
mscanner.setRange(new KeyExtent(tableId, null, null).toMetadataRange());
mscanner.fetchColumnFamily(TabletsSection.BulkFileColumnFamily.NAME);
@@ -1117,8 +1117,8 @@ public class MetadataTableUtil {
update(context, m, oldExtent);
}
- public static SortedMap<Text,SortedMap<ColumnFQ,Value>> getTabletEntries(
- SortedMap<Key,Value> tabletKeyValues, List<ColumnFQ> columns) {
+ public static SortedMap<Text,SortedMap<ColumnFQ,Value>>
+ getTabletEntries(SortedMap<Key,Value> tabletKeyValues, List<ColumnFQ> columns) {
TreeMap<Text,SortedMap<ColumnFQ,Value>> tabletEntries = new TreeMap<>();
HashSet<ColumnFQ> colSet = null;
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/RandomWriter.java b/server/base/src/main/java/org/apache/accumulo/server/util/RandomWriter.java
index e780256..694f95a 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/RandomWriter.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/RandomWriter.java
@@ -55,8 +55,8 @@ public class RandomWriter {
@Override
public Mutation next() {
- Text row_value = new Text(
- Long.toString(((r.nextLong() & 0x7fffffffffffffffl) / 177) % 100000000000l));
+ Text row_value =
+ new Text(Long.toString(((r.nextLong() & 0x7fffffffffffffffl) / 177) % 100000000000l));
Mutation m = new Mutation(row_value);
for (int column = 0; column < num_columns_per_row; column++) {
Text column_fam = new Text("col_fam");
@@ -100,8 +100,8 @@ public class RandomWriter {
log.info("starting at " + start + " for user " + opts.getPrincipal());
try {
Connector connector = opts.getConnector();
- BatchWriter bw = connector.createBatchWriter(opts.getTableName(),
- bwOpts.getBatchWriterConfig());
+ BatchWriter bw =
+ connector.createBatchWriter(opts.getTableName(), bwOpts.getBatchWriterConfig());
log.info("Writing " + opts.count + " mutations...");
bw.addMutations(new RandomMutationGenerator(opts.count));
bw.close();
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/RandomizeVolumes.java b/server/base/src/main/java/org/apache/accumulo/server/util/RandomizeVolumes.java
index 4b5cc53..842ceee 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/RandomizeVolumes.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/RandomizeVolumes.java
@@ -58,8 +58,8 @@ public class RandomizeVolumes {
opts.parseArgs(RandomizeVolumes.class.getName(), args);
Connector c;
if (opts.getToken() == null) {
- AccumuloServerContext context = new AccumuloServerContext(
- new ServerConfigurationFactory(opts.getInstance()));
+ AccumuloServerContext context =
+ new AccumuloServerContext(new ServerConfigurationFactory(opts.getInstance()));
c = context.getConnector();
} else {
c = opts.getConnector();
@@ -116,9 +116,9 @@ public class RandomizeVolumes {
Key key = entry.getKey();
Mutation m = new Mutation(key.getRow());
- final String newLocation = vm.choose(Optional.of(tableId), ServerConstants.getBaseUris())
- + Path.SEPARATOR + ServerConstants.TABLE_DIR + Path.SEPARATOR + tableId + Path.SEPARATOR
- + directory;
+ final String newLocation =
+ vm.choose(Optional.of(tableId), ServerConstants.getBaseUris()) + Path.SEPARATOR
+ + ServerConstants.TABLE_DIR + Path.SEPARATOR + tableId + Path.SEPARATOR + directory;
m.put(key.getColumnFamily(), key.getColumnQualifier(),
new Value(newLocation.getBytes(UTF_8)));
if (log.isTraceEnabled()) {
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/RemoveEntriesForMissingFiles.java b/server/base/src/main/java/org/apache/accumulo/server/util/RemoveEntriesForMissingFiles.java
index a66578e..93d6f86 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/RemoveEntriesForMissingFiles.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/RemoveEntriesForMissingFiles.java
@@ -185,8 +185,8 @@ public class RemoveEntriesForMissingFiles {
}
static int checkAllTables(ClientContext context, boolean fix) throws Exception {
- int missing = checkTable(context, RootTable.NAME, MetadataSchema.TabletsSection.getRange(),
- fix);
+ int missing =
+ checkTable(context, RootTable.NAME, MetadataSchema.TabletsSection.getRange(), fix);
if (missing == 0)
return checkTable(context, MetadataTable.NAME, MetadataSchema.TabletsSection.getRange(), fix);
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java b/server/base/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java
index 67fe7be..b65da30 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java
@@ -56,8 +56,8 @@ import com.beust.jcommander.Parameter;
public class SendLogToChainsaw extends XMLLayout {
- private static Pattern logPattern = Pattern
- .compile("^(\\d\\d)\\s(\\d\\d):(\\d\\d):(\\d\\d),(\\d\\d\\d)\\s\\[(.*)\\]\\s"
+ private static Pattern logPattern =
+ Pattern.compile("^(\\d\\d)\\s(\\d\\d):(\\d\\d):(\\d\\d),(\\d\\d\\d)\\s\\[(.*)\\]\\s"
+ "(TRACE|DEBUG|INFO|WARN|FATAL|ERROR)\\s*?:(.*)$", Pattern.UNIX_LINES);
private File[] logFiles = null;
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/SystemPropUtil.java b/server/base/src/main/java/org/apache/accumulo/server/util/SystemPropUtil.java
index b7231d8..6da4ccb 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/SystemPropUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/SystemPropUtil.java
@@ -36,8 +36,8 @@ public class SystemPropUtil {
public static boolean setSystemProperty(String property, String value)
throws KeeperException, InterruptedException {
if (!Property.isValidZooPropertyKey(property)) {
- IllegalArgumentException iae = new IllegalArgumentException(
- "Zookeeper property is not mutable: " + property);
+ IllegalArgumentException iae =
+ new IllegalArgumentException("Zookeeper property is not mutable: " + property);
log.debug("Attempted to set zookeeper property. It is not mutable", iae);
throw iae;
}
@@ -61,8 +61,8 @@ public class SystemPropUtil {
}
// create the zk node for this property and set it's data to the specified value
- String zPath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZCONFIG + "/"
- + property;
+ String zPath =
+ ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZCONFIG + "/" + property;
boolean result = ZooReaderWriter.getInstance().putPersistentData(zPath, value.getBytes(UTF_8),
NodeExistsPolicy.OVERWRITE);
@@ -71,8 +71,8 @@ public class SystemPropUtil {
public static void removeSystemProperty(String property)
throws InterruptedException, KeeperException {
- String zPath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZCONFIG + "/"
- + property;
+ String zPath =
+ ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZCONFIG + "/" + property;
ZooReaderWriter.getInstance().recursiveDelete(zPath, NodeMissingPolicy.FAIL);
}
}
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java b/server/base/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java
index d07429e..f196129 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java
@@ -193,9 +193,9 @@ public class VerifyTabletAssignments {
Map<String,Map<String,String>> emptyMapSMapSS = Collections.emptyMap();
List<IterInfo> emptyListIterInfo = Collections.emptyList();
List<TColumn> emptyListColumn = Collections.emptyList();
- InitialMultiScan is = client.startMultiScan(tinfo, context.rpcCreds(), batch, emptyListColumn,
- emptyListIterInfo, emptyMapSMapSS, Authorizations.EMPTY.getAuthorizationsBB(), false, null,
- 0L, null);
+ InitialMultiScan is =
+ client.startMultiScan(tinfo, context.rpcCreds(), batch, emptyListColumn, emptyListIterInfo,
+ emptyMapSMapSS, Authorizations.EMPTY.getAuthorizationsBB(), false, null, 0L, null);
if (is.result.more) {
MultiScanResult result = client.continueMultiScan(tinfo, is.scanID);
checkFailures(entry.getKey(), failures, result);
diff --git a/server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooQueueLock.java b/server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooQueueLock.java
index 31e64b0..456aec7 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooQueueLock.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooQueueLock.java
@@ -33,8 +33,8 @@ public class ZooQueueLock extends org.apache.accumulo.fate.zookeeper.ZooQueueLoc
public static void main(String args[]) throws InterruptedException, KeeperException {
ZooQueueLock lock = new ZooQueueLock("/lock", true);
DistributedReadWriteLock rlocker = new DistributedReadWriteLock(lock, "reader".getBytes(UTF_8));
- DistributedReadWriteLock wlocker = new DistributedReadWriteLock(lock,
- "wlocker".getBytes(UTF_8));
+ DistributedReadWriteLock wlocker =
+ new DistributedReadWriteLock(lock, "wlocker".getBytes(UTF_8));
final Lock readLock = rlocker.readLock();
readLock.lock();
final Lock readLock2 = rlocker.readLock();
diff --git a/server/base/src/test/java/org/apache/accumulo/server/AccumuloTest.java b/server/base/src/test/java/org/apache/accumulo/server/AccumuloTest.java
index b3f578e..14c6fa2 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/AccumuloTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/AccumuloTest.java
@@ -142,8 +142,8 @@ public class AccumuloTest {
@Test
public void testLocateLogConfig() throws Exception {
- File confDir = new File(FileUtils.getTempDirectory(),
- "AccumuloTest" + System.currentTimeMillis());
+ File confDir =
+ new File(FileUtils.getTempDirectory(), "AccumuloTest" + System.currentTimeMillis());
String confDirName = confDir.getAbsolutePath();
assertTrue("Failed to make test configuration directory", confDir.mkdir());
try {
@@ -166,8 +166,8 @@ public class AccumuloTest {
@Test
public void testLocateLogConfig_Default() throws Exception {
- File confDir = new File(FileUtils.getTempDirectory(),
- "AccumuloTest" + System.currentTimeMillis());
+ File confDir =
+ new File(FileUtils.getTempDirectory(), "AccumuloTest" + System.currentTimeMillis());
String confDirName = confDir.getAbsolutePath();
assertTrue("Failed to make test configuration directory", confDir.mkdir());
try {
@@ -181,8 +181,8 @@ public class AccumuloTest {
@Test
public void testLocateLogConfig_Explicit() throws Exception {
- File confDir = new File(FileUtils.getTempDirectory(),
- "AccumuloTest" + System.currentTimeMillis());
+ File confDir =
+ new File(FileUtils.getTempDirectory(), "AccumuloTest" + System.currentTimeMillis());
String confDirName = confDir.getAbsolutePath();
System.setProperty("log4j.configuration", "myconfig.xml");
try {
diff --git a/server/base/src/test/java/org/apache/accumulo/server/ServerConstantsTest.java b/server/base/src/test/java/org/apache/accumulo/server/ServerConstantsTest.java
index d4ea2cd..080737e 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/ServerConstantsTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/ServerConstantsTest.java
@@ -39,8 +39,8 @@ import org.junit.rules.TemporaryFolder;
*/
public class ServerConstantsTest {
@Rule
- public TemporaryFolder folder = new TemporaryFolder(
- new File(System.getProperty("user.dir") + "/target"));
+ public TemporaryFolder folder =
+ new TemporaryFolder(new File(System.getProperty("user.dir") + "/target"));
@Test
public void testCheckBaseDirs() throws IOException {
diff --git a/server/base/src/test/java/org/apache/accumulo/server/client/BulkImporterTest.java b/server/base/src/test/java/org/apache/accumulo/server/client/BulkImporterTest.java
index b4618e4..10c5de0 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/client/BulkImporterTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/client/BulkImporterTest.java
@@ -145,8 +145,8 @@ public class BulkImporterTest {
writer.append(new Key("xyzzy", "cf", "cq"), empty);
writer.close();
VolumeManager vm = VolumeManagerImpl.get(context.getConfiguration());
- List<TabletLocation> overlaps = BulkImporter.findOverlappingTablets(context, vm, locator,
- new Path(file));
+ List<TabletLocation> overlaps =
+ BulkImporter.findOverlappingTablets(context, vm, locator, new Path(file));
assertEquals(5, overlaps.size());
Collections.sort(overlaps);
assertEquals(new KeyExtent(tableId, new Text("a"), null), overlaps.get(0).tablet_extent);
diff --git a/server/base/src/test/java/org/apache/accumulo/server/fs/ViewFSUtilsTest.java b/server/base/src/test/java/org/apache/accumulo/server/fs/ViewFSUtilsTest.java
index 296a7f1..190efbf 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/fs/ViewFSUtilsTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/fs/ViewFSUtilsTest.java
@@ -46,9 +46,9 @@ public class ViewFSUtilsTest {
conf.set("fs.viewfs.mounttable.default.link./ns2", "file:///tmp/ns2");
conf.set("fs.viewfs.mounttable.default.link./ns22", "file:///tmp/ns22");
- String[] tablesDirs1 = shuffle("viewfs:///ns1/accumulo/tables",
- "viewfs:///ns2/accumulo/tables", "viewfs:///ns22/accumulo/tables",
- "viewfs:///ns/accumulo/tables");
+ String[] tablesDirs1 =
+ shuffle("viewfs:///ns1/accumulo/tables", "viewfs:///ns2/accumulo/tables",
+ "viewfs:///ns22/accumulo/tables", "viewfs:///ns/accumulo/tables");
String[] tablesDirs2 = shuffle("viewfs:/ns1/accumulo/tables", "viewfs:/ns2/accumulo/tables",
"viewfs:/ns22/accumulo/tables", "viewfs:/ns/accumulo/tables");
@@ -83,10 +83,10 @@ public class ViewFSUtilsTest {
conf.set("fs.viewfs.mounttable.default.link./ns1/C", "file:///tmp/3");
conf.set("fs.viewfs.mounttable.default.link./ns2", "file:///tmp/3");
- String[] tablesDirs1 = shuffle("viewfs:///ns1/accumulo/tables",
- "viewfs:///ns1/A/accumulo/tables", "viewfs:///ns1/AA/accumulo/tables",
- "viewfs:///ns1/C/accumulo/tables", "viewfs:///ns2/accumulo/tables",
- "viewfs:///accumulo/tables");
+ String[] tablesDirs1 =
+ shuffle("viewfs:///ns1/accumulo/tables", "viewfs:///ns1/A/accumulo/tables",
+ "viewfs:///ns1/AA/accumulo/tables", "viewfs:///ns1/C/accumulo/tables",
+ "viewfs:///ns2/accumulo/tables", "viewfs:///accumulo/tables");
String[] tablesDirs2 = shuffle("viewfs:/ns1/accumulo/tables", "viewfs:/ns1/A/accumulo/tables",
"viewfs:/ns1/AA/accumulo/tables", "viewfs:/ns1/C/accumulo/tables",
"viewfs:/ns2/accumulo/tables", "viewfs:/accumulo/tables");
diff --git a/server/base/src/test/java/org/apache/accumulo/server/fs/VolumeManagerImplTest.java b/server/base/src/test/java/org/apache/accumulo/server/fs/VolumeManagerImplTest.java
index 18c0b26..e596400 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/fs/VolumeManagerImplTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/fs/VolumeManagerImplTest.java
@@ -70,8 +70,8 @@ public class VolumeManagerImplTest {
String scheme = fs.getDefaultVolume().getFileSystem().getUri().toURL().getProtocol();
System.out.println(basePath);
Path expectedBase = new Path(scheme + ":" + basePath, FileType.TABLE.getDirectory());
- List<String> pathsToTest = Arrays.asList("1/default_tablet", "1/default_tablet/",
- "1/t-0000001");
+ List<String> pathsToTest =
+ Arrays.asList("1/default_tablet", "1/default_tablet/", "1/t-0000001");
for (String pathToTest : pathsToTest) {
Path fullPath = fs.getFullPath(FileType.TABLE, pathToTest);
assertEquals(new Path(expectedBase, pathToTest), fullPath);
@@ -84,8 +84,8 @@ public class VolumeManagerImplTest {
String scheme = fs.getDefaultVolume().getFileSystem().getUri().toURL().getProtocol();
System.out.println(basePath);
Path expectedBase = new Path(scheme + ":" + basePath, FileType.TABLE.getDirectory());
- List<String> pathsToTest = Arrays.asList("1/default_tablet/C0000001.rf",
- "1/t-0000001/C0000001.rf");
+ List<String> pathsToTest =
+ Arrays.asList("1/default_tablet/C0000001.rf", "1/t-0000001/C0000001.rf");
for (String pathToTest : pathsToTest) {
Path fullPath = fs.getFullPath(FileType.TABLE, pathToTest);
assertEquals(new Path(expectedBase, pathToTest), fullPath);
diff --git a/server/base/src/test/java/org/apache/accumulo/server/fs/VolumeUtilTest.java b/server/base/src/test/java/org/apache/accumulo/server/fs/VolumeUtilTest.java
index 0cd1aa8..eec87d7 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/fs/VolumeUtilTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/fs/VolumeUtilTest.java
@@ -43,8 +43,8 @@ import org.junit.rules.TemporaryFolder;
public class VolumeUtilTest {
@Rule
- public TemporaryFolder tempFolder = new TemporaryFolder(
- new File(System.getProperty("user.dir") + "/target"));
+ public TemporaryFolder tempFolder =
+ new TemporaryFolder(new File(System.getProperty("user.dir") + "/target"));
@Test
public void testSwitchVolume() {
diff --git a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/BaseHostRegexTableLoadBalancerTest.java b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/BaseHostRegexTableLoadBalancerTest.java
index 51cf777..23ad6ad 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/BaseHostRegexTableLoadBalancerTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/BaseHostRegexTableLoadBalancerTest.java
@@ -219,8 +219,8 @@ public abstract class BaseHostRegexTableLoadBalancerTest extends HostRegexTableL
protected static final Table BAZ = new Table("baz", "3");
protected final TestInstance instance = new TestInstance();
- protected final TestServerConfigurationFactory factory = new TestServerConfigurationFactory(
- instance);
+ protected final TestServerConfigurationFactory factory =
+ new TestServerConfigurationFactory(instance);
protected final Map<String,String> servers = new HashMap<>(15);
protected final SortedMap<TServerInstance,TabletServerStatus> allTabletServers = new TreeMap<>();
protected final Map<String,List<KeyExtent>> tableExtents = new HashMap<>(3);
diff --git a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/ChaoticLoadBalancerTest.java b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/ChaoticLoadBalancerTest.java
index 9852912..e3c9bcc 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/ChaoticLoadBalancerTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/ChaoticLoadBalancerTest.java
@@ -115,8 +115,8 @@ public class ChaoticLoadBalancerTest {
assertEquals(assignments.size(), metadataTable.size());
}
- SortedMap<TServerInstance,TabletServerStatus> getAssignments(
- Map<TServerInstance,FakeTServer> servers) {
+ SortedMap<TServerInstance,TabletServerStatus>
+ getAssignments(Map<TServerInstance,FakeTServer> servers) {
SortedMap<TServerInstance,TabletServerStatus> result = new TreeMap<>();
for (Entry<TServerInstance,FakeTServer> entry : servers.entrySet()) {
result.put(entry.getKey(), entry.getValue().getStatus(entry.getKey()));
diff --git a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancerTest.java b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancerTest.java
index 740312c..e2c74fa 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancerTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancerTest.java
@@ -161,8 +161,8 @@ public class DefaultLoadBalancerTest {
}
}
- SortedMap<TServerInstance,TabletServerStatus> getAssignments(
- Map<TServerInstance,FakeTServer> servers) {
+ SortedMap<TServerInstance,TabletServerStatus>
+ getAssignments(Map<TServerInstance,FakeTServer> servers) {
SortedMap<TServerInstance,TabletServerStatus> result = new TreeMap<>();
for (Entry<TServerInstance,FakeTServer> entry : servers.entrySet()) {
result.put(entry.getKey(), entry.getValue().getStatus(entry.getKey()));
diff --git a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/GroupBalancerTest.java b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/GroupBalancerTest.java
index 0a2a4e2..dd9d8cd 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/GroupBalancerTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/GroupBalancerTest.java
@@ -88,8 +88,8 @@ public class GroupBalancerTest {
new Function<Map.Entry<KeyExtent,TServerInstance>,Pair<KeyExtent,Location>>() {
@Override
- public Pair<KeyExtent,Location> apply(
- final Entry<KeyExtent,TServerInstance> input) {
+ public Pair<KeyExtent,Location>
+ apply(final Entry<KeyExtent,TServerInstance> input) {
return new Pair<>(input.getKey(), new Location(input.getValue()));
}
});
diff --git a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancerTest.java b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancerTest.java
index 20027ab..60d9b0c 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancerTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancerTest.java
@@ -142,8 +142,8 @@ public class HostRegexTableLoadBalancerTest extends BaseHostRegexTableLoadBalanc
@Test
public void testSplitCurrentByRegexUsingHostname() {
init(factory);
- Map<String,SortedMap<TServerInstance,TabletServerStatus>> groups = this
- .splitCurrentByRegex(createCurrent(15));
+ Map<String,SortedMap<TServerInstance,TabletServerStatus>> groups =
+ this.splitCurrentByRegex(createCurrent(15));
assertEquals(3, groups.size());
assertTrue(groups.containsKey(FOO.getTableName()));
SortedMap<TServerInstance,TabletServerStatus> fooHosts = groups.get(FOO.getTableName());
@@ -207,8 +207,8 @@ public class HostRegexTableLoadBalancerTest extends BaseHostRegexTableLoadBalanc
};
}
});
- Map<String,SortedMap<TServerInstance,TabletServerStatus>> groups = this
- .splitCurrentByRegex(createCurrent(15));
+ Map<String,SortedMap<TServerInstance,TabletServerStatus>> groups =
+ this.splitCurrentByRegex(createCurrent(15));
// Groups foo, bar, and the default pool which contains all known hosts
assertEquals(3, groups.size());
@@ -295,8 +295,8 @@ public class HostRegexTableLoadBalancerTest extends BaseHostRegexTableLoadBalanc
}
});
assertTrue(isIpBasedRegex());
- Map<String,SortedMap<TServerInstance,TabletServerStatus>> groups = this
- .splitCurrentByRegex(createCurrent(15));
+ Map<String,SortedMap<TServerInstance,TabletServerStatus>> groups =
+ this.splitCurrentByRegex(createCurrent(15));
assertEquals(3, groups.size());
assertTrue(groups.containsKey(FOO.getTableName()));
SortedMap<TServerInstance,TabletServerStatus> fooHosts = groups.get(FOO.getTableName());
diff --git a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/TableLoadBalancerTest.java b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/TableLoadBalancerTest.java
index 891991a..cee0c31 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/TableLoadBalancerTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/TableLoadBalancerTest.java
@@ -51,8 +51,8 @@ import com.google.common.collect.ImmutableMap;
public class TableLoadBalancerTest {
- private static Map<String,String> TABLE_ID_MAP = ImmutableMap.of("t1", "a1", "t2", "b12", "t3",
- "c4");
+ private static Map<String,String> TABLE_ID_MAP =
+ ImmutableMap.of("t1", "a1", "t2", "b12", "t3", "c4");
static private TServerInstance mkts(String address, String session) throws Exception {
return new TServerInstance(HostAndPort.fromParts(address, 1234), session);
diff --git a/server/base/src/test/java/org/apache/accumulo/server/problems/ProblemReportTest.java b/server/base/src/test/java/org/apache/accumulo/server/problems/ProblemReportTest.java
index 584144b..e73e888 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/problems/ProblemReportTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/problems/ProblemReportTest.java
@@ -86,16 +86,16 @@ public class ProblemReportTest {
ProblemReport r2 = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER, null);
assertTrue(r.equals(r2));
assertTrue(r2.equals(r));
- ProblemReport rx1 = new ProblemReport(TABLE_ID + "x", ProblemType.FILE_READ, RESOURCE, SERVER,
- null);
+ ProblemReport rx1 =
+ new ProblemReport(TABLE_ID + "x", ProblemType.FILE_READ, RESOURCE, SERVER, null);
assertFalse(r.equals(rx1));
ProblemReport rx2 = new ProblemReport(TABLE_ID, ProblemType.FILE_WRITE, RESOURCE, SERVER, null);
assertFalse(r.equals(rx2));
- ProblemReport rx3 = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE + "x", SERVER,
- null);
+ ProblemReport rx3 =
+ new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE + "x", SERVER, null);
assertFalse(r.equals(rx3));
- ProblemReport re1 = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER + "x",
- null);
+ ProblemReport re1 =
+ new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER + "x", null);
assertTrue(r.equals(re1));
ProblemReport re2 = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER,
new IllegalArgumentException("yikes"));
@@ -113,8 +113,8 @@ public class ProblemReportTest {
r = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER, null);
ProblemReport r2 = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER, null);
assertEquals(r.hashCode(), r2.hashCode());
- ProblemReport re1 = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER + "x",
- null);
+ ProblemReport re1 =
+ new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER + "x", null);
assertEquals(r.hashCode(), re1.hashCode());
ProblemReport re2 = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER,
new IllegalArgumentException("yikes"));
diff --git a/server/base/src/test/java/org/apache/accumulo/server/replication/StatusCombinerTest.java b/server/base/src/test/java/org/apache/accumulo/server/replication/StatusCombinerTest.java
index bbfdcad..6fd7527 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/replication/StatusCombinerTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/replication/StatusCombinerTest.java
@@ -96,10 +96,10 @@ public class StatusCombinerTest {
Status newFile = StatusUtil.fileCreated(100), firstSync = StatusUtil.ingestedUntil(100),
secondSync = StatusUtil.ingestedUntil(200);
- Status order1 = combiner.typedReduce(key,
- Arrays.asList(newFile, firstSync, secondSync).iterator()),
- order2 = combiner.typedReduce(key,
- Arrays.asList(secondSync, firstSync, newFile).iterator());
+ Status order1 =
+ combiner.typedReduce(key, Arrays.asList(newFile, firstSync, secondSync).iterator()),
+ order2 =
+ combiner.typedReduce(key, Arrays.asList(secondSync, firstSync, newFile).iterator());
assertEquals(order1, order2);
}
@@ -110,10 +110,10 @@ public class StatusCombinerTest {
firstSync = StatusUtil.ingestedUntil(builder, 100),
secondSync = StatusUtil.ingestedUntil(builder, 200);
- Status order1 = combiner.typedReduce(key,
- Arrays.asList(newFile, firstSync, secondSync).iterator()),
- order2 = combiner.typedReduce(key,
- Arrays.asList(secondSync, firstSync, newFile).iterator());
+ Status order1 =
+ combiner.typedReduce(key, Arrays.asList(newFile, firstSync, secondSync).iterator()),
+ order2 =
+ combiner.typedReduce(key, Arrays.asList(secondSync, firstSync, newFile).iterator());
assertEquals(order1, order2);
}
@@ -123,10 +123,10 @@ public class StatusCombinerTest {
Status newFile = StatusUtil.fileCreated(100), firstSync = StatusUtil.ingestedUntil(100),
secondSync = StatusUtil.ingestedUntil(200);
- Status order1 = combiner.typedReduce(key,
- Arrays.asList(newFile, firstSync, secondSync).iterator()),
- order2 = combiner.typedReduce(key,
- Arrays.asList(newFile, secondSync, firstSync).iterator());
+ Status order1 =
+ combiner.typedReduce(key, Arrays.asList(newFile, firstSync, secondSync).iterator()),
+ order2 =
+ combiner.typedReduce(key, Arrays.asList(newFile, secondSync, firstSync).iterator());
assertEquals(order1, order2);
... 9701 lines suppressed ...