SAMZA-1389: Fix ZkProcessorLatch await(timeout, TimeUnit) api.
authorShanthoosh Venkataraman <svenkataraman@linkedin.com>
Fri, 11 Aug 2017 18:51:32 +0000 (11:51 -0700)
committerJacob Maes <jmaes@linkedin.com>
Fri, 11 Aug 2017 18:51:32 +0000 (11:51 -0700)
Use passed in timeUnit value for zkClient.waitUnitExists method rather than hardcoding with  `TimeUnit.MILLISECONDS`.

Author: Shanthoosh Venkataraman <svenkataraman@linkedin.com>

Reviewers: Boris Shkolnik <boryas@apache.org>,Fred Ji <fredji97@yahoo.com>,Jagadish <jvenkatr@linkedin.com>

Closes #268 from shanthoosh/fix_zklatch_impl

samza-core/src/main/java/org/apache/samza/zk/ZkProcessorLatch.java

index ddc8976..decdd7d 100644 (file)
@@ -53,8 +53,8 @@ public class ZkProcessorLatch implements Latch {
   }
 
   @Override
-  public void await(long timeout, TimeUnit tu) {
-    zkUtils.getZkClient().waitUntilExists(targetPath, TimeUnit.MILLISECONDS, timeout);
+  public void await(long timeout, TimeUnit timeUnit) {
+    zkUtils.getZkClient().waitUntilExists(targetPath, timeUnit, timeout);
   }
 
   @Override