Created 05-26-2017 02:11 AM
I have .sh file. which is working in linux. I want to execute that file in hadoop environment.
can anyone porvide me some knowledge?
Created 05-26-2017 02:52 AM
There are 3 ways.
1. hadoop fs -cat /tmp/test.sh|exec sh
2. You can install HDP NFS and mount the hdfs directory on local file system from where you can execute your script.
3. You can write an oozie shell workflow and call your .sh HDFS file inside the workflow.
Created 05-26-2017 04:18 AM
hadoop fs -cat /tmp/test.sh|exec sh
Should I execute this command in Sandbox terminal?
Where should I upload file test.sh?
how I will copy test.sh from local machine?
Created 05-26-2017 04:22 AM
Should I execute this command in Sandbox terminal? yes
Where should I upload file test.sh? /tmp folder
how I will copy test.sh from local machine?
hadoop fs -copyFromLocal <local path of test.sh file> /tmp/