Skip to content

Conversation

NicoK
Copy link
Contributor

@NicoK NicoK commented Jan 23, 2017

This extends the QueryableStateITCase so that it is able to run with any selected state backend. Some optimisations reduce the total runtime of the test cases so that we are able to run the tests with all three currently available backends, i.e. MemoryStateBackend, FsStateBackend, and RocksDBStateBackend, with little extra costs.

This is based upon #3193.

Nico Kruber added 4 commits January 23, 2017 16:12
… state backends

Querying for a non-existing key for a state that has a default value set
currently results in an UnknownKeyOrNamespace exception when the
MemoryStateBackend or FsStateBackend is used but results in the default value
if RocksDBStateBackend is set.

This removes the special handling from the RocksDBStateBackend and makes it
consistent with the other two back-ends, i.e. returning null which results
in the mentioned UnknownKeyOrNamespace exception.
…test duration

This is based on the following points:
* slow down QueryableStateITCase#TestKeyRangeSource for the rest of the
  program to make more progress (we do not need a full-speed source here!)
* reduce the checkpointing interval
* reduce the amount of progress before starting our own evaluation
* reduce the number of checkpoints to wait for before killing a TM
* reduce the thread waiting time when asking how many checkpoints exist

Note that by slowing down QueryableStateITCase#TestKeyRangeSource, the other
tests should only be affected positively, too, since they also did not really
need a full-speed source and thus have more CPU cycles for their own tasks.

This, among with
This is based on reducing the number of keys the source generates. We do not
really need 1024 different keys for the tests - go with 256 now.
Copy link
Contributor

@uce uce left a comment

Choose a reason for hiding this comment

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

Good fixes!

Small suggestion would be to add an abstract createStateBackend method in the base test class instead of relying on override of the setUp method and moving the annoated setUp method to the base class and setting everything up there.

* Several integration tests for queryable state using the {@link RocksDBStateBackend}.
*/
public class QueryableStateITCaseRocksDBBackend extends AbstractQueryableStateITCase {

Copy link
Contributor

Choose a reason for hiding this comment

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

empty line

* Several integration tests for queryable state using the {@link FsStateBackend}.
*/
public class QueryableStateITCaseFsBackend extends AbstractQueryableStateITCase {

Copy link
Contributor

Choose a reason for hiding this comment

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

empty line

@uce
Copy link
Contributor

uce commented Jan 24, 2017

Thanks for addressing the comments, merging.

asfgit pushed a commit that referenced this pull request Jan 24, 2017
…ackends

[FLINK-5615][query] improve testQueryableStateWithTaskManagerFailure test duration

This is based on the following points:
* slow down QueryableStateITCase#TestKeyRangeSource for the rest of the
  program to make more progress (we do not need a full-speed source here!)
* reduce the checkpointing interval
* reduce the amount of progress before starting our own evaluation
* reduce the number of checkpoints to wait for before killing a TM
* reduce the thread waiting time when asking how many checkpoints exist

Note that by slowing down QueryableStateITCase#TestKeyRangeSource, the other
tests should only be affected positively, too, since they also did not really
need a full-speed source and thus have more CPU cycles for their own tasks.

[FLINK-5615][query] speed up some more tests in QueryableStateITCase

This is based on reducing the number of keys the source generates. We do not
really need 1024 different keys for the tests - go with 256 now.

[FLINK-5615][query] execute the QueryableStateITCase for all state back-ends

[FLINK-5615][query] nicer test case abstraction

This closes #3194.
@asfgit asfgit closed this in b351aa2 Jan 24, 2017
joseprupi pushed a commit to joseprupi/flink that referenced this pull request Feb 12, 2017
…ackends

[FLINK-5615][query] improve testQueryableStateWithTaskManagerFailure test duration

This is based on the following points:
* slow down QueryableStateITCase#TestKeyRangeSource for the rest of the
  program to make more progress (we do not need a full-speed source here!)
* reduce the checkpointing interval
* reduce the amount of progress before starting our own evaluation
* reduce the number of checkpoints to wait for before killing a TM
* reduce the thread waiting time when asking how many checkpoints exist

Note that by slowing down QueryableStateITCase#TestKeyRangeSource, the other
tests should only be affected positively, too, since they also did not really
need a full-speed source and thus have more CPU cycles for their own tasks.

[FLINK-5615][query] speed up some more tests in QueryableStateITCase

This is based on reducing the number of keys the source generates. We do not
really need 1024 different keys for the tests - go with 256 now.

[FLINK-5615][query] execute the QueryableStateITCase for all state back-ends

[FLINK-5615][query] nicer test case abstraction

This closes apache#3194.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants