sqlManager; @Test public void test() { sqlManager.addMappedObject(new Stu());...sqlManager.build(); } } 生成的模板文件(如果不满意,可以自定义模板,后面会介绍): 产生的建库语句: CREATE DATABASE IF NOT EXISTS `test...sqlManager; @Test public void test(){ sqlManager.addMockObject(new Stu());...//如果我们不需要根据OopBuilder生成模板文件和执行建库sql,可以注释掉,前提是确保相关表已经存在 //sqlManager.addMappedObject(new Stu()...); sqlManager.build(); } } 对于没有标注@FieldMock注解的字段,那么再生成对应的Insert语句时,会跳过该字段的插入: insert into
. 18/05/24 14:58:06 INFO tool.CodeGenTool: Beginning code generation 18/05/24 14:58:06 INFO manager.SqlManager...: Executing SQL statement: SELECT t.* FROM `files` AS t LIMIT 1 18/05/24 14:58:06 ERROR manager.SqlManager...(SqlManager.java:305) at org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java...:260) at org.apache.sqoop.manager.SqlManager.getColumnTypes(SqlManager.java:246) at org.apache.sqoop.manager.ConnManager.getColumnTypes...: Executing SQL statement: SELECT t.* FROM `files` AS t LIMIT 1 18/05/24 15:03:34 INFO manager.SqlManager
(SqlManager.java:673) 72 at org.apache.sqoop.manager.MySQLManager.importTable(MySQLManager.java:...(SqlManager.java:673) 177 at org.apache.sqoop.manager.MySQLManager.importTable(MySQLManager.java:...(SqlManager.java:758) 18 at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:767) 19...at org.apache.sqoop.manager.SqlManager.getColumnInfoForRawQuery(SqlManager.java:270) 20 at org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery...(SqlManager.java:241) 21 at org.apache.sqoop.manager.SqlManager.getColumnTypes(SqlManager.java:227
org.apache.sqoop.manager.MySQLManager.initOptionDefaults(MySQLManager.java:73) at org.apache.sqoop.manager.SqlManager...(SqlManager.java:89) at com.cloudera.sqoop.manager.SqlManager....(SqlManager.java:33) at org.apache.sqoop.manager.GenericJdbcManager.
: Executing SQL statement: SELECT t.* FROM `csdnblog` AS t LIMIT 1 18/04/03 10:50:13 INFO manager.SqlManager...: Executing SQL statement: SELECT t.* FROM `users` AS t LIMIT 1 18/05/22 13:32:03 ERROR manager.SqlManager...(SqlManager.java:305) at org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java...:260) at org.apache.sqoop.manager.SqlManager.getColumnTypes(SqlManager.java:246) at org.apache.sqoop.manager.ConnManager.getColumnTypes...: Executing SQL statement: SELECT t.* FROM users AS t WHERE 1=0 18/05/22 13:35:48 INFO manager.SqlManager
oracle.OraOopManagerFactory: Data Connector for Oracle and Hadoop is disabled. 18/05/23 16:16:47 INFO manager.SqlManager...23 16:17:16 INFO manager.OracleManager: Time zone has been set to GMT 18/05/23 16:17:16 INFO manager.SqlManager...(SqlManager.java:692) at org.apache.sqoop.manager.OracleManager.importTable(OracleManager.java:454...23 22:21:55 INFO manager.OracleManager: Time zone has been set to GMT 18/05/23 22:21:55 INFO manager.SqlManager...23 22:22:31 INFO manager.OracleManager: Time zone has been set to GMT 18/05/23 22:22:31 INFO manager.SqlManager
. 18/05/24 15:26:20 INFO tool.CodeGenTool: Beginning code generation 18/05/24 15:26:20 INFO manager.SqlManager...: Executing SQL statement: SELECT t.* FROM `files` AS t LIMIT 1 18/05/24 15:26:20 INFO manager.SqlManager.... 18/05/24 15:26:47 INFO tool.CodeGenTool: Beginning code generation 18/05/24 15:26:47 INFO manager.SqlManager.... 18/05/24 16:00:06 INFO tool.CodeGenTool: Beginning code generation 18/05/24 16:00:06 INFO manager.SqlManager...: Executing SQL statement: SELECT t.* FROM `files` AS t LIMIT 1 18/05/24 16:00:06 INFO manager.SqlManager
oracle.OraOopManagerFactory: Data Connector for Oracle and Hadoop is disabled. 18/05/22 15:57:39 INFO manager.SqlManager...22 15:57:57 INFO manager.OracleManager: Time zone has been set to GMT 18/05/22 15:57:57 INFO manager.SqlManager...oracle.OraOopManagerFactory: Data Connector for Oracle and Hadoop is disabled. 18/05/22 16:00:59 INFO manager.SqlManager...22 16:01:35 INFO manager.OracleManager: Time zone has been set to GMT 18/05/22 16:01:35 INFO manager.SqlManager...22 17:05:38 INFO manager.OracleManager: Time zone has been set to GMT 18/05/22 17:05:38 INFO manager.SqlManager
18/05/18 19:32:51 INFO tool.CodeGenTool: Beginning code generation 15 18/05/18 19:32:52 INFO manager.SqlManager...: Executing SQL statement: SELECT t.* FROM `tb_user` AS t LIMIT 1 16 18/05/18 19:32:52 INFO manager.SqlManager...(SqlManager.java:665) 46 at org.apache.sqoop.manager.MySQLManager.importTable(MySQLManager.java:118.... 18/05/18 19:39:26 INFO tool.CodeGenTool: Beginning code generation 18/05/18 19:39:27 INFO manager.SqlManager...: Executing SQL statement: SELECT t.* FROM `tb_user` AS t LIMIT 1 18/05/18 19:39:27 INFO manager.SqlManager
. 14/09/08 01:25:40 INFO tool.CodeGenTool: Beginning code generation 14/09/08 01:25:40 INFO manager.SqlManager...: Executing SQL statement: SELECT t.* FROM `project` AS t LIMIT 1 14/09/08 01:25:40 INFO manager.SqlManager...14/09/08 01:25:54 INFO mapreduce.ImportJobBase: Retrieved 3 records. 14/09/08 01:25:54 INFO manager.SqlManager...: Executing SQL statement: SELECT t.* FROM `project` AS t LIMIT 1 14/09/08 01:28:55 INFO manager.SqlManager...(SqlManager.java:665) at org.apache.sqoop.manager.MySQLManager.importTable(MySQLManager.java:
17:18:49 INFO manager.OracleManager: Time zone has been set to GMT 11/09/21 17:18:49 DEBUG manager.SqlManager...: Using fetchSize for next query: 1000 11/09/21 17:18:49 INFO manager.SqlManager: Executing SQL statement
useSSL=true and provide truststore for server certificate verification. 20/02/07 10:44:09 INFO manager.SqlManager...Executing SQL statement: select * from Person where score>50 and (1 = 0) 20/02/07 10:44:09 INFO manager.SqlManager...Executing SQL statement: select * from Person where score>50 and (1 = 0) 20/02/07 10:44:09 INFO manager.SqlManager...useSSL=true and provide truststore for server certificate verification. 20/02/07 12:19:46 INFO manager.SqlManager...Executing SQL statement: select * from Person where score>1 and (1 = 0) 20/02/07 12:19:46 INFO manager.SqlManager
. 18/04/05 22:19:50 INFO tool.CodeGenTool: Beginning code generation 18/04/05 22:19:51 INFO manager.SqlManager...: Executing SQL statement: SELECT t.* FROM `product` AS t LIMIT 1 18/04/05 22:19:52 INFO manager.SqlManager...(SqlManager.java:673) at org.apache.sqoop.manager.MySQLManager.importTable(MySQLManager.java:...: Executing SQL statement: SELECT t.* FROM `product` AS t LIMIT 1 18/04/05 22:34:30 INFO manager.SqlManager...: Executing SQL statement: SELECT t.* FROM `product` AS t LIMIT 1 18/04/06 00:14:12 INFO manager.SqlManager
org.apache.sqoop.mapreduce.ImportJobBase.runImport(ImportJobBase.java:270) at org.apache.sqoop.manager.SqlManager.importTable...(SqlManager.java:692) at org.apache.sqoop.manager.MySQLManager.importTable(MySQLManager.java:127) at
oracle.OraOopManagerFactory: Data Connector for Oracle and Hadoop is disabled. 18/05/24 16:40:18 INFO manager.SqlManager...24 17:19:26 INFO manager.OracleManager: Time zone has been set to GMT 18/05/24 17:19:26 INFO manager.SqlManager...24 17:20:04 INFO manager.OracleManager: Time zone has been set to GMT 18/05/24 17:20:04 INFO manager.SqlManager...24 17:20:21 INFO manager.OracleManager: Time zone has been set to GMT 18/05/24 17:20:21 INFO manager.SqlManager...24 17:21:01 INFO manager.OracleManager: Time zone has been set to GMT 18/05/24 17:21:01 INFO manager.SqlManager
org.apache.sqoop.mapreduce.ExportJobBase.runExport(ExportJobBase.java:429) at org.apache.sqoop.manager.SqlManager.exportTable...(SqlManager.java:931) at org.apache.sqoop.tool.ExportTool.exportTable(ExportTool.java:80)
领取专属 10元无门槛券
手把手带您无忧上云