Fix streaming ci (#8159)

This commit is contained in:
chaokunyang
2020-04-26 20:56:58 +08:00
committed by GitHub
parent 5bff707d20
commit 5cf49d5edd
18 changed files with 68 additions and 101 deletions
@@ -55,9 +55,9 @@ public class JobSchedulerImpl implements JobScheduler {
}
/**
* Allocating job worker resource then create job worker actor
* Allocate job workers' resource then create job workers' actor.
*
* @param executionGraph
* @param executionGraph the physical plan
*/
protected void prepareResourceAndCreateWorker(ExecutionGraph executionGraph) {
List<Container> containers = resourceManager.getRegisteredContainers();
@@ -53,7 +53,7 @@ public class WorkerLifecycleController {
RayActor<JobWorker> actor = null;
// TODO (datayjz): ray create actor
if (null == actor) {
if (null == actor) {
LOG.error("Create worker actor failed.");
return false;
}
@@ -14,9 +14,6 @@ public class ChannelUtils {
if (conf.containsKey(Config.STREAMING_JOB_NAME)) {
builder.setJobName(conf.get(Config.STREAMING_JOB_NAME));
}
if (conf.containsKey(Config.TASK_JOB_ID)) {
builder.setTaskJobId(conf.get(Config.TASK_JOB_ID));
}
if (conf.containsKey(Config.STREAMING_WORKER_NAME)) {
builder.setWorkerName(conf.get(Config.STREAMING_WORKER_NAME));
}
@@ -49,11 +49,10 @@ public abstract class StreamTask implements Runnable {
private void prepareTask() {
Map<String, String> queueConf = new HashMap<>();
worker.getConfig().forEach((k, v) -> queueConf.put(k, String.valueOf(v)));
String queueSize = (String) worker.getConfig()
String queueSize = worker.getConfig()
.getOrDefault(Config.CHANNEL_SIZE, Config.CHANNEL_SIZE_DEFAULT);
queueConf.put(Config.CHANNEL_SIZE, queueSize);
queueConf.put(Config.TASK_JOB_ID, Ray.getRuntimeContext().getCurrentJobId().toString());
String channelType = (String) worker.getConfig()
String channelType = worker.getConfig()
.getOrDefault(Config.CHANNEL_TYPE, Config.MEMORY_CHANNEL);
queueConf.put(Config.CHANNEL_TYPE, channelType);