Skip to content

Commit

Permalink
[SPARK-1981][Streaming][Hotfix] Fixed docs related to kinesis
Browse files Browse the repository at this point in the history
- Include kinesis in the unidocs
- Hide non-public classes from docs

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

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
  • Loading branch information
tdas committed Sep 3, 2014
1 parent aa7de12 commit e9bb12b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 16 deletions.
4 changes: 2 additions & 2 deletions docs/_plugins/copy_api_dirs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
curr_dir = pwd
cd("..")

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

puts "Moving back into docs dir."
cd("docs")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
* onto the Kinesis stream.
* 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 Logger logger = Logger.getLogger(JavaKinesisWordCountASL.class);

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ import org.apache.log4j.Level
* dummy data onto the Kinesis stream.
* Usage instructions for KinesisWordCountProducerASL are provided in that class definition.
*/
object KinesisWordCountASL extends Logging {
private object KinesisWordCountASL extends Logging {
def main(args: Array[String]) {
/* Check that all required args were passed in. */
if (args.length < 2) {
Expand Down Expand Up @@ -154,7 +154,7 @@ object KinesisWordCountASL extends Logging {
* org.apache.spark.examples.streaming.KinesisWordCountProducerASL mySparkStream \
* https://kinesis.us-east-1.amazonaws.com 10 5
*/
object KinesisWordCountProducerASL {
private object KinesisWordCountProducerASL {
def main(args: Array[String]) {
if (args.length < 4) {
System.err.println("Usage: KinesisWordCountProducerASL <stream-name> <endpoint-url>" +
Expand Down Expand Up @@ -235,7 +235,7 @@ object KinesisWordCountProducerASL {
* Utility functions for Spark Streaming examples.
* 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. */
def setStreamingLogLevels() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import com.amazonaws.services.kinesis.clientlibrary.lib.worker.InitialPositionIn
object KinesisUtils {
/**
* Create an InputDStream that pulls messages from a Kinesis stream.
*
* :: Experimental ::
* @param ssc StreamingContext object
* @param streamName Kinesis stream name
* @param endpointUrl Url of Kinesis service (e.g., https://kinesis.us-east-1.amazonaws.com)
Expand All @@ -52,6 +52,7 @@ object KinesisUtils {
*
* @return ReceiverInputDStream[Array[Byte]]
*/
@Experimental
def createStream(
ssc: StreamingContext,
streamName: String,
Expand All @@ -65,9 +66,8 @@ object KinesisUtils {

/**
* Create a Java-friendly InputDStream that pulls messages from a Kinesis stream.
*
* :: Experimental ::
* @param jssc Java StreamingContext object
* @param ssc StreamingContext object
* @param streamName Kinesis stream name
* @param endpointUrl Url of Kinesis service (e.g., https://kinesis.us-east-1.amazonaws.com)
* @param checkpointInterval Checkpoint interval for Kinesis checkpointing.
Expand All @@ -83,6 +83,7 @@ object KinesisUtils {
*
* @return JavaReceiverInputDStream[Array[Byte]]
*/
@Experimental
def createStream(
jssc: JavaStreamingContext,
streamName: String,
Expand Down
6 changes: 3 additions & 3 deletions project/SparkBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,9 @@ object Unidoc {
publish := {},

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) :=
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
unidocAllSources in (JavaUnidoc, unidoc) := {
Expand All @@ -314,7 +314,7 @@ object Unidoc {
"-group", "Core Java API", packageList("api.java", "api.java.function"),
"-group", "Spark Streaming", packageList(
"streaming.api.java", "streaming.flume", "streaming.kafka",
"streaming.mqtt", "streaming.twitter", "streaming.zeromq"
"streaming.mqtt", "streaming.twitter", "streaming.zeromq", "streaming.kinesis"
),
"-group", "MLlib", packageList(
"mllib.classification", "mllib.clustering", "mllib.evaluation.binary", "mllib.linalg",
Expand Down

0 comments on commit e9bb12b

Please sign in to comment.