datafu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mha...@apache.org
Subject [2/3] incubator-datafu git commit: Update BagJoin for JRE 1.6 compatibility
Date Fri, 21 Nov 2014 04:42:55 GMT
Update BagJoin for JRE 1.6 compatibility


Project: http://git-wip-us.apache.org/repos/asf/incubator-datafu/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-datafu/commit/89fe0bec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-datafu/tree/89fe0bec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-datafu/diff/89fe0bec

Branch: refs/heads/master
Commit: 89fe0bec6717e1f68e5cce5f065620d5cb5a8a3c
Parents: 598fd92
Author: Matthew Hayes <matthew.terence.hayes@gmail.com>
Authored: Thu Nov 20 20:31:50 2014 -0800
Committer: Matthew Hayes <matthew.terence.hayes@gmail.com>
Committed: Thu Nov 20 20:31:50 2014 -0800

----------------------------------------------------------------------
 build-plugin/.gitignore                                   |  1 +
 datafu-hourglass/.gitignore                               |  1 +
 datafu-pig/src/main/java/datafu/pig/bags/BagJoin.java     | 10 +++++-----
 .../src/test/java/datafu/test/pig/bags/BagTests.java      |  2 ++
 4 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-datafu/blob/89fe0bec/build-plugin/.gitignore
----------------------------------------------------------------------
diff --git a/build-plugin/.gitignore b/build-plugin/.gitignore
index 5e56e04..167fb2c 100644
--- a/build-plugin/.gitignore
+++ b/build-plugin/.gitignore
@@ -1 +1,2 @@
 /bin
+/bin

http://git-wip-us.apache.org/repos/asf/incubator-datafu/blob/89fe0bec/datafu-hourglass/.gitignore
----------------------------------------------------------------------
diff --git a/datafu-hourglass/.gitignore b/datafu-hourglass/.gitignore
index 7544cd3..b2675dc 100644
--- a/datafu-hourglass/.gitignore
+++ b/datafu-hourglass/.gitignore
@@ -1,2 +1,3 @@
 test-logs/
 /bin
+/bin

http://git-wip-us.apache.org/repos/asf/incubator-datafu/blob/89fe0bec/datafu-pig/src/main/java/datafu/pig/bags/BagJoin.java
----------------------------------------------------------------------
diff --git a/datafu-pig/src/main/java/datafu/pig/bags/BagJoin.java b/datafu-pig/src/main/java/datafu/pig/bags/BagJoin.java
index 1bad955..6d08b0f 100644
--- a/datafu-pig/src/main/java/datafu/pig/bags/BagJoin.java
+++ b/datafu-pig/src/main/java/datafu/pig/bags/BagJoin.java
@@ -123,8 +123,8 @@ public class BagJoin extends AliasableEvalFunc<DataBag>
 
       // if this is the first list of tuples, then just add them all
       if (this.data == null) {
-        this.data = new HashMap<>();
-        this.keys = new HashSet<>();
+        this.data = new HashMap<Object, List<Tuple>>();
+        this.keys = new HashSet<Object>();
         for (Tuple tuple : tuples) {
           Object key = getObject(tuple, keyName);
           if (!this.data.containsKey(key)) {
@@ -141,8 +141,8 @@ public class BagJoin extends AliasableEvalFunc<DataBag>
       }
 
       // otherwise, join
-      HashMap<Object, List<Tuple>> joinedData = new HashMap<>(this.data.size());
-      Set<Object> joinedKeys = new HashSet<>();
+      HashMap<Object, List<Tuple>> joinedData = new HashMap<Object, List<Tuple>>(this.data.size());
+      Set<Object> joinedKeys = new HashSet<Object>();
       for (Tuple tuple : tuples) {
         Object key = getObject(tuple, keyName);
         if (data.containsKey(key)) {
@@ -216,7 +216,7 @@ public class BagJoin extends AliasableEvalFunc<DataBag>
   {
     retrieveContextValues();
 
-    HashMap<String,String> joinKeyNames = new HashMap<>();
+    HashMap<String,String> joinKeyNames = new HashMap<String,String>();
     for (int i = 1; i < input.size(); i += 2) {
       joinKeyNames.put(bagNames.get(i / 2), (String) input.get(i));
     }

http://git-wip-us.apache.org/repos/asf/incubator-datafu/blob/89fe0bec/datafu-pig/src/test/java/datafu/test/pig/bags/BagTests.java
----------------------------------------------------------------------
diff --git a/datafu-pig/src/test/java/datafu/test/pig/bags/BagTests.java b/datafu-pig/src/test/java/datafu/test/pig/bags/BagTests.java
index 427285b..57917e3 100644
--- a/datafu-pig/src/test/java/datafu/test/pig/bags/BagTests.java
+++ b/datafu-pig/src/test/java/datafu/test/pig/bags/BagTests.java
@@ -1193,6 +1193,8 @@ public class BagTests extends PigTests
         assertOutput(test, "data2",
                 "(1,{(K1,A1,K1,A2,K1,A3),(K2,B1,K2,B2,,),(K2,B1,K2,B22,,),(K3,C1,,,K3,C3),(,,,,K4,D3)},{(K1,A1,K1,A3,K1,A2),(K2,B1,,,K2,B2),(K2,B1,,,K2,B22),(K3,C1,K3,C3,,),(,,K4,D3,,)})");
     }
+    
+
 
   /**
 


Mime
View raw message