Skip to content

Commit e687123

Browse files
committed
Fixed scala style errors.
1 parent 9b8d112 commit e687123

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

examples/src/main/scala/org/apache/spark/examples/streaming/FlumeEventCount.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import org.apache.spark.util.IntParam
4141
*/
4242
object FlumeEventCount {
4343
def main(args: Array[String]) {
44-
if (args.length != 3) {
44+
if (args.length < 2) {
4545
System.err.println(
4646
"Usage: FlumeEventCount <host> <port>")
4747
System.exit(1)

examples/src/main/scala/org/apache/spark/examples/streaming/HdfsWordCount.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import org.apache.spark.streaming.StreamingContext._
2828
*
2929
* To run this on your local machine on directory `localdir`, run this example
3030
* `$ bin/run-example \
31-
* org.apache.spark.examples.streaming.HdfsWordCount localdir`
31+
* org.apache.spark.examples.streaming.HdfsWordCount localdir`
3232
*
3333
* Then create a text file in `localdir` and the words in the file will get counted.
3434
*/

examples/src/main/scala/org/apache/spark/examples/streaming/MQTTWordCount.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,14 @@ object MQTTPublisher {
7575
* Example Java code for Mqtt Publisher and Subscriber can be found here
7676
* https://bitbucket.org/mkjinesh/mqttclient
7777
* Usage: MQTTWordCount <MqttbrokerUrl> <topic>
78-
\ * <MqttbrokerUrl> and <topic> describe where Mqtt publisher is running.
78+
* <MqttbrokerUrl> and <topic> describe where Mqtt publisher is running.
7979
*
8080
* To run this example locally, you may run publisher as
81-
* `$ ./bin/run-example org.apache.spark.examples.streaming.MQTTPublisher tcp://localhost:1883 foo`
81+
* `$ bin/run-example \
82+
* org.apache.spark.examples.streaming.MQTTPublisher tcp://localhost:1883 foo`
8283
* and run the example as
83-
* `$ ./bin/run-example org.apache.spark.examples.streaming.MQTTWordCount tcp://localhost:1883 foo`
84+
* `$ bin/run-example \
85+
* org.apache.spark.examples.streaming.MQTTWordCount tcp://localhost:1883 foo`
8486
*/
8587
object MQTTWordCount {
8688

examples/src/main/scala/org/apache/spark/examples/streaming/TwitterPopularTags.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ import org.apache.spark.SparkConf
3434
object TwitterPopularTags {
3535
def main(args: Array[String]) {
3636
if (args.length < 4) {
37-
System.err.println("Usage: TwitterPopularTags <consumer key> <consumer secret> <access token> " +
38-
"<access token secret> [<filters>]")
37+
System.err.println("Usage: TwitterPopularTags <consumer key> <consumer secret> " +
38+
"<access token> <access token secret> [<filters>]")
3939
System.exit(1)
4040
}
4141

0 commit comments

Comments
 (0)