Skip to content

Commit

Permalink
[docs] fix typos in quickstart and CEP docs
Browse files Browse the repository at this point in the history
This closes apache#1663
  • Loading branch information
vasia committed Feb 18, 2016
1 parent 138334a commit 0c6c723
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
6 changes: 3 additions & 3 deletions docs/apis/streaming/libs/cep.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Pattern<Event, ?> pattern = Pattern.begin("start").where(evt -> evt.getId() == 4
.next("middle").subtype(SubEvent.class).where(subEvt -> subEvt.getVolume() >= 10.0)
.followedBy("end").where(evt -> evt.getName().equals("end"));

PatternStream<Event> patternStream = CEP.from(input, pattern);
PatternStream<Event> patternStream = CEP.pattern(input, pattern);

DataStream<Alert> result = patternStream.select(pattern -> {
return createAlertFrom(pattern);
Expand Down Expand Up @@ -216,7 +216,7 @@ Given an input stream `input` and a pattern `pattern`, you create the `PatternSt
DataStream<Event> input = ...
Pattern<Event, ?> pattern = ...

PatternStream<Event> patternStream = CEP.from(input, pattern);
PatternStream<Event> patternStream = CEP.pattern(input, pattern);
{% endhighlight %}

### Selecting from Patterns
Expand Down Expand Up @@ -280,7 +280,7 @@ Pattern<Event, ?> pattern = Pattern.<Event>begin("start")
.next("middle").where(new FilterFunction<Event>() {
@Override
public boolean filter(Event value) throws Exception {
return value.getName().equals("name");
return value.getName().equals("error");
}
}).followedBy("end").where(new FilterFunction<Event>() {
@Override
Expand Down
11 changes: 4 additions & 7 deletions docs/quickstart/java_api_quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,21 @@ There will be a new directory in your working directory. If you've used the _cur

The sample project is a __Maven project__, which contains two classes. _Job_ is a basic skeleton program and _WordCountJob_ a working example. Please note that the _main_ method of both classes allow you to start Flink in a development/testing mode.

We recommend to __import this project into your IDE__ to develop and test it. If you use Eclipse, the [m2e plugin](http://www.eclipse.org/m2e/) allows to [import Maven projects](http://books.sonatype.com/m2eclipse-book/reference/creating-sect-importing-projects.html#fig-creating-import). Some Eclipse bundles include that plugin by default, other require you to install it manually. The IntelliJ IDE also supports Maven projects out of the box.
We recommend to __import this project into your IDE__ to develop and test it. If you use Eclipse, the [m2e plugin](http://www.eclipse.org/m2e/) allows to [import Maven projects](http://books.sonatype.com/m2eclipse-book/reference/creating-sect-importing-projects.html#fig-creating-import). Some Eclipse bundles include that plugin by default, others require you to install it manually. The IntelliJ IDE also supports Maven projects out of the box.


A note to Mac OS X users: The default JVM heapsize for Java is too small for Flink. You have to manually increase it. Choose "Run Configurations" -> Arguments and write into the "VM Arguments" box: "-Xmx800m" in Eclipse.

## Build Project

If you want to __build your project__, go to your project directory and issue the`mvn clean install -Pbuild-jar` command. You will __find a jar__ that runs on every Flink cluster in __target/your-artifact-id-1.0-SNAPSHOT.jar__. There is also a fat-jar, __target/your-artifact-id-1.0-SNAPSHOT-flink-fat-jar.jar__. This
If you want to __build your project__, go to your project directory and issue the `mvn clean install -Pbuild-jar` command. You will __find a jar__ that runs on every Flink cluster in __target/your-artifact-id-1.0-SNAPSHOT.jar__. There is also a fat-jar, __target/your-artifact-id-1.0-SNAPSHOT-flink-fat-jar.jar__. This
also contains all dependencies that get added to the maven project.

## Next Steps

Write your application!

The quickstart project contains a WordCount implementation, the "Hello World" of Big Data processing systems. The goal of WordCount is to determine the frequencies of words in a text, e.g., how often do the terms "the" or "house" occurs in all Wikipedia texts.
The quickstart project contains a WordCount implementation, the "Hello World" of Big Data processing systems. The goal of WordCount is to determine the frequencies of words in a text, e.g., how often do the terms "the" or "house" occur in all Wikipedia texts.

__Sample Input__:

Expand All @@ -95,7 +95,7 @@ data 1
is 1
~~~

The following code shows the WordCount implementation from the Quickstart which processes some text lines with two operators (FlatMap and Reduce), and writes the prints the resulting words and counts to std-out.
The following code shows the WordCount implementation from the Quickstart which processes some text lines with two operators (FlatMap and Reduce), and prints the resulting words and counts to std-out.

~~~java
public class WordCount {
Expand All @@ -122,9 +122,6 @@ public class WordCount {

// emit result
counts.print();

// execute program
env.execute("WordCount Example");
}
}
~~~
Expand Down
4 changes: 2 additions & 2 deletions docs/quickstart/scala_api_quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ also contains all dependencies that get added to the maven project.

Write your application!

The quickstart project contains a WordCount implementation, the "Hello World" of Big Data processing systems. The goal of WordCount is to determine the frequencies of words in a text, e.g., how often do the terms "the" or "house" occurs in all Wikipedia texts.
The quickstart project contains a WordCount implementation, the "Hello World" of Big Data processing systems. The goal of WordCount is to determine the frequencies of words in a text, e.g., how often do the terms "the" or "house" occur in all Wikipedia texts.

__Sample Input__:

Expand All @@ -106,7 +106,7 @@ data 1
is 1
~~~

The following code shows the WordCount implementation from the Quickstart which processes some text lines with two operators (FlatMap and Reduce), and writes the prints the resulting words and counts to std-out.
The following code shows the WordCount implementation from the Quickstart which processes some text lines with two operators (FlatMap and Reduce), and prints the resulting words and counts to std-out.

~~~scala
object WordCountJob {
Expand Down

0 comments on commit 0c6c723

Please sign in to comment.