I am trying to create a saved sqoop job ( incremental ) and use sqoop metastore as repository. ( for security reasons "xyz" being the unix user who is running the job and sample_table is used for reference)
sqoop job -Dhadoop.security.credential.provider.path=jceks://path/to/pwd \
--meta-connect "jdbc:hsqldb:file:/tmp/sqoop-meta.db;shutdown=true" \
--create sample_job --import -Dmapred.job.queue.name=realtime \
--connect jdbc:mysql://hostname/db?zeroDateTimeBehavior=convertToNull \
--driver com.mysql.jdbc.Driver \
--table SAMPLE_TABLE -m 1 \
--username tony \
--password-alias pwd \
--incremental lastmodified \
--check-column ts \
--last-value 2018-04-24 \
--target-dir /some/tmp/location/ \
--map-column-hive XYZ=tinyint \
--null-string '' \
--null-non-string ''
Using a local sqoop metastore, which is also used while executing the stored job.
sqoop job --meta-connect "jdbc:hsqldb:file:/tmp/sqoop-meta.db;shutdown=true" -exec sample_job
Sqoop runs fine, and I can see data gets pulled to hdfs location. However, at the end getting this error. Cant seem to find a fix for it anywhere. Tried giving full permission to the _sqoop directory but still same prob.
Logging initialized using configuration in jar:file:/usr/hdp/2.6.4.0-91/hive/lib/hive-common-1.2.1000.2.6.4.0-91.jar!/hive-log4j.properties
OK
Time taken: 3.028 seconds
FAILED: SemanticException Line 2:17 Invalid path ''hdfs://hostname/user/xyz/_sqoop/ad240610c282442cb65b61b14f582935_sample_table'': No files matching path hdfs://vBAPUAT01nn/user/xyz/_sqoop/ad240610c282442cb65b61b14f582935_sample_table
But the above file is not present in the _sqoop location. Instead everytime I run the sqoop operation a see new differently named file created. /sqoop/
$ hadoop fs -ls /user/pcjaapp/_sqoop/
drwxrwxrwx - xyz hdfs 0 2018-04-26 16:31 /user/xyz/_sqoop/1ab0f2de2ace4984b7b978af5f8f8336_sample_table
drwxr-xr-x - xyz hdfs 0 2018-04-27 10:50 /user/xyz/_sqoop/3aedb9fc0857433f8388ae2c70019d93_sample_table
drwxrwxrwx - xyz hdfs 0 2018-04-26 16:54 /user/xyz/_sqoop/6dfb90bcf7854f5e82efebbcd317cabe_sample_table
drwxrwxrwx - xyz hdfs 0 2018-04-26 15:29 /user/xyz/_sqoop/a59b80e855734c35b785bdc35dcbd5a6_sample_table
drwxrwxrwx - xyz hdfs 0 2018-04-26 14:30 /user/xyz/_sqoop/b77d4b88140e469daa5aa0962b56b562_sample_table
Can someone shed some light to what exactly is happening here. Fairly new in this field since it is the first time trying to launch sqoop incremental jobs using metastore.