root/gs2-extensions/parallel-building/trunk/src/setup.bash @ 27419

Revision 27419, 2.1 KB (checked in by jmt12, 6 years ago)

Adding more reasonable default values for HDFS host and port (so the default ones for Hadoop, rather than the defaults for the Rocks version of Hadoop)

Line 
1# GEXTPARALLELBUILDING
2extdesc="parallel processor enabled collection building"
3
4full_setup=`pwd`/${BASH_SOURCE}
5fulldir=${full_setup%/*}
6fulldir=${fulldir%/.}
7
8if [ "x$GSDLHOME" = "x" ] ; then
9  if [ -e ../../setup.bash ] ; then
10    export gsopt_noexts=1 && pushd ../.. && source setup.bash && popd
11    export gsopt_noexts=
12  elif [ -e ../../gs3-setup.sh ] ; then
13    export gsopt_noexts=1 && pushd ../.. && source gs3-setup.sh && popd
14    export gsopt_noexts=
15  fi
16
17fi
18
19if [ "x$GEXTPARALLELBUILDING" = "x" ] ; then
20
21  export PARALLELBUILDINGOS=`uname -s | tr '[A-Z]' '[a-z]' | sed 's/\([0-9]\+\)\?_.*$//'`
22  export GEXTPARALLELBUILDING=$fulldir
23  export GEXTPARALLELBUILDING_INSTALLED=$GEXTPARALLELBUILDING/$GSDLOS
24
25  export PATH=$GEXTPARALLELBUILDING_INSTALLED/bin:$fulldir/bin/script:$PATH
26
27  if [ "x$CXXFLAGS" = "x" ] ; then
28    export CXXFLAGS="-I$GEXTPARALLELBUILDING_INSTALLED/include"
29  else
30    export CXXFLAGS="-I$GEXTPARALLELBUILDING_INSTALLED/include $CXXFLAGS"
31  fi
32
33  if [ "x$LD_LIBRARY_PATH" = "x" ] ; then
34    export LD_LIBRARY_PATH=$GEXTPARALLELBUILDING_INSTALLED/lib
35  else
36    export LD_LIBRARY_PATH=$GEXTPARALLELBUILDING_INSTALLED/lib:$LD_LIBRARY_PATH
37  fi
38
39  if [ "x$LDFLAGS" = "x" ] ; then
40    export LDFLAGS="-L$GEXTPARALLELBUILDING_INSTALLED/lib"
41  else
42    export LDFLAGS="-L$GEXTPARALLELBUILDING_INSTALLED/lib $LDFLAGS"
43  fi
44
45  extdir=${GEXTPARALLELBUILDING##*/}
46
47  if [ "x$GSDLEXTS" = "x" ] ; then
48    export GSDLEXTS=$extdir
49  else
50    export GSDLEXTS=$GSDLEXTS:$extdir
51  fi
52
53  # Hadoop specific environment setup
54  export HADOOP_VERSION=1.1.0
55  export HADOOP_PREFIX=$GEXTPARALLELBUILDING/packages/hadoop-$HADOOP_VERSION
56  export PERL_VERSION=$(perl-version.pl)
57  export PATH=$PATH:$HADOOP_PREFIX/bin
58  # examples:
59  #  localhost:54310 [default]
60  #  machinename.local:9000 [rocks default]
61  export HDFSHOST=localhost
62  export HDFSPORT=54310
63
64  echo "Assuming HDFS found at \"${HDFSHOST}:${HDFSPORT}\" - edit setup.bash if this is incorrect"
65
66  echo "+Your environment is now setup for $extdesc in Greenstone"
67else
68  echo "+Your environment is already setup for $extdesc in Greenstone"
69fi
70
71
Note: See TracBrowser for help on using the browser.