hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From whe...@apache.org
Subject svn commit: r1583385 - in /hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs: CHANGES.txt src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageViewerPB.java
Date Mon, 31 Mar 2014 18:07:09 GMT
Author: wheat9
Date: Mon Mar 31 18:07:08 2014
New Revision: 1583385

URL: http://svn.apache.org/r1583385
Log:
HDFS-6173. Merge r1583384 from trunk.

Modified:
    hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
    hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageViewerPB.java

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1583385&r1=1583384&r2=1583385&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Mon Mar 31
18:07:08 2014
@@ -48,6 +48,9 @@ Release 2.5.0 - UNRELEASED
     HDFS-6156. Simplify the JMX API that provides snapshot information.
     (wheat9)
 
+    HDFS-6173. Move the default processor from Ls to Web in OfflineImageViewer.
+    (Akira Ajisaka via wheat9)
+
 Release 2.4.1 - UNRELEASED
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageViewerPB.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageViewerPB.java?rev=1583385&r1=1583384&r2=1583385&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageViewerPB.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageViewerPB.java
Mon Mar 31 18:07:08 2014
@@ -70,13 +70,14 @@ public class OfflineImageViewerPB {
       + "\n"
       + "Required command line arguments:\n"
       + "-i,--inputFile <arg>   FSImage file to process.\n"
-      + "-o,--outputFile <arg>  Name of output file. If the specified\n"
-      + "                       file exists, it will be overwritten.\n"
       + "\n"
       + "Optional command line arguments:\n"
+      + "-o,--outputFile <arg>  Name of output file. If the specified\n"
+      + "                       file exists, it will be overwritten.\n"
+      + "                       (output to stdout by default)\n"
       + "-p,--processor <arg>   Select which type of processor to apply\n"
-      + "                       against image file."
-      + " (Ls|XML|FileDistribution).\n"
+      + "                       against image file. (XML|FileDistribution|Web)\n"
+      + "                       (Web by default)\n"
       + "-h,--help              Display usage information and exit\n";
 
   /**
@@ -89,14 +90,10 @@ public class OfflineImageViewerPB {
     // addOption method that can specify this
     OptionBuilder.isRequired();
     OptionBuilder.hasArgs();
-    OptionBuilder.withLongOpt("outputFile");
-    options.addOption(OptionBuilder.create("o"));
-
-    OptionBuilder.isRequired();
-    OptionBuilder.hasArgs();
     OptionBuilder.withLongOpt("inputFile");
     options.addOption(OptionBuilder.create("i"));
 
+    options.addOption("o", "outputFile", true, "");
     options.addOption("p", "processor", true, "");
     options.addOption("h", "help", false, "");
     options.addOption("maxSize", true, "");
@@ -144,11 +141,11 @@ public class OfflineImageViewerPB {
     }
 
     String inputFile = cmd.getOptionValue("i");
-    String processor = cmd.getOptionValue("p", "Ls");
-    String outputFile = cmd.getOptionValue("o");
+    String processor = cmd.getOptionValue("p", "Web");
+    String outputFile = cmd.getOptionValue("o", "-");
 
-    PrintWriter out = (outputFile == null || outputFile.equals("-")) ? new PrintWriter(
-        System.out) : new PrintWriter(new File(outputFile));
+    PrintWriter out = outputFile.equals("-") ?
+        new PrintWriter(System.out) : new PrintWriter(new File(outputFile));
 
     Configuration conf = new Configuration();
     try {



Mime
View raw message