Skip to content

Commit

Permalink
Spotless Apply
Browse files Browse the repository at this point in the history
  • Loading branch information
zackyoungh authored and github-actions[bot] committed Dec 16, 2024
1 parent 9451f35 commit 486b4db
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,16 @@ public String getArgs() {
return args;
}

public String getStatement (){
return StrUtil.format("EXECUTE JAR WITH (\n" +
"'uri'='{}',\n" +
"'main-class'='{}',\n" +
"'args'='{}',\n" +
"'allowNonRestoredState'='{}'\n" +
");",getUri(),getMainClass(),getArgs(),getAllowNonRestoredState());
public String getStatement() {
return StrUtil.format(
"EXECUTE JAR WITH (\n" + "'uri'='{}',\n"
+ "'main-class'='{}',\n"
+ "'args'='{}',\n"
+ "'allowNonRestoredState'='{}'\n"
+ ");",
getUri(),
getMainClass(),
getArgs(),
getAllowNonRestoredState());
}
}
10 changes: 4 additions & 6 deletions dinky-core/src/main/java/org/dinky/executor/Executor.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

package org.dinky.executor;

import cn.hutool.core.codec.Base64;
import org.dinky.assertion.Asserts;
import org.dinky.classloader.DinkyClassLoader;
import org.dinky.context.CustomTableEnvironmentContext;
Expand All @@ -34,10 +33,7 @@
import org.dinky.interceptor.FlinkInterceptorResult;
import org.dinky.job.JobStatementPlan;
import org.dinky.resource.BaseResourceManager;
import org.dinky.trans.ExecuteJarParseStrategyUtil;
import org.dinky.trans.Operations;
import org.dinky.trans.dml.ExecuteJarOperation;
import org.dinky.trans.parse.ExecuteJarParseStrategy;
import org.dinky.utils.KerberosUtil;

import org.apache.flink.api.common.ExecutionConfig;
Expand Down Expand Up @@ -71,6 +67,7 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;

import cn.hutool.core.codec.Base64;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ReflectUtil;
import cn.hutool.core.util.URLUtil;
Expand Down Expand Up @@ -220,8 +217,9 @@ public JobStatementPlan parseStatementIntoJobStatementPlan(String[] statements)
jobStatementPlan.addJobStatement(statement, JobStatementType.SET, operationType);
} else if (operationType.equals(SqlType.EXECUTE_JAR)) {
JarSubmitParam jarSubmitParam = JarSubmitParam.build(statement);
jarSubmitParam.setUri("base64@"+ Base64.encode(pretreatStatement(jarSubmitParam.getArgs())));
jobStatementPlan.addJobStatement(jarSubmitParam.toString(), JobStatementType.EXECUTE_JAR, operationType);
jarSubmitParam.setUri("base64@" + Base64.encode(pretreatStatement(jarSubmitParam.getArgs())));
jobStatementPlan.addJobStatement(
jarSubmitParam.toString(), JobStatementType.EXECUTE_JAR, operationType);
} else if (operationType.equals(SqlType.EXECUTE)) {
jobStatementPlan.addJobStatement(statement, JobStatementType.PIPELINE, operationType);
} else if (operationType.equals(SqlType.PRINT)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import org.dinky.explainer.mock.MockStatementExplainer;
import org.dinky.function.data.model.UDF;
import org.dinky.function.pool.UdfCodePool;
import org.dinky.function.util.UDFUtil;
import org.dinky.job.JobConfig;
import org.dinky.job.JobManager;
import org.dinky.job.JobRunnerFactory;
Expand Down

0 comments on commit 486b4db

Please sign in to comment.