Skip to content

Commit

Permalink
fix-3237 (apache#3244)
Browse files Browse the repository at this point in the history
DruidBroker use FilteredServerInventoryView instead of
ServerInventoryView
  • Loading branch information
nishantmonu51 authored and drcrallen committed Jul 14, 2016
1 parent 6a03a0c commit a1715c8
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,20 @@

package io.druid.server.coordination.broker;

import com.google.common.base.Predicates;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.inject.Inject;
import com.metamx.common.Pair;
import com.metamx.common.lifecycle.LifecycleStart;
import com.metamx.common.lifecycle.LifecycleStop;
import io.druid.client.ServerInventoryView;
import io.druid.client.FilteredServerInventoryView;
import io.druid.client.ServerView;
import io.druid.curator.discovery.ServiceAnnouncer;
import io.druid.guice.ManageLifecycle;
import io.druid.guice.annotations.Self;
import io.druid.server.DruidNode;
import io.druid.server.coordination.DruidServerMetadata;
import io.druid.timeline.DataSegment;

@ManageLifecycle
public class DruidBroker
Expand All @@ -39,7 +43,7 @@ public class DruidBroker

@Inject
public DruidBroker(
final ServerInventoryView serverInventoryView,
final FilteredServerInventoryView serverInventoryView,
final @Self DruidNode self,
final ServiceAnnouncer serviceAnnouncer
)
Expand All @@ -57,7 +61,9 @@ public ServerView.CallbackAction segmentViewInitialized()
serviceAnnouncer.announce(self);
return ServerView.CallbackAction.UNREGISTER;
}
}
},
// We are not interested in any segment callbacks except view initialization
Predicates.<Pair<DruidServerMetadata, DataSegment>>alwaysFalse()
);
}

Expand Down

0 comments on commit a1715c8

Please sign in to comment.