accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1237999 - in /incubator/accumulo/branches/1.4: src/server/src/main/java/org/apache/accumulo/server/master/state/ src/server/src/main/java/org/apache/accumulo/server/test/functional/ src/server/src/main/java/org/apache/accumulo/server/test/...
Date Mon, 30 Jan 2012 20:48:24 GMT
Author: ecn
Date: Mon Jan 30 20:48:23 2012
New Revision: 1237999

URL: http://svn.apache.org/viewvc?rev=1237999&view=rev
Log:
ACCUMULO-355: write to /tmp and /user in hdfs

Modified:
    incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/state/MergeStats.java
    incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/test/functional/BulkSplitOptimizationTest.java
    incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/security/TableOp.java
    incubator/accumulo/branches/1.4/test/system/auto/TestUtils.py

Modified: incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/state/MergeStats.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/state/MergeStats.java?rev=1237999&r1=1237998&r2=1237999&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/state/MergeStats.java
(original)
+++ incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/state/MergeStats.java
Mon Jan 30 20:48:23 2012
@@ -184,7 +184,8 @@ public class MergeStats {
   public static void main(String[] args) throws Exception {
     Instance instance = HdfsZooInstance.getInstance();
     Map<String,String> tableIdMap = instance.getConnector(SecurityConstants.getSystemCredentials()).tableOperations().tableIdMap();
-    for (String tableId : tableIdMap.keySet()) {
+    for (String table : tableIdMap.keySet()) {
+      String tableId = tableIdMap.get(table);
       String path = ZooUtil.getRoot(instance.getInstanceID()) + Constants.ZTABLES + "/" +
tableId.toString() + "/merge";
       MergeInfo info = new MergeInfo();
       if (ZooReaderWriter.getInstance().exists(path)) {
@@ -193,7 +194,7 @@ public class MergeStats {
         in.reset(data, data.length);
         info.readFields(in);
       }
-      System.out.println(String.format("%25s  %10s %10s %s", tableIdMap.get(tableId), info.state,
info.operation, info.range));
+      System.out.println(String.format("%25s  %10s %10s %s", table, info.state, info.operation,
info.range));
     }
   }
 }
\ No newline at end of file

Modified: incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/test/functional/BulkSplitOptimizationTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/test/functional/BulkSplitOptimizationTest.java?rev=1237999&r1=1237998&r2=1237999&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/test/functional/BulkSplitOptimizationTest.java
(original)
+++ incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/test/functional/BulkSplitOptimizationTest.java
Mon Jan 30 20:48:23 2012
@@ -27,6 +27,7 @@ import org.apache.accumulo.server.test.C
 import org.apache.accumulo.server.test.VerifyIngest;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
+import org.apache.log4j.Logger;
 
 /**
  * This test verifies that when a lot of files are bulk imported into a table with one tablet
and then splits that not all map files go to the children tablets.
@@ -42,8 +43,8 @@ public class BulkSplitOptimizationTest e
   @Override
   public void cleanup() throws Exception {
     FileSystem fs = FileSystem.get(CachedConfiguration.getInstance());
-    fs.delete(new Path("/testmf"), true);
-    fs.delete(new Path("/testmf_failures"), true);
+    fs.delete(new Path("/tmp/testmf"), true);
+    fs.delete(new Path("/tmp/testmf_failures"), true);
   }
   
   @Override
@@ -61,11 +62,11 @@ public class BulkSplitOptimizationTest e
   public void run() throws Exception {
     
     FileSystem fs = FileSystem.get(CachedConfiguration.getInstance());
-    fs.delete(new Path("/testmf"), true);
+    fs.delete(new Path("/tmp/testmf"), true);
     
-    CreateMapFiles.main(new String[] {"testmf", "8", "0", "100000", "99"});
+    CreateMapFiles.main(new String[] {"tmp/testmf", "8", "0", "100000", "99"});
     
-    bulkImport(fs, TABLE_NAME, "/testmf");
+    bulkImport(fs, TABLE_NAME, "/tmp/testmf");
     
     checkSplits(TABLE_NAME, 0, 0);
     checkMapFiles(TABLE_NAME, 1, 1, 100, 100);

Modified: incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/security/TableOp.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/security/TableOp.java?rev=1237999&r1=1237998&r2=1237999&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/security/TableOp.java
(original)
+++ incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/security/TableOp.java
Mon Jan 30 20:48:23 2012
@@ -183,7 +183,9 @@ public class TableOp extends Test {
         }
         for (String s : SecurityHelper.getAuthsArray())
           SecurityHelper.increaseAuthMap(state, s, 1);
-        
+        fs.delete(dir, true);
+        fs.delete(fail, true);
+
         if (!hasPerm)
           throw new AccumuloException("Bulk Import succeeded when it should have failed:
" + dir + " table " + tableName);
         break;

Modified: incubator/accumulo/branches/1.4/test/system/auto/TestUtils.py
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/test/system/auto/TestUtils.py?rev=1237999&r1=1237998&r2=1237999&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/test/system/auto/TestUtils.py (original)
+++ incubator/accumulo/branches/1.4/test/system/auto/TestUtils.py Mon Jan 30 20:48:23 2012
@@ -41,7 +41,7 @@ FUZZ=os.getpid() % 997
 ACCUMULO_HOME = os.path.dirname(__file__)
 ACCUMULO_HOME = os.path.join(ACCUMULO_HOME, *(os.path.pardir,)*3)
 ACCUMULO_HOME = os.path.realpath(ACCUMULO_HOME)
-ACCUMULO_DIR = "/accumulo-" + ID
+ACCUMULO_DIR = "/user/" + os.getlogin() + "/accumulo-" + ID
 SITE = "test-" + ID
 
 WALOG = os.path.join(ACCUMULO_HOME, 'walogs', ID)



Mime
View raw message