in src/main/java/com/aliyun/odps/jdbc/OdpsStatement.java [397:431]
protected void processSetClauseExtra(Properties properties) throws OdpsException {
boolean needRebuildSql = false;
SQLExecutorBuilder executorBuilder = connHandle.getExecutorBuilder().clone();
for (String key : properties.stringPropertyNames()) {
if (key.equalsIgnoreCase("odps.task.wlm.quota")) {
boolean enableMaxQA = connHandle.checkIfEnableMaxQA(properties.getProperty(key));
executorBuilder.enableMcqaV2(enableMaxQA);
if (enableMaxQA) {
executorBuilder.executeMode(ExecuteMode.INTERACTIVE_V2);
executorBuilder.quotaName(properties.getProperty(key));
}
connHandle.log.info("enable MaxQA: " + enableMaxQA + ", quota name: " + properties.getProperty(key));
needRebuildSql = true;
}
if (key.equalsIgnoreCase("jdbc.tunnel.endpoint")) {
executorBuilder.tunnelEndpoint(properties.getProperty(key));
connHandle.log.info("use tunnel endpoint: " + properties.getProperty(key));
needRebuildSql = true;
}
if (key.equalsIgnoreCase("jdbc.fetchResult.useTunnel")) {
executorBuilder.useInstanceTunnel(Boolean.parseBoolean(properties.getProperty(key)));
connHandle.log.info("fetch result use tunnel: " + properties.getProperty(key));
needRebuildSql = true;
}
}
if (needRebuildSql) {
try {
this.sqlExecutor = executorBuilder.build();
} catch (Exception e) {
connHandle.log.error("rebuild sql executor failed.", e);
this.sqlExecutor = connHandle.getExecutor();
}
}
}