[GitHub] spark pull request: [SPARK-12376][TESTS] Spark Streaming Java8APIS...

2015-12-17 Thread srowen
Github user srowen commented on the pull request:

https://github.com/apache/spark/pull/10336#issuecomment-165480439
  
LGTM


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-12376][TESTS] Spark Streaming Java8APIS...

2015-12-17 Thread SparkQA
Github user SparkQA commented on the pull request:

https://github.com/apache/spark/pull/10336#issuecomment-165481104
  
**[Test build #2223 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2223/consoleFull)**
 for PR 10336 at commit 
[`8addf75`](https://github.com/apache/spark/commit/8addf75bd064f7f02bcb5373bb84d7d925a5f0eb).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-12376][TESTS] Spark Streaming Java8APIS...

2015-12-17 Thread SparkQA
Github user SparkQA commented on the pull request:

https://github.com/apache/spark/pull/10336#issuecomment-165522251
  
**[Test build #2223 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2223/consoleFull)**
 for PR 10336 at commit 
[`8addf75`](https://github.com/apache/spark/commit/8addf75bd064f7f02bcb5373bb84d7d925a5f0eb).
 * This patch passes all tests.
 * This patch merges cleanly.
 * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-12376][TESTS] Spark Streaming Java8APIS...

2015-12-17 Thread zsxwing
Github user zsxwing commented on the pull request:

https://github.com/apache/spark/pull/10336#issuecomment-165599347
  
Thanks @evanyc15 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-12376][TESTS] Spark Streaming Java8APIS...

2015-12-17 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/spark/pull/10336


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-12376][TESTS] Spark Streaming Java8APIS...

2015-12-17 Thread zsxwing
Github user zsxwing commented on the pull request:

https://github.com/apache/spark/pull/10336#issuecomment-165599161
  
LGTM. Merging to master and 1.6


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-12376][TESTS] Spark Streaming Java8APIS...

2015-12-16 Thread evanyc15
GitHub user evanyc15 opened a pull request:

https://github.com/apache/spark/pull/10336

[SPARK-12376][TESTS] Spark Streaming Java8APISuite fails in 
assertOrderInvariantEquals method

org.apache.spark.streaming.Java8APISuite.java is failing due to trying to 
sort immutable list in assertOrderInvariantEquals method.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/evanyc15/spark 
SPARK-12376-StreamingJavaAPISuite

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/spark/pull/10336.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #10336


commit 28ff404c59aeff1b6604b70fb153d4d33e21635b
Author: Evan Chen 
Date:   2015-12-16T20:27:51Z

Changes to Spark Streaming Java8APISuite.java




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-12376][TESTS] Spark Streaming Java8APIS...

2015-12-16 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request:

https://github.com/apache/spark/pull/10336#issuecomment-165236230
  
Can one of the admins verify this patch?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-12376][TESTS] Spark Streaming Java8APIS...

2015-12-16 Thread srowen
Github user srowen commented on a diff in the pull request:

https://github.com/apache/spark/pull/10336#discussion_r47829739
  
