test_class.declarator: HERDER_CONFIG = new HashMap<>()
test_class.modifier: private static final
test_class.original_string: private static final Map<String, String> HERDER_CONFIG = new HashMap<>();
test_class.type: Map<String, String>
test_class.var_name: HERDER_CONFIG
test_class.declarator: MEMBER_URL = "memberUrl"
test_class.modifier: private static final
test_class.original_string: private static final String MEMBER_URL = "memberUrl";
test_class.type: String
test_class.var_name: MEMBER_URL
test_class.declarator: CONN1 = "sourceA"
test_class.modifier: private static final
test_class.original_string: private static final String CONN1 = "sourceA";
test_class.type: String
test_class.var_name: CONN1
test_class.declarator: CONN2 = "sourceB"
test_class.modifier: private static final
test_class.original_string: private static final String CONN2 = "sourceB";
test_class.type: String
test_class.var_name: CONN2
test_class.declarator: TASK0 = new ConnectorTaskId(CONN1, 0)
test_class.modifier: private static final
test_class.original_string: private static final ConnectorTaskId TASK0 = new ConnectorTaskId(CONN1, 0);
test_class.type: ConnectorTaskId
test_class.var_name: TASK0
test_class.declarator: TASK1 = new ConnectorTaskId(CONN1, 1)
test_class.modifier: private static final
test_class.original_string: private static final ConnectorTaskId TASK1 = new ConnectorTaskId(CONN1, 1);
test_class.type: ConnectorTaskId
test_class.var_name: TASK1
test_class.declarator: TASK2 = new ConnectorTaskId(CONN1, 2)
test_class.modifier: private static final
test_class.original_string: private static final ConnectorTaskId TASK2 = new ConnectorTaskId(CONN1, 2);
test_class.type: ConnectorTaskId
test_class.var_name: TASK2
test_class.declarator: MAX_TASKS = 3
test_class.modifier: private static final
test_class.original_string: private static final Integer MAX_TASKS = 3;
test_class.type: Integer
test_class.var_name: MAX_TASKS
test_class.declarator: CONN1_CONFIG = new HashMap<>()
test_class.modifier: private static final
test_class.original_string: private static final Map<String, String> CONN1_CONFIG = new HashMap<>();
test_class.type: Map<String, String>
test_class.var_name: CONN1_CONFIG
test_class.declarator: CONN1_CONFIG_UPDATED = new HashMap<>(CONN1_CONFIG)
test_class.modifier: private static final
test_class.original_string: private static final Map<String, String> CONN1_CONFIG_UPDATED = new HashMap<>(CONN1_CONFIG);
test_class.type: Map<String, String>
test_class.var_name: CONN1_CONFIG_UPDATED
test_class.declarator: CONN2_CONFIG = new HashMap<>()
test_class.modifier: private static final
test_class.original_string: private static final Map<String, String> CONN2_CONFIG = new HashMap<>();
test_class.type: Map<String, String>
test_class.var_name: CONN2_CONFIG
test_class.declarator: TASK_CONFIG = new HashMap<>()
test_class.modifier: private static final
test_class.original_string: private static final Map<String, String> TASK_CONFIG = new HashMap<>();
test_class.type: Map<String, String>
test_class.var_name: TASK_CONFIG
test_class.declarator: TASK_CONFIGS = new ArrayList<>()
test_class.modifier: private static final
test_class.original_string: private static final List<Map<String, String>> TASK_CONFIGS = new ArrayList<>();
test_class.type: List<Map<String, String>>
test_class.var_name: TASK_CONFIGS
test_class.declarator: TASK_CONFIGS_MAP = new HashMap<>()
test_class.modifier: private static final
test_class.original_string: private static final HashMap<ConnectorTaskId, Map<String, String>> TASK_CONFIGS_MAP = new HashMap<>();
test_class.type: HashMap<ConnectorTaskId, Map<String, String>>
test_class.var_name: TASK_CONFIGS_MAP
test_class.declarator: SNAPSHOT = new ClusterConfigState(1, Collections.singletonMap(CONN1, 3),
              Collections.singletonMap(CONN1, CONN1_CONFIG), Collections.singletonMap(CONN1, TargetState.STARTED),
              TASK_CONFIGS_MAP, Collections.<String>emptySet())
