Search in sources :

Example 6 with SessionContext

use of org.apache.flink.table.client.gateway.context.SessionContext in project flink by apache.

the class LocalExecutor method openSession.

@Override
public String openSession(@Nullable String sessionId) throws SqlExecutionException {
    SessionContext sessionContext = LocalContextUtils.buildSessionContext(sessionId, defaultContext);
    sessionId = sessionContext.getSessionId();
    if (this.contextMap.containsKey(sessionId)) {
        throw new SqlExecutionException("Found another session with the same session identifier: " + sessionId);
    } else {
        this.contextMap.put(sessionId, sessionContext);
    }
    return sessionId;
}
Also used : SqlExecutionException(org.apache.flink.table.client.gateway.SqlExecutionException) SessionContext(org.apache.flink.table.client.gateway.context.SessionContext)

Example 7 with SessionContext

use of org.apache.flink.table.client.gateway.context.SessionContext in project flink by apache.

the class LocalExecutor method removeJar.

@Override
public void removeJar(String sessionId, String jarUrl) {
    final SessionContext context = getSessionContext(sessionId);
    context.removeJar(jarUrl);
}
Also used : SessionContext(org.apache.flink.table.client.gateway.context.SessionContext)

Example 8 with SessionContext

use of org.apache.flink.table.client.gateway.context.SessionContext in project flink by apache.

the class LocalExecutor method resetSessionProperty.

@Override
public void resetSessionProperty(String sessionId, String key) throws SqlExecutionException {
    SessionContext context = getSessionContext(sessionId);
    context.reset(key);
}
Also used : SessionContext(org.apache.flink.table.client.gateway.context.SessionContext)

Aggregations

SessionContext (org.apache.flink.table.client.gateway.context.SessionContext)8 ReadableConfig (org.apache.flink.configuration.ReadableConfig)1 TableResultInternal (org.apache.flink.table.api.internal.TableResultInternal)1 ResultDescriptor (org.apache.flink.table.client.gateway.ResultDescriptor)1 SqlExecutionException (org.apache.flink.table.client.gateway.SqlExecutionException)1 DynamicResult (org.apache.flink.table.client.gateway.local.result.DynamicResult)1