/*
* 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.
*/packageorg.apache.dolphinscheduler.remote.command;publicenumCommandType{/**
* roll view log request
*/ROLL_VIEW_LOG_REQUEST,/**
* roll view log response
*/ROLL_VIEW_LOG_RESPONSE,/**
* view whole log request
*/VIEW_WHOLE_LOG_REQUEST,/**
* view whole log response
*/VIEW_WHOLE_LOG_RESPONSE,/**
* get log bytes request
*/GET_LOG_BYTES_REQUEST,/**
* get log bytes response
*/GET_LOG_BYTES_RESPONSE,WORKER_REQUEST,MASTER_RESPONSE,/**
* execute task request
*/EXECUTE_TASK_REQUEST,/**
* execute task ack
*/EXECUTE_TASK_ACK,/**
* execute task response
*/EXECUTE_TASK_RESPONSE,/**
* kill task
*/KILL_TASK_REQUEST,/**
* kill task response
*/KILL_TASK_RESPONSE,/**
* ping
*/PING,/**
* pong
*/PONG;}
\ No newline at end of file
/*
* 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.
*/packageorg.apache.dolphinscheduler.remote.command;publicenumCommandType{/**
* roll view log request
*/ROLL_VIEW_LOG_REQUEST,/**
* roll view log response
*/ROLL_VIEW_LOG_RESPONSE,/**
* view whole log request
*/VIEW_WHOLE_LOG_REQUEST,/**
* view whole log response
*/VIEW_WHOLE_LOG_RESPONSE,/**
* get log bytes request
*/GET_LOG_BYTES_REQUEST,/**
* get log bytes response
*/GET_LOG_BYTES_RESPONSE,WORKER_REQUEST,MASTER_RESPONSE,/**
* execute task request
*/TASK_EXECUTE_REQUEST,/**
* execute task ack
*/TASK_EXECUTE_ACK,/**
* execute task response
*/TASK_EXECUTE_RESPONSE,/**
* kill task
*/TASK_KILL_REQUEST,/**
* kill task response
*/TASK_KILL_RESPONSE,/**
* ping
*/PING,/**
* pong
*/PONG;}
/*
* 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.
*/packageorg.apache.dolphinscheduler.remote.command;importorg.apache.dolphinscheduler.remote.utils.FastJsonSerializer;importjava.io.Serializable;importjava.util.Date;/**
* execute task request command
*/publicclassExecuteTaskAckCommandimplementsSerializable{/**
* taskInstanceId
*/privateinttaskInstanceId;/**
* startTime
*/privateDatestartTime;/**
* host
*/privateStringhost;/**
* status
*/privateintstatus;/**
* logPath
*/privateStringlogPath;/**
* executePath
*/privateStringexecutePath;publicDategetStartTime(){returnstartTime;}publicvoidsetStartTime(DatestartTime){this.startTime=startTime;}publicStringgetHost(){returnhost;}publicvoidsetHost(Stringhost){this.host=host;}publicintgetStatus(){returnstatus;}publicvoidsetStatus(intstatus){this.status=status;}publicintgetTaskInstanceId(){returntaskInstanceId;}publicvoidsetTaskInstanceId(inttaskInstanceId){this.taskInstanceId=taskInstanceId;}publicStringgetLogPath(){returnlogPath;}publicvoidsetLogPath(StringlogPath){this.logPath=logPath;}publicStringgetExecutePath(){returnexecutePath;}publicvoidsetExecutePath(StringexecutePath){this.executePath=executePath;}/**
* package request command
*
* @return command
*/publicCommandconvert2Command(){Commandcommand=newCommand();command.setType(CommandType.EXECUTE_TASK_ACK);byte[]body=FastJsonSerializer.serialize(this);command.setBody(body);returncommand;}@OverridepublicStringtoString(){return"ExecuteTaskAckCommand{"+"taskInstanceId="+taskInstanceId+", startTime="+startTime+", host='"+host+'\''+", status="+status+", logPath='"+logPath+'\''+", executePath='"+executePath+'\''+'}';}}
\ No newline at end of file
/*
* 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.
*/packageorg.apache.dolphinscheduler.remote.command;importorg.apache.dolphinscheduler.remote.utils.FastJsonSerializer;importjava.io.Serializable;importjava.util.Date;/**
* execute task request command
*/publicclassTaskExecuteAckCommandimplementsSerializable{/**
* taskInstanceId
*/privateinttaskInstanceId;/**
* startTime
*/privateDatestartTime;/**
* host
*/privateStringhost;/**
* status
*/privateintstatus;/**
* logPath
*/privateStringlogPath;/**
* executePath
*/privateStringexecutePath;publicDategetStartTime(){returnstartTime;}publicvoidsetStartTime(DatestartTime){this.startTime=startTime;}publicStringgetHost(){returnhost;}publicvoidsetHost(Stringhost){this.host=host;}publicintgetStatus(){returnstatus;}publicvoidsetStatus(intstatus){this.status=status;}publicintgetTaskInstanceId(){returntaskInstanceId;}publicvoidsetTaskInstanceId(inttaskInstanceId){this.taskInstanceId=taskInstanceId;}publicStringgetLogPath(){returnlogPath;}publicvoidsetLogPath(StringlogPath){this.logPath=logPath;}publicStringgetExecutePath(){returnexecutePath;}publicvoidsetExecutePath(StringexecutePath){this.executePath=executePath;}/**
* package request command
*
* @return command
*/publicCommandconvert2Command(){Commandcommand=newCommand();command.setType(CommandType.TASK_EXECUTE_ACK);byte[]body=FastJsonSerializer.serialize(this);command.setBody(body);returncommand;}@OverridepublicStringtoString(){return"TaskExecuteAckCommand{"+"taskInstanceId="+taskInstanceId+", startTime="+startTime+", host='"+host+'\''+", status="+status+", logPath='"+logPath+'\''+", executePath='"+executePath+'\''+'}';}}
/*
* 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.
*/packageorg.apache.dolphinscheduler.remote.command;importorg.apache.dolphinscheduler.remote.utils.FastJsonSerializer;importjava.io.Serializable;/**
* execute task request command
*/publicclassExecuteTaskRequestCommandimplementsSerializable{/**
* task execution context
*/privateStringtaskExecutionContext;publicStringgetTaskExecutionContext(){returntaskExecutionContext;}publicvoidsetTaskExecutionContext(StringtaskExecutionContext){this.taskExecutionContext=taskExecutionContext;}publicExecuteTaskRequestCommand(){}publicExecuteTaskRequestCommand(StringtaskExecutionContext){this.taskExecutionContext=taskExecutionContext;}/**
* package request command
*
* @return command
*/publicCommandconvert2Command(){Commandcommand=newCommand();command.setType(CommandType.EXECUTE_TASK_REQUEST);byte[]body=FastJsonSerializer.serialize(this);command.setBody(body);returncommand;}@OverridepublicStringtoString(){return"ExecuteTaskRequestCommand{"+"taskExecutionContext='"+taskExecutionContext+'\''+'}';}}
\ No newline at end of file
/*
* 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.
*/packageorg.apache.dolphinscheduler.remote.command;importorg.apache.dolphinscheduler.remote.utils.FastJsonSerializer;importjava.io.Serializable;/**
* execute task request command
*/publicclassTaskExecuteRequestCommandimplementsSerializable{/**
* task execution context
*/privateStringtaskExecutionContext;publicStringgetTaskExecutionContext(){returntaskExecutionContext;}publicvoidsetTaskExecutionContext(StringtaskExecutionContext){this.taskExecutionContext=taskExecutionContext;}publicTaskExecuteRequestCommand(){}publicTaskExecuteRequestCommand(StringtaskExecutionContext){this.taskExecutionContext=taskExecutionContext;}/**
* package request command
*
* @return command
*/publicCommandconvert2Command(){Commandcommand=newCommand();command.setType(CommandType.TASK_EXECUTE_REQUEST);byte[]body=FastJsonSerializer.serialize(this);command.setBody(body);returncommand;}@OverridepublicStringtoString(){return"TaskExecuteRequestCommand{"+"taskExecutionContext='"+taskExecutionContext+'\''+'}';}}
/*
* 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.
*/packageorg.apache.dolphinscheduler.remote.command;importorg.apache.dolphinscheduler.remote.utils.FastJsonSerializer;importjava.io.Serializable;importjava.util.Date;/**
* execute task response command
*/publicclassExecuteTaskResponseCommandimplementsSerializable{publicExecuteTaskResponseCommand(){}publicExecuteTaskResponseCommand(inttaskInstanceId){this.taskInstanceId=taskInstanceId;}/**
* task instance id
*/privateinttaskInstanceId;/**
* status
*/privateintstatus;/**
* end time
*/privateDateendTime;/**
* processId
*/privateintprocessId;/**
* appIds
*/privateStringappIds;publicintgetTaskInstanceId(){returntaskInstanceId;}publicvoidsetTaskInstanceId(inttaskInstanceId){this.taskInstanceId=taskInstanceId;}publicintgetStatus(){returnstatus;}publicvoidsetStatus(intstatus){this.status=status;}publicDategetEndTime(){returnendTime;}publicvoidsetEndTime(DateendTime){this.endTime=endTime;}publicintgetProcessId(){returnprocessId;}publicvoidsetProcessId(intprocessId){this.processId=processId;}publicStringgetAppIds(){returnappIds;}publicvoidsetAppIds(StringappIds){this.appIds=appIds;}/**
* package response command
* @return command
*/publicCommandconvert2Command(){Commandcommand=newCommand();command.setType(CommandType.EXECUTE_TASK_RESPONSE);byte[]body=FastJsonSerializer.serialize(this);command.setBody(body);returncommand;}@OverridepublicStringtoString(){return"ExecuteTaskResponseCommand{"+"taskInstanceId="+taskInstanceId+", status="+status+", endTime="+endTime+", processId="+processId+", appIds='"+appIds+'\''+'}';}}
\ No newline at end of file
/*
* 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.
*/packageorg.apache.dolphinscheduler.remote.command;importorg.apache.dolphinscheduler.remote.utils.FastJsonSerializer;importjava.io.Serializable;importjava.util.Date;/**
* execute task response command
*/publicclassTaskExecuteResponseCommandimplementsSerializable{publicTaskExecuteResponseCommand(){}publicTaskExecuteResponseCommand(inttaskInstanceId){this.taskInstanceId=taskInstanceId;}/**
* task instance id
*/privateinttaskInstanceId;/**
* status
*/privateintstatus;/**
* end time
*/privateDateendTime;/**
* processId
*/privateintprocessId;/**
* appIds
*/privateStringappIds;publicintgetTaskInstanceId(){returntaskInstanceId;}publicvoidsetTaskInstanceId(inttaskInstanceId){this.taskInstanceId=taskInstanceId;}publicintgetStatus(){returnstatus;}publicvoidsetStatus(intstatus){this.status=status;}publicDategetEndTime(){returnendTime;}publicvoidsetEndTime(DateendTime){this.endTime=endTime;}publicintgetProcessId(){returnprocessId;}publicvoidsetProcessId(intprocessId){this.processId=processId;}publicStringgetAppIds(){returnappIds;}publicvoidsetAppIds(StringappIds){this.appIds=appIds;}/**
* package response command
* @return command
*/publicCommandconvert2Command(){Commandcommand=newCommand();command.setType(CommandType.TASK_EXECUTE_RESPONSE);byte[]body=FastJsonSerializer.serialize(this);command.setBody(body);returncommand;}@OverridepublicStringtoString(){return"TaskExecuteResponseCommand{"+"taskInstanceId="+taskInstanceId+", status="+status+", endTime="+endTime+", processId="+processId+", appIds='"+appIds+'\''+'}';}}
/*
* 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.
*/packageorg.apache.dolphinscheduler.remote.command;importorg.apache.dolphinscheduler.remote.utils.FastJsonSerializer;importjava.io.Serializable;/**
* kill task request command
*/publicclassKillTaskRequestCommandimplementsSerializable{/**
* task execution context
*/privateStringtaskExecutionContext;publicStringgetTaskExecutionContext(){returntaskExecutionContext;}publicvoidsetTaskExecutionContext(StringtaskExecutionContext){this.taskExecutionContext=taskExecutionContext;}publicKillTaskRequestCommand(){}publicKillTaskRequestCommand(StringtaskExecutionContext){this.taskExecutionContext=taskExecutionContext;}/**
* package request command
*
* @return command
*/publicCommandconvert2Command(){Commandcommand=newCommand();command.setType(CommandType.KILL_TASK_REQUEST);byte[]body=FastJsonSerializer.serialize(this);command.setBody(body);returncommand;}@OverridepublicStringtoString(){return"KillTaskRequestCommand{"+"taskExecutionContext='"+taskExecutionContext+'\''+'}';}}
\ No newline at end of file
/*
* 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.
*/packageorg.apache.dolphinscheduler.remote.command;importorg.apache.dolphinscheduler.remote.utils.FastJsonSerializer;importjava.io.Serializable;/**
* kill task request command
*/publicclassTaskKillRequestCommandimplementsSerializable{/**
* task execution context
*/privateStringtaskExecutionContext;publicStringgetTaskExecutionContext(){returntaskExecutionContext;}publicvoidsetTaskExecutionContext(StringtaskExecutionContext){this.taskExecutionContext=taskExecutionContext;}publicTaskKillRequestCommand(){}publicTaskKillRequestCommand(StringtaskExecutionContext){this.taskExecutionContext=taskExecutionContext;}/**
* package request command
*
* @return command
*/publicCommandconvert2Command(){Commandcommand=newCommand();command.setType(CommandType.TASK_KILL_REQUEST);byte[]body=FastJsonSerializer.serialize(this);command.setBody(body);returncommand;}@OverridepublicStringtoString(){return"TaskKillRequestCommand{"+"taskExecutionContext='"+taskExecutionContext+'\''+'}';}}
/*
* 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.
*/packageorg.apache.dolphinscheduler.remote.command;importorg.apache.dolphinscheduler.remote.utils.FastJsonSerializer;importjava.io.Serializable;importjava.util.Date;importjava.util.List;/**
* kill task response command
*/publicclassKillTaskResponseCommandimplementsSerializable{/**
* taskInstanceId
*/privateinttaskInstanceId;/**
* host
*/privateStringhost;/**
* status
*/privateintstatus;/**
* processId
*/privateintprocessId;/**
* other resource manager appId , for example : YARN etc
*/protectedList<String>appIds;publicintgetTaskInstanceId(){returntaskInstanceId;}publicvoidsetTaskInstanceId(inttaskInstanceId){this.taskInstanceId=taskInstanceId;}publicStringgetHost(){returnhost;}publicvoidsetHost(Stringhost){this.host=host;}publicintgetStatus(){returnstatus;}publicvoidsetStatus(intstatus){this.status=status;}publicintgetProcessId(){returnprocessId;}publicvoidsetProcessId(intprocessId){this.processId=processId;}publicList<String>getAppIds(){returnappIds;}publicvoidsetAppIds(List<String>appIds){this.appIds=appIds;}/**
* package request command
*
* @return command
*/publicCommandconvert2Command(){Commandcommand=newCommand();command.setType(CommandType.KILL_TASK_RESPONSE);byte[]body=FastJsonSerializer.serialize(this);command.setBody(body);returncommand;}@OverridepublicStringtoString(){return"KillTaskResponseCommand{"+"taskInstanceId="+taskInstanceId+", host='"+host+'\''+", status="+status+", processId="+processId+", appIds="+appIds+'}';}}
\ No newline at end of file
/*
* 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.
*/packageorg.apache.dolphinscheduler.remote.command;importorg.apache.dolphinscheduler.remote.utils.FastJsonSerializer;importjava.io.Serializable;importjava.util.Date;importjava.util.List;/**
* kill task response command
*/publicclassTaskKillResponseCommandimplementsSerializable{/**
* taskInstanceId
*/privateinttaskInstanceId;/**
* host
*/privateStringhost;/**
* status
*/privateintstatus;/**
* processId
*/privateintprocessId;/**
* other resource manager appId , for example : YARN etc
*/protectedList<String>appIds;publicintgetTaskInstanceId(){returntaskInstanceId;}publicvoidsetTaskInstanceId(inttaskInstanceId){this.taskInstanceId=taskInstanceId;}publicStringgetHost(){returnhost;}publicvoidsetHost(Stringhost){this.host=host;}publicintgetStatus(){returnstatus;}publicvoidsetStatus(intstatus){this.status=status;}publicintgetProcessId(){returnprocessId;}publicvoidsetProcessId(intprocessId){this.processId=processId;}publicList<String>getAppIds(){returnappIds;}publicvoidsetAppIds(List<String>appIds){this.appIds=appIds;}/**
* package request command
*
* @return command
*/publicCommandconvert2Command(){Commandcommand=newCommand();command.setType(CommandType.TASK_KILL_RESPONSE);byte[]body=FastJsonSerializer.serialize(this);command.setBody(body);returncommand;}@OverridepublicStringtoString(){return"TaskKillResponseCommand{"+"taskInstanceId="+taskInstanceId+", host='"+host+'\''+", status="+status+", processId="+processId+", appIds="+appIds+'}';}}