use of com.alibaba.nacos.core.distributed.distro.component.DistroFailedTaskHandler in project nacos by alibaba.
the class AbstractDistroExecuteTask method handleFailedTask.
/**
* Handle failed task.
*/
protected void handleFailedTask() {
String type = getDistroKey().getResourceType();
DistroFailedTaskHandler failedTaskHandler = distroComponentHolder.findFailedTaskHandler(type);
if (null == failedTaskHandler) {
Loggers.DISTRO.warn("[DISTRO] Can't find failed task for type {}, so discarded", type);
return;
}
failedTaskHandler.retry(getDistroKey(), getDataOperation());
}
use of com.alibaba.nacos.core.distributed.distro.component.DistroFailedTaskHandler in project nacos by alibaba.
the class DistroClientComponentRegistryTest method testDoRegister.
@Test
public void testDoRegister() {
distroClientComponentRegistry.doRegister();
DistroDataStorage dataStorage = componentHolder.findDataStorage(DistroClientDataProcessor.TYPE);
Assert.assertNotNull(dataStorage);
DistroDataProcessor dataProcessor = componentHolder.findDataProcessor(DistroClientDataProcessor.TYPE);
Assert.assertNotNull(dataProcessor);
DistroFailedTaskHandler failedTaskHandler = componentHolder.findFailedTaskHandler(DistroClientDataProcessor.TYPE);
Assert.assertNotNull(failedTaskHandler);
DistroTransportAgent transportAgent = componentHolder.findTransportAgent(DistroClientDataProcessor.TYPE);
Assert.assertNotNull(transportAgent);
}
Aggregations