You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by mw...@apache.org on 2018/11/28 22:13:20 UTC

[accumulo-testing] branch master updated: Minor bug fixes (#45)

This is an automated email from the ASF dual-hosted git repository.

mwalch pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo-testing.git


The following commit(s) were added to refs/heads/master by this push:
     new f784dbd  Minor bug fixes (#45)
f784dbd is described below

commit f784dbd842b1e4c5f80f373bb62641ba722ae0d0
Author: Mike Walch <mw...@apache.org>
AuthorDate: Wed Nov 28 17:13:16 2018 -0500

    Minor bug fixes (#45)
    
    * Fixed bug in creating TEST_LOG4J in env.sh
    * Used full HDFS uri in RW bulk import test
---
 conf/env.sh.example                                                 | 4 ++--
 .../org/apache/accumulo/testing/randomwalk/bulk/BulkPlusOne.java    | 6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/conf/env.sh.example b/conf/env.sh.example
index 0a2cdbe..bd372c3 100644
--- a/conf/env.sh.example
+++ b/conf/env.sh.example
@@ -31,8 +31,8 @@ if [ ! -f "$TEST_PROPS" ]; then
   echo "Please create and edit accumulo-testing.properties in $conf_dir"
   exit 1
 fi
-export TEST_LO4J="${conf_dir}/log4j.properties"
-if [ ! -f "$TEST_L0G4J" ]; then
+export TEST_LOG4J="${conf_dir}/log4j.properties"
+if [ ! -f "$TEST_LOG4J" ]; then
   export TEST_LOG4J="${conf_dir}/log4j.properties.example"
   if [ ! -f "$TEST_LOG4J" ]; then
     echo "Could not find logj4.properties or log4j.properties.example in $conf_dir"
diff --git a/src/main/java/org/apache/accumulo/testing/randomwalk/bulk/BulkPlusOne.java b/src/main/java/org/apache/accumulo/testing/randomwalk/bulk/BulkPlusOne.java
index a769a13..6e7938e 100644
--- a/src/main/java/org/apache/accumulo/testing/randomwalk/bulk/BulkPlusOne.java
+++ b/src/main/java/org/apache/accumulo/testing/randomwalk/bulk/BulkPlusOne.java
@@ -55,10 +55,11 @@ public class BulkPlusOne extends BulkImportTest {
   private static final Value ONE = new Value("1".getBytes());
 
   static void bulkLoadLots(Logger log, State state, RandWalkEnv env, Value value) throws Exception {
-    final Path dir = new Path("/tmp", "bulk_" + UUID.randomUUID().toString());
+    final FileSystem fs = (FileSystem) state.get("fs");
+    final Path dir = new Path(fs.getUri() + "/tmp", "bulk_" + UUID.randomUUID().toString());
+    log.debug("Bulk loading from {}", dir);
     final Path fail = new Path(dir.toString() + "_fail");
     final Random rand = (Random) state.get("rand");
-    final FileSystem fs = (FileSystem) state.get("fs");
     fs.mkdirs(fail);
     final int parts = rand.nextInt(10) + 1;
 
@@ -80,6 +81,7 @@ public class BulkPlusOne extends BulkImportTest {
     for (int i = 0; i < parts; i++) {
       String fileName = dir + "/" + String.format("part_%d.rf", i);
 
+      log.debug("Creating {}", fileName);
       RFileWriter writer = RFile.newWriter().to(fileName).withFileSystem(fs).build();
       writer.startDefaultLocalityGroup();
       int start = rows.get(i);