sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cheol...@apache.org
Subject git commit: SQOOP-726: Put debugging information into generated SqoopRecord class
Date Sat, 01 Dec 2012 00:25:28 GMT
Updated Branches:
  refs/heads/trunk 528f7a8bb -> 0f0066f52


SQOOP-726: Put debugging information into generated SqoopRecord class

(Jarek Jarcec Cecho via Cheolsoo Park)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/0f0066f5
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/0f0066f5
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/0f0066f5

Branch: refs/heads/trunk
Commit: 0f0066f52509960b73c150f641ba3a13c7b35a5b
Parents: 528f7a8
Author: Cheolsoo Park <cheolsoo@apache.org>
Authored: Fri Nov 30 16:24:44 2012 -0800
Committer: Cheolsoo Park <cheolsoo@apache.org>
Committed: Fri Nov 30 16:24:44 2012 -0800

----------------------------------------------------------------------
 src/java/org/apache/sqoop/orm/ClassWriter.java |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/0f0066f5/src/java/org/apache/sqoop/orm/ClassWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/sqoop/orm/ClassWriter.java b/src/java/org/apache/sqoop/orm/ClassWriter.java
index f456e99..b73711e 100644
--- a/src/java/org/apache/sqoop/orm/ClassWriter.java
+++ b/src/java/org/apache/sqoop/orm/ClassWriter.java
@@ -24,6 +24,7 @@ import java.io.IOException;
 import java.io.OutputStream;
 import java.io.OutputStreamWriter;
 import java.io.Writer;
+import java.util.Date;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Properties;
@@ -401,7 +402,7 @@ public class ClassWriter {
 
   /**
    * @param javaType the type to write
-   * @param inputObj the name of the DataOutput to write to
+   * @param outputObj the name of the DataOutput to write to
    * @param colName the column name to write
    * @return the line of code involving a DataOutput object to write an entry
    * with a given java type.
@@ -451,7 +452,7 @@ public class ClassWriter {
    * Serialize a possibly-null value to the DataOutput stream. First a boolean
    * isNull is written, followed by the contents itself (if not null).
    * @param javaType name of the type to deserialize if it's not null.
-   * @param inputObj name of the DataInput to read from
+   * @param outputObj name of the DataInput to read from
    * @param colName the column name to read.
    * @return
    */
@@ -1251,9 +1252,14 @@ public class ClassWriter {
           + "no columns!");
     }
     StringBuilder sb = new StringBuilder();
-    sb.append("// ORM class for " + tableName + "\n");
+    sb.append("// ORM class for table '" + tableName + "'\n");
     sb.append("// WARNING: This class is AUTO-GENERATED. "
         + "Modify at your own risk.\n");
+    sb.append("//\n");
+    sb.append("// Debug information:\n");
+    sb.append("// Generated date: " + (new Date()) + "\n");
+    sb.append("// For connector: " + connManager.getClass().getCanonicalName()
+      + "\n");
 
     TableClassName tableNameInfo = new TableClassName(options);
 


Mime
View raw message