code review fixes

This commit is contained in:
fjy 2013-07-22 14:14:21 -07:00
parent f5536ed010
commit b6aeb5b376
2 changed files with 3 additions and 10 deletions

View File

@ -435,21 +435,14 @@ public abstract class QueryableNode<T extends QueryableNode> extends Registering
final String announcerType = config.getAnnouncerType(); final String announcerType = config.getAnnouncerType();
final DataSegmentAnnouncer dataSegmentAnnouncer; final DataSegmentAnnouncer dataSegmentAnnouncer;
if ("curator".equalsIgnoreCase(announcerType)) { if ("batch".equalsIgnoreCase(announcerType)) {
dataSegmentAnnouncer = new CuratorDataSegmentAnnouncer(
getDruidServerMetadata(),
getZkPaths(),
announcer,
getJsonMapper()
);
} else if ("batch".equalsIgnoreCase(announcerType)) {
dataSegmentAnnouncer = new BatchingCuratorDataSegmentAnnouncer( dataSegmentAnnouncer = new BatchingCuratorDataSegmentAnnouncer(
getDruidServerMetadata(), getDruidServerMetadata(),
config, config,
announcer, announcer,
getJsonMapper() getJsonMapper()
); );
} else if ("multiple".equalsIgnoreCase(announcerType)) { } else if ("legacy".equalsIgnoreCase(announcerType)) {
dataSegmentAnnouncer = new MultipleDataSegmentAnnouncerDataSegmentAnnouncer( dataSegmentAnnouncer = new MultipleDataSegmentAnnouncerDataSegmentAnnouncer(
Arrays.<AbstractDataSegmentAnnouncer>asList( Arrays.<AbstractDataSegmentAnnouncer>asList(
new BatchingCuratorDataSegmentAnnouncer( new BatchingCuratorDataSegmentAnnouncer(

View File

@ -16,6 +16,6 @@ public abstract class ZkDataSegmentAnnouncerConfig extends ZkPathsConfig
public abstract long getMaxNumBytes(); public abstract long getMaxNumBytes();
@Config("druid.announcer.type") @Config("druid.announcer.type")
@Default("curator") @Default("legacy")
public abstract String getAnnouncerType(); public abstract String getAnnouncerType();
} }