--- Diff: 
extras/java8-tests/src/test/java/org/apache/spark/streaming/Java8APISuite.java 
---
@@ -440,8 +441,13 @@ public void testPairFlatMap() {
   public static > void assertOrderInvariantEquals(
 List expected, List actual) {
 expected.forEach((List list) -> Collections.sort(list));
-actual.forEach((List list) -> Collections.sort(list));
-Assert.assertEquals(expected, actual);
+ArrayList sortedActual = new ArrayList();
+actual.forEach((List list) -> {
--- End diff --

Can this be cleverer, like 

```
List actualSorted = actual.stream().map(unsorted -> {
  List sorted = new ArrayList<>(unsorted);
  Collections.sort(sorted);
  return sorted;
});
```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-12376][TESTS] Spark Streaming Java8APIS...

2015-12-16 Thread srowen
Github user srowen commented on a diff in the pull request:

https://github.com/apache/spark/pull/10336#discussion_r47829614
  
--- Diff: 
extras/java8-tests/src/test/java/org/apache/spark/streaming/Java8APISuite.java 
---
@@ -440,8 +441,13 @@ public void testPairFlatMap() {
   public static > void assertOrderInvariantEquals(
 List expected, List actual) {
 expected.forEach((List list) -> Collections.sort(list));
-actual.forEach((List list) -> Collections.sort(list));
-Assert.assertEquals(expected, actual);
+ArrayList sortedActual = new ArrayList();
--- End diff --

I think this can be `List sortedActual = new ArrayList<>();` 
right? And similarly below.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-12376][TESTS] Spark Streaming Java8APIS...

2015-12-16 Thread srowen
Github user srowen commented on a diff in the pull request:

https://github.com/apache/spark/pull/10336#discussion_r47839846
  
--- Diff: 
extras/java8-tests/src/test/java/org/apache/spark/streaming/Java8APISuite.java 
---
@@ -440,8 +441,13 @@ public void testPairFlatMap() {
   public static > void assertOrderInvariantEquals(
 List expected, List actual) {
 expected.forEach((List list) -> Collections.sort(list));
-actual.forEach((List list) -> Collections.sort(list));
-Assert.assertEquals(expected, actual);
+ArrayList sortedActual = new ArrayList();
+actual.forEach((List list) -> {
--- End diff --

Really? it's a little less code and matches the functional style of other 
(Scala) code. Performance is not an issue here. However I forgot the collect(). 
How about:

```
List actualSorted = actual.stream().
  map(l -> new ArrayList<>(l)).map(Collections::sort).
  collect(Collectors.toList());
```



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-12376][TESTS] Spark Streaming Java8APIS...

2015-12-16 Thread evanyc15
Github user evanyc15 commented on a diff in the pull request:

https://github.com/apache/spark/pull/10336#discussion_r47838157
  
--- Diff: 
extras/java8-tests/src/test/java/org/apache/spark/streaming/Java8APISuite.java 
---
@@ -440,8 +441,13 @@ public void testPairFlatMap() {
   public static > void assertOrderInvariantEquals(
 List expected, List actual) {
 expected.forEach((List list) -> Collections.sort(list));
-actual.forEach((List list) -> Collections.sort(list));
-Assert.assertEquals(expected, actual);
+ArrayList sortedActual = new ArrayList();
+actual.forEach((List list) -> {
--- End diff --

Hey srowen,

I feel like this can be more confusing to follow. Does your code 
alternative have any increases in performance?

Thank you


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-12376][TESTS] Spark Streaming Java8APIS...

2015-12-16 Thread srowen
Github user srowen commented on a diff in the pull request:

https://github.com/apache/spark/pull/10336#discussion_r47840130
  
--- Diff: 
extras/java8-tests/src/test/java/org/apache/spark/streaming/Java8APISuite.java 
---
@@ -440,8 +441,13 @@ public void testPairFlatMap() {
   public static > void assertOrderInvariantEquals(
 List expected, List actual) {
 expected.forEach((List list) -> Collections.sort(list));
-actual.forEach((List list) -> Collections.sort(list));
-Assert.assertEquals(expected, actual);
+List sortedActual = new ArrayList<>();
+actual.forEach((List list) -> {
--- End diff --

The arg does not need a type.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [SPARK-12376][TESTS] Spark Streaming Java8APIS...

2015-12-16 Thread srowen
Github user srowen commented on a diff in the pull request:

https://github.com/apache/spark/pull/10336#discussion_r47840095
  
--- Diff: 
extras/java8-tests/src/test/java/org/apache/spark/streaming/Java8APISuite.java 
---
@@ -25,6 +25,7 @@
 import com.google.common.base.Optional;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
+import com.google.common.collect.Ordering;
--- End diff --

I don't think this is used.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org