public Job formJobWithFlow(String jobId, byte[] flowBytes, Map configBytes) throws Exception { String actuatorName = JobConfig.load(configBytes).getType(); JobActuator jobActuator = jobActuatorMap.get(actuatorName); checkArgument(jobActuator != null, "job [" + jobId + "] loading error! JobActuator:[" + actuatorName + "] not find,only " + jobActuatorMap.keySet()); JobConfig jobConfig = MAPPER.convertValue(configBytes, jobActuator.getHandle().getConfigParser()); return formJobWithFlow(jobId, flowBytes, jobActuator, jobConfig); }
public Job formJobWithFlow(String jobId, byte[] flowBytes, byte[] configBytes) throws Exception { String actuatorName = JobConfig.load(configBytes).getType(); JobActuator jobActuator = jobActuatorMap.get(actuatorName); checkArgument(jobActuator != null, "job [" + jobId + "] loading error! JobActuator:[" + actuatorName + "] not find,only " + jobActuatorMap.keySet()); JobConfig jobConfig = MAPPER.readValue(configBytes, jobActuator.getHandle().getConfigParser()); return formJobWithFlow(jobId, flowBytes, jobActuator, jobConfig); }
String actuatorName = jobConfig.getType();