Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-10986][tests] Implement DB to setup Apache Kafka #7173

Closed
wants to merge 7 commits into from

Conversation

GJL
Copy link
Member

@GJL GJL commented Nov 26, 2018

What is the purpose of the change

Implement option to setup Kafka for distributed testing

Brief change log

  • Implement Kafka DB.
  • Add documentation how to enable Kafka.

Verifying this change

This change is already covered by existing tests, such as Jepsen tests.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
  • The serializers: (yes / no / don't know)
  • The runtime per-record code paths (performance sensitive): (yes / no / don't know)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes / no / don't know)
  • The S3 file system connector: (yes / no / don't know)

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

This enables submission of multiple jobs in the Jepsen tests. The job
specifications are in an .edn file that must be passed as command line
arguments. The checker verifies that all jobs are running at the end of the
test. The job cancellation function now cancels all jobs at once.

Delete script/run-tests.sh and move code to docker/run-tests.sh.
:job-args "--parallelism 1 --checkpointInterval 5000 --numKeys 1000 --topic kafka-test-topic --sleep 200 --semantic exactly-once --bootstrap.servers localhost:9092 --transaction.timeout.ms 600000 --checkpointDir hdfs:https:///flink-checkpoints"
:main-class "com.dataartisans.flink.example.eventpattern.DataGeneratorJob"}
{:job-jar "/jepsen/bin/flink-state-machine-kafka-1.0-SNAPSHOT.jar"
:job-args "--parallelism 1 --checkpointInterval 5000 --input-topic kafka-test-topic --bootstrap.servers localhost:9092 --checkpointDir hdfs:https:///flink-checkpoints"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add --auto.offset.reset earliest

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

;; See the License for the specific language governing permissions and
;; limitations under the License.

{:dbs [:hadoop :zookeeper :flink-mesos-session]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:mesos

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

This enables toggling the setup of test dependencies, such as Hadooop, Mesos,
and, ZooKeeper through the --test-spec edn file. The type of the Flink cluster
can also be specified via: :flink-yarn-job :flink-yarn-session
:flink-mesos-session, and :flink-standalone-session.

Retryable operations that exhausted all attempts, now propagate the exception by
default. This is to fail fast if during the db/setup!, an operation, such as
Flink job submission, fails to complete.
Copy link
Contributor

@tillrohrmann tillrohrmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Afaik it looks good to me. +1 for merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants