accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1480033 - in /accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/file/rfile: PrintInfo.java bcfile/PrintInfo.java
Date Tue, 07 May 2013 19:22:48 GMT
Author: ecn
Date: Tue May  7 19:22:48 2013
New Revision: 1480033

URL: http://svn.apache.org/r1480033
Log:
ACCUMULO-1381 applying Drew Farris's patch

Modified:
    accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java
    accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/PrintInfo.java

Modified: accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java?rev=1480033&r1=1480032&r2=1480033&view=diff
==============================================================================
--- accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java
(original)
+++ accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java
Tue May  7 19:22:48 2013
@@ -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);
       

Modified: accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/PrintInfo.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/PrintInfo.java?rev=1480033&r1=1480032&r2=1480033&view=diff
==============================================================================
--- accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/PrintInfo.java
(original)
+++ accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/PrintInfo.java
Tue May  7 19:22:48 2013
@@ -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);
   }
 }



Mime
View raw message