mirror of
https://github.com/scxwhite/hera.git
synced 2025-05-02 23:30:48 +08:00
fix npe
This commit is contained in:
parent
fb534b03e2
commit
7fe633e283
@ -106,6 +106,7 @@ public class Master {
|
||||
HeraLog.info("refresh hostGroup cache");
|
||||
});
|
||||
}
|
||||
|
||||
public boolean isTaskLimit() {
|
||||
return masterRunJob.isTaskLimit();
|
||||
}
|
||||
@ -251,6 +252,7 @@ public class Master {
|
||||
|
||||
/**
|
||||
* 拓扑排序
|
||||
*
|
||||
* @param jobDetails
|
||||
* @return
|
||||
*/
|
||||
@ -261,6 +263,7 @@ public class Master {
|
||||
Map<Integer, Set<Integer>> downStreamJobInfo = Maps.newHashMap();
|
||||
for (HeraJob heraJob : jobDetails) {
|
||||
jobInfo.put(heraJob.getId(), heraJob);
|
||||
if (heraJob.getDependencies() != null) {
|
||||
HashSet<String> depList = Sets.newHashSet(Splitter.on(",").split(heraJob.getDependencies()));
|
||||
for (String dep : depList) {
|
||||
if (!Strings.isNullOrEmpty(dep)) {
|
||||
@ -272,7 +275,7 @@ public class Master {
|
||||
downStreamJobInfo.put(Integer.valueOf(dep), downStreamJobList);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (!downStreamJobInfo.containsKey(heraJob.getId())) {
|
||||
downStreamJobInfo.put(heraJob.getId(), Sets.newHashSet());
|
||||
}
|
||||
@ -579,7 +582,6 @@ public class Master {
|
||||
}
|
||||
|
||||
|
||||
|
||||
public boolean scanQueue(BlockingQueue<JobElement> queue) throws InterruptedException {
|
||||
if (!queue.isEmpty()) {
|
||||
JobElement jobElement = queue.take();
|
||||
@ -1032,6 +1034,7 @@ public class Master {
|
||||
|
||||
/**
|
||||
* 输出批次号
|
||||
*
|
||||
* @param actionId
|
||||
* @param cronPeriod 周期
|
||||
* @param cronInterval 间隔
|
||||
|
Loading…
Reference in New Issue
Block a user