You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by pr...@apache.org on 2009/10/30 22:33:10 UTC

svn commit: r831458 - /hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/PigSplit.java

Author: pradeepkth
Date: Fri Oct 30 21:33:10 2009
New Revision: 831458

URL: http://svn.apache.org/viewvc?rev=831458&view=rev
Log:
Changed visibility of some methods in PigSplit to package level so that they are not exposed to LoadFunc implementations

Modified:
    hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/PigSplit.java

Modified: hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/PigSplit.java
URL: http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/PigSplit.java?rev=831458&r1=831457&r2=831458&view=diff
==============================================================================
--- hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/PigSplit.java (original)
+++ hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/PigSplit.java Fri Oct 30 21:33:10 2009
@@ -181,7 +181,10 @@
         }
     }
 
-    public int getSplitIndex() {
+    // package level access because we don't want LoadFunc implementations
+    // to get this information - this is to be used only from
+    // MergeJoinIndexer
+    int getSplitIndex() {
         return splitIndex;
     }
 
@@ -195,29 +198,48 @@
     }
 
 
-    /* (non-Javadoc)
+    /** (non-Javadoc)
      * @see org.apache.hadoop.conf.Configurable#setConf(org.apache.hadoop.conf.Configuration)
+     * 
+     * This will be called by 
+     * {@link PigInputFormat#getSplits(org.apache.hadoop.mapreduce.JobContext)}
+     * to be used in {@link #write(DataOutput)} for serializing the 
+     * wrappedSplit
+     * 
+     * This will be called by Hadoop in the backend to set the right Job 
+     * Configuration (hadoop will invoke this method because PigSplit implements
+     * {@link Configurable} - we need this Configuration in readFields() to
+     * deserialize the wrappedSplit 
      */
     @Override
     public void setConf(Configuration conf) {
         this.conf = conf;        
     }
 
-    public int getInputIndex() {
+    // package level access because we don't want LoadFunc implementations
+    // to get this information - this is to be used only from
+    // PigInputFormat
+    int getInputIndex() {
         return inputIndex;
     }
 
     /**
      * @return the totalSplits
+     * package level access because we don't want LoadFunc implementations
+     * to get this information - this is to be used only from
+     * PigInputFormat
      */
-    public int getTotalSplits() {
+    int getTotalSplits() {
         return totalSplits;
     }
 
     /**
      * @param totalSplits the totalSplits to set
+     * package level access because we don't want LoadFunc implementations
+     * to get this information - this is to be used only from
+     * PigInputFormat
      */
-    public void setTotalSplits(int totalSplits) {
+    void setTotalSplits(int totalSplits) {
         this.totalSplits = totalSplits;
     }