fix auto reset - pause task instead of putting thread to sleep (#4244)

This commit is contained in:
Parag Jain 2017-05-08 17:08:25 -05:00 committed by Fangjin Yang
parent eb8e1b0a97
commit 1fd177039d

View File

@ -1063,10 +1063,10 @@ public class KafkaIndexTask extends AbstractTask implements ChatHandler
.emit();
// wait for being killed by supervisor
try {
Thread.sleep(Long.MAX_VALUE);
pause(-1);
}
catch (InterruptedException e) {
throw new RuntimeException("Got interrupted while waiting to be killed");
throw new RuntimeException("Got interrupted while pausing task");
}
} else {
log.makeAlert("Failed to send reset request for partitions [%s]", partitionOffsetMap.keySet()).emit();