Cloudera CDH/CDP 및 Hadoop EcoSystem, Semantic IoT등의 개발/운영 기술을 정리합니다. gooper@gooper.com로 문의 주세요.
sqoop에서 oracle관련 작업할때 테이블명, 사용자명, DB명은 모두 대문자로 사용해야함...
oracle은 내부적으로 대문자로 변환하여 저장하는데.. sqoop에서는 그렇게 하지 않기 때문에 오류가 발생하므로..
대문자로 지정하여야 정상적으로 접근이 된다.
-----------------------------------------오류내용 ------------------------------------------------------
hadoop@bigdata-host:~/hadoop/working/cas/scenario/s1/sqoop$ sqoop export --options-file option.par
Warning: /usr/lib/hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
14/05/15 16:36:53 DEBUG tool.BaseSqoopTool: Enabled debug logging.
14/05/15 16:36:53 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
14/05/15 16:36:53 DEBUG sqoop.ConnFactory: Loaded manager factory: com.cloudera.sqoop.manager.DefaultManagerFactory
14/05/15 16:36:53 DEBUG sqoop.ConnFactory: Trying ManagerFactory: com.cloudera.sqoop.manager.DefaultManagerFactory
14/05/15 16:36:53 DEBUG manager.DefaultManagerFactory: Trying with scheme: jdbc:oracle:thin:@
14/05/15 16:36:53 DEBUG manager.OracleManager$ConnCache: Instantiated new connection cache.
14/05/15 16:36:53 INFO manager.SqlManager: Using default fetchSize of 1000
14/05/15 16:36:53 DEBUG sqoop.ConnFactory: Instantiated ConnManager org.apache.sqoop.manager.OracleManager@4bfa385a
14/05/15 16:36:53 INFO tool.CodeGenTool: Beginning code generation
14/05/15 16:36:54 DEBUG manager.OracleManager: Using column names query: SELECT t.* FROM TB_SC_101010 t WHERE 1=0
14/05/15 16:36:54 DEBUG manager.SqlManager: Execute getColumnTypesRawQuery : SELECT t.* FROM TB_SC_101010 t WHERE 1=0
14/05/15 16:36:55 DEBUG manager.OracleManager: Creating a new connection for jdbc:oracle:thin:@//192.168.0.143:1521/ORCL, using username: secu
14/05/15 16:36:55 DEBUG manager.OracleManager: No connection paramenters specified. Using regular API for making connection.
14/05/15 16:36:56 INFO manager.OracleManager: Time zone has been set to GMT
14/05/15 16:36:56 DEBUG manager.SqlManager: Using fetchSize for next query: 1000
14/05/15 16:36:56 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM TB_SC_101010 t WHERE 1=0
14/05/15 16:36:56 DEBUG manager.OracleManager$ConnCache: Caching released connection for jdbc:oracle:thin:@//192.168.0.143:1521/ORCL/secu
14/05/15 16:36:56 DEBUG orm.ClassWriter: selected columns:
14/05/15 16:36:56 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.IllegalArgumentException: Attempted to generate class with no columns!
java.lang.IllegalArgumentException: Attempted to generate class with no columns!
at org.apache.sqoop.orm.ClassWriter.generateClassForColumns(ClassWriter.java:1295)
at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1176)
at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:96)
at org.apache.sqoop.tool.ExportTool.exportTable(ExportTool.java:64)
at org.apache.sqoop.tool.ExportTool.run(ExportTool.java:100)
at org.apache.sqoop.Sqoop.run(Sqoop.java:145)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:181)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:220)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:229)
at org.apache.sqoop.Sqoop.main(Sqoop.java:238)