You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streams.apache.org by mf...@apache.org on 2014/09/25 16:51:19 UTC

[1/3] git commit: STREAMS-178 | Modified the behavior of the LinkResolverProcessor's unwind method. Duplicate unwound links are now consolidated into a unique set of links

Repository: incubator-streams
Updated Branches:
  refs/heads/master 12923758a -> 5f47348c0


STREAMS-178 | Modified the behavior of the LinkResolverProcessor's unwind method. Duplicate unwound links are now consolidated into a unique set of links


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

Branch: refs/heads/master
Commit: f76f2de5923e63405229e2c83acc12156fe0c8de
Parents: dc5e7de
Author: Robert Douglas <rd...@w2odigital.com>
Authored: Thu Sep 18 10:46:23 2014 -0500
Committer: Robert Douglas <rd...@w2odigital.com>
Committed: Thu Sep 18 10:46:23 2014 -0500

----------------------------------------------------------------------
 .../java/org/apache/streams/urls/LinkResolverProcessor.java  | 8 ++++----
 .../org/apache/streams/urls/TestLinkUnwinderProcessor.java   | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/f76f2de5/streams-contrib/streams-processor-urls/src/main/java/org/apache/streams/urls/LinkResolverProcessor.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-processor-urls/src/main/java/org/apache/streams/urls/LinkResolverProcessor.java b/streams-contrib/streams-processor-urls/src/main/java/org/apache/streams/urls/LinkResolverProcessor.java
