Author: utkarsh
Date: Fri Dec  7 11:28:01 2007
New Revision: 602188

URL: http://svn.apache.org/viewvc?rev=602188&view=rev
Log:
PIG-47: Added methods to DataMap to provide access to its content

Modified:
    incubator/pig/trunk/CHANGES.txt
    incubator/pig/trunk/src/org/apache/pig/data/DataMap.java

Modified: incubator/pig/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/CHANGES.txt?rev=602188&r1=602187&r2=602188&view=diff
==============================================================================
--- incubator/pig/trunk/CHANGES.txt (original)
+++ incubator/pig/trunk/CHANGES.txt Fri Dec  7 11:28:01 2007
@@ -46,3 +46,5 @@
 
     PIG-7 (more): Fixed bug in PigCombiner where it was writing IndexedTuples
     instead of Tuples, causing Reducer to crash in some cases.
+
+    PIG-47: Added methods to DataMap to provide access to its content

Modified: incubator/pig/trunk/src/org/apache/pig/data/DataMap.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/data/DataMap.java?rev=602188&r1=602187&r2=602188&view=diff
==============================================================================
--- incubator/pig/trunk/src/org/apache/pig/data/DataMap.java (original)
+++ incubator/pig/trunk/src/org/apache/pig/data/DataMap.java Fri Dec  7 
11:28:01 2007
@@ -22,6 +22,7 @@
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Set;
 import java.util.Map.Entry;
 
 public class DataMap extends Datum {
@@ -126,6 +127,19 @@
                d.write(out);
                e.getValue().write(out);
         }
-       }
+       }
+       
+       
+       public Datum remove(String key){
+               return content.remove(key);
+       }
+       
+       public Set<String> keySet(){
+               return content.keySet();
+       }
+       
+       public Map<String, Datum> content(){
+               return content;
+       }
 
 }


Reply via email to