hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomwh...@apache.org
Subject svn commit: r909241 - in /hadoop/mapreduce/trunk: CHANGES.txt src/contrib/sqoop/doc/Sqoop-manpage.txt src/contrib/sqoop/doc/misc-args.txt src/contrib/sqoop/src/java/org/apache/hadoop/sqoop/SqoopOptions.java
Date Fri, 12 Feb 2010 05:28:19 GMT
Author: tomwhite
Date: Fri Feb 12 05:28:19 2010
New Revision: 909241

URL: http://svn.apache.org/viewvc?rev=909241&view=rev
Log:
MAPREDUCE-1467. Add a --verbose flag to Sqoop. Contributed by Aaron Kimball.

Modified:
    hadoop/mapreduce/trunk/CHANGES.txt
    hadoop/mapreduce/trunk/src/contrib/sqoop/doc/Sqoop-manpage.txt
    hadoop/mapreduce/trunk/src/contrib/sqoop/doc/misc-args.txt
    hadoop/mapreduce/trunk/src/contrib/sqoop/src/java/org/apache/hadoop/sqoop/SqoopOptions.java

Modified: hadoop/mapreduce/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/CHANGES.txt?rev=909241&r1=909240&r2=909241&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/CHANGES.txt (original)
+++ hadoop/mapreduce/trunk/CHANGES.txt Fri Feb 12 05:28:19 2010
@@ -185,6 +185,9 @@
     only on required set of localized paths.
     (Amareshwari Sriramadasu via yhemanth)
 
+    MAPREDUCE-1467. Add a --verbose flag to Sqoop.
+    (Aaron Kimball via tomwhite)
+
   BUG FIXES
 
     MAPREDUCE-1258. Fix fair scheduler event log not logging job info.

Modified: hadoop/mapreduce/trunk/src/contrib/sqoop/doc/Sqoop-manpage.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/contrib/sqoop/doc/Sqoop-manpage.txt?rev=909241&r1=909240&r2=909241&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/contrib/sqoop/doc/Sqoop-manpage.txt (original)
+++ hadoop/mapreduce/trunk/src/contrib/sqoop/doc/Sqoop-manpage.txt Fri Feb 12 05:28:19 2010
@@ -187,6 +187,9 @@
 --list-tables::
   List tables in database and exit
 
+--verbose::
+  Print more information while working
+
 Database-specific options
 ~~~~~~~~~~~~~~~~~~~~~~~~~
 

Modified: hadoop/mapreduce/trunk/src/contrib/sqoop/doc/misc-args.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/contrib/sqoop/doc/misc-args.txt?rev=909241&r1=909240&r2=909241&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/contrib/sqoop/doc/misc-args.txt (original)
+++ hadoop/mapreduce/trunk/src/contrib/sqoop/doc/misc-args.txt Fri Feb 12 05:28:19 2010
@@ -34,3 +34,7 @@
 Sqoop to use gzip to compress your data by providing either the
 +--compress+ or +-z+ argument (both are equivalent).
 
+Using +--verbose+ will instruct Sqoop to print more details about its
+operation; this is particularly handy if Sqoop appears to be misbehaving.
+
+

Modified: hadoop/mapreduce/trunk/src/contrib/sqoop/src/java/org/apache/hadoop/sqoop/SqoopOptions.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/contrib/sqoop/src/java/org/apache/hadoop/sqoop/SqoopOptions.java?rev=909241&r1=909240&r2=909241&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/contrib/sqoop/src/java/org/apache/hadoop/sqoop/SqoopOptions.java
(original)
+++ hadoop/mapreduce/trunk/src/contrib/sqoop/src/java/org/apache/hadoop/sqoop/SqoopOptions.java
Fri Feb 12 05:28:19 2010
@@ -31,6 +31,9 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.util.ToolRunner;
+import org.apache.log4j.Category;
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
 
 /**
  * Command-line arguments used by Sqoop
@@ -363,6 +366,7 @@
     System.out.println("--list-tables                List tables in database and exit");
     System.out.println("--list-databases             List all databases available and exit");
     System.out.println("--debug-sql (statement)      Execute 'statement' in SQL and exit");
+    System.out.println("--verbose                    Print more information while working");
     System.out.println("");
     System.out.println("Database-specific options:");
     System.out.println("Arguments may be passed to the database manager after a lone '-':");
@@ -595,6 +599,12 @@
           for (i++; i < args.length; i++) {
             this.debugSqlCmd = this.debugSqlCmd + args[i] + " ";
           }
+        } else if (args[i].equals("--verbose")) {
+          // Immediately switch into DEBUG logging.
+          Category sqoopLogger =
+              Logger.getLogger(SqoopOptions.class.getName()).getParent();
+          sqoopLogger.setLevel(Level.DEBUG);
+
         } else if (args[i].equals("--help")) {
           printUsage();
           throw new InvalidOptionsException("");



Mime
View raw message