mirror of https://github.com/apache/druid.git
Merge branch 'master' into stop_task
This commit is contained in:
commit
d366eec291
|
@ -24,8 +24,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||
import com.google.common.collect.ImmutableMap;
|
||||
import com.metamx.common.logger.Logger;
|
||||
|
||||
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
@ -41,7 +39,7 @@ public class DruidServer implements Comparable
|
|||
|
||||
private final String name;
|
||||
private final ConcurrentMap<String, DruidDataSource> dataSources;
|
||||
private final Map<String, DataSegment> segments;
|
||||
private final ConcurrentMap<String, DataSegment> segments;
|
||||
|
||||
private final String host;
|
||||
private final long maxSize;
|
||||
|
@ -80,7 +78,7 @@ public class DruidServer implements Comparable
|
|||
this.tier = tier;
|
||||
|
||||
this.dataSources = new ConcurrentHashMap<String, DruidDataSource>();
|
||||
this.segments = new HashMap<String, DataSegment>();
|
||||
this.segments = new ConcurrentHashMap<String, DataSegment>();
|
||||
}
|
||||
|
||||
public String getName()
|
||||
|
@ -132,7 +130,7 @@ public class DruidServer implements Comparable
|
|||
@JsonProperty
|
||||
public Map<String, DataSegment> getSegments()
|
||||
{
|
||||
return segments;
|
||||
return ImmutableMap.copyOf(segments);
|
||||
}
|
||||
|
||||
public DataSegment getSegment(String segmentName)
|
||||
|
|
|
@ -161,7 +161,7 @@ public class WorkerTaskMonitor
|
|||
private boolean isTaskRunning(final Task task)
|
||||
{
|
||||
for (final Task runningTask : running) {
|
||||
if (runningTask.equals(task.getId())) {
|
||||
if (runningTask.getId().equals(task.getId())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue