This is an automated email from the ASF dual-hosted git repository. lresende pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/bahir-website.git
commit aa57e4495481bc349132bfe4588cbfbc30be2695 Author: Luciano Resende <[email protected]> AuthorDate: Fri Mar 13 20:44:46 2020 -0700 Fix sample code syntax for pubnub extension --- site/docs/spark/2.3.0/spark-streaming-pubnub.md | 16 ++++++++-------- site/docs/spark/2.3.1/spark-streaming-pubnub.md | 16 ++++++++-------- site/docs/spark/2.3.2/spark-streaming-pubnub.md | 16 ++++++++-------- site/docs/spark/current/spark-streaming-pubnub.md | 16 ++++++++-------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/site/docs/spark/2.3.0/spark-streaming-pubnub.md b/site/docs/spark/2.3.0/spark-streaming-pubnub.md index 0ebbf88..5407747 100644 --- a/site/docs/spark/2.3.0/spark-streaming-pubnub.md +++ b/site/docs/spark/2.3.0/spark-streaming-pubnub.md @@ -31,11 +31,11 @@ Library for reading data from real-time messaging infrastructure [PubNub](https: ## Linking Using SBT: - + libraryDependencies += "org.apache.bahir" %% "spark-streaming-pubnub" % "2.3.0" - + Using Maven: - + <dependency> <groupId>org.apache.bahir</groupId> <artifactId>spark-streaming-pubnub_2.11</artifactId> @@ -64,7 +64,7 @@ For complete code examples, please review _examples_ directory. import com.pubnub.api.PNConfiguration import com.pubnub.api.enums.PNReconnectionPolicy - + import org.apache.spark.streaming.pubnub.{PubNubUtils, SparkPubNubMessage} val config = new PNConfiguration @@ -81,7 +81,7 @@ For complete code examples, please review _examples_ directory. import com.pubnub.api.PNConfiguration import com.pubnub.api.enums.PNReconnectionPolicy - + import org.apache.spark.streaming.pubnub.PubNubUtils import org.apache.spark.streaming.pubnub.SparkPubNubMessage @@ -89,9 +89,9 @@ For complete code examples, please review _examples_ directory. config.setSubscribeKey(subscribeKey) config.setSecure(true) config.setReconnectionPolicy(PNReconnectionPolicy.LINEAR) - Set<String> channels = new HashSet<String>() {{ + Set<String> channels = new HashSet<String>() { add("my-channel"); - }}; + }; ReceiverInputDStream<SparkPubNubMessage> pubNubStream = PubNubUtils.createStream( ssc, config, channels, Collections.EMPTY_SET, null, @@ -100,4 +100,4 @@ For complete code examples, please review _examples_ directory. ## Unit Test -Unit tests take advantage of publicly available _demo_ subscription and and publish key, which has limited request rate. \ No newline at end of file +Unit tests take advantage of publicly available _demo_ subscription and and publish key, which has limited request rate. diff --git a/site/docs/spark/2.3.1/spark-streaming-pubnub.md b/site/docs/spark/2.3.1/spark-streaming-pubnub.md index 8b16407..8cebb51 100644 --- a/site/docs/spark/2.3.1/spark-streaming-pubnub.md +++ b/site/docs/spark/2.3.1/spark-streaming-pubnub.md @@ -31,11 +31,11 @@ Library for reading data from real-time messaging infrastructure [PubNub](https: ## Linking Using SBT: - + libraryDependencies += "org.apache.bahir" %% "spark-streaming-pubnub" % "2.3.1" - + Using Maven: - + <dependency> <groupId>org.apache.bahir</groupId> <artifactId>spark-streaming-pubnub_2.11</artifactId> @@ -64,7 +64,7 @@ For complete code examples, please review _examples_ directory. import com.pubnub.api.PNConfiguration import com.pubnub.api.enums.PNReconnectionPolicy - + import org.apache.spark.streaming.pubnub.{PubNubUtils, SparkPubNubMessage} val config = new PNConfiguration @@ -81,7 +81,7 @@ For complete code examples, please review _examples_ directory. import com.pubnub.api.PNConfiguration import com.pubnub.api.enums.PNReconnectionPolicy - + import org.apache.spark.streaming.pubnub.PubNubUtils import org.apache.spark.streaming.pubnub.SparkPubNubMessage @@ -89,9 +89,9 @@ For complete code examples, please review _examples_ directory. config.setSubscribeKey(subscribeKey) config.setSecure(true) config.setReconnectionPolicy(PNReconnectionPolicy.LINEAR) - Set<String> channels = new HashSet<String>() {{ + Set<String> channels = new HashSet<String>() { add("my-channel"); - }}; + }; ReceiverInputDStream<SparkPubNubMessage> pubNubStream = PubNubUtils.createStream( ssc, config, channels, Collections.EMPTY_SET, null, @@ -100,4 +100,4 @@ For complete code examples, please review _examples_ directory. ## Unit Test -Unit tests take advantage of publicly available _demo_ subscription and and publish key, which has limited request rate. \ No newline at end of file +Unit tests take advantage of publicly available _demo_ subscription and and publish key, which has limited request rate. diff --git a/site/docs/spark/2.3.2/spark-streaming-pubnub.md b/site/docs/spark/2.3.2/spark-streaming-pubnub.md index 7901044..50d0445 100644 --- a/site/docs/spark/2.3.2/spark-streaming-pubnub.md +++ b/site/docs/spark/2.3.2/spark-streaming-pubnub.md @@ -31,11 +31,11 @@ Library for reading data from real-time messaging infrastructure [PubNub](https: ## Linking Using SBT: - + libraryDependencies += "org.apache.bahir" %% "spark-streaming-pubnub" % "2.3.2" - + Using Maven: - + <dependency> <groupId>org.apache.bahir</groupId> <artifactId>spark-streaming-pubnub_2.11</artifactId> @@ -64,7 +64,7 @@ For complete code examples, please review _examples_ directory. import com.pubnub.api.PNConfiguration import com.pubnub.api.enums.PNReconnectionPolicy - + import org.apache.spark.streaming.pubnub.{PubNubUtils, SparkPubNubMessage} val config = new PNConfiguration @@ -81,7 +81,7 @@ For complete code examples, please review _examples_ directory. import com.pubnub.api.PNConfiguration import com.pubnub.api.enums.PNReconnectionPolicy - + import org.apache.spark.streaming.pubnub.PubNubUtils import org.apache.spark.streaming.pubnub.SparkPubNubMessage @@ -89,9 +89,9 @@ For complete code examples, please review _examples_ directory. config.setSubscribeKey(subscribeKey) config.setSecure(true) config.setReconnectionPolicy(PNReconnectionPolicy.LINEAR) - Set<String> channels = new HashSet<String>() {{ + Set<String> channels = new HashSet<String>() { add("my-channel"); - }}; + }; ReceiverInputDStream<SparkPubNubMessage> pubNubStream = PubNubUtils.createStream( ssc, config, channels, Collections.EMPTY_SET, null, @@ -100,4 +100,4 @@ For complete code examples, please review _examples_ directory. ## Unit Test -Unit tests take advantage of publicly available _demo_ subscription and and publish key, which has limited request rate. \ No newline at end of file +Unit tests take advantage of publicly available _demo_ subscription and and publish key, which has limited request rate. diff --git a/site/docs/spark/current/spark-streaming-pubnub.md b/site/docs/spark/current/spark-streaming-pubnub.md index e190934..84f7fe8 100644 --- a/site/docs/spark/current/spark-streaming-pubnub.md +++ b/site/docs/spark/current/spark-streaming-pubnub.md @@ -31,11 +31,11 @@ Library for reading data from real-time messaging infrastructure [PubNub](https: ## Linking Using SBT: - + libraryDependencies += "org.apache.bahir" %% "spark-streaming-pubnub" % "{{site.SPARK_VERSION}}" - + Using Maven: - + <dependency> <groupId>org.apache.bahir</groupId> <artifactId>spark-streaming-pubnub_{{site.SCALA_BINARY_VERSION}}</artifactId> @@ -64,7 +64,7 @@ For complete code examples, please review _examples_ directory. import com.pubnub.api.PNConfiguration import com.pubnub.api.enums.PNReconnectionPolicy - + import org.apache.spark.streaming.pubnub.{PubNubUtils, SparkPubNubMessage} val config = new PNConfiguration @@ -81,7 +81,7 @@ For complete code examples, please review _examples_ directory. import com.pubnub.api.PNConfiguration import com.pubnub.api.enums.PNReconnectionPolicy - + import org.apache.spark.streaming.pubnub.PubNubUtils import org.apache.spark.streaming.pubnub.SparkPubNubMessage @@ -89,9 +89,9 @@ For complete code examples, please review _examples_ directory. config.setSubscribeKey(subscribeKey) config.setSecure(true) config.setReconnectionPolicy(PNReconnectionPolicy.LINEAR) - Set<String> channels = new HashSet<String>() {{ + Set<String> channels = new HashSet<String>() { add("my-channel"); - }}; + }; ReceiverInputDStream<SparkPubNubMessage> pubNubStream = PubNubUtils.createStream( ssc, config, channels, Collections.EMPTY_SET, null, @@ -100,4 +100,4 @@ For complete code examples, please review _examples_ directory. ## Unit Test -Unit tests take advantage of publicly available _demo_ subscription and and publish key, which has limited request rate. \ No newline at end of file +Unit tests take advantage of publicly available _demo_ subscription and and publish key, which has limited request rate.
