test_class.file: connect/runtime/src/test/java/org/apache/kafka/connect/runtime/AbstractHerderTest.java
test_class.identifier: AbstractHerderTest
test_class.superclass: extends EasyMockSupport
test_case.body: @Test
      public void taskStatus() {
          Worker worker = null;
          ConnectorTaskId taskId = new ConnectorTaskId("connector", 0);
          String workerId = "workerId";
  
          ConfigBackingStore configStore = strictMock(ConfigBackingStore.class);
          StatusBackingStore statusStore = strictMock(StatusBackingStore.class);
  
          AbstractHerder herder = partialMockBuilder(AbstractHerder.class)
                  .withConstructor(Worker.class, String.class, StatusBackingStore.class, ConfigBackingStore.class)
                  .withArgs(worker, workerId, statusStore, configStore)
                  .addMockedMethod("generation")
                  .createMock();
  
          EasyMock.expect(herder.generation()).andStubReturn(5);
  
          final Capture<TaskStatus> statusCapture = EasyMock.newCapture();
          statusStore.putSafe(EasyMock.capture(statusCapture));
          EasyMock.expectLastCall();
  
          EasyMock.expect(statusStore.get(taskId)).andAnswer(new IAnswer<TaskStatus>() {
              @Override
              public TaskStatus answer() throws Throwable {
                  return statusCapture.getValue();
              }
          });
  
          replayAll();
  
          herder.onFailure(taskId, new RuntimeException());
  
          ConnectorStateInfo.TaskState taskState = herder.taskStatus(taskId);
          assertEquals(workerId, taskState.workerId());
          assertEquals("FAILED", taskState.state());
          assertEquals(0, taskState.id());
          assertNotNull(taskState.trace());
  
          verifyAll();
      }
test_case.class_method_signature: AbstractHerderTest.taskStatus()
test_case.full_signature: @Test public void taskStatus()
test_case.identifier: taskStatus
test_case.invocations: strictMock strictMock createMock addMockedMethod withArgs withConstructor partialMockBuilder andStubReturn expect generation newCapture putSafe capture expectLastCall andAnswer expect get getValue replayAll onFailure taskStatus assertEquals workerId assertEquals state assertEquals id assertNotNull trace verifyAll
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void taskStatus()
focal_class.declarator: workerId
focal_class.modifier: private final
focal_class.original_string: private final String workerId;
focal_class.type: String
focal_class.var_name: workerId
focal_class.declarator: worker
focal_class.modifier: protected final
focal_class.original_string: protected final Worker worker;
focal_class.type: Worker
focal_class.var_name: worker
focal_class.declarator: statusBackingStore
focal_class.modifier: protected final
focal_class.original_string: protected final StatusBackingStore statusBackingStore;
focal_class.type: StatusBackingStore
focal_class.var_name: statusBackingStore
focal_class.declarator: configBackingStore
focal_class.modifier: protected final
focal_class.original_string: protected final ConfigBackingStore configBackingStore;
focal_class.type: ConfigBackingStore
focal_class.var_name: configBackingStore
focal_class.declarator: tempConnectors = new ConcurrentHashMap<>()
focal_class.modifier: private
focal_class.original_string: private Map<String, Connector> tempConnectors = new ConcurrentHashMap<>();
focal_class.type: Map<String, Connector>
focal_class.var_name: tempConnectors
focal_class.declarator: validConnectorPlugins
focal_class.modifier: private static
focal_class.original_string: private static List<ConnectorPluginInfo> validConnectorPlugins;
focal_class.type: List<ConnectorPluginInfo>
focal_class.var_name: validConnectorPlugins
focal_class.declarator: LOCK = new Object()
focal_class.modifier: private static final
focal_class.original_string: private static final Object LOCK = new Object();
focal_class.type: Object
focal_class.var_name: LOCK
focal_class.declarator: classPathTraverser
focal_class.modifier: private
focal_class.original_string: private Thread classPathTraverser;
focal_class.type: Thread
focal_class.var_name: classPathTraverser
focal_class.declarator: EXCLUDES = Arrays.asList(
              VerifiableSourceConnector.class, VerifiableSinkConnector.class,
              MockConnector.class, MockSourceConnector.class, MockSinkConnector.class)
