mirror of https://github.com/apache/druid.git
Merge pull request #2581 from gianm/fix-deadlock
CliPeon: Fix deadlock on startup by eagerly creating ExecutorLifecycle, ChatHandlerResource.
This commit is contained in:
commit
612e327426
|
@ -55,6 +55,7 @@ public class ChatHandlerServerModule implements Module
|
|||
public void configure(Binder binder)
|
||||
{
|
||||
Jerseys.addResource(binder, ChatHandlerResource.class);
|
||||
LifecycleModule.register(binder, ChatHandlerResource.class);
|
||||
|
||||
if (properties.containsKey(MAX_CHAT_REQUESTS_PROPERTY)) {
|
||||
final int maxRequests = Integer.parseInt(properties.getProperty(MAX_CHAT_REQUESTS_PROPERTY));
|
||||
|
|
|
@ -72,7 +72,6 @@ import io.druid.segment.loading.OmniDataSegmentMover;
|
|||
import io.druid.segment.loading.SegmentLoaderConfig;
|
||||
import io.druid.segment.loading.StorageLocationConfig;
|
||||
import io.druid.segment.realtime.firehose.ChatHandlerProvider;
|
||||
import io.druid.segment.realtime.firehose.ChatHandlerResource;
|
||||
import io.druid.segment.realtime.firehose.NoopChatHandlerProvider;
|
||||
import io.druid.segment.realtime.firehose.ServiceAnnouncingChatHandlerProvider;
|
||||
import io.druid.segment.realtime.plumber.CoordinatorBasedSegmentHandoffNotifierConfig;
|
||||
|
@ -157,6 +156,7 @@ public class CliPeon extends GuiceRunnable
|
|||
binder.bind(DataSegmentArchiver.class).to(OmniDataSegmentArchiver.class).in(LazySingleton.class);
|
||||
|
||||
binder.bind(ExecutorLifecycle.class).in(ManageLifecycle.class);
|
||||
LifecycleModule.register(binder, ExecutorLifecycle.class);
|
||||
binder.bind(ExecutorLifecycleConfig.class).toInstance(
|
||||
new ExecutorLifecycleConfig()
|
||||
.setTaskFile(new File(taskAndStatusFile.get(0)))
|
||||
|
|
Loading…
Reference in New Issue