pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject svn commit: r1210061 - in /pig/branches/branch-0.9: CHANGES.txt bin/pig
Date Sun, 04 Dec 2011 07:11:48 GMT
Author: daijy
Date: Sun Dec  4 07:11:47 2011
New Revision: 1210061

URL: http://svn.apache.org/viewvc?rev=1210061&view=rev
Log:
PIG-2354: Several fixes for bin/pig

Modified:
    pig/branches/branch-0.9/CHANGES.txt
    pig/branches/branch-0.9/bin/pig

Modified: pig/branches/branch-0.9/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.9/CHANGES.txt?rev=1210061&r1=1210060&r2=1210061&view=diff
==============================================================================
--- pig/branches/branch-0.9/CHANGES.txt (original)
+++ pig/branches/branch-0.9/CHANGES.txt Sun Dec  4 07:11:47 2011
@@ -22,6 +22,8 @@ Release 0.9.2 - Unreleased
 
 BUG FIXES
 
+PIG-2354: Several fixes for bin/pig (daijy)
+
 PIG-2379: Bug in Schema.getPigSchema(ResourceSchema rSchema) improperly adds two level access
(jcoveney via dvryaboy)
 
 PIG-2320: Error: "projection with nothing to reference" (daijy)

Modified: pig/branches/branch-0.9/bin/pig
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.9/bin/pig?rev=1210061&r1=1210060&r2=1210061&view=diff
==============================================================================
--- pig/branches/branch-0.9/bin/pig (original)
+++ pig/branches/branch-0.9/bin/pig Sun Dec  4 07:11:47 2011
@@ -27,6 +27,8 @@
 #
 #     HADOOP_HOME/HADOOP_PREFIX     Environment HADOOP_HOME/HADOOP_PREFIX(0.20.205)
 #
+#     HADOOP_CONF_DIR     Hadoop conf dir
+#
 #     PIG_HEAPSIZE    The maximum amount of heap to use, in MB. 
 #                                        Default is 1000.
 #
@@ -109,6 +111,11 @@ if [ "$PIG_CLASSPATH" != "" ]; then
     CLASSPATH=${CLASSPATH}:${PIG_CLASSPATH}
 fi
  
+# add HADOOP_CONF_DIR
+if [ "$HADOOP_CONF_DIR" != "" ]; then
+    CLASSPATH=${CLASSPATH}:${HADOOP_CONF_DIR}
+fi
+
 # so that filenames w/ spaces are handled correctly in loops below
 IFS=
 
@@ -152,7 +159,11 @@ done
 #    done
 #fi
 
-if [ -n "$HADOOP_PREFIX" ]; then
+if which hadoop >/dev/null; then
+    HADOOP_BIN=`which hadoop`
+fi
+
+if [[ -z "$HADOOP_BIN" && -n "$HADOOP_PREFIX" ]]; then
     if [ -f $HADOOP_PREFIX/bin/hadoop ]; then
         HADOOP_BIN=$HADOOP_PREFIX/bin/hadoop
     fi
@@ -164,7 +175,7 @@ if [[ -z "$HADOOP_BIN" && -n "$HADOOP_HO
     fi
 fi
 
-if [ -n "$HADOOP_BIN" ]; then
+if [ -z "$HADOOP_BIN" ]; then
     # if installed with rpm/deb package
     if [ -f /usr/bin/hadoop ]; then
         HADOOP_BIN=/usr/bin/hadoop



Mime
View raw message