sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Muhammad Ehsan ul Haque (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SQOOP-1423) hcatalog export with --map-column-java fails
Date Fri, 08 Aug 2014 10:53:11 GMT
Muhammad Ehsan ul Haque created SQOOP-1423:
----------------------------------------------

             Summary: hcatalog export with --map-column-java fails
                 Key: SQOOP-1423
                 URL: https://issues.apache.org/jira/browse/SQOOP-1423
             Project: Sqoop
          Issue Type: Bug
    Affects Versions: 1.4.4, 1.4.6
            Reporter: Muhammad Ehsan ul Haque
            Priority: Critical
             Fix For: 1.4.6, 1.4.4


hcat export does not use mappings provided using --map-column-java and crashes with NPE when
target table has a non standard sql type.

h3. Test when exporting to postgres
*Hive table schema*
{code}
CREATE TABLE hive_table(col1 String);
{code}
*Hive table data*
{code}
127.0.0.1
182.27.181.11
...
{code}
*Postgres Table Schema*
{code}
CREATE TABLE postgres_table (col1 inet)
{code}

*Sqoop Command for Exporting*
{code}
sqoop export --verbose --connect jdbc:postgresql://pg_server:5432/pg_db?stringtype=unspecified
--username user --password xxxxx --table postgres_table --hcatalog-table hive_table --map-column-java
col1=String
{code}
*exception*
{code}
14/08/08 12:51:04 INFO hcat.SqoopHCatUtilities: Configuring HCatalog for export job
14/08/08 12:51:04 INFO hcat.SqoopHCatUtilities: Ignoring configuration request for HCatalog
info
14/08/08 12:51:04 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.NullPointerException
java.lang.NullPointerException
	at org.apache.hadoop.io.Text.encode(Text.java:432)
	at org.apache.hadoop.io.Text.set(Text.java:196)
	at org.apache.hadoop.io.Text.<init>(Text.java:88)
	at org.apache.sqoop.mapreduce.hcat.SqoopHCatUtilities.configureExportInputFormat(SqoopHCatUtilities.java:708)
	at org.apache.sqoop.mapreduce.JdbcExportJob.configureInputFormat(JdbcExportJob.java:70)
	at org.apache.sqoop.mapreduce.ExportJobBase.runExport(ExportJobBase.java:387)
	at org.apache.sqoop.manager.SqlManager.exportTable(SqlManager.java:828)
	at org.apache.sqoop.tool.ExportTool.exportTable(ExportTool.java:81)
	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:70)
	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)
{code}




--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message