accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [38/50] [abbrv] accumulo git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/accumulo
Date Tue, 02 Dec 2014 20:37:26 GMT
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/accumulo

Conflicts:
	minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterStartStopTest.java
	test/src/test/java/org/apache/accumulo/test/MetaConstraintRetryIT.java
	test/src/test/java/org/apache/accumulo/test/MultiTableBatchWriterIT.java
	test/src/test/java/org/apache/accumulo/test/functional/MasterAssignmentIT.java


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/865c9bf2
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/865c9bf2
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/865c9bf2

Branch: refs/heads/metrics2
Commit: 865c9bf2f1cf628f11dffa8c828f0160c4c215ba
Parents: 74e7103 42c25fa
Author: Josh Elser <elserj@apache.org>
Authored: Tue Nov 25 19:28:14 2014 -0500
Committer: Josh Elser <elserj@apache.org>
Committed: Tue Nov 25 19:28:14 2014 -0500

----------------------------------------------------------------------
 .../apache/accumulo/core/cli/ClientOpts.java    |   2 +-
 .../accumulo/core/client/ZooKeeperInstance.java |  13 +-
 .../core/client/impl/BatchWriterImpl.java       |  10 +-
 .../client/impl/ClientConfigurationHelper.java  | 143 -----------
 .../core/client/impl/ClientContext.java         | 229 ++++++++++++++++++
 .../core/client/impl/ConditionalWriterImpl.java |  48 ++--
 .../core/client/impl/ConnectorImpl.java         |  73 +++---
 .../client/impl/InstanceOperationsImpl.java     |  65 ++---
 .../accumulo/core/client/impl/MasterClient.java |  45 ++--
 .../client/impl/MultiTableBatchWriterImpl.java  |  20 +-
 .../client/impl/NamespaceOperationsImpl.java    |  42 ++--
 .../core/client/impl/ReplicationClient.java     |  52 ++--
 .../client/impl/ReplicationOperationsImpl.java  |  39 +--
 .../core/client/impl/RootTabletLocator.java     |  29 ++-
 .../accumulo/core/client/impl/ScannerImpl.java  |  16 +-
 .../core/client/impl/ScannerIterator.java       |  20 +-
 .../client/impl/SecurityOperationsImpl.java     |  54 ++---
 .../accumulo/core/client/impl/ServerClient.java |  37 ++-
 .../core/client/impl/TableOperationsImpl.java   | 169 ++++++-------
 .../core/client/impl/TabletLocator.java         |  22 +-
 .../core/client/impl/TabletLocatorImpl.java     |  61 +++--
 .../client/impl/TabletServerBatchDeleter.java   |  16 +-
 .../client/impl/TabletServerBatchReader.java    |  16 +-
 .../impl/TabletServerBatchReaderIterator.java   |  45 ++--
 .../client/impl/TabletServerBatchWriter.java    |  45 ++--
 .../core/client/impl/ThriftScanner.java         |  52 ++--
 .../core/client/impl/ThriftTransportKey.java    |   5 +-
 .../core/client/impl/ThriftTransportPool.java   |  14 +-
 .../core/client/impl/TimeoutTabletLocator.java  |  18 +-
 .../accumulo/core/client/impl/Writer.java       |  38 ++-
 .../client/mock/impl/MockTabletLocator.java     |  11 +-
 .../core/metadata/MetadataLocationObtainer.java |  32 +--
 .../core/metadata/MetadataServicer.java         |  18 +-
 .../core/metadata/ServicerForMetadataTable.java |   7 +-
 .../core/metadata/ServicerForRootTable.java     |   8 +-
 .../core/metadata/ServicerForUserTables.java    |   7 +-
 .../core/metadata/TableMetadataServicer.java    |  13 +-
 .../AccumuloReplicationReplayer.java            |  11 +-
 .../apache/accumulo/core/util/ThriftUtil.java   |  42 ++--
 .../impl/ClientConfigurationHelperTest.java     | 110 ---------
 .../core/client/impl/ClientContextTest.java     | 109 +++++++++
 .../core/client/impl/RootTabletLocatorTest.java |  13 +-
 .../core/client/impl/ScannerImplTest.java       |   7 +-
 .../client/impl/TableOperationsImplTest.java    |   6 +-
 .../core/client/impl/TabletLocatorImplTest.java | 236 ++++++++++---------
 .../core/metadata/MetadataServicerTest.java     |  15 +-
 .../ReplicationOperationsImplTest.java          |  14 +-
 .../core/client/mapred/AbstractInputFormat.java |   9 +-
 .../client/mapreduce/AbstractInputFormat.java   |   9 +-
 .../mapreduce/lib/impl/InputConfigurator.java   |  10 +-
 .../impl/MiniAccumuloClusterImpl.java           |   8 +-
 .../MiniAccumuloClusterStartStopTest.java       |  38 ++-
 .../accumulo/server/AccumuloServerContext.java  |  67 ++++++
 .../accumulo/server/client/BulkImporter.java    |  97 +++-----
 .../server/client/ClientServiceHandler.java     |  26 +-
 .../accumulo/server/client/HdfsZooInstance.java |   3 +-
 .../server/conf/ServerConfigurationFactory.java |   7 +-
 .../server/conf/TableConfiguration.java         |  13 +-
 .../apache/accumulo/server/fs/VolumeUtil.java   |  18 +-
 .../apache/accumulo/server/init/Initialize.java |  11 +-
 .../accumulo/server/master/LiveTServerSet.java  |  70 +++---
 .../master/balancer/TableLoadBalancer.java      |   3 +-
 .../server/master/balancer/TabletBalancer.java  |  13 +-
 .../server/master/state/MetaDataStateStore.java |  30 +--
 .../master/state/MetaDataTableScanner.java      |  26 +-
 .../master/state/RootTabletStateStore.java      |  14 +-
 .../server/master/state/TabletStateStore.java   |  14 +-
 .../accumulo/server/problems/ProblemReport.java |  14 +-
 .../problems/ProblemReportingIterator.java      |  12 +-
 .../server/problems/ProblemReports.java         |  27 ++-
 .../server/replication/ReplicationUtil.java     |  65 ++---
 .../security/AuditedSecurityOperation.java      |  28 +--
 .../server/security/SecurityOperation.java      |  31 +--
 .../server/security/SystemCredentials.java      |  16 --
 .../org/apache/accumulo/server/util/Admin.java  |  72 +++---
 .../server/util/FindOfflineTablets.java         |  23 +-
 .../accumulo/server/util/ListVolumesUsed.java   |  16 +-
 .../server/util/MasterMetadataUtil.java         |  43 ++--
 .../accumulo/server/util/MetadataTableUtil.java | 176 +++++++-------
 .../accumulo/server/util/RandomizeVolumes.java  |   7 +-
 .../util/RemoveEntriesForMissingFiles.java      |  25 +-
 .../server/util/ReplicationTableUtil.java       |  22 +-
 .../accumulo/server/util/TServerUtils.java      |  18 +-
 .../server/util/VerifyTabletAssignments.java    |  31 +--
 .../server/client/BulkImporterTest.java         |  29 ++-
 .../server/conf/TableConfigurationTest.java     |  13 +-
 .../master/balancer/TableLoadBalancerTest.java  |  28 ++-
 .../problems/ProblemReportingIteratorTest.java  |   6 +-
 .../server/security/SystemCredentialsTest.java  |  17 +-
 .../server/util/ReplicationTableUtilTest.java   |   9 +-
 .../gc/GarbageCollectWriteAheadLogs.java        |  40 ++--
 .../accumulo/gc/SimpleGarbageCollector.java     | 113 +++------
 .../CloseWriteAheadLogReferences.java           |  46 ++--
 .../gc/GarbageCollectWriteAheadLogsTest.java    |  51 ++--
 .../accumulo/gc/SimpleGarbageCollectorTest.java |  18 +-
 .../CloseWriteAheadLogReferencesTest.java       |  38 ++-
 .../java/org/apache/accumulo/master/Master.java | 146 +++++++-----
 .../master/MasterClientServiceHandler.java      |  46 +---
 .../accumulo/master/TabletGroupWatcher.java     |   9 +-
 .../master/metrics/ReplicationMetrics.java      |  78 +-----
 .../MasterReplicationCoordinator.java           |   5 +-
 .../master/replication/ReplicationDriver.java   |   2 +-
 .../accumulo/master/replication/WorkDriver.java |   6 +-
 .../accumulo/master/replication/WorkMaker.java  |  11 +-
 .../accumulo/master/tableOps/BulkImport.java    |  22 +-
 .../master/tableOps/CancelCompactions.java      |  11 +-
 .../master/tableOps/ChangeTableState.java       |   9 +-
 .../accumulo/master/tableOps/CloneTable.java    |  30 +--
 .../accumulo/master/tableOps/CompactRange.java  |  26 +-
 .../master/tableOps/CreateNamespace.java        |   5 +-
 .../accumulo/master/tableOps/CreateTable.java   |  13 +-
 .../master/tableOps/DeleteNamespace.java        |   3 +-
 .../accumulo/master/tableOps/DeleteTable.java   |  20 +-
 .../accumulo/master/tableOps/ExportTable.java   |  34 ++-
 .../accumulo/master/tableOps/ImportTable.java   |  16 +-
 .../accumulo/master/tableOps/RenameTable.java   |  10 +-
 .../accumulo/master/tableOps/TableRangeOp.java  |  13 +-
 .../apache/accumulo/master/TestMergeState.java  |  10 +-
 .../MasterReplicationCoordinatorTest.java       |   4 +-
 .../master/replication/WorkMakerTest.java       |  17 +-
 .../accumulo/monitor/EmbeddedWebServer.java     |   2 +-
 .../org/apache/accumulo/monitor/Monitor.java    |  37 ++-
 .../accumulo/monitor/servlets/BasicServlet.java |  13 +-
 .../accumulo/monitor/servlets/LogServlet.java   |   2 +-
 .../monitor/servlets/MasterServlet.java         |   9 +-
 .../monitor/servlets/OperationServlet.java      |  10 +-
 .../monitor/servlets/ProblemServlet.java        |   6 +-
 .../monitor/servlets/ReplicationServlet.java    |  24 +-
 .../monitor/servlets/TServersServlet.java       |   9 +-
 .../monitor/servlets/TablesServlet.java         |  12 +-
 .../accumulo/monitor/servlets/VisServlet.java   |   2 +-
 .../accumulo/monitor/servlets/XMLServlet.java   |   3 +-
 .../accumulo/monitor/servlets/trace/Basic.java  |   2 +-
 .../apache/accumulo/tserver/FileManager.java    |  44 ++--
 .../apache/accumulo/tserver/TabletServer.java   |  91 ++++---
 .../tserver/TabletServerResourceManager.java    |  22 +-
 .../tserver/log/TabletServerLogger.java         |  11 +-
 .../replication/AccumuloReplicaSystem.java      |  47 ++--
 .../BatchWriterReplicationReplayer.java         |  14 +-
 .../replication/ReplicationServicerHandler.java |  35 ++-
 .../tserver/replication/ReplicationWorker.java  |   2 +-
 .../accumulo/tserver/tablet/Compactor.java      |  19 +-
 .../tserver/tablet/DatafileManager.java         |  24 +-
 .../accumulo/tserver/tablet/MinorCompactor.java |  18 +-
 .../apache/accumulo/tserver/tablet/Tablet.java  |  57 +++--
 .../LargestFirstMemoryManagerTest.java          |  28 ++-
 .../BatchWriterReplicationReplayerTest.java     |  41 +++-
 .../java/org/apache/accumulo/shell/Shell.java   |  17 +-
 .../apache/accumulo/test/GetMasterStats.java    |  10 +-
 .../apache/accumulo/test/WrongTabletTest.java   |  18 +-
 .../continuous/ContinuousStatsCollector.java    |  10 +-
 .../accumulo/test/functional/ZombieTServer.java |  14 +-
 .../metadata/MetadataBatchScanTest.java         |  11 +-
 .../performance/scan/CollectTabletStats.java    |  18 +-
 .../test/performance/thrift/NullTserver.java    |  23 +-
 .../test/randomwalk/concurrent/Shutdown.java    |  10 +-
 .../test/randomwalk/concurrent/StartAll.java    |  10 +-
 .../randomwalk/security/WalkingSecurity.java    |   9 +-
 .../server/security/SystemCredentialsIT.java    |   2 +-
 .../test/MasterRepairsDualAssignmentIT.java     |   7 +-
 .../accumulo/test/MetaConstraintRetryIT.java    |   4 +-
 .../accumulo/test/MultiTableBatchWriterIT.java  |   7 +-
 .../test/TableConfigurationUpdateIT.java        |   2 +-
 .../org/apache/accumulo/test/TotalQueuedIT.java |  12 +-
 .../accumulo/test/functional/AbstractMacIT.java |   4 +
 .../functional/BalanceAfterCommsFailureIT.java  |   6 +-
 .../BalanceInPresenceOfOfflineTableIT.java      |   3 +-
 .../test/functional/ConfigurableMacIT.java      |   7 +
 .../test/functional/DynamicThreadPoolsIT.java   |   3 +-
 .../test/functional/MasterAssignmentIT.java     |   9 +-
 .../test/functional/MetadataMaxFilesIT.java     |   6 +-
 .../functional/SimpleBalancerFairnessIT.java    |   4 +-
 .../accumulo/test/functional/SimpleMacIT.java   |   7 +-
 .../test/functional/SplitRecoveryIT.java        |  76 +++---
 ...bageCollectorCommunicatesWithTServersIT.java |  17 +-
 .../UnorderedWorkAssignerReplicationIT.java     |   5 +
 176 files changed, 2534 insertions(+), 2544 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/865c9bf2/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
