You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by da...@apache.org on 2012/10/21 02:07:52 UTC

svn commit: r1400540 - in /pig/branches/branch-0.11: CHANGES.txt src/org/apache/pig/impl/util/UDFContext.java

Author: daijy
Date: Sun Oct 21 00:07:52 2012
New Revision: 1400540

URL: http://svn.apache.org/viewvc?rev=1400540&view=rev
Log:
PIG-2940: HBaseStorage store fails in secure cluster

Modified:
    pig/branches/branch-0.11/CHANGES.txt
    pig/branches/branch-0.11/src/org/apache/pig/impl/util/UDFContext.java

Modified: pig/branches/branch-0.11/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.11/CHANGES.txt?rev=1400540&r1=1400539&r2=1400540&view=diff
==============================================================================
--- pig/branches/branch-0.11/CHANGES.txt (original)
+++ pig/branches/branch-0.11/CHANGES.txt Sun Oct 21 00:07:52 2012
@@ -621,6 +621,8 @@ PIG-2228: support partial aggregation in
 
 BUG FIXES
 
+PIG-2940: HBaseStorage store fails in secure cluster (cheolsoo via daijy)
+
 PIG-2821: HBaseStorage should work with secure hbase (rohini via daijy)
 
 PIG-2859: Fix few e2e test failures (rohini via daijy)

Modified: pig/branches/branch-0.11/src/org/apache/pig/impl/util/UDFContext.java
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.11/src/org/apache/pig/impl/util/UDFContext.java?rev=1400540&r1=1400539&r2=1400540&view=diff
==============================================================================
--- pig/branches/branch-0.11/src/org/apache/pig/impl/util/UDFContext.java (original)
+++ pig/branches/branch-0.11/src/org/apache/pig/impl/util/UDFContext.java Sun Oct 21 00:07:52 2012
@@ -211,7 +211,11 @@ public class UDFContext {
      * @return
      */
     public boolean isFrontend() {
-    	return (this.jconf == null || jconf.get("mapred.task.id") == null);
+        // mapred.task.id is for MR1
+        // mapreduce.job.application.attempt.id is for MR2
+        return (this.jconf == null
+                || (jconf.get("mapred.task.id") == null &&
+                    jconf.get("mapreduce.job.application.attempt.id") == null));
     }
     
     /**