yunfengzhou-hub opened a new pull request, #97:
URL: https://github.com/apache/flink-ml/pull/97
## What is the purpose of the change
This PR mainly improves `DataCacheReader` and `DataCacheWriter`'s
performance with memory caches, and further optimizes KMeans algorithm with
DataCache mechanism.
## Brief change log
- In DataCache mechanism, provides the option to cache records in memory in
deserialized format, instead of directly saving them to file system, unless
checkpoint is invoked or there is not enough memory.
- Changes `DataStreamUtils.mapParition()`'s behavior from using `ListState`
to using `DataCacheWriter`.
- Utilizes the memory-caching functionality in
`KMeans.SelectNearestCentroidOperator` to avoid OOM.
- All other existing usages of `DataCacheWriter` is untouched,
continuing to directly saving records to file system.
- Adds `DataStreamUtils.sample()` and uses it in
`KMeans.selectRandomCentroids()` to reduce memory usage.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (yes)
- The public API, i.e., is any changed class annotated with
@public(Evolving): (no)
- Does this pull request introduce a new feature? (no)
- If yes, how is the feature documented? (N/A)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]