focal_class.modifier: private static final
focal_class.original_string: private static final List<Class<? extends Connector>> EXCLUDES = Arrays.asList(
              VerifiableSourceConnector.class, VerifiableSinkConnector.class,
              MockConnector.class, MockSourceConnector.class, MockSinkConnector.class);
focal_class.type: List<Class<? extends Connector>>
focal_class.var_name: EXCLUDES
focal_class.file: connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractHerder.java
focal_class.identifier: AbstractHerder
focal_class.interfaces: implements Herder, TaskStatus.Listener, ConnectorStatus.Listener
focal_class.class_method_signature: AbstractHerder.AbstractHerder(Worker worker,
                            String workerId,
                            StatusBackingStore statusBackingStore,
                            ConfigBackingStore configBackingStore)
focal_class.full_signature: public  AbstractHerder(Worker worker,
                            String workerId,
                            StatusBackingStore statusBackingStore,
                            ConfigBackingStore configBackingStore)
focal_class.identifier: AbstractHerder
focal_class.modifiers: public
focal_class.parameters: (Worker worker,
                            String workerId,
                            StatusBackingStore statusBackingStore,
                            ConfigBackingStore configBackingStore)
focal_class.signature:  AbstractHerder(Worker worker,
                            String workerId,
                            StatusBackingStore statusBackingStore,
                            ConfigBackingStore configBackingStore)
