Author: rkanter
Date: Tue May  7 19:14:49 2013
New Revision: 1480027

URL: http://svn.apache.org/r1480027
Log:
OOZIE-1350 Improve client debug output information (rkanter)

Modified:
    oozie/trunk/client/src/main/java/org/apache/oozie/client/OozieClient.java
    oozie/trunk/docs/src/site/twiki/DG_CommandLineTool.twiki
    oozie/trunk/release-log.txt

Modified: 
oozie/trunk/client/src/main/java/org/apache/oozie/client/OozieClient.java
URL: 
http://svn.apache.org/viewvc/oozie/trunk/client/src/main/java/org/apache/oozie/client/OozieClient.java?rev=1480027&r1=1480026&r2=1480027&view=diff
==============================================================================
--- oozie/trunk/client/src/main/java/org/apache/oozie/client/OozieClient.java 
(original)
+++ oozie/trunk/client/src/main/java/org/apache/oozie/client/OozieClient.java 
Tue May  7 19:14:49 2013
@@ -416,7 +416,7 @@ public class OozieClient {
                 URL url = createURL(collection, resource, params);
                 if (validateCommand(url.toString())) {
                     if (getDebugMode() > 0) {
-                        System.out.println("Connection URL:[" + url + "]");
+                        System.out.println(method + " " + url);
                     }
                     HttpURLConnection conn = createConnection(url, method);
                     return call(conn);
@@ -490,6 +490,11 @@ public class OozieClient {
             TransformerFactory transFactory = TransformerFactory.newInstance();
             Transformer transformer = transFactory.newTransformer();
             transformer.transform(source, result);
+            if (getDebugMode() > 0) {
+                result = new StreamResult(System.out);
+                transformer.transform(source, result);
+                System.out.println();
+            }
         }
         catch (Exception e) {
             throw new IOException(e);

Modified: oozie/trunk/docs/src/site/twiki/DG_CommandLineTool.twiki
URL: 
http://svn.apache.org/viewvc/oozie/trunk/docs/src/site/twiki/DG_CommandLineTool.twiki?rev=1480027&r1=1480026&r2=1480027&view=diff
==============================================================================
--- oozie/trunk/docs/src/site/twiki/DG_CommandLineTool.twiki (original)
+++ oozie/trunk/docs/src/site/twiki/DG_CommandLineTool.twiki Tue May  7 
19:14:49 2013
@@ -156,6 +156,11 @@ the <code>-timezone TIME_ZONE_ID</code> 
 variable and uses it if set.  If neither option is given and the environment 
variable is not set, or if Oozie is given an invalid 
 time zone, it will use GMT.
 
+---+++ Debug Mode
+
+If you export <code>OOZIE_DEBUG=1</code> then the Oozie CLI will output the 
Web Services API details used by any commands you
+execute. This is useful for debugging purposes to or see how the Oozie CLI 
works with the WS API.
+
 ---++ Job Operations
 
 ---+++ Submitting a Workflow, Coordinator or Bundle Job

Modified: oozie/trunk/release-log.txt
URL: 
http://svn.apache.org/viewvc/oozie/trunk/release-log.txt?rev=1480027&r1=1480026&r2=1480027&view=diff
==============================================================================
--- oozie/trunk/release-log.txt (original)
+++ oozie/trunk/release-log.txt Tue May  7 19:14:49 2013
@@ -38,6 +38,7 @@ OOZIE-1239 Bump up trunk to 4.1.0-SNAPSH
 
 -- Oozie 4.0.0 (unreleased)
 
+OOZIE-1350 Improve client debug output information (rkanter)
 OOZIE-1343 Sqoop sharelib should have hsqldb jar (rkanter)
 OOZIE-1344 We should use Sqoop 1.4.3 instead of 1.5.0-incubating-SNAPSHOT 
(rkanter)
 OOZIE-1146 FileSystem used by prepare sections should use the configuration of 
the action (rohini via virag)


Reply via email to