test_class.modifier: private static final
test_class.original_string: private static final ClusterConfigState SNAPSHOT = new ClusterConfigState(1, Collections.singletonMap(CONN1, 3),
              Collections.singletonMap(CONN1, CONN1_CONFIG), Collections.singletonMap(CONN1, TargetState.STARTED),
              TASK_CONFIGS_MAP, Collections.<String>emptySet());
test_class.type: ClusterConfigState
test_class.var_name: SNAPSHOT
test_class.declarator: SNAPSHOT_PAUSED_CONN1 = new ClusterConfigState(1, Collections.singletonMap(CONN1, 3),
              Collections.singletonMap(CONN1, CONN1_CONFIG), Collections.singletonMap(CONN1, TargetState.PAUSED),
              TASK_CONFIGS_MAP, Collections.<String>emptySet())
test_class.modifier: private static final
test_class.original_string: private static final ClusterConfigState SNAPSHOT_PAUSED_CONN1 = new ClusterConfigState(1, Collections.singletonMap(CONN1, 3),
              Collections.singletonMap(CONN1, CONN1_CONFIG), Collections.singletonMap(CONN1, TargetState.PAUSED),
              TASK_CONFIGS_MAP, Collections.<String>emptySet());
test_class.type: ClusterConfigState
test_class.var_name: SNAPSHOT_PAUSED_CONN1
test_class.declarator: SNAPSHOT_UPDATED_CONN1_CONFIG = new ClusterConfigState(1, Collections.singletonMap(CONN1, 3),
              Collections.singletonMap(CONN1, CONN1_CONFIG_UPDATED), Collections.singletonMap(CONN1, TargetState.STARTED),
              TASK_CONFIGS_MAP, Collections.<String>emptySet())
test_class.modifier: private static final
test_class.original_string: private static final ClusterConfigState SNAPSHOT_UPDATED_CONN1_CONFIG = new ClusterConfigState(1, Collections.singletonMap(CONN1, 3),
              Collections.singletonMap(CONN1, CONN1_CONFIG_UPDATED), Collections.singletonMap(CONN1, TargetState.STARTED),
              TASK_CONFIGS_MAP, Collections.<String>emptySet());