----------------------------------------------------------------------
diff --cc minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
index 237c37c,448746f..3fcd88b
--- a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
+++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
@@@ -59,9 -59,9 +59,10 @@@ import org.apache.accumulo.core.client.
  import org.apache.accumulo.core.client.Connector;
  import org.apache.accumulo.core.client.Instance;
  import org.apache.accumulo.core.client.ZooKeeperInstance;
+ import org.apache.accumulo.core.client.impl.ClientContext;
  import org.apache.accumulo.core.client.impl.MasterClient;
  import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
 +import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
  import org.apache.accumulo.core.client.security.tokens.PasswordToken;
  import org.apache.accumulo.core.conf.ConfigurationCopy;
  import org.apache.accumulo.core.conf.Property;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/865c9bf2/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterStartStopTest.java
----------------------------------------------------------------------
diff --cc minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterStartStopTest.java
index 1f3b2e5,e60b41c..6e8d936
--- a/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterStartStopTest.java
+++ b/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterStartStopTest.java
@@@ -19,41 -20,56 +20,56 @@@ import java.io.File
  import java.io.IOException;
  
  import org.apache.accumulo.core.client.Connector;
+ import org.apache.commons.io.FileUtils;
+ import org.apache.log4j.Logger;
  import org.junit.After;
  import org.junit.Before;
+ import org.junit.Rule;
  import org.junit.Test;
- import org.junit.rules.TemporaryFolder;
+ import org.junit.rules.TestName;
  
  public class MiniAccumuloClusterStartStopTest {
+   
+   private static final Logger log = Logger.getLogger(MiniAccumuloClusterStartStopTest.class);
+   private File baseDir = new File(System.getProperty("user.dir") + "/target/mini-tests/"
+ this.getClass().getName());
+   private MiniAccumuloCluster accumulo;
  
-   public TemporaryFolder folder = new TemporaryFolder();
- 
+   @Rule
+   public TestName testName = new TestName();
+   
    @Before
-   public void createMacDir() throws IOException {
-     folder.create();
+   public void setupTestCluster() throws IOException {
+     baseDir.mkdirs();
+     File testDir = new File(baseDir, testName.getMethodName());
+     FileUtils.deleteQuietly(testDir);
+     testDir.mkdir();
+     accumulo = new MiniAccumuloCluster(testDir, "superSecret");
    }
 -  
 +
    @After
-   public void deleteMacDir() {
-     folder.delete();
+   public void teardownTestCluster() {
+     if (accumulo != null) {
+       try {
+         accumulo.stop();
+       } catch (IOException | InterruptedException e) {
+         log.warn("Failure during tear down", e);
+       }
+     }
    }
 -  
 +
    @Test
 -  public void multipleStartsThrowsAnException() throws Exception {
 +  public void multipleStartsDoesntThrowAnException() throws Exception {
-     MiniAccumuloCluster accumulo = new MiniAccumuloCluster(folder.getRoot(), "superSecret");
- 
      // In 1.6.0, multiple start's did not throw an exception as advertised
 -      accumulo.start();
++    accumulo.start();
      try {
        accumulo.start();
-       accumulo.start();
      } finally {
        accumulo.stop();
      }
    }
 -  
 +
    @Test
    public void multipleStopsIsAllowed() throws Exception {
-     MiniAccumuloCluster accumulo = new MiniAccumuloCluster(folder.getRoot(), "superSecret");
      accumulo.start();
  
      Connector conn = accumulo.getConnector("root", "superSecret");

http://git-wip-us.apache.org/repos/asf/accumulo/blob/865c9bf2/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/865c9bf2/test/src/test/java/org/apache/accumulo/test/MetaConstraintRetryIT.java
----------------------------------------------------------------------
diff --cc test/src/test/java/org/apache/accumulo/test/MetaConstraintRetryIT.java
index e02eec9,7d1c318..c5fd08f
--- a/test/src/test/java/org/apache/accumulo/test/MetaConstraintRetryIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/MetaConstraintRetryIT.java
@@@ -17,7 -17,9 +17,8 @@@
  
  package org.apache.accumulo.test;
  
+ import org.apache.accumulo.core.client.impl.ClientContext;
  import org.apache.accumulo.core.client.impl.Writer;
 -import org.apache.accumulo.core.client.security.tokens.PasswordToken;
  import org.apache.accumulo.core.data.KeyExtent;
  import org.apache.accumulo.core.data.Mutation;
  import org.apache.accumulo.core.metadata.MetadataTable;
@@@ -42,8 -44,9 +43,9 @@@ public class MetaConstraintRetryIT exte
  
      getConnector().securityOperations().grantTablePermission("root", MetadataTable.NAME,
TablePermission.WRITE);
  
 -    Credentials credentials = new Credentials("root", new PasswordToken(ROOT_PASSWORD));
 -    ClientContext context = new ClientContext(getConnector().getInstance(), credentials,
getClientConfig());
 +    Credentials credentials = new Credentials(getPrincipal(), getToken());
-     Writer w = new Writer(super.getConnector().getInstance(), credentials, MetadataTable.ID);
++    ClientContext context = new ClientContext(getConnector().getInstance(), credentials,
cluster.getClientConfig());
+     Writer w = new Writer(context, MetadataTable.ID);
      KeyExtent extent = new KeyExtent(new Text("5"), null, null);
  
      Mutation m = new Mutation(extent.getMetadataEntry());

http://git-wip-us.apache.org/repos/asf/accumulo/blob/865c9bf2/test/src/test/java/org/apache/accumulo/test/MultiTableBatchWriterIT.java
----------------------------------------------------------------------
diff --cc test/src/test/java/org/apache/accumulo/test/MultiTableBatchWriterIT.java
index 69c05d7,f5e1469..ce56472
--- a/test/src/test/java/org/apache/accumulo/test/MultiTableBatchWriterIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/MultiTableBatchWriterIT.java
@@@ -33,14 -34,17 +34,16 @@@ import org.apache.accumulo.core.client.
  import org.apache.accumulo.core.client.TableNotFoundException;
  import org.apache.accumulo.core.client.TableOfflineException;
  import org.apache.accumulo.core.client.admin.TableOperations;
+ import org.apache.accumulo.core.client.impl.ClientContext;
  import org.apache.accumulo.core.client.impl.MultiTableBatchWriterImpl;
 -import org.apache.accumulo.core.client.security.tokens.PasswordToken;
  import org.apache.accumulo.core.data.Key;
  import org.apache.accumulo.core.data.Mutation;
  import org.apache.accumulo.core.data.Range;
  import org.apache.accumulo.core.data.Value;
  import org.apache.accumulo.core.security.Authorizations;
  import org.apache.accumulo.core.security.Credentials;
 -import org.apache.accumulo.test.functional.SimpleMacIT;
 +import org.apache.accumulo.harness.AccumuloClusterIT;
+ import org.apache.commons.configuration.ConfigurationException;
  import org.junit.Assert;
  import org.junit.Before;
  import org.junit.Test;
@@@ -64,8 -68,13 +67,8 @@@ public class MultiTableBatchWriterIT ex
    }
  
    public MultiTableBatchWriter getMultiTableBatchWriter(long cacheTimeoutInSeconds) {
-     return new MultiTableBatchWriterImpl(connector.getInstance(), new Credentials("root",
getToken()),
-         new BatchWriterConfig(), cacheTimeoutInSeconds, TimeUnit.SECONDS);
 -    try {
 -      ClientContext context = new ClientContext(connector.getInstance(), new Credentials("root",
new PasswordToken(ROOT_PASSWORD)), getClientConfig());
 -      return new MultiTableBatchWriterImpl(context, new BatchWriterConfig(), cacheTimeoutInSeconds,
TimeUnit.SECONDS);
 -    } catch (FileNotFoundException | ConfigurationException e) {
 -      Assert.fail(e.getMessage());
 -      return null;
 -    }
++    ClientContext context = new ClientContext(connector.getInstance(), new Credentials(getPrincipal(),
getToken()), getCluster().getClientConfig());
++    return new MultiTableBatchWriterImpl(context, new BatchWriterConfig(), cacheTimeoutInSeconds,
TimeUnit.SECONDS);
    }
  
    @Test

http://git-wip-us.apache.org/repos/asf/accumulo/blob/865c9bf2/test/src/test/java/org/apache/accumulo/test/TableConfigurationUpdateIT.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/865c9bf2/test/src/test/java/org/apache/accumulo/test/functional/AbstractMacIT.java
----------------------------------------------------------------------
diff --cc test/src/test/java/org/apache/accumulo/test/functional/AbstractMacIT.java
index b0dd816,3c4cc2a..a80dac7
--- a/test/src/test/java/org/apache/accumulo/test/functional/AbstractMacIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/AbstractMacIT.java
@@@ -23,9 -24,9 +23,10 @@@ import org.apache.accumulo.core.cli.Bat
  import org.apache.accumulo.core.cli.ScannerOpts;
  import org.apache.accumulo.core.client.AccumuloException;
  import org.apache.accumulo.core.client.AccumuloSecurityException;
+ import org.apache.accumulo.core.client.ClientConfiguration;
  import org.apache.accumulo.core.client.Connector;
  import org.apache.accumulo.core.conf.Property;
 +import org.apache.accumulo.harness.AccumuloIT;
  import org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl;
  import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
  import org.apache.accumulo.test.util.CertUtils;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/865c9bf2/test/src/test/java/org/apache/accumulo/test/functional/BalanceInPresenceOfOfflineTableIT.java
----------------------------------------------------------------------
diff --cc test/src/test/java/org/apache/accumulo/test/functional/BalanceInPresenceOfOfflineTableIT.java
index d45b186,887aee4..a9ea5db
--- a/test/src/test/java/org/apache/accumulo/test/functional/BalanceInPresenceOfOfflineTableIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/BalanceInPresenceOfOfflineTableIT.java
@@@ -22,25 -22,15 +22,26 @@@ import java.util.Map
  import java.util.SortedSet;
  import java.util.TreeSet;
  
 +import org.apache.accumulo.core.cli.BatchWriterOpts;
 +import org.apache.accumulo.core.cli.ScannerOpts;
  import org.apache.accumulo.core.client.AccumuloException;
  import org.apache.accumulo.core.client.AccumuloSecurityException;
 +import org.apache.accumulo.core.client.Connector;
 +import org.apache.accumulo.core.client.Instance;
  import org.apache.accumulo.core.client.TableExistsException;
  import org.apache.accumulo.core.client.TableNotFoundException;
 -import org.apache.accumulo.core.client.Connector;
 +import org.apache.accumulo.core.client.ZooKeeperInstance;
++import org.apache.accumulo.core.client.impl.ClientContext;
 +import org.apache.accumulo.core.client.impl.MasterClient;
 +import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
  import org.apache.accumulo.core.conf.Property;
 +import org.apache.accumulo.core.master.thrift.MasterClientService;
  import org.apache.accumulo.core.master.thrift.MasterMonitorInfo;
  import org.apache.accumulo.core.master.thrift.TableInfo;
 +import org.apache.accumulo.core.trace.Tracer;
 +import org.apache.accumulo.harness.AccumuloClusterIT;
  import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 +import org.apache.accumulo.server.security.SystemCredentials;
  import org.apache.accumulo.test.TestIngest;
  import org.apache.accumulo.test.VerifyIngest;
  import org.apache.commons.lang.math.NumberUtils;
@@@ -137,22 -115,7 +138,22 @@@ public class BalanceInPresenceOfOffline
        currentWait *= 2;
  
        log.debug("fetch the list of tablets assigned to each tserver.");
 -      MasterMonitorInfo stats = getCluster().getMasterMonitorInfo();
 +
 +      MasterClientService.Iface client = null;
 +      MasterMonitorInfo stats = null;
 +      try {
 +        Instance instance = new ZooKeeperInstance(cluster.getClientConfig());
-         client = MasterClient.getConnectionWithRetry(instance);
++        client = MasterClient.getConnectionWithRetry(new ClientContext(instance, SystemCredentials.get(instance),
cluster.getClientConfig()));
 +        stats = client.getMasterStats(Tracer.traceInfo(), SystemCredentials.get(instance).toThrift(instance));
 +      } catch (ThriftSecurityException exception) {
 +        throw new AccumuloSecurityException(exception);
 +      } catch (TException exception) {
 +        throw new AccumuloException(exception);
 +      } finally {
 +        if (client != null) {
 +          MasterClient.close(client);
 +        }
 +      }
  
        if (stats.getTServerInfoSize() < 2) {
          log.debug("we need >= 2 servers. sleeping for " + currentWait + "ms");

http://git-wip-us.apache.org/repos/asf/accumulo/blob/865c9bf2/test/src/test/java/org/apache/accumulo/test/functional/ConfigurableMacIT.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/865c9bf2/test/src/test/java/org/apache/accumulo/test/functional/DynamicThreadPoolsIT.java
----------------------------------------------------------------------
diff --cc test/src/test/java/org/apache/accumulo/test/functional/DynamicThreadPoolsIT.java
index f96f8f8,ea71c48..47f49ba
--- a/test/src/test/java/org/apache/accumulo/test/functional/DynamicThreadPoolsIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/DynamicThreadPoolsIT.java
@@@ -20,10 -20,10 +20,11 @@@ import static org.junit.Assert.fail
  
  import java.util.Collections;
  
 +import org.apache.accumulo.core.cli.BatchWriterOpts;
  import org.apache.accumulo.core.client.Connector;
+ import org.apache.accumulo.core.client.impl.ClientContext;
  import org.apache.accumulo.core.client.impl.MasterClient;
 -import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 +import org.apache.accumulo.core.conf.AccumuloConfiguration;
  import org.apache.accumulo.core.conf.Property;
  import org.apache.accumulo.core.master.thrift.MasterClientService;
  import org.apache.accumulo.core.master.thrift.MasterMonitorInfo;
@@@ -94,7 -71,7 +95,7 @@@ public class DynamicThreadPoolsIT exten
        MasterClientService.Iface client = null;
        MasterMonitorInfo stats = null;
        try {
-         client = MasterClient.getConnectionWithRetry(c.getInstance());
 -        client = MasterClient.getConnectionWithRetry(new ClientContext(c.getInstance(),
creds, getClientConfig()));
++        client = MasterClient.getConnectionWithRetry(new ClientContext(c.getInstance(),
creds, getCluster().getClientConfig()));
          stats = client.getMasterStats(Tracer.traceInfo(), creds.toThrift(c.getInstance()));
        } finally {
          if (client != null)

http://git-wip-us.apache.org/repos/asf/accumulo/blob/865c9bf2/test/src/test/java/org/apache/accumulo/test/functional/MasterAssignmentIT.java
----------------------------------------------------------------------
diff --cc test/src/test/java/org/apache/accumulo/test/functional/MasterAssignmentIT.java
index c330562,1160916..ab6fdbd
--- a/test/src/test/java/org/apache/accumulo/test/functional/MasterAssignmentIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/MasterAssignmentIT.java
@@@ -23,14 -25,16 +25,16 @@@ import java.io.FileNotFoundException
  import org.apache.accumulo.core.client.BatchWriter;
  import org.apache.accumulo.core.client.BatchWriterConfig;
  import org.apache.accumulo.core.client.Connector;
+ import org.apache.accumulo.core.client.impl.ClientContext;
 -import org.apache.accumulo.core.client.security.tokens.PasswordToken;
  import org.apache.accumulo.core.data.KeyExtent;
  import org.apache.accumulo.core.data.Mutation;
  import org.apache.accumulo.core.data.Range;
  import org.apache.accumulo.core.security.Credentials;
  import org.apache.accumulo.fate.util.UtilWaitThread;
 +import org.apache.accumulo.harness.AccumuloClusterIT;
  import org.apache.accumulo.server.master.state.MetaDataTableScanner;
  import org.apache.accumulo.server.master.state.TabletLocationState;
+ import org.apache.commons.configuration.ConfigurationException;
  import org.apache.hadoop.io.Text;
  import org.junit.Test;
  
@@@ -85,9 -89,10 +89,10 @@@ public class MasterAssignmentIT extend
      assertEquals(online.current, online.last);
    }
  
-   private TabletLocationState getTabletLocationState(Connector c, String tableId) {
+   private TabletLocationState getTabletLocationState(Connector c, String tableId) throws
FileNotFoundException, ConfigurationException {
 -    Credentials creds = new Credentials("root", new PasswordToken(ROOT_PASSWORD));
 -    ClientContext context = new ClientContext(c.getInstance(), creds, getClientConfig());
 +    Credentials creds = new Credentials(getPrincipal(), getToken());
-     MetaDataTableScanner s = new MetaDataTableScanner(c.getInstance(), creds, new Range(KeyExtent.getMetadataEntry(new
Text(tableId), null)));
++    ClientContext context = new ClientContext(c.getInstance(), creds, getCluster().getClientConfig());
+     MetaDataTableScanner s = new MetaDataTableScanner(context, new Range(KeyExtent.getMetadataEntry(new
Text(tableId), null)));
      TabletLocationState tlState = s.next();
      s.close();
      return tlState;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/865c9bf2/test/src/test/java/org/apache/accumulo/test/functional/SimpleMacIT.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/865c9bf2/test/src/test/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
----------------------------------------------------------------------


Mime
View raw message