status
stringclasses
1 value
repo_name
stringclasses
31 values
repo_url
stringclasses
31 values
issue_id
int64
1
104k
title
stringlengths
4
233
body
stringlengths
0
186k
issue_url
stringlengths
38
56
pull_url
stringlengths
37
54
before_fix_sha
stringlengths
40
40
after_fix_sha
stringlengths
40
40
report_datetime
timestamp[us, tz=UTC]
language
stringclasses
5 values
commit_datetime
timestamp[us, tz=UTC]
updated_file
stringlengths
7
188
chunk_content
stringlengths
1
1.03M
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,352
[Bug] [datasource-api] Hive datasource connection failed when kerberos renew ticket lifetime expire
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened in krb5.conf file, >>> ticket_lifetime = 24h renew_lifetime = 7d >>> when after renew lifetime expired, connecting to the hive data source failed ,because the cached hive data source client uses the old ticket ,it cannot get the new ticket error log ``` [WARN] 2022-04-01 16:59:53.260 org.apache.hive.jdbc.HiveConnection:[237] - Failed to connect to **.**.**.**:**** [ERROR] 2022-04-01 16:59:56.127 org.apache.thrift.transport.TSaslTransport:[315] - SASL negotiation failure javax.security.sasl.SaslException: GSS initiate failed at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:211) at org.apache.thrift.transport.TSaslClientTransport.handleSaslStartMessage(TSaslClientTransport.java:94) at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:271) at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:51) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:48) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1698) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport.open(TUGIAssumingTransport.java:48) at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:343) at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:228) at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107) at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476) at com.zaxxer.hikari.pool.HikariPool.access$100(HikariPool.java:71) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:726) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:712) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.ietf.jgss.GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt) at sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:162) at sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:122) at sun.security.jgss.krb5.Krb5MechFactory.getMechanismContext(Krb5MechFactory.java:189) at sun.security.jgss.GSSManagerImpl.getMechanismContext(GSSManagerImpl.java:224) at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:212) at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:179) at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:192) ... 23 common frames omitted ``` ### What you expected to happen I think the data source client cache should have an expiration time, for example, use the Guava Cache instead of CurrentHashMap. ### How to reproduce 1. in krb5.conf file, change config renew life to short time, e.g 1h, then restart KDC 2. restart api server 3. check hive connection, now it's a success 4. after renew life expired, check hive connection, now it's a failed ### Anything else _No response_ ### Version 2.0.5 ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9352
https://github.com/apache/dolphinscheduler/pull/9353
70dae6945f126414e36ffc28c99e1bf6e2ac7428
206b7c1c51e84f2e937748bc94191b23f95298e9
2022-04-05T09:23:28Z
java
2022-04-27T08:56:24Z
dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java
} /** * cancel DataX process * * @param cancelApplication cancelApplication * @throws Exception if error throws Exception */ @Override public void cancelApplication(boolean cancelApplication) throws Exception { shellCommandExecutor.cancelApplication(); } /** * build datax configuration file * * @return datax json file name * @throws Exception if error throws Exception */ private String buildDataxJsonFile(Map<String, Property> paramsMap) throws Exception { String fileName = String.format("%s/%s_job.json", taskExecutionContext.getExecutePath(), taskExecutionContext.getTaskAppId()); String json; Path path = new File(fileName).toPath(); if (Files.exists(path)) { return fileName; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,352
[Bug] [datasource-api] Hive datasource connection failed when kerberos renew ticket lifetime expire
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened in krb5.conf file, >>> ticket_lifetime = 24h renew_lifetime = 7d >>> when after renew lifetime expired, connecting to the hive data source failed ,because the cached hive data source client uses the old ticket ,it cannot get the new ticket error log ``` [WARN] 2022-04-01 16:59:53.260 org.apache.hive.jdbc.HiveConnection:[237] - Failed to connect to **.**.**.**:**** [ERROR] 2022-04-01 16:59:56.127 org.apache.thrift.transport.TSaslTransport:[315] - SASL negotiation failure javax.security.sasl.SaslException: GSS initiate failed at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:211) at org.apache.thrift.transport.TSaslClientTransport.handleSaslStartMessage(TSaslClientTransport.java:94) at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:271) at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:51) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:48) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1698) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport.open(TUGIAssumingTransport.java:48) at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:343) at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:228) at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107) at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476) at com.zaxxer.hikari.pool.HikariPool.access$100(HikariPool.java:71) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:726) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:712) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.ietf.jgss.GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt) at sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:162) at sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:122) at sun.security.jgss.krb5.Krb5MechFactory.getMechanismContext(Krb5MechFactory.java:189) at sun.security.jgss.GSSManagerImpl.getMechanismContext(GSSManagerImpl.java:224) at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:212) at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:179) at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:192) ... 23 common frames omitted ``` ### What you expected to happen I think the data source client cache should have an expiration time, for example, use the Guava Cache instead of CurrentHashMap. ### How to reproduce 1. in krb5.conf file, change config renew life to short time, e.g 1h, then restart KDC 2. restart api server 3. check hive connection, now it's a success 4. after renew life expired, check hive connection, now it's a failed ### Anything else _No response_ ### Version 2.0.5 ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9352
https://github.com/apache/dolphinscheduler/pull/9353
70dae6945f126414e36ffc28c99e1bf6e2ac7428
206b7c1c51e84f2e937748bc94191b23f95298e9
2022-04-05T09:23:28Z
java
2022-04-27T08:56:24Z
dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java
if (dataXParameters.getCustomConfig() == Flag.YES.ordinal()) { json = dataXParameters.getJson().replaceAll("\\r\\n", "\n"); } else { ObjectNode job = JSONUtils.createObjectNode(); job.putArray("content").addAll(buildDataxJobContentJson()); job.set("setting", buildDataxJobSettingJson()); ObjectNode root = JSONUtils.createObjectNode(); root.set("job", job); root.set("core", buildDataxCoreJson()); json = root.toString(); } json = ParameterUtils.convertParameterPlaceholders(json, ParamUtils.convert(paramsMap)); logger.debug("datax job json : {}", json); FileUtils.writeStringToFile(new File(fileName), json, StandardCharsets.UTF_8); return fileName; } /** * build datax job config * * @return collection of datax job config JSONObject * @throws SQLException if error throws SQLException */ private List<ObjectNode> buildDataxJobContentJson() { BaseConnectionParam dataSourceCfg = (BaseConnectionParam) DataSourceUtils.buildConnectionParams( dataxTaskExecutionContext.getSourcetype(), dataxTaskExecutionContext.getSourceConnectionParams()); BaseConnectionParam dataTargetCfg = (BaseConnectionParam) DataSourceUtils.buildConnectionParams( dataxTaskExecutionContext.getTargetType(),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,352
[Bug] [datasource-api] Hive datasource connection failed when kerberos renew ticket lifetime expire
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened in krb5.conf file, >>> ticket_lifetime = 24h renew_lifetime = 7d >>> when after renew lifetime expired, connecting to the hive data source failed ,because the cached hive data source client uses the old ticket ,it cannot get the new ticket error log ``` [WARN] 2022-04-01 16:59:53.260 org.apache.hive.jdbc.HiveConnection:[237] - Failed to connect to **.**.**.**:**** [ERROR] 2022-04-01 16:59:56.127 org.apache.thrift.transport.TSaslTransport:[315] - SASL negotiation failure javax.security.sasl.SaslException: GSS initiate failed at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:211) at org.apache.thrift.transport.TSaslClientTransport.handleSaslStartMessage(TSaslClientTransport.java:94) at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:271) at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:51) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:48) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1698) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport.open(TUGIAssumingTransport.java:48) at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:343) at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:228) at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107) at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476) at com.zaxxer.hikari.pool.HikariPool.access$100(HikariPool.java:71) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:726) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:712) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.ietf.jgss.GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt) at sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:162) at sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:122) at sun.security.jgss.krb5.Krb5MechFactory.getMechanismContext(Krb5MechFactory.java:189) at sun.security.jgss.GSSManagerImpl.getMechanismContext(GSSManagerImpl.java:224) at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:212) at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:179) at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:192) ... 23 common frames omitted ``` ### What you expected to happen I think the data source client cache should have an expiration time, for example, use the Guava Cache instead of CurrentHashMap. ### How to reproduce 1. in krb5.conf file, change config renew life to short time, e.g 1h, then restart KDC 2. restart api server 3. check hive connection, now it's a success 4. after renew life expired, check hive connection, now it's a failed ### Anything else _No response_ ### Version 2.0.5 ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9352
https://github.com/apache/dolphinscheduler/pull/9353
70dae6945f126414e36ffc28c99e1bf6e2ac7428
206b7c1c51e84f2e937748bc94191b23f95298e9
2022-04-05T09:23:28Z
java
2022-04-27T08:56:24Z
dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java
dataxTaskExecutionContext.getTargetConnectionParams()); List<ObjectNode> readerConnArr = new ArrayList<>(); ObjectNode readerConn = JSONUtils.createObjectNode(); ArrayNode sqlArr = readerConn.putArray("querySql"); for (String sql : new String[]{dataXParameters.getSql()}) { sqlArr.add(sql); } ArrayNode urlArr = readerConn.putArray("jdbcUrl"); urlArr.add(DataSourceUtils.getJdbcUrl(DbType.valueOf(dataXParameters.getDsType()), dataSourceCfg)); readerConnArr.add(readerConn); ObjectNode readerParam = JSONUtils.createObjectNode(); readerParam.put("username", dataSourceCfg.getUser()); readerParam.put("password", decodePassword(dataSourceCfg.getPassword())); readerParam.putArray("connection").addAll(readerConnArr); ObjectNode reader = JSONUtils.createObjectNode(); reader.put("name", DataxUtils.getReaderPluginName(dataxTaskExecutionContext.getSourcetype())); reader.set("parameter", readerParam); List<ObjectNode> writerConnArr = new ArrayList<>(); ObjectNode writerConn = JSONUtils.createObjectNode(); ArrayNode tableArr = writerConn.putArray("table"); tableArr.add(dataXParameters.getTargetTable()); writerConn.put("jdbcUrl", DataSourceUtils.getJdbcUrl(DbType.valueOf(dataXParameters.getDtType()), dataTargetCfg)); writerConnArr.add(writerConn); ObjectNode writerParam = JSONUtils.createObjectNode(); writerParam.put("username", dataTargetCfg.getUser()); writerParam.put("password", decodePassword(dataTargetCfg.getPassword())); String[] columns = parsingSqlColumnNames(dataxTaskExecutionContext.getSourcetype(), dataxTaskExecutionContext.getTargetType(), dataSourceCfg, dataXParameters.getSql()); ArrayNode columnArr = writerParam.putArray("column");
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,352
[Bug] [datasource-api] Hive datasource connection failed when kerberos renew ticket lifetime expire
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened in krb5.conf file, >>> ticket_lifetime = 24h renew_lifetime = 7d >>> when after renew lifetime expired, connecting to the hive data source failed ,because the cached hive data source client uses the old ticket ,it cannot get the new ticket error log ``` [WARN] 2022-04-01 16:59:53.260 org.apache.hive.jdbc.HiveConnection:[237] - Failed to connect to **.**.**.**:**** [ERROR] 2022-04-01 16:59:56.127 org.apache.thrift.transport.TSaslTransport:[315] - SASL negotiation failure javax.security.sasl.SaslException: GSS initiate failed at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:211) at org.apache.thrift.transport.TSaslClientTransport.handleSaslStartMessage(TSaslClientTransport.java:94) at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:271) at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:51) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:48) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1698) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport.open(TUGIAssumingTransport.java:48) at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:343) at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:228) at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107) at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476) at com.zaxxer.hikari.pool.HikariPool.access$100(HikariPool.java:71) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:726) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:712) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.ietf.jgss.GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt) at sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:162) at sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:122) at sun.security.jgss.krb5.Krb5MechFactory.getMechanismContext(Krb5MechFactory.java:189) at sun.security.jgss.GSSManagerImpl.getMechanismContext(GSSManagerImpl.java:224) at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:212) at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:179) at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:192) ... 23 common frames omitted ``` ### What you expected to happen I think the data source client cache should have an expiration time, for example, use the Guava Cache instead of CurrentHashMap. ### How to reproduce 1. in krb5.conf file, change config renew life to short time, e.g 1h, then restart KDC 2. restart api server 3. check hive connection, now it's a success 4. after renew life expired, check hive connection, now it's a failed ### Anything else _No response_ ### Version 2.0.5 ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9352
https://github.com/apache/dolphinscheduler/pull/9353
70dae6945f126414e36ffc28c99e1bf6e2ac7428
206b7c1c51e84f2e937748bc94191b23f95298e9
2022-04-05T09:23:28Z
java
2022-04-27T08:56:24Z
dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java
for (String column : columns) { columnArr.add(column); } writerParam.putArray("connection").addAll(writerConnArr); if (CollectionUtils.isNotEmpty(dataXParameters.getPreStatements())) { ArrayNode preSqlArr = writerParam.putArray("preSql"); for (String preSql : dataXParameters.getPreStatements()) { preSqlArr.add(preSql); } } if (CollectionUtils.isNotEmpty(dataXParameters.getPostStatements())) { ArrayNode postSqlArr = writerParam.putArray("postSql"); for (String postSql : dataXParameters.getPostStatements()) { postSqlArr.add(postSql); } } ObjectNode writer = JSONUtils.createObjectNode(); writer.put("name", DataxUtils.getWriterPluginName(dataxTaskExecutionContext.getTargetType())); writer.set("parameter", writerParam); List<ObjectNode> contentList = new ArrayList<>(); ObjectNode content = JSONUtils.createObjectNode(); content.set("reader", reader); content.set("writer", writer); contentList.add(content); return contentList; } /** * build datax setting config * * @return datax setting config JSONObject
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,352
[Bug] [datasource-api] Hive datasource connection failed when kerberos renew ticket lifetime expire
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened in krb5.conf file, >>> ticket_lifetime = 24h renew_lifetime = 7d >>> when after renew lifetime expired, connecting to the hive data source failed ,because the cached hive data source client uses the old ticket ,it cannot get the new ticket error log ``` [WARN] 2022-04-01 16:59:53.260 org.apache.hive.jdbc.HiveConnection:[237] - Failed to connect to **.**.**.**:**** [ERROR] 2022-04-01 16:59:56.127 org.apache.thrift.transport.TSaslTransport:[315] - SASL negotiation failure javax.security.sasl.SaslException: GSS initiate failed at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:211) at org.apache.thrift.transport.TSaslClientTransport.handleSaslStartMessage(TSaslClientTransport.java:94) at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:271) at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:51) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:48) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1698) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport.open(TUGIAssumingTransport.java:48) at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:343) at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:228) at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107) at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476) at com.zaxxer.hikari.pool.HikariPool.access$100(HikariPool.java:71) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:726) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:712) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.ietf.jgss.GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt) at sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:162) at sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:122) at sun.security.jgss.krb5.Krb5MechFactory.getMechanismContext(Krb5MechFactory.java:189) at sun.security.jgss.GSSManagerImpl.getMechanismContext(GSSManagerImpl.java:224) at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:212) at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:179) at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:192) ... 23 common frames omitted ``` ### What you expected to happen I think the data source client cache should have an expiration time, for example, use the Guava Cache instead of CurrentHashMap. ### How to reproduce 1. in krb5.conf file, change config renew life to short time, e.g 1h, then restart KDC 2. restart api server 3. check hive connection, now it's a success 4. after renew life expired, check hive connection, now it's a failed ### Anything else _No response_ ### Version 2.0.5 ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9352
https://github.com/apache/dolphinscheduler/pull/9353
70dae6945f126414e36ffc28c99e1bf6e2ac7428
206b7c1c51e84f2e937748bc94191b23f95298e9
2022-04-05T09:23:28Z
java
2022-04-27T08:56:24Z
dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java
*/ private ObjectNode buildDataxJobSettingJson() { ObjectNode speed = JSONUtils.createObjectNode(); speed.put("channel", DATAX_CHANNEL_COUNT); if (dataXParameters.getJobSpeedByte() > 0) { speed.put("byte", dataXParameters.getJobSpeedByte()); } if (dataXParameters.getJobSpeedRecord() > 0) { speed.put("record", dataXParameters.getJobSpeedRecord()); } ObjectNode errorLimit = JSONUtils.createObjectNode(); errorLimit.put("record", 0); errorLimit.put("percentage", 0); ObjectNode setting = JSONUtils.createObjectNode(); setting.set("speed", speed); setting.set("errorLimit", errorLimit); return setting; } private ObjectNode buildDataxCoreJson() { ObjectNode speed = JSONUtils.createObjectNode(); speed.put("channel", DATAX_CHANNEL_COUNT); if (dataXParameters.getJobSpeedByte() > 0) { speed.put("byte", dataXParameters.getJobSpeedByte()); } if (dataXParameters.getJobSpeedRecord() > 0) { speed.put("record", dataXParameters.getJobSpeedRecord()); } ObjectNode channel = JSONUtils.createObjectNode(); channel.set("speed", speed); ObjectNode transport = JSONUtils.createObjectNode();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,352
[Bug] [datasource-api] Hive datasource connection failed when kerberos renew ticket lifetime expire
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened in krb5.conf file, >>> ticket_lifetime = 24h renew_lifetime = 7d >>> when after renew lifetime expired, connecting to the hive data source failed ,because the cached hive data source client uses the old ticket ,it cannot get the new ticket error log ``` [WARN] 2022-04-01 16:59:53.260 org.apache.hive.jdbc.HiveConnection:[237] - Failed to connect to **.**.**.**:**** [ERROR] 2022-04-01 16:59:56.127 org.apache.thrift.transport.TSaslTransport:[315] - SASL negotiation failure javax.security.sasl.SaslException: GSS initiate failed at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:211) at org.apache.thrift.transport.TSaslClientTransport.handleSaslStartMessage(TSaslClientTransport.java:94) at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:271) at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:51) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:48) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1698) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport.open(TUGIAssumingTransport.java:48) at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:343) at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:228) at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107) at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476) at com.zaxxer.hikari.pool.HikariPool.access$100(HikariPool.java:71) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:726) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:712) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.ietf.jgss.GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt) at sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:162) at sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:122) at sun.security.jgss.krb5.Krb5MechFactory.getMechanismContext(Krb5MechFactory.java:189) at sun.security.jgss.GSSManagerImpl.getMechanismContext(GSSManagerImpl.java:224) at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:212) at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:179) at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:192) ... 23 common frames omitted ``` ### What you expected to happen I think the data source client cache should have an expiration time, for example, use the Guava Cache instead of CurrentHashMap. ### How to reproduce 1. in krb5.conf file, change config renew life to short time, e.g 1h, then restart KDC 2. restart api server 3. check hive connection, now it's a success 4. after renew life expired, check hive connection, now it's a failed ### Anything else _No response_ ### Version 2.0.5 ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9352
https://github.com/apache/dolphinscheduler/pull/9353
70dae6945f126414e36ffc28c99e1bf6e2ac7428
206b7c1c51e84f2e937748bc94191b23f95298e9
2022-04-05T09:23:28Z
java
2022-04-27T08:56:24Z
dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java
transport.set("channel", channel); ObjectNode core = JSONUtils.createObjectNode(); core.set("transport", transport); return core; } /** * create command * * @return shell command file name * @throws Exception if error throws Exception */ private String buildShellCommandFile(String jobConfigFilePath, Map<String, Property> paramsMap) throws Exception { String fileName = String.format("%s/%s_node.%s", taskExecutionContext.getExecutePath(), taskExecutionContext.getTaskAppId(), OSUtils.isWindows() ? "bat" : "sh"); Path path = new File(fileName).toPath(); if (Files.exists(path)) { return fileName; } StringBuilder sbr = new StringBuilder(); sbr.append(getPythonCommand()); sbr.append(" "); sbr.append(DATAX_PATH); sbr.append(" "); sbr.append(loadJvmEnv(dataXParameters)); sbr.append(jobConfigFilePath);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,352
[Bug] [datasource-api] Hive datasource connection failed when kerberos renew ticket lifetime expire
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened in krb5.conf file, >>> ticket_lifetime = 24h renew_lifetime = 7d >>> when after renew lifetime expired, connecting to the hive data source failed ,because the cached hive data source client uses the old ticket ,it cannot get the new ticket error log ``` [WARN] 2022-04-01 16:59:53.260 org.apache.hive.jdbc.HiveConnection:[237] - Failed to connect to **.**.**.**:**** [ERROR] 2022-04-01 16:59:56.127 org.apache.thrift.transport.TSaslTransport:[315] - SASL negotiation failure javax.security.sasl.SaslException: GSS initiate failed at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:211) at org.apache.thrift.transport.TSaslClientTransport.handleSaslStartMessage(TSaslClientTransport.java:94) at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:271) at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:51) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:48) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1698) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport.open(TUGIAssumingTransport.java:48) at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:343) at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:228) at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107) at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476) at com.zaxxer.hikari.pool.HikariPool.access$100(HikariPool.java:71) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:726) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:712) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.ietf.jgss.GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt) at sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:162) at sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:122) at sun.security.jgss.krb5.Krb5MechFactory.getMechanismContext(Krb5MechFactory.java:189) at sun.security.jgss.GSSManagerImpl.getMechanismContext(GSSManagerImpl.java:224) at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:212) at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:179) at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:192) ... 23 common frames omitted ``` ### What you expected to happen I think the data source client cache should have an expiration time, for example, use the Guava Cache instead of CurrentHashMap. ### How to reproduce 1. in krb5.conf file, change config renew life to short time, e.g 1h, then restart KDC 2. restart api server 3. check hive connection, now it's a success 4. after renew life expired, check hive connection, now it's a failed ### Anything else _No response_ ### Version 2.0.5 ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9352
https://github.com/apache/dolphinscheduler/pull/9353
70dae6945f126414e36ffc28c99e1bf6e2ac7428
206b7c1c51e84f2e937748bc94191b23f95298e9
2022-04-05T09:23:28Z
java
2022-04-27T08:56:24Z
dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java
String dataxCommand = ParameterUtils.convertParameterPlaceholders(sbr.toString(), ParamUtils.convert(paramsMap)); logger.debug("raw script : {}", dataxCommand); Set<PosixFilePermission> perms = PosixFilePermissions.fromString(RWXR_XR_X); FileAttribute<Set<PosixFilePermission>> attr = PosixFilePermissions.asFileAttribute(perms); if (OSUtils.isWindows()) { Files.createFile(path); } else { Files.createFile(path, attr); } Files.write(path, dataxCommand.getBytes(), StandardOpenOption.APPEND); return fileName; } public String getPythonCommand() { String pythonHome = System.getenv("PYTHON_HOME"); return getPythonCommand(pythonHome); } public String getPythonCommand(String pythonHome) { if (StringUtils.isEmpty(pythonHome)) { return DATAX_PYTHON; } String pythonBinPath = "/bin/" + DATAX_PYTHON; Matcher matcher = PYTHON_PATH_PATTERN.matcher(pythonHome); if (matcher.find()) { return matcher.replaceAll(pythonBinPath); } return Paths.get(pythonHome, pythonBinPath).toString(); } public String loadJvmEnv(DataxParameters dataXParameters) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,352
[Bug] [datasource-api] Hive datasource connection failed when kerberos renew ticket lifetime expire
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened in krb5.conf file, >>> ticket_lifetime = 24h renew_lifetime = 7d >>> when after renew lifetime expired, connecting to the hive data source failed ,because the cached hive data source client uses the old ticket ,it cannot get the new ticket error log ``` [WARN] 2022-04-01 16:59:53.260 org.apache.hive.jdbc.HiveConnection:[237] - Failed to connect to **.**.**.**:**** [ERROR] 2022-04-01 16:59:56.127 org.apache.thrift.transport.TSaslTransport:[315] - SASL negotiation failure javax.security.sasl.SaslException: GSS initiate failed at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:211) at org.apache.thrift.transport.TSaslClientTransport.handleSaslStartMessage(TSaslClientTransport.java:94) at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:271) at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:51) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:48) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1698) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport.open(TUGIAssumingTransport.java:48) at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:343) at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:228) at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107) at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476) at com.zaxxer.hikari.pool.HikariPool.access$100(HikariPool.java:71) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:726) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:712) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.ietf.jgss.GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt) at sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:162) at sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:122) at sun.security.jgss.krb5.Krb5MechFactory.getMechanismContext(Krb5MechFactory.java:189) at sun.security.jgss.GSSManagerImpl.getMechanismContext(GSSManagerImpl.java:224) at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:212) at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:179) at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:192) ... 23 common frames omitted ``` ### What you expected to happen I think the data source client cache should have an expiration time, for example, use the Guava Cache instead of CurrentHashMap. ### How to reproduce 1. in krb5.conf file, change config renew life to short time, e.g 1h, then restart KDC 2. restart api server 3. check hive connection, now it's a success 4. after renew life expired, check hive connection, now it's a failed ### Anything else _No response_ ### Version 2.0.5 ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9352
https://github.com/apache/dolphinscheduler/pull/9353
70dae6945f126414e36ffc28c99e1bf6e2ac7428
206b7c1c51e84f2e937748bc94191b23f95298e9
2022-04-05T09:23:28Z
java
2022-04-27T08:56:24Z
dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java
int xms = Math.max(dataXParameters.getXms(), 1); int xmx = Math.max(dataXParameters.getXmx(), 1); return String.format(JVM_PARAM, xms, xmx); } /** * parsing synchronized column names in SQL statements * * @param sourceType the database type of the data source * @param targetType the database type of the data target * @param dataSourceCfg the database connection parameters of the data source * @param sql sql for data synchronization * @return Keyword converted column names */ private String[] parsingSqlColumnNames(DbType sourceType, DbType targetType, BaseConnectionParam dataSourceCfg, String sql) { String[] columnNames = tryGrammaticalAnalysisSqlColumnNames(sourceType, sql); if (columnNames == null || columnNames.length == 0) { logger.info("try to execute sql analysis query column name"); columnNames = tryExecuteSqlResolveColumnNames(sourceType, dataSourceCfg, sql); } notNull(columnNames, String.format("parsing sql columns failed : %s", sql)); return DataxUtils.convertKeywordsColumns(targetType, columnNames); } /** * try grammatical parsing column * * @param dbType database type * @param sql sql for data synchronization * @return column name array * @throws RuntimeException if error throws RuntimeException */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,352
[Bug] [datasource-api] Hive datasource connection failed when kerberos renew ticket lifetime expire
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened in krb5.conf file, >>> ticket_lifetime = 24h renew_lifetime = 7d >>> when after renew lifetime expired, connecting to the hive data source failed ,because the cached hive data source client uses the old ticket ,it cannot get the new ticket error log ``` [WARN] 2022-04-01 16:59:53.260 org.apache.hive.jdbc.HiveConnection:[237] - Failed to connect to **.**.**.**:**** [ERROR] 2022-04-01 16:59:56.127 org.apache.thrift.transport.TSaslTransport:[315] - SASL negotiation failure javax.security.sasl.SaslException: GSS initiate failed at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:211) at org.apache.thrift.transport.TSaslClientTransport.handleSaslStartMessage(TSaslClientTransport.java:94) at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:271) at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:51) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:48) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1698) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport.open(TUGIAssumingTransport.java:48) at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:343) at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:228) at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107) at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476) at com.zaxxer.hikari.pool.HikariPool.access$100(HikariPool.java:71) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:726) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:712) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.ietf.jgss.GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt) at sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:162) at sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:122) at sun.security.jgss.krb5.Krb5MechFactory.getMechanismContext(Krb5MechFactory.java:189) at sun.security.jgss.GSSManagerImpl.getMechanismContext(GSSManagerImpl.java:224) at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:212) at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:179) at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:192) ... 23 common frames omitted ``` ### What you expected to happen I think the data source client cache should have an expiration time, for example, use the Guava Cache instead of CurrentHashMap. ### How to reproduce 1. in krb5.conf file, change config renew life to short time, e.g 1h, then restart KDC 2. restart api server 3. check hive connection, now it's a success 4. after renew life expired, check hive connection, now it's a failed ### Anything else _No response_ ### Version 2.0.5 ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9352
https://github.com/apache/dolphinscheduler/pull/9353
70dae6945f126414e36ffc28c99e1bf6e2ac7428
206b7c1c51e84f2e937748bc94191b23f95298e9
2022-04-05T09:23:28Z
java
2022-04-27T08:56:24Z
dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java
private String[] tryGrammaticalAnalysisSqlColumnNames(DbType dbType, String sql) { String[] columnNames; try { SQLStatementParser parser = DataxUtils.getSqlStatementParser(dbType, sql); if (parser == null) { logger.warn("database driver [{}] is not support grammatical analysis sql", dbType); return new String[0]; } SQLStatement sqlStatement = parser.parseStatement(); SQLSelectStatement sqlSelectStatement = (SQLSelectStatement) sqlStatement; SQLSelect sqlSelect = sqlSelectStatement.getSelect(); List<SQLSelectItem> selectItemList = null; if (sqlSelect.getQuery() instanceof SQLSelectQueryBlock) { SQLSelectQueryBlock block = (SQLSelectQueryBlock) sqlSelect.getQuery(); selectItemList = block.getSelectList(); } else if (sqlSelect.getQuery() instanceof SQLUnionQuery) { SQLUnionQuery unionQuery = (SQLUnionQuery) sqlSelect.getQuery(); SQLSelectQueryBlock block = (SQLSelectQueryBlock) unionQuery.getRight(); selectItemList = block.getSelectList(); } notNull(selectItemList, String.format("select query type [%s] is not support", sqlSelect.getQuery().toString())); columnNames = new String[selectItemList.size()]; for (int i = 0; i < selectItemList.size(); i++) { SQLSelectItem item = selectItemList.get(i); String columnName = null; if (item.getAlias() != null) { columnName = item.getAlias(); } else if (item.getExpr() != null) { if (item.getExpr() instanceof SQLPropertyExpr) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,352
[Bug] [datasource-api] Hive datasource connection failed when kerberos renew ticket lifetime expire
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened in krb5.conf file, >>> ticket_lifetime = 24h renew_lifetime = 7d >>> when after renew lifetime expired, connecting to the hive data source failed ,because the cached hive data source client uses the old ticket ,it cannot get the new ticket error log ``` [WARN] 2022-04-01 16:59:53.260 org.apache.hive.jdbc.HiveConnection:[237] - Failed to connect to **.**.**.**:**** [ERROR] 2022-04-01 16:59:56.127 org.apache.thrift.transport.TSaslTransport:[315] - SASL negotiation failure javax.security.sasl.SaslException: GSS initiate failed at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:211) at org.apache.thrift.transport.TSaslClientTransport.handleSaslStartMessage(TSaslClientTransport.java:94) at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:271) at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:51) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:48) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1698) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport.open(TUGIAssumingTransport.java:48) at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:343) at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:228) at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107) at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476) at com.zaxxer.hikari.pool.HikariPool.access$100(HikariPool.java:71) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:726) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:712) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.ietf.jgss.GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt) at sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:162) at sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:122) at sun.security.jgss.krb5.Krb5MechFactory.getMechanismContext(Krb5MechFactory.java:189) at sun.security.jgss.GSSManagerImpl.getMechanismContext(GSSManagerImpl.java:224) at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:212) at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:179) at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:192) ... 23 common frames omitted ``` ### What you expected to happen I think the data source client cache should have an expiration time, for example, use the Guava Cache instead of CurrentHashMap. ### How to reproduce 1. in krb5.conf file, change config renew life to short time, e.g 1h, then restart KDC 2. restart api server 3. check hive connection, now it's a success 4. after renew life expired, check hive connection, now it's a failed ### Anything else _No response_ ### Version 2.0.5 ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9352
https://github.com/apache/dolphinscheduler/pull/9353
70dae6945f126414e36ffc28c99e1bf6e2ac7428
206b7c1c51e84f2e937748bc94191b23f95298e9
2022-04-05T09:23:28Z
java
2022-04-27T08:56:24Z
dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java
SQLPropertyExpr expr = (SQLPropertyExpr) item.getExpr(); columnName = expr.getName(); } else if (item.getExpr() instanceof SQLIdentifierExpr) { SQLIdentifierExpr expr = (SQLIdentifierExpr) item.getExpr(); columnName = expr.getName(); } } else { throw new RuntimeException( String.format("grammatical analysis sql column [ %s ] failed", item.toString())); } if (columnName == null) { throw new RuntimeException( String.format("grammatical analysis sql column [ %s ] failed", item.toString())); } columnNames[i] = columnName; } } catch (Exception e) { logger.warn(e.getMessage(), e); return new String[0]; } return columnNames; } /** * try to execute sql to resolve column names * * @param baseDataSource the database connection parameters * @param sql sql for data synchronization * @return column name array */ public String[] tryExecuteSqlResolveColumnNames(DbType sourceType, BaseConnectionParam baseDataSource, String sql) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,352
[Bug] [datasource-api] Hive datasource connection failed when kerberos renew ticket lifetime expire
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened in krb5.conf file, >>> ticket_lifetime = 24h renew_lifetime = 7d >>> when after renew lifetime expired, connecting to the hive data source failed ,because the cached hive data source client uses the old ticket ,it cannot get the new ticket error log ``` [WARN] 2022-04-01 16:59:53.260 org.apache.hive.jdbc.HiveConnection:[237] - Failed to connect to **.**.**.**:**** [ERROR] 2022-04-01 16:59:56.127 org.apache.thrift.transport.TSaslTransport:[315] - SASL negotiation failure javax.security.sasl.SaslException: GSS initiate failed at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:211) at org.apache.thrift.transport.TSaslClientTransport.handleSaslStartMessage(TSaslClientTransport.java:94) at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:271) at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:51) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:48) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1698) at org.apache.hadoop.hive.metastore.security.TUGIAssumingTransport.open(TUGIAssumingTransport.java:48) at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:343) at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:228) at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107) at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476) at com.zaxxer.hikari.pool.HikariPool.access$100(HikariPool.java:71) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:726) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:712) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.ietf.jgss.GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt) at sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:162) at sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:122) at sun.security.jgss.krb5.Krb5MechFactory.getMechanismContext(Krb5MechFactory.java:189) at sun.security.jgss.GSSManagerImpl.getMechanismContext(GSSManagerImpl.java:224) at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:212) at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:179) at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:192) ... 23 common frames omitted ``` ### What you expected to happen I think the data source client cache should have an expiration time, for example, use the Guava Cache instead of CurrentHashMap. ### How to reproduce 1. in krb5.conf file, change config renew life to short time, e.g 1h, then restart KDC 2. restart api server 3. check hive connection, now it's a success 4. after renew life expired, check hive connection, now it's a failed ### Anything else _No response_ ### Version 2.0.5 ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9352
https://github.com/apache/dolphinscheduler/pull/9353
70dae6945f126414e36ffc28c99e1bf6e2ac7428
206b7c1c51e84f2e937748bc94191b23f95298e9
2022-04-05T09:23:28Z
java
2022-04-27T08:56:24Z
dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java
String[] columnNames; sql = String.format("SELECT t.* FROM ( %s ) t WHERE 0 = 1", sql); sql = sql.replace(";", ""); try ( Connection connection = DataSourceClientProvider.getInstance().getConnection(sourceType, baseDataSource); PreparedStatement stmt = connection.prepareStatement(sql); ResultSet resultSet = stmt.executeQuery()) { ResultSetMetaData md = resultSet.getMetaData(); int num = md.getColumnCount(); columnNames = new String[num]; for (int i = 1; i <= num; i++) { columnNames[i - 1] = md.getColumnName(i); } } catch (SQLException e) { logger.warn(e.getMessage(), e); return null; } return columnNames; } @Override public AbstractParameters getParameters() { return dataXParameters; } private void notNull(Object obj, String message) { if (obj == null) { throw new RuntimeException(message); } } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at *
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.java
* http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.api.service; import org.apache.dolphinscheduler.api.enums.ExecuteType; import org.apache.dolphinscheduler.common.enums.CommandType; import org.apache.dolphinscheduler.common.enums.ComplementDependentMode; import org.apache.dolphinscheduler.common.enums.FailureStrategy; import org.apache.dolphinscheduler.common.enums.Priority; import org.apache.dolphinscheduler.common.enums.RunMode; import org.apache.dolphinscheduler.common.enums.TaskDependType; import org.apache.dolphinscheduler.common.enums.WarningType; import org.apache.dolphinscheduler.dao.entity.ProcessDefinition; import org.apache.dolphinscheduler.dao.entity.User; import java.util.Map; /** * executor service */ public interface ExecutorService { /** * execute process instance * * @param loginUser login user * @param projectCode project code * @param processDefinitionCode process definition code
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.java
* @param cronTime cron time * @param commandType command type * @param failureStrategy failuer strategy * @param startNodeList start nodelist * @param taskDependType node dependency type * @param warningType warning type * @param warningGroupId notify group id * @param processInstancePriority process instance priority * @param workerGroup worker group name * @param environmentCode environment code * @param runMode run mode * @param timeout timeout * @param startParams the global param values which pass to new process instance * @param expectedParallelismNumber the expected parallelism number when execute complement in parallel mode * @return execute process instance code */ Map<String, Object> execProcessInstance(User loginUser, long projectCode, long processDefinitionCode, String cronTime, CommandType commandType, FailureStrategy failureStrategy, String startNodeList, TaskDependType taskDependType, WarningType warningType, int warningGroupId, RunMode runMode, Priority processInstancePriority, String workerGroup, Long environmentCode, Integer timeout, Map<String, String> startParams, Integer expectedParallelismNumber, int dryRun, ComplementDependentMode complementDependentMode); /** * check whether the process definition can be executed * * @param projectCode project code * @param processDefinition process definition
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.java
* @param processDefineCode process definition code * @param verison process definition version * @return check result code */ Map<String, Object> checkProcessDefinitionValid(long projectCode, ProcessDefinition processDefinition, long processDefineCode, Integer verison); /** * do action to process instance:pause, stop, repeat, recover from pause, recover from stop * * @param loginUser login user * @param projectCode project code * @param processInstanceId process instance id * @param executeType execute type * @return execute result code */ Map<String, Object> execute(User loginUser, long projectCode, Integer processInstanceId, ExecuteType executeType); /** * check if sub processes are offline before starting process definition * * @param processDefinitionCode process definition code * @return check result code */ Map<String, Object> startCheckByProcessDefinedCode(long processDefinitionCode); /** * check if the current process has subprocesses and all subprocesses are valid * @param processDefinition * @return check result */ boolean checkSubProcessDefinitionValid(ProcessDefinition processDefinition); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at *
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
* http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.api.service.impl; import static org.apache.dolphinscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_END_DATE; import static org.apache.dolphinscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_START_DATE; import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_RECOVER_PROCESS_ID_STRING; import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_START_NODES; import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_START_PARAMS; import static org.apache.dolphinscheduler.common.Constants.MAX_TASK_TIMEOUT; import org.apache.dolphinscheduler.api.enums.ExecuteType; import org.apache.dolphinscheduler.api.enums.Status; import org.apache.dolphinscheduler.api.service.ExecutorService; import org.apache.dolphinscheduler.api.service.MonitorService; import org.apache.dolphinscheduler.api.service.ProjectService; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.CommandType; import org.apache.dolphinscheduler.common.enums.ComplementDependentMode; import org.apache.dolphinscheduler.common.enums.CycleEnum; import org.apache.dolphinscheduler.common.enums.FailureStrategy; import org.apache.dolphinscheduler.common.enums.Flag; import org.apache.dolphinscheduler.common.enums.Priority; import org.apache.dolphinscheduler.common.enums.ReleaseState; import org.apache.dolphinscheduler.common.enums.RunMode; import org.apache.dolphinscheduler.common.enums.TaskDependType;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
import org.apache.dolphinscheduler.common.enums.TaskGroupQueueStatus; import org.apache.dolphinscheduler.common.enums.WarningType; import org.apache.dolphinscheduler.common.model.Server; import org.apache.dolphinscheduler.common.utils.DateUtils; import org.apache.dolphinscheduler.common.utils.JSONUtils; import org.apache.dolphinscheduler.dao.entity.*; import org.apache.dolphinscheduler.dao.mapper.*; import org.apache.dolphinscheduler.plugin.task.api.TaskConstants; import org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus; import org.apache.dolphinscheduler.remote.command.StateEventChangeCommand; import org.apache.dolphinscheduler.remote.processor.StateEventCallbackService; import org.apache.dolphinscheduler.service.process.ProcessService; import org.apache.dolphinscheduler.service.quartz.cron.CronUtils; import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.MapUtils; import org.apache.commons.lang.StringUtils; import java.util.*; import java.util.stream.Collectors; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.fasterxml.jackson.core.type.TypeReference; /** * executor service impl */ @Service public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorService { private static final Logger logger = LoggerFactory.getLogger(ExecutorServiceImpl.class);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
@Autowired private ProjectMapper projectMapper; @Autowired private ProjectService projectService; @Autowired private ProcessDefinitionMapper processDefinitionMapper; @Autowired private MonitorService monitorService; @Autowired private ProcessInstanceMapper processInstanceMapper; @Autowired private ProcessService processService; @Autowired StateEventCallbackService stateEventCallbackService; @Autowired private TaskDefinitionMapper taskDefinitionMapper; @Autowired private ProcessTaskRelationMapper processTaskRelationMapper; /** * execute process instance * * @param loginUser login user * @param projectCode project code * @param processDefinitionCode process definition code * @param cronTime cron time * @param commandType command type * @param failureStrategy failure strategy * @param startNodeList start nodelist * @param taskDependType node dependency type * @param warningType warning type
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
* @param warningGroupId notify group id * @param processInstancePriority process instance priority * @param workerGroup worker group name * @param environmentCode environment code * @param runMode run mode * @param timeout timeout * @param startParams the global param values which pass to new process instance * @param expectedParallelismNumber the expected parallelism number when execute complement in parallel mode * @return execute process instance code */ @Override public Map<String, Object> execProcessInstance(User loginUser, long projectCode, long processDefinitionCode, String cronTime, CommandType commandType, FailureStrategy failureStrategy, String startNodeList, TaskDependType taskDependType, WarningType warningType, int warningGroupId, RunMode runMode, Priority processInstancePriority, String workerGroup, Long environmentCode,Integer timeout, Map<String, String> startParams, Integer expectedParallelismNumber, int dryRun, ComplementDependentMode complementDependentMode) { Project project = projectMapper.queryByCode(projectCode); Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode); if (result.get(Constants.STATUS) != Status.SUCCESS) { return result; } if (timeout <= 0 || timeout > MAX_TASK_TIMEOUT) { putMsg(result, Status.TASK_TIMEOUT_PARAMS_ERROR); return result;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
} ProcessDefinition processDefinition = processDefinitionMapper.queryByCode(processDefinitionCode); result = checkProcessDefinitionValid(projectCode, processDefinition, processDefinitionCode, processDefinition.getVersion()); if (result.get(Constants.STATUS) != Status.SUCCESS) { return result; } if (!checkTenantSuitable(processDefinition)) { logger.error("there is not any valid tenant for the process definition: id:{},name:{}, ", processDefinition.getId(), processDefinition.getName()); putMsg(result, Status.TENANT_NOT_SUITABLE); return result; } if (!checkMasterExists(result)) { return result; } /** * create command */ int create = this.createCommand(commandType, processDefinition.getCode(), taskDependType, failureStrategy, startNodeList, cronTime, warningType, loginUser.getId(), warningGroupId, runMode, processInstancePriority, workerGroup, environmentCode, startParams, expectedParallelismNumber, dryRun, complementDependentMode); if (create > 0) { processDefinition.setWarningGroupId(warningGroupId); processDefinitionMapper.updateById(processDefinition); putMsg(result, Status.SUCCESS); } else { putMsg(result, Status.START_PROCESS_INSTANCE_ERROR);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
} return result; } /** * check whether master exists * * @param result result * @return master exists return true , otherwise return false */ private boolean checkMasterExists(Map<String, Object> result) { List<Server> masterServers = monitorService.getServerListFromRegistry(true); if (masterServers.isEmpty()) { putMsg(result, Status.MASTER_NOT_EXISTS); return false; } return true; } /** * check whether the process definition can be executed * * @param projectCode project code * @param processDefinition process definition * @param processDefineCode process definition code * @param version process instance verison * @return check result code */ @Override public Map<String, Object> checkProcessDefinitionValid(long projectCode, ProcessDefinition processDefinition, long processDefineCode, Integer version) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
Map<String, Object> result = new HashMap<>(); if (processDefinition == null || projectCode != processDefinition.getProjectCode()) { putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, String.valueOf(processDefineCode)); } else if (processDefinition.getReleaseState() != ReleaseState.ONLINE) { putMsg(result, Status.PROCESS_DEFINE_NOT_RELEASE, String.valueOf(processDefineCode), version); } else if (!checkSubProcessDefinitionValid(processDefinition)){ putMsg(result, Status.SUB_PROCESS_DEFINE_NOT_RELEASE); } else { result.put(Constants.STATUS, Status.SUCCESS); } return result; } /** * check if the current process has subprocesses and all subprocesses are valid * @param processDefinition * @return check result */ @Override public boolean checkSubProcessDefinitionValid(ProcessDefinition processDefinition) { List<ProcessTaskRelation> processTaskRelations = processTaskRelationMapper.queryDownstreamByProcessDefinitionCode(processDefinition.getCode()); if (processTaskRelations.isEmpty()){ return true; } Set<Long> relationCodes = processTaskRelations.stream().map(ProcessTaskRelation::getPostTaskCode).collect(Collectors.toSet()); List<TaskDefinition> taskDefinitions = taskDefinitionMapper.queryByCodeList(relationCodes);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
Set<Long> processDefinitionCodeSet = new HashSet<>(); taskDefinitions.stream() .filter(task -> TaskConstants.TASK_TYPE_SUB_PROCESS.equalsIgnoreCase(task.getTaskType())) .forEach(taskDefinition -> processDefinitionCodeSet.add(Long.valueOf(JSONUtils.getNodeString(taskDefinition.getTaskParams(), Constants.CMD_PARAM_SUB_PROCESS_DEFINE_CODE)))); if (processDefinitionCodeSet.isEmpty()){ return true; } List<ProcessDefinition> processDefinitions = processDefinitionMapper.queryByCodes(processDefinitionCodeSet); return processDefinitions.stream().filter(definition -> definition.getReleaseState().equals(ReleaseState.OFFLINE)).collect(Collectors.toSet()).isEmpty(); } /** * do action to process instance:pause, stop, repeat, recover from pause, recover from stop * * @param loginUser login user * @param projectCode project code * @param processInstanceId process instance id * @param executeType execute type * @return execute result code */ @Override public Map<String, Object> execute(User loginUser, long projectCode, Integer processInstanceId, ExecuteType executeType) { Project project = projectMapper.queryByCode(projectCode); Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode); if (result.get(Constants.STATUS) != Status.SUCCESS) { return result; } if (!checkMasterExists(result)) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
return result; } ProcessInstance processInstance = processService.findProcessInstanceDetailById(processInstanceId); if (processInstance == null) { putMsg(result, Status.PROCESS_INSTANCE_NOT_EXIST, processInstanceId); return result; } ProcessDefinition processDefinition = processService.findProcessDefinition(processInstance.getProcessDefinitionCode(), processInstance.getProcessDefinitionVersion()); if (executeType != ExecuteType.STOP && executeType != ExecuteType.PAUSE) { result = checkProcessDefinitionValid(projectCode, processDefinition, processInstance.getProcessDefinitionCode(), processInstance.getProcessDefinitionVersion()); if (result.get(Constants.STATUS) != Status.SUCCESS) { return result; } } result = checkExecuteType(processInstance, executeType); if (result.get(Constants.STATUS) != Status.SUCCESS) { return result; } if (!checkTenantSuitable(processDefinition)) { logger.error("there is not any valid tenant for the process definition: id:{},name:{}, ", processDefinition.getId(), processDefinition.getName()); putMsg(result, Status.TENANT_NOT_SUITABLE); } // Map<String, Object> commandMap = JSONUtils.parseObject(processInstance.getCommandParam(), new TypeReference<Map<String, Object>>() {}); String startParams = null; if (MapUtils.isNotEmpty(commandMap) && executeType == ExecuteType.REPEAT_RUNNING) { Object startParamsJson = commandMap.get(Constants.CMD_PARAM_START_PARAMS); if (startParamsJson != null) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
startParams = startParamsJson.toString(); } } switch (executeType) { case REPEAT_RUNNING: result = insertCommand(loginUser, processInstanceId, processDefinition.getCode(), processDefinition.getVersion(), CommandType.REPEAT_RUNNING, startParams); break; case RECOVER_SUSPENDED_PROCESS: result = insertCommand(loginUser, processInstanceId, processDefinition.getCode(), processDefinition.getVersion(), CommandType.RECOVER_SUSPENDED_PROCESS, startParams); break; case START_FAILURE_TASK_PROCESS: result = insertCommand(loginUser, processInstanceId, processDefinition.getCode(), processDefinition.getVersion(), CommandType.START_FAILURE_TASK_PROCESS, startParams); break; case STOP: if (processInstance.getState() == ExecutionStatus.READY_STOP) { putMsg(result, Status.PROCESS_INSTANCE_ALREADY_CHANGED, processInstance.getName(), processInstance.getState()); } else { result = updateProcessInstancePrepare(processInstance, CommandType.STOP, ExecutionStatus.READY_STOP); } break; case PAUSE: if (processInstance.getState() == ExecutionStatus.READY_PAUSE) { putMsg(result, Status.PROCESS_INSTANCE_ALREADY_CHANGED, processInstance.getName(), processInstance.getState()); } else { result = updateProcessInstancePrepare(processInstance, CommandType.PAUSE, ExecutionStatus.READY_PAUSE); } break; default: logger.error("unknown execute type : {}", executeType); putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "unknown execute type");
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
break; } return result; } /** * check tenant suitable * * @param processDefinition process definition * @return true if tenant suitable, otherwise return false */ private boolean checkTenantSuitable(ProcessDefinition processDefinition) { Tenant tenant = processService.getTenantForProcess(processDefinition.getTenantId(), processDefinition.getUserId()); return tenant != null; } /** * Check the state of process instance and the type of operation match * * @param processInstance process instance * @param executeType execute type * @return check result code */ private Map<String, Object> checkExecuteType(ProcessInstance processInstance, ExecuteType executeType) { Map<String, Object> result = new HashMap<>(); ExecutionStatus executionStatus = processInstance.getState(); boolean checkResult = false; switch (executeType) { case PAUSE: case STOP: if (executionStatus.typeIsRunning()) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
checkResult = true; } break; case REPEAT_RUNNING: if (executionStatus.typeIsFinished()) { checkResult = true; } break; case START_FAILURE_TASK_PROCESS: if (executionStatus.typeIsFailure()) { checkResult = true; } break; case RECOVER_SUSPENDED_PROCESS: if (executionStatus.typeIsPause() || executionStatus.typeIsCancel()) { checkResult = true; } break; default: break; } if (!checkResult) { putMsg(result, Status.PROCESS_INSTANCE_STATE_OPERATION_ERROR, processInstance.getName(), executionStatus.toString(), executeType.toString()); } else { putMsg(result, Status.SUCCESS); } return result; } /** * prepare to update process instance command type and status
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
* * @param processInstance process instance * @param commandType command type * @param executionStatus execute status * @return update result */ private Map<String, Object> updateProcessInstancePrepare(ProcessInstance processInstance, CommandType commandType, ExecutionStatus executionStatus) { Map<String, Object> result = new HashMap<>(); processInstance.setCommandType(commandType); processInstance.addHistoryCmd(commandType); processInstance.setState(executionStatus); int update = processService.updateProcessInstance(processInstance); // if (update > 0) { String host = processInstance.getHost(); String address = host.split(":")[0]; int port = Integer.parseInt(host.split(":")[1]); StateEventChangeCommand stateEventChangeCommand = new StateEventChangeCommand( processInstance.getId(), 0, processInstance.getState(), processInstance.getId(), 0 ); stateEventCallbackService.sendResult(address, port, stateEventChangeCommand.convert2Command()); putMsg(result, Status.SUCCESS); } else { putMsg(result, Status.EXECUTE_PROCESS_INSTANCE_ERROR); } return result; } /** * prepare to update process instance command type and status *
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
* @param processInstance process instance * @return update result */ private Map<String, Object> forceStartTaskInstance(ProcessInstance processInstance, int taskId) { Map<String, Object> result = new HashMap<>(); TaskGroupQueue taskGroupQueue = processService.loadTaskGroupQueue(taskId); if (taskGroupQueue.getStatus() != TaskGroupQueueStatus.WAIT_QUEUE) { putMsg(result, Status.TASK_GROUP_QUEUE_ALREADY_START); return result; } taskGroupQueue.setForceStart(Flag.YES.getCode()); processService.updateTaskGroupQueue(taskGroupQueue); processService.sendStartTask2Master(processInstance,taskId ,org.apache.dolphinscheduler.remote.command.CommandType.TASK_FORCE_STATE_EVENT_REQUEST); putMsg(result, Status.SUCCESS); return result; } /** * insert command, used in the implementation of the page, re run, recovery (pause / failure) execution * * @param loginUser login user * @param instanceId instance id * @param processDefinitionCode process definition code * @param processVersion * @param commandType command type * @return insert result code */ private Map<String, Object> insertCommand(User loginUser, Integer instanceId, long processDefinitionCode, int processVersion, CommandType commandType, String startParams) { Map<String, Object> result = new HashMap<>(); //
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
Map<String, Object> cmdParam = new HashMap<>(); cmdParam.put(CMD_PARAM_RECOVER_PROCESS_ID_STRING, instanceId); if (!StringUtils.isEmpty(startParams)) { cmdParam.put(CMD_PARAM_START_PARAMS, startParams); } Command command = new Command(); command.setCommandType(commandType); command.setProcessDefinitionCode(processDefinitionCode); command.setCommandParam(JSONUtils.toJsonString(cmdParam)); command.setExecutorId(loginUser.getId()); command.setProcessDefinitionVersion(processVersion); command.setProcessInstanceId(instanceId); if (!processService.verifyIsNeedCreateCommand(command)) { putMsg(result, Status.PROCESS_INSTANCE_EXECUTING_COMMAND, String.valueOf(processDefinitionCode)); return result; } int create = processService.createCommand(command); if (create > 0) { putMsg(result, Status.SUCCESS); } else { putMsg(result, Status.EXECUTE_PROCESS_INSTANCE_ERROR); } return result; } /** * check if sub processes are offline before starting process definition * * @param processDefinitionCode process definition code * @return check result code */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
@Override public Map<String, Object> startCheckByProcessDefinedCode(long processDefinitionCode) { Map<String, Object> result = new HashMap<>(); ProcessDefinition processDefinition = processDefinitionMapper.queryByCode(processDefinitionCode); if (processDefinition == null) { logger.error("process definition is not found"); putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "processDefinitionCode"); return result; } List<Long> codes = new ArrayList<>(); processService.recurseFindSubProcess(processDefinition.getCode(), codes); if (!codes.isEmpty()) { List<ProcessDefinition> processDefinitionList = processDefinitionMapper.queryByCodes(codes); if (processDefinitionList != null) { for (ProcessDefinition processDefinitionTmp : processDefinitionList) { /** * if there is no online process, exit directly */ if (processDefinitionTmp.getReleaseState() != ReleaseState.ONLINE) { putMsg(result, Status.PROCESS_DEFINE_NOT_RELEASE, processDefinitionTmp.getName()); logger.info("not release process definition id: {} , name : {}", processDefinitionTmp.getId(), processDefinitionTmp.getName()); return result; } } } } putMsg(result, Status.SUCCESS); return result; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
/** * create command * * @param commandType commandType * @param processDefineCode processDefineCode * @param nodeDep nodeDep * @param failureStrategy failureStrategy * @param startNodeList startNodeList * @param schedule schedule * @param warningType warningType * @param executorId executorId * @param warningGroupId warningGroupId * @param runMode runMode * @param processInstancePriority processInstancePriority * @param workerGroup workerGroup * @param environmentCode environmentCode * @return command id */ private int createCommand(CommandType commandType, long processDefineCode, TaskDependType nodeDep, FailureStrategy failureStrategy, String startNodeList, String schedule, WarningType warningType, int executorId, int warningGroupId, RunMode runMode, Priority processInstancePriority, String workerGroup, Long environmentCode, Map<String, String> startParams, Integer expectedParallelismNumber, int dryRun, ComplementDependentMode complementDependentMode) { /** * instantiate command schedule instance */ Command command = new Command(); Map<String, String> cmdParam = new HashMap<>(); if (commandType == null) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
command.setCommandType(CommandType.START_PROCESS); } else { command.setCommandType(commandType); } command.setProcessDefinitionCode(processDefineCode); if (nodeDep != null) { command.setTaskDependType(nodeDep); } if (failureStrategy != null) { command.setFailureStrategy(failureStrategy); } if (!StringUtils.isEmpty(startNodeList)) { cmdParam.put(CMD_PARAM_START_NODES, startNodeList); } if (warningType != null) { command.setWarningType(warningType); } if (startParams != null && startParams.size() > 0) { cmdParam.put(CMD_PARAM_START_PARAMS, JSONUtils.toJsonString(startParams)); } command.setCommandParam(JSONUtils.toJsonString(cmdParam)); command.setExecutorId(executorId); command.setWarningGroupId(warningGroupId); command.setProcessInstancePriority(processInstancePriority); command.setWorkerGroup(workerGroup); command.setEnvironmentCode(environmentCode); command.setDryRun(dryRun); ProcessDefinition processDefinition = processService.findProcessDefinitionByCode(processDefineCode); if (processDefinition != null) { command.setProcessDefinitionVersion(processDefinition.getVersion());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
} command.setProcessInstanceId(0); Date start = null; Date end = null; if (!StringUtils.isEmpty(schedule)) { String[] interval = schedule.split(","); if (interval.length == 2) { start = DateUtils.getScheduleDate(interval[0]); end = DateUtils.getScheduleDate(interval[1]); if (start.after(end)) { logger.info("complement data error, wrong date start:{} and end date:{} ", start, end ); return 0; } } } // if (commandType == CommandType.COMPLEMENT_DATA) { if (start == null || end == null) { return 0; } return createComplementCommandList(start, end, runMode, command, expectedParallelismNumber, complementDependentMode); } else { command.setCommandParam(JSONUtils.toJsonString(cmdParam)); return processService.createCommand(command); } } /** * create complement command
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
* close left and close right * * @param start * @param end * @param runMode * @return */ protected int createComplementCommandList(Date start, Date end, RunMode runMode, Command command, Integer expectedParallelismNumber, ComplementDependentMode complementDependentMode) { int createCount = 0; int dependentProcessDefinitionCreateCount = 0; runMode = (runMode == null) ? RunMode.RUN_MODE_SERIAL : runMode; Map<String, String> cmdParam = JSONUtils.toMap(command.getCommandParam()); switch (runMode) { case RUN_MODE_SERIAL: { if (start.after(end)) { logger.warn("The startDate {} is later than the endDate {}", start, end); break; } cmdParam.put(CMDPARAM_COMPLEMENT_DATA_START_DATE, DateUtils.dateToString(start)); cmdParam.put(CMDPARAM_COMPLEMENT_DATA_END_DATE, DateUtils.dateToString(end)); command.setCommandParam(JSONUtils.toJsonString(cmdParam)); createCount = processService.createCommand(command); // List<Schedule> schedules = processService.queryReleaseSchedulerListByProcessDefinitionCode(command.getProcessDefinitionCode()); if (schedules.isEmpty() || complementDependentMode == ComplementDependentMode.OFF_MODE) { logger.info("process code: {} complement dependent in off mode or schedule's size is 0, skip " + "dependent complement data", command.getProcessDefinitionCode()); } else { dependentProcessDefinitionCreateCount += createComplementDependentCommand(schedules, command);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
} break; } case RUN_MODE_PARALLEL: { if (start.after(end)) { logger.warn("The startDate {} is later than the endDate {}", start, end); break; } List<Date> listDate = new ArrayList<>(); List<Schedule> schedules = processService.queryReleaseSchedulerListByProcessDefinitionCode(command.getProcessDefinitionCode()); listDate.addAll(CronUtils.getSelfFireDateList(start, end, schedules)); int listDateSize = listDate.size(); createCount = listDate.size(); if (!CollectionUtils.isEmpty(listDate)) { if (expectedParallelismNumber != null && expectedParallelismNumber != 0) { createCount = Math.min(listDate.size(), expectedParallelismNumber); if (listDateSize < createCount) { createCount = listDateSize; } } logger.info("In parallel mode, current expectedParallelismNumber:{}", createCount); // // int itemsPerCommand = (listDateSize / createCount); int remainingItems = (listDateSize % createCount); int startDateIndex = 0; int endDateIndex = 0; for (int i = 1; i <= createCount; i++) { int extra = (i <= remainingItems) ? 1 : 0;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
int singleCommandItems = (itemsPerCommand + extra); if (i == 1) { endDateIndex += singleCommandItems - 1; } else { startDateIndex = endDateIndex + 1; endDateIndex += singleCommandItems; } cmdParam.put(CMDPARAM_COMPLEMENT_DATA_START_DATE, DateUtils.dateToString(listDate.get(startDateIndex))); cmdParam.put(CMDPARAM_COMPLEMENT_DATA_END_DATE, DateUtils.dateToString(listDate.get(endDateIndex))); command.setCommandParam(JSONUtils.toJsonString(cmdParam)); processService.createCommand(command); if (schedules.isEmpty() || complementDependentMode == ComplementDependentMode.OFF_MODE) { logger.info("process code: {} complement dependent in off mode or schedule's size is 0, skip " + "dependent complement data", command.getProcessDefinitionCode()); } else { dependentProcessDefinitionCreateCount += createComplementDependentCommand(schedules, command); } } } break; } default: break; } logger.info("create complement command count: {}, create dependent complement command count: {}", createCount , dependentProcessDefinitionCreateCount); return createCount; } /** * create complement dependent command
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
*/ protected int createComplementDependentCommand(List<Schedule> schedules, Command command) { int dependentProcessDefinitionCreateCount = 0; Command dependentCommand; try { dependentCommand = (Command) BeanUtils.cloneBean(command); } catch (Exception e) { logger.error("copy dependent command error: ", e); return dependentProcessDefinitionCreateCount; } List<DependentProcessDefinition> dependentProcessDefinitionList = getComplementDependentDefinitionList(dependentCommand.getProcessDefinitionCode(), CronUtils.getMaxCycle(schedules.get(0).getCrontab()), dependentCommand.getWorkerGroup()); dependentCommand.setTaskDependType(TaskDependType.TASK_POST); for (DependentProcessDefinition dependentProcessDefinition : dependentProcessDefinitionList) { dependentCommand.setProcessDefinitionCode(dependentProcessDefinition.getProcessDefinitionCode()); dependentCommand.setWorkerGroup(dependentProcessDefinition.getWorkerGroup()); Map<String, String> cmdParam = JSONUtils.toMap(dependentCommand.getCommandParam()); cmdParam.put(CMD_PARAM_START_NODES, String.valueOf(dependentProcessDefinition.getTaskDefinitionCode())); dependentCommand.setCommandParam(JSONUtils.toJsonString(cmdParam)); dependentProcessDefinitionCreateCount += processService.createCommand(dependentCommand); } return dependentProcessDefinitionCreateCount; } /** * get complement list */ private List<DependentProcessDefinition> getComplementDependentDefinitionList(long processDefinitionCode, CycleEnum processDefinitionCycle,
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
String workerGroup) { List<DependentProcessDefinition> dependentProcessDefinitionList = processService.queryDependentProcessDefinitionByProcessDefinitionCode(processDefinitionCode); return checkDependentProcessDefinitionValid(dependentProcessDefinitionList,processDefinitionCycle,workerGroup); } /** * Check whether the dependency cycle of the dependent node is consistent with the schedule cycle of * the and if there is no worker group in the schedule, use the complement selection's * worker group */ private List<DependentProcessDefinition> checkDependentProcessDefinitionValid(List<DependentProcessDefinition> dependentProcessDefinitionList, CycleEnum processDefinitionCycle, String workerGroup) { List<DependentProcessDefinition> validDependentProcessDefinitionList = new ArrayList<>(); List<Long> processDefinitionCodeList = dependentProcessDefinitionList.stream() .map(DependentProcessDefinition::getProcessDefinitionCode) .collect(Collectors.toList()); Map<Long, String> processDefinitionWorkerGroupMap = processService.queryWorkerGroupByProcessDefinitionCodes(processDefinitionCodeList); for (DependentProcessDefinition dependentProcessDefinition : dependentProcessDefinitionList) { if (dependentProcessDefinition.getDependentCycle() == processDefinitionCycle) { if (processDefinitionWorkerGroupMap.get(dependentProcessDefinition.getProcessDefinitionCode()) == null) { dependentProcessDefinition.setWorkerGroup(workerGroup); } validDependentProcessDefinitionList.add(dependentProcessDefinition); } } return validDependentProcessDefinitionList; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.api.service.impl; import org.apache.dolphinscheduler.api.enums.Status; import org.apache.dolphinscheduler.api.service.TaskGroupQueueService; import org.apache.dolphinscheduler.api.service.TaskGroupService;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java
import org.apache.dolphinscheduler.api.utils.PageInfo; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.Flag; import org.apache.dolphinscheduler.dao.entity.TaskGroup; import org.apache.dolphinscheduler.dao.entity.User; import org.apache.dolphinscheduler.dao.mapper.TaskGroupMapper; import org.apache.dolphinscheduler.service.process.ProcessService; import org.apache.dolphinscheduler.spi.utils.StringUtils; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; /** * task Group Service */ @Service public class TaskGroupServiceImpl extends BaseServiceImpl implements TaskGroupService { @Autowired private TaskGroupMapper taskGroupMapper; @Autowired private TaskGroupQueueService taskGroupQueueService; @Autowired
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java
private ProcessService processService; private static final Logger logger = LoggerFactory.getLogger(TaskGroupServiceImpl.class); /** * create a Task group * * @param loginUser login user * @param name task group name * @param description task group description * @param groupSize task group total size * @return the result code and msg */ @Override public Map<String, Object> createTaskGroup(User loginUser, Long projectCode, String name, String description, int groupSize) { Map<String, Object> result = new HashMap<>(); if (name == null) { putMsg(result, Status.NAME_NULL); return result; } if (groupSize <= 0) { putMsg(result, Status.TASK_GROUP_SIZE_ERROR); return result; } TaskGroup taskGroup1 = taskGroupMapper.queryByName(loginUser.getId(), name); if (taskGroup1 != null) { putMsg(result, Status.TASK_GROUP_NAME_EXSIT); return result; } TaskGroup taskGroup = new TaskGroup(name, projectCode, description, groupSize, loginUser.getId(), Flag.YES.getCode()); taskGroup.setCreateTime(new Date());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java
taskGroup.setUpdateTime(new Date()); if (taskGroupMapper.insert(taskGroup) > 0) { putMsg(result, Status.SUCCESS); } else { putMsg(result, Status.CREATE_TASK_GROUP_ERROR); return result; } return result; } /** * update the task group * * @param loginUser login user * @param name task group name * @param description task group description * @param groupSize task group total size * @return the result code and msg */ @Override public Map<String, Object> updateTaskGroup(User loginUser, int id, String name, String description, int groupSize) { Map<String, Object> result = new HashMap<>(); if (name == null) { putMsg(result, Status.NAME_NULL); return result; } if (groupSize <= 0) { putMsg(result, Status.TASK_GROUP_SIZE_ERROR); return result; } Integer exists = taskGroupMapper.selectCount(new QueryWrapper<TaskGroup>().lambda()
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java
.eq(TaskGroup::getName, name) .eq(TaskGroup::getUserId, loginUser.getId()) .ne(TaskGroup::getId, id)); if (exists > 0) { putMsg(result, Status.TASK_GROUP_NAME_EXSIT); return result; } TaskGroup taskGroup = taskGroupMapper.selectById(id); if (taskGroup.getStatus() != Flag.YES.getCode()) { putMsg(result, Status.TASK_GROUP_STATUS_ERROR); return result; } taskGroup.setGroupSize(groupSize); taskGroup.setDescription(description); taskGroup.setUpdateTime(new Date()); if (StringUtils.isNotEmpty(name)) { taskGroup.setName(name); } int i = taskGroupMapper.updateById(taskGroup); logger.info("update result:{}", i); putMsg(result, Status.SUCCESS); return result; } /** * get task group status * * @param id task group id * @return is the task group available */ @Override
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java
public boolean isTheTaskGroupAvailable(int id) { return taskGroupMapper.selectCountByIdStatus(id, Flag.YES.getCode()) == 1; } /** * query all task group by user id * * @param loginUser login user * @param pageNo page no * @param pageSize page size * @return the result code and msg */ @Override public Map<String, Object> queryAllTaskGroup(User loginUser, String name, Integer status, int pageNo, int pageSize) { return this.doQuery(loginUser, pageNo, pageSize, loginUser.getId(), name, status); } /** * query all task group by status * * @param loginUser login user * @param pageNo page no * @param pageSize page size * @param status status * @return the result code and msg */ @Override public Map<String, Object> queryTaskGroupByStatus(User loginUser, int pageNo, int pageSize, int status) { return this.doQuery(loginUser, pageNo, pageSize, loginUser.getId(), null, status); } /** * query all task group by name
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java
* * @param loginUser login user * @param pageNo page no * @param pageSize page size * @param projectCode project code * @return the result code and msg */ @Override public Map<String, Object> queryTaskGroupByProjectCode(User loginUser, int pageNo, int pageSize, Long projectCode) { Map<String, Object> result = new HashMap<>(); Page<TaskGroup> page = new Page<>(pageNo, pageSize); IPage<TaskGroup> taskGroupPaging = taskGroupMapper.queryTaskGroupPagingByProjectCode(page, projectCode); return getStringObjectMap(pageNo, pageSize, result, taskGroupPaging); } private Map<String, Object> getStringObjectMap(int pageNo, int pageSize, Map<String, Object> result, IPage<TaskGroup> taskGroupPaging) { PageInfo<TaskGroup> pageInfo = new PageInfo<>(pageNo, pageSize); int total = taskGroupPaging == null ? 0 : (int) taskGroupPaging.getTotal(); List<TaskGroup> list = taskGroupPaging == null ? new ArrayList<TaskGroup>() : taskGroupPaging.getRecords(); pageInfo.setTotal(total); pageInfo.setTotalList(list); result.put(Constants.DATA_LIST, pageInfo); putMsg(result, Status.SUCCESS); return result; } /** * query all task group by id * * @param loginUser login user * @param id id * @return the result code and msg
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java
*/ @Override public Map<String, Object> queryTaskGroupById(User loginUser, int id) { Map<String, Object> result = new HashMap<>(); TaskGroup taskGroup = taskGroupMapper.selectById(id); result.put(Constants.DATA_LIST, taskGroup); putMsg(result, Status.SUCCESS); return result; } /** * query * * @param pageNo page no * @param pageSize page size * @param userId user id * @param name name * @param status status * @return the result code and msg */ @Override public Map<String, Object> doQuery(User loginUser, int pageNo, int pageSize, int userId, String name, Integer status) { Map<String, Object> result = new HashMap<>(); Page<TaskGroup> page = new Page<>(pageNo, pageSize); IPage<TaskGroup> taskGroupPaging = taskGroupMapper.queryTaskGroupPaging(page, userId, name, status); return getStringObjectMap(pageNo, pageSize, result, taskGroupPaging); } /** * close a task group * * @param loginUser login user
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java
* @param id task group id * @return the result code and msg */ @Override public Map<String, Object> closeTaskGroup(User loginUser, int id) { Map<String, Object> result = new HashMap<>(); TaskGroup taskGroup = taskGroupMapper.selectById(id); if (taskGroup.getStatus() == Flag.NO.getCode()) { putMsg(result, Status.TASK_GROUP_STATUS_CLOSED); return result; } taskGroup.setStatus(Flag.NO.getCode()); taskGroupMapper.updateById(taskGroup); putMsg(result, Status.SUCCESS); return result; } /** * start a task group * * @param loginUser login user * @param id task group id * @return the result code and msg */ @Override public Map<String, Object> startTaskGroup(User loginUser, int id) { Map<String, Object> result = new HashMap<>(); TaskGroup taskGroup = taskGroupMapper.selectById(id); if (taskGroup.getStatus() == Flag.YES.getCode()) { putMsg(result, Status.TASK_GROUP_STATUS_OPENED); return result;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java
} taskGroup.setStatus(Flag.YES.getCode()); taskGroup.setUpdateTime(new Date(System.currentTimeMillis())); int update = taskGroupMapper.updateById(taskGroup); putMsg(result, Status.SUCCESS); return result; } /** * wake a task manually * * @param loginUser * @param queueId task group queue id * @return result */ @Override public Map<String, Object> forceStartTask(User loginUser, int queueId) { Map<String, Object> result = new HashMap<>(); taskGroupQueueService.forceStartTask(queueId, Flag.YES.getCode()); putMsg(result, Status.SUCCESS); return result; } @Override public Map<String, Object> modifyPriority(User loginUser, Integer queueId, Integer priority) { Map<String, Object> result = new HashMap<>(); taskGroupQueueService.modifyPriority(queueId, priority); putMsg(result, Status.SUCCESS); return result; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ExecutorServiceTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.api.service; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import org.apache.dolphinscheduler.api.enums.ExecuteType; import org.apache.dolphinscheduler.api.enums.Status;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ExecutorServiceTest.java
import org.apache.dolphinscheduler.api.service.impl.ExecutorServiceImpl; import org.apache.dolphinscheduler.api.service.impl.ProjectServiceImpl; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.CommandType; import org.apache.dolphinscheduler.common.enums.ComplementDependentMode; import org.apache.dolphinscheduler.common.enums.Priority; import org.apache.dolphinscheduler.common.enums.ReleaseState; import org.apache.dolphinscheduler.common.enums.RunMode; import org.apache.dolphinscheduler.common.model.Server; import org.apache.dolphinscheduler.dao.entity.Command; import org.apache.dolphinscheduler.dao.entity.ProcessDefinition; import org.apache.dolphinscheduler.dao.entity.ProcessInstance; import org.apache.dolphinscheduler.dao.entity.Project; import org.apache.dolphinscheduler.dao.entity.Schedule; import org.apache.dolphinscheduler.dao.entity.Tenant; import org.apache.dolphinscheduler.dao.entity.User; import org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionMapper; import org.apache.dolphinscheduler.dao.mapper.ProcessTaskRelationMapper; import org.apache.dolphinscheduler.dao.mapper.ProjectMapper; import org.apache.dolphinscheduler.dao.mapper.TaskDefinitionMapper; import org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus; import org.apache.dolphinscheduler.service.process.ProcessService; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; import org.junit.Assert; import org.junit.Before;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ExecutorServiceTest.java
import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * executor service 2 test */ @RunWith(MockitoJUnitRunner.Silent.class) public class ExecutorServiceTest { private static final Logger logger = LoggerFactory.getLogger(ExecutorServiceTest.class); @InjectMocks private ExecutorServiceImpl executorService; @Mock private ProcessService processService; @Mock private ProcessDefinitionMapper processDefinitionMapper; @Mock private ProcessTaskRelationMapper processTaskRelationMapper; @Mock private TaskDefinitionMapper taskDefinitionMapper; @Mock private ProjectMapper projectMapper; @Mock private ProjectServiceImpl projectService; @Mock private MonitorService monitorService;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ExecutorServiceTest.java
private int processDefinitionId = 1; private long processDefinitionCode = 1L; private int processInstanceId = 1; private int tenantId = 1; private int userId = 1; private ProcessDefinition processDefinition = new ProcessDefinition(); private ProcessInstance processInstance = new ProcessInstance(); private User loginUser = new User(); private long projectCode = 1L; private String projectName = "projectName"; private Project project = new Project(); private String cronTime; @Before public void init() { loginUser.setId(userId); processDefinition.setId(processDefinitionId); processDefinition.setReleaseState(ReleaseState.ONLINE); processDefinition.setTenantId(tenantId); processDefinition.setUserId(userId); processDefinition.setVersion(1); processDefinition.setCode(1L); processDefinition.setProjectCode(projectCode); processInstance.setId(processInstanceId); processInstance.setState(ExecutionStatus.FAILURE); processInstance.setExecutorId(userId); processInstance.setTenantId(tenantId); processInstance.setProcessDefinitionVersion(1);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ExecutorServiceTest.java
processInstance.setProcessDefinitionCode(1L); project.setCode(projectCode); project.setName(projectName); cronTime = "2020-01-01 00:00:00,2020-01-31 23:00:00"; Mockito.when(projectMapper.queryByCode(projectCode)).thenReturn(project); Mockito.when(projectService.checkProjectAndAuth(loginUser, project, projectCode)).thenReturn(checkProjectAndAuth()); Mockito.when(processDefinitionMapper.queryByCode(processDefinitionCode)).thenReturn(processDefinition); Mockito.when(processService.getTenantForProcess(tenantId, userId)).thenReturn(new Tenant()); Mockito.when(processService.createCommand(any(Command.class))).thenReturn(1); Mockito.when(monitorService.getServerListFromRegistry(true)).thenReturn(getMasterServersList()); Mockito.when(processService.findProcessInstanceDetailById(processInstanceId)).thenReturn(processInstance); Mockito.when(processService.findProcessDefinition(1L, 1)).thenReturn(processDefinition); } /** * not complement */ @Test public void testNoComplement() { Mockito.when(processService.queryReleaseSchedulerListByProcessDefinitionCode(processDefinitionCode)).thenReturn(zeroSchedulerList()); Map<String, Object> result = executorService.execProcessInstance(loginUser, projectCode, processDefinitionCode, cronTime, CommandType.START_PROCESS, null, null, null, null, 0, RunMode.RUN_MODE_SERIAL, Priority.LOW, Constants.DEFAULT_WORKER_GROUP, 100L, 10, null, 0, Constants.DRY_RUN_FLAG_NO, ComplementDependentMode.OFF_MODE); Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS));
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ExecutorServiceTest.java
verify(processService, times(1)).createCommand(any(Command.class)); } /** * not complement */ @Test public void testComplementWithStartNodeList() { Mockito.when(processService.queryReleaseSchedulerListByProcessDefinitionCode(processDefinitionCode)).thenReturn(zeroSchedulerList()); Map<String, Object> result = executorService.execProcessInstance(loginUser, projectCode, processDefinitionCode, cronTime, CommandType.START_PROCESS, null, "n1,n2", null, null, 0, RunMode.RUN_MODE_SERIAL, Priority.LOW, Constants.DEFAULT_WORKER_GROUP, 100L,110, null, 0, Constants.DRY_RUN_FLAG_NO, ComplementDependentMode.OFF_MODE); Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS)); verify(processService, times(1)).createCommand(any(Command.class)); } /** * date error */ @Test public void testDateError() { Mockito.when(processService.queryReleaseSchedulerListByProcessDefinitionCode(processDefinitionCode)).thenReturn(zeroSchedulerList()); Map<String, Object> result = executorService.execProcessInstance(loginUser, projectCode, processDefinitionCode, "2020-01-31 23:00:00,2020-01-01 00:00:00", CommandType.COMPLEMENT_DATA, null, null, null, null, 0, RunMode.RUN_MODE_SERIAL, Priority.LOW, Constants.DEFAULT_WORKER_GROUP,100L, 110, null, 0, Constants.DRY_RUN_FLAG_NO,
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ExecutorServiceTest.java
ComplementDependentMode.OFF_MODE); Assert.assertEquals(Status.START_PROCESS_INSTANCE_ERROR, result.get(Constants.STATUS)); verify(processService, times(0)).createCommand(any(Command.class)); } /** * serial */ @Test public void testSerial() { Mockito.when(processService.queryReleaseSchedulerListByProcessDefinitionCode(processDefinitionCode)).thenReturn(zeroSchedulerList()); Map<String, Object> result = executorService.execProcessInstance(loginUser, projectCode, processDefinitionCode, cronTime, CommandType.COMPLEMENT_DATA, null, null, null, null, 0, RunMode.RUN_MODE_SERIAL, Priority.LOW, Constants.DEFAULT_WORKER_GROUP,100L, 110, null, 0, Constants.DRY_RUN_FLAG_NO, ComplementDependentMode.OFF_MODE); Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS)); verify(processService, times(1)).createCommand(any(Command.class)); } /** * without schedule */ @Test public void testParallelWithOutSchedule() { Mockito.when(processService.queryReleaseSchedulerListByProcessDefinitionCode(processDefinitionCode)).thenReturn(zeroSchedulerList()); Map<String, Object> result = executorService.execProcessInstance(loginUser, projectCode, processDefinitionCode, cronTime, CommandType.COMPLEMENT_DATA, null, null, null, null, 0,
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ExecutorServiceTest.java
RunMode.RUN_MODE_PARALLEL, Priority.LOW, Constants.DEFAULT_WORKER_GROUP,100L, 110, null, 0, Constants.DRY_RUN_FLAG_NO, ComplementDependentMode.OFF_MODE); Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS)); verify(processService, times(31)).createCommand(any(Command.class)); } /** * with schedule */ @Test public void testParallelWithSchedule() { Mockito.when(processService.queryReleaseSchedulerListByProcessDefinitionCode(processDefinitionCode)).thenReturn(oneSchedulerList()); Map<String, Object> result = executorService.execProcessInstance(loginUser, projectCode, processDefinitionCode, cronTime, CommandType.COMPLEMENT_DATA, null, null, null, null, 0, RunMode.RUN_MODE_PARALLEL, Priority.LOW, Constants.DEFAULT_WORKER_GROUP, 100L,110, null, 15, Constants.DRY_RUN_FLAG_NO, ComplementDependentMode.OFF_MODE); Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS)); verify(processService, times(15)).createCommand(any(Command.class)); } @Test public void testNoMasterServers() { Mockito.when(monitorService.getServerListFromRegistry(true)).thenReturn(new ArrayList<>()); Map<String, Object> result = executorService.execProcessInstance(loginUser, projectCode, processDefinitionCode, cronTime, CommandType.COMPLEMENT_DATA, null, null, null, null, 0, RunMode.RUN_MODE_PARALLEL,
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ExecutorServiceTest.java
Priority.LOW, Constants.DEFAULT_WORKER_GROUP, 100L,110, null, 0, Constants.DRY_RUN_FLAG_NO, ComplementDependentMode.OFF_MODE); Assert.assertEquals(result.get(Constants.STATUS), Status.MASTER_NOT_EXISTS); } @Test public void testExecuteRepeatRunning() { Mockito.when(processService.verifyIsNeedCreateCommand(any(Command.class))).thenReturn(true); Map<String, Object> result = executorService.execute(loginUser, projectCode, processInstanceId, ExecuteType.REPEAT_RUNNING); Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS)); } @Test public void testStartCheckByProcessDefinedCode() { List<Long> ids = new ArrayList<>(); ids.add(1L); Mockito.doNothing().when(processService).recurseFindSubProcess(1, ids); List<ProcessDefinition> processDefinitionList = new ArrayList<>(); ProcessDefinition processDefinition = new ProcessDefinition(); processDefinition.setId(1); processDefinition.setReleaseState(ReleaseState.ONLINE); processDefinitionList.add(processDefinition); Mockito.when(processDefinitionMapper.queryDefinitionListByIdList(new Integer[ids.size()])) .thenReturn(processDefinitionList); Map<String, Object> result = executorService.startCheckByProcessDefinedCode(1L); Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS)); } private List<Server> getMasterServersList() { List<Server> masterServerList = new ArrayList<>(); Server masterServer1 = new Server(); masterServer1.setId(1); masterServer1.setHost("192.168.220.188");
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ExecutorServiceTest.java
masterServer1.setPort(1121); masterServerList.add(masterServer1); Server masterServer2 = new Server(); masterServer2.setId(2); masterServer2.setHost("192.168.220.189"); masterServer2.setPort(1122); masterServerList.add(masterServer2); return masterServerList; } private List zeroSchedulerList() { return Collections.EMPTY_LIST; } private List<Schedule> oneSchedulerList() { List<Schedule> schedulerList = new LinkedList<>(); Schedule schedule = new Schedule(); schedule.setCrontab("0 0 0 1/2 * ?"); schedulerList.add(schedule); return schedulerList; } private Map<String, Object> checkProjectAndAuth() { Map<String, Object> result = new HashMap<>(); result.put(Constants.STATUS, Status.SUCCESS); return result; } @Test public void testCreateComplementToParallel() { List<String> result = new ArrayList<>(); int expectedParallelismNumber = 3; LinkedList<Integer> listDate = new LinkedList<>(); listDate.add(0);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ExecutorServiceTest.java
listDate.add(1); listDate.add(2); listDate.add(3); listDate.add(4); int listDateSize = listDate.size(); int createCount = Math.min(listDate.size(), expectedParallelismNumber); logger.info("In parallel mode, current expectedParallelismNumber:{}", createCount); int itemsPerCommand = (listDateSize / createCount); int remainingItems = (listDateSize % createCount); int startDateIndex = 0; int endDateIndex = 0; for (int i = 1; i <= createCount; i++) { int extra = (i <= remainingItems) ? 1 : 0; int singleCommandItems = (itemsPerCommand + extra); if (i == 1) { endDateIndex += singleCommandItems - 1; } else { startDateIndex = endDateIndex + 1; endDateIndex += singleCommandItems; } logger.info("startDate:{}, endDate:{}", listDate.get(startDateIndex), listDate.get(endDateIndex)); result.add(listDate.get(startDateIndex) + "," + listDate.get(endDateIndex)); } Assert.assertEquals("0,1", result.get(0)); Assert.assertEquals("2,3", result.get(1)); Assert.assertEquals("4,4", result.get(2)); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/TaskGroupServiceTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.api.service; import org.apache.dolphinscheduler.api.enums.Status;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/TaskGroupServiceTest.java
import org.apache.dolphinscheduler.api.service.impl.TaskGroupServiceImpl; import org.apache.dolphinscheduler.api.utils.PageInfo; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.Flag; import org.apache.dolphinscheduler.common.enums.UserType; import org.apache.dolphinscheduler.dao.entity.TaskGroup; import org.apache.dolphinscheduler.dao.entity.User; import org.apache.dolphinscheduler.dao.mapper.TaskGroupMapper; import org.apache.dolphinscheduler.dao.mapper.TaskGroupQueueMapper; import org.apache.dolphinscheduler.dao.mapper.UserMapper; import org.apache.dolphinscheduler.service.process.ProcessService; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.TreeMap; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; /** * project service test **/ @RunWith(MockitoJUnitRunner.Silent.class)
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/TaskGroupServiceTest.java
public class TaskGroupServiceTest { private static final Logger logger = LoggerFactory.getLogger(TaskGroupServiceTest.class); @InjectMocks private TaskGroupServiceImpl taskGroupService; @Mock private TaskGroupQueueService taskGroupQueueService; @Mock private ProcessService processService; @Mock private TaskGroupMapper taskGroupMapper; @Mock private TaskGroupQueueMapper taskGroupQueueMapper; @Mock private UserMapper userMapper;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/TaskGroupServiceTest.java
private String taskGroupName = "TaskGroupServiceTest"; private String taskGroupDesc = "this is a task group"; private String userName = "taskGroupServiceTest"; /** * create admin user */ private User getLoginUser() { User loginUser = new User(); loginUser.setUserType(UserType.ADMIN_USER); loginUser.setUserName(userName); loginUser.setId(1); return loginUser; } private TaskGroup getTaskGroup() { TaskGroup taskGroup = new TaskGroup(taskGroupName,0, taskGroupDesc, 100, 1,1); return taskGroup; } private List<TaskGroup> getList() { List<TaskGroup> list = new ArrayList<>(); list.add(getTaskGroup()); return list; } @Test public void testCreate() { User loginUser = getLoginUser(); TaskGroup taskGroup = getTaskGroup(); Mockito.when(taskGroupMapper.insert(taskGroup)).thenReturn(1); Mockito.when(taskGroupMapper.queryByName(loginUser.getId(), taskGroupName)).thenReturn(null); Map<String, Object> result = taskGroupService.createTaskGroup(loginUser,0L, taskGroupName, taskGroupDesc, 100);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/TaskGroupServiceTest.java
Assert.assertNotNull(result); } @Test public void testQueryById() { User loginUser = getLoginUser(); TaskGroup taskGroup = getTaskGroup(); Mockito.when(taskGroupMapper.selectById(1)).thenReturn(taskGroup); Map<String, Object> result = taskGroupService.queryTaskGroupById(loginUser, 1); Assert.assertNotNull(result.get(Constants.DATA_LIST)); } @Test public void testQueryProjectListPaging() { IPage<TaskGroup> page = new Page<>(1, 10); page.setRecords(getList()); User loginUser = getLoginUser(); Mockito.when(taskGroupMapper.queryTaskGroupPaging(Mockito.any(Page.class), Mockito.eq(10), Mockito.eq(null), Mockito.eq(0))).thenReturn(page); Map<String, Object> result = taskGroupService.queryAllTaskGroup(loginUser, null, null,1,10); PageInfo<TaskGroup> pageInfo = (PageInfo<TaskGroup>) result.get(Constants.DATA_LIST); Assert.assertNotNull(pageInfo.getTotalList()); } @Test public void testUpdate() { User loginUser = getLoginUser(); TaskGroup taskGroup = getTaskGroup(); taskGroup.setStatus(Flag.YES.getCode()); Mockito.when(taskGroupMapper.selectById(1)).thenReturn(taskGroup); Map<String, Object> result = taskGroupService.updateTaskGroup(loginUser, 1, "newName", "desc", 100);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,796
[BUG-BE][Resource/Task Group Queue] The start the task seems not working on the task group queue page.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The start the task seems not working on the task group queue page. It means that I did not get any feedback. ### What you expected to happen It should be working. ### How to reproduce https://user-images.githubusercontent.com/97265214/165246315-8992c1fd-6fcb-4b6c-9019-7e3ccd76de1c.gif ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9796
https://github.com/apache/dolphinscheduler/pull/9797
1c4b8d1811ea9ac61746371c38a88fe84383fb9e
d2fe85d7da6b78177db460b8d04c7cb32f967003
2022-04-26T15:44:57Z
java
2022-04-27T09:23:48Z
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/TaskGroupServiceTest.java
logger.info(result.toString()); Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS)); taskGroup.setStatus(0); } @Test public void testCloseAndStart() { User loginUser = getLoginUser(); TaskGroup taskGroup = getTaskGroup(); Mockito.when(taskGroupMapper.selectById(1)).thenReturn(taskGroup); Map<String, Object> result = taskGroupService.closeTaskGroup(loginUser, 1); Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS)); taskGroup.setStatus(0); Mockito.when(taskGroupMapper.selectById(1)).thenReturn(taskGroup); result = taskGroupService.closeTaskGroup(loginUser, 1); Assert.assertEquals(Status.TASK_GROUP_STATUS_CLOSED, result.get(Constants.STATUS)); taskGroup.setStatus(1); Mockito.when(taskGroupMapper.selectById(1)).thenReturn(taskGroup); result = taskGroupService.startTaskGroup(loginUser, 1); Assert.assertEquals(Status.TASK_GROUP_STATUS_OPENED, result.get(Constants.STATUS)); } @Test public void testWakeTaskFroceManually() { TreeMap<Integer, Integer> tm = new TreeMap<>(); tm.put(1, 1); Map<String, Object> map1 = taskGroupService.forceStartTask(getLoginUser(), 1); Assert.assertEquals(Status.SUCCESS, map1.get(Constants.STATUS)); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,764
[Bug] [Website] script, pagerduty, http alert plugin doc missing
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened script, pagerduty, http alert plugin doc missing ### What you expected to happen script, pagerduty, http alert plugin doc missing ### How to reproduce script, pagerduty, http alert plugin doc missing check website ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9764
https://github.com/apache/dolphinscheduler/pull/9792
d2fe85d7da6b78177db460b8d04c7cb32f967003
7b0b4c126efdb85a076a320749877b4f4ad3ecdc
2022-04-25T15:55:38Z
java
2022-04-27T09:26:58Z
dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpAlertChannelFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.plugin.alert.http; import org.apache.dolphinscheduler.alert.api.AlertChannel; import org.apache.dolphinscheduler.alert.api.AlertChannelFactory; import org.apache.dolphinscheduler.spi.params.base.PluginParams; import org.apache.dolphinscheduler.spi.params.base.Validate; import org.apache.dolphinscheduler.spi.params.input.InputParam; import java.util.Arrays; import java.util.List; import com.google.auto.service.AutoService; @AutoService(AlertChannelFactory.class)
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,764
[Bug] [Website] script, pagerduty, http alert plugin doc missing
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened script, pagerduty, http alert plugin doc missing ### What you expected to happen script, pagerduty, http alert plugin doc missing ### How to reproduce script, pagerduty, http alert plugin doc missing check website ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9764
https://github.com/apache/dolphinscheduler/pull/9792
d2fe85d7da6b78177db460b8d04c7cb32f967003
7b0b4c126efdb85a076a320749877b4f4ad3ecdc
2022-04-25T15:55:38Z
java
2022-04-27T09:26:58Z
dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpAlertChannelFactory.java
public final class HttpAlertChannelFactory implements AlertChannelFactory { @Override public String name() { return "Http"; } @Override public List<PluginParams> params() { InputParam url = InputParam.newBuilder(HttpAlertConstants.NAME_URL, HttpAlertConstants.URL) .setPlaceholder("input request URL") .addValidate(Validate.newBuilder() .setRequired(true) .build()) .build(); InputParam headerParams = InputParam.newBuilder(HttpAlertConstants.NAME_HEADER_PARAMS, HttpAlertConstants.HEADER_PARAMS) .setPlaceholder("input request headers as JSON format ")
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,764
[Bug] [Website] script, pagerduty, http alert plugin doc missing
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened script, pagerduty, http alert plugin doc missing ### What you expected to happen script, pagerduty, http alert plugin doc missing ### How to reproduce script, pagerduty, http alert plugin doc missing check website ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9764
https://github.com/apache/dolphinscheduler/pull/9792
d2fe85d7da6b78177db460b8d04c7cb32f967003
7b0b4c126efdb85a076a320749877b4f4ad3ecdc
2022-04-25T15:55:38Z
java
2022-04-27T09:26:58Z
dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpAlertChannelFactory.java
.addValidate(Validate.newBuilder() .setRequired(true) .build()) .build(); InputParam bodyParams = InputParam.newBuilder(HttpAlertConstants.NAME_BODY_PARAMS, HttpAlertConstants.BODY_PARAMS) .setPlaceholder("input request body as JSON format ") .addValidate(Validate.newBuilder() .setRequired(true) .build()) .build(); InputParam contentField = InputParam.newBuilder(HttpAlertConstants.NAME_CONTENT_FIELD, HttpAlertConstants.CONTENT_FIELD) .setPlaceholder("input alert msg field name") .addValidate(Validate.newBuilder() .setRequired(true) .build()) .build(); InputParam requestType = InputParam.newBuilder(HttpAlertConstants.NAME_REQUEST_TYPE, HttpAlertConstants.REQUEST_TYPE) .setPlaceholder("input request type POST or GET") .addValidate(Validate.newBuilder() .setRequired(true) .build()) .build(); return Arrays.asList(url, requestType, headerParams, bodyParams, contentField); } @Override public AlertChannel create() { return new HttpAlertChannel(); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,759
[Improvement][Python] WarningGroup should be specified when deploy process-definition via python-gate
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description I need to set warningGroup on the web page after I deploy process-definition via python-gate. It's very inconvenient So warningGroup should be specified when deploy process-definition via python-gate ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9759
https://github.com/apache/dolphinscheduler/pull/9773
d3c53af100389e30289d577d92d891e005646047
828034f8b9760ed51cd5657e31b4e4f462c643c0
2022-04-25T10:19:08Z
java
2022-04-27T14:02:14Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,759
[Improvement][Python] WarningGroup should be specified when deploy process-definition via python-gate
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description I need to set warningGroup on the web page after I deploy process-definition via python-gate. It's very inconvenient So warningGroup should be specified when deploy process-definition via python-gate ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9759
https://github.com/apache/dolphinscheduler/pull/9773
d3c53af100389e30289d577d92d891e005646047
828034f8b9760ed51cd5657e31b4e4f462c643c0
2022-04-25T10:19:08Z
java
2022-04-27T14:02:14Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
* limitations under the License. */ package org.apache.dolphinscheduler.api.python; import org.apache.dolphinscheduler.api.dto.resources.ResourceComponent; import org.apache.dolphinscheduler.api.enums.Status; import org.apache.dolphinscheduler.api.service.ExecutorService; import org.apache.dolphinscheduler.api.service.ProcessDefinitionService; import org.apache.dolphinscheduler.api.service.ProjectService; import org.apache.dolphinscheduler.api.service.QueueService; import org.apache.dolphinscheduler.api.service.ResourcesService; import org.apache.dolphinscheduler.api.service.SchedulerService; import org.apache.dolphinscheduler.api.service.TaskDefinitionService; import org.apache.dolphinscheduler.api.service.TenantService; import org.apache.dolphinscheduler.api.service.UsersService; import org.apache.dolphinscheduler.api.utils.Result; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.ComplementDependentMode; import org.apache.dolphinscheduler.common.enums.FailureStrategy; import org.apache.dolphinscheduler.common.enums.Priority; import org.apache.dolphinscheduler.common.enums.ProcessExecutionTypeEnum; import org.apache.dolphinscheduler.common.enums.ProgramType; import org.apache.dolphinscheduler.common.enums.ReleaseState; import org.apache.dolphinscheduler.common.enums.RunMode; import org.apache.dolphinscheduler.common.enums.TaskDependType; import org.apache.dolphinscheduler.common.enums.UserType; import org.apache.dolphinscheduler.common.enums.WarningType; import org.apache.dolphinscheduler.common.utils.CodeGenerateUtils; import org.apache.dolphinscheduler.dao.entity.DataSource; import org.apache.dolphinscheduler.dao.entity.ProcessDefinition; import org.apache.dolphinscheduler.dao.entity.Project;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,759
[Improvement][Python] WarningGroup should be specified when deploy process-definition via python-gate
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description I need to set warningGroup on the web page after I deploy process-definition via python-gate. It's very inconvenient So warningGroup should be specified when deploy process-definition via python-gate ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9759
https://github.com/apache/dolphinscheduler/pull/9773
d3c53af100389e30289d577d92d891e005646047
828034f8b9760ed51cd5657e31b4e4f462c643c0
2022-04-25T10:19:08Z
java
2022-04-27T14:02:14Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
import org.apache.dolphinscheduler.dao.entity.ProjectUser; import org.apache.dolphinscheduler.dao.entity.Queue; import org.apache.dolphinscheduler.dao.entity.Schedule; import org.apache.dolphinscheduler.dao.entity.TaskDefinition; import org.apache.dolphinscheduler.dao.entity.Tenant; import org.apache.dolphinscheduler.dao.entity.User; import org.apache.dolphinscheduler.dao.mapper.DataSourceMapper; import org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionMapper; import org.apache.dolphinscheduler.dao.mapper.ProjectMapper; import org.apache.dolphinscheduler.dao.mapper.ProjectUserMapper; import org.apache.dolphinscheduler.dao.mapper.ScheduleMapper; import org.apache.dolphinscheduler.dao.mapper.TaskDefinitionMapper; import org.apache.dolphinscheduler.api.configuration.PythonGatewayConfiguration; import org.apache.dolphinscheduler.spi.enums.ResourceType; import org.apache.commons.collections.CollectionUtils; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; import javax.annotation.PostConstruct; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import py4j.GatewayServer; @Component
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,759
[Improvement][Python] WarningGroup should be specified when deploy process-definition via python-gate
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description I need to set warningGroup on the web page after I deploy process-definition via python-gate. It's very inconvenient So warningGroup should be specified when deploy process-definition via python-gate ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9759
https://github.com/apache/dolphinscheduler/pull/9773
d3c53af100389e30289d577d92d891e005646047
828034f8b9760ed51cd5657e31b4e4f462c643c0
2022-04-25T10:19:08Z
java
2022-04-27T14:02:14Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
public class PythonGateway { private static final Logger logger = LoggerFactory.getLogger(PythonGateway.class); private static final WarningType DEFAULT_WARNING_TYPE = WarningType.NONE; private static final int DEFAULT_WARNING_GROUP_ID = 0; private static final FailureStrategy DEFAULT_FAILURE_STRATEGY = FailureStrategy.CONTINUE; private static final Priority DEFAULT_PRIORITY = Priority.MEDIUM; private static final Long DEFAULT_ENVIRONMENT_CODE = -1L; private static final TaskDependType DEFAULT_TASK_DEPEND_TYPE = TaskDependType.TASK_POST; private static final RunMode DEFAULT_RUN_MODE = RunMode.RUN_MODE_SERIAL; private static final int DEFAULT_DRY_RUN = 0; private static final ComplementDependentMode COMPLEMENT_DEPENDENT_MODE = ComplementDependentMode.OFF_MODE; @Autowired private ProcessDefinitionMapper processDefinitionMapper; @Autowired private ProjectService projectService; @Autowired private TenantService tenantService; @Autowired private ExecutorService executorService; @Autowired
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,759
[Improvement][Python] WarningGroup should be specified when deploy process-definition via python-gate
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description I need to set warningGroup on the web page after I deploy process-definition via python-gate. It's very inconvenient So warningGroup should be specified when deploy process-definition via python-gate ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9759
https://github.com/apache/dolphinscheduler/pull/9773
d3c53af100389e30289d577d92d891e005646047
828034f8b9760ed51cd5657e31b4e4f462c643c0
2022-04-25T10:19:08Z
java
2022-04-27T14:02:14Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
private ProcessDefinitionService processDefinitionService; @Autowired private TaskDefinitionService taskDefinitionService; @Autowired private UsersService usersService; @Autowired private QueueService queueService; @Autowired private ResourcesService resourceService; @Autowired private ProjectMapper projectMapper; @Autowired private TaskDefinitionMapper taskDefinitionMapper; @Autowired private SchedulerService schedulerService; @Autowired private ScheduleMapper scheduleMapper; @Autowired private DataSourceMapper dataSourceMapper; @Autowired private PythonGatewayConfiguration pythonGatewayConfiguration; @Autowired private ProjectUserMapper projectUserMapper; private final User dummyAdminUser = new User() { { setId(Integer.MAX_VALUE); setUserName("dummyUser"); setUserType(UserType.ADMIN_USER); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,759
[Improvement][Python] WarningGroup should be specified when deploy process-definition via python-gate
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description I need to set warningGroup on the web page after I deploy process-definition via python-gate. It's very inconvenient So warningGroup should be specified when deploy process-definition via python-gate ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9759
https://github.com/apache/dolphinscheduler/pull/9773
d3c53af100389e30289d577d92d891e005646047
828034f8b9760ed51cd5657e31b4e4f462c643c0
2022-04-25T10:19:08Z
java
2022-04-27T14:02:14Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
}; private final Queue queuePythonGateway = new Queue() { { setId(Integer.MAX_VALUE); setQueueName("queuePythonGateway"); } }; public String ping() { return "PONG"; } public Map<String, Object> genTaskCodeList(Integer genNum) { return taskDefinitionService.genTaskCodeList(genNum); } public Map<String, Long> getCodeAndVersion(String projectName, String taskName) throws CodeGenerateUtils.CodeGenerateException { Project project = projectMapper.queryByName(projectName); Map<String, Long> result = new HashMap<>(); if (project == null) { result.put("code", CodeGenerateUtils.getInstance().genCode()); result.put("version", 0L); return result; } TaskDefinition taskDefinition = taskDefinitionMapper.queryByName(project.getCode(), taskName); if (taskDefinition == null) { result.put("code", CodeGenerateUtils.getInstance().genCode()); result.put("version", 0L); } else { result.put("code", taskDefinition.getCode());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,759
[Improvement][Python] WarningGroup should be specified when deploy process-definition via python-gate
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description I need to set warningGroup on the web page after I deploy process-definition via python-gate. It's very inconvenient So warningGroup should be specified when deploy process-definition via python-gate ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9759
https://github.com/apache/dolphinscheduler/pull/9773
d3c53af100389e30289d577d92d891e005646047
828034f8b9760ed51cd5657e31b4e4f462c643c0
2022-04-25T10:19:08Z
java
2022-04-27T14:02:14Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
result.put("version", (long) taskDefinition.getVersion()); } return result; } /** * create or update process definition. * If process definition do not exists in Project=`projectCode` would create a new one * If process definition already exists in Project=`projectCode` would update it * * @param userName user name who create or update process definition * @param projectName project name which process definition belongs to * @param name process definition name * @param description description * @param globalParams global params * @param schedule schedule for process definition, will not set schedule if null, * and if would always fresh exists schedule if not null * @param locations locations json object about all tasks * @param timeout timeout for process definition working, if running time longer than timeout, * task will mark as fail * @param workerGroup run task in which worker group * @param tenantCode tenantCode * @param taskRelationJson relation json for nodes * @param taskDefinitionJson taskDefinitionJson * @return create result code */ public Long createOrUpdateProcessDefinition(String userName, String projectName, String name, String description, String globalParams,
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,759
[Improvement][Python] WarningGroup should be specified when deploy process-definition via python-gate
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description I need to set warningGroup on the web page after I deploy process-definition via python-gate. It's very inconvenient So warningGroup should be specified when deploy process-definition via python-gate ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9759
https://github.com/apache/dolphinscheduler/pull/9773
d3c53af100389e30289d577d92d891e005646047
828034f8b9760ed51cd5657e31b4e4f462c643c0
2022-04-25T10:19:08Z
java
2022-04-27T14:02:14Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
String schedule, String locations, int timeout, String workerGroup, String tenantCode, String taskRelationJson, String taskDefinitionJson, ProcessExecutionTypeEnum executionType) { User user = usersService.queryUser(userName); Project project = projectMapper.queryByName(projectName); long projectCode = project.getCode(); ProcessDefinition processDefinition = getProcessDefinition(user, projectCode, name); long processDefinitionCode; if (processDefinition != null) { processDefinitionCode = processDefinition.getCode(); processDefinitionService.releaseProcessDefinition(user, projectCode, processDefinitionCode, ReleaseState.OFFLINE); Map<String, Object> result = processDefinitionService.updateProcessDefinition(user, projectCode, name, processDefinitionCode, description, globalParams, locations, timeout, tenantCode, taskRelationJson, taskDefinitionJson, executionType); } else { Map<String, Object> result = processDefinitionService.createProcessDefinition(user, projectCode, name, description, globalParams, locations, timeout, tenantCode, taskRelationJson, taskDefinitionJson, executionType); processDefinition = (ProcessDefinition) result.get(Constants.DATA_LIST); processDefinitionCode = processDefinition.getCode(); } if (schedule != null) { createOrUpdateSchedule(user, projectCode, processDefinitionCode, schedule, workerGroup); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,759
[Improvement][Python] WarningGroup should be specified when deploy process-definition via python-gate
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description I need to set warningGroup on the web page after I deploy process-definition via python-gate. It's very inconvenient So warningGroup should be specified when deploy process-definition via python-gate ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9759
https://github.com/apache/dolphinscheduler/pull/9773
d3c53af100389e30289d577d92d891e005646047
828034f8b9760ed51cd5657e31b4e4f462c643c0
2022-04-25T10:19:08Z
java
2022-04-27T14:02:14Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
processDefinitionService.releaseProcessDefinition(user, projectCode, processDefinitionCode, ReleaseState.ONLINE); return processDefinitionCode; } /** * get process definition * * @param user user who create or update schedule * @param projectCode project which process definition belongs to * @param processDefinitionName process definition name */ private ProcessDefinition getProcessDefinition(User user, long projectCode, String processDefinitionName) { Map<String, Object> verifyProcessDefinitionExists = processDefinitionService.verifyProcessDefinitionName(user, projectCode, processDefinitionName); Status verifyStatus = (Status) verifyProcessDefinitionExists.get(Constants.STATUS); ProcessDefinition processDefinition = null; if (verifyStatus == Status.PROCESS_DEFINITION_NAME_EXIST) { processDefinition = processDefinitionMapper.queryByDefineName(projectCode, processDefinitionName); } else if (verifyStatus != Status.SUCCESS) { String msg = "Verify process definition exists status is invalid, neither SUCCESS or PROCESS_DEFINITION_NAME_EXIST."; logger.error(msg); throw new RuntimeException(msg); } return processDefinition; } /** * create or update process definition schedule. * It would always use latest schedule define in workflow-as-code, and set schedule online when * it's not null * * @param user user who create or update schedule * @param projectCode project which process definition belongs to
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,759
[Improvement][Python] WarningGroup should be specified when deploy process-definition via python-gate
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description I need to set warningGroup on the web page after I deploy process-definition via python-gate. It's very inconvenient So warningGroup should be specified when deploy process-definition via python-gate ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9759
https://github.com/apache/dolphinscheduler/pull/9773
d3c53af100389e30289d577d92d891e005646047
828034f8b9760ed51cd5657e31b4e4f462c643c0
2022-04-25T10:19:08Z
java
2022-04-27T14:02:14Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
* @param processDefinitionCode process definition code * @param schedule schedule expression * @param workerGroup work group */ private void createOrUpdateSchedule(User user, long projectCode, long processDefinitionCode, String schedule, String workerGroup) { Schedule scheduleObj = scheduleMapper.queryByProcessDefinitionCode(processDefinitionCode); int scheduleId; if (scheduleObj == null) { processDefinitionService.releaseProcessDefinition(user, projectCode, processDefinitionCode, ReleaseState.ONLINE); Map<String, Object> result = schedulerService.insertSchedule(user, projectCode, processDefinitionCode, schedule, DEFAULT_WARNING_TYPE, DEFAULT_WARNING_GROUP_ID, DEFAULT_FAILURE_STRATEGY, DEFAULT_PRIORITY, workerGroup, DEFAULT_ENVIRONMENT_CODE); scheduleId = (int) result.get("scheduleId"); } else { scheduleId = scheduleObj.getId(); processDefinitionService.releaseProcessDefinition(user, projectCode, processDefinitionCode, ReleaseState.OFFLINE); schedulerService.updateSchedule(user, projectCode, scheduleId, schedule, DEFAULT_WARNING_TYPE, DEFAULT_WARNING_GROUP_ID, DEFAULT_FAILURE_STRATEGY, DEFAULT_PRIORITY, workerGroup, DEFAULT_ENVIRONMENT_CODE); } schedulerService.setScheduleState(user, projectCode, scheduleId, ReleaseState.ONLINE); } public void execProcessInstance(String userName, String projectName, String processDefinitionName, String cronTime, String workerGroup,
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,759
[Improvement][Python] WarningGroup should be specified when deploy process-definition via python-gate
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description I need to set warningGroup on the web page after I deploy process-definition via python-gate. It's very inconvenient So warningGroup should be specified when deploy process-definition via python-gate ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9759
https://github.com/apache/dolphinscheduler/pull/9773
d3c53af100389e30289d577d92d891e005646047
828034f8b9760ed51cd5657e31b4e4f462c643c0
2022-04-25T10:19:08Z
java
2022-04-27T14:02:14Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
Integer timeout ) { User user = usersService.queryUser(userName); Project project = projectMapper.queryByName(projectName); ProcessDefinition processDefinition = processDefinitionMapper.queryByDefineName(project.getCode(), processDefinitionName); processDefinitionService.releaseProcessDefinition(user, project.getCode(), processDefinition.getCode(), ReleaseState.ONLINE); executorService.execProcessInstance(user, project.getCode(), processDefinition.getCode(), cronTime, null, DEFAULT_FAILURE_STRATEGY, null, DEFAULT_TASK_DEPEND_TYPE, DEFAULT_WARNING_TYPE, DEFAULT_WARNING_GROUP_ID, DEFAULT_RUN_MODE, DEFAULT_PRIORITY, workerGroup, DEFAULT_ENVIRONMENT_CODE, timeout, null, null, DEFAULT_DRY_RUN, COMPLEMENT_DEPENDENT_MODE ); } /*
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,759
[Improvement][Python] WarningGroup should be specified when deploy process-definition via python-gate
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description I need to set warningGroup on the web page after I deploy process-definition via python-gate. It's very inconvenient So warningGroup should be specified when deploy process-definition via python-gate ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9759
https://github.com/apache/dolphinscheduler/pull/9773
d3c53af100389e30289d577d92d891e005646047
828034f8b9760ed51cd5657e31b4e4f462c643c0
2022-04-25T10:19:08Z
java
2022-04-27T14:02:14Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
Grant project's permission to user. Use when project's created user not current but Python API use it to change process definition. */ private Integer grantProjectToUser(Project project, User user) { Date now = new Date(); ProjectUser projectUser = new ProjectUser(); projectUser.setUserId(user.getId()); projectUser.setProjectId(project.getId()); projectUser.setPerm(Constants.AUTHORIZE_WRITABLE_PERM); projectUser.setCreateTime(now); projectUser.setUpdateTime(now); return projectUserMapper.insert(projectUser); } /* Grant or create project. Create a new project if project do not exists, and grant the project permission to user if project exists but without permission to this user. */ public void createOrGrantProject(String userName, String name, String desc) { User user = usersService.queryUser(userName); Project project; project = projectMapper.queryByName(name); if (project == null) { projectService.createProject(user, name, desc); } else if (project.getUserId() != user.getId()) { ProjectUser projectUser = projectUserMapper.queryProjectRelation(project.getId(), user.getId()); if (projectUser == null) { grantProjectToUser(project, user); } } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,759
[Improvement][Python] WarningGroup should be specified when deploy process-definition via python-gate
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description I need to set warningGroup on the web page after I deploy process-definition via python-gate. It's very inconvenient So warningGroup should be specified when deploy process-definition via python-gate ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9759
https://github.com/apache/dolphinscheduler/pull/9773
d3c53af100389e30289d577d92d891e005646047
828034f8b9760ed51cd5657e31b4e4f462c643c0
2022-04-25T10:19:08Z
java
2022-04-27T14:02:14Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
public Map<String, Object> createQueue(String name, String queueName) { Result<Object> verifyQueueExists = queueService.verifyQueue(name, queueName); if (verifyQueueExists.getCode() == 0) { return queueService.createQueue(dummyAdminUser, name, queueName); } else { Map<String, Object> result = new HashMap<>(); result.put(Constants.STATUS, Status.SUCCESS); result.put(Constants.MSG, Status.SUCCESS.getMsg()); return result; } } public Map<String, Object> createTenant(String tenantCode, String desc, String queueName) throws Exception { if (tenantService.checkTenantExists(tenantCode)) { Map<String, Object> result = new HashMap<>(); result.put(Constants.STATUS, Status.SUCCESS); result.put(Constants.MSG, Status.SUCCESS.getMsg()); return result; } else { Result<Object> verifyQueueExists = queueService.verifyQueue(queueName, queueName); if (verifyQueueExists.getCode() == 0) { queueService.createQueue(dummyAdminUser, queueName, queueName); } Map<String, Object> result = queueService.queryQueueName(queueName); List<Queue> queueList = (List<Queue>) result.get(Constants.DATA_LIST); Queue queue = queueList.get(0); return tenantService.createTenant(dummyAdminUser, tenantCode, queue.getId(), desc); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,759
[Improvement][Python] WarningGroup should be specified when deploy process-definition via python-gate
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description I need to set warningGroup on the web page after I deploy process-definition via python-gate. It's very inconvenient So warningGroup should be specified when deploy process-definition via python-gate ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9759
https://github.com/apache/dolphinscheduler/pull/9773
d3c53af100389e30289d577d92d891e005646047
828034f8b9760ed51cd5657e31b4e4f462c643c0
2022-04-25T10:19:08Z
java
2022-04-27T14:02:14Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
} public void createUser(String userName, String userPassword, String email, String phone, String tenantCode, String queue, int state) { User user = usersService.queryUser(userName); if (Objects.isNull(user)) { Map<String, Object> tenantResult = tenantService.queryByTenantCode(tenantCode); Tenant tenant = (Tenant) tenantResult.get(Constants.DATA_LIST); usersService.createUser(userName, userPassword, email, tenant.getId(), phone, queue, state); } } /** * Get datasource by given datasource name. It return map contain datasource id, type, name. * Useful in Python API create sql task which need datasource information. * * @param datasourceName user who create or update schedule */ public Map<String, Object> getDatasourceInfo(String datasourceName) { Map<String, Object> result = new HashMap<>(); List<DataSource> dataSourceList = dataSourceMapper.queryDataSourceByName(datasourceName); if (dataSourceList == null || dataSourceList.isEmpty()) { String msg = String.format("Can not find any datasource by name %s", datasourceName); logger.error(msg); throw new IllegalArgumentException(msg); } else if (dataSourceList.size() > 1) { String msg = String.format("Get more than one datasource by name %s", datasourceName);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,759
[Improvement][Python] WarningGroup should be specified when deploy process-definition via python-gate
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description I need to set warningGroup on the web page after I deploy process-definition via python-gate. It's very inconvenient So warningGroup should be specified when deploy process-definition via python-gate ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9759
https://github.com/apache/dolphinscheduler/pull/9773
d3c53af100389e30289d577d92d891e005646047
828034f8b9760ed51cd5657e31b4e4f462c643c0
2022-04-25T10:19:08Z
java
2022-04-27T14:02:14Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
logger.error(msg); throw new IllegalArgumentException(msg); } else { DataSource dataSource = dataSourceList.get(0); result.put("id", dataSource.getId()); result.put("type", dataSource.getType().name()); result.put("name", dataSource.getName()); } return result; } /** * Get processDefinition by given processDefinitionName name. It return map contain processDefinition id, name, code. * Useful in Python API create subProcess task which need processDefinition information. * * @param userName user who create or update schedule * @param projectName project name which process definition belongs to * @param processDefinitionName process definition name */ public Map<String, Object> getProcessDefinitionInfo(String userName, String projectName, String processDefinitionName) { Map<String, Object> result = new HashMap<>(); User user = usersService.queryUser(userName); Project project = (Project) projectService.queryByName(user, projectName).get(Constants.DATA_LIST); long projectCode = project.getCode(); ProcessDefinition processDefinition = getProcessDefinition(user, projectCode, processDefinitionName); if (processDefinition != null) { processDefinitionService.releaseProcessDefinition(user, projectCode, processDefinition.getCode(), ReleaseState.ONLINE); result.put("id", processDefinition.getId()); result.put("name", processDefinition.getName());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,759
[Improvement][Python] WarningGroup should be specified when deploy process-definition via python-gate
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description I need to set warningGroup on the web page after I deploy process-definition via python-gate. It's very inconvenient So warningGroup should be specified when deploy process-definition via python-gate ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9759
https://github.com/apache/dolphinscheduler/pull/9773
d3c53af100389e30289d577d92d891e005646047
828034f8b9760ed51cd5657e31b4e4f462c643c0
2022-04-25T10:19:08Z
java
2022-04-27T14:02:14Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
result.put("code", processDefinition.getCode()); } else { String msg = String.format("Can not find valid process definition by name %s", processDefinitionName); logger.error(msg); throw new IllegalArgumentException(msg); } return result; } /** * Get project, process definition, task code. * Useful in Python API create dependent task which need processDefinition information. * * @param projectName project name which process definition belongs to * @param processDefinitionName process definition name * @param taskName task name */ public Map<String, Object> getDependentInfo(String projectName, String processDefinitionName, String taskName) { Map<String, Object> result = new HashMap<>(); Project project = projectMapper.queryByName(projectName); if (project == null) { String msg = String.format("Can not find valid project by name %s", projectName); logger.error(msg); throw new IllegalArgumentException(msg); } long projectCode = project.getCode(); result.put("projectCode", projectCode); ProcessDefinition processDefinition = processDefinitionMapper.queryByDefineName(projectCode, processDefinitionName); if (processDefinition == null) { String msg = String.format("Can not find valid process definition by name %s", processDefinitionName); logger.error(msg);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,759
[Improvement][Python] WarningGroup should be specified when deploy process-definition via python-gate
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description I need to set warningGroup on the web page after I deploy process-definition via python-gate. It's very inconvenient So warningGroup should be specified when deploy process-definition via python-gate ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9759
https://github.com/apache/dolphinscheduler/pull/9773
d3c53af100389e30289d577d92d891e005646047
828034f8b9760ed51cd5657e31b4e4f462c643c0
2022-04-25T10:19:08Z
java
2022-04-27T14:02:14Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
throw new IllegalArgumentException(msg); } result.put("processDefinitionCode", processDefinition.getCode()); if (taskName != null) { TaskDefinition taskDefinition = taskDefinitionMapper.queryByName(projectCode, taskName); result.put("taskDefinitionCode", taskDefinition.getCode()); } return result; } /** * Get resource by given program type and full name. It return map contain resource id, name. * Useful in Python API create flink or spark task which need processDefinition information. * * @param programType program type one of SCALA, JAVA and PYTHON * @param fullName full name of the resource */ public Map<String, Object> getResourcesFileInfo(String programType, String fullName) { Map<String, Object> result = new HashMap<>(); Map<String, Object> resources = resourceService.queryResourceByProgramType(dummyAdminUser, ResourceType.FILE, ProgramType.valueOf(programType)); List<ResourceComponent> resourcesComponent = (List<ResourceComponent>) resources.get(Constants.DATA_LIST); List<ResourceComponent> namedResources = resourcesComponent.stream().filter(s -> fullName.equals(s.getFullName())).collect(Collectors.toList()); if (CollectionUtils.isEmpty(namedResources)) { String msg = String.format("Can not find valid resource by program type %s and name %s", programType, fullName); logger.error(msg); throw new IllegalArgumentException(msg); } result.put("id", namedResources.get(0).getId()); result.put("name", namedResources.get(0).getName()); return result; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,759
[Improvement][Python] WarningGroup should be specified when deploy process-definition via python-gate
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description I need to set warningGroup on the web page after I deploy process-definition via python-gate. It's very inconvenient So warningGroup should be specified when deploy process-definition via python-gate ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9759
https://github.com/apache/dolphinscheduler/pull/9773
d3c53af100389e30289d577d92d891e005646047
828034f8b9760ed51cd5657e31b4e4f462c643c0
2022-04-25T10:19:08Z
java
2022-04-27T14:02:14Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
@PostConstruct public void init() { if (pythonGatewayConfiguration.getEnabled()) { this.start(); } } private void start() { GatewayServer server; try { InetAddress gatewayHost = InetAddress.getByName(pythonGatewayConfiguration.getGatewayServerAddress()); InetAddress pythonHost = InetAddress.getByName(pythonGatewayConfiguration.getPythonAddress()); server = new GatewayServer( this, pythonGatewayConfiguration.getGatewayServerPort(), pythonGatewayConfiguration.getPythonPort(), gatewayHost, pythonHost, pythonGatewayConfiguration.getConnectTimeout(), pythonGatewayConfiguration.getReadTimeout(), null ); GatewayServer.turnLoggingOn(); logger.info("PythonGatewayService started on: " + gatewayHost.toString()); server.start(); } catch (UnknownHostException e) { logger.error("exception occurred while constructing PythonGatewayService().", e); } } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,831
[Bug-GroupQueue] Task queue status not updated after forcing.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Task queue status not updated after forcing. ### What you expected to happen normal ### How to reproduce Create task groups and execute workflows. ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9831
https://github.com/apache/dolphinscheduler/pull/9832
bbf6c4ed62e0b5ad57d41691a05032e2a613c739
3cea039239a4f4fbe8959228be6f38123f02285c
2022-04-28T08:05:11Z
java
2022-04-28T08:41:00Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
/* * Lcensed to the Apache Software Foundaton (ASF) under one or more * contrbutor lcense agreements. See the NOTICE fle dstrbuted wth * ths work for addtonal nformaton regardng copyrght ownershp.
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,831
[Bug-GroupQueue] Task queue status not updated after forcing.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Task queue status not updated after forcing. ### What you expected to happen normal ### How to reproduce Create task groups and execute workflows. ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9831
https://github.com/apache/dolphinscheduler/pull/9832
bbf6c4ed62e0b5ad57d41691a05032e2a613c739
3cea039239a4f4fbe8959228be6f38123f02285c
2022-04-28T08:05:11Z
java
2022-04-28T08:41:00Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
* The ASF lcenses ths fle to You under the Apache Lcense, Verson 2.0 * (the "Lcense"); you may not use ths fle except n complance wth * the Lcense. You may obtan a copy of the Lcense at * * http://www.apache.org/lcenses/LICENSE-2.0 * * Unless requred by applcable law or agreed to n wrtng, software * dstrbuted under the Lcense s dstrbuted on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, ether express or mpled. * See the Lcense for the specfc language governng permssons and * lmtatons under the Lcense. */ package org.apache.dolphnscheduler.server.master.runner; mport statc org.apache.dolphnscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_END_DATE; mport statc org.apache.dolphnscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_START_DATE; mport statc org.apache.dolphnscheduler.common.Constants.CMD_PARAM_RECOVERY_START_NODE_STRING; mport statc org.apache.dolphnscheduler.common.Constants.CMD_PARAM_RECOVER_PROCESS_ID_STRING; mport statc org.apache.dolphnscheduler.common.Constants.CMD_PARAM_START_NODES; mport statc org.apache.dolphnscheduler.common.Constants.DEFAULT_WORKER_GROUP; mport statc org.apache.dolphnscheduler.plugn.task.ap.TaskConstants.TASK_TYPE_BLOCKING; mport org.apache.dolphnscheduler.common.Constants; mport org.apache.dolphnscheduler.common.enums.CommandType; mport org.apache.dolphnscheduler.common.enums.FalureStrategy; mport org.apache.dolphnscheduler.common.enums.Flag; mport org.apache.dolphnscheduler.common.enums.Prorty; mport org.apache.dolphnscheduler.common.enums.StateEvent; mport org.apache.dolphnscheduler.common.enums.StateEventType; mport org.apache.dolphnscheduler.common.enums.TaskDependType; mport org.apache.dolphnscheduler.common.enums.TaskGroupQueueStatus; mport org.apache.dolphnscheduler.common.enums.TmeoutFlag;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,831
[Bug-GroupQueue] Task queue status not updated after forcing.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Task queue status not updated after forcing. ### What you expected to happen normal ### How to reproduce Create task groups and execute workflows. ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9831
https://github.com/apache/dolphinscheduler/pull/9832
bbf6c4ed62e0b5ad57d41691a05032e2a613c739
3cea039239a4f4fbe8959228be6f38123f02285c
2022-04-28T08:05:11Z
java
2022-04-28T08:41:00Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
mport org.apache.dolphnscheduler.common.graph.DAG; mport org.apache.dolphnscheduler.common.model.TaskNode; mport org.apache.dolphnscheduler.common.model.TaskNodeRelaton; mport org.apache.dolphnscheduler.common.process.ProcessDag; mport org.apache.dolphnscheduler.common.utls.DateUtls; mport org.apache.dolphnscheduler.common.utls.JSONUtls; mport org.apache.dolphnscheduler.common.utls.NetUtls; mport org.apache.dolphnscheduler.common.utls.ParameterUtls; mport org.apache.dolphnscheduler.dao.entty.Command; mport org.apache.dolphnscheduler.dao.entty.Envronment; mport org.apache.dolphnscheduler.dao.entty.ProcessDefnton; mport org.apache.dolphnscheduler.dao.entty.ProcessInstance; mport org.apache.dolphnscheduler.dao.entty.ProcessTaskRelaton; mport org.apache.dolphnscheduler.dao.entty.ProjectUser; mport org.apache.dolphnscheduler.dao.entty.Schedule; mport org.apache.dolphnscheduler.dao.entty.TaskDefntonLog; mport org.apache.dolphnscheduler.dao.entty.TaskGroupQueue; mport org.apache.dolphnscheduler.dao.entty.TaskInstance; mport org.apache.dolphnscheduler.dao.utls.DagHelper; mport org.apache.dolphnscheduler.plugn.task.ap.enums.DependResult; mport org.apache.dolphnscheduler.plugn.task.ap.enums.Drect; mport org.apache.dolphnscheduler.plugn.task.ap.enums.ExecutonStatus; mport org.apache.dolphnscheduler.plugn.task.ap.enums.TaskTmeoutStrategy; mport org.apache.dolphnscheduler.plugn.task.ap.model.Property; mport org.apache.dolphnscheduler.plugn.task.ap.parameters.BlockngParameters; mport org.apache.dolphnscheduler.remote.command.HostUpdateCommand; mport org.apache.dolphnscheduler.remote.utls.Host; mport org.apache.dolphnscheduler.server.master.confg.MasterConfg; mport org.apache.dolphnscheduler.server.master.dspatch.executor.NettyExecutorManager; mport org.apache.dolphnscheduler.server.master.runner.task.ITaskProcessor;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,831
[Bug-GroupQueue] Task queue status not updated after forcing.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Task queue status not updated after forcing. ### What you expected to happen normal ### How to reproduce Create task groups and execute workflows. ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9831
https://github.com/apache/dolphinscheduler/pull/9832
bbf6c4ed62e0b5ad57d41691a05032e2a613c739
3cea039239a4f4fbe8959228be6f38123f02285c
2022-04-28T08:05:11Z
java
2022-04-28T08:41:00Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
mport org.apache.dolphnscheduler.server.master.runner.task.TaskActon; mport org.apache.dolphnscheduler.server.master.runner.task.TaskProcessorFactory; mport org.apache.dolphnscheduler.servce.alert.ProcessAlertManager; mport org.apache.dolphnscheduler.servce.process.ProcessServce; mport org.apache.dolphnscheduler.servce.quartz.cron.CronUtls; mport org.apache.dolphnscheduler.servce.queue.PeerTaskInstancePrortyQueue; mport org.apache.commons.collectons.CollectonUtls; mport org.apache.commons.lang.StrngUtls; mport org.apache.commons.lang.math.NumberUtls; mport java.utl.ArrayLst; mport java.utl.Arrays; mport java.utl.Collecton; mport java.utl.Date; mport java.utl.HashMap; mport java.utl.Iterator; mport java.utl.Lst; mport java.utl.Map; mport java.utl.Objects; mport java.utl.Set; mport java.utl.concurrent.ConcurrentHashMap; mport java.utl.concurrent.ConcurrentLnkedQueue; mport java.utl.concurrent.atomc.AtomcBoolean; mport java.utl.stream.Collectors; mport org.slf4j.Logger; mport org.slf4j.LoggerFactory; mport com.google.common.collect.Lsts; /** * master exec thread,splt dag */ publc class WorkflowExecuteThread {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,831
[Bug-GroupQueue] Task queue status not updated after forcing.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Task queue status not updated after forcing. ### What you expected to happen normal ### How to reproduce Create task groups and execute workflows. ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9831
https://github.com/apache/dolphinscheduler/pull/9832
bbf6c4ed62e0b5ad57d41691a05032e2a613c739
3cea039239a4f4fbe8959228be6f38123f02285c
2022-04-28T08:05:11Z
java
2022-04-28T08:41:00Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
/** * logger of WorkflowExecuteThread */ prvate statc fnal Logger logger = LoggerFactory.getLogger(WorkflowExecuteThread.class); /** * master confg */ prvate MasterConfg masterConfg; /** * process servce */ prvate ProcessServce processServce; /** * alert manager */ prvate ProcessAlertManager processAlertManager; /** * netty executor manager */ prvate NettyExecutorManager nettyExecutorManager; /** * process nstance */ prvate ProcessInstance processInstance; /** * process defnton */ prvate ProcessDefnton processDefnton; /** * the object of DAG
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,831
[Bug-GroupQueue] Task queue status not updated after forcing.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Task queue status not updated after forcing. ### What you expected to happen normal ### How to reproduce Create task groups and execute workflows. ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9831
https://github.com/apache/dolphinscheduler/pull/9832
bbf6c4ed62e0b5ad57d41691a05032e2a613c739
3cea039239a4f4fbe8959228be6f38123f02285c
2022-04-28T08:05:11Z
java
2022-04-28T08:41:00Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
*/ prvate DAG<Strng, TaskNode, TaskNodeRelaton> dag; /** * key of workflow */ prvate Strng key; /** * start flag, true: start nodes submt completely */ prvate boolean sStart = false; /** * submt falure nodes */ prvate boolean taskFaledSubmt = false; /** * task nstance hash map, taskId as key */ prvate Map<Integer, TaskInstance> taskInstanceMap = new ConcurrentHashMap<>(); /** * runnng taskProcessor, taskCode as key, taskProcessor as value * only on taskProcessor per taskCode */ prvate fnal Map<Long, ITaskProcessor> actveTaskProcessorMaps = new ConcurrentHashMap<>(); /** * vald task map, taskCode as key, taskId as value * n a DAG, only one taskInstance per taskCode s vald */ prvate Map<Long, Integer> valdTaskMap = new ConcurrentHashMap<>(); /** * error task map, taskCode as key, taskInstanceId as value
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,831
[Bug-GroupQueue] Task queue status not updated after forcing.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Task queue status not updated after forcing. ### What you expected to happen normal ### How to reproduce Create task groups and execute workflows. ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9831
https://github.com/apache/dolphinscheduler/pull/9832
bbf6c4ed62e0b5ad57d41691a05032e2a613c739
3cea039239a4f4fbe8959228be6f38123f02285c
2022-04-28T08:05:11Z
java
2022-04-28T08:41:00Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
* n a DAG, only one taskInstance per taskCode s vald */ prvate Map<Long, Integer> errorTaskMap = new ConcurrentHashMap<>(); /** * complete task map, taskCode as key, taskInstanceId as value * n a DAG, only one taskInstance per taskCode s vald */ prvate Map<Long, Integer> completeTaskMap = new ConcurrentHashMap<>(); /** * depend faled task map, taskCode as key, taskId as value */ prvate Map<Long, Integer> dependFaledTaskMap = new ConcurrentHashMap<>(); /** * forbdden task map, code as key */ prvate Map<Long, TaskNode> forbddenTaskMap = new ConcurrentHashMap<>(); /** * skp task map, code as key */ prvate Map<Strng, TaskNode> skpTaskNodeMap = new ConcurrentHashMap<>(); /** * complement date lst */ prvate Lst<Date> complementLstDate = Lsts.newLnkedLst(); /** * state event queue */ prvate ConcurrentLnkedQueue<StateEvent> stateEvents = new ConcurrentLnkedQueue<>(); /** * ready to submt task queue
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,831
[Bug-GroupQueue] Task queue status not updated after forcing.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Task queue status not updated after forcing. ### What you expected to happen normal ### How to reproduce Create task groups and execute workflows. ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9831
https://github.com/apache/dolphinscheduler/pull/9832
bbf6c4ed62e0b5ad57d41691a05032e2a613c739
3cea039239a4f4fbe8959228be6f38123f02285c
2022-04-28T08:05:11Z
java
2022-04-28T08:41:00Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
*/ prvate PeerTaskInstancePrortyQueue readyToSubmtTaskQueue = new PeerTaskInstancePrortyQueue(); /** * wat to retry taskInstance map, taskCode as key, taskInstance as value * before retry, the taskInstance d s 0 */ prvate Map<Long, TaskInstance> watToRetryTaskInstanceMap = new ConcurrentHashMap<>(); /** * state wheel execute thread */ prvate StateWheelExecuteThread stateWheelExecuteThread; /** * constructor of WorkflowExecuteThread * * @param processInstance processInstance * @param processServce processServce * @param nettyExecutorManager nettyExecutorManager * @param processAlertManager processAlertManager * @param masterConfg masterConfg * @param stateWheelExecuteThread stateWheelExecuteThread */ publc WorkflowExecuteThread(ProcessInstance processInstance , ProcessServce processServce , NettyExecutorManager nettyExecutorManager , ProcessAlertManager processAlertManager , MasterConfg masterConfg , StateWheelExecuteThread stateWheelExecuteThread) { ths.processServce = processServce; ths.processInstance = processInstance; ths.masterConfg = masterConfg;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,831
[Bug-GroupQueue] Task queue status not updated after forcing.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Task queue status not updated after forcing. ### What you expected to happen normal ### How to reproduce Create task groups and execute workflows. ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9831
https://github.com/apache/dolphinscheduler/pull/9832
bbf6c4ed62e0b5ad57d41691a05032e2a613c739
3cea039239a4f4fbe8959228be6f38123f02285c
2022-04-28T08:05:11Z
java
2022-04-28T08:41:00Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
ths.nettyExecutorManager = nettyExecutorManager; ths.processAlertManager = processAlertManager; ths.stateWheelExecuteThread = stateWheelExecuteThread; } /** * the process start nodes are submtted completely. */ publc boolean sStart() { return ths.sStart; } /** * handle event */ publc vod handleEvents() { f (!sStart) { return; } whle (!ths.stateEvents.sEmpty()) { try { StateEvent stateEvent = ths.stateEvents.peek(); f (stateEventHandler(stateEvent)) { ths.stateEvents.remove(stateEvent); } } catch (Excepton e) { logger.error("state handle error:", e); } } } publc Strng getKey() { f (StrngUtls.sNotEmpty(key)
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,831
[Bug-GroupQueue] Task queue status not updated after forcing.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Task queue status not updated after forcing. ### What you expected to happen normal ### How to reproduce Create task groups and execute workflows. ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9831
https://github.com/apache/dolphinscheduler/pull/9832
bbf6c4ed62e0b5ad57d41691a05032e2a613c739
3cea039239a4f4fbe8959228be6f38123f02285c
2022-04-28T08:05:11Z
java
2022-04-28T08:41:00Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
|| ths.processDefnton == null) { return key; } key = Strng.format("%d_%d_%d", ths.processDefnton.getCode(), ths.processDefnton.getVerson(), ths.processInstance.getId()); return key; } publc boolean addStateEvent(StateEvent stateEvent) { f (processInstance.getId() != stateEvent.getProcessInstanceId()) { logger.nfo("state event would be abounded :{}", stateEvent.toStrng()); return false; } ths.stateEvents.add(stateEvent); return true; } publc nt eventSze() { return ths.stateEvents.sze(); } publc ProcessInstance getProcessInstance() { return ths.processInstance; } prvate boolean stateEventHandler(StateEvent stateEvent) { logger.nfo("process event: {}", stateEvent.toStrng()); f (!checkProcessInstance(stateEvent)) { return false; } boolean result = false; swtch (stateEvent.getType()) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,831
[Bug-GroupQueue] Task queue status not updated after forcing.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Task queue status not updated after forcing. ### What you expected to happen normal ### How to reproduce Create task groups and execute workflows. ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9831
https://github.com/apache/dolphinscheduler/pull/9832
bbf6c4ed62e0b5ad57d41691a05032e2a613c739
3cea039239a4f4fbe8959228be6f38123f02285c
2022-04-28T08:05:11Z
java
2022-04-28T08:41:00Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
case PROCESS_STATE_CHANGE: result = pr break; case TASK_STATE_CHANGE: result = taskStateChangeHandler(stateEvent); break; case PROCESS_TIMEOUT: result = processTmeout(); break; case TASK_TIMEOUT: result = taskTmeout(stateEvent); break; case WAIT_TASK_GROUP: result = checkForceStartAndWakeUp(stateEvent); break; case TASK_RETRY: result = taskRetryEventHandler(stateEvent); break; case PROCESS_BLOCKED: result = processBlockHandler(stateEvent); break; default: break; } f (result) { ths.stateEvents.remove(stateEvent); } return result; } prvate boolean checkForceStartAndWakeUp(StateEvent stateEvent) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,831
[Bug-GroupQueue] Task queue status not updated after forcing.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Task queue status not updated after forcing. ### What you expected to happen normal ### How to reproduce Create task groups and execute workflows. ### Anything else No Response ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9831
https://github.com/apache/dolphinscheduler/pull/9832
bbf6c4ed62e0b5ad57d41691a05032e2a613c739
3cea039239a4f4fbe8959228be6f38123f02285c
2022-04-28T08:05:11Z
java
2022-04-28T08:41:00Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
TaskGroupQueue taskGroupQueue = ths.processServce.loadTaskGroupQueue(stateEvent.getTaskInstanceId()); f (taskGroupQueue.getForceStart() == Flag.YES.getCode()) { TaskInstance taskInstance = ths.processServce.fndTaskInstanceById(stateEvent.getTaskInstanceId()); ITaskProcessor taskProcessor = actveTaskProcessorMaps.get(taskInstance.getTaskCode()); taskProcessor.acton(TaskActon.DISPATCH); ths.processServce.updateTaskGroupQueueStatus(taskGroupQueue.getId(), TaskGroupQueueStatus.ACQUIRE_SUCCESS.getCode()); return true; } f (taskGroupQueue.getInQueue() == Flag.YES.getCode()) { boolean acqureTaskGroup = processServce.acqureTaskGroupAgan(taskGroupQueue); f (acqureTaskGroup) { TaskInstance taskInstance = ths.processServce.fndTaskInstanceById(stateEvent.getTaskInstanceId()); ITaskProcessor taskProcessor = actveTaskProcessorMaps.get(taskInstance.getTaskCode()); taskProcessor.acton(TaskActon.DISPATCH); return true; } } return false; } prvate boolean taskTmeout(StateEvent stateEvent) { f (!checkTaskInstanceByStateEvent(stateEvent)) { return true; } TaskInstance taskInstance = taskInstanceMap.get(stateEvent.getTaskInstanceId()); f (TmeoutFlag.CLOSE == taskInstance.getTaskDefne().getTmeoutFlag()) { return true; } TaskTmeoutStrategy taskTmeoutStrategy = taskInstance.getTaskDefne().getTmeoutNotfyStrategy(); f (TaskTmeoutStrategy.FAILED == taskTmeoutStrategy || TaskTmeoutStrategy.WARNFAILED == taskTmeoutStrategy) { ITaskProcessor taskProcessor = actveTaskProcessorMaps.get(taskInstance.getTaskCode());