flink icon indicating copy to clipboard operation
flink copied to clipboard

[FLINK-35704] Use ForkJoinPool in NonSplittingRecursiveEnumerator

Open gliter opened this issue 1 year ago • 4 comments

What is the purpose of the change

Use ForkJoinPool when enumerating files to greatly increase speed. Especially in cases when majority of time is wasted waiting for remote storage to respond.

Brief change log

  • ForkJoinPool with parallelStream is used in org.apache.flink.connector.file.src.enumerate.NonSplittingRecursiveEnumerator

Verifying this change

Please make sure both new and modified tests in this PR follow the conventions for tests defined in our code quality guide.

(Please pick either of the following options)

This change is already covered by existing tests, such as

  • org.apache.flink.connector.file.src.enumerate.NonSplittingRecursiveEnumerator
  • org.apache.flink.connector.file.src.enumerate.NonSplittingRecursiveAllDirEnumeratorTest

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

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

Documentation

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

gliter avatar Jun 26 '24 13:06 gliter

CI report:

  • 16fc1810e82709c29104cd370342e39305a5373e Azure: SUCCESS
Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

flinkbot avatar Jun 26 '24 13:06 flinkbot

I would prefer the code be structured a bit differently, mainly by not creating ArrayList just to be passed as parameter and return stream instead in addSplitsForPath but it have to be like this to preserver definition of this method that is kind of public API for extending of NonSplittingRecursiveEnumerator which few classes do.

gliter avatar Jun 26 '24 13:06 gliter

@flinkbot run azure

gliter avatar Jun 27 '24 13:06 gliter

This PR is being marked as stale since it has not had any activity in the last 90 days. If you would like to keep this PR alive, please leave a comment asking for a review. If the PR has merge conflicts, update it with the latest from the base branch.

If you are having difficulty finding a reviewer, please reach out to the community, contact details can be found here: https://flink.apache.org/what-is-flink/community/

If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed.

github-actions[bot] avatar Apr 06 '25 06:04 github-actions[bot]

Please review

gliter avatar Apr 14 '25 11:04 gliter

This PR is being marked as stale since it has not had any activity in the last 90 days. If you would like to keep this PR alive, please leave a comment asking for a review. If the PR has merge conflicts, update it with the latest from the base branch.

If you are having difficulty finding a reviewer, please reach out to the community, contact details can be found here: https://flink.apache.org/what-is-flink/community/

If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed.

github-actions[bot] avatar Jul 16 '25 06:07 github-actions[bot]

This PR has been closed since it has not had any activity in 120 days. If you feel like this was a mistake, or you would like to continue working on it, please feel free to re-open the PR and ask for a review.

github-actions[bot] avatar Aug 16 '25 06:08 github-actions[bot]