Skip to content

Commit 3476a67

Browse files
fix the bug that nullpointexception in dataapiservice when fetch resultSet.
1 parent e7ff9fd commit 3476a67

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

dss-apps/dss-apiservice-server/src/main/java/com/webank/wedatasphere/dss/apiservice/core/execute/LinkisJobSubmit.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,15 @@ public class LinkisJobSubmit {
3636
private static final Map<String, UJESClient> ujesClientMap = new HashMap<>();
3737

3838
public static UJESClient getClient() {
39+
return getClient(new HashMap<>(0));
40+
}
41+
42+
public static UJESClient getClient(Map<String, String> params) {
3943
return getUJESClient(
40-
Configuration.GATEWAY_URL().getValue(),
41-
ApiServiceConfiguration.LINKIS_ADMIN_USER.getValue(),
42-
ApiServiceConfiguration.LINKIS_AUTHOR_USER_TOKEN.getValue(),
43-
new HashMap<>(0));
44+
Configuration.GATEWAY_URL().getValue(params),
45+
ApiServiceConfiguration.LINKIS_ADMIN_USER.getValue(params),
46+
ApiServiceConfiguration.LINKIS_AUTHOR_USER_TOKEN.getValue(params),
47+
params);
4448
}
4549

4650

dss-apps/dss-apiservice-server/src/main/java/com/webank/wedatasphere/dss/apiservice/core/service/impl/ApiServiceImpl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@ public class ApiServiceImpl implements ApiService {
9595
public void buildClient() {
9696
LOG.info("build client start ======");
9797
client = BmlClientFactory.createBmlClient();
98-
Map<String, String> props = new HashMap<>();
99-
ujesClient = LinkisJobSubmit.getClient(props);
98+
ujesClient = LinkisJobSubmit.getClient();
10099
LOG.info("build client end =======");
101100
}
102101

0 commit comments

Comments
 (0)