You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by kt...@apache.org on 2013/10/22 21:36:25 UTC
git commit: ACCUMULO-1763 modified rfile printinfo to handle fully
qualified paths
Updated Branches:
refs/heads/master aceb5fbea -> 7f4449e4e
ACCUMULO-1763 modified rfile printinfo to handle fully qualified paths
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/7f4449e4
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/7f4449e4
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/7f4449e4
Branch: refs/heads/master
Commit: 7f4449e4e05b65370a04b8b3ab3c3f5e9f331947
Parents: aceb5fb
Author: Keith Turner <kt...@apache.org>
Authored: Tue Oct 22 15:34:56 2013 -0400
Committer: Keith Turner <kt...@apache.org>
Committed: Tue Oct 22 15:35:37 2013 -0400
----------------------------------------------------------------------
.../java/org/apache/accumulo/core/file/rfile/PrintInfo.java | 9 +++++++--
.../apache/accumulo/core/file/rfile/bcfile/PrintInfo.java | 6 +++++-
2 files changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/7f4449e4/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java
index e23ca0b..0dfda0d 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java
@@ -47,6 +47,7 @@ public class PrintInfo {
public static void main(String[] args) throws Exception {
Configuration conf = new Configuration();
+
@SuppressWarnings("deprecation")
FileSystem hadoopFs = FileUtil.getFileSystem(conf, AccumuloConfiguration.getSiteConfiguration());
FileSystem localFs = FileSystem.getLocal(conf);
@@ -62,9 +63,13 @@ public class PrintInfo {
long totalSize = 0;
for (String arg : opts.files) {
-
Path path = new Path(arg);
- FileSystem fs = hadoopFs.exists(path) ? hadoopFs : localFs; // fall back to local
+ FileSystem fs;
+ if (arg.contains(":"))
+ fs = path.getFileSystem(conf);
+ else
+ fs = hadoopFs.exists(path) ? hadoopFs : localFs; // fall back to local
+
CachableBlockFile.Reader _rdr = new CachableBlockFile.Reader(fs, path, conf, null, null);
Reader iter = new RFile.Reader(_rdr);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/7f4449e4/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/PrintInfo.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/PrintInfo.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/PrintInfo.java
index 7aba4d3..a7464c6 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/PrintInfo.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/PrintInfo.java
@@ -59,7 +59,11 @@ public class PrintInfo {
FileSystem hadoopFs = FileUtil.getFileSystem(conf, AccumuloConfiguration.getSiteConfiguration());
FileSystem localFs = FileSystem.getLocal(conf);
Path path = new Path(args[0]);
- FileSystem fs = hadoopFs.exists(path) ? hadoopFs : localFs; // fall back to local
+ FileSystem fs;
+ if (args[0].contains(":"))
+ fs = path.getFileSystem(conf);
+ else
+ fs = hadoopFs.exists(path) ? hadoopFs : localFs; // fall back to local
printMetaBlockInfo(conf, fs, path);
}
}