Skip to content

Commit

Permalink
[FLINK-35429][sqlgateway] Do not introduce new method in SqlGatewayEn…
Browse files Browse the repository at this point in the history
…dpointFactory#Context
  • Loading branch information
reswqa committed May 23, 2024
1 parent a5efed2 commit 6792253
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,6 @@ interface Context {
/** Gives read-only access to the configuration of the current session. */
ReadableConfig getFlinkConfiguration();

/**
* Get a map contains all flink configurations.
*
* @return The copy of flink configurations in the form of map, modifying this map will not
* influence the original configuration object.
*/
Map<String, String> getFlinkConfigurationOptions();

/**
* Returns the options with which the endpoint is created. All options that are prefixed
* with the endpoint identifier are included in the map.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,6 @@ public ReadableConfig getFlinkConfiguration() {
return flinkConfiguration;
}

@Override
public Map<String, String> getFlinkConfigurationOptions() {
return flinkConfiguration.toMap();
}

@Override
public Map<String, String> getEndpointOptions() {
return endpointConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public SqlGatewayEndpoint createSqlGatewayEndpoint(Context context) {
endpointFactoryHelper.validate();
Configuration config =
rebuildRestEndpointOptions(
context.getEndpointOptions(), context.getFlinkConfigurationOptions());
context.getEndpointOptions(), context.getFlinkConfiguration().toMap());
try {
return new SqlGatewayRestEndpoint(config, context.getSqlGatewayService());
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static Configuration getBaseConfig(Configuration flinkConf) {
null, flinkConf, getEndpointConfig(flinkConf, IDENTIFIER));

return rebuildRestEndpointOptions(
context.getEndpointOptions(), context.getFlinkConfigurationOptions());
context.getEndpointOptions(), context.getFlinkConfiguration().toMap());
}

/** Create the configuration generated from config.yaml. */
Expand Down

0 comments on commit 6792253

Please sign in to comment.