focal_class.class_method_signature: AbstractHerder.generation()
focal_class.full_signature: protected abstract int generation()
focal_class.identifier: generation
focal_class.modifiers: protected abstract
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int generation()
focal_class.class_method_signature: AbstractHerder.startServices()
focal_class.full_signature: protected void startServices()
focal_class.identifier: startServices
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void startServices()
focal_class.class_method_signature: AbstractHerder.stopServices()
focal_class.full_signature: protected void stopServices()
focal_class.identifier: stopServices
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void stopServices()
focal_class.class_method_signature: AbstractHerder.onStartup(String connector)
focal_class.full_signature: @Override public void onStartup(String connector)
focal_class.identifier: onStartup
focal_class.modifiers: @Override public
focal_class.parameters: (String connector)
focal_class.return: void
focal_class.signature: void onStartup(String connector)
focal_class.class_method_signature: AbstractHerder.onPause(String connector)
focal_class.full_signature: @Override public void onPause(String connector)
focal_class.identifier: onPause
focal_class.modifiers: @Override public
focal_class.parameters: (String connector)
focal_class.return: void
focal_class.signature: void onPause(String connector)
focal_class.class_method_signature: AbstractHerder.onResume(String connector)
focal_class.full_signature: @Override public void onResume(String connector)
focal_class.identifier: onResume
focal_class.modifiers: @Override public
focal_class.parameters: (String connector)
focal_class.return: void
focal_class.signature: void onResume(String connector)
focal_class.class_method_signature: AbstractHerder.onShutdown(String connector)
focal_class.full_signature: @Override public void onShutdown(String connector)
focal_class.identifier: onShutdown
focal_class.modifiers: @Override public
focal_class.parameters: (String connector)
focal_class.return: void
focal_class.signature: void onShutdown(String connector)
focal_class.class_method_signature: AbstractHerder.onFailure(String connector, Throwable cause)
focal_class.full_signature: @Override public void onFailure(String connector, Throwable cause)
focal_class.identifier: onFailure
focal_class.modifiers: @Override public
focal_class.parameters: (String connector, Throwable cause)
focal_class.return: void
focal_class.signature: void onFailure(String connector, Throwable cause)
focal_class.class_method_signature: AbstractHerder.onStartup(ConnectorTaskId id)
focal_class.full_signature: @Override public void onStartup(ConnectorTaskId id)
focal_class.identifier: onStartup
focal_class.modifiers: @Override public
focal_class.parameters: (ConnectorTaskId id)
focal_class.return: void
focal_class.signature: void onStartup(ConnectorTaskId id)
focal_class.class_method_signature: AbstractHerder.onFailure(ConnectorTaskId id, Throwable cause)
focal_class.full_signature: @Override public void onFailure(ConnectorTaskId id, Throwable cause)
focal_class.identifier: onFailure
focal_class.modifiers: @Override public
focal_class.parameters: (ConnectorTaskId id, Throwable cause)
focal_class.return: void
focal_class.signature: void onFailure(ConnectorTaskId id, Throwable cause)
focal_class.class_method_signature: AbstractHerder.onShutdown(ConnectorTaskId id)
focal_class.full_signature: @Override public void onShutdown(ConnectorTaskId id)
focal_class.identifier: onShutdown
focal_class.modifiers: @Override public
focal_class.parameters: (ConnectorTaskId id)
focal_class.return: void
focal_class.signature: void onShutdown(ConnectorTaskId id)
focal_class.class_method_signature: AbstractHerder.onResume(ConnectorTaskId id)
focal_class.full_signature: @Override public void onResume(ConnectorTaskId id)
focal_class.identifier: onResume
focal_class.modifiers: @Override public
focal_class.parameters: (ConnectorTaskId id)
focal_class.return: void
focal_class.signature: void onResume(ConnectorTaskId id)
focal_class.class_method_signature: AbstractHerder.onPause(ConnectorTaskId id)
focal_class.full_signature: @Override public void onPause(ConnectorTaskId id)
focal_class.identifier: onPause
focal_class.modifiers: @Override public
focal_class.parameters: (ConnectorTaskId id)
focal_class.return: void
focal_class.signature: void onPause(ConnectorTaskId id)
focal_class.class_method_signature: AbstractHerder.onDeletion(String connector)
focal_class.full_signature: @Override public void onDeletion(String connector)
focal_class.identifier: onDeletion
focal_class.modifiers: @Override public
focal_class.parameters: (String connector)
focal_class.return: void
focal_class.signature: void onDeletion(String connector)
focal_class.class_method_signature: AbstractHerder.pauseConnector(String connector)
focal_class.full_signature: @Override public void pauseConnector(String connector)
focal_class.identifier: pauseConnector
focal_class.modifiers: @Override public
focal_class.parameters: (String connector)
focal_class.return: void
focal_class.signature: void pauseConnector(String connector)
focal_class.class_method_signature: AbstractHerder.resumeConnector(String connector)
focal_class.full_signature: @Override public void resumeConnector(String connector)
focal_class.identifier: resumeConnector
focal_class.modifiers: @Override public
focal_class.parameters: (String connector)
focal_class.return: void
focal_class.signature: void resumeConnector(String connector)
focal_class.class_method_signature: AbstractHerder.connectorStatus(String connName)
focal_class.full_signature: @Override public ConnectorStateInfo connectorStatus(String connName)
focal_class.identifier: connectorStatus
focal_class.modifiers: @Override public
focal_class.parameters: (String connName)
focal_class.return: ConnectorStateInfo
focal_class.signature: ConnectorStateInfo connectorStatus(String connName)
focal_class.class_method_signature: AbstractHerder.taskStatus(ConnectorTaskId id)
focal_class.full_signature: @Override public ConnectorStateInfo.TaskState taskStatus(ConnectorTaskId id)
focal_class.identifier: taskStatus
focal_class.modifiers: @Override public
focal_class.parameters: (ConnectorTaskId id)
focal_class.return: ConnectorStateInfo.TaskState
focal_class.signature: ConnectorStateInfo.TaskState taskStatus(ConnectorTaskId id)
focal_class.class_method_signature: AbstractHerder.validateConfigs(String connType, Map<String, String> connectorConfig)
focal_class.full_signature: @Override public ConfigInfos validateConfigs(String connType, Map<String, String> connectorConfig)
focal_class.identifier: validateConfigs
focal_class.modifiers: @Override public
focal_class.parameters: (String connType, Map<String, String> connectorConfig)
focal_class.return: ConfigInfos
focal_class.signature: ConfigInfos validateConfigs(String connType, Map<String, String> connectorConfig)
focal_class.class_method_signature: AbstractHerder.connectorPlugins()
focal_class.full_signature: public static List<ConnectorPluginInfo> connectorPlugins()
focal_class.identifier: connectorPlugins
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: List<ConnectorPluginInfo>
focal_class.signature: List<ConnectorPluginInfo> connectorPlugins()
focal_class.class_method_signature: AbstractHerder.generateResult(String connType, Map<String, ConfigKey> configKeys, List<ConfigValue> configValues, List<String> groups)
focal_class.full_signature: public static ConfigInfos generateResult(String connType, Map<String, ConfigKey> configKeys, List<ConfigValue> configValues, List<String> groups)
focal_class.identifier: generateResult
focal_class.modifiers: public static
focal_class.parameters: (String connType, Map<String, ConfigKey> configKeys, List<ConfigValue> configValues, List<String> groups)
focal_class.return: ConfigInfos
focal_class.signature: ConfigInfos generateResult(String connType, Map<String, ConfigKey> configKeys, List<ConfigValue> configValues, List<String> groups)
focal_class.class_method_signature: AbstractHerder.convertConfigKey(ConfigKey configKey)
focal_class.full_signature: private static ConfigKeyInfo convertConfigKey(ConfigKey configKey)
focal_class.identifier: convertConfigKey
focal_class.modifiers: private static
focal_class.parameters: (ConfigKey configKey)
focal_class.return: ConfigKeyInfo
focal_class.signature: ConfigKeyInfo convertConfigKey(ConfigKey configKey)
focal_class.class_method_signature: AbstractHerder.convertConfigValue(ConfigValue configValue, Type type)
focal_class.full_signature: private static ConfigValueInfo convertConfigValue(ConfigValue configValue, Type type)
focal_class.identifier: convertConfigValue
focal_class.modifiers: private static
focal_class.parameters: (ConfigValue configValue, Type type)
focal_class.return: ConfigValueInfo
focal_class.signature: ConfigValueInfo convertConfigValue(ConfigValue configValue, Type type)
focal_class.class_method_signature: AbstractHerder.getConnector(String connType)
focal_class.full_signature: private Connector getConnector(String connType)
focal_class.identifier: getConnector
focal_class.modifiers: private
focal_class.parameters: (String connType)
focal_class.return: Connector
focal_class.signature: Connector getConnector(String connType)
focal_class.class_method_signature: AbstractHerder.trace(Throwable t)
focal_class.full_signature: private String trace(Throwable t)
focal_class.identifier: trace
focal_class.modifiers: private
focal_class.parameters: (Throwable t)
focal_class.return: String
focal_class.signature: String trace(Throwable t)
focal_class.class_method_signature: AbstractHerder.traverseClassPath()
focal_class.full_signature: private void traverseClassPath()
focal_class.identifier: traverseClassPath
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void traverseClassPath()
focal_method.body: @Override
      public ConnectorStateInfo.TaskState taskStatus(ConnectorTaskId id) {
          TaskStatus status = statusBackingStore.get(id);
  
          if (status == null)
              throw new NotFoundException("No status found for task " + id);
  
          return new ConnectorStateInfo.TaskState(id.task(), status.state().toString(),
                  status.workerId(), status.trace());
      }
focal_method.class_method_signature: AbstractHerder.taskStatus(ConnectorTaskId id)
focal_method.full_signature: @Override public ConnectorStateInfo.TaskState taskStatus(ConnectorTaskId id)
focal_method.identifier: taskStatus
focal_method.invocations: get task toString state workerId trace
focal_method.modifiers: @Override public
focal_method.parameters: (ConnectorTaskId id)
focal_method.return: ConnectorStateInfo.TaskState
focal_method.signature: ConnectorStateInfo.TaskState taskStatus(ConnectorTaskId id)