cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [03/37] cxf git commit: Minor update to the spark demo for now
Date Sat, 10 Sep 2016 14:41:11 GMT
Minor update to the spark demo for now


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

Branch: refs/heads/master-jaxrs-2.1
Commit: 5d73e20b4539bfa4c8ca607b27a1c1ea1850e095
Parents: 005ec0a
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Mon Sep 5 14:02:08 2016 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Mon Sep 5 14:02:08 2016 +0100

----------------------------------------------------------------------
 distribution/src/main/release/samples/jax_rs/spark/pom.xml      | 2 +-
 .../jax_rs/spark/src/main/java/demo/jaxrs/server/Server.java    | 2 +-
 .../spark/src/main/java/demo/jaxrs/server/StreamingService.java | 5 +++--
 3 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/5d73e20b/distribution/src/main/release/samples/jax_rs/spark/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/spark/pom.xml b/distribution/src/main/release/samples/jax_rs/spark/pom.xml
index 2971162..b2541a0 100644
--- a/distribution/src/main/release/samples/jax_rs/spark/pom.xml
+++ b/distribution/src/main/release/samples/jax_rs/spark/pom.xml
@@ -46,7 +46,7 @@
         <dependency>
             <groupId>org.apache.spark</groupId>
             <artifactId>spark-streaming_2.10</artifactId>
-            <version>1.6.0</version>
+            <version>2.0.0-preview</version>
             <exclusions>
             <exclusion>
               <groupId>io.netty</groupId>

http://git-wip-us.apache.org/repos/asf/cxf/blob/5d73e20b/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/Server.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/Server.java
b/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/Server.java
index 31a9d04..c74b215 100644
--- a/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/Server.java
+++ b/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/Server.java
@@ -40,8 +40,8 @@ public class Server {
 
     public static void main(String args[]) throws Exception {
         new Server();
-        Thread.sleep(60 * 60 * 1000);
         System.out.println("Server ready...");
+        Thread.sleep(60 * 60 * 1000);
         System.out.println("Server exiting");
         System.exit(0);
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/5d73e20b/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/StreamingService.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/StreamingService.java
b/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/StreamingService.java
index 9e5f9c3..801fa55 100644
--- a/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/StreamingService.java
+++ b/distribution/src/main/release/samples/jax_rs/spark/src/main/java/demo/jaxrs/server/StreamingService.java
@@ -20,6 +20,7 @@ package demo.jaxrs.server;
 
 import java.io.InputStream;
 import java.util.Arrays;
+import java.util.Iterator;
 
 import javax.ws.rs.Consumes;
 import javax.ws.rs.POST;
@@ -77,8 +78,8 @@ public class StreamingService {
         final JavaDStream<String> words = receiverStream.flatMap(
             new FlatMapFunction<String, String>() {
                 @Override 
-                public Iterable<String> call(String x) {
-                    return Arrays.asList(x.split(" "));
+                public Iterator<String> call(String x) {
+                    return Arrays.asList(x.split(" ")).iterator();
                 }
             });
         final JavaPairDStream<String, Integer> pairs = words.mapToPair(


Mime
View raw message