You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2015/09/18 01:53:58 UTC
[2/3] accumulo git commit: ACCUMULO-4001 Qualify the RFile path and
don't assume local filesystem
ACCUMULO-4001 Qualify the RFile path and don't assume local filesystem
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/e0621dfb
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/e0621dfb
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/e0621dfb
Branch: refs/heads/master
Commit: e0621dfbee106bfcc62e1e75fba233bf91e6e85b
Parents: 7c94ea0
Author: Josh Elser <el...@apache.org>
Authored: Thu Sep 17 19:49:39 2015 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Thu Sep 17 19:49:39 2015 -0400
----------------------------------------------------------------------
.../accumulo/test/GenerateSequentialRFile.java | 4 +++-
.../test/BulkImportSequentialRowsIT.java | 22 ++++++++++++--------
2 files changed, 16 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/e0621dfb/test/src/main/java/org/apache/accumulo/test/GenerateSequentialRFile.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/GenerateSequentialRFile.java b/test/src/main/java/org/apache/accumulo/test/GenerateSequentialRFile.java
index 927dff9..30d19fe 100644
--- a/test/src/main/java/org/apache/accumulo/test/GenerateSequentialRFile.java
+++ b/test/src/main/java/org/apache/accumulo/test/GenerateSequentialRFile.java
@@ -26,6 +26,7 @@ import org.apache.accumulo.core.file.FileOperations;
import org.apache.accumulo.core.file.FileSKVWriter;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.Text;
import com.beust.jcommander.Parameter;
@@ -55,7 +56,8 @@ public class GenerateSequentialRFile implements Runnable {
public void run() {
try {
final Configuration conf = new Configuration();
- final FileSystem fs = FileSystem.getLocal(conf);
+ Path p = new Path(opts.filePath);
+ final FileSystem fs = p.getFileSystem(conf);
FileSKVWriter writer = FileOperations.getInstance().openWriter(opts.filePath, fs, conf, DefaultConfiguration.getInstance());
writer.startDefaultLocalityGroup();
http://git-wip-us.apache.org/repos/asf/accumulo/blob/e0621dfb/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java b/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java
index a1d6f4b..19e58de 100644
--- a/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java
@@ -63,25 +63,29 @@ public class BulkImportSequentialRowsIT extends AccumuloClusterIT {
TableOperations to = getConnector().tableOperations();
to.create(tableName);
FileSystem fs = getFileSystem();
- Path rootPath = getUsableDir();
+ Path rootPath = new Path(fs.makeQualified(getUsableDir()), getClass().getSimpleName());
+ log.info("Writing to {}", rootPath);
+ if (fs.exists(rootPath)) {
+ assertTrue(fs.delete(rootPath, true));
+ }
+ assertTrue(fs.mkdirs(rootPath));
+
Path bulk = new Path(rootPath, "bulk");
log.info("bulk: {}", bulk);
- if (fs.exists(bulk)) {
- fs.delete(bulk, true);
- }
assertTrue(fs.mkdirs(bulk));
Path err = new Path(rootPath, "err");
log.info("err: {}", err);
- if (fs.exists(err)) {
- fs.delete(err, true);
- }
+
+ assertTrue(fs.mkdirs(bulk));
assertTrue(fs.mkdirs(err));
Path rfile = new Path(bulk, "file.rf");
- GenerateSequentialRFile.main(new String[] {"-f", rfile.toString(), "-nr", Long.toString(NR), "-nv", Long.toString(NV)});
+ log.info("Generating RFile {}", rfile.toUri().toString());
+
+ GenerateSequentialRFile.main(new String[] {"-f", rfile.toUri().toString(), "-nr", Long.toString(NR), "-nv", Long.toString(NV)});
- assertTrue(fs.exists(rfile));
+ assertTrue("Expected that " + rfile + " exists, but it does not", fs.exists(rfile));
// Add some splits
to.addSplits(tableName, getSplits());