You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by li...@apache.org on 2020/12/02 09:11:46 UTC
[incubator-dolphinscheduler] branch alert_plugin_design updated
(44d5cce -> 567590c)
This is an automated email from the ASF dual-hosted git repository.
lilin pushed a change to branch alert_plugin_design
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git.
from 44d5cce dolphinscheduler plugin need add <package>dolphinscheduler-plugin</package> in the pom.xml file
new 183725d Merge pull request #25 from apache/alert_plugin_design
new 37c8f00 modify http type
new 567590c Merge branch 'sms' into alert_plugin_design
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../pom.xml | 32 +---
.../plugin/alert/http/HttpAlertChannel.java} | 11 +-
.../alert/http/HttpAlertChannelFactory.java} | 45 +++---
.../plugin/alert/http/HttpAlertConstants.java | 21 +--
.../plugin/alert/http/HttpAlertPlugin.java} | 12 +-
.../plugin/alert/http/HttpSender.java | 170 +++++++++++++++++++++
dolphinscheduler-alert-plugin/pom.xml | 1 +
7 files changed, 222 insertions(+), 70 deletions(-)
copy dolphinscheduler-alert-plugin/{dolphinscheduler-alert-dingtalk => dolphinscheduler-alert-http}/pom.xml (58%)
copy dolphinscheduler-alert-plugin/{dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkAlertChannel.java => dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpAlertChannel.java} (84%)
copy dolphinscheduler-alert-plugin/{dolphinscheduler-alert-script/src/main/java/org/apache/dolphinscheduler/plugin/alert/script/ScriptAlertChannelFactory.java => dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpAlertChannelFactory.java} (52%)
copy dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/base/FormType.java => dolphinscheduler-alert-plugin/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpAlertConstants.java (68%)
copy dolphinscheduler-alert-plugin/{dolphinscheduler-alert-email/src/main/java/org/apache/dolphinscheduler/plugin/alert/email/EmailAlertPlugin.java => dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpAlertPlugin.java} (83%)
create mode 100644 dolphinscheduler-alert-plugin/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpSender.java
[incubator-dolphinscheduler] 02/03: modify http type
Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lilin pushed a commit to branch alert_plugin_design
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git
commit 37c8f00e1ff3b4d215d4dd613cbc4b44abab20fa
Author: samz406 <sa...@foxmail.com>
AuthorDate: Fri Nov 27 18:01:27 2020 +0800
modify http type
---
.../pom.xml | 2 +-
.../plugin/alert/http/HttpAlertChannel.java} | 19 ++-
.../plugin/alert/http/HttpAlertChannelFactory.java | 78 ++++++++++
.../plugin/alert/http/HttpAlertConstants.java} | 19 ++-
.../plugin/alert/http/HttpAlertPlugin.java} | 8 +-
.../plugin/alert/http/HttpSender.java | 170 +++++++++++++++++++++
.../plugin/alert/sms/SMSAlertChannelFactory.java | 44 ------
.../plugin/alert/sms/SMSAlertConstants.java | 21 ---
.../plugin/alert/sms/SMSAlertParamsConstants.java | 21 ---
dolphinscheduler-alert-plugin/pom.xml | 2 +-
10 files changed, 277 insertions(+), 107 deletions(-)
diff --git a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-sms/pom.xml b/dolphinscheduler-alert-plugin/dolphinscheduler-alert-http/pom.xml
similarity index 96%
rename from dolphinscheduler-alert-plugin/dolphinscheduler-alert-sms/pom.xml
rename to dolphinscheduler-alert-plugin/dolphinscheduler-alert-http/pom.xml
index 40188e3..51cba27 100644
--- a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-sms/pom.xml
+++ b/dolphinscheduler-alert-plugin/dolphinscheduler-alert-http/pom.xml
@@ -9,7 +9,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>dolphinscheduler-alert-sms</artifactId>
+ <artifactId>dolphinscheduler-alert-http</artifactId>
<dependencies>
<dependency>
diff --git a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-sms/src/main/java/org/apache/dolphinscheduler/plugin/alert/sms/SMSAlertChannel.java b/dolphinscheduler-alert-plugin/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpAlertChannel.java
similarity index 60%
rename from dolphinscheduler-alert-plugin/dolphinscheduler-alert-sms/src/main/java/org/apache/dolphinscheduler/plugin/alert/sms/SMSAlertChannel.java
rename to dolphinscheduler-alert-plugin/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpAlertChannel.java
index 2e0210b..9707d76 100644
--- a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-sms/src/main/java/org/apache/dolphinscheduler/plugin/alert/sms/SMSAlertChannel.java
+++ b/dolphinscheduler-alert-plugin/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpAlertChannel.java
@@ -15,19 +15,28 @@
* limitations under the License.
*/
-package org.apache.dolphinscheduler.plugin.alert.sms;
+package org.apache.dolphinscheduler.plugin.alert.http;
import org.apache.dolphinscheduler.spi.alert.AlertChannel;
+import org.apache.dolphinscheduler.spi.alert.AlertData;
import org.apache.dolphinscheduler.spi.alert.AlertInfo;
import org.apache.dolphinscheduler.spi.alert.AlertResult;
+import org.apache.dolphinscheduler.spi.params.PluginParamsTransfer;
+
+import java.util.Map;
/**
- * sms alert channel,use sms message to seed the alertInfo
+ * http alert channel,use sms message to seed the alertInfo
*/
-public class SMSAlertChannel implements AlertChannel {
+public class HttpAlertChannel implements AlertChannel {
@Override
- public AlertResult process(AlertInfo info) {
- return null;
+ public AlertResult process(AlertInfo alertInfo) {
+
+ AlertData alertData = alertInfo.getAlertData();
+ String alertParams = alertInfo.getAlertParams();
+ Map<String, String> paramsMap = PluginParamsTransfer.getPluginParamsMap(alertParams);
+
+ return new HttpSender(paramsMap).send(alertData.getContent());
}
}
diff --git a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpAlertChannelFactory.java b/dolphinscheduler-alert-plugin/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpAlertChannelFactory.java
new file mode 100644
index 0000000..2e78056
--- /dev/null
+++ b/dolphinscheduler-alert-plugin/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpAlertChannelFactory.java
@@ -0,0 +1,78 @@
+/*
+ * 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.spi.alert.AlertChannel;
+import org.apache.dolphinscheduler.spi.alert.AlertChannelFactory;
+import org.apache.dolphinscheduler.spi.params.InputParam;
+import org.apache.dolphinscheduler.spi.params.base.PluginParams;
+import org.apache.dolphinscheduler.spi.params.base.Validate;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * http alert factory
+ */
+public class HttpAlertChannelFactory implements AlertChannelFactory {
+ @Override
+ public String getName() {
+ return "http alert";
+ }
+
+ @Override
+ public List<PluginParams> getParams() {
+
+ InputParam url = InputParam.newBuilder(HttpAlertConstants.URL, HttpAlertConstants.URL)
+ .addValidate(Validate.newBuilder()
+ .setRequired(true)
+ .build())
+ .build();
+
+ InputParam headerParams = InputParam.newBuilder(HttpAlertConstants.HEADER_PARAMS, HttpAlertConstants.HEADER_PARAMS)
+ .addValidate(Validate.newBuilder()
+ .setRequired(true)
+ .build())
+ .build();
+
+ InputParam bodyParams = InputParam.newBuilder(HttpAlertConstants.BODY_PARAMS, HttpAlertConstants.BODY_PARAMS)
+ .addValidate(Validate.newBuilder()
+ .setRequired(true)
+ .build())
+ .build();
+
+ InputParam contentField = InputParam.newBuilder(HttpAlertConstants.CONTENT_FIELD, HttpAlertConstants.CONTENT_FIELD)
+ .addValidate(Validate.newBuilder()
+ .setRequired(true)
+ .build())
+ .build();
+
+ InputParam requestType = InputParam.newBuilder(HttpAlertConstants.REQUEST_TYPE, HttpAlertConstants.REQUEST_TYPE)
+ .addValidate(Validate.newBuilder()
+ .setRequired(true)
+ .build())
+ .build();
+
+ return Arrays.asList(url, requestType, headerParams, bodyParams, contentField);
+ }
+
+ @Override
+ public AlertChannel create() {
+ return new HttpAlertChannel();
+ }
+}
diff --git a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-sms/src/main/java/org/apache/dolphinscheduler/plugin/alert/sms/SMSSender.java b/dolphinscheduler-alert-plugin/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpAlertConstants.java
similarity index 68%
rename from dolphinscheduler-alert-plugin/dolphinscheduler-alert-sms/src/main/java/org/apache/dolphinscheduler/plugin/alert/sms/SMSSender.java
rename to dolphinscheduler-alert-plugin/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpAlertConstants.java
index ccfc059..5f3b1c2 100644
--- a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-sms/src/main/java/org/apache/dolphinscheduler/plugin/alert/sms/SMSSender.java
+++ b/dolphinscheduler-alert-plugin/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpAlertConstants.java
@@ -15,20 +15,19 @@
* limitations under the License.
*/
-package org.apache.dolphinscheduler.plugin.alert.sms;
+package org.apache.dolphinscheduler.plugin.alert.http;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+public class HttpAlertConstants {
-/**
- * send message
- */
-public class SMSSender {
- public static final Logger logger = LoggerFactory.getLogger(SMSSender.class);
+ public static final String URL = "url";
+
+ public static final String HEADER_PARAMS = "headerParams";
+
+ public static final String BODY_PARAMS = "bodyParams";
+ public static final String CONTENT_FIELD = "contentField";
- public void send(){
+ public static final String REQUEST_TYPE = "requestType";
- }
}
diff --git a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-sms/src/main/java/org/apache/dolphinscheduler/plugin/alert/sms/SMSAlertPlugin.java b/dolphinscheduler-alert-plugin/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpAlertPlugin.java
similarity index 83%
rename from dolphinscheduler-alert-plugin/dolphinscheduler-alert-sms/src/main/java/org/apache/dolphinscheduler/plugin/alert/sms/SMSAlertPlugin.java
rename to dolphinscheduler-alert-plugin/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpAlertPlugin.java
index 55dae28..c3ab1a1 100644
--- a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-sms/src/main/java/org/apache/dolphinscheduler/plugin/alert/sms/SMSAlertPlugin.java
+++ b/dolphinscheduler-alert-plugin/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpAlertPlugin.java
@@ -15,19 +15,19 @@
* limitations under the License.
*/
-package org.apache.dolphinscheduler.plugin.alert.sms;
+package org.apache.dolphinscheduler.plugin.alert.http;
import com.google.common.collect.ImmutableList;
import org.apache.dolphinscheduler.spi.DolphinSchedulerPlugin;
import org.apache.dolphinscheduler.spi.alert.AlertChannelFactory;
/**
- * sms alertPlugins
+ * http alertPlugins
*/
-public class SMSAlertPlugin implements DolphinSchedulerPlugin {
+public class HttpAlertPlugin implements DolphinSchedulerPlugin {
@Override
public Iterable<AlertChannelFactory> getAlertChannelFactorys() {
- return ImmutableList.of(new SMSAlertChannelFactory());
+ return ImmutableList.of(new HttpAlertChannelFactory());
}
}
diff --git a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpSender.java b/dolphinscheduler-alert-plugin/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpSender.java
new file mode 100644
index 0000000..eb71ec3
--- /dev/null
+++ b/dolphinscheduler-alert-plugin/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpSender.java
@@ -0,0 +1,170 @@
+/*
+ * 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 com.fasterxml.jackson.databind.node.ObjectNode;
+import org.apache.dolphinscheduler.spi.alert.AlertResult;
+import org.apache.dolphinscheduler.spi.utils.JSONUtils;
+import org.apache.dolphinscheduler.spi.utils.StringUtils;
+import org.apache.http.HttpEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.methods.HttpRequestBase;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.util.EntityUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *http send message
+ */
+public class HttpSender {
+
+ public static final Logger logger = LoggerFactory.getLogger(HttpSender.class);
+
+ private String url;
+
+ private String headerParams;
+
+ private String bodyParams;
+
+ private String contentField;
+
+ private String requestType;
+
+ private HttpRequestBase httpRequest;
+
+
+ private static final String URL_SPLICE_CHAR = "?";
+
+ /**
+ * request type post
+ */
+ private static final String REQUEST_TYPE_POST = "POST";
+
+ /**
+ * request type get
+ */
+ private static final String REQUEST_TYPE_GET = "GET";
+
+ private static final String DEFAULT_CHARSET = "utf-8";
+
+ public HttpSender(Map<String, String> paramsMap){
+
+ url = paramsMap.get(HttpAlertConstants.URL);
+ headerParams = paramsMap.get(HttpAlertConstants.HEADER_PARAMS);
+ bodyParams = paramsMap.get(HttpAlertConstants.BODY_PARAMS);
+ contentField = paramsMap.get(HttpAlertConstants.CONTENT_FIELD);
+ requestType = paramsMap.get(HttpAlertConstants.REQUEST_TYPE);
+ }
+
+
+ public AlertResult send(String msg) {
+
+ AlertResult alertResult = new AlertResult();
+
+ getHttpRequest(msg);
+
+ if (httpRequest == null){
+ alertResult.setStatus("false");
+ alertResult.setMessage("Request types are not supported");
+ return alertResult;
+ }
+
+ try {
+ CloseableHttpClient httpClient = HttpClientBuilder.create().build();
+ CloseableHttpResponse response = httpClient.execute(httpRequest);
+ HttpEntity entity = response.getEntity();
+ String resp = EntityUtils.toString(entity, DEFAULT_CHARSET);
+ alertResult.setStatus("true");
+ alertResult.setMessage(resp);
+ }catch (Exception e) {
+ logger.error("send sms alert msg exception : {}", e.getMessage());
+ alertResult.setStatus("false");
+ alertResult.setMessage("send http request alert fail.");
+ }
+
+ return alertResult;
+ }
+
+ private void getHttpRequest(String msg){
+
+ if (REQUEST_TYPE_POST.equals(requestType)){
+ httpRequest = new HttpPost(url);
+ //POST request add param in request body
+ setMsgInRequestBody(msg);
+ }else if (REQUEST_TYPE_GET.equals(requestType)){
+ //GET request add param in url
+ setMsgInUrl(msg);
+ httpRequest = new HttpGet(url);
+ }
+ setHeader();
+ }
+
+ /**
+ * add msg param in url
+ * @param msg
+ */
+ private void setMsgInUrl(String msg) {
+
+ if (StringUtils.isNotBlank(contentField)){
+ String type = "&";
+ //check splice char is & or ?
+ if (!url.contains(URL_SPLICE_CHAR)){
+ type = URL_SPLICE_CHAR;
+ }
+ url = String.format("%s%s%s=%s", url, type, contentField, msg);
+ }
+ }
+
+
+ /**
+ * set header params
+ */
+ private void setHeader(){
+
+ if (httpRequest == null){
+ return;
+ }
+
+ HashMap<String,Object> map = JSONUtils.parseObject(headerParams, HashMap.class);
+ for (Map.Entry<String,Object> entry : map.entrySet()) {
+ httpRequest.setHeader(entry.getKey(), String.valueOf(entry.getValue()));
+ }
+ }
+
+ /**
+ *set body params
+ * @param msg
+ * @return
+ */
+ private String setMsgInRequestBody(String msg){
+ ObjectNode objectNode = JSONUtils.parseObject(bodyParams);
+ //set msg content field
+ objectNode.put(contentField,msg);
+ return objectNode.toString();
+ }
+
+
+}
diff --git a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-sms/src/main/java/org/apache/dolphinscheduler/plugin/alert/sms/SMSAlertChannelFactory.java b/dolphinscheduler-alert-plugin/dolphinscheduler-alert-sms/src/main/java/org/apache/dolphinscheduler/plugin/alert/sms/SMSAlertChannelFactory.java
deleted file mode 100644
index ac179ce..0000000
--- a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-sms/src/main/java/org/apache/dolphinscheduler/plugin/alert/sms/SMSAlertChannelFactory.java
+++ /dev/null
@@ -1,44 +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.alert.sms;
-
-import org.apache.dolphinscheduler.spi.alert.AlertChannel;
-import org.apache.dolphinscheduler.spi.alert.AlertChannelFactory;
-import org.apache.dolphinscheduler.spi.params.base.PluginParams;
-
-import java.util.List;
-
-/**
- * sms alert factory
- */
-public class SMSAlertChannelFactory implements AlertChannelFactory {
- @Override
- public String getName() {
- return null;
- }
-
- @Override
- public List<PluginParams> getParams() {
- return null;
- }
-
- @Override
- public AlertChannel create() {
- return null;
- }
-}
diff --git a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-sms/src/main/java/org/apache/dolphinscheduler/plugin/alert/sms/SMSAlertConstants.java b/dolphinscheduler-alert-plugin/dolphinscheduler-alert-sms/src/main/java/org/apache/dolphinscheduler/plugin/alert/sms/SMSAlertConstants.java
deleted file mode 100644
index bf782a8..0000000
--- a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-sms/src/main/java/org/apache/dolphinscheduler/plugin/alert/sms/SMSAlertConstants.java
+++ /dev/null
@@ -1,21 +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.alert.sms;
-
-public class SMSAlertConstants {
-}
diff --git a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-sms/src/main/java/org/apache/dolphinscheduler/plugin/alert/sms/SMSAlertParamsConstants.java b/dolphinscheduler-alert-plugin/dolphinscheduler-alert-sms/src/main/java/org/apache/dolphinscheduler/plugin/alert/sms/SMSAlertParamsConstants.java
deleted file mode 100644
index c0713d9..0000000
--- a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-sms/src/main/java/org/apache/dolphinscheduler/plugin/alert/sms/SMSAlertParamsConstants.java
+++ /dev/null
@@ -1,21 +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.alert.sms;
-
-public class SMSAlertParamsConstants {
-}
diff --git a/dolphinscheduler-alert-plugin/pom.xml b/dolphinscheduler-alert-plugin/pom.xml
index 9713198..707f0ce 100644
--- a/dolphinscheduler-alert-plugin/pom.xml
+++ b/dolphinscheduler-alert-plugin/pom.xml
@@ -34,7 +34,7 @@
<module>dolphinscheduler-alert-wechat</module>
<module>dolphinscheduler-alert-dingtalk</module>
<module>dolphinscheduler-alert-script</module>
- <module>dolphinscheduler-alert-sms</module>
+ <module>dolphinscheduler-alert-http</module>
</modules>
[incubator-dolphinscheduler] 03/03: Merge branch 'sms' into
alert_plugin_design
Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lilin pushed a commit to branch alert_plugin_design
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git
commit 567590c41f112087f673ffb3b26f2926702bee93
Merge: 44d5cce 37c8f00
Author: samz406 <sa...@foxmail.com>
AuthorDate: Wed Dec 2 17:11:31 2020 +0800
Merge branch 'sms' into alert_plugin_design
.../dolphinscheduler-alert-http/pom.xml | 56 +++++++
.../plugin/alert/http/HttpAlertChannel.java | 42 +++++
.../plugin/alert/http/HttpAlertChannelFactory.java | 78 ++++++++++
.../plugin/alert/http/HttpAlertConstants.java | 33 ++++
.../plugin/alert/http/HttpAlertPlugin.java | 33 ++++
.../plugin/alert/http/HttpSender.java | 170 +++++++++++++++++++++
dolphinscheduler-alert-plugin/pom.xml | 1 +
7 files changed, 413 insertions(+)
[incubator-dolphinscheduler] 01/03: Merge pull request #25 from
apache/alert_plugin_design
Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lilin pushed a commit to branch alert_plugin_design
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git
commit 183725dbf766bba27ea0edf8db10ec6634dc7fbe
Merge: 91eb42d 13e6ce9
Author: samz406 <sa...@foxmail.com>
AuthorDate: Fri Nov 20 17:10:42 2020 +0800
Merge pull request #25 from apache/alert_plugin_design
update
.../dolphinscheduler-alert-script/pom.xml | 75 ++++++++++++++++++++++
.../plugin/alert/script/OSUtils.java | 32 +++++++++
.../plugin/alert/script/ProcessUtils.java | 62 ++++++++++++++++++
.../plugin/alert/script/ScriptAlertChannel.java | 40 ++++++++++++
.../alert/script/ScriptAlertChannelFactory.java | 71 ++++++++++++++++++++
.../plugin/alert/script/ScriptAlertPlugin.java | 35 ++++++++++
.../plugin/alert/script/ScriptParamsConstants.java | 36 +++++++++++
.../plugin/alert/script/ScriptSender.java | 74 +++++++++++++++++++++
.../plugin/alert/script/ScriptType.java | 62 ++++++++++++++++++
.../plugin/alert/script/StreamGobbler.java | 61 ++++++++++++++++++
.../plugin/alert/script/ProcessUtilsTest.java | 37 +++++++++++
.../script/ScriptAlertChannelFactoryTest.java | 48 ++++++++++++++
.../plugin/alert/script/ScriptSenderTest.java | 58 +++++++++++++++++
.../src/test/script/shell/example.sh | 25 ++++++++
.../src/test/script/shell/scriptTest.sh | 25 ++++++++
dolphinscheduler-alert-plugin/pom.xml | 1 +
pom.xml | 3 +
17 files changed, 745 insertions(+)