Unverified Commit 92e2a38b authored by ZackYoung's avatar ZackYoung Committed by GitHub

udf修复,未包含udf可直接跳过 (#1188)

parent 75e8745a
...@@ -41,6 +41,7 @@ import javax.annotation.Resource; ...@@ -41,6 +41,7 @@ import javax.annotation.Resource;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.map.MapUtil; import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.ArrayUtil;
...@@ -80,14 +81,17 @@ public class UDFServiceImpl implements UDFService { ...@@ -80,14 +81,17 @@ public class UDFServiceImpl implements UDFService {
@Override @Override
public void initUDF(String statement, GatewayType gatewayType, Integer missionId, Executor executor, public void initUDF(String statement, GatewayType gatewayType, Integer missionId, Executor executor,
JobConfig config) { JobConfig config) {
if (gatewayType == GatewayType.KUBERNETES_APPLICATION) {
throw new BusException("udf 暂不支持k8s application");
}
ProcessEntity process = ProcessContextHolder.getProcess(); ProcessEntity process = ProcessContextHolder.getProcess();
process.info("Initializing Flink UDF...Start"); process.info("Initializing Flink UDF...Start");
List<UDF> udf = UDFUtils.getUDF(statement); List<UDF> udf = UDFUtils.getUDF(statement);
if (CollUtil.isNotEmpty(udf)) {
if (gatewayType == GatewayType.KUBERNETES_APPLICATION) {
throw new BusException("udf 暂不支持k8s application");
}
} else {
return;
}
UDFPath udfPath = FunctionFactory.initUDF(udf, missionId, executor); UDFPath udfPath = FunctionFactory.initUDF(udf, missionId, executor);
executor.initUDF(udfPath.getJarPaths()); executor.initUDF(udfPath.getJarPaths());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment