Project

General

Profile

1
#!/bin/bash
2
exec 3>&1
3
BASH_XTRACEFD=3
4
set -x ## print every executed command
5

    
6

    
7
if [ $# = 0 ] ; then
8
    target_dir_root=`pwd`'/${oozieAppDir}'
9
else
10
    target_dir_root=`readlink -f $1`'/${oozieAppDir}'
11
fi
12

    
13
# initial phase, creating symbolic links to jars in all subworkflows
14
# currently disabled
15
#libDir=$target_dir_root'/lib'
16
#dirs=`find $target_dir_root/* -maxdepth 10 -type d`
17
#for dir in $dirs
18
#do
19
#        if [ -f $dir/workflow.xml ]
20
#        then
21
#                echo "creating symbolic links to jars in directory: $dir/lib"
22
#                if [ ! -d "$dir/lib" ]; then
23
#                        mkdir $dir/lib
24
#                fi
25
#                find $libDir -type f -exec ln -s \{\} $dir/lib \;
26
#        fi
27
#done
28

    
29

    
30
#uploading
31
hadoop fs -rm -r ${sandboxDir}
32
hadoop fs -mkdir -p ${sandboxDir}
33
hadoop fs -mkdir -p ${workingDir}
34
hadoop fs -put $target_dir_root ${sandboxDir}
(5-5/5)