[GitHub] flink pull request #6239: [FLINK-9004][tests] Implement Jepsen tests to test...
Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/6239 ---
[GitHub] flink pull request #6239: [FLINK-9004][tests] Implement Jepsen tests to test...
Github user GJL commented on a diff in the pull request: https://github.com/apache/flink/pull/6239#discussion_r199690915 --- Diff: jepsen-flink/README.md --- @@ -0,0 +1,60 @@ +# jepsen.flink + +A Clojure project based on the [Jepsen](https://github.com/jepsen-io/jepsen) framework to find bugs in the +distributed coordination of Apache Flink®. + +## Test Coverage +Jepsen is a framework built to test the behavior of distributed systems +under faults. The tests in this particular project deploy Flink on either YARN or Mesos, submit a +job, and examine the availability of the job after injecting faults. +A job is said to be available if all the tasks of the job are running. +The faults that can be currently introduced to the Flink cluster include: +* Killing of TaskManager/JobManager processes +* Stopping HDFS NameNode +* Network partitions + +There are many more properties other than job availability that could be +verified but are not yet covered by this test suite, e.g., end-to-end exactly-once processing +semantics. + +## Usage +See the [Jepsen documentation](https://github.com/jepsen-io/jepsen#setting-up-a-jepsen-environment) +for how to set up the environment to run tests. The `scripts/run-tests.sh` documents how to invoke +tests. The Flink job used for testing is located under +`flink-end-to-end-tests/flink-datastream-allround-test`. You have to build the job first and copy +the resulting jar (`DataStreamAllroundTestProgram.jar`) to the `./bin` directory of this project's +root. + +To simplify development, we have prepared Dockerfiles and a Docker Compose template +so that you can run the tests locally in containers. To build the images +and start the containers, simply run: + +$ cd docker +$ ./up.sh + +After the containers started, open a new terminal window and run `docker exec -it jepsen-control bash`. +This will allow you to run arbitrary commands on the control node. +To start the tests, you can use the `run-tests.sh` script in the `docker` directory, +which expects the number of test iterations, and a URI to a Flink distribution, e.g., + +./docker/run-tests.sh 1 https://example.com/flink-dist.tgz + +The project's root is mounted as a volume to all containers under the path `/jepsen`. +This means that changes to the test sources are immediately reflected in the control node container. +Moreover, this allows you to test locally built Flink distributions by copying the tarball to the +project's root and passing a URI with the `file://` scheme to the `run-tests.sh` script, e.g., +`file:///jepsen/flink-dist.tgz`. + +### Checking the output of tests + +Consult the `jepsen.log` file for the particular test run in the `store` folder. The final output of every test will be either + +Everything looks good! ã½('ã¼`)ã + +or + +Analysis invalid! (ï¾à²¥çಥï¼ï¾ â»ââ» --- End diff -- The Chinese character is the mouth and and the eyebrows of the emoji: https://github.com/jepsen-io/jepsen/blob/dd197bbce0b92c1ab3423709ac6bb0b2ee853365/jepsen/src/jepsen/core.clj#L532 ---
[GitHub] flink pull request #6239: [FLINK-9004][tests] Implement Jepsen tests to test...
Github user yanghua commented on a diff in the pull request: https://github.com/apache/flink/pull/6239#discussion_r199664502 --- Diff: jepsen-flink/README.md --- @@ -0,0 +1,60 @@ +# jepsen.flink + +A Clojure project based on the [Jepsen](https://github.com/jepsen-io/jepsen) framework to find bugs in the +distributed coordination of Apache Flink®. + +## Test Coverage +Jepsen is a framework built to test the behavior of distributed systems +under faults. The tests in this particular project deploy Flink on either YARN or Mesos, submit a +job, and examine the availability of the job after injecting faults. +A job is said to be available if all the tasks of the job are running. +The faults that can be currently introduced to the Flink cluster include: +* Killing of TaskManager/JobManager processes +* Stopping HDFS NameNode +* Network partitions + +There are many more properties other than job availability that could be +verified but are not yet covered by this test suite, e.g., end-to-end exactly-once processing +semantics. + +## Usage +See the [Jepsen documentation](https://github.com/jepsen-io/jepsen#setting-up-a-jepsen-environment) +for how to set up the environment to run tests. The `scripts/run-tests.sh` documents how to invoke +tests. The Flink job used for testing is located under +`flink-end-to-end-tests/flink-datastream-allround-test`. You have to build the job first and copy +the resulting jar (`DataStreamAllroundTestProgram.jar`) to the `./bin` directory of this project's +root. + +To simplify development, we have prepared Dockerfiles and a Docker Compose template +so that you can run the tests locally in containers. To build the images +and start the containers, simply run: + +$ cd docker +$ ./up.sh + +After the containers started, open a new terminal window and run `docker exec -it jepsen-control bash`. +This will allow you to run arbitrary commands on the control node. +To start the tests, you can use the `run-tests.sh` script in the `docker` directory, +which expects the number of test iterations, and a URI to a Flink distribution, e.g., + +./docker/run-tests.sh 1 https://example.com/flink-dist.tgz + +The project's root is mounted as a volume to all containers under the path `/jepsen`. +This means that changes to the test sources are immediately reflected in the control node container. +Moreover, this allows you to test locally built Flink distributions by copying the tarball to the +project's root and passing a URI with the `file://` scheme to the `run-tests.sh` script, e.g., +`file:///jepsen/flink-dist.tgz`. + +### Checking the output of tests + +Consult the `jepsen.log` file for the particular test run in the `store` folder. The final output of every test will be either + +Everything looks good! ã½('ã¼`)ã + +or + +Analysis invalid! (ï¾à²¥çಥï¼ï¾ â»ââ» --- End diff -- @GJL I really see a Chinese character, it shows `(ï¾à²¥çಥï¼ï¾ â»ââ»` to me in the webpage. It contains a `ç` which is a Chinese character. Maybe it's Github's prblem? ---
[GitHub] flink pull request #6239: [FLINK-9004][tests] Implement Jepsen tests to test...
Github user GJL commented on a diff in the pull request: https://github.com/apache/flink/pull/6239#discussion_r199622404 --- Diff: jepsen-flink/README.md --- @@ -0,0 +1,60 @@ +# jepsen.flink + +A Clojure project based on the [Jepsen](https://github.com/jepsen-io/jepsen) framework to find bugs in the +distributed coordination of Apache Flink®. + +## Test Coverage +Jepsen is a framework built to test the behavior of distributed systems +under faults. The tests in this particular project deploy Flink on either YARN or Mesos, submit a +job, and examine the availability of the job after injecting faults. +A job is said to be available if all the tasks of the job are running. +The faults that can be currently introduced to the Flink cluster include: +* Killing of TaskManager/JobManager processes +* Stopping HDFS NameNode +* Network partitions + +There are many more properties other than job availability that could be +verified but are not yet covered by this test suite, e.g., end-to-end exactly-once processing +semantics. + +## Usage +See the [Jepsen documentation](https://github.com/jepsen-io/jepsen#setting-up-a-jepsen-environment) +for how to set up the environment to run tests. The `scripts/run-tests.sh` documents how to invoke +tests. The Flink job used for testing is located under +`flink-end-to-end-tests/flink-datastream-allround-test`. You have to build the job first and copy +the resulting jar (`DataStreamAllroundTestProgram.jar`) to the `./bin` directory of this project's +root. + +To simplify development, we have prepared Dockerfiles and a Docker Compose template +so that you can run the tests locally in containers. To build the images +and start the containers, simply run: + +$ cd docker +$ ./up.sh + +After the containers started, open a new terminal window and run `docker exec -it jepsen-control bash`. +This will allow you to run arbitrary commands on the control node. +To start the tests, you can use the `run-tests.sh` script in the `docker` directory, +which expects the number of test iterations, and a URI to a Flink distribution, e.g., + +./docker/run-tests.sh 1 https://example.com/flink-dist.tgz + +The project's root is mounted as a volume to all containers under the path `/jepsen`. +This means that changes to the test sources are immediately reflected in the control node container. +Moreover, this allows you to test locally built Flink distributions by copying the tarball to the +project's root and passing a URI with the `file://` scheme to the `run-tests.sh` script, e.g., +`file:///jepsen/flink-dist.tgz`. + +### Checking the output of tests + +Consult the `jepsen.log` file for the particular test run in the `store` folder. The final output of every test will be either + +Everything looks good! ã½('ã¼`)ã + +or + +Analysis invalid! (ï¾à²¥çಥï¼ï¾ â»ââ» --- End diff -- it's a "flipping table emoji" ---
[GitHub] flink pull request #6239: [FLINK-9004][tests] Implement Jepsen tests to test...
Github user zentol commented on a diff in the pull request: https://github.com/apache/flink/pull/6239#discussion_r199592285 --- Diff: jepsen-flink/README.md --- @@ -0,0 +1,60 @@ +# jepsen.flink + +A Clojure project based on the [Jepsen](https://github.com/jepsen-io/jepsen) framework to find bugs in the +distributed coordination of Apache Flink®. + +## Test Coverage +Jepsen is a framework built to test the behavior of distributed systems +under faults. The tests in this particular project deploy Flink on either YARN or Mesos, submit a +job, and examine the availability of the job after injecting faults. +A job is said to be available if all the tasks of the job are running. +The faults that can be currently introduced to the Flink cluster include: +* Killing of TaskManager/JobManager processes +* Stopping HDFS NameNode +* Network partitions + +There are many more properties other than job availability that could be +verified but are not yet covered by this test suite, e.g., end-to-end exactly-once processing +semantics. + +## Usage +See the [Jepsen documentation](https://github.com/jepsen-io/jepsen#setting-up-a-jepsen-environment) +for how to set up the environment to run tests. The `scripts/run-tests.sh` documents how to invoke +tests. The Flink job used for testing is located under +`flink-end-to-end-tests/flink-datastream-allround-test`. You have to build the job first and copy +the resulting jar (`DataStreamAllroundTestProgram.jar`) to the `./bin` directory of this project's +root. + +To simplify development, we have prepared Dockerfiles and a Docker Compose template +so that you can run the tests locally in containers. To build the images +and start the containers, simply run: + +$ cd docker +$ ./up.sh + +After the containers started, open a new terminal window and run `docker exec -it jepsen-control bash`. +This will allow you to run arbitrary commands on the control node. +To start the tests, you can use the `run-tests.sh` script in the `docker` directory, +which expects the number of test iterations, and a URI to a Flink distribution, e.g., + +./docker/run-tests.sh 1 https://example.com/flink-dist.tgz + +The project's root is mounted as a volume to all containers under the path `/jepsen`. +This means that changes to the test sources are immediately reflected in the control node container. +Moreover, this allows you to test locally built Flink distributions by copying the tarball to the +project's root and passing a URI with the `file://` scheme to the `run-tests.sh` script, e.g., +`file:///jepsen/flink-dist.tgz`. + +### Checking the output of tests + +Consult the `jepsen.log` file for the particular test run in the `store` folder. The final output of every test will be either + +Everything looks good! ã½('ã¼`)ã --- End diff -- it's a smiley... ---
[GitHub] flink pull request #6239: [FLINK-9004][tests] Implement Jepsen tests to test...
Github user yanghua commented on a diff in the pull request: https://github.com/apache/flink/pull/6239#discussion_r199527828 --- Diff: jepsen-flink/README.md --- @@ -0,0 +1,60 @@ +# jepsen.flink + +A Clojure project based on the [Jepsen](https://github.com/jepsen-io/jepsen) framework to find bugs in the +distributed coordination of Apache Flink®. + +## Test Coverage +Jepsen is a framework built to test the behavior of distributed systems +under faults. The tests in this particular project deploy Flink on either YARN or Mesos, submit a +job, and examine the availability of the job after injecting faults. +A job is said to be available if all the tasks of the job are running. +The faults that can be currently introduced to the Flink cluster include: +* Killing of TaskManager/JobManager processes +* Stopping HDFS NameNode +* Network partitions + +There are many more properties other than job availability that could be +verified but are not yet covered by this test suite, e.g., end-to-end exactly-once processing +semantics. + +## Usage +See the [Jepsen documentation](https://github.com/jepsen-io/jepsen#setting-up-a-jepsen-environment) +for how to set up the environment to run tests. The `scripts/run-tests.sh` documents how to invoke +tests. The Flink job used for testing is located under +`flink-end-to-end-tests/flink-datastream-allround-test`. You have to build the job first and copy +the resulting jar (`DataStreamAllroundTestProgram.jar`) to the `./bin` directory of this project's +root. + +To simplify development, we have prepared Dockerfiles and a Docker Compose template +so that you can run the tests locally in containers. To build the images +and start the containers, simply run: + +$ cd docker +$ ./up.sh + +After the containers started, open a new terminal window and run `docker exec -it jepsen-control bash`. +This will allow you to run arbitrary commands on the control node. +To start the tests, you can use the `run-tests.sh` script in the `docker` directory, +which expects the number of test iterations, and a URI to a Flink distribution, e.g., + +./docker/run-tests.sh 1 https://example.com/flink-dist.tgz + +The project's root is mounted as a volume to all containers under the path `/jepsen`. +This means that changes to the test sources are immediately reflected in the control node container. +Moreover, this allows you to test locally built Flink distributions by copying the tarball to the +project's root and passing a URI with the `file://` scheme to the `run-tests.sh` script, e.g., +`file:///jepsen/flink-dist.tgz`. + +### Checking the output of tests + +Consult the `jepsen.log` file for the particular test run in the `store` folder. The final output of every test will be either + +Everything looks good! ã½('ã¼`)ã + +or + +Analysis invalid! (ï¾à²¥çಥï¼ï¾ â»ââ» --- End diff -- the end of this line is gibberishï¼ ---
[GitHub] flink pull request #6239: [FLINK-9004][tests] Implement Jepsen tests to test...
Github user yanghua commented on a diff in the pull request: https://github.com/apache/flink/pull/6239#discussion_r199527590 --- Diff: jepsen-flink/README.md --- @@ -0,0 +1,60 @@ +# jepsen.flink + +A Clojure project based on the [Jepsen](https://github.com/jepsen-io/jepsen) framework to find bugs in the +distributed coordination of Apache Flink®. + +## Test Coverage +Jepsen is a framework built to test the behavior of distributed systems +under faults. The tests in this particular project deploy Flink on either YARN or Mesos, submit a +job, and examine the availability of the job after injecting faults. +A job is said to be available if all the tasks of the job are running. +The faults that can be currently introduced to the Flink cluster include: +* Killing of TaskManager/JobManager processes +* Stopping HDFS NameNode +* Network partitions + +There are many more properties other than job availability that could be +verified but are not yet covered by this test suite, e.g., end-to-end exactly-once processing +semantics. + +## Usage +See the [Jepsen documentation](https://github.com/jepsen-io/jepsen#setting-up-a-jepsen-environment) +for how to set up the environment to run tests. The `scripts/run-tests.sh` documents how to invoke +tests. The Flink job used for testing is located under +`flink-end-to-end-tests/flink-datastream-allround-test`. You have to build the job first and copy +the resulting jar (`DataStreamAllroundTestProgram.jar`) to the `./bin` directory of this project's +root. + +To simplify development, we have prepared Dockerfiles and a Docker Compose template +so that you can run the tests locally in containers. To build the images +and start the containers, simply run: + +$ cd docker +$ ./up.sh + +After the containers started, open a new terminal window and run `docker exec -it jepsen-control bash`. +This will allow you to run arbitrary commands on the control node. +To start the tests, you can use the `run-tests.sh` script in the `docker` directory, +which expects the number of test iterations, and a URI to a Flink distribution, e.g., + +./docker/run-tests.sh 1 https://example.com/flink-dist.tgz + +The project's root is mounted as a volume to all containers under the path `/jepsen`. +This means that changes to the test sources are immediately reflected in the control node container. +Moreover, this allows you to test locally built Flink distributions by copying the tarball to the +project's root and passing a URI with the `file://` scheme to the `run-tests.sh` script, e.g., +`file:///jepsen/flink-dist.tgz`. + +### Checking the output of tests + +Consult the `jepsen.log` file for the particular test run in the `store` folder. The final output of every test will be either + +Everything looks good! ã½('ã¼`)ã --- End diff -- @GJL the end of this line is gibberishï¼ ---
[GitHub] flink pull request #6239: [FLINK-9004][tests] Implement Jepsen tests to test...
Github user GJL commented on a diff in the pull request: https://github.com/apache/flink/pull/6239#discussion_r199507669 --- Diff: jepsen-flink/docker/nodes --- @@ -0,0 +1,3 @@ +n1 --- End diff -- file must be excluded from RAT plugin ---
[GitHub] flink pull request #6239: [FLINK-9004][tests] Implement Jepsen tests to test...
GitHub user GJL opened a pull request: https://github.com/apache/flink/pull/6239 [FLINK-9004][tests] Implement Jepsen tests to test job availability. ## What is the purpose of the change *Use the Jepsen framework (https://github.com/jepsen-io/jepsen) to implement tests that verify Flink's HA capabilities under real-world faults, such as sudden TaskManager/JobManager termination, HDFS NameNode unavailability, network partitions, etc. The Flink cluster under test is automatically deployed on YARN (session & job mode) and Mesos. Provide Dockerfiles for local test development.* ## Brief change log - *Implement Jepsen tests.* ## Verifying this change This change added tests and can be verified as follows: - *The changes themselves are tests.* - *Run Jepsen tests in docker containers.* - *Run unit tests with `lein test`* ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): (yes / **no** (at least not to Flink)) - 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** (but it will as soon as test failures appear) / 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) cc: @tillrohrmann @cewood You can merge this pull request into a Git repository by running: $ git pull https://github.com/GJL/flink FLINK-9004 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/6239.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #6239 commit 063e4621a5982b55ee7f7b0935290bbc717a5a45 Author: gyao Date: 2018-03-05T21:23:33Z [FLINK-9004][tests] Implement Jepsen tests to test job availability. Use the Jepsen framework (https://github.com/jepsen-io/jepsen) to implement tests that verify Flink's HA capabilities under real-world faults, such as sudden TaskManager/JobManager termination, HDFS NameNode unavailability, network partitions, etc. The Flink cluster under test is automatically deployed on YARN (session & job mode) and Mesos. Provide Dockerfiles for local test development. ---