index 8268c27..0b4cd7c 100644
--- a/streams-contrib/streams-processor-urls/src/main/java/org/apache/streams/urls/LinkResolverProcessor.java
+++ b/streams-contrib/streams-processor-urls/src/main/java/org/apache/streams/urls/LinkResolverProcessor.java
@@ -48,7 +48,7 @@ public class LinkResolverProcessor implements StreamsProcessor {
         if (entry.getDocument() instanceof Activity) {
             activity = (Activity) entry.getDocument();
 
-            activity.setLinks(unwind(activity.getLinks()));
+            activity.setLinks(Lists.newArrayList(unwind(activity.getLinks())));
 
             entry.setDocument(activity);
 
@@ -65,7 +65,7 @@ public class LinkResolverProcessor implements StreamsProcessor {
                 return (Lists.newArrayList(entry));
             }
 
-            activity.setLinks(unwind(activity.getLinks()));
+            activity.setLinks(Lists.newArrayList(unwind(activity.getLinks())));
 
             try {
                 entry.setDocument(mapper.writeValueAsString(activity));
@@ -96,8 +96,8 @@ public class LinkResolverProcessor implements StreamsProcessor {
     }
 
 
-    protected List<String> unwind(List<String> inputLinks) {
-        List<String> outputLinks = Lists.newArrayList();
+    protected Set<String> unwind(List<String> inputLinks) {
+        Set<String> outputLinks = new HashSet<String>();
         for (String link : inputLinks) {
             try {
                 LinkResolver unwinder = new LinkResolver(link);

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/f76f2de5/streams-contrib/streams-processor-urls/src/test/java/org/apache/streams/urls/TestLinkUnwinderProcessor.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-processor-urls/src/test/java/org/apache/streams/urls/TestLinkUnwinderProcessor.java b/streams-contrib/streams-processor-urls/src/test/java/org/apache/streams/urls/TestLinkUnwinderProcessor.java
index ded640f..281f320 100644
--- a/streams-contrib/streams-processor-urls/src/test/java/org/apache/streams/urls/TestLinkUnwinderProcessor.java
+++ b/streams-contrib/streams-processor-urls/src/test/java/org/apache/streams/urls/TestLinkUnwinderProcessor.java
@@ -76,8 +76,8 @@ public class TestLinkUnwinderProcessor {
 
     @Test
     public void testActivityLinkUnwinderProcessorMulti() throws Exception{
-        testActivityUnwinderHelper(Lists.newArrayList("http://x.co/3yapt", "http://ow.ly/u4Kte", "http://goo.gl/wSrHDA"), Lists.newArrayList("http://www.wcgworld.com/", "http://www.wcgworld.com/", "http://www.wcgworld.com/"));
-        testStringActivityUnwinderHelper(Lists.newArrayList("http://x.co/3yapt", "http://ow.ly/u4Kte", "http://goo.gl/wSrHDA"), Lists.newArrayList("http://www.wcgworld.com/", "http://www.wcgworld.com/", "http://www.wcgworld.com/"));
+        testActivityUnwinderHelper(Lists.newArrayList("http://x.co/3yapt", "http://ow.ly/u4Kte", "http://goo.gl/wSrHDA"), Lists.newArrayList("http://www.wcgworld.com/"));//, "http://www.wcgworld.com/", "http://www.wcgworld.com/"));
+        testStringActivityUnwinderHelper(Lists.newArrayList("http://x.co/3yapt", "http://ow.ly/u4Kte", "http://goo.gl/wSrHDA"), Lists.newArrayList("http://www.wcgworld.com/"));//, "http://www.wcgworld.com/", "http://www.wcgworld.com/"));
     }
 
     @Test


[2/3] git commit: STREAMS-178 | Removed commented out code

Posted by mf...@apache.org.
STREAMS-178 | Removed commented out code


Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/0b176e68
Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/0b176e68
Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/0b176e68

Branch: refs/heads/master
Commit: 0b176e680b506558d21ad1a69ef10b5d35809c99
Parents: f76f2de
Author: Robert Douglas <rd...@w2odigital.com>
Authored: Thu Sep 18 10:54:07 2014 -0500
Committer: Robert Douglas <rd...@w2odigital.com>
Committed: Thu Sep 18 10:54:07 2014 -0500

----------------------------------------------------------------------
 .../java/org/apache/streams/urls/TestLinkUnwinderProcessor.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/0b176e68/streams-contrib/streams-processor-urls/src/test/java/org/apache/streams/urls/TestLinkUnwinderProcessor.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-processor-urls/src/test/java/org/apache/streams/urls/TestLinkUnwinderProcessor.java b/streams-contrib/streams-processor-urls/src/test/java/org/apache/streams/urls/TestLinkUnwinderProcessor.java
index 281f320..ee1f83e 100644
--- a/streams-contrib/streams-processor-urls/src/test/java/org/apache/streams/urls/TestLinkUnwinderProcessor.java
+++ b/streams-contrib/streams-processor-urls/src/test/java/org/apache/streams/urls/TestLinkUnwinderProcessor.java
@@ -76,8 +76,8 @@ public class TestLinkUnwinderProcessor {
 
     @Test
     public void testActivityLinkUnwinderProcessorMulti() throws Exception{
-        testActivityUnwinderHelper(Lists.newArrayList("http://x.co/3yapt", "http://ow.ly/u4Kte", "http://goo.gl/wSrHDA"), Lists.newArrayList("http://www.wcgworld.com/"));//, "http://www.wcgworld.com/", "http://www.wcgworld.com/"));
-        testStringActivityUnwinderHelper(Lists.newArrayList("http://x.co/3yapt", "http://ow.ly/u4Kte", "http://goo.gl/wSrHDA"), Lists.newArrayList("http://www.wcgworld.com/"));//, "http://www.wcgworld.com/", "http://www.wcgworld.com/"));
+        testActivityUnwinderHelper(Lists.newArrayList("http://x.co/3yapt", "http://ow.ly/u4Kte", "http://goo.gl/wSrHDA"), Lists.newArrayList("http://www.wcgworld.com/"));
+        testStringActivityUnwinderHelper(Lists.newArrayList("http://x.co/3yapt", "http://ow.ly/u4Kte", "http://goo.gl/wSrHDA"), Lists.newArrayList("http://www.wcgworld.com/"));
     }
 
     @Test


[3/3] git commit: Merge PR#90 from 'robdouglas/STREAMS-178'

Posted by mf...@apache.org.
Merge PR#90 from 'robdouglas/STREAMS-178'


Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/5f47348c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/5f47348c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/5f47348c

Branch: refs/heads/master
Commit: 5f47348c06c93e7ddc35bfa671cfae6986c936e6
Parents: 1292375 0b176e6
Author: Matt Franklin <mf...@apache.org>
Authored: Wed Sep 24 14:48:10 2014 -0400
Committer: Matt Franklin <mf...@apache.org>
Committed: Wed Sep 24 14:48:10 2014 -0400

----------------------------------------------------------------------
 .../java/org/apache/streams/urls/LinkResolverProcessor.java  | 8 ++++----
 .../org/apache/streams/urls/TestLinkUnwinderProcessor.java   | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------