Achilleus
Achilleus

Reputation: 1944

Sqoop import as Parquet file is failing

My sqoop import as Parquet file is failing. I tried going through the error and search online but could not resolve it. I tried by setting "-Dmapreduce.job.user.classpath.first=true" looking at previous discussion here. Even that did not help. Thanks in advance.

sqoop import -Dmapreduce.job.user.classpath.first=true \
--connect jdbc:mysql://ip/dbname \
--username  username  \
--password   password  \
--table orders \
--warehouse-dir \
--driver com.mysql.jdbc.Driver
--as-parquetfile

Error:

Application application_1492001640512_0078 failed 2 times due to AM Container for appattempt_149
2001640512_0078_000002 exited with exitCode: 1
For more detailed output, check application tracking page:http://ec2-52-44-197-32.compute-1.amazo
naws.com:8088/cluster/app/application_1492001640512_0078Then, click on links to logs of each atte
mpt.
Diagnostics: Exception from container-launch.
Container id: container_e49_1492001640512_0078_02_000001
Exit code: 1
Stack trace: ExitCodeException exitCode=1: 
at org.apache.hadoop.util.Shell.runCommand(Shell.java:576)
at org.apache.hadoop.util.Shell.run(Shell.java:487)
at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:753)
at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(Def
aultContainerExecutor.java:212)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.ca
ll(ContainerLaunch.java:303)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.ca
ll(ContainerLaunch.java:82)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Container exited with a non-zero exit code 1
Failing this attempt. Failing the application.

PS:Everything else seems to work except for Parquet.I tried importing as text file, as Avro file...

Upvotes: 0

Views: 534

Answers (1)

Aman Saurav
Aman Saurav

Reputation: 826

Instead of using --warehouse-dir try using --target-dir.

Upvotes: 1

Related Questions