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 DataSegmentAnnouncer dataSegmentAnnouncer;
if ("curator".equalsIgnoreCase(announcerType)) {
dataSegmentAnnouncer = new CuratorDataSegmentAnnouncer(
getDruidServerMetadata(),
getZkPaths(),
announcer,
getJsonMapper()
);
} else if ("batch".equalsIgnoreCase(announcerType)) {
if ("batch".equalsIgnoreCase(announcerType)) {
dataSegmentAnnouncer = new BatchingCuratorDataSegmentAnnouncer(
getDruidServerMetadata(),
config,
announcer,
getJsonMapper()
);
} else if ("multiple".equalsIgnoreCase(announcerType)) {
} else if ("legacy".equalsIgnoreCase(announcerType)) {
dataSegmentAnnouncer = new MultipleDataSegmentAnnouncerDataSegmentAnnouncer(
Arrays.<AbstractDataSegmentAnnouncer>asList(
new BatchingCuratorDataSegmentAnnouncer(

View File

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