Skip to content
Snippets Groups Projects
Commit e9bb12be authored by Tathagata Das's avatar Tathagata Das
Browse files

[SPARK-1981][Streaming][Hotfix] Fixed docs related to kinesis

- Include kinesis in the unidocs
- Hide non-public classes from docs

Author: Tathagata Das <tathagata.das1565@gmail.com>

Closes #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
parent aa7de128
No related branches found
No related tags found
No related merge requests found
...@@ -25,8 +25,8 @@ if not (ENV['SKIP_API'] == '1' or ENV['SKIP_SCALADOC'] == '1') ...@@ -25,8 +25,8 @@ if not (ENV['SKIP_API'] == '1' or ENV['SKIP_SCALADOC'] == '1')
curr_dir = pwd curr_dir = pwd
cd("..") cd("..")
puts "Running 'sbt/sbt compile unidoc' from " + pwd + "; this may take a few minutes..." puts "Running 'sbt/sbt -Pkinesis-asl compile unidoc' from " + pwd + "; this may take a few minutes..."
puts `sbt/sbt compile unidoc` puts `sbt/sbt -Pkinesis-asl compile unidoc`
puts "Moving back into docs dir." puts "Moving back into docs dir."
cd("docs") cd("docs")
......
...@@ -75,7 +75,7 @@ import com.google.common.collect.Lists; ...@@ -75,7 +75,7 @@ import com.google.common.collect.Lists;
* onto the Kinesis stream. * onto the Kinesis stream.
* Usage instructions for KinesisWordCountProducerASL are provided in the class definition. * Usage instructions for KinesisWordCountProducerASL are provided in the class definition.
*/ */
public final class JavaKinesisWordCountASL { public final class JavaKinesisWordCountASL { // needs to be public for access from run-example
private static final Pattern WORD_SEPARATOR = Pattern.compile(" "); private static final Pattern WORD_SEPARATOR = Pattern.compile(" ");
private static final Logger logger = Logger.getLogger(JavaKinesisWordCountASL.class); private static final Logger logger = Logger.getLogger(JavaKinesisWordCountASL.class);
...@@ -87,10 +87,10 @@ public final class JavaKinesisWordCountASL { ...@@ -87,10 +87,10 @@ public final class JavaKinesisWordCountASL {
/* Check that all required args were passed in. */ /* Check that all required args were passed in. */
if (args.length < 2) { if (args.length < 2) {
System.err.println( System.err.println(
"|Usage: KinesisWordCount <stream-name> <endpoint-url>\n" + "Usage: JavaKinesisWordCountASL <stream-name> <endpoint-url>\n" +
"| <stream-name> is the name of the Kinesis stream\n" + " <stream-name> is the name of the Kinesis stream\n" +
"| <endpoint-url> is the endpoint of the Kinesis service\n" + " <endpoint-url> is the endpoint of the Kinesis service\n" +
"| (e.g. https://kinesis.us-east-1.amazonaws.com)\n"); " (e.g. https://kinesis.us-east-1.amazonaws.com)\n");
System.exit(1); System.exit(1);
} }
......
...@@ -69,7 +69,7 @@ import org.apache.log4j.Level ...@@ -69,7 +69,7 @@ import org.apache.log4j.Level
* dummy data onto the Kinesis stream. * dummy data onto the Kinesis stream.
* Usage instructions for KinesisWordCountProducerASL are provided in that class definition. * Usage instructions for KinesisWordCountProducerASL are provided in that class definition.
*/ */
object KinesisWordCountASL extends Logging { private object KinesisWordCountASL extends Logging {
def main(args: Array[String]) { def main(args: Array[String]) {
/* Check that all required args were passed in. */ /* Check that all required args were passed in. */
if (args.length < 2) { if (args.length < 2) {
...@@ -154,7 +154,7 @@ object KinesisWordCountASL extends Logging { ...@@ -154,7 +154,7 @@ object KinesisWordCountASL extends Logging {
* org.apache.spark.examples.streaming.KinesisWordCountProducerASL mySparkStream \ * org.apache.spark.examples.streaming.KinesisWordCountProducerASL mySparkStream \
* https://kinesis.us-east-1.amazonaws.com 10 5 * https://kinesis.us-east-1.amazonaws.com 10 5
*/ */
object KinesisWordCountProducerASL { private object KinesisWordCountProducerASL {
def main(args: Array[String]) { def main(args: Array[String]) {
if (args.length < 4) { if (args.length < 4) {
System.err.println("Usage: KinesisWordCountProducerASL <stream-name> <endpoint-url>" + System.err.println("Usage: KinesisWordCountProducerASL <stream-name> <endpoint-url>" +
...@@ -235,7 +235,7 @@ object KinesisWordCountProducerASL { ...@@ -235,7 +235,7 @@ object KinesisWordCountProducerASL {
* Utility functions for Spark Streaming examples. * Utility functions for Spark Streaming examples.
* This has been lifted from the examples/ project to remove the circular dependency. * This has been lifted from the examples/ project to remove the circular dependency.
*/ */
object StreamingExamples extends Logging { private[streaming] object StreamingExamples extends Logging {
/** Set reasonable logging levels for streaming if the user has not configured log4j. */ /** Set reasonable logging levels for streaming if the user has not configured log4j. */
def setStreamingLogLevels() { def setStreamingLogLevels() {
......
...@@ -35,7 +35,7 @@ import com.amazonaws.services.kinesis.clientlibrary.lib.worker.InitialPositionIn ...@@ -35,7 +35,7 @@ import com.amazonaws.services.kinesis.clientlibrary.lib.worker.InitialPositionIn
object KinesisUtils { object KinesisUtils {
/** /**
* Create an InputDStream that pulls messages from a Kinesis stream. * Create an InputDStream that pulls messages from a Kinesis stream.
* * :: Experimental ::
* @param ssc StreamingContext object * @param ssc StreamingContext object
* @param streamName Kinesis stream name * @param streamName Kinesis stream name
* @param endpointUrl Url of Kinesis service (e.g., https://kinesis.us-east-1.amazonaws.com) * @param endpointUrl Url of Kinesis service (e.g., https://kinesis.us-east-1.amazonaws.com)
...@@ -52,6 +52,7 @@ object KinesisUtils { ...@@ -52,6 +52,7 @@ object KinesisUtils {
* *
* @return ReceiverInputDStream[Array[Byte]] * @return ReceiverInputDStream[Array[Byte]]
*/ */
@Experimental
def createStream( def createStream(
ssc: StreamingContext, ssc: StreamingContext,
streamName: String, streamName: String,
...@@ -65,9 +66,8 @@ object KinesisUtils { ...@@ -65,9 +66,8 @@ object KinesisUtils {
/** /**
* Create a Java-friendly InputDStream that pulls messages from a Kinesis stream. * Create a Java-friendly InputDStream that pulls messages from a Kinesis stream.
* * :: Experimental ::
* @param jssc Java StreamingContext object * @param jssc Java StreamingContext object
* @param ssc StreamingContext object
* @param streamName Kinesis stream name * @param streamName Kinesis stream name
* @param endpointUrl Url of Kinesis service (e.g., https://kinesis.us-east-1.amazonaws.com) * @param endpointUrl Url of Kinesis service (e.g., https://kinesis.us-east-1.amazonaws.com)
* @param checkpointInterval Checkpoint interval for Kinesis checkpointing. * @param checkpointInterval Checkpoint interval for Kinesis checkpointing.
...@@ -83,6 +83,7 @@ object KinesisUtils { ...@@ -83,6 +83,7 @@ object KinesisUtils {
* *
* @return JavaReceiverInputDStream[Array[Byte]] * @return JavaReceiverInputDStream[Array[Byte]]
*/ */
@Experimental
def createStream( def createStream(
jssc: JavaStreamingContext, jssc: JavaStreamingContext,
streamName: String, streamName: String,
......
...@@ -290,9 +290,9 @@ object Unidoc { ...@@ -290,9 +290,9 @@ object Unidoc {
publish := {}, publish := {},
unidocProjectFilter in(ScalaUnidoc, unidoc) := unidocProjectFilter in(ScalaUnidoc, unidoc) :=
inAnyProject -- inProjects(OldDeps.project, repl, examples, tools, catalyst, yarn, yarnAlpha), inAnyProject -- inProjects(OldDeps.project, repl, examples, tools, catalyst, streamingFlumeSink, yarn, yarnAlpha),
unidocProjectFilter in(JavaUnidoc, unidoc) := unidocProjectFilter in(JavaUnidoc, unidoc) :=
inAnyProject -- inProjects(OldDeps.project, repl, bagel, graphx, examples, tools, catalyst, yarn, yarnAlpha), inAnyProject -- inProjects(OldDeps.project, repl, bagel, graphx, examples, tools, catalyst, streamingFlumeSink, yarn, yarnAlpha),
// Skip class names containing $ and some internal packages in Javadocs // Skip class names containing $ and some internal packages in Javadocs
unidocAllSources in (JavaUnidoc, unidoc) := { unidocAllSources in (JavaUnidoc, unidoc) := {
...@@ -314,7 +314,7 @@ object Unidoc { ...@@ -314,7 +314,7 @@ object Unidoc {
"-group", "Core Java API", packageList("api.java", "api.java.function"), "-group", "Core Java API", packageList("api.java", "api.java.function"),
"-group", "Spark Streaming", packageList( "-group", "Spark Streaming", packageList(
"streaming.api.java", "streaming.flume", "streaming.kafka", "streaming.api.java", "streaming.flume", "streaming.kafka",
"streaming.mqtt", "streaming.twitter", "streaming.zeromq" "streaming.mqtt", "streaming.twitter", "streaming.zeromq", "streaming.kinesis"
), ),
"-group", "MLlib", packageList( "-group", "MLlib", packageList(
"mllib.classification", "mllib.clustering", "mllib.evaluation.binary", "mllib.linalg", "mllib.classification", "mllib.clustering", "mllib.evaluation.binary", "mllib.linalg",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment