dos.writeBoolean(fn.getDeployedJobSpecId() != null); if (fn.getDeployedJobSpecId() != null) { fn.getDeployedJobSpecId().writeFields(dos);
return new StartTasksFunction(deploymentId, jobId, planBytes, taskDescriptors, connectorPolicies, flags, jobParameters, deployedJobSpecId, jobStartTime);
CCNCFunctions.StartTasksFunction stf = (CCNCFunctions.StartTasksFunction) fn; ncs.getWorkQueue() .schedule(new StartTasksWork(ncs, stf.getDeploymentId(), stf.getJobId(), stf.getPlanBytes(), stf.getTaskDescriptors(), stf.getConnectorPolicies(), stf.getFlags(), stf.getJobParameters(), stf.getDeployedJobSpecId(), stf.getJobStartTime())); return; case ABORT_TASKS:
private Object deserialize(byte fid, ByteBuffer buffer, int length) throws Exception { switch (FunctionId.values()[fid]) { case REGISTER_PARTITION_PROVIDER: return RegisterPartitionProviderFunction.deserialize(buffer, length); case REGISTER_PARTITION_REQUEST: return RegisterPartitionRequestFunction.deserialize(buffer, length); case REPORT_PARTITION_AVAILABILITY: return ReportPartitionAvailabilityFunction.deserialize(buffer, length); case NODE_HEARTBEAT: return NodeHeartbeatFunction.deserialize(buffer, length); case START_TASKS: return StartTasksFunction.deserialize(buffer, length); case NOTIFY_TASK_COMPLETE: return NotifyTaskCompleteFunction.deserialize(buffer, length); case NOTIFY_JOBLET_CLEANUP: return NotifyJobletCleanupFunction.deserialize(buffer, length); case CLEANUP_JOBLET: return CleanupJobletFunction.deserialize(buffer, length); } return javaSerde.deserializeObject(buffer, length); } }
@Override public void startTasks(DeploymentId deploymentId, JobId jobId, byte[] planBytes, List<TaskAttemptDescriptor> taskDescriptors, Map<ConnectorDescriptorId, IConnectorPolicy> connectorPolicies, Set<JobFlag> flags, Map<byte[], byte[]> jobParameters, DeployedJobSpecId deployedJobSpecId, long jobStartTime) throws Exception { StartTasksFunction stf = new StartTasksFunction(deploymentId, jobId, planBytes, taskDescriptors, connectorPolicies, flags, jobParameters, deployedJobSpecId, jobStartTime); ipcHandle.send(-1, stf, null); }