[отпатрулированная версия][отпатрулированная версия]
Содержимое удалено Содержимое добавлено
та по пятисекундным интервалам
Строка 29:
 
Flink also includes a mechanism called savepoints, which are manually-triggered checkpoints.<ref>{{cite web|url=https://ci.apache.org/projects/flink/flink-docs-release-1.2/concepts/runtime.html#savepoints|title=Apache Flink 1.2.0 Documentation: Distributed Runtime Environment - Savepoints|website=ci.apache.org|language=en|access-date=2017-02-24}}</ref> A user can generate a savepoint, stop a running Flink program, then resume the program from the same application state and position in the stream. Savepoints enable updates to a Flink program or a Flink cluster without losing the application's state . As of Flink 1.2, savepoints also allow to restart an application with a different parallelism—allowing users to adapt to changing workloads.
-->
 
=== DataStream API ===
Flink's DataStream API enablesв transformationsсистеме (e.g.Flink проводит преобразования - такие как filtersфильтрацию, aggregationsагрегацию, windowвыборку functions)- onна boundedограниченных orили unboundedнеограниченных streamsпотоках of dataданных. The DataStream API includesвключает moreв себя более than 20 differentразщличных типов преобразования, typesкоторые ofмогут transformationsбыть andиспользолваны isна availableязыках in Java andиd Scala.<ref>{{cite web|url=https://ci.apache.org/projects/flink/flink-docs-release-1.2/dev/datastream_api.html|title=Apache Flink 1.2.0 Documentation: Flink DataStream API Programming Guide|website=ci.apache.org|language=en|access-date=2017-02-24}}</ref>
 
Вот пример простой обреботки потока для счётчика количества слов в непрерывном входном потоке по пятисекундным временным интервалам:
<syntaxhighlight lang="scala">
 
A simple example of a stateful stream processing program is an application that emits a word count from a continuous input stream and groups the data in 5-second windows:<syntaxhighlight lang="scala">
-->
import org.apache.flink.streaming.api.scala._
import org.apache.flink.streaming.api.windowing.time.Time