update Driver and startnc script

git-svn-id: https://hyracks.googlecode.com/svn/branches/fullstack_staging@2057 123451ca-8445-de46-9d55-352943316053
diff --git a/pregelix/pregelix-core/src/main/java/edu/uci/ics/pregelix/core/driver/Driver.java b/pregelix/pregelix-core/src/main/java/edu/uci/ics/pregelix/core/driver/Driver.java
index c9f5d3b..7add10f 100644
--- a/pregelix/pregelix-core/src/main/java/edu/uci/ics/pregelix/core/driver/Driver.java
+++ b/pregelix/pregelix-core/src/main/java/edu/uci/ics/pregelix/core/driver/Driver.java
@@ -74,6 +74,7 @@
         job.getConfiguration().addResource(hadoopMapRed);
         URL hadoopHdfs = job.getClass().getClassLoader().getResource("hdfs-site.xml");
         job.getConfiguration().addResource(hadoopHdfs);
+        ClusterConfig.loadClusterConfig(ipAddress, port);
 
         LOG.info("job started");
         long start = System.currentTimeMillis();
@@ -101,7 +102,6 @@
 
             if (hcc == null)
                 hcc = new HyracksConnection(ipAddress, port);
-            ClusterConfig.loadClusterConfig(ipAddress, port);
 
             URLClassLoader classLoader = (URLClassLoader) exampleClass.getClassLoader();
             List<File> jars = new ArrayList<File>();
diff --git a/pregelix/pregelix-core/src/main/resources/scripts/startnc.sh b/pregelix/pregelix-core/src/main/resources/scripts/startnc.sh
index cb79692..779666d 100644
--- a/pregelix/pregelix-core/src/main/resources/scripts/startnc.sh
+++ b/pregelix/pregelix-core/src/main/resources/scripts/startnc.sh
@@ -46,6 +46,9 @@
 #Set JAVA_OPTS
 export JAVA_OPTS=$NCJAVA_OPTS
 
+cd $HYRACKS_HOME
+HYRACKS_HOME=`pwd`
+
 #Enter the temp dir
 cd $NCTMP_DIR