/*
* 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.List;importjava.util.concurrent.atomic.AtomicLong;publicclassExecuteTaskRequestCommandimplementsSerializable{privateStringtaskId;privateStringattemptId;privateStringapplicationName;privateStringgroupName;privateStringtaskName;privateintconnectorPort;privateStringdescription;privateStringclassName;privateStringmethodName;privateStringparams;privateList<Integer>shardItems;publicList<Integer>getShardItems(){returnshardItems;}publicvoidsetShardItems(List<Integer>shardItems){this.shardItems=shardItems;}publicStringgetParams(){returnparams;}publicvoidsetParams(Stringparams){this.params=params;}publicStringgetTaskId(){returntaskId;}publicvoidsetTaskId(StringtaskId){this.taskId=taskId;}publicStringgetApplicationName(){returnapplicationName;}publicvoidsetApplicationName(StringapplicationName){this.applicationName=applicationName;}publicStringgetGroupName(){returngroupName;}publicvoidsetGroupName(StringgroupName){this.groupName=groupName;}publicStringgetTaskName(){returntaskName;}publicvoidsetTaskName(StringtaskName){this.taskName=taskName;}publicintgetConnectorPort(){returnconnectorPort;}publicvoidsetConnectorPort(intconnectorPort){this.connectorPort=connectorPort;}publicStringgetDescription(){returndescription;}publicvoidsetDescription(Stringdescription){this.description=description;}publicStringgetClassName(){returnclassName;}publicvoidsetClassName(StringclassName){this.className=className;}publicStringgetMethodName(){returnmethodName;}publicvoidsetMethodName(StringmethodName){this.methodName=methodName;}publicCommandconvert2Command(){Commandcommand=newCommand();command.setType(CommandType.EXECUTE_TASK_REQUEST);byte[]body=FastJsonSerializer.serialize(this);command.setBody(body);returncommand;}}
\ 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.List;importjava.util.concurrent.atomic.AtomicLong;/**
* execute task request command
*/publicclassExecuteTaskRequestCommandimplementsSerializable{/**
* task id
*/privateStringtaskId;/**
* attempt id
*/privateStringattemptId;/**
* application name
*/privateStringapplicationName;/**
* group name
*/privateStringgroupName;/**
* task name
*/privateStringtaskName;/**
* connector port
*/privateintconnectorPort;/**
* description info
*/privateStringdescription;/**
* class name
*/privateStringclassName;/**
* method name
*/privateStringmethodName;/**
* parameters
*/privateStringparams;/**
* shard itemds
*/privateList<Integer>shardItems;publicList<Integer>getShardItems(){returnshardItems;}publicvoidsetShardItems(List<Integer>shardItems){this.shardItems=shardItems;}publicStringgetParams(){returnparams;}publicvoidsetParams(Stringparams){this.params=params;}publicStringgetTaskId(){returntaskId;}publicvoidsetTaskId(StringtaskId){this.taskId=taskId;}publicStringgetApplicationName(){returnapplicationName;}publicvoidsetApplicationName(StringapplicationName){this.applicationName=applicationName;}publicStringgetGroupName(){returngroupName;}publicvoidsetGroupName(StringgroupName){this.groupName=groupName;}publicStringgetTaskName(){returntaskName;}publicvoidsetTaskName(StringtaskName){this.taskName=taskName;}publicintgetConnectorPort(){returnconnectorPort;}publicvoidsetConnectorPort(intconnectorPort){this.connectorPort=connectorPort;}publicStringgetDescription(){returndescription;}publicvoidsetDescription(Stringdescription){this.description=description;}publicStringgetClassName(){returnclassName;}publicvoidsetClassName(StringclassName){this.className=className;}publicStringgetMethodName(){returnmethodName;}publicvoidsetMethodName(StringmethodName){this.methodName=methodName;}/**
* package request command
*
* @return command
*/publicCommandconvert2Command(){Commandcommand=newCommand();command.setType(CommandType.EXECUTE_TASK_REQUEST);byte[]body=FastJsonSerializer.serialize(this);command.setBody(body);returncommand;}}
/*
* 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.concurrent.atomic.AtomicLong;publicclassExecuteTaskResponseCommandimplementsSerializable{privateStringtaskId;privateStringattemptId;privateObjectresult;privatelongreceivedTime;privateintexecuteCount;privatelongexecuteTime;publicStringgetAttemptId(){returnattemptId;}publicvoidsetAttemptId(StringattemptId){this.attemptId=attemptId;}publicStringgetTaskId(){returntaskId;}publicvoidsetTaskId(StringtaskId){this.taskId=taskId;}publicObjectgetResult(){returnresult;}publicvoidsetResult(Objectresult){this.result=result;}publiclonggetReceivedTime(){returnreceivedTime;}publicvoidsetReceivedTime(longreceivedTime){this.receivedTime=receivedTime;}publicintgetExecuteCount(){returnexecuteCount;}publicvoidsetExecuteCount(intexecuteCount){this.executeCount=executeCount;}publiclonggetExecuteTime(){returnexecuteTime;}publicvoidsetExecuteTime(longexecuteTime){this.executeTime=executeTime;}publicCommandconvert2Command(longopaque){Commandcommand=newCommand();command.setType(CommandType.EXECUTE_TASK_RESPONSE);byte[]body=FastJsonSerializer.serialize(this);command.setBody(body);returncommand;}}
\ 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.concurrent.atomic.AtomicLong;/**
* execute task response command
*/publicclassExecuteTaskResponseCommandimplementsSerializable{/**
* task id
*/privateStringtaskId;/**
* attempt id
*/privateStringattemptId;/**
* return result
*/privateObjectresult;/**
* received time
*/privatelongreceivedTime;/**
* execute count
*/privateintexecuteCount;/**
* execute time
*/privatelongexecuteTime;publicStringgetAttemptId(){returnattemptId;}publicvoidsetAttemptId(StringattemptId){this.attemptId=attemptId;}publicStringgetTaskId(){returntaskId;}publicvoidsetTaskId(StringtaskId){this.taskId=taskId;}publicObjectgetResult(){returnresult;}publicvoidsetResult(Objectresult){this.result=result;}publiclonggetReceivedTime(){returnreceivedTime;}publicvoidsetReceivedTime(longreceivedTime){this.receivedTime=receivedTime;}publicintgetExecuteCount(){returnexecuteCount;}publicvoidsetExecuteCount(intexecuteCount){this.executeCount=executeCount;}publiclonggetExecuteTime(){returnexecuteTime;}publicvoidsetExecuteTime(longexecuteTime){this.executeTime=executeTime;}publicCommandconvert2Command(longopaque){Commandcommand=newCommand();command.setType(CommandType.EXECUTE_TASK_RESPONSE);byte[]body=FastJsonSerializer.serialize(this);command.setBody(body);returncommand;}}