test_class.type: ClusterConfigState
test_class.var_name: SNAPSHOT_UPDATED_CONN1_CONFIG
test_class.declarator: WORKER_ID = "localhost:8083"
test_class.modifier: private static final
test_class.original_string: private static final String WORKER_ID = "localhost:8083";
test_class.type: String
test_class.var_name: WORKER_ID
test_class.declarator: configStorage
test_class.modifier: @Mock private
test_class.original_string: @Mock private KafkaConfigBackingStore configStorage;
test_class.type: KafkaConfigBackingStore
test_class.var_name: configStorage
test_class.declarator: statusBackingStore
test_class.modifier: @Mock private
test_class.original_string: @Mock private StatusBackingStore statusBackingStore;
test_class.type: StatusBackingStore
test_class.var_name: statusBackingStore
test_class.declarator: member
test_class.modifier: @Mock private
test_class.original_string: @Mock private WorkerGroupMember member;
test_class.type: WorkerGroupMember
test_class.var_name: member
test_class.declarator: time
test_class.modifier: private
test_class.original_string: private MockTime time;
test_class.type: MockTime
test_class.var_name: time
test_class.declarator: herder
test_class.modifier: private
test_class.original_string: private DistributedHerder herder;
test_class.type: DistributedHerder
test_class.var_name: herder
test_class.declarator: worker
test_class.modifier: @Mock private
test_class.original_string: @Mock private Worker worker;
test_class.type: Worker
test_class.var_name: worker
test_class.declarator: putConnectorCallback
test_class.modifier: @Mock private
test_class.original_string: @Mock private Callback<Herder.Created<ConnectorInfo>> putConnectorCallback;
test_class.type: Callback<Herder.Created<ConnectorInfo>>
test_class.var_name: putConnectorCallback
test_class.declarator: configUpdateListener
test_class.modifier: private
test_class.original_string: private ConfigBackingStore.UpdateListener configUpdateListener;
test_class.type: ConfigBackingStore.UpdateListener
test_class.var_name: configUpdateListener
test_class.declarator: rebalanceListener
test_class.modifier: private
test_class.original_string: private WorkerRebalanceListener rebalanceListener;
test_class.type: WorkerRebalanceListener
test_class.var_name: rebalanceListener
test_class.file: connect/runtime/src/test/java/org/apache/kafka/connect/runtime/distributed/DistributedHerderTest.java
test_class.identifier: DistributedHerderTest
test_case.body: @Test
      public void testRestartTask() throws Exception {
          EasyMock.expect(worker.connectorTaskConfigs(CONN1, MAX_TASKS, null)).andStubReturn(TASK_CONFIGS);
  
          // get the initial assignment
          EasyMock.expect(member.memberId()).andStubReturn("leader");
          expectRebalance(1, Collections.<String>emptyList(), Collections.singletonList(TASK0));
          expectPostRebalanceCatchup(SNAPSHOT);
          member.poll(EasyMock.anyInt());
          PowerMock.expectLastCall();
          worker.startTask(EasyMock.eq(TASK0), EasyMock.<TaskConfig>anyObject(), EasyMock.eq(herder), EasyMock.eq(TargetState.STARTED));
          PowerMock.expectLastCall();
  
          // now handle the task restart
          member.wakeup();
          PowerMock.expectLastCall();
          member.ensureActive();
          PowerMock.expectLastCall();
          member.poll(EasyMock.anyInt());
          PowerMock.expectLastCall();
  
          EasyMock.expect(worker.ownsTask(TASK0)).andReturn(true);
  
          worker.stopAndAwaitTask(TASK0);
          PowerMock.expectLastCall();
          worker.startTask(EasyMock.eq(TASK0), EasyMock.<TaskConfig>anyObject(), EasyMock.eq(herder), EasyMock.eq(TargetState.STARTED));
          PowerMock.expectLastCall();
  
          PowerMock.replayAll();
  
          herder.tick();
          FutureCallback<Void> callback = new FutureCallback<>();
          herder.restartTask(TASK0, callback);
          herder.tick();
          callback.get(1000L, TimeUnit.MILLISECONDS);
  
          PowerMock.verifyAll();
      }
test_case.class_method_signature: DistributedHerderTest.testRestartTask()
test_case.full_signature: @Test public void testRestartTask()
test_case.identifier: testRestartTask
test_case.invocations: andStubReturn expect connectorTaskConfigs andStubReturn expect memberId expectRebalance emptyList singletonList expectPostRebalanceCatchup poll anyInt expectLastCall startTask eq anyObject eq eq expectLastCall wakeup expectLastCall ensureActive expectLastCall poll anyInt expectLastCall andReturn expect ownsTask stopAndAwaitTask expectLastCall startTask eq anyObject eq eq expectLastCall replayAll tick restartTask tick get verifyAll
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRestartTask()
focal_class.declarator: log = LoggerFactory.getLogger(DistributedHerder.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(DistributedHerder.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: RECONFIGURE_CONNECTOR_TASKS_BACKOFF_MS = 250
focal_class.modifier: private static final
focal_class.original_string: private static final long RECONFIGURE_CONNECTOR_TASKS_BACKOFF_MS = 250;
focal_class.type: long
focal_class.var_name: RECONFIGURE_CONNECTOR_TASKS_BACKOFF_MS
focal_class.declarator: time
focal_class.modifier: private final
focal_class.original_string: private final Time time;
focal_class.type: Time
focal_class.var_name: time
focal_class.declarator: workerSyncTimeoutMs
focal_class.modifier: private final
focal_class.original_string: private final int workerSyncTimeoutMs;
focal_class.type: int
focal_class.var_name: workerSyncTimeoutMs
focal_class.declarator: workerUnsyncBackoffMs
focal_class.modifier: private final
focal_class.original_string: private final int workerUnsyncBackoffMs;
focal_class.type: int
focal_class.var_name: workerUnsyncBackoffMs
focal_class.declarator: forwardRequestExecutor
focal_class.modifier: private final
focal_class.original_string: private final ExecutorService forwardRequestExecutor;
focal_class.type: ExecutorService
focal_class.var_name: forwardRequestExecutor
focal_class.declarator: member
focal_class.modifier: private final
focal_class.original_string: private final WorkerGroupMember member;
focal_class.type: WorkerGroupMember
focal_class.var_name: member
focal_class.declarator: stopping
focal_class.modifier: private final
focal_class.original_string: private final AtomicBoolean stopping;
focal_class.type: AtomicBoolean
focal_class.var_name: stopping
focal_class.declarator: stopLatch = new CountDownLatch(1)
focal_class.modifier: private final
focal_class.original_string: private final CountDownLatch stopLatch = new CountDownLatch(1);
focal_class.type: CountDownLatch
focal_class.var_name: stopLatch
focal_class.declarator: rebalanceResolved
focal_class.modifier: private
focal_class.original_string: private boolean rebalanceResolved;
focal_class.type: boolean
focal_class.var_name: rebalanceResolved
focal_class.declarator: assignment
focal_class.modifier: private
focal_class.original_string: private ConnectProtocol.Assignment assignment;
focal_class.type: ConnectProtocol.Assignment
focal_class.var_name: assignment
focal_class.declarator: canReadConfigs
focal_class.modifier: private
focal_class.original_string: private boolean canReadConfigs;
focal_class.type: boolean
focal_class.var_name: canReadConfigs
focal_class.declarator: configState
focal_class.modifier: private
focal_class.original_string: private ClusterConfigState configState;
focal_class.type: ClusterConfigState
focal_class.var_name: configState
focal_class.declarator: requests = new PriorityQueue<>()
focal_class.modifier: private final
focal_class.original_string: private final Queue<HerderRequest> requests = new PriorityQueue<>();
focal_class.type: Queue<HerderRequest>
focal_class.var_name: requests
focal_class.declarator: connectorConfigUpdates = new HashSet<>()
focal_class.modifier: private
focal_class.original_string: private Set<String> connectorConfigUpdates = new HashSet<>();
focal_class.type: Set<String>
focal_class.var_name: connectorConfigUpdates
focal_class.declarator: connectorTargetStateChanges = new HashSet<>()
focal_class.modifier: private
focal_class.original_string: private Set<String> connectorTargetStateChanges = new HashSet<>();
focal_class.type: Set<String>
focal_class.var_name: connectorTargetStateChanges
focal_class.declarator: needsReconfigRebalance
focal_class.modifier: private
focal_class.original_string: private boolean needsReconfigRebalance;
focal_class.type: boolean
focal_class.var_name: needsReconfigRebalance
focal_class.declarator: generation
focal_class.modifier: private volatile
focal_class.original_string: private volatile int generation;
focal_class.type: int
focal_class.var_name: generation
focal_class.file: connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/DistributedHerder.java
focal_class.identifier: DistributedHerder
focal_class.interfaces: implements Runnable
focal_class.class_method_signature: DistributedHerder.DistributedHerder(DistributedConfig config,
                               Time time,
                               Worker worker,
                               StatusBackingStore statusBackingStore,
                               ConfigBackingStore configBackingStore,
                               String restUrl)
focal_class.full_signature: public  DistributedHerder(DistributedConfig config,
                               Time time,
                               Worker worker,
                               StatusBackingStore statusBackingStore,
                               ConfigBackingStore configBackingStore,
                               String restUrl)
focal_class.identifier: DistributedHerder
focal_class.modifiers: public
focal_class.parameters: (DistributedConfig config,
                               Time time,
                               Worker worker,
                               StatusBackingStore statusBackingStore,
                               ConfigBackingStore configBackingStore,
                               String restUrl)
focal_class.signature:  DistributedHerder(DistributedConfig config,
                               Time time,
                               Worker worker,
                               StatusBackingStore statusBackingStore,
                               ConfigBackingStore configBackingStore,
                               String restUrl)
focal_class.class_method_signature: DistributedHerder.DistributedHerder(DistributedConfig config,
                        Worker worker,
                        String workerId,
                        StatusBackingStore statusBackingStore,
                        ConfigBackingStore configStorage,
                        WorkerGroupMember member,
                        String restUrl,
                        Time time)
focal_class.full_signature:   DistributedHerder(DistributedConfig config,
                        Worker worker,
                        String workerId,
                        StatusBackingStore statusBackingStore,
                        ConfigBackingStore configStorage,
                        WorkerGroupMember member,
                        String restUrl,
                        Time time)
focal_class.identifier: DistributedHerder
focal_class.parameters: (DistributedConfig config,
                        Worker worker,
                        String workerId,
                        StatusBackingStore statusBackingStore,
                        ConfigBackingStore configStorage,
                        WorkerGroupMember member,
                        String restUrl,
                        Time time)
focal_class.signature:  DistributedHerder(DistributedConfig config,
                        Worker worker,
                        String workerId,
                        StatusBackingStore statusBackingStore,
                        ConfigBackingStore configStorage,
                        WorkerGroupMember member,
                        String restUrl,
                        Time time)
focal_class.class_method_signature: DistributedHerder.start()
focal_class.full_signature: @Override public void start()
focal_class.identifier: start
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void start()
focal_class.class_method_signature: DistributedHerder.run()
focal_class.full_signature: @Override public void run()
focal_class.identifier: run
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void run()
focal_class.class_method_signature: DistributedHerder.tick()
focal_class.full_signature: public void tick()
focal_class.identifier: tick
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void tick()
focal_class.class_method_signature: DistributedHerder.processConnectorConfigUpdates(Set<String> connectorConfigUpdates)
focal_class.full_signature: private void processConnectorConfigUpdates(Set<String> connectorConfigUpdates)
focal_class.identifier: processConnectorConfigUpdates
focal_class.modifiers: private
focal_class.parameters: (Set<String> connectorConfigUpdates)
focal_class.return: void
focal_class.signature: void processConnectorConfigUpdates(Set<String> connectorConfigUpdates)
focal_class.class_method_signature: DistributedHerder.processTargetStateChanges(Set<String> connectorTargetStateChanges)
focal_class.full_signature: private void processTargetStateChanges(Set<String> connectorTargetStateChanges)
focal_class.identifier: processTargetStateChanges
focal_class.modifiers: private
focal_class.parameters: (Set<String> connectorTargetStateChanges)
focal_class.return: void
focal_class.signature: void processTargetStateChanges(Set<String> connectorTargetStateChanges)
focal_class.class_method_signature: DistributedHerder.halt()
focal_class.full_signature: public void halt()
focal_class.identifier: halt
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void halt()
focal_class.class_method_signature: DistributedHerder.stop()
focal_class.full_signature: @Override public void stop()
focal_class.identifier: stop
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void stop()
focal_class.class_method_signature: DistributedHerder.connectors(final Callback<Collection<String>> callback)
focal_class.full_signature: @Override public synchronized void connectors(final Callback<Collection<String>> callback)
focal_class.identifier: connectors
focal_class.modifiers: @Override public synchronized
focal_class.parameters: (final Callback<Collection<String>> callback)
focal_class.return: void
focal_class.signature: void connectors(final Callback<Collection<String>> callback)
focal_class.class_method_signature: DistributedHerder.connectorInfo(final String connName, final Callback<ConnectorInfo> callback)
focal_class.full_signature: @Override public synchronized void connectorInfo(final String connName, final Callback<ConnectorInfo> callback)
focal_class.identifier: connectorInfo
focal_class.modifiers: @Override public synchronized
focal_class.parameters: (final String connName, final Callback<ConnectorInfo> callback)
focal_class.return: void
focal_class.signature: void connectorInfo(final String connName, final Callback<ConnectorInfo> callback)
focal_class.class_method_signature: DistributedHerder.connectorConfig(String connName, final Callback<Map<String, String>> callback)
focal_class.full_signature: @Override public void connectorConfig(String connName, final Callback<Map<String, String>> callback)
focal_class.identifier: connectorConfig
focal_class.modifiers: @Override public
focal_class.parameters: (String connName, final Callback<Map<String, String>> callback)
focal_class.return: void
focal_class.signature: void connectorConfig(String connName, final Callback<Map<String, String>> callback)
focal_class.class_method_signature: DistributedHerder.putConnectorConfig(final String connName, final Map<String, String> config, final boolean allowReplace,
                                     final Callback<Created<ConnectorInfo>> callback)
focal_class.full_signature: @Override public void putConnectorConfig(final String connName, final Map<String, String> config, final boolean allowReplace,
                                     final Callback<Created<ConnectorInfo>> callback)
focal_class.identifier: putConnectorConfig
focal_class.modifiers: @Override public
focal_class.parameters: (final String connName, final Map<String, String> config, final boolean allowReplace,
                                     final Callback<Created<ConnectorInfo>> callback)
focal_class.return: void
focal_class.signature: void putConnectorConfig(final String connName, final Map<String, String> config, final boolean allowReplace,
                                     final Callback<Created<ConnectorInfo>> callback)
focal_class.class_method_signature: DistributedHerder.requestTaskReconfiguration(final String connName)
focal_class.full_signature: @Override public synchronized void requestTaskReconfiguration(final String connName)
focal_class.identifier: requestTaskReconfiguration
focal_class.modifiers: @Override public synchronized
focal_class.parameters: (final String connName)
focal_class.return: void
focal_class.signature: void requestTaskReconfiguration(final String connName)
focal_class.class_method_signature: DistributedHerder.taskConfigs(final String connName, final Callback<List<TaskInfo>> callback)
focal_class.full_signature: @Override public synchronized void taskConfigs(final String connName, final Callback<List<TaskInfo>> callback)
focal_class.identifier: taskConfigs
focal_class.modifiers: @Override public synchronized
focal_class.parameters: (final String connName, final Callback<List<TaskInfo>> callback)
focal_class.return: void
focal_class.signature: void taskConfigs(final String connName, final Callback<List<TaskInfo>> callback)
focal_class.class_method_signature: DistributedHerder.putTaskConfigs(final String connName, final List<Map<String, String>> configs, final Callback<Void> callback)
focal_class.full_signature: @Override public synchronized void putTaskConfigs(final String connName, final List<Map<String, String>> configs, final Callback<Void> callback)
focal_class.identifier: putTaskConfigs
focal_class.modifiers: @Override public synchronized
focal_class.parameters: (final String connName, final List<Map<String, String>> configs, final Callback<Void> callback)
focal_class.return: void
focal_class.signature: void putTaskConfigs(final String connName, final List<Map<String, String>> configs, final Callback<Void> callback)
focal_class.class_method_signature: DistributedHerder.restartConnector(final String connName, final Callback<Void> callback)
focal_class.full_signature: @Override public synchronized void restartConnector(final String connName, final Callback<Void> callback)
focal_class.identifier: restartConnector
focal_class.modifiers: @Override public synchronized
focal_class.parameters: (final String connName, final Callback<Void> callback)
focal_class.return: void
focal_class.signature: void restartConnector(final String connName, final Callback<Void> callback)
focal_class.class_method_signature: DistributedHerder.restartTask(final ConnectorTaskId id, final Callback<Void> callback)
focal_class.full_signature: @Override public synchronized void restartTask(final ConnectorTaskId id, final Callback<Void> callback)
focal_class.identifier: restartTask
focal_class.modifiers: @Override public synchronized
focal_class.parameters: (final ConnectorTaskId id, final Callback<Void> callback)
focal_class.return: void
focal_class.signature: void restartTask(final ConnectorTaskId id, final Callback<Void> callback)
focal_class.class_method_signature: DistributedHerder.generation()
focal_class.full_signature: @Override public int generation()
focal_class.identifier: generation
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int generation()
focal_class.class_method_signature: DistributedHerder.isLeader()
focal_class.full_signature: private boolean isLeader()
focal_class.identifier: isLeader
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isLeader()
focal_class.class_method_signature: DistributedHerder.leaderUrl()
focal_class.full_signature: private String leaderUrl()
focal_class.identifier: leaderUrl
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String leaderUrl()
focal_class.class_method_signature: DistributedHerder.handleRebalanceCompleted()
focal_class.full_signature: private boolean handleRebalanceCompleted()
focal_class.identifier: handleRebalanceCompleted
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean handleRebalanceCompleted()
focal_class.class_method_signature: DistributedHerder.readConfigToEnd(long timeoutMs)
focal_class.full_signature: private boolean readConfigToEnd(long timeoutMs)
focal_class.identifier: readConfigToEnd
focal_class.modifiers: private
focal_class.parameters: (long timeoutMs)
focal_class.return: boolean
focal_class.signature: boolean readConfigToEnd(long timeoutMs)
focal_class.class_method_signature: DistributedHerder.backoff(long ms)
focal_class.full_signature: private void backoff(long ms)
focal_class.identifier: backoff
focal_class.modifiers: private
focal_class.parameters: (long ms)
focal_class.return: void
focal_class.signature: void backoff(long ms)
focal_class.class_method_signature: DistributedHerder.startWork()
focal_class.full_signature: private void startWork()
focal_class.identifier: startWork
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void startWork()
focal_class.class_method_signature: DistributedHerder.startTask(ConnectorTaskId taskId)
focal_class.full_signature: private void startTask(ConnectorTaskId taskId)
focal_class.identifier: startTask
focal_class.modifiers: private
focal_class.parameters: (ConnectorTaskId taskId)
focal_class.return: void
focal_class.signature: void startTask(ConnectorTaskId taskId)
focal_class.class_method_signature: DistributedHerder.startConnector(String connectorName)
focal_class.full_signature: private void startConnector(String connectorName)
focal_class.identifier: startConnector
focal_class.modifiers: private
focal_class.parameters: (String connectorName)
focal_class.return: void
focal_class.signature: void startConnector(String connectorName)
focal_class.class_method_signature: DistributedHerder.reconfigureConnectorTasksWithRetry(final String connName)
focal_class.full_signature: private void reconfigureConnectorTasksWithRetry(final String connName)
focal_class.identifier: reconfigureConnectorTasksWithRetry
focal_class.modifiers: private
focal_class.parameters: (final String connName)
focal_class.return: void
focal_class.signature: void reconfigureConnectorTasksWithRetry(final String connName)
focal_class.class_method_signature: DistributedHerder.reconfigureConnector(final String connName, final Callback<Void> cb)
focal_class.full_signature: private void reconfigureConnector(final String connName, final Callback<Void> cb)
focal_class.identifier: reconfigureConnector
focal_class.modifiers: private
focal_class.parameters: (final String connName, final Callback<Void> cb)
focal_class.return: void
focal_class.signature: void reconfigureConnector(final String connName, final Callback<Void> cb)
focal_class.class_method_signature: DistributedHerder.checkRebalanceNeeded(Callback<?> callback)
focal_class.full_signature: private boolean checkRebalanceNeeded(Callback<?> callback)
focal_class.identifier: checkRebalanceNeeded
focal_class.modifiers: private
focal_class.parameters: (Callback<?> callback)
focal_class.return: boolean
focal_class.signature: boolean checkRebalanceNeeded(Callback<?> callback)
focal_class.class_method_signature: DistributedHerder.addRequest(Callable<Void> action, Callback<Void> callback)
focal_class.full_signature: private void addRequest(Callable<Void> action, Callback<Void> callback)
focal_class.identifier: addRequest
focal_class.modifiers: private
focal_class.parameters: (Callable<Void> action, Callback<Void> callback)
focal_class.return: void
focal_class.signature: void addRequest(Callable<Void> action, Callback<Void> callback)
focal_class.class_method_signature: DistributedHerder.addRequest(long delayMs, Callable<Void> action, Callback<Void> callback)
focal_class.full_signature: private void addRequest(long delayMs, Callable<Void> action, Callback<Void> callback)
focal_class.identifier: addRequest
focal_class.modifiers: private
focal_class.parameters: (long delayMs, Callable<Void> action, Callback<Void> callback)
focal_class.return: void
focal_class.signature: void addRequest(long delayMs, Callable<Void> action, Callback<Void> callback)
focal_class.class_method_signature: DistributedHerder.forwardErrorCallback(final Callback<?> callback)
focal_class.full_signature: private static final Callback<Void> forwardErrorCallback(final Callback<?> callback)
focal_class.identifier: forwardErrorCallback
focal_class.modifiers: private static final
focal_class.parameters: (final Callback<?> callback)
focal_class.return: Callback<Void>
focal_class.signature: Callback<Void> forwardErrorCallback(final Callback<?> callback)
focal_class.class_method_signature: DistributedHerder.updateDeletedConnectorStatus()
focal_class.full_signature: private void updateDeletedConnectorStatus()
focal_class.identifier: updateDeletedConnectorStatus
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void updateDeletedConnectorStatus()
focal_class.superclass: extends AbstractHerder
focal_method.body: @Override
      public synchronized void restartTask(final ConnectorTaskId id, final Callback<Void> callback) {
          addRequest(new Callable<Void>() {
              @Override
              public Void call() throws Exception {
                  if (checkRebalanceNeeded(callback))
                      return null;
  
                  if (!configState.connectors().contains(id.connector())) {
                      callback.onCompletion(new NotFoundException("Unknown connector: " + id.connector()), null);
                      return null;
                  }
  
                  if (configState.taskConfig(id) == null) {
                      callback.onCompletion(new NotFoundException("Unknown task: " + id), null);
                      return null;
                  }
  
                  if (worker.ownsTask(id)) {
                      try {
                          worker.stopAndAwaitTask(id);
                          startTask(id);
                          callback.onCompletion(null, null);
                      } catch (Throwable t) {
                          callback.onCompletion(t, null);
                      }
                  } else if (isLeader()) {
                      callback.onCompletion(new NotAssignedException("Cannot restart task since it is not assigned to this member", member.ownerUrl(id)), null);
                  } else {
                      callback.onCompletion(new NotLeaderException("Cannot restart task since it is not assigned to this member", leaderUrl()), null);
                  }
                  return null;
              }
          }, forwardErrorCallback(callback));
      }
focal_method.class_method_signature: DistributedHerder.restartTask(final ConnectorTaskId id, final Callback<Void> callback)
focal_method.full_signature: @Override public synchronized void restartTask(final ConnectorTaskId id, final Callback<Void> callback)
focal_method.identifier: restartTask
focal_method.invocations: addRequest checkRebalanceNeeded contains connectors connector onCompletion connector taskConfig onCompletion ownsTask stopAndAwaitTask startTask onCompletion onCompletion isLeader onCompletion ownerUrl onCompletion leaderUrl forwardErrorCallback
focal_method.modifiers: @Override public synchronized
focal_method.parameters: (final ConnectorTaskId id, final Callback<Void> callback)
focal_method.return: void
focal_method.signature: void restartTask(final ConnectorTaskId id, final Callback<Void> callback)