-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feature][scaleph-engine-sql-gateway] add flink sql gateway session i…
…mplementions (#628) * feature: add idea formatter onoff comment * feature: add flink sql gateway session * feature: add flink sql gateway session * feature: add flink sql gateway session
- Loading branch information
Showing
18 changed files
with
716 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...eph-dao/src/main/java/cn/sliew/scaleph/dao/entity/master/ws/WsFlinkSqlGatewaySession.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package cn.sliew.scaleph.dao.entity.master.ws; | ||
|
||
import cn.sliew.scaleph.dao.entity.BaseDO; | ||
import com.baomidou.mybatisplus.annotation.TableField; | ||
import com.baomidou.mybatisplus.annotation.TableName; | ||
import lombok.Data; | ||
|
||
/** | ||
* <p> | ||
* flink sql gateway session | ||
* </p> | ||
*/ | ||
@Data | ||
@TableName("ws_flink_sql_gateway_session") | ||
public class WsFlinkSqlGatewaySession extends BaseDO { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
@TableField("session_handler") | ||
private String sessionHandler; | ||
|
||
@TableField("session_name") | ||
private String sessionName; | ||
|
||
@TableField("session_config") | ||
private String sessionConfig; | ||
|
||
@TableField("default_catalog") | ||
private String defaultCatalog; | ||
|
||
} |
33 changes: 33 additions & 0 deletions
33
...o/src/main/java/cn/sliew/scaleph/dao/mapper/master/ws/WsFlinkSqlGatewaySessionMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package cn.sliew.scaleph.dao.mapper.master.ws; | ||
|
||
import cn.sliew.scaleph.dao.entity.master.ws.WsFlinkSqlGatewaySession; | ||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
import org.springframework.stereotype.Repository; | ||
|
||
/** | ||
* <p> | ||
* flink sql gateway session Mapper 接口 | ||
* </p> | ||
*/ | ||
@Repository | ||
public interface WsFlinkSqlGatewaySessionMapper extends BaseMapper<WsFlinkSqlGatewaySession> { | ||
|
||
} |
43 changes: 43 additions & 0 deletions
43
...c/main/resources/cn/sliew/scaleph/dao/mapper/master/ws/WsFlinkSqlGatewaySessionMapper.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Licensed to the Apache Software Foundation (ASF) under one or more | ||
~ contributor license agreements. See the NOTICE file distributed with | ||
~ this work for additional information regarding copyright ownership. | ||
~ The ASF licenses this file to You under the Apache License, Version 2.0 | ||
~ (the "License"); you may not use this file except in compliance with | ||
~ the License. You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
|
||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
<mapper namespace="cn.sliew.scaleph.dao.mapper.master.ws.WsFlinkSqlGatewaySessionMapper"> | ||
<!-- 通用查询映射结果 --> | ||
<resultMap id="BaseResultMap" type="cn.sliew.scaleph.dao.entity.master.ws.WsFlinkSqlGatewaySession"> | ||
<result column="id" property="id"/> | ||
<result column="creator" property="creator"/> | ||
<result column="create_time" property="createTime"/> | ||
<result column="editor" property="editor"/> | ||
<result column="update_time" property="updateTime"/> | ||
<result column="session_handler" property="sessionHandler"/> | ||
<result column="session_name" property="sessionName"/> | ||
<result column="session_config" property="sessionConfig"/> | ||
<result column="default_catalog" property="defaultCatalog"/> | ||
</resultMap> | ||
|
||
<!-- 通用查询结果列 --> | ||
<sql id="Base_Column_List"> | ||
id, | ||
creator, | ||
create_time, | ||
editor, | ||
update_time, | ||
session_handler, session_name, session_config, default_catalog | ||
</sql> | ||
</mapper> |
25 changes: 25 additions & 0 deletions
25
...c/main/java/cn/sliew/scaleph/engine/sql/gateway/environment/TableEnvironmentProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package cn.sliew.scaleph.engine.sql.gateway.environment; | ||
|
||
import cn.sliew.scaleph.engine.sql.gateway.services.dto.FlinkSqlGatewaySession; | ||
import org.apache.flink.table.api.internal.TableEnvironmentInternal; | ||
|
||
public interface TableEnvironmentProvider { | ||
|
||
TableEnvironmentInternal getTableEnvironment(FlinkSqlGatewaySession session); | ||
} |
36 changes: 36 additions & 0 deletions
36
...in/java/cn/sliew/scaleph/engine/sql/gateway/environment/TableEnvironmentProviderImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package cn.sliew.scaleph.engine.sql.gateway.environment; | ||
|
||
import cn.sliew.scaleph.engine.sql.gateway.services.dto.FlinkSqlGatewaySession; | ||
import org.apache.flink.table.api.EnvironmentSettings; | ||
import org.apache.flink.table.api.internal.TableEnvironmentInternal; | ||
import org.apache.flink.table.gateway.service.operation.OperationExecutor; | ||
|
||
/** | ||
* @see OperationExecutor#getTableEnvironment() | ||
* @see org.apache.flink.table.api.internal.TableEnvironmentInternal#create(EnvironmentSettings) | ||
* @see org.apache.flink.table.api.bridge.java.internal.StreamTableEnvironmentImpl#create(EnvironmentSettings) | ||
*/ | ||
public class TableEnvironmentProviderImpl implements TableEnvironmentProvider { | ||
|
||
@Override | ||
public TableEnvironmentInternal getTableEnvironment(FlinkSqlGatewaySession session) { | ||
// todo to do | ||
return null; | ||
} | ||
} |
Oops, something went wrong.