samza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] Sanil15 commented on a change in pull request #917: Adding bounded-time start of SamzaContainer from StreamProcessor
Date Thu, 14 Feb 2019 02:36:06 GMT
Sanil15 commented on a change in pull request #917: Adding bounded-time start of SamzaContainer
from StreamProcessor
URL: https://github.com/apache/samza/pull/917#discussion_r256671506
 
 

 ##########
 File path: samza-core/src/main/java/org/apache/samza/processor/StreamProcessor.java
 ##########
 @@ -401,11 +403,29 @@ public void onJobModelExpired() {
       public void onNewJobModel(String processorId, JobModel jobModel) {
         synchronized (lock) {
           if (state == State.IN_REBALANCE) {
+            containerStartLatch = new CountDownLatch(1);
             containerShutdownLatch = new CountDownLatch(1);
             container = createSamzaContainer(processorId, jobModel);
             container.setContainerListener(new ContainerListener());
             LOGGER.info("Starting the container: {} for the stream processor: {}.", container,
processorId);
             containerExcecutorService.submit(container);
+
+            try {
 
 Review comment:
   Consider this: Move try inside if and then move:
   
   `state = State.STOPPED;
   jobCoordinator.stop();
   processorListener.afterFailure(new TimeoutException("Container start timed out after "+taskStartMs+
" ms"));`
   
   inside a finally block
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message