[
https://issues.apache.org/jira/browse/FLINK-10871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16691839#comment-16691839
]
Hequn Cheng commented on FLINK-10871:
-------------------------------------
[~fhueske] Good questions. I'm in a dilemma about how to implement the
TableEnvFactory.
On one hand, I think the TableEnvFactory should generate TableEnvironment
according to the types of ExecutionEnvironment, i.e, take ExecutionEnvironment
as a parameter of the create method.
{code:java}
public interface TableEnvFactory {
TableEnvironment createTableEnvironment(StreamExecutionEnvironment
environment, TableConfig tableConfig);
}
{code}
On the other hand, the TableEnvFactory may contain a lot of override methods
due to the types of ExecutionEnvironment(batch/stream/scala/java).
I should think more about it.
> ExecutionEnvironment & TableEnvironment should be singleton
> -----------------------------------------------------------
>
> Key: FLINK-10871
> URL: https://issues.apache.org/jira/browse/FLINK-10871
> Project: Flink
> Issue Type: Improvement
> Reporter: Jeff Zhang
> Assignee: Hequn Cheng
> Priority: Minor
>
> For now, ExecutionEnvironment.getExecutionEnvironment and
> TableEnvironment.getTableEnvironment will always create a new object, I think
> singleton should be sufficient for flink app unless I misunderstand it.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)