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/07/31 17:13:40 UTC
[03/50] [abbrv] git commit: ACCUMULO-1381 applying Drew Farris's patch
ACCUMULO-1381 applying Drew Farris's patch
git-svn-id: https://svn.apache.org/repos/asf/accumulo/branches/1.4@1480033 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/82511dc0
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/82511dc0
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/82511dc0
Branch: refs/heads/master
Commit: 82511dc0435af68fd6cd21eaf87480552839b3ba
Parents: 87cd623
Author: Eric C. Newton <ec...@apache.org>
Authored: Tue May 7 19:22:48 2013 +0000
Committer: Eric C. Newton <ec...@apache.org>
Committed: Tue May 7 19:22:48 2013 +0000
----------------------------------------------------------------------
.../main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java | 4 +++-
.../org/apache/accumulo/core/file/rfile/bcfile/PrintInfo.java | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/82511dc0/src/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java
----------------------------------------------------------------------
diff --git a/src/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java b/src/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java
index 61ddb2d..045291d 100644
--- a/src/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java
+++ b/src/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java
@@ -38,7 +38,8 @@ public class PrintInfo {
public static void main(String[] args) throws Exception {
Configuration conf = new Configuration();
@SuppressWarnings("deprecation")
- FileSystem fs = FileUtil.getFileSystem(conf, AccumuloConfiguration.getSiteConfiguration());
+ FileSystem hadoopFs = FileUtil.getFileSystem(conf, AccumuloConfiguration.getSiteConfiguration());
+ FileSystem localFs = FileSystem.getLocal(conf);
Options opts = new Options();
Option dumpKeys = new Option("d", "dump", false, "dump the key/value pairs");
@@ -57,6 +58,7 @@ public class PrintInfo {
for (String arg : commandLine.getArgs()) {
Path path = new Path(arg);
+ FileSystem 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/82511dc0/src/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/PrintInfo.java
----------------------------------------------------------------------
diff --git a/src/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/PrintInfo.java b/src/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/PrintInfo.java
index 4a295f8..88e32d1 100644
--- a/src/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/PrintInfo.java
+++ b/src/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/PrintInfo.java
@@ -48,8 +48,10 @@ public class PrintInfo {
public static void main(String[] args) throws Exception {
Configuration conf = new Configuration();
@SuppressWarnings("deprecation")
- FileSystem fs = FileUtil.getFileSystem(conf, AccumuloConfiguration.getSiteConfiguration());
+ 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
printMetaBlockInfo(conf, fs, path);
}
}