Created 12-10-2015 07:21 PM
Sqoop today does not seem to provide any option to specify location to save the logs when invokes from the CLI: it always prints details on the console.
Is there a way to capture Sqoop output in a file? If not any plans for this?
Created 12-10-2015 08:03 PM
Created 12-10-2015 08:03 PM
you can try something like this
sqoop command 2>&1| tee -a log
Created 12-11-2015 06:09 PM
I tried this once and didn't work. let me know it works for you.
Created 12-12-2015 01:14 PM
@Guilherme Braccialli I tried this ..I do see log
-rw-r--r--. 1 root root 4573 Dec 12 05:13 log
[root@phdns01 ~]# sqoop import --connect jdbc:mysql://localhost:3306/test --username root --password root --table t1 --hive-import --direct --hive-table t1 2>&1| tee -a log
Created 12-12-2015 03:35 PM
I use the same trick with mapreduce jobs, hive -f commands, etc, it's proven to work guys. @Ali Bajwa @Guilherme Braccialli
Created 07-18-2017 09:57 AM
if you also want your sqoop command included you can expend the command like this (with set -x and set +x:
{ echo $(date) set -x beeline -u ${hive2jdbcZooKeeperUrl} -f "file.hql" set +x echo $(date) } 2>&1 | tee /tmp/sqoop.log
Created 07-18-2017 07:57 AM
Yes. you just need suffix this "2>&1| tee -a sqooptest.log" along with your SQOOP EXPORT/IMPORT command