5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-09 23:41:43 +08:00

SQOOP-726: Put debugging information into generated SqoopRecord class

(Jarek Jarcec Cecho via Cheolsoo Park)
This commit is contained in:
Cheolsoo Park 2012-11-30 16:24:44 -08:00
parent 528f7a8bb5
commit 0f0066f525

View File

@ -24,6 +24,7 @@
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 @@ private String rpcGetterForMaybeNull(String javaType, String inputObj,
/**
* @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 @@ private String rpcSetterForType(String javaType, String outputObj,
* 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 @@ private StringBuilder generateClassForColumns(
+ "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);