You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@twill.apache.org by ch...@apache.org on 2015/04/23 06:30:21 UTC

incubator-twill git commit: TWILL-128 Change the ZKBrokerService to be public so it could be used outside the package.

Repository: incubator-twill
Updated Branches:
  refs/heads/master f66a32d5d -> 17a8ba64f


TWILL-128 Change the ZKBrokerService to be public so it could be used outside the package.

Make ZKBrokerService to have public modifier so it could be used outside the package private.

The BrokerService interface that ZKBrokerService implemented is already public so it would be
helpful to make this implementation to be public so it could be used by external projects or code
when using Apache Kafka with Simple Customer APIs to resolve leader.

Signed-off-by: Terence Yim <ch...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-twill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-twill/commit/17a8ba64
Tree: http://git-wip-us.apache.org/repos/asf/incubator-twill/tree/17a8ba64
Diff: http://git-wip-us.apache.org/repos/asf/incubator-twill/diff/17a8ba64

Branch: refs/heads/master
Commit: 17a8ba64fb28246c9e864cc3d7241f6f7d9684e3
Parents: f66a32d
Author: hsaputra <hs...@apache.org>
Authored: Wed Apr 22 11:15:55 2015 -0700
Committer: Terence Yim <ch...@apache.org>
Committed: Wed Apr 22 21:30:01 2015 -0700

----------------------------------------------------------------------
 .../org/apache/twill/internal/kafka/client/ZKBrokerService.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-twill/blob/17a8ba64/twill-core/src/main/java/org/apache/twill/internal/kafka/client/ZKBrokerService.java
----------------------------------------------------------------------
diff --git a/twill-core/src/main/java/org/apache/twill/internal/kafka/client/ZKBrokerService.java b/twill-core/src/main/java/org/apache/twill/internal/kafka/client/ZKBrokerService.java
index 86a0955..2ffc604 100644
--- a/twill-core/src/main/java/org/apache/twill/internal/kafka/client/ZKBrokerService.java
+++ b/twill-core/src/main/java/org/apache/twill/internal/kafka/client/ZKBrokerService.java
@@ -63,7 +63,7 @@ import java.util.concurrent.atomic.AtomicReference;
  * A {@link BrokerService} that watches kafka zk nodes for updates of broker lists and leader for
  * each topic partition.
  */
-final class ZKBrokerService extends AbstractIdleService implements BrokerService {
+public final class ZKBrokerService extends AbstractIdleService implements BrokerService {
 
   private static final Logger LOG = LoggerFactory.getLogger(ZKBrokerService.class);
   private static final String BROKER_IDS_PATH = "/brokers/ids";
@@ -91,7 +91,7 @@ final class ZKBrokerService extends AbstractIdleService implements BrokerService
   private ExecutorService executorService;
   private Supplier<Iterable<BrokerInfo>> brokerList;
 
-  ZKBrokerService(ZKClient zkClient) {
+  public ZKBrokerService(ZKClient zkClient) {
     this.zkClient = zkClient;
     this.brokerInfos = CacheBuilder.newBuilder().build(createCacheLoader(new CacheInvalidater<BrokerId>() {
       @Override