accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [1/7] accumulo git commit: ACCUMULO-3821 Switch CleanTmpIT back to minicluster only
Date Sun, 17 May 2015 14:37:39 GMT
Repository: accumulo
Updated Branches:
  refs/heads/1.7 c85361a98 -> 4eda9ec74
  refs/heads/master f98ddc2a7 -> 61f927901


ACCUMULO-3821 Switch CleanTmpIT back to minicluster only

On a system with separate users and hdfs permissions enabled,
there's no good way to make the tmp file in HDFS without
special sudo'ing logic.


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

Branch: refs/heads/1.7
Commit: 11c16006033716a2335446afa067cba4a0266051
Parents: c85361a
Author: Josh Elser <elserj@apache.org>
Authored: Sat May 16 21:10:33 2015 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Sat May 16 21:10:33 2015 -0400

----------------------------------------------------------------------
 .../org/apache/accumulo/test/functional/CleanTmpIT.java | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/11c16006/test/src/test/java/org/apache/accumulo/test/functional/CleanTmpIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/CleanTmpIT.java b/test/src/test/java/org/apache/accumulo/test/functional/CleanTmpIT.java
index d384ca4..921d661 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/CleanTmpIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/CleanTmpIT.java
@@ -35,8 +35,6 @@ import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.metadata.MetadataTable;
 import org.apache.accumulo.core.metadata.schema.MetadataSchema;
 import org.apache.accumulo.core.security.Authorizations;
-import org.apache.accumulo.harness.AccumuloClusterIT;
-import org.apache.accumulo.minicluster.ServerType;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
@@ -49,11 +47,11 @@ import org.slf4j.LoggerFactory;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Iterators;
 
-public class CleanTmpIT extends AccumuloClusterIT {
+public class CleanTmpIT extends ConfigurableMacIT {
   private static final Logger log = LoggerFactory.getLogger(CleanTmpIT.class);
 
   @Override
-  public void configureMiniCluster(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite)
{
+  public void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) {
     cfg.setProperty(Property.INSTANCE_ZK_TIMEOUT, "3s");
     cfg.setNumTservers(1);
     // use raw local file system so walogs sync and flush will work
@@ -95,7 +93,7 @@ public class CleanTmpIT extends AccumuloClusterIT {
     Entry<Key,Value> entry = Iterables.getOnlyElement(s);
     Path file = new Path(entry.getKey().getColumnQualifier().toString());
 
-    FileSystem fs = getFileSystem();
+    FileSystem fs = getCluster().getFileSystem();
     assertTrue("Could not find file: " + file, fs.exists(file));
     Path tabletDir = file.getParent();
     assertNotNull("Tablet dir should not be null", tabletDir);
@@ -103,8 +101,8 @@ public class CleanTmpIT extends AccumuloClusterIT {
     // Make the file
     fs.create(tmp).close();
     log.info("Created tmp file {}", tmp.toString());
-    getClusterControl().stopAllServers(ServerType.TABLET_SERVER);
-    getClusterControl().startAllServers(ServerType.TABLET_SERVER);
+    getCluster().stop();
+    getCluster().start();
 
     Scanner scanner = c.createScanner(tableName, Authorizations.EMPTY);
     assertEquals(2, Iterators.size(scanner.iterator()));


Mime
View raw message