&EC
z%Zd4umhEGA|8n<9D)&R3qm+XEGFEB)nb3IG|IzwmYRl8po~OCrPJJNqna}z0LIXY%
zo1%j$t7Xp^zGpH~*SOQX*}duDv$y@cUjjKCi#rdMUOBC?$=2ziqKPBd-wA;W-f;Jw
zNnOe1eAy>a!gb0m!K|tUD;IxYRZH)!&uHD{moZ0^>v!Uf9~Se{4#vGu5}CK?ftc@o
zl^5rNL>nCWHYYH!Jul}v*=*pEdy#dOk#)cY&(LM7nU?7uU##-}(32kyXOAmynDBh(
z4ojmpoPaR;IWbkzLb6Mw<&;$U=
CNoqg<
diff --git a/dolphinscheduler-api/src/main/resources/dynamic-task-type-config.yaml b/dolphinscheduler-api/src/main/resources/dynamic-task-type-config.yaml
index a9a2d55ff8..74a2504d66 100644
--- a/dolphinscheduler-api/src/main/resources/dynamic-task-type-config.yaml
+++ b/dolphinscheduler-api/src/main/resources/dynamic-task-type-config.yaml
@@ -28,5 +28,3 @@ dynamic-task:
- {name: DATA_QUALITY,icon: shell-icon.png,hover: shell-hover.png}
machineLearning:
- {name: JUPYTER,icon: shell-icon.png,hover: shell-hover.png}
- other:
- - {name: PIGEON,icon: shell-icon.png,hover: shell-hover.png}
\ No newline at end of file
diff --git a/dolphinscheduler-api/src/main/resources/task-type-config.yaml b/dolphinscheduler-api/src/main/resources/task-type-config.yaml
index 9105d50697..05d1e6290a 100644
--- a/dolphinscheduler-api/src/main/resources/task-type-config.yaml
+++ b/dolphinscheduler-api/src/main/resources/task-type-config.yaml
@@ -56,7 +56,6 @@ task:
- 'PYTORCH'
- 'KUBEFLOW'
other:
- - 'PIGEON'
- 'ZEPPELIN'
- 'CHUNJUN'
- 'DATASYNC'
diff --git a/dolphinscheduler-bom/pom.xml b/dolphinscheduler-bom/pom.xml
index 8c59d1c4ca..0635239f8c 100644
--- a/dolphinscheduler-bom/pom.xml
+++ b/dolphinscheduler-bom/pom.xml
@@ -31,7 +31,6 @@
4.1.53.Final
2.7.3
2.4.1
- 1.5.1
3.5.2
2.3.2
1.2.20
@@ -169,11 +168,6 @@
test
-
- org.java-websocket
- Java-WebSocket
- ${java-websocket.version}
-
com.baomidou
diff --git a/dolphinscheduler-common/src/main/resources/common.properties b/dolphinscheduler-common/src/main/resources/common.properties
index cf1723700e..e0704bebe5 100644
--- a/dolphinscheduler-common/src/main/resources/common.properties
+++ b/dolphinscheduler-common/src/main/resources/common.properties
@@ -26,7 +26,7 @@ data.basedir.path=/tmp/dolphinscheduler
# use shared file mount point
resource.storage.type=LOCAL
# resource store on HDFS/S3 path, resource file will store to this base path, self configuration, please make sure the directory exists on hdfs and have read write permissions. "/dolphinscheduler" is recommended
-resource.storage.upload.base.path=/dolphinscheduler
+resource.storage.upload.base.path=/tmp/dolphinscheduler
# The Azure client ID (Azure Application (client) ID)
resource.azure.client.id=minioadmin
diff --git a/dolphinscheduler-dist/release-docs/LICENSE b/dolphinscheduler-dist/release-docs/LICENSE
index 41400d26f5..290d0ab3f3 100644
--- a/dolphinscheduler-dist/release-docs/LICENSE
+++ b/dolphinscheduler-dist/release-docs/LICENSE
@@ -666,7 +666,6 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
animal-sniffer-annotations 1.19 https://mvnrepository.com/artifact/org.codehaus.mojo/animal-sniffer-annotations/1.19, MIT
checker-qual 3.12.0 https://mvnrepository.com/artifact/org.checkerframework/checker-qual/3.12.0, MIT + GPLv2
checker-qual 3.19.0 https://mvnrepository.com/artifact/org.checkerframework/checker-qual/3.19.0, MIT + GPLv2
- Java-WebSocket 1.5.1: https://github.com/TooTallNate/Java-WebSocket, MIT
oshi-core 6.1.1: https://mvnrepository.com/artifact/com.github.oshi/oshi-core/6.1.1, MIT
unirest-java 3.7.04-standalone: https://mvnrepository.com/artifact/com.konghq/unirest-java/3.7.04, MIT
classgraph 4.8.83: https://mvnrepository.com/artifact/io.github.classgraph/classgraph, MIT
diff --git a/dolphinscheduler-dist/release-docs/licenses/LICENSE-Java-WebSocket.txt b/dolphinscheduler-dist/release-docs/licenses/LICENSE-Java-WebSocket.txt
deleted file mode 100644
index dbf7415b41..0000000000
--- a/dolphinscheduler-dist/release-docs/licenses/LICENSE-Java-WebSocket.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright (c) 2010-2020 Nathan Rajlich
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation
- files (the "Software"), to deal in the Software without
- restriction, including without limitation the rights to use,
- copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the
- Software is furnished to do so, subject to the following
- conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/cases/workflow/BaseWorkflowE2ETest.java b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/cases/workflow/BaseWorkflowE2ETest.java
index aab2c7c06f..c2ee2ee447 100644
--- a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/cases/workflow/BaseWorkflowE2ETest.java
+++ b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/cases/workflow/BaseWorkflowE2ETest.java
@@ -17,6 +17,7 @@
package org.apache.dolphinscheduler.e2e.cases.workflow;
+import java.time.Duration;
import java.util.List;
import java.util.Objects;
import java.util.UUID;
@@ -46,7 +47,7 @@ import static org.testcontainers.shaded.org.awaitility.Awaitility.await;
@Slf4j
public abstract class BaseWorkflowE2ETest {
- protected static String projectName = UUID.randomUUID().toString();
+ protected static final String projectName = UUID.randomUUID().toString();
protected static final AdminUser adminUser = new AdminUser();
diff --git a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/common/NavBarPage.java b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/common/NavBarPage.java
index a6a64ccf92..7b00a9bd29 100644
--- a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/common/NavBarPage.java
+++ b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/common/NavBarPage.java
@@ -42,19 +42,19 @@ import java.time.Duration;
public class NavBarPage {
protected final RemoteWebDriver driver;
- @FindBy(css = ".tab-horizontal .n-menu-item:nth-child(2) > .n-menu-item-content")
+ @FindBy(xpath = "//div[contains(@class, 'tab-horizontal')]//div[contains(@role,'menubar')]//span[contains(text(), 'Project')]")
private WebElement projectTab;
- @FindBy(css = ".tab-horizontal .n-menu-item:nth-child(3) > .n-menu-item-content")
+ @FindBy(xpath = "//div[contains(@class, 'tab-horizontal')]//div[contains(@role,'menubar')]//span[contains(text(), 'Resources')]")
private WebElement resourceTab;
- @FindBy(css = ".tab-horizontal .n-menu-item:nth-child(4) > .n-menu-item-content")
+ @FindBy(xpath = "//div[contains(@class, 'tab-horizontal')]//div[contains(@role,'menubar')]//span[contains(text(), 'Data Quality')]")
private WebElement dataQualityTab;
- @FindBy(css = ".tab-horizontal .n-menu-item:nth-child(5) > .n-menu-item-content")
+ @FindBy(xpath = "//div[contains(@class, 'tab-horizontal')]//div[contains(@role,'menubar')]//span[contains(text(), 'Datasource')]")
private WebElement dataSourceTab;
- @FindBy(css = ".tab-horizontal .n-menu-item:nth-child(7) > .n-menu-item-content")
+ @FindBy(xpath = "//div[contains(@class, 'tab-horizontal')]//div[contains(@role,'menubar')]//span[contains(text(), 'Security')]")
private WebElement securityTab;
public NavBarPage(RemoteWebDriver driver) {
@@ -66,14 +66,14 @@ public class NavBarPage {
public T goToNav(Class nav) {
if (nav == ProjectPage.class) {
WebDriverWaitFactory.createWebDriverWait(driver).until(ExpectedConditions.elementToBeClickable(projectTab));
- projectTab.click();
+ ((JavascriptExecutor) driver).executeScript("arguments[0].click();", projectTab());
WebDriverWaitFactory.createWebDriverWait(driver).until(ExpectedConditions.urlContains("/projects/list"));
return nav.cast(new ProjectPage(driver));
}
if (nav == SecurityPage.class) {
WebDriverWaitFactory.createWebDriverWait(driver).until(ExpectedConditions.elementToBeClickable(securityTab));
- securityTab.click();
+ ((JavascriptExecutor) driver).executeScript("arguments[0].click();", securityTab());
WebDriverWaitFactory.createWebDriverWait(driver).until(ExpectedConditions.urlContains("/security/tenant-manage"));
return nav.cast(new SecurityPage(driver));
}
@@ -87,7 +87,7 @@ public class NavBarPage {
if (nav == DataSourcePage.class) {
WebDriverWaitFactory.createWebDriverWait(driver).until(ExpectedConditions.elementToBeClickable(dataSourceTab));
- dataSourceTab.click();
+ ((JavascriptExecutor) driver).executeScript("arguments[0].click();", dataSourceTab());
WebDriverWaitFactory.createWebDriverWait(driver).until(ExpectedConditions.urlContains("/datasource"));
return nav.cast(new DataSourcePage(driver));
}
diff --git a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/project/ProjectDetailPage.java b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/project/ProjectDetailPage.java
index 6e06db5039..c2fedeccfb 100644
--- a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/project/ProjectDetailPage.java
+++ b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/project/ProjectDetailPage.java
@@ -19,7 +19,6 @@
*/
package org.apache.dolphinscheduler.e2e.pages.project;
-import java.time.Duration;
import lombok.SneakyThrows;
import org.apache.dolphinscheduler.e2e.core.WebDriverWaitFactory;
import org.apache.dolphinscheduler.e2e.pages.common.NavBarPage;
@@ -27,14 +26,12 @@ import org.apache.dolphinscheduler.e2e.pages.project.workflow.TaskInstanceTab;
import org.apache.dolphinscheduler.e2e.pages.project.workflow.WorkflowDefinitionTab;
import org.apache.dolphinscheduler.e2e.pages.project.workflow.WorkflowInstanceTab;
-import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.support.FindBy;
import lombok.Getter;
import org.openqa.selenium.support.ui.ExpectedConditions;
-import org.openqa.selenium.support.ui.WebDriverWait;
@Getter
public final class ProjectDetailPage extends NavBarPage {
diff --git a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/project/workflow/WorkflowForm.java b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/project/workflow/WorkflowForm.java
index 69573ab7ff..ce622b0397 100644
--- a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/project/workflow/WorkflowForm.java
+++ b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/project/workflow/WorkflowForm.java
@@ -110,7 +110,7 @@ public final class WorkflowForm {
public WorkflowSaveDialog submit() {
buttonSave().click();
-
+ WebDriverWaitFactory.createWebDriverWait(driver).until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[contains(.,'Basic Information')]")));
return new WorkflowSaveDialog(this);
}
diff --git a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/project/workflow/WorkflowRunDialog.java b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/project/workflow/WorkflowRunDialog.java
index 9e337be43e..ac8c22e5da 100644
--- a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/project/workflow/WorkflowRunDialog.java
+++ b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/project/workflow/WorkflowRunDialog.java
@@ -20,6 +20,8 @@
package org.apache.dolphinscheduler.e2e.pages.project.workflow;
import org.apache.dolphinscheduler.e2e.core.WebDriverWaitFactory;
+
+import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
@@ -45,6 +47,8 @@ public final class WorkflowRunDialog {
}
public WorkflowDefinitionTab submit() {
+ By runDialogTitleXpath = By.xpath(String.format("//*[contains(text(), '%s')]", "Please set the parameters before starting"));
+ WebDriverWaitFactory.createWebDriverWait(parent.driver()).until(ExpectedConditions.visibilityOfElementLocated(runDialogTitleXpath));
WebDriverWaitFactory.createWebDriverWait(parent.driver()).until(ExpectedConditions.elementToBeClickable(buttonSubmit()));
buttonSubmit().click();
diff --git a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/project/workflow/WorkflowSaveDialog.java b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/project/workflow/WorkflowSaveDialog.java
index 6f7b8470ae..d61b6a8fb7 100644
--- a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/project/workflow/WorkflowSaveDialog.java
+++ b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/project/workflow/WorkflowSaveDialog.java
@@ -20,7 +20,11 @@
package org.apache.dolphinscheduler.e2e.pages.project.workflow;
import lombok.Getter;
+
+import org.apache.dolphinscheduler.e2e.core.WebDriverWaitFactory;
+
import org.openqa.selenium.By;
+import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
@@ -44,7 +48,7 @@ public final class WorkflowSaveDialog {
})
private WebElement inputName;
- @FindBy(className = "btn-submit")
+ @FindBy(xpath = "//div[contains(text(), 'Basic Information')]/../following-sibling::div[contains(@class, 'n-card__footer')]//button[contains(@class, 'btn-submit')]")
private WebElement buttonSubmit;
@FindBys({
@@ -72,8 +76,6 @@ public final class WorkflowSaveDialog {
public WorkflowSaveDialog addGlobalParam(String key, String value) {
final int len = globalParamsItems().findElements(By.tagName("input")).size();
- final WebDriver driver = parent().driver();
-
if (len == 0) {
buttonGlobalCustomParameters().click();
@@ -90,8 +92,9 @@ public final class WorkflowSaveDialog {
}
public WorkflowForm submit() {
- buttonSubmit().click();
-
+ WebDriverWaitFactory.createWebDriverWait(driver).until(ExpectedConditions.elementToBeClickable(buttonSubmit));
+ buttonSubmit.click();
+ WebDriverWaitFactory.createWebDriverWait(driver).until(ExpectedConditions.urlContains("workflow-definition"));
return parent;
}
}
diff --git a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/resource/FileManagePage.java b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/resource/FileManagePage.java
index 412acf0f2a..f2d594f155 100644
--- a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/resource/FileManagePage.java
+++ b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/resource/FileManagePage.java
@@ -62,8 +62,6 @@ public class FileManagePage extends NavBarPage implements ResourcePage.Tab {
private final RenameBox renameBox;
- private final CreateFileBox createFileBox;
-
private final UploadFileBox uploadFileBox;
private final EditFileBox editFileBox;
@@ -90,8 +88,6 @@ public class FileManagePage extends NavBarPage implements ResourcePage.Tab {
renameBox = new RenameBox();
- createFileBox = new CreateFileBox();
-
uploadFileBox = new UploadFileBox();
editFileBox = new EditFileBox();
@@ -175,10 +171,11 @@ public class FileManagePage extends NavBarPage implements ResourcePage.Tab {
WebDriverWaitFactory.createWebDriverWait(driver).until(ExpectedConditions.urlContains("/resource/file/create"));
- createFileBox().inputFileName().sendKeys(fileName);
- createFileBox().codeEditor().content(scripts);
- createFileBox().buttonSubmit().click();
- // todo: check if the operation is successful
+ CreateFileBox createFileBox = new CreateFileBox();
+ createFileBox.inputFileName().sendKeys(fileName);
+ createFileBox.codeEditor().content(scripts);
+ createFileBox.buttonSubmit().click();
+ WebDriverWaitFactory.createWebDriverWait(driver).until(ExpectedConditions.urlContains("/resource/file-manage"));
return this;
}
diff --git a/dolphinscheduler-e2e/dolphinscheduler-e2e-core/src/main/java/org/apache/dolphinscheduler/e2e/core/DolphinSchedulerExtension.java b/dolphinscheduler-e2e/dolphinscheduler-e2e-core/src/main/java/org/apache/dolphinscheduler/e2e/core/DolphinSchedulerExtension.java
index d40afe1f3a..eeadc41e25 100644
--- a/dolphinscheduler-e2e/dolphinscheduler-e2e-core/src/main/java/org/apache/dolphinscheduler/e2e/core/DolphinSchedulerExtension.java
+++ b/dolphinscheduler-e2e/dolphinscheduler-e2e-core/src/main/java/org/apache/dolphinscheduler/e2e/core/DolphinSchedulerExtension.java
@@ -79,7 +79,7 @@ final class DolphinSchedulerExtension implements BeforeAllCallback, AfterAllCall
@Override
@SuppressWarnings("UnstableApiUsage")
public void beforeAll(ExtensionContext context) throws IOException {
- Awaitility.setDefaultTimeout(Duration.ofSeconds(60));
+ Awaitility.setDefaultTimeout(Duration.ofSeconds(120));
Awaitility.setDefaultPollInterval(Duration.ofMillis(500));
setRecordPath();
diff --git a/dolphinscheduler-standalone-server/src/main/resources/application.yaml b/dolphinscheduler-standalone-server/src/main/resources/application.yaml
index 906fc42085..e88cafa8cc 100644
--- a/dolphinscheduler-standalone-server/src/main/resources/application.yaml
+++ b/dolphinscheduler-standalone-server/src/main/resources/application.yaml
@@ -211,7 +211,7 @@ worker:
server-load-protection:
enabled: true
# Worker max system cpu usage, when the worker's system cpu usage is smaller then this value, worker server can be dispatched tasks.
- max-system-cpu-usage-percentage-thresholds: 0.9
+ max-system-cpu-usage-percentage-thresholds: 1
# Worker max jvm cpu usage, when the worker's jvm cpu usage is smaller then this value, worker server can be dispatched tasks.
max-jvm-cpu-usage-percentage-thresholds: 0.9
# Worker max System memory usage , when the worker's system memory usage is smaller then this value, worker server can be dispatched tasks.
diff --git a/dolphinscheduler-storage-plugin/dolphinscheduler-storage-api/src/main/java/org/apache/dolphinscheduler/plugin/storage/api/AbstractStorageOperator.java b/dolphinscheduler-storage-plugin/dolphinscheduler-storage-api/src/main/java/org/apache/dolphinscheduler/plugin/storage/api/AbstractStorageOperator.java
index 34a4e464b5..924c581248 100644
--- a/dolphinscheduler-storage-plugin/dolphinscheduler-storage-api/src/main/java/org/apache/dolphinscheduler/plugin/storage/api/AbstractStorageOperator.java
+++ b/dolphinscheduler-storage-plugin/dolphinscheduler-storage-api/src/main/java/org/apache/dolphinscheduler/plugin/storage/api/AbstractStorageOperator.java
@@ -26,11 +26,15 @@ import org.apache.commons.lang3.StringUtils;
import java.io.File;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import com.google.common.base.Preconditions;
import com.google.common.io.Files;
public abstract class AbstractStorageOperator implements StorageOperator {
+ private static final Logger log = LoggerFactory.getLogger(AbstractStorageOperator.class);
protected final String resourceBaseAbsolutePath;
public AbstractStorageOperator(String resourceBaseAbsolutePath) {
@@ -60,7 +64,7 @@ public abstract class AbstractStorageOperator implements StorageOperator {
@Override
public String getStorageBaseDirectory() {
// All directory should end with File.separator
- return PropertyUtils.getString(Constants.RESOURCE_UPLOAD_PATH, "/dolphinscheduler");
+ return PropertyUtils.getString(Constants.RESOURCE_UPLOAD_PATH, "/tmp/dolphinscheduler");
}
@Override
diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-all/pom.xml b/dolphinscheduler-task-plugin/dolphinscheduler-task-all/pom.xml
index 5e4c74b27a..fbaea0dddc 100644
--- a/dolphinscheduler-task-plugin/dolphinscheduler-task-all/pom.xml
+++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-all/pom.xml
@@ -64,12 +64,6 @@
${project.version}
-
- org.apache.dolphinscheduler
- dolphinscheduler-task-pigeon
- ${project.version}
-
-
org.apache.dolphinscheduler
dolphinscheduler-task-procedure
diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-pigeon/pom.xml b/dolphinscheduler-task-plugin/dolphinscheduler-task-pigeon/pom.xml
deleted file mode 100644
index e4f036ae7d..0000000000
--- a/dolphinscheduler-task-plugin/dolphinscheduler-task-pigeon/pom.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
-
- 4.0.0
-
- org.apache.dolphinscheduler
- dolphinscheduler-task-plugin
- dev-SNAPSHOT
-
-
- dolphinscheduler-task-pigeon
- jar
-
-
-
- org.apache.dolphinscheduler
- dolphinscheduler-task-api
- ${project.version}
-
-
- org.apache.dolphinscheduler
- dolphinscheduler-spi
- provided
-
-
- org.apache.commons
- commons-collections4
-
-
- org.slf4j
- slf4j-api
-
-
-
-
- com.github.dreamhead
- moco-core
- 1.2.0
- test
-
-
- com.github.dreamhead
- moco-runner
- 1.2.0
- test
-
-
- commons-cli
- commons-cli
-
-
-
-
-
- org.java-websocket
- Java-WebSocket
-
-
-
- org.apache.httpcomponents
- httpclient
-
-
- org.apache.httpcomponents
- httpcore
-
-
-
diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-pigeon/readme.md b/dolphinscheduler-task-plugin/dolphinscheduler-task-pigeon/readme.md
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-pigeon/src/main/java/org/apache/dolphinscheduler/plugin/task/pigeon/PigeonConfig.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-pigeon/src/main/java/org/apache/dolphinscheduler/plugin/task/pigeon/PigeonConfig.java
deleted file mode 100644
index fb5c1c7677..0000000000
--- a/dolphinscheduler-task-plugin/dolphinscheduler-task-pigeon/src/main/java/org/apache/dolphinscheduler/plugin/task/pigeon/PigeonConfig.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * 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.task.pigeon;
-
-import org.apache.commons.lang3.StringUtils;
-
-import java.util.ResourceBundle;
-
-public class PigeonConfig {
-
- private static PigeonConfig cfg;
-
- private final String jobTriggerUrl;
- private final String jobTriggerPostBody;
- private final String jobStatusUrl;
- private final String jobStatusPostBody;
-
- private final String jobLogsFetchUrl;
- private final String jobCancelPostBody;
-
- public static synchronized PigeonConfig getInstance() {
- if (cfg == null) {
- cfg = new PigeonConfig();
- }
- return cfg;
- }
-
- private PigeonConfig() {
- ResourceBundle bundle =
- ResourceBundle.getBundle(PigeonConfig.class.getPackage().getName().replace(".", "/") + "/config");
- this.jobTriggerUrl = bundle.getString("job.trigger.url");
- this.jobStatusUrl = bundle.getString("job.status.url");
- this.jobTriggerPostBody = bundle.getString("job.trigger.post.body");
- this.jobStatusPostBody = bundle.getString("job.status.post.body");
- this.jobLogsFetchUrl = bundle.getString("job.logs.fetch.url");
- this.jobCancelPostBody = bundle.getString("job.cancel.post.body");
- }
-
- public String getJobCancelPostBody(int taskId) {
- return String.format(jobCancelPostBody, taskId);
- }
-
- public String getJobTriggerUrl(String tisHost) {
- checkHost(tisHost);
- return String.format(this.jobTriggerUrl, tisHost);
- }
-
- public String getJobTriggerPostBody() {
- return jobTriggerPostBody;
- }
-
- public String getJobStatusPostBody(int taskId) {
- return String.format(jobStatusPostBody, taskId);
- }
-
- public String getJobLogsFetchUrl(String host, String jobName, int taskId) {
- checkHost(host);
- return String.format(jobLogsFetchUrl, host, jobName, taskId);
- }
-
- public String getJobStatusUrl(String tisHost) {
- checkHost(tisHost);
- return String.format(this.jobStatusUrl, tisHost);
- }
-
- private static void checkHost(String tisHost) {
- if (StringUtils.isBlank(tisHost)) {
- throw new IllegalArgumentException("param tisHost can not be null");
- }
- }
-}
diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-pigeon/src/main/java/org/apache/dolphinscheduler/plugin/task/pigeon/PigeonParameters.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-pigeon/src/main/java/org/apache/dolphinscheduler/plugin/task/pigeon/PigeonParameters.java
deleted file mode 100644
index f2b9aaf3eb..0000000000
--- a/dolphinscheduler-task-plugin/dolphinscheduler-task-pigeon/src/main/java/org/apache/dolphinscheduler/plugin/task/pigeon/PigeonParameters.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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.task.pigeon;
-
-import org.apache.dolphinscheduler.plugin.task.api.model.ResourceInfo;
-import org.apache.dolphinscheduler.plugin.task.api.parameters.AbstractParameters;
-
-import org.apache.commons.lang3.StringUtils;
-
-import java.util.Collections;
-import java.util.List;
-
-import lombok.extern.slf4j.Slf4j;
-
-/**
- * TIS parameter
- */
-@Slf4j
-public class PigeonParameters extends AbstractParameters {
-
- /**
- * Pigeon target job name
- */
- private String targetJobName;
-
- public String getTargetJobName() {
- return targetJobName;
- }
-
- public void setTargetJobName(String targetJobName) {
- this.targetJobName = targetJobName;
- }
-
- @Override
- public boolean checkParameters() {
- if (StringUtils.isBlank(this.targetJobName)) {
- log.error("checkParameters faild targetJobName can not be null");
- return false;
- }
- return true;
- }
-
- @Override
- public List getResourceFilesList() {
- return Collections.emptyList();
- }
-}
diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-pigeon/src/main/java/org/apache/dolphinscheduler/plugin/task/pigeon/PigeonParamsConstants.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-pigeon/src/main/java/org/apache/dolphinscheduler/plugin/task/pigeon/PigeonParamsConstants.java
deleted file mode 100644
index e50755a728..0000000000
--- a/dolphinscheduler-task-plugin/dolphinscheduler-task-pigeon/src/main/java/org/apache/dolphinscheduler/plugin/task/pigeon/PigeonParamsConstants.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.task.pigeon;
-
-public class PigeonParamsConstants {
-
- public static String NAME_TARGET_JOB_NAME = "targetJobName";
- public static String TARGET_JOB_NAME = NAME_TARGET_JOB_NAME;
-
- private PigeonParamsConstants() {
- }
-}
diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-pigeon/src/main/java/org/apache/dolphinscheduler/plugin/task/pigeon/PigeonTask.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-pigeon/src/main/java/org/apache/dolphinscheduler/plugin/task/pigeon/PigeonTask.java
deleted file mode 100644
index 55af378e83..0000000000
--- a/dolphinscheduler-task-plugin/dolphinscheduler-task-pigeon/src/main/java/org/apache/dolphinscheduler/plugin/task/pigeon/PigeonTask.java
+++ /dev/null
@@ -1,430 +0,0 @@
-/*
- * 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.task.pigeon;
-
-import org.apache.dolphinscheduler.common.utils.JSONUtils;
-import org.apache.dolphinscheduler.plugin.task.api.AbstractRemoteTask;
-import org.apache.dolphinscheduler.plugin.task.api.TaskCallBack;
-import org.apache.dolphinscheduler.plugin.task.api.TaskConstants;
-import org.apache.dolphinscheduler.plugin.task.api.TaskException;
-import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext;
-import org.apache.dolphinscheduler.plugin.task.api.parameters.AbstractParameters;
-
-import org.apache.commons.collections4.CollectionUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.http.HttpEntity;
-import org.apache.http.StatusLine;
-import org.apache.http.client.ClientProtocolException;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.apache.http.util.EntityUtils;
-
-import java.net.HttpURLConnection;
-import java.net.URI;
-import java.nio.charset.StandardCharsets;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.stream.Collectors;
-
-import lombok.extern.slf4j.Slf4j;
-
-import org.java_websocket.client.WebSocketClient;
-import org.java_websocket.handshake.ServerHandshake;
-
-/**
- * TIS DataX Task
- **/
-@Slf4j
-public class PigeonTask extends AbstractRemoteTask {
-
- public static final String KEY_POOL_VAR_PIGEON_HOST = "p_host";
- private final TaskExecutionContext taskExecutionContext;
-
- private PigeonParameters parameters;
- private BizResult triggerResult;
- private final PigeonConfig config;
-
- public PigeonTask(TaskExecutionContext taskExecutionContext) {
- super(taskExecutionContext);
- this.taskExecutionContext = taskExecutionContext;
- this.config = PigeonConfig.getInstance();
- }
-
- @Override
- public List getApplicationIds() throws TaskException {
- return Collections.emptyList();
- }
-
- @Override
- public void init() throws TaskException {
- super.init();
- parameters = JSONUtils.parseObject(taskExecutionContext.getTaskParams(), PigeonParameters.class);
- log.info("Initialize PIGEON task params {}", JSONUtils.toPrettyJsonString(parameters));
- if (parameters == null || !parameters.checkParameters()) {
- throw new TaskException("datax task params is not valid");
- }
- }
-
- // todo split handle to submit and track
- @Override
- public void handle(TaskCallBack taskCallBack) throws TaskException {
- // Trigger PIGEON DataX pipeline
- log.info("start execute PIGEON task");
- long startTime = System.currentTimeMillis();
- String targetJobName = this.parameters.getTargetJobName();
- String host = getHost();
- try {
- final String triggerUrl = getTriggerUrl();
- final String getStatusUrl = config.getJobStatusUrl(host);
- HttpPost post = new HttpPost(triggerUrl);
- post.addHeader("appname", targetJobName);
- addFormUrlencoded(post);
- StringEntity entity = new StringEntity(config.getJobTriggerPostBody(), StandardCharsets.UTF_8);
- post.setEntity(entity);
- ExecResult execState = null;
- int taskId;
- WebSocketClient webSocket = null;
- try (
- CloseableHttpClient client = HttpClients.createDefault();
- // trigger to start PIGEON dataX task
- CloseableHttpResponse response = client.execute(post)) {
- triggerResult = processResponse(triggerUrl, response, BizResult.class);
- if (!triggerResult.isSuccess()) {
- List errormsg = triggerResult.getErrormsg();
- StringBuffer errs = new StringBuffer();
- if (CollectionUtils.isNotEmpty(errormsg)) {
- errs.append(",errs:").append(errormsg.stream().collect(Collectors.joining(",")));
- }
- throw new Exception("trigger PIGEON job faild taskName:" + targetJobName + errs.toString());
- }
- taskId = triggerResult.getBizresult().getTaskid();
-
- webSocket = receiveRealtimeLog(host, targetJobName, taskId);
-
- setAppIds(String.valueOf(taskId));
-
- CloseableHttpResponse status = null;
-
- while (true) {
- try {
- post = new HttpPost(getStatusUrl);
- entity = new StringEntity("{\n taskid: " + taskId + "\n, log: false }", StandardCharsets.UTF_8);
- post.setEntity(entity);
- status = client.execute(post);
- StatusResult execStatus = processResponse(getStatusUrl, status, StatusResult.class);
- Map bizresult = execStatus.getBizresult();
- Map s = (Map) bizresult.get("status");
- execState = ExecResult.parse((Integer) s.get("state"));
- if (execState == ExecResult.SUCCESS || execState == ExecResult.FAILD) {
- break;
- }
- Thread.sleep(3000);
- } finally {
- status.close();
- }
- }
- } finally {
- if (webSocket != null) {
- Thread.sleep(4000);
- try {
- webSocket.close();
- } catch (Throwable e) {
- log.warn(e.getMessage(), e);
- }
- }
- }
-
- long costTime = System.currentTimeMillis() - startTime;
- log.info("PIGEON task: {},taskId:{} costTime : {} milliseconds, statusCode : {}",
- targetJobName, taskId, costTime, (execState == ExecResult.SUCCESS) ? "'success'" : "'failure'");
- setExitStatusCode((execState == ExecResult.SUCCESS) ? TaskConstants.EXIT_CODE_SUCCESS
- : TaskConstants.EXIT_CODE_FAILURE);
- } catch (Exception e) {
- log.error("execute PIGEON dataX faild,PIGEON task name:" + targetJobName, e);
- setExitStatusCode(TaskConstants.EXIT_CODE_FAILURE);
- if (e instanceof InterruptedException) {
- Thread.currentThread().interrupt();
- }
- throw new TaskException("Execute pigeon task failed", e);
- }
- }
-
- @Override
- public void submitApplication() throws TaskException {
-
- }
-
- @Override
- public void trackApplicationStatus() throws TaskException {
-
- }
-
- private void addFormUrlencoded(HttpPost post) {
- post.addHeader("content-type", "application/x-www-form-urlencoded");
- }
-
- @Override
- public void cancelApplication() throws TaskException {
- log.info("start to cancelApplication");
- Objects.requireNonNull(triggerResult, "triggerResult can not be null");
- log.info("start to cancelApplication taskId:{}", triggerResult.getTaskId());
- final String triggerUrl = getTriggerUrl();
-
- StringEntity entity =
- new StringEntity(config.getJobCancelPostBody(triggerResult.getTaskId()), StandardCharsets.UTF_8);
-
- CancelResult cancelResult = null;
- HttpPost post = new HttpPost(triggerUrl);
- addFormUrlencoded(post);
- post.setEntity(entity);
- try (
- CloseableHttpClient client = HttpClients.createDefault();
- // trigger to start TIS dataX task
- CloseableHttpResponse response = client.execute(post)) {
- cancelResult = processResponse(triggerUrl, response, CancelResult.class);
- if (!cancelResult.isSuccess()) {
- List errormsg = triggerResult.getErrormsg();
- StringBuffer errs = new StringBuffer();
- if (CollectionUtils.isNotEmpty(errormsg)) {
- errs.append(",errs:").append(errormsg.stream().collect(Collectors.joining(",")));
- }
- throw new TaskException("cancel PIGEON job faild taskId:" + triggerResult.getTaskId() + errs);
- }
- } catch (ClientProtocolException e) {
- throw new TaskException("client protocol error", e);
- } catch (Exception e) {
- throw new TaskException("pigeon execute error", e);
- }
- }
-
- private String getTriggerUrl() {
- final String tisHost = getHost();
- return config.getJobTriggerUrl(tisHost);
- }
-
- private String getHost() {
- final String host = taskExecutionContext.getDefinedParams().get(KEY_POOL_VAR_PIGEON_HOST);
- if (StringUtils.isEmpty(host)) {
- throw new IllegalStateException("global var '" + KEY_POOL_VAR_PIGEON_HOST + "' can not be empty");
- }
- return host;
- }
-
- private WebSocketClient receiveRealtimeLog(final String tisHost, String dataXName, int taskId) throws Exception {
- final String applyURI = config.getJobLogsFetchUrl(tisHost, dataXName, taskId);
- log.info("apply ws connection,uri:{}", applyURI);
- WebSocketClient webSocketClient = new WebSocketClient(new URI(applyURI)) {
-
- @Override
- public void onOpen(ServerHandshake handshakedata) {
- log.info("start to receive remote execute log");
- }
-
- @Override
- public void onMessage(String message) {
- ExecLog execLog = JSONUtils.parseObject(message, ExecLog.class);
- log.info(execLog.getMsg());
- }
-
- @Override
- public void onClose(int code, String reason, boolean remote) {
- log.info("stop to receive remote log,reason:{},taskId:{}", reason, taskId);
- }
-
- @Override
- public void onError(Exception t) {
- log.error(t.getMessage(), t);
- }
- };
- webSocketClient.connect();
- return webSocketClient;
- }
-
- private T processResponse(String applyUrl, CloseableHttpResponse response,
- Class clazz) throws Exception {
- StatusLine resStatus = response.getStatusLine();
- if (HttpURLConnection.HTTP_OK != resStatus.getStatusCode()) {
- throw new IllegalStateException("request server " + applyUrl + " faild:" + resStatus.getReasonPhrase());
- }
- HttpEntity entity = response.getEntity();
- String resp = EntityUtils.toString(entity, StandardCharsets.UTF_8);
- T result = JSONUtils.parseObject(resp, clazz);
- return result;
- }
-
- @Override
- public AbstractParameters getParameters() {
- Objects.requireNonNull(this.parameters, "tisParameters can not be null");
- return this.parameters;
- }
-
- private static class CancelResult extends AjaxResult