Commit b6fc8268 authored by wenmo's avatar wenmo

修复集群配置参数项为空时无法正常提交perjob任务的bug

parent df862a44
package com.dlink.executor; package com.dlink.executor;
import com.dlink.assertion.Asserts;
import com.dlink.result.SqlExplainResult; import com.dlink.result.SqlExplainResult;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
...@@ -234,6 +235,9 @@ public class CustomTableEnvironmentImpl extends TableEnvironmentImpl implements ...@@ -234,6 +235,9 @@ public class CustomTableEnvironmentImpl extends TableEnvironmentImpl implements
if (setOperation.getKey().isPresent() && setOperation.getValue().isPresent()) { if (setOperation.getKey().isPresent() && setOperation.getValue().isPresent()) {
String key = setOperation.getKey().get().trim(); String key = setOperation.getKey().get().trim();
String value = setOperation.getValue().get().trim(); String value = setOperation.getValue().get().trim();
if(Asserts.isNullString(key)||Asserts.isNullString(value)){
return;
}
Map<String, String> confMap = new HashMap<>(); Map<String, String> confMap = new HashMap<>();
confMap.put(key, value); confMap.put(key, value);
setMap.put(key, value); setMap.put(key, value);
...@@ -246,6 +250,9 @@ public class CustomTableEnvironmentImpl extends TableEnvironmentImpl implements ...@@ -246,6 +250,9 @@ public class CustomTableEnvironmentImpl extends TableEnvironmentImpl implements
private void callReset(ResetOperation resetOperation, StreamExecutionEnvironment environment, Map<String, Object> setMap) { private void callReset(ResetOperation resetOperation, StreamExecutionEnvironment environment, Map<String, Object> setMap) {
if (resetOperation.getKey().isPresent()) { if (resetOperation.getKey().isPresent()) {
String key = resetOperation.getKey().get().trim(); String key = resetOperation.getKey().get().trim();
if(Asserts.isNullString(key)){
return;
}
Map<String, String> confMap = new HashMap<>(); Map<String, String> confMap = new HashMap<>();
confMap.put(key, null); confMap.put(key, null);
setMap.remove(key); setMap.remove(key);
......
package com.dlink.executor; package com.dlink.executor;
import com.dlink.assertion.Asserts;
import com.dlink.result.SqlExplainResult; import com.dlink.result.SqlExplainResult;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
...@@ -297,6 +298,9 @@ public class CustomTableEnvironmentImpl extends TableEnvironmentImpl implements ...@@ -297,6 +298,9 @@ public class CustomTableEnvironmentImpl extends TableEnvironmentImpl implements
if (setOperation.getKey().isPresent() && setOperation.getValue().isPresent()) { if (setOperation.getKey().isPresent() && setOperation.getValue().isPresent()) {
String key = setOperation.getKey().get().trim(); String key = setOperation.getKey().get().trim();
String value = setOperation.getValue().get().trim(); String value = setOperation.getValue().get().trim();
if(Asserts.isNullString(key)||Asserts.isNullString(value)){
return;
}
Map<String, String> confMap = new HashMap<>(); Map<String, String> confMap = new HashMap<>();
confMap.put(key, value); confMap.put(key, value);
setMap.put(key, value); setMap.put(key, value);
...@@ -309,6 +313,9 @@ public class CustomTableEnvironmentImpl extends TableEnvironmentImpl implements ...@@ -309,6 +313,9 @@ public class CustomTableEnvironmentImpl extends TableEnvironmentImpl implements
private void callReset(ResetOperation resetOperation, StreamExecutionEnvironment environment, Map<String, Object> setMap) { private void callReset(ResetOperation resetOperation, StreamExecutionEnvironment environment, Map<String, Object> setMap) {
if (resetOperation.getKey().isPresent()) { if (resetOperation.getKey().isPresent()) {
String key = resetOperation.getKey().get().trim(); String key = resetOperation.getKey().get().trim();
if(Asserts.isNullString(key)){
return;
}
Map<String, String> confMap = new HashMap<>(); Map<String, String> confMap = new HashMap<>();
confMap.put(key, null); confMap.put(key, null);
setMap.remove(key); setMap.remove(key);
......
...@@ -713,6 +713,9 @@ export default (): React.ReactNode => { ...@@ -713,6 +713,9 @@ export default (): React.ReactNode => {
<li> <li>
<Link>优化 PerJob 和 Application 作业的JID提交检测</Link> <Link>优化 PerJob 和 Application 作业的JID提交检测</Link>
</li> </li>
<li>
<Link>修复 集群配置参数项为空时无法正常提交perjob任务的bug</Link>
</li>
</ul> </ul>
</Paragraph> </Paragraph>
</Timeline.Item> </Timeline.Item>
......
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