Initial import into git.
[galago.git] / scripts / galago-tupleflow
blob15d920dcee7ab4d4af6581f615efbfb24154ce5a
1 #!/bin/bash
4 # galago-tupleflow
6 # This script is used when using Galago on a cluster of machines. Galago will tell
7 # the job scheduler (either its own SSH scheduler, or another one like Grid Engine or
8 # Condor) to execute the galago-tupleflow script on another machine, passing a
9 # serialized job object as a parameter.
11 # September 21, 2007 -- Trevor Strohman
13 # BSD License (http://www.galagosearch.org/license)
17 # Store the root directory of your Galago installation here.
20 GALAGO=
23 # Modify this memory parameter to suit your machine.
26 MEMORY=-Xmx1900m
29 # Java runtime
32 JAVA=java
35 # The class to execute; you shouldn't change this.
38 CLASS=galago.tupleflow.execution.LocalStageExecutor
41 # append_classpath:
42 # Searches for all jar files in a directory and adds them to
43 # the classpath.
46 CLASSPATH=
48 append_classpath() {
49 local DIRECTORY=$1
50 for f in `find $DIRECTORY -name "*.jar"`; do
51 if [ "${#CLASSPATH}" -eq "0" ]; then
52 CLASSPATH=$f
53 else
54 CLASSPATH="${CLASSPATH}:${f}"
56 done
59 append_classpath ${GALAGO}
62 # Actually run the program:
65 $JAVA -ea $MEMORY -cp $CP $CLASS $@