function ds_compile_batch {
if [[ "$DEBUG" = "Y" ]]; then
set -x
fi
logVerbose "Compiling routines in ${ds_project}@${ds_host}"
$CMD_DSCC /f /r '*' ${ds_project} >> $COMPILE_LOG 2>&1
typeset -i COUNTER=0
SLEEP=5
cat ${DSJOB_LIST} | while read DSJOB ; do
logVerbose "Compiling $DSJOB"
if [[ "$DRY_RUN_FLAG" != "Y" ]]; then
let COUNTER=$COUNTER+1
ID="${temp_dir}/${COUNTER}_$(date '+%Y%m%d%H%M%S')"
$CMD_DSCC /f /j ${DSJOB} ${ds_project} >>${ID}.log 2>&1 &
PID=$!
echo $PID > ${ID}.pid
echo "Compiling $DSJOB (P${COUNTER})" >> ${ID}.log
# sleep to avoid write errors to c:/Program\ Files/ITCB/ds_logs/dstage_wrapper_trace_n.log
#sleep 2
# wait if max processes running
logDebug "Number of compile processes running $COUNTER (MAX=$MAX_PROCESS)"
if [[ $COUNTER -ge $MAX_PROCESS ]]; then
# wait for processes to finish
WAIT="Y"
while [[ "$WAIT" = "Y" ]]; do
sleep $SLEEP
for PID_FILE in ${temp_dir}/*.pid ; do
PID=$(cat ${PID_FILE})
ps -p ${PID} >/dev/null 2>&1
if [[ $? -ne 0 ]]; then
THIS_LOG="${temp_dir}/$(basename $PID_FILE .pid).log"
cat "$THIS_LOG" >> $COMPILE_LOG
echo "===========================================================" >> $COMPILE_LOG
WAIT="N"
rm "$PID_FILE"
rm "$THIS_LOG"
fi
done
COUNTER=$(ls ${temp_dir}/*.pid 2>/dev/null | wc -l)
logDebug "Number of compile processes running $COUNTER (MAX=$MAX_PROCESS)"
done
fi
fi
done
}
Sunday, April 28, 2013
Compiling datastage jobs in parallel
Labels:
Datastage
Subscribe to:
Post Comments (Atom)
Popular Posts
-
Aayiram Kannumai - Nokketha Doorathu Kannum Nattu Guitar tabs / chords for Aayiram Kannumai from the movie Noketha Doorath Kannum...
-
Music : God Almighty Direction : Manirathnam Lyrics : Vairamuthu Singer : Shakthishree Gopalan I know this is a Tamil song, but then I ...
-
Category: Malayalam Chords Written by IGH Admin Hits: 305 Song: Muthuchippi Movie: Thattathin Marayath Music: Sh...
-
Song: Nila Paithale Movie: Olympian Anthony Adam Music: Ousepachan ..D.......................G..........................
-
DataStage has two data types that can be used to store dates - DATE and TIMESTAMP. Transforming data often requires that we manipulate dat...
-
Abstract of Google Glass The emergence of Google Glass , a prototype for a transparent Heads-Up Display (HUD) worn over one eye...
-
Guitar tabs / chords for Azhalinte Azhangalil from Ayalum Njanum Thammil Song : Azhalinte Aazhangalil Movie : Ayalum Njanum Thammil (2012) ...
-
We've shown how to create DataStage jobs that can process tables and files generically. What we now need is a way to control those job...
-
orchdbutil is a command line utility that allows you to print out table table definitions. It connects to the database, queries the databa...
-
B--1--3-4--1-3-1-0-----1--3--4-1-3-0-1-------------- G-------------------0--------------------------------- thumbi vaa thumbak...
0 comments:
Post a Comment
Please Post your Comments..!