From 8b398533cb0262b40b73370cdfbe6f90933415b6 Mon Sep 17 00:00:00 2001 From: fjy Date: Mon, 3 Feb 2014 16:45:59 -0800 Subject: [PATCH] fix more bugs with determining what is assignable and what is not --- .../main/java/io/druid/client/CachingClusteredClient.java | 2 +- server/src/main/java/io/druid/client/DruidServer.java | 5 ----- .../io/druid/segment/realtime/plumber/RealtimePlumber.java | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/server/src/main/java/io/druid/client/CachingClusteredClient.java b/server/src/main/java/io/druid/client/CachingClusteredClient.java index f5b868e30fb..dacfc7938ef 100644 --- a/server/src/main/java/io/druid/client/CachingClusteredClient.java +++ b/server/src/main/java/io/druid/client/CachingClusteredClient.java @@ -313,7 +313,7 @@ public class CachingClusteredClient implements QueryRunner final MultipleSpecificSegmentSpec segmentSpec = new MultipleSpecificSegmentSpec(descriptors); List intervals = segmentSpec.getIntervals(); - if (server.isRealtime() || !populateCache || isBySegment) { + if (!server.isAssignable() || !populateCache || isBySegment) { resultSeqToAdd = clientQueryable.run(query.withQuerySegmentSpec(segmentSpec)); } else { resultSeqToAdd = toolChest.mergeSequences( diff --git a/server/src/main/java/io/druid/client/DruidServer.java b/server/src/main/java/io/druid/client/DruidServer.java index 3a074f9596a..c33b9270b57 100644 --- a/server/src/main/java/io/druid/client/DruidServer.java +++ b/server/src/main/java/io/druid/client/DruidServer.java @@ -141,11 +141,6 @@ public class DruidServer implements Comparable return getType().equalsIgnoreCase("historical") || getType().equalsIgnoreCase("bridge"); } - public boolean isRealtime() - { - return getType().equalsIgnoreCase("realtime"); - } - public DataSegment getSegment(String segmentName) { return segments.get(segmentName); diff --git a/server/src/main/java/io/druid/segment/realtime/plumber/RealtimePlumber.java b/server/src/main/java/io/druid/segment/realtime/plumber/RealtimePlumber.java index 2b4d1f5f44b..62b3d3d5f6d 100644 --- a/server/src/main/java/io/druid/segment/realtime/plumber/RealtimePlumber.java +++ b/server/src/main/java/io/druid/segment/realtime/plumber/RealtimePlumber.java @@ -704,7 +704,7 @@ public class RealtimePlumber implements Plumber return ServerView.CallbackAction.UNREGISTER; } - if (server.isRealtime()) { + if (!server.isAssignable()) { return ServerView.CallbackAction.CONTINUE; }