mirror of https://github.com/apache/druid.git
more logging
This commit is contained in:
parent
360c6a1df1
commit
53021c2e35
|
@ -414,8 +414,9 @@ public class RemoteTaskRunner implements TaskRunner
|
|||
@Override
|
||||
public void childEvent(CuratorFramework client, PathChildrenCacheEvent event) throws Exception
|
||||
{
|
||||
|
||||
try {
|
||||
log.info("Event[%s]: %s", event.getType(), event.getData().getPath());
|
||||
|
||||
if (event.getType().equals(PathChildrenCacheEvent.Type.CHILD_ADDED) ||
|
||||
event.getType().equals(PathChildrenCacheEvent.Type.CHILD_UPDATED)) {
|
||||
final String taskId = ZKPaths.getNodeFromPath(event.getData().getPath());
|
||||
|
|
|
@ -100,6 +100,7 @@ public class TaskMasterLifecycle
|
|||
leaderLifecycle.addManagedInstance(taskRunner);
|
||||
Initialization.makeServiceDiscoveryClient(curator, serviceDiscoveryConfig, leaderLifecycle);
|
||||
leaderLifecycle.addManagedInstance(taskConsumer);
|
||||
leaderLifecycle.addManagedInstance(scheduler);
|
||||
|
||||
leading = true;
|
||||
|
||||
|
|
|
@ -71,6 +71,8 @@ public class ResourceManagementScheduler
|
|||
return;
|
||||
}
|
||||
|
||||
log.info("Started Resource Management Scheduler");
|
||||
|
||||
ScheduledExecutors.scheduleAtFixedRate(
|
||||
exec,
|
||||
config.getProvisionResourcesDuration(),
|
||||
|
@ -79,6 +81,7 @@ public class ResourceManagementScheduler
|
|||
@Override
|
||||
public void run()
|
||||
{
|
||||
log.info("Running resource management strategy");
|
||||
resourceManagementStrategy.doProvision(
|
||||
taskRunner.getPendingTasks(),
|
||||
taskRunner.getWorkers()
|
||||
|
@ -123,6 +126,7 @@ public class ResourceManagementScheduler
|
|||
if (!started) {
|
||||
return;
|
||||
}
|
||||
log.info("Stopping Resource Management Scheduler");
|
||||
exec.shutdown();
|
||||
started = false;
|
||||
}
|
||||
|
|
8
pom.xml
8
pom.xml
|
@ -115,22 +115,22 @@
|
|||
<dependency>
|
||||
<groupId>com.netflix.curator</groupId>
|
||||
<artifactId>curator-client</artifactId>
|
||||
<version>1.2.2</version>
|
||||
<version>1.3.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.netflix.curator</groupId>
|
||||
<artifactId>curator-framework</artifactId>
|
||||
<version>1.2.2</version>
|
||||
<version>1.3.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.netflix.curator</groupId>
|
||||
<artifactId>curator-recipes</artifactId>
|
||||
<version>1.2.2</version>
|
||||
<version>1.3.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.netflix.curator</groupId>
|
||||
<artifactId>curator-x-discovery</artifactId>
|
||||
<version>1.2.2</version>
|
||||
<version>1.3.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.netflix.curator</groupId>
|
||||
|
|
Loading…
Reference in New Issue