You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/03/30 08:54:49 UTC

[GitHub] [flink-ml] yunfengzhou-hub opened a new pull request #76: [FLINK-26904] Update Stage::load to use StreamTableEnvironment

yunfengzhou-hub opened a new pull request #76:
URL: https://github.com/apache/flink-ml/pull/76


   ## What is the purpose of the change
   This PR mainly updates the static `load` method of all Stage `subclasses` to use `StreamTableEnvironment`.
   
   ## Brief change log
   
   - Add helper method `TableUtils::getExecutionEnvironment` to get the corresponding `StreamExecutionEnvironment` from a `StreamTableEnvironment`.
   - Changes the signature of the static `load` method of all `Stage` subclasses
     - from `public static T load(StreamExecutionEnvironment env, String path)`
     - to public `static T load(StreamTableEnvironment tEnv, String path)`
   - Changes the signature of the static `ReadWriteUtils::loadModelData` method
     - from `public static <T> DataStream<T> loadModelData(StreamExecutionEnvironment env, String path, SimpleStreamFormat<T> modelDecoder)`
     - to `public static <T> Table loadModelData(StreamTableEnvironment tEnv, String path, SimpleStreamFormat<T> modelDecoder)`
   
   - Changes the signature of the static `KMeansModelData::generateRandomModelData` method
     - from `public static DataStream<KMeansModelData> generateRandomModelData(StreamExecutionEnvironment env, int k, int dim, double weight, long seed)`
     - to `public static Table generateRandomModelData(StreamTableEnvironment tEnv, int k, int dim, double weight, long seed)`
   
   
   ## 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)
   - 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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink-ml] lindong28 commented on pull request #76: [FLINK-26904] Update Stage::load to use StreamTableEnvironment

Posted by GitBox <gi...@apache.org>.
lindong28 commented on pull request #76:
URL: https://github.com/apache/flink-ml/pull/76#issuecomment-1082879691


   Thanks for the PR and the detailed check! LGTM.


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink-ml] lindong28 closed pull request #76: [FLINK-26904] Update Stage::load to use StreamTableEnvironment

Posted by GitBox <gi...@apache.org>.
lindong28 closed pull request #76:
URL: https://github.com/apache/flink-ml/pull/76


   


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink-ml] yunfengzhou-hub commented on pull request #76: [FLINK-26904] Update Stage::load to use StreamTableEnvironment

Posted by GitBox <gi...@apache.org>.
yunfengzhou-hub commented on pull request #76:
URL: https://github.com/apache/flink-ml/pull/76#issuecomment-1082832658


   After the changes listed in the description are applied, `StreamExecutionEnvironment` is only used in the following places in Flink ML.
   - Used in test cases to create test environment.
   - Used in `Iterations` and `DraftExecutionEnvironment` in `flink-ml-iterations` to support iteration on DataStreams.
   - Used in `BroadcastUtils` and `EndOfStreamWindows` in `flink-ml-core` to support broadcasting and windowing on DataStreams.
   - Used in the implementation of the `TableUtils`, `ReadWriteUtils`, `KMeansModelData` static methods described above.
   
   None of the use cases above is public API for users, so I think the changes made so far is enough to achieve our goal in FLINK-26904.
   


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org