Browse Source

Use common response for sync request (#13847)

3.2.0-release
Wenjun Ruan 2 years ago committed by GitHub
parent
commit
9b269b3c53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/processor/TaskKillResponseProcessor.java
  2. 2
      dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/processor/TaskKillResponseProcessorTest.java
  3. 29
      dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/MessageType.java
  4. 2
      dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/alert/AlertSendResponse.java
  5. 2
      dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/log/GetAppIdResponse.java
  6. 2
      dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/log/GetLogBytesResponse.java
  7. 2
      dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/log/RemoveTaskLogResponse.java
  8. 2
      dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/log/RollViewLogResponse.java
  9. 2
      dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/log/ViewLogResponseResponse.java
  10. 2
      dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/task/TaskKillResponse.java
  11. 2
      dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/task/TaskSavePointResponse.java
  12. 2
      dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/task/WorkflowHostChangeResponse.java
  13. 2
      dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/workflow/WorkflowExecutingDataResponse.java
  14. 2
      dolphinscheduler-remote/src/test/java/org/apache/dolphinscheduler/remote/command/alert/AlertSendResponseTest.java

2
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/processor/TaskKillResponseProcessor.java

@ -52,7 +52,7 @@ public class TaskKillResponseProcessor implements NettyRequestProcessor {
@Override
public MessageType getCommandType() {
return MessageType.TASK_KILL_RESPONSE;
return MessageType.RESPONSE;
}
}

2
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/processor/TaskKillResponseProcessorTest.java

@ -64,7 +64,7 @@ public class TaskKillResponseProcessorTest {
@Test
public void testProcess() {
Message message = taskKillResponse.convert2Command(1);
Assertions.assertEquals(MessageType.TASK_KILL_RESPONSE, message.getType());
Assertions.assertEquals(MessageType.RESPONSE, message.getType());
taskKillResponseProcessor.process(channel, message);
}
}

29
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/MessageType.java

@ -19,28 +19,18 @@ package org.apache.dolphinscheduler.remote.command;
public enum MessageType {
RESPONSE,
GET_APP_ID_REQUEST,
GET_APP_ID_RESPONSE,
REMOVE_TAK_LOG_REQUEST,
REMOVE_TAK_LOG_RESPONSE,
ROLL_VIEW_LOG_REQUEST,
ROLL_VIEW_LOG_RESPONSE,
VIEW_WHOLE_LOG_REQUEST,
VIEW_WHOLE_LOG_RESPONSE,
GET_LOG_BYTES_REQUEST,
GET_LOG_BYTES_RESPONSE,
WORKER_REQUEST,
MASTER_RESPONSE,
/**
* task execute start, from api to master
*/
@ -73,8 +63,6 @@ public enum MessageType {
TASK_KILL_REQUEST,
TASK_KILL_RESPONSE,
TASK_REJECT,
TASK_REJECT_MESSAGE_ACK,
@ -84,11 +72,6 @@ public enum MessageType {
*/
TASK_SAVEPOINT_REQUEST,
/**
* task savepoint ack, for stream task
*/
TASK_SAVEPOINT_RESPONSE,
HEART_BEAT,
PING,
@ -97,10 +80,7 @@ public enum MessageType {
ALERT_SEND_REQUEST,
ALERT_SEND_RESPONSE,
WORKFLOW_HOST_CHANGE_REQUEST,
WORKFLOW_HOST_CHANGE_RESPONSE,
/**
* state event request
@ -134,10 +114,5 @@ public enum MessageType {
*/
TASK_UPDATE_PID__MESSAGE_ACK,
/**
* workflow executing data response, from master to api
*/
WORKFLOW_EXECUTING_DATA_RESPONSE,
WORKFLOW_METRICS_CLEANUP;
}

2
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/alert/AlertSendResponse.java

@ -42,7 +42,7 @@ public class AlertSendResponse implements ResponseMessageBuilder {
@Override
public MessageType getCommandType() {
return MessageType.ALERT_SEND_RESPONSE;
return MessageType.RESPONSE;
}
@Data

2
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/log/GetAppIdResponse.java

@ -35,6 +35,6 @@ public class GetAppIdResponse implements ResponseMessageBuilder {
@Override
public MessageType getCommandType() {
return MessageType.GET_APP_ID_RESPONSE;
return MessageType.RESPONSE;
}
}

2
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/log/GetLogBytesResponse.java

@ -39,7 +39,7 @@ public class GetLogBytesResponse implements ResponseMessageBuilder {
@Override
public MessageType getCommandType() {
return MessageType.GET_LOG_BYTES_RESPONSE;
return MessageType.RESPONSE;
}
}

2
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/log/RemoveTaskLogResponse.java

@ -39,6 +39,6 @@ public class RemoveTaskLogResponse implements ResponseMessageBuilder {
@Override
public MessageType getCommandType() {
return MessageType.REMOVE_TAK_LOG_RESPONSE;
return MessageType.RESPONSE;
}
}

2
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/log/RollViewLogResponse.java

@ -39,6 +39,6 @@ public class RollViewLogResponse implements ResponseMessageBuilder {
@Override
public MessageType getCommandType() {
return MessageType.ROLL_VIEW_LOG_RESPONSE;
return MessageType.RESPONSE;
}
}

2
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/log/ViewLogResponseResponse.java

@ -39,6 +39,6 @@ public class ViewLogResponseResponse implements ResponseMessageBuilder {
@Override
public MessageType getCommandType() {
return MessageType.VIEW_WHOLE_LOG_RESPONSE;
return MessageType.RESPONSE;
}
}

2
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/task/TaskKillResponse.java

@ -52,6 +52,6 @@ public class TaskKillResponse implements ResponseMessageBuilder {
@Override
public MessageType getCommandType() {
return MessageType.TASK_KILL_RESPONSE;
return MessageType.RESPONSE;
}
}

2
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/task/TaskSavePointResponse.java

@ -39,6 +39,6 @@ public class TaskSavePointResponse implements RequestMessageBuilder {
@Override
public MessageType getCommandType() {
return MessageType.TASK_SAVEPOINT_RESPONSE;
return MessageType.RESPONSE;
}
}

2
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/task/WorkflowHostChangeResponse.java

@ -45,6 +45,6 @@ public class WorkflowHostChangeResponse implements ResponseMessageBuilder {
@Override
public MessageType getCommandType() {
return MessageType.WORKFLOW_HOST_CHANGE_RESPONSE;
return MessageType.RESPONSE;
}
}

2
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/workflow/WorkflowExecutingDataResponse.java

@ -37,6 +37,6 @@ public class WorkflowExecutingDataResponse implements ResponseMessageBuilder {
@Override
public MessageType getCommandType() {
return MessageType.WORKFLOW_EXECUTING_DATA_RESPONSE;
return MessageType.RESPONSE;
}
}

2
dolphinscheduler-remote/src/test/java/org/apache/dolphinscheduler/remote/command/alert/AlertSendResponseTest.java

@ -44,6 +44,6 @@ public class AlertSendResponseTest {
alertSendResponse.setResResults(responseResults);
Message message = alertSendResponse.convert2Command(1);
Assertions.assertEquals(MessageType.ALERT_SEND_RESPONSE, message.getType());
Assertions.assertEquals(MessageType.RESPONSE, message.getType());
}
}

Loading…
Cancel
Save