Tmp space permission error

Hello,

I get below error while executing the sqoop commands. Can you please suggest the solution to fix.

sbhupathiraju86@gw01 ~]$ sqoop import --connect “jdbc:mysql://nn01.itversity.com:3306/retail_db” --username retail_dba --password itversity --query ‘select * from departments’;
Warning: /usr/hdp/2.5.0.0-1245/accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
Exception in thread “main” java.lang.RuntimeException: Could not create temporary directory: /tmp/sqoop-sbhupathiraju86/compile/1f0d8619230548cad5688da397bdf856; check for a directory permissions issue on /tmp.
at org.apache.sqoop.SqoopOptions.getNonceJarDir(SqoopOptions.java:909)
at org.apache.sqoop.SqoopOptions.initDefaults(SqoopOptions.java:979)
at org.apache.sqoop.SqoopOptions.(SqoopOptions.java:376)
at com.cloudera.sqoop.SqoopOptions.(SqoopOptions.java:77)
at org.apache.sqoop.Sqoop.(Sqoop.java:85)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:224)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234)
at org.apache.sqoop.Sqoop.main(Sqoop.java:243)

Hi Bhupathi,

While using --query option
You need to specify
1)where $CONDITION
2)need to specify no of mappers(or)–split-by

and also you havent mentioned --target-dir .Please try using the command similar to the one given below.

sqoop import --connect “jdbc:mysql://nn01.itversity.com:3306/retail_db” --username retail_dba --password itversity --query “select * from departments where $CONDITIONS” -m 1 --target-dir /user/abhishek4/temp

It is different issue which has to be fixed on the server. It is resolved now.

Oh,ok.Thank you sir.I noticed syntax difference as well.There was no output directory mentioned in command so thought that this might be useful

I am getting the below error .
sqoop eval --connect jdbc:mysql://gw01.itversity.com/retail_db -username retail_dba -password itversity --query "select * from departments"
Warning: /usr/hdp/2.5.0.0-1245/accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
Exception in thread “main” java.lang.RuntimeException: Could not create temporary directory: /tmp/sqoop-girisoni_anka/compile/b71e355b622fbc69ec2c470cfbd891fe; check for a directory permissions issue on /tmp.
at org.apache.sqoop.SqoopOptions.getNonceJarDir(SqoopOptions.java:909)
at org.apache.sqoop.SqoopOptions.initDefaults(SqoopOptions.java:979)
at org.apache.sqoop.SqoopOptions.(SqoopOptions.java:376)
at com.cloudera.sqoop.SqoopOptions.(SqoopOptions.java:77)
at org.apache.sqoop.Sqoop.(Sqoop.java:85)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:224)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234)
at org.apache.sqoop.Sqoop.main(Sqoop.java:243)

Please do needful to fix it.

This is fixed. Please try again. Make sure to use nn01.itversity.com:3306 for the jdbc connection

Hello Sir,

I am getting the same issue due to tmp file is filled in cloudera environment, is it safe to delete the tmp files ?