Search in sources :

Example 16 with TaskExecLog

use of com.netflix.conductor.common.metadata.tasks.TaskExecLog in project conductor by Netflix.

the class AbstractProtoMapper method fromProto.

public TaskExecLog fromProto(TaskExecLogPb.TaskExecLog from) {
    TaskExecLog to = new TaskExecLog();
    to.setLog(from.getLog());
    to.setTaskId(from.getTaskId());
    to.setCreatedTime(from.getCreatedTime());
    return to;
}
Also used : TaskExecLog(com.netflix.conductor.common.metadata.tasks.TaskExecLog)

Example 17 with TaskExecLog

use of com.netflix.conductor.common.metadata.tasks.TaskExecLog in project conductor by Netflix.

the class TaskResourceTest method testGetTaskLogs.

@Test
public void testGetTaskLogs() {
    List<TaskExecLog> listOfLogs = new ArrayList<>();
    listOfLogs.add(new TaskExecLog("test log"));
    when(mockTaskService.getTaskLogs(anyString())).thenReturn(listOfLogs);
    assertEquals(listOfLogs, taskResource.getTaskLogs("123"));
}
Also used : TaskExecLog(com.netflix.conductor.common.metadata.tasks.TaskExecLog) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Aggregations

TaskExecLog (com.netflix.conductor.common.metadata.tasks.TaskExecLog)17 ArrayList (java.util.ArrayList)10 ApplicationException (com.netflix.conductor.core.execution.ApplicationException)6 IOException (java.io.IOException)6 LinkedList (java.util.LinkedList)5 List (java.util.List)5 ThreadPoolExecutor (java.util.concurrent.ThreadPoolExecutor)5 BulkResponse (org.elasticsearch.action.bulk.BulkResponse)5 IndexRequest (org.elasticsearch.action.index.IndexRequest)5 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)4 ParserException (com.netflix.conductor.elasticsearch.query.parser.ParserException)4 SearchHit (org.elasticsearch.search.SearchHit)4 BulkRequest (org.elasticsearch.action.bulk.BulkRequest)3 ResponseException (org.elasticsearch.client.ResponseException)3 Test (org.junit.Test)3 ResourceAlreadyExistsException (org.elasticsearch.ResourceAlreadyExistsException)2 CreateIndexRequest (org.elasticsearch.action.admin.indices.create.CreateIndexRequest)2 IndexNotFoundException (org.elasticsearch.index.IndexNotFoundException)2 Expression (com.netflix.conductor.dao.es5.index.query.parser.Expression)1 SearchRequest (org.elasticsearch.action.search.SearchRequest)1