Skip to content

Commit e9bb12b

Browse files
committed
[SPARK-1981][Streaming][Hotfix] Fixed docs related to kinesis
- Include kinesis in the unidocs - Hide non-public classes from docs Author: Tathagata Das <[email protected]> Closes apache#2239 from tdas/kinesis-doc-fix and squashes the following commits: 156e20c [Tathagata Das] More fixes, based on PR comments. e9a6c01 [Tathagata Das] Fixed docs related to kinesis
1 parent aa7de12 commit e9bb12b

File tree

5 files changed

+17
-16
lines changed

5 files changed

+17
-16
lines changed

docs/_plugins/copy_api_dirs.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
curr_dir = pwd
2626
cd("..")
2727

28-
puts "Running 'sbt/sbt compile unidoc' from " + pwd + "; this may take a few minutes..."
29-
puts `sbt/sbt compile unidoc`
28+
puts "Running 'sbt/sbt -Pkinesis-asl compile unidoc' from " + pwd + "; this may take a few minutes..."
29+
puts `sbt/sbt -Pkinesis-asl compile unidoc`
3030

3131
puts "Moving back into docs dir."
3232
cd("docs")

extras/kinesis-asl/src/main/java/org/apache/spark/examples/streaming/JavaKinesisWordCountASL.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
* onto the Kinesis stream.
7676
* Usage instructions for KinesisWordCountProducerASL are provided in the class definition.
7777
*/
78-
public final class JavaKinesisWordCountASL {
78+
public final class JavaKinesisWordCountASL { // needs to be public for access from run-example
7979
private static final Pattern WORD_SEPARATOR = Pattern.compile(" ");
8080
private static final Logger logger = Logger.getLogger(JavaKinesisWordCountASL.class);
8181

@@ -87,10 +87,10 @@ public static void main(String[] args) {
8787
/* Check that all required args were passed in. */
8888
if (args.length < 2) {
8989
System.err.println(
90-
"|Usage: KinesisWordCount <stream-name> <endpoint-url>\n" +
91-
"| <stream-name> is the name of the Kinesis stream\n" +
92-
"| <endpoint-url> is the endpoint of the Kinesis service\n" +
93-
"| (e.g. https://kinesis.us-east-1.amazonaws.com)\n");
90+
"Usage: JavaKinesisWordCountASL <stream-name> <endpoint-url>\n" +
91+
" <stream-name> is the name of the Kinesis stream\n" +
92+
" <endpoint-url> is the endpoint of the Kinesis service\n" +
93+
" (e.g. https://kinesis.us-east-1.amazonaws.com)\n");
9494
System.exit(1);
9595
}
9696

extras/kinesis-asl/src/main/scala/org/apache/spark/examples/streaming/KinesisWordCountASL.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ import org.apache.log4j.Level
6969
* dummy data onto the Kinesis stream.
7070
* Usage instructions for KinesisWordCountProducerASL are provided in that class definition.
7171
*/
72-
object KinesisWordCountASL extends Logging {
72+
private object KinesisWordCountASL extends Logging {
7373
def main(args: Array[String]) {
7474
/* Check that all required args were passed in. */
7575
if (args.length < 2) {
@@ -154,7 +154,7 @@ object KinesisWordCountASL extends Logging {
154154
* org.apache.spark.examples.streaming.KinesisWordCountProducerASL mySparkStream \
155155
* https://kinesis.us-east-1.amazonaws.com 10 5
156156
*/
157-
object KinesisWordCountProducerASL {
157+
private object KinesisWordCountProducerASL {
158158
def main(args: Array[String]) {
159159
if (args.length < 4) {
160160
System.err.println("Usage: KinesisWordCountProducerASL <stream-name> <endpoint-url>" +
@@ -235,7 +235,7 @@ object KinesisWordCountProducerASL {
235235
* Utility functions for Spark Streaming examples.
236236
* This has been lifted from the examples/ project to remove the circular dependency.
237237
*/
238-
object StreamingExamples extends Logging {
238+
private[streaming] object StreamingExamples extends Logging {
239239

240240
/** Set reasonable logging levels for streaming if the user has not configured log4j. */
241241
def setStreamingLogLevels() {

extras/kinesis-asl/src/main/scala/org/apache/spark/streaming/kinesis/KinesisUtils.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import com.amazonaws.services.kinesis.clientlibrary.lib.worker.InitialPositionIn
3535
object KinesisUtils {
3636
/**
3737
* Create an InputDStream that pulls messages from a Kinesis stream.
38-
*
38+
* :: Experimental ::
3939
* @param ssc StreamingContext object
4040
* @param streamName Kinesis stream name
4141
* @param endpointUrl Url of Kinesis service (e.g., https://kinesis.us-east-1.amazonaws.com)
@@ -52,6 +52,7 @@ object KinesisUtils {
5252
*
5353
* @return ReceiverInputDStream[Array[Byte]]
5454
*/
55+
@Experimental
5556
def createStream(
5657
ssc: StreamingContext,
5758
streamName: String,
@@ -65,9 +66,8 @@ object KinesisUtils {
6566

6667
/**
6768
* Create a Java-friendly InputDStream that pulls messages from a Kinesis stream.
68-
*
69+
* :: Experimental ::
6970
* @param jssc Java StreamingContext object
70-
* @param ssc StreamingContext object
7171
* @param streamName Kinesis stream name
7272
* @param endpointUrl Url of Kinesis service (e.g., https://kinesis.us-east-1.amazonaws.com)
7373
* @param checkpointInterval Checkpoint interval for Kinesis checkpointing.
@@ -83,6 +83,7 @@ object KinesisUtils {
8383
*
8484
* @return JavaReceiverInputDStream[Array[Byte]]
8585
*/
86+
@Experimental
8687
def createStream(
8788
jssc: JavaStreamingContext,
8889
streamName: String,

project/SparkBuild.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,9 @@ object Unidoc {
290290
publish := {},
291291

292292
unidocProjectFilter in(ScalaUnidoc, unidoc) :=
293-
inAnyProject -- inProjects(OldDeps.project, repl, examples, tools, catalyst, yarn, yarnAlpha),
293+
inAnyProject -- inProjects(OldDeps.project, repl, examples, tools, catalyst, streamingFlumeSink, yarn, yarnAlpha),
294294
unidocProjectFilter in(JavaUnidoc, unidoc) :=
295-
inAnyProject -- inProjects(OldDeps.project, repl, bagel, graphx, examples, tools, catalyst, yarn, yarnAlpha),
295+
inAnyProject -- inProjects(OldDeps.project, repl, bagel, graphx, examples, tools, catalyst, streamingFlumeSink, yarn, yarnAlpha),
296296

297297
// Skip class names containing $ and some internal packages in Javadocs
298298
unidocAllSources in (JavaUnidoc, unidoc) := {
@@ -314,7 +314,7 @@ object Unidoc {
314314
"-group", "Core Java API", packageList("api.java", "api.java.function"),
315315
"-group", "Spark Streaming", packageList(
316316
"streaming.api.java", "streaming.flume", "streaming.kafka",
317-
"streaming.mqtt", "streaming.twitter", "streaming.zeromq"
317+
"streaming.mqtt", "streaming.twitter", "streaming.zeromq", "streaming.kinesis"
318318
),
319319
"-group", "MLlib", packageList(
320320
"mllib.classification", "mllib.clustering", "mllib.evaluation.binary", "mllib.linalg",

0 commit comments

Comments
 (0)