id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
131,400
xetorthio/jedis
src/main/java/redis/clients/jedis/BinaryJedis.java
BinaryJedis.auth
@Override public String auth(final String password) { checkIsInMultiOrPipeline(); client.auth(password); return client.getStatusCodeReply(); }
java
@Override public String auth(final String password) { checkIsInMultiOrPipeline(); client.auth(password); return client.getStatusCodeReply(); }
[ "@", "Override", "public", "String", "auth", "(", "final", "String", "password", ")", "{", "checkIsInMultiOrPipeline", "(", ")", ";", "client", ".", "auth", "(", "password", ")", ";", "return", "client", ".", "getStatusCodeReply", "(", ")", ";", "}" ]
Request for authentication in a password protected Redis server. A Redis server can be instructed to require a password before to allow clients to issue commands. This is done using the requirepass directive in the Redis configuration file. If the password given by the client is correct the server replies with an OK st...
[ "Request", "for", "authentication", "in", "a", "password", "protected", "Redis", "server", ".", "A", "Redis", "server", "can", "be", "instructed", "to", "require", "a", "password", "before", "to", "allow", "clients", "to", "issue", "commands", ".", "This", "...
ef4ab403f9d8fd88bd05092fea96de2e9db0bede
https://github.com/xetorthio/jedis/blob/ef4ab403f9d8fd88bd05092fea96de2e9db0bede/src/main/java/redis/clients/jedis/BinaryJedis.java#L2221-L2226
131,401
xetorthio/jedis
src/main/java/redis/clients/jedis/BinaryJedis.java
BinaryJedis.brpoplpush
@Override public byte[] brpoplpush(final byte[] source, final byte[] destination, final int timeout) { client.brpoplpush(source, destination, timeout); client.setTimeoutInfinite(); try { return client.getBinaryBulkReply(); } finally { client.rollbackTimeout(); } }
java
@Override public byte[] brpoplpush(final byte[] source, final byte[] destination, final int timeout) { client.brpoplpush(source, destination, timeout); client.setTimeoutInfinite(); try { return client.getBinaryBulkReply(); } finally { client.rollbackTimeout(); } }
[ "@", "Override", "public", "byte", "[", "]", "brpoplpush", "(", "final", "byte", "[", "]", "source", ",", "final", "byte", "[", "]", "destination", ",", "final", "int", "timeout", ")", "{", "client", ".", "brpoplpush", "(", "source", ",", "destination", ...
Pop a value from a list, push it to another list and return it; or block until one is available @param source @param destination @param timeout @return the element
[ "Pop", "a", "value", "from", "a", "list", "push", "it", "to", "another", "list", "and", "return", "it", ";", "or", "block", "until", "one", "is", "available" ]
ef4ab403f9d8fd88bd05092fea96de2e9db0bede
https://github.com/xetorthio/jedis/blob/ef4ab403f9d8fd88bd05092fea96de2e9db0bede/src/main/java/redis/clients/jedis/BinaryJedis.java#L3184-L3193
131,402
xetorthio/jedis
src/main/java/redis/clients/jedis/BinaryJedis.java
BinaryJedis.setbit
@Override public Boolean setbit(final byte[] key, final long offset, final boolean value) { checkIsInMultiOrPipeline(); client.setbit(key, offset, value); return client.getIntegerReply() == 1; }
java
@Override public Boolean setbit(final byte[] key, final long offset, final boolean value) { checkIsInMultiOrPipeline(); client.setbit(key, offset, value); return client.getIntegerReply() == 1; }
[ "@", "Override", "public", "Boolean", "setbit", "(", "final", "byte", "[", "]", "key", ",", "final", "long", "offset", ",", "final", "boolean", "value", ")", "{", "checkIsInMultiOrPipeline", "(", ")", ";", "client", ".", "setbit", "(", "key", ",", "offse...
Sets or clears the bit at offset in the string value stored at key @param key @param offset @param value @return
[ "Sets", "or", "clears", "the", "bit", "at", "offset", "in", "the", "string", "value", "stored", "at", "key" ]
ef4ab403f9d8fd88bd05092fea96de2e9db0bede
https://github.com/xetorthio/jedis/blob/ef4ab403f9d8fd88bd05092fea96de2e9db0bede/src/main/java/redis/clients/jedis/BinaryJedis.java#L3202-L3207
131,403
xetorthio/jedis
src/main/java/redis/clients/jedis/BinaryJedis.java
BinaryJedis.getbit
@Override public Boolean getbit(final byte[] key, final long offset) { checkIsInMultiOrPipeline(); client.getbit(key, offset); return client.getIntegerReply() == 1; }
java
@Override public Boolean getbit(final byte[] key, final long offset) { checkIsInMultiOrPipeline(); client.getbit(key, offset); return client.getIntegerReply() == 1; }
[ "@", "Override", "public", "Boolean", "getbit", "(", "final", "byte", "[", "]", "key", ",", "final", "long", "offset", ")", "{", "checkIsInMultiOrPipeline", "(", ")", ";", "client", ".", "getbit", "(", "key", ",", "offset", ")", ";", "return", "client", ...
Returns the bit value at offset in the string value stored at key @param key @param offset @return
[ "Returns", "the", "bit", "value", "at", "offset", "in", "the", "string", "value", "stored", "at", "key" ]
ef4ab403f9d8fd88bd05092fea96de2e9db0bede
https://github.com/xetorthio/jedis/blob/ef4ab403f9d8fd88bd05092fea96de2e9db0bede/src/main/java/redis/clients/jedis/BinaryJedis.java#L3222-L3227
131,404
xetorthio/jedis
src/main/java/redis/clients/jedis/HostAndPort.java
HostAndPort.getLocalhost
public static String getLocalhost() { if (localhost == null) { synchronized (HostAndPort.class) { if (localhost == null) { return localhost = getLocalHostQuietly(); } } } return localhost; }
java
public static String getLocalhost() { if (localhost == null) { synchronized (HostAndPort.class) { if (localhost == null) { return localhost = getLocalHostQuietly(); } } } return localhost; }
[ "public", "static", "String", "getLocalhost", "(", ")", "{", "if", "(", "localhost", "==", "null", ")", "{", "synchronized", "(", "HostAndPort", ".", "class", ")", "{", "if", "(", "localhost", "==", "null", ")", "{", "return", "localhost", "=", "getLocal...
This method resolves the localhost in a 'lazy manner'. @return localhost
[ "This", "method", "resolves", "the", "localhost", "in", "a", "lazy", "manner", "." ]
ef4ab403f9d8fd88bd05092fea96de2e9db0bede
https://github.com/xetorthio/jedis/blob/ef4ab403f9d8fd88bd05092fea96de2e9db0bede/src/main/java/redis/clients/jedis/HostAndPort.java#L130-L139
131,405
xetorthio/jedis
src/main/java/redis/clients/jedis/ZParams.java
ZParams.weights
public ZParams weights(final double... weights) { params.add(WEIGHTS.raw); for (final double weight : weights) { params.add(Protocol.toByteArray(weight)); } return this; }
java
public ZParams weights(final double... weights) { params.add(WEIGHTS.raw); for (final double weight : weights) { params.add(Protocol.toByteArray(weight)); } return this; }
[ "public", "ZParams", "weights", "(", "final", "double", "...", "weights", ")", "{", "params", ".", "add", "(", "WEIGHTS", ".", "raw", ")", ";", "for", "(", "final", "double", "weight", ":", "weights", ")", "{", "params", ".", "add", "(", "Protocol", ...
Set weights. @param weights weights. @return
[ "Set", "weights", "." ]
ef4ab403f9d8fd88bd05092fea96de2e9db0bede
https://github.com/xetorthio/jedis/blob/ef4ab403f9d8fd88bd05092fea96de2e9db0bede/src/main/java/redis/clients/jedis/ZParams.java#L31-L38
131,406
xetorthio/jedis
src/main/java/redis/clients/jedis/JedisClusterInfoCache.java
JedisClusterInfoCache.reset
public void reset() { w.lock(); try { for (JedisPool pool : nodes.values()) { try { if (pool != null) { pool.destroy(); } } catch (Exception e) { // pass } } nodes.clear(); slots.clear(); } finally { w.unlock(); ...
java
public void reset() { w.lock(); try { for (JedisPool pool : nodes.values()) { try { if (pool != null) { pool.destroy(); } } catch (Exception e) { // pass } } nodes.clear(); slots.clear(); } finally { w.unlock(); ...
[ "public", "void", "reset", "(", ")", "{", "w", ".", "lock", "(", ")", ";", "try", "{", "for", "(", "JedisPool", "pool", ":", "nodes", ".", "values", "(", ")", ")", "{", "try", "{", "if", "(", "pool", "!=", "null", ")", "{", "pool", ".", "dest...
Clear discovered nodes collections and gently release allocated resources
[ "Clear", "discovered", "nodes", "collections", "and", "gently", "release", "allocated", "resources" ]
ef4ab403f9d8fd88bd05092fea96de2e9db0bede
https://github.com/xetorthio/jedis/blob/ef4ab403f9d8fd88bd05092fea96de2e9db0bede/src/main/java/redis/clients/jedis/JedisClusterInfoCache.java#L263-L280
131,407
xetorthio/jedis
src/main/java/redis/clients/jedis/SortingParams.java
SortingParams.limit
public SortingParams limit(final int start, final int count) { params.add(LIMIT.raw); params.add(Protocol.toByteArray(start)); params.add(Protocol.toByteArray(count)); return this; }
java
public SortingParams limit(final int start, final int count) { params.add(LIMIT.raw); params.add(Protocol.toByteArray(start)); params.add(Protocol.toByteArray(count)); return this; }
[ "public", "SortingParams", "limit", "(", "final", "int", "start", ",", "final", "int", "count", ")", "{", "params", ".", "add", "(", "LIMIT", ".", "raw", ")", ";", "params", ".", "add", "(", "Protocol", ".", "toByteArray", "(", "start", ")", ")", ";"...
Limit the Numbers of returned Elements. @param start is zero based @param count @return the SortingParams Object
[ "Limit", "the", "Numbers", "of", "returned", "Elements", "." ]
ef4ab403f9d8fd88bd05092fea96de2e9db0bede
https://github.com/xetorthio/jedis/blob/ef4ab403f9d8fd88bd05092fea96de2e9db0bede/src/main/java/redis/clients/jedis/SortingParams.java#L99-L104
131,408
Netflix/conductor
client/src/main/java/com/netflix/conductor/client/http/TaskClient.java
TaskClient.populateTaskInput
private void populateTaskInput(Task task) { if (StringUtils.isNotBlank(task.getExternalInputPayloadStoragePath())) { WorkflowTaskMetrics.incrementExternalPayloadUsedCount(task.getTaskDefName(), ExternalPayloadStorage.Operation.READ.name(), ExternalPayloadStorage.PayloadType.TASK_INPUT.name()); ...
java
private void populateTaskInput(Task task) { if (StringUtils.isNotBlank(task.getExternalInputPayloadStoragePath())) { WorkflowTaskMetrics.incrementExternalPayloadUsedCount(task.getTaskDefName(), ExternalPayloadStorage.Operation.READ.name(), ExternalPayloadStorage.PayloadType.TASK_INPUT.name()); ...
[ "private", "void", "populateTaskInput", "(", "Task", "task", ")", "{", "if", "(", "StringUtils", ".", "isNotBlank", "(", "task", ".", "getExternalInputPayloadStoragePath", "(", ")", ")", ")", "{", "WorkflowTaskMetrics", ".", "incrementExternalPayloadUsedCount", "(",...
Populates the task input from external payload storage if the external storage path is specified. @param task the task for which the input is to be populated.
[ "Populates", "the", "task", "input", "from", "external", "payload", "storage", "if", "the", "external", "storage", "path", "is", "specified", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/client/src/main/java/com/netflix/conductor/client/http/TaskClient.java#L178-L184
131,409
Netflix/conductor
client/src/main/java/com/netflix/conductor/client/http/TaskClient.java
TaskClient.getPollData
public List<PollData> getPollData(String taskType) { Preconditions.checkArgument(StringUtils.isNotBlank(taskType), "Task type cannot be blank"); Object[] params = new Object[]{"taskType", taskType}; return getForEntity("tasks/queue/polldata", params, pollDataList); }
java
public List<PollData> getPollData(String taskType) { Preconditions.checkArgument(StringUtils.isNotBlank(taskType), "Task type cannot be blank"); Object[] params = new Object[]{"taskType", taskType}; return getForEntity("tasks/queue/polldata", params, pollDataList); }
[ "public", "List", "<", "PollData", ">", "getPollData", "(", "String", "taskType", ")", "{", "Preconditions", ".", "checkArgument", "(", "StringUtils", ".", "isNotBlank", "(", "taskType", ")", ",", "\"Task type cannot be blank\"", ")", ";", "Object", "[", "]", ...
Get last poll data for a given task type @param taskType the task type for which poll data is to be fetched @return returns the list of poll data for the task type
[ "Get", "last", "poll", "data", "for", "a", "given", "task", "type" ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/client/src/main/java/com/netflix/conductor/client/http/TaskClient.java#L343-L348
131,410
Netflix/conductor
client/src/main/java/com/netflix/conductor/client/http/TaskClient.java
TaskClient.requeuePendingTasksByTaskType
public String requeuePendingTasksByTaskType(String taskType) { Preconditions.checkArgument(StringUtils.isNotBlank(taskType), "Task type cannot be blank"); return postForEntity("tasks/queue/requeue/{taskType}", null, null, String.class, taskType); }
java
public String requeuePendingTasksByTaskType(String taskType) { Preconditions.checkArgument(StringUtils.isNotBlank(taskType), "Task type cannot be blank"); return postForEntity("tasks/queue/requeue/{taskType}", null, null, String.class, taskType); }
[ "public", "String", "requeuePendingTasksByTaskType", "(", "String", "taskType", ")", "{", "Preconditions", ".", "checkArgument", "(", "StringUtils", ".", "isNotBlank", "(", "taskType", ")", ",", "\"Task type cannot be blank\"", ")", ";", "return", "postForEntity", "("...
Requeue pending tasks of a specific task type @return returns the number of tasks that have been requeued
[ "Requeue", "pending", "tasks", "of", "a", "specific", "task", "type" ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/client/src/main/java/com/netflix/conductor/client/http/TaskClient.java#L373-L376
131,411
Netflix/conductor
client/src/main/java/com/netflix/conductor/client/http/TaskClient.java
TaskClient.search
public SearchResult<TaskSummary> search(Integer start, Integer size, String sort, String freeText, String query) { Object[] params = new Object[]{"start", start, "size", size, "sort", sort, "freeText", freeText, "query", query}; return getForEntity("tasks/search", params, searchResultTaskSummary); }
java
public SearchResult<TaskSummary> search(Integer start, Integer size, String sort, String freeText, String query) { Object[] params = new Object[]{"start", start, "size", size, "sort", sort, "freeText", freeText, "query", query}; return getForEntity("tasks/search", params, searchResultTaskSummary); }
[ "public", "SearchResult", "<", "TaskSummary", ">", "search", "(", "Integer", "start", ",", "Integer", "size", ",", "String", "sort", ",", "String", "freeText", ",", "String", "query", ")", "{", "Object", "[", "]", "params", "=", "new", "Object", "[", "]"...
Paginated search for tasks based on payload @param start start value of page @param size number of tasks to be returned @param sort sort order @param freeText additional free text query @param query the search query @return the {@link SearchResult} containing the {@link TaskSummary} that match the query
[ "Paginated", "search", "for", "tasks", "based", "on", "payload" ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/client/src/main/java/com/netflix/conductor/client/http/TaskClient.java#L398-L401
131,412
Netflix/conductor
core/src/main/java/com/netflix/conductor/core/events/EventProcessor.java
EventProcessor.isTransientException
private boolean isTransientException(Throwable throwableException) { if (throwableException != null) { return !((throwableException instanceof UnsupportedOperationException) || (throwableException instanceof ApplicationException && ((ApplicationException) throwableException).getC...
java
private boolean isTransientException(Throwable throwableException) { if (throwableException != null) { return !((throwableException instanceof UnsupportedOperationException) || (throwableException instanceof ApplicationException && ((ApplicationException) throwableException).getC...
[ "private", "boolean", "isTransientException", "(", "Throwable", "throwableException", ")", "{", "if", "(", "throwableException", "!=", "null", ")", "{", "return", "!", "(", "(", "throwableException", "instanceof", "UnsupportedOperationException", ")", "||", "(", "th...
Used to determine if the exception is thrown due to a transient failure and the operation is expected to succeed upon retrying. @param throwableException the exception that is thrown @return true - if the exception is a transient failure false - if the exception is non-transient
[ "Used", "to", "determine", "if", "the", "exception", "is", "thrown", "due", "to", "a", "transient", "failure", "and", "the", "operation", "is", "expected", "to", "succeed", "upon", "retrying", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/core/events/EventProcessor.java#L277-L283
131,413
Netflix/conductor
grpc-server/src/main/java/com/netflix/conductor/grpc/server/service/GRPCHelper.java
GRPCHelper.throwableToStatusException
private StatusException throwableToStatusException(Throwable t) { String[] frames = ExceptionUtils.getStackFrames(t); Metadata metadata = new Metadata(); metadata.put(STATUS_DETAILS_KEY, DebugInfo.newBuilder() .addAllStackEntries(Arrays.asList(frames)) ...
java
private StatusException throwableToStatusException(Throwable t) { String[] frames = ExceptionUtils.getStackFrames(t); Metadata metadata = new Metadata(); metadata.put(STATUS_DETAILS_KEY, DebugInfo.newBuilder() .addAllStackEntries(Arrays.asList(frames)) ...
[ "private", "StatusException", "throwableToStatusException", "(", "Throwable", "t", ")", "{", "String", "[", "]", "frames", "=", "ExceptionUtils", ".", "getStackFrames", "(", "t", ")", ";", "Metadata", "metadata", "=", "new", "Metadata", "(", ")", ";", "metadat...
Converts an internal exception thrown by Conductor into an StatusException that uses modern "Status" metadata for GRPC. Note that this is trickier than it ought to be because the GRPC APIs have not been upgraded yet. Here's a quick breakdown of how this works in practice: Reporting a "status" result back to a client ...
[ "Converts", "an", "internal", "exception", "thrown", "by", "Conductor", "into", "an", "StatusException", "that", "uses", "modern", "Status", "metadata", "for", "GRPC", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/grpc-server/src/main/java/com/netflix/conductor/grpc/server/service/GRPCHelper.java#L75-L89
131,414
Netflix/conductor
core/src/main/java/com/netflix/conductor/service/TaskServiceImpl.java
TaskServiceImpl.poll
@Service public Task poll(String taskType, String workerId, String domain) { LOGGER.debug("Task being polled: /tasks/poll/{}?{}&{}", taskType, workerId, domain); Task task = executionService.getLastPollTask(taskType, workerId, domain); if (task != null) { LOGGER.debug("The Task {...
java
@Service public Task poll(String taskType, String workerId, String domain) { LOGGER.debug("Task being polled: /tasks/poll/{}?{}&{}", taskType, workerId, domain); Task task = executionService.getLastPollTask(taskType, workerId, domain); if (task != null) { LOGGER.debug("The Task {...
[ "@", "Service", "public", "Task", "poll", "(", "String", "taskType", ",", "String", "workerId", ",", "String", "domain", ")", "{", "LOGGER", ".", "debug", "(", "\"Task being polled: /tasks/poll/{}?{}&{}\"", ",", "taskType", ",", "workerId", ",", "domain", ")", ...
Poll for a task of a certain type. @param taskType Task name @param workerId Id of the workflow @param domain Domain of the workflow @return polled {@link Task}
[ "Poll", "for", "a", "task", "of", "a", "certain", "type", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/TaskServiceImpl.java#L69-L78
131,415
Netflix/conductor
core/src/main/java/com/netflix/conductor/service/TaskServiceImpl.java
TaskServiceImpl.batchPoll
@Service public List<Task> batchPoll(String taskType, String workerId, String domain, Integer count, Integer timeout) { List<Task> polledTasks = executionService.poll(taskType, workerId, domain, count, timeout); LOGGER.debug("The Tasks {} being returned for /tasks/poll/{}?{}&{}", pol...
java
@Service public List<Task> batchPoll(String taskType, String workerId, String domain, Integer count, Integer timeout) { List<Task> polledTasks = executionService.poll(taskType, workerId, domain, count, timeout); LOGGER.debug("The Tasks {} being returned for /tasks/poll/{}?{}&{}", pol...
[ "@", "Service", "public", "List", "<", "Task", ">", "batchPoll", "(", "String", "taskType", ",", "String", "workerId", ",", "String", "domain", ",", "Integer", "count", ",", "Integer", "timeout", ")", "{", "List", "<", "Task", ">", "polledTasks", "=", "e...
Batch Poll for a task of a certain type. @param taskType Task Name @param workerId Id of the workflow @param domain Domain of the workflow @param count Number of tasks @param timeout Timeout for polling in milliseconds @return list of {@link Task}
[ "Batch", "Poll", "for", "a", "task", "of", "a", "certain", "type", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/TaskServiceImpl.java#L90-L99
131,416
Netflix/conductor
core/src/main/java/com/netflix/conductor/service/TaskServiceImpl.java
TaskServiceImpl.getTasks
@Service public List<Task> getTasks(String taskType, String startKey, Integer count) { return executionService.getTasks(taskType, startKey, count); }
java
@Service public List<Task> getTasks(String taskType, String startKey, Integer count) { return executionService.getTasks(taskType, startKey, count); }
[ "@", "Service", "public", "List", "<", "Task", ">", "getTasks", "(", "String", "taskType", ",", "String", "startKey", ",", "Integer", "count", ")", "{", "return", "executionService", ".", "getTasks", "(", "taskType", ",", "startKey", ",", "count", ")", ";"...
Get in progress tasks. The results are paginated. @param taskType Task Name @param startKey Start index of pagination @param count Number of entries @return list of {@link Task}
[ "Get", "in", "progress", "tasks", ".", "The", "results", "are", "paginated", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/TaskServiceImpl.java#L109-L112
131,417
Netflix/conductor
core/src/main/java/com/netflix/conductor/service/TaskServiceImpl.java
TaskServiceImpl.getPendingTaskForWorkflow
@Service public Task getPendingTaskForWorkflow(String workflowId, String taskReferenceName) { return executionService.getPendingTaskForWorkflow(taskReferenceName, workflowId); }
java
@Service public Task getPendingTaskForWorkflow(String workflowId, String taskReferenceName) { return executionService.getPendingTaskForWorkflow(taskReferenceName, workflowId); }
[ "@", "Service", "public", "Task", "getPendingTaskForWorkflow", "(", "String", "workflowId", ",", "String", "taskReferenceName", ")", "{", "return", "executionService", ".", "getPendingTaskForWorkflow", "(", "taskReferenceName", ",", "workflowId", ")", ";", "}" ]
Get in progress task for a given workflow id. @param workflowId Id of the workflow @param taskReferenceName Task reference name. @return instance of {@link Task}
[ "Get", "in", "progress", "task", "for", "a", "given", "workflow", "id", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/TaskServiceImpl.java#L121-L124
131,418
Netflix/conductor
core/src/main/java/com/netflix/conductor/service/TaskServiceImpl.java
TaskServiceImpl.updateTask
@Service public String updateTask(TaskResult taskResult) { LOGGER.debug("Update Task: {} with callback time: {}", taskResult, taskResult.getCallbackAfterSeconds()); executionService.updateTask(taskResult); LOGGER.debug("Task: {} updated successfully with callback time: {}", taskResult, taskR...
java
@Service public String updateTask(TaskResult taskResult) { LOGGER.debug("Update Task: {} with callback time: {}", taskResult, taskResult.getCallbackAfterSeconds()); executionService.updateTask(taskResult); LOGGER.debug("Task: {} updated successfully with callback time: {}", taskResult, taskR...
[ "@", "Service", "public", "String", "updateTask", "(", "TaskResult", "taskResult", ")", "{", "LOGGER", ".", "debug", "(", "\"Update Task: {} with callback time: {}\"", ",", "taskResult", ",", "taskResult", ".", "getCallbackAfterSeconds", "(", ")", ")", ";", "executi...
Updates a task. @param taskResult Instance of {@link TaskResult} @return task Id of the updated task.
[ "Updates", "a", "task", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/TaskServiceImpl.java#L132-L138
131,419
Netflix/conductor
core/src/main/java/com/netflix/conductor/service/TaskServiceImpl.java
TaskServiceImpl.log
@Service public void log(String taskId, String log) { executionService.log(taskId, log); }
java
@Service public void log(String taskId, String log) { executionService.log(taskId, log); }
[ "@", "Service", "public", "void", "log", "(", "String", "taskId", ",", "String", "log", ")", "{", "executionService", ".", "log", "(", "taskId", ",", "log", ")", ";", "}" ]
Log Task Execution Details. @param taskId Id of the task @param log Details you want to log
[ "Log", "Task", "Execution", "Details", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/TaskServiceImpl.java#L180-L183
131,420
Netflix/conductor
core/src/main/java/com/netflix/conductor/service/TaskServiceImpl.java
TaskServiceImpl.getTaskQueueSizes
@Service public Map<String, Integer> getTaskQueueSizes(List<String> taskTypes) { return executionService.getTaskQueueSizes(taskTypes); }
java
@Service public Map<String, Integer> getTaskQueueSizes(List<String> taskTypes) { return executionService.getTaskQueueSizes(taskTypes); }
[ "@", "Service", "public", "Map", "<", "String", ",", "Integer", ">", "getTaskQueueSizes", "(", "List", "<", "String", ">", "taskTypes", ")", "{", "return", "executionService", ".", "getTaskQueueSizes", "(", "taskTypes", ")", ";", "}" ]
Get Task type queue sizes. @param taskTypes List of task types. @return map of task type as Key and queue size as value.
[ "Get", "Task", "type", "queue", "sizes", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/TaskServiceImpl.java#L234-L237
131,421
Netflix/conductor
core/src/main/java/com/netflix/conductor/service/TaskServiceImpl.java
TaskServiceImpl.requeuePendingTask
@Service public String requeuePendingTask(String taskType) { return String.valueOf(executionService.requeuePendingTasks(taskType)); }
java
@Service public String requeuePendingTask(String taskType) { return String.valueOf(executionService.requeuePendingTasks(taskType)); }
[ "@", "Service", "public", "String", "requeuePendingTask", "(", "String", "taskType", ")", "{", "return", "String", ".", "valueOf", "(", "executionService", ".", "requeuePendingTasks", "(", "taskType", ")", ")", ";", "}" ]
Requeue pending tasks. @param taskType Task name. @return number of tasks requeued.
[ "Requeue", "pending", "tasks", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/TaskServiceImpl.java#L295-L298
131,422
Netflix/conductor
common/src/main/java/com/netflix/conductor/common/utils/RetryUtil.java
RetryUtil.retryOnException
@SuppressWarnings("Guava") public T retryOnException(Supplier<T> supplierCommand, Predicate<Throwable> throwablePredicate, Predicate<T> resultRetryPredicate, int retryCount, String shortDescriptio...
java
@SuppressWarnings("Guava") public T retryOnException(Supplier<T> supplierCommand, Predicate<Throwable> throwablePredicate, Predicate<T> resultRetryPredicate, int retryCount, String shortDescriptio...
[ "@", "SuppressWarnings", "(", "\"Guava\"", ")", "public", "T", "retryOnException", "(", "Supplier", "<", "T", ">", "supplierCommand", ",", "Predicate", "<", "Throwable", ">", "throwablePredicate", ",", "Predicate", "<", "T", ">", "resultRetryPredicate", ",", "in...
A helper method which has the ability to execute a flaky supplier function and retry in case of failures. @param supplierCommand: Any function that is flaky and needs multiple retries. @param throwablePredicate: A Guava {@link Predicate} housing the exceptional criteria to perform informed filtering before retr...
[ "A", "helper", "method", "which", "has", "the", "ability", "to", "execute", "a", "flaky", "supplier", "function", "and", "retry", "in", "case", "of", "failures", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/common/src/main/java/com/netflix/conductor/common/utils/RetryUtil.java#L87-L126
131,423
Netflix/conductor
core/src/main/java/com/netflix/conductor/service/WorkflowServiceImpl.java
WorkflowServiceImpl.startWorkflow
@Service public String startWorkflow(String name, Integer version, String correlationId, Map<String, Object> input) { WorkflowDef workflowDef = metadataService.getWorkflowDef(name, version); if (workflowDef == null) { throw new ApplicationException(ApplicationException.Code.NOT_FOUND, St...
java
@Service public String startWorkflow(String name, Integer version, String correlationId, Map<String, Object> input) { WorkflowDef workflowDef = metadataService.getWorkflowDef(name, version); if (workflowDef == null) { throw new ApplicationException(ApplicationException.Code.NOT_FOUND, St...
[ "@", "Service", "public", "String", "startWorkflow", "(", "String", "name", ",", "Integer", "version", ",", "String", "correlationId", ",", "Map", "<", "String", ",", "Object", ">", "input", ")", "{", "WorkflowDef", "workflowDef", "=", "metadataService", ".", ...
Start a new workflow. Returns the ID of the workflow instance that can be later used for tracking. @param name Name of the workflow you want to start. @param version Version of the workflow you want to start. @param correlationId CorrelationID of the workflow you want to start. @param input Inp...
[ "Start", "a", "new", "workflow", ".", "Returns", "the", "ID", "of", "the", "workflow", "instance", "that", "can", "be", "later", "used", "for", "tracking", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/WorkflowServiceImpl.java#L134-L141
131,424
Netflix/conductor
core/src/main/java/com/netflix/conductor/service/WorkflowServiceImpl.java
WorkflowServiceImpl.getExecutionStatus
@Service public Workflow getExecutionStatus(String workflowId, boolean includeTasks) { Workflow workflow = executionService.getExecutionStatus(workflowId, includeTasks); if (workflow == null) { throw new ApplicationException(ApplicationException.Code.NOT_FOUND, String...
java
@Service public Workflow getExecutionStatus(String workflowId, boolean includeTasks) { Workflow workflow = executionService.getExecutionStatus(workflowId, includeTasks); if (workflow == null) { throw new ApplicationException(ApplicationException.Code.NOT_FOUND, String...
[ "@", "Service", "public", "Workflow", "getExecutionStatus", "(", "String", "workflowId", ",", "boolean", "includeTasks", ")", "{", "Workflow", "workflow", "=", "executionService", ".", "getExecutionStatus", "(", "workflowId", ",", "includeTasks", ")", ";", "if", "...
Gets the workflow by workflow Id. @param workflowId Id of the workflow. @param includeTasks Includes tasks associated with workflow. @return an instance of {@link Workflow}
[ "Gets", "the", "workflow", "by", "workflow", "Id", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/WorkflowServiceImpl.java#L189-L197
131,425
Netflix/conductor
core/src/main/java/com/netflix/conductor/service/WorkflowServiceImpl.java
WorkflowServiceImpl.getRunningWorkflows
@Service public List<String> getRunningWorkflows(String workflowName, Integer version, Long startTime, Long endTime) { if (Optional.ofNullable(startTime).orElse(0l) != 0 && Optional.ofNullable(endTime).orElse(0l) != 0) { return workflowExecutor.getWork...
java
@Service public List<String> getRunningWorkflows(String workflowName, Integer version, Long startTime, Long endTime) { if (Optional.ofNullable(startTime).orElse(0l) != 0 && Optional.ofNullable(endTime).orElse(0l) != 0) { return workflowExecutor.getWork...
[ "@", "Service", "public", "List", "<", "String", ">", "getRunningWorkflows", "(", "String", "workflowName", ",", "Integer", "version", ",", "Long", "startTime", ",", "Long", "endTime", ")", "{", "if", "(", "Optional", ".", "ofNullable", "(", "startTime", ")"...
Retrieves all the running workflows. @param workflowName Name of the workflow. @param version Version of the workflow. @param startTime Starttime of the workflow. @param endTime EndTime of the workflow @return a list of workflow Ids.
[ "Retrieves", "all", "the", "running", "workflows", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/WorkflowServiceImpl.java#L219-L227
131,426
Netflix/conductor
core/src/main/java/com/netflix/conductor/service/WorkflowServiceImpl.java
WorkflowServiceImpl.skipTaskFromWorkflow
@Service public void skipTaskFromWorkflow(String workflowId, String taskReferenceName, SkipTaskRequest skipTaskRequest) { workflowExecutor.skipTaskFromWorkflow(workflowId, taskReferenceName, skipTaskRequest); }
java
@Service public void skipTaskFromWorkflow(String workflowId, String taskReferenceName, SkipTaskRequest skipTaskRequest) { workflowExecutor.skipTaskFromWorkflow(workflowId, taskReferenceName, skipTaskRequest); }
[ "@", "Service", "public", "void", "skipTaskFromWorkflow", "(", "String", "workflowId", ",", "String", "taskReferenceName", ",", "SkipTaskRequest", "skipTaskRequest", ")", "{", "workflowExecutor", ".", "skipTaskFromWorkflow", "(", "workflowId", ",", "taskReferenceName", ...
Skips a given task from a current running workflow. @param workflowId WorkflowId of the workflow. @param taskReferenceName The task reference name. @param skipTaskRequest {@link SkipTaskRequest} for task you want to skip.
[ "Skips", "a", "given", "task", "from", "a", "current", "running", "workflow", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/WorkflowServiceImpl.java#L266-L270
131,427
Netflix/conductor
core/src/main/java/com/netflix/conductor/service/WorkflowServiceImpl.java
WorkflowServiceImpl.rerunWorkflow
@Service public String rerunWorkflow(String workflowId, RerunWorkflowRequest request) { request.setReRunFromWorkflowId(workflowId); return workflowExecutor.rerun(request); }
java
@Service public String rerunWorkflow(String workflowId, RerunWorkflowRequest request) { request.setReRunFromWorkflowId(workflowId); return workflowExecutor.rerun(request); }
[ "@", "Service", "public", "String", "rerunWorkflow", "(", "String", "workflowId", ",", "RerunWorkflowRequest", "request", ")", "{", "request", ".", "setReRunFromWorkflowId", "(", "workflowId", ")", ";", "return", "workflowExecutor", ".", "rerun", "(", "request", "...
Reruns the workflow from a specific task. @param workflowId WorkflowId of the workflow you want to rerun. @param request (@link RerunWorkflowRequest) for the workflow. @return WorkflowId of the rerun workflow.
[ "Reruns", "the", "workflow", "from", "a", "specific", "task", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/WorkflowServiceImpl.java#L279-L283
131,428
Netflix/conductor
core/src/main/java/com/netflix/conductor/service/WorkflowServiceImpl.java
WorkflowServiceImpl.terminateWorkflow
@Service public void terminateWorkflow(String workflowId, String reason) { workflowExecutor.terminateWorkflow(workflowId, reason); }
java
@Service public void terminateWorkflow(String workflowId, String reason) { workflowExecutor.terminateWorkflow(workflowId, reason); }
[ "@", "Service", "public", "void", "terminateWorkflow", "(", "String", "workflowId", ",", "String", "reason", ")", "{", "workflowExecutor", ".", "terminateWorkflow", "(", "workflowId", ",", "reason", ")", ";", "}" ]
Terminate workflow execution. @param workflowId WorkflowId of the workflow. @param reason Reason for terminating the workflow.
[ "Terminate", "workflow", "execution", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/WorkflowServiceImpl.java#L322-L325
131,429
Netflix/conductor
grpc-client/src/main/java/com/netflix/conductor/client/grpc/MetadataClient.java
MetadataClient.registerWorkflowDef
public void registerWorkflowDef(WorkflowDef workflowDef) { Preconditions.checkNotNull(workflowDef, "Worfklow definition cannot be null"); stub.createWorkflow( MetadataServicePb.CreateWorkflowRequest.newBuilder() .setWorkflow(protoMapper.toProto(workflowDef)) ...
java
public void registerWorkflowDef(WorkflowDef workflowDef) { Preconditions.checkNotNull(workflowDef, "Worfklow definition cannot be null"); stub.createWorkflow( MetadataServicePb.CreateWorkflowRequest.newBuilder() .setWorkflow(protoMapper.toProto(workflowDef)) ...
[ "public", "void", "registerWorkflowDef", "(", "WorkflowDef", "workflowDef", ")", "{", "Preconditions", ".", "checkNotNull", "(", "workflowDef", ",", "\"Worfklow definition cannot be null\"", ")", ";", "stub", ".", "createWorkflow", "(", "MetadataServicePb", ".", "Create...
Register a workflow definition with the server @param workflowDef the workflow definition
[ "Register", "a", "workflow", "definition", "with", "the", "server" ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/grpc-client/src/main/java/com/netflix/conductor/client/grpc/MetadataClient.java#L28-L35
131,430
Netflix/conductor
grpc-client/src/main/java/com/netflix/conductor/client/grpc/MetadataClient.java
MetadataClient.registerTaskDefs
public void registerTaskDefs(List<TaskDef> taskDefs) { Preconditions.checkNotNull(taskDefs, "Task defs list cannot be null"); stub.createTasks(MetadataServicePb.CreateTasksRequest.newBuilder() .addAllDefs( taskDefs.stream().map(protoMapper::toProto)::iterator ...
java
public void registerTaskDefs(List<TaskDef> taskDefs) { Preconditions.checkNotNull(taskDefs, "Task defs list cannot be null"); stub.createTasks(MetadataServicePb.CreateTasksRequest.newBuilder() .addAllDefs( taskDefs.stream().map(protoMapper::toProto)::iterator ...
[ "public", "void", "registerTaskDefs", "(", "List", "<", "TaskDef", ">", "taskDefs", ")", "{", "Preconditions", ".", "checkNotNull", "(", "taskDefs", ",", "\"Task defs list cannot be null\"", ")", ";", "stub", ".", "createTasks", "(", "MetadataServicePb", ".", "Cre...
Registers a list of task types with the conductor server @param taskDefs List of task types to be registered.
[ "Registers", "a", "list", "of", "task", "types", "with", "the", "conductor", "server" ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/grpc-client/src/main/java/com/netflix/conductor/client/grpc/MetadataClient.java#L78-L86
131,431
Netflix/conductor
grpc-client/src/main/java/com/netflix/conductor/client/grpc/MetadataClient.java
MetadataClient.updateTaskDef
public void updateTaskDef(TaskDef taskDef) { Preconditions.checkNotNull(taskDef, "Task definition cannot be null"); stub.updateTask( MetadataServicePb.UpdateTaskRequest.newBuilder() .setTask(protoMapper.toProto(taskDef)) .build() );...
java
public void updateTaskDef(TaskDef taskDef) { Preconditions.checkNotNull(taskDef, "Task definition cannot be null"); stub.updateTask( MetadataServicePb.UpdateTaskRequest.newBuilder() .setTask(protoMapper.toProto(taskDef)) .build() );...
[ "public", "void", "updateTaskDef", "(", "TaskDef", "taskDef", ")", "{", "Preconditions", ".", "checkNotNull", "(", "taskDef", ",", "\"Task definition cannot be null\"", ")", ";", "stub", ".", "updateTask", "(", "MetadataServicePb", ".", "UpdateTaskRequest", ".", "ne...
Updates an existing task definition @param taskDef the task definition to be updated
[ "Updates", "an", "existing", "task", "definition" ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/grpc-client/src/main/java/com/netflix/conductor/client/grpc/MetadataClient.java#L93-L100
131,432
Netflix/conductor
core/src/main/java/com/netflix/conductor/core/orchestration/ExecutionDAOFacade.java
ExecutionDAOFacade.createWorkflow
public String createWorkflow(Workflow workflow) { executionDAO.createWorkflow(workflow); indexDAO.indexWorkflow(workflow); return workflow.getWorkflowId(); }
java
public String createWorkflow(Workflow workflow) { executionDAO.createWorkflow(workflow); indexDAO.indexWorkflow(workflow); return workflow.getWorkflowId(); }
[ "public", "String", "createWorkflow", "(", "Workflow", "workflow", ")", "{", "executionDAO", ".", "createWorkflow", "(", "workflow", ")", ";", "indexDAO", ".", "indexWorkflow", "(", "workflow", ")", ";", "return", "workflow", ".", "getWorkflowId", "(", ")", ";...
Creates a new workflow in the data store @param workflow the workflow to be created @return the id of the created workflow
[ "Creates", "a", "new", "workflow", "in", "the", "data", "store" ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/core/orchestration/ExecutionDAOFacade.java#L144-L148
131,433
Netflix/conductor
core/src/main/java/com/netflix/conductor/core/orchestration/ExecutionDAOFacade.java
ExecutionDAOFacade.updateWorkflow
public String updateWorkflow(Workflow workflow) { executionDAO.updateWorkflow(workflow); indexDAO.indexWorkflow(workflow); return workflow.getWorkflowId(); }
java
public String updateWorkflow(Workflow workflow) { executionDAO.updateWorkflow(workflow); indexDAO.indexWorkflow(workflow); return workflow.getWorkflowId(); }
[ "public", "String", "updateWorkflow", "(", "Workflow", "workflow", ")", "{", "executionDAO", ".", "updateWorkflow", "(", "workflow", ")", ";", "indexDAO", ".", "indexWorkflow", "(", "workflow", ")", ";", "return", "workflow", ".", "getWorkflowId", "(", ")", ";...
Updates the given workflow in the data store @param workflow the workflow tp be updated @return the id of the updated workflow
[ "Updates", "the", "given", "workflow", "in", "the", "data", "store" ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/core/orchestration/ExecutionDAOFacade.java#L156-L160
131,434
Netflix/conductor
core/src/main/java/com/netflix/conductor/core/orchestration/ExecutionDAOFacade.java
ExecutionDAOFacade.removeWorkflow
public void removeWorkflow(String workflowId, boolean archiveWorkflow) { try { Workflow workflow = getWorkflowById(workflowId, true); // remove workflow from ES if (archiveWorkflow) { //Add to elasticsearch indexDAO.updateWorkflow(workflowId, ...
java
public void removeWorkflow(String workflowId, boolean archiveWorkflow) { try { Workflow workflow = getWorkflowById(workflowId, true); // remove workflow from ES if (archiveWorkflow) { //Add to elasticsearch indexDAO.updateWorkflow(workflowId, ...
[ "public", "void", "removeWorkflow", "(", "String", "workflowId", ",", "boolean", "archiveWorkflow", ")", "{", "try", "{", "Workflow", "workflow", "=", "getWorkflowById", "(", "workflowId", ",", "true", ")", ";", "// remove workflow from ES", "if", "(", "archiveWor...
Removes the workflow from the data store. @param workflowId the id of the workflow to be removed @param archiveWorkflow if true, the workflow will be archived in the {@link IndexDAO} after removal from {@link ExecutionDAO}
[ "Removes", "the", "workflow", "from", "the", "data", "store", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/core/orchestration/ExecutionDAOFacade.java#L172-L198
131,435
Netflix/conductor
core/src/main/java/com/netflix/conductor/core/execution/DeciderService.java
DeciderService.decide
public DeciderOutcome decide(Workflow workflow) throws TerminateWorkflowException { //In case of a new workflow the list of tasks will be empty. final List<Task> tasks = workflow.getTasks(); // Filter the list of tasks and include only tasks that are not executed, // not marked to be sk...
java
public DeciderOutcome decide(Workflow workflow) throws TerminateWorkflowException { //In case of a new workflow the list of tasks will be empty. final List<Task> tasks = workflow.getTasks(); // Filter the list of tasks and include only tasks that are not executed, // not marked to be sk...
[ "public", "DeciderOutcome", "decide", "(", "Workflow", "workflow", ")", "throws", "TerminateWorkflowException", "{", "//In case of a new workflow the list of tasks will be empty.", "final", "List", "<", "Task", ">", "tasks", "=", "workflow", ".", "getTasks", "(", ")", "...
QQ public method validation of the input params
[ "QQ", "public", "method", "validation", "of", "the", "input", "params" ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/core/execution/DeciderService.java#L94-L114
131,436
Netflix/conductor
core/src/main/java/com/netflix/conductor/core/utils/ExternalPayloadStorageUtils.java
ExternalPayloadStorageUtils.downloadPayload
@SuppressWarnings("unchecked") public Map<String, Object> downloadPayload(String path) { try (InputStream inputStream = externalPayloadStorage.download(path)) { return objectMapper.readValue(IOUtils.toString(inputStream), Map.class); } catch (IOException e) { logger.error("Un...
java
@SuppressWarnings("unchecked") public Map<String, Object> downloadPayload(String path) { try (InputStream inputStream = externalPayloadStorage.download(path)) { return objectMapper.readValue(IOUtils.toString(inputStream), Map.class); } catch (IOException e) { logger.error("Un...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Map", "<", "String", ",", "Object", ">", "downloadPayload", "(", "String", "path", ")", "{", "try", "(", "InputStream", "inputStream", "=", "externalPayloadStorage", ".", "download", "(", "path", "...
Download the payload from the given path @param path the relative path of the payload in the {@link ExternalPayloadStorage} @return the payload object @throws ApplicationException in case of JSON parsing errors or download errors
[ "Download", "the", "payload", "from", "the", "given", "path" ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/core/utils/ExternalPayloadStorageUtils.java#L65-L73
131,437
Netflix/conductor
es6-persistence/src/main/java/com/netflix/conductor/dao/es6/index/ElasticSearchDAOV6.java
ElasticSearchDAOV6.createIndexesTemplates
private void createIndexesTemplates() { try { initIndexesTemplates(); updateIndexesNames(); Executors.newScheduledThreadPool(1).scheduleAtFixedRate(this::updateIndexesNames, 0, 1, TimeUnit.HOURS); } catch (Exception e) { logger.error(e.getMessage(), e); ...
java
private void createIndexesTemplates() { try { initIndexesTemplates(); updateIndexesNames(); Executors.newScheduledThreadPool(1).scheduleAtFixedRate(this::updateIndexesNames, 0, 1, TimeUnit.HOURS); } catch (Exception e) { logger.error(e.getMessage(), e); ...
[ "private", "void", "createIndexesTemplates", "(", ")", "{", "try", "{", "initIndexesTemplates", "(", ")", ";", "updateIndexesNames", "(", ")", ";", "Executors", ".", "newScheduledThreadPool", "(", "1", ")", ".", "scheduleAtFixedRate", "(", "this", "::", "updateI...
Initializes the indexes templates task_log, message and event, and mappings.
[ "Initializes", "the", "indexes", "templates", "task_log", "message", "and", "event", "and", "mappings", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/es6-persistence/src/main/java/com/netflix/conductor/dao/es6/index/ElasticSearchDAOV6.java#L181-L189
131,438
Netflix/conductor
client/src/main/java/com/netflix/conductor/client/http/MetadataClient.java
MetadataClient.unregisterWorkflowDef
public void unregisterWorkflowDef(String name, Integer version) { Preconditions.checkArgument(StringUtils.isNotBlank(name), "Workflow name cannot be blank"); Preconditions.checkNotNull(version, "Version cannot be null"); delete("metadata/workflow/{name}/{version}", name, version); }
java
public void unregisterWorkflowDef(String name, Integer version) { Preconditions.checkArgument(StringUtils.isNotBlank(name), "Workflow name cannot be blank"); Preconditions.checkNotNull(version, "Version cannot be null"); delete("metadata/workflow/{name}/{version}", name, version); }
[ "public", "void", "unregisterWorkflowDef", "(", "String", "name", ",", "Integer", "version", ")", "{", "Preconditions", ".", "checkArgument", "(", "StringUtils", ".", "isNotBlank", "(", "name", ")", ",", "\"Workflow name cannot be blank\"", ")", ";", "Preconditions"...
Removes the workflow definition of a workflow from the conductor server. It does not remove associated workflows. Use with caution. @param name Name of the workflow to be unregistered. @param version Version of the workflow definition to be unregistered.
[ "Removes", "the", "workflow", "definition", "of", "a", "workflow", "from", "the", "conductor", "server", ".", "It", "does", "not", "remove", "associated", "workflows", ".", "Use", "with", "caution", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/client/src/main/java/com/netflix/conductor/client/http/MetadataClient.java#L127-L131
131,439
Netflix/conductor
es5-persistence/src/main/java/com/netflix/conductor/dao/es5/index/ElasticSearchRestDAOV5.java
ElasticSearchRestDAOV5.waitForHealthyCluster
private void waitForHealthyCluster() throws Exception { Map<String, String> params = new HashMap<>(); params.put("wait_for_status", this.clusterHealthColor); params.put("timeout", "30s"); elasticSearchAdminClient.performRequest("GET", "/_cluster/health", params); }
java
private void waitForHealthyCluster() throws Exception { Map<String, String> params = new HashMap<>(); params.put("wait_for_status", this.clusterHealthColor); params.put("timeout", "30s"); elasticSearchAdminClient.performRequest("GET", "/_cluster/health", params); }
[ "private", "void", "waitForHealthyCluster", "(", ")", "throws", "Exception", "{", "Map", "<", "String", ",", "String", ">", "params", "=", "new", "HashMap", "<>", "(", ")", ";", "params", ".", "put", "(", "\"wait_for_status\"", ",", "this", ".", "clusterHe...
Waits for the ES cluster to become green. @throws Exception If there is an issue connecting with the ES cluster.
[ "Waits", "for", "the", "ES", "cluster", "to", "become", "green", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/es5-persistence/src/main/java/com/netflix/conductor/dao/es5/index/ElasticSearchRestDAOV5.java#L173-L179
131,440
Netflix/conductor
es5-persistence/src/main/java/com/netflix/conductor/dao/es5/index/ElasticSearchRestDAOV5.java
ElasticSearchRestDAOV5.updateIndexName
private void updateIndexName() { this.logIndexName = this.logIndexPrefix + "_" + SIMPLE_DATE_FORMAT.format(new Date()); try { addIndex(logIndexName); } catch (IOException e) { logger.error("Failed to update log index name: {}", logIndexName, e); } }
java
private void updateIndexName() { this.logIndexName = this.logIndexPrefix + "_" + SIMPLE_DATE_FORMAT.format(new Date()); try { addIndex(logIndexName); } catch (IOException e) { logger.error("Failed to update log index name: {}", logIndexName, e); } }
[ "private", "void", "updateIndexName", "(", ")", "{", "this", ".", "logIndexName", "=", "this", ".", "logIndexPrefix", "+", "\"_\"", "+", "SIMPLE_DATE_FORMAT", ".", "format", "(", "new", "Date", "(", ")", ")", ";", "try", "{", "addIndex", "(", "logIndexName...
Roll the tasklog index daily.
[ "Roll", "the", "tasklog", "index", "daily", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/es5-persistence/src/main/java/com/netflix/conductor/dao/es5/index/ElasticSearchRestDAOV5.java#L184-L192
131,441
Netflix/conductor
es5-persistence/src/main/java/com/netflix/conductor/dao/es5/index/ElasticSearchRestDAOV5.java
ElasticSearchRestDAOV5.addIndex
private void addIndex(final String index) throws IOException { logger.info("Adding index '{}'...", index); String resourcePath = "/" + index; if (doesResourceNotExist(resourcePath)) { try { elasticSearchAdminClient.performRequest(HttpMethod.PUT, resourcePath); ...
java
private void addIndex(final String index) throws IOException { logger.info("Adding index '{}'...", index); String resourcePath = "/" + index; if (doesResourceNotExist(resourcePath)) { try { elasticSearchAdminClient.performRequest(HttpMethod.PUT, resourcePath); ...
[ "private", "void", "addIndex", "(", "final", "String", "index", ")", "throws", "IOException", "{", "logger", ".", "info", "(", "\"Adding index '{}'...\"", ",", "index", ")", ";", "String", "resourcePath", "=", "\"/\"", "+", "index", ";", "if", "(", "doesReso...
Adds an index to elasticsearch if it does not exist. @param index The name of the index to create. @throws IOException If an error occurred during requests to ES.
[ "Adds", "an", "index", "to", "elasticsearch", "if", "it", "does", "not", "exist", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/es5-persistence/src/main/java/com/netflix/conductor/dao/es5/index/ElasticSearchRestDAOV5.java#L220-L252
131,442
Netflix/conductor
es5-persistence/src/main/java/com/netflix/conductor/dao/es5/index/ElasticSearchRestDAOV5.java
ElasticSearchRestDAOV5.doesResourceExist
public boolean doesResourceExist(final String resourcePath) throws IOException { Response response = elasticSearchAdminClient.performRequest(HttpMethod.HEAD, resourcePath); return response.getStatusLine().getStatusCode() == HttpStatus.SC_OK; }
java
public boolean doesResourceExist(final String resourcePath) throws IOException { Response response = elasticSearchAdminClient.performRequest(HttpMethod.HEAD, resourcePath); return response.getStatusLine().getStatusCode() == HttpStatus.SC_OK; }
[ "public", "boolean", "doesResourceExist", "(", "final", "String", "resourcePath", ")", "throws", "IOException", "{", "Response", "response", "=", "elasticSearchAdminClient", ".", "performRequest", "(", "HttpMethod", ".", "HEAD", ",", "resourcePath", ")", ";", "retur...
Determines whether a resource exists in ES. This will call a GET method to a particular path and return true if status 200; false otherwise. @param resourcePath The path of the resource to get. @return True if it exists; false otherwise. @throws IOException If an error occurred during requests to ES.
[ "Determines", "whether", "a", "resource", "exists", "in", "ES", ".", "This", "will", "call", "a", "GET", "method", "to", "a", "particular", "path", "and", "return", "true", "if", "status", "200", ";", "false", "otherwise", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/es5-persistence/src/main/java/com/netflix/conductor/dao/es5/index/ElasticSearchRestDAOV5.java#L288-L291
131,443
Netflix/conductor
es5-persistence/src/main/java/com/netflix/conductor/dao/es5/index/ElasticSearchRestDAOV5.java
ElasticSearchRestDAOV5.searchObjectIds
private SearchResult<String> searchObjectIds(String indexName, QueryBuilder queryBuilder, int start, int size, List<String> sortOptions, String docType) throws IOException { SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder(); searchSourceBuilder.query(queryBuilder); searchSourc...
java
private SearchResult<String> searchObjectIds(String indexName, QueryBuilder queryBuilder, int start, int size, List<String> sortOptions, String docType) throws IOException { SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder(); searchSourceBuilder.query(queryBuilder); searchSourc...
[ "private", "SearchResult", "<", "String", ">", "searchObjectIds", "(", "String", "indexName", ",", "QueryBuilder", "queryBuilder", ",", "int", "start", ",", "int", "size", ",", "List", "<", "String", ">", "sortOptions", ",", "String", "docType", ")", "throws",...
Tries to find object ids for a given query in an index. @param indexName The name of the index. @param queryBuilder The query to use for searching. @param start The start to use. @param size The total return size. @param sortOptions A list of string options to sort in the form VALUE:ORDER; where ORDER is optional and ...
[ "Tries", "to", "find", "object", "ids", "for", "a", "given", "query", "in", "an", "index", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/es5-persistence/src/main/java/com/netflix/conductor/dao/es5/index/ElasticSearchRestDAOV5.java#L560-L592
131,444
Netflix/conductor
es5-persistence/src/main/java/com/netflix/conductor/dao/es5/index/ElasticSearchRestDAOV5.java
ElasticSearchRestDAOV5.indexWithRetry
private void indexWithRetry(final IndexRequest request, final String operationDescription) { try { new RetryUtil<IndexResponse>().retryOnException(() -> { try { return elasticSearchClient.index(request); } catch (IOException e) { ...
java
private void indexWithRetry(final IndexRequest request, final String operationDescription) { try { new RetryUtil<IndexResponse>().retryOnException(() -> { try { return elasticSearchClient.index(request); } catch (IOException e) { ...
[ "private", "void", "indexWithRetry", "(", "final", "IndexRequest", "request", ",", "final", "String", "operationDescription", ")", "{", "try", "{", "new", "RetryUtil", "<", "IndexResponse", ">", "(", ")", ".", "retryOnException", "(", "(", ")", "->", "{", "t...
Performs an index operation with a retry. @param request The index request that we want to perform. @param operationDescription The type of operation that we are performing.
[ "Performs", "an", "index", "operation", "with", "a", "retry", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/es5-persistence/src/main/java/com/netflix/conductor/dao/es5/index/ElasticSearchRestDAOV5.java#L661-L675
131,445
Netflix/conductor
redis-persistence/src/main/java/com/netflix/conductor/dao/dynomite/RedisMetadataDAO.java
RedisMetadataDAO.addEventHandler
@Override public void addEventHandler(EventHandler eventHandler) { Preconditions.checkNotNull(eventHandler.getName(), "Missing Name"); if(getEventHandler(eventHandler.getName()) != null) { throw new ApplicationException(Code.CONFLICT, "EventHandler with name " + eventHandler.getName() + " already exists!"); }...
java
@Override public void addEventHandler(EventHandler eventHandler) { Preconditions.checkNotNull(eventHandler.getName(), "Missing Name"); if(getEventHandler(eventHandler.getName()) != null) { throw new ApplicationException(Code.CONFLICT, "EventHandler with name " + eventHandler.getName() + " already exists!"); }...
[ "@", "Override", "public", "void", "addEventHandler", "(", "EventHandler", "eventHandler", ")", "{", "Preconditions", ".", "checkNotNull", "(", "eventHandler", ".", "getName", "(", ")", ",", "\"Missing Name\"", ")", ";", "if", "(", "getEventHandler", "(", "event...
Event Handler APIs
[ "Event", "Handler", "APIs" ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/redis-persistence/src/main/java/com/netflix/conductor/dao/dynomite/RedisMetadataDAO.java#L286-L295
131,446
Netflix/conductor
client/src/main/java/com/netflix/conductor/client/http/WorkflowClient.java
WorkflowClient.populateWorkflowOutput
private void populateWorkflowOutput(Workflow workflow) { if (StringUtils.isNotBlank(workflow.getExternalOutputPayloadStoragePath())) { WorkflowTaskMetrics.incrementExternalPayloadUsedCount(workflow.getWorkflowName(), ExternalPayloadStorage.Operation.READ.name(), ExternalPayloadStorage.PayloadType.WO...
java
private void populateWorkflowOutput(Workflow workflow) { if (StringUtils.isNotBlank(workflow.getExternalOutputPayloadStoragePath())) { WorkflowTaskMetrics.incrementExternalPayloadUsedCount(workflow.getWorkflowName(), ExternalPayloadStorage.Operation.READ.name(), ExternalPayloadStorage.PayloadType.WO...
[ "private", "void", "populateWorkflowOutput", "(", "Workflow", "workflow", ")", "{", "if", "(", "StringUtils", ".", "isNotBlank", "(", "workflow", ".", "getExternalOutputPayloadStoragePath", "(", ")", ")", ")", "{", "WorkflowTaskMetrics", ".", "incrementExternalPayload...
Populates the workflow output from external payload storage if the external storage path is specified. @param workflow the workflow for which the output is to be populated.
[ "Populates", "the", "workflow", "output", "from", "external", "payload", "storage", "if", "the", "external", "storage", "path", "is", "specified", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/client/src/main/java/com/netflix/conductor/client/http/WorkflowClient.java#L176-L181
131,447
Netflix/conductor
client/src/main/java/com/netflix/conductor/client/http/WorkflowClient.java
WorkflowClient.getRunningWorkflow
public List<String> getRunningWorkflow(String workflowName, Integer version) { Preconditions.checkArgument(StringUtils.isNotBlank(workflowName), "Workflow name cannot be blank"); return getForEntity("workflow/running/{name}", new Object[]{"version", version}, new GenericType<List<String>>() { },...
java
public List<String> getRunningWorkflow(String workflowName, Integer version) { Preconditions.checkArgument(StringUtils.isNotBlank(workflowName), "Workflow name cannot be blank"); return getForEntity("workflow/running/{name}", new Object[]{"version", version}, new GenericType<List<String>>() { },...
[ "public", "List", "<", "String", ">", "getRunningWorkflow", "(", "String", "workflowName", ",", "Integer", "version", ")", "{", "Preconditions", ".", "checkArgument", "(", "StringUtils", ".", "isNotBlank", "(", "workflowName", ")", ",", "\"Workflow name cannot be bl...
Retrieve all running workflow instances for a given name and version @param workflowName the name of the workflow @param version the version of the wokflow definition. Defaults to 1. @return the list of running workflow instances
[ "Retrieve", "all", "running", "workflow", "instances", "for", "a", "given", "name", "and", "version" ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/client/src/main/java/com/netflix/conductor/client/http/WorkflowClient.java#L203-L207
131,448
Netflix/conductor
client/src/main/java/com/netflix/conductor/client/http/WorkflowClient.java
WorkflowClient.runDecider
public void runDecider(String workflowId) { Preconditions.checkArgument(StringUtils.isNotBlank(workflowId), "workflow id cannot be blank"); put("workflow/decide/{workflowId}", null, null, workflowId); }
java
public void runDecider(String workflowId) { Preconditions.checkArgument(StringUtils.isNotBlank(workflowId), "workflow id cannot be blank"); put("workflow/decide/{workflowId}", null, null, workflowId); }
[ "public", "void", "runDecider", "(", "String", "workflowId", ")", "{", "Preconditions", ".", "checkArgument", "(", "StringUtils", ".", "isNotBlank", "(", "workflowId", ")", ",", "\"workflow id cannot be blank\"", ")", ";", "put", "(", "\"workflow/decide/{workflowId}\"...
Starts the decision task for the given workflow instance @param workflowId the id of the workflow instance
[ "Starts", "the", "decision", "task", "for", "the", "given", "workflow", "instance" ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/client/src/main/java/com/netflix/conductor/client/http/WorkflowClient.java#L233-L236
131,449
Netflix/conductor
jersey/src/main/java/com/netflix/conductor/server/resources/WorkflowBulkResource.java
WorkflowBulkResource.resumeWorkflow
@PUT @Path("/resume") @ApiOperation("Resume the list of workflows") public BulkResponse resumeWorkflow(List<String> workflowIds) { return workflowBulkService.resumeWorkflow(workflowIds); }
java
@PUT @Path("/resume") @ApiOperation("Resume the list of workflows") public BulkResponse resumeWorkflow(List<String> workflowIds) { return workflowBulkService.resumeWorkflow(workflowIds); }
[ "@", "PUT", "@", "Path", "(", "\"/resume\"", ")", "@", "ApiOperation", "(", "\"Resume the list of workflows\"", ")", "public", "BulkResponse", "resumeWorkflow", "(", "List", "<", "String", ">", "workflowIds", ")", "{", "return", "workflowBulkService", ".", "resume...
Resume the list of workflows. @param workflowIds - list of workflow Ids to perform resume operation on @return bulk response object containing a list of succeeded workflows and a list of failed ones with errors
[ "Resume", "the", "list", "of", "workflows", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/jersey/src/main/java/com/netflix/conductor/server/resources/WorkflowBulkResource.java#L74-L79
131,450
Netflix/conductor
jersey/src/main/java/com/netflix/conductor/server/resources/WorkflowBulkResource.java
WorkflowBulkResource.retry
@POST @Path("/retry") @ApiOperation("Retry the last failed task for each workflow from the list") public BulkResponse retry(List<String> workflowIds) { return workflowBulkService.retry(workflowIds); }
java
@POST @Path("/retry") @ApiOperation("Retry the last failed task for each workflow from the list") public BulkResponse retry(List<String> workflowIds) { return workflowBulkService.retry(workflowIds); }
[ "@", "POST", "@", "Path", "(", "\"/retry\"", ")", "@", "ApiOperation", "(", "\"Retry the last failed task for each workflow from the list\"", ")", "public", "BulkResponse", "retry", "(", "List", "<", "String", ">", "workflowIds", ")", "{", "return", "workflowBulkServi...
Retry the last failed task for each workflow from the list. @param workflowIds - list of workflow Ids to perform retry operation on @return bulk response object containing a list of succeeded workflows and a list of failed ones with errors
[ "Retry", "the", "last", "failed", "task", "for", "each", "workflow", "from", "the", "list", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/jersey/src/main/java/com/netflix/conductor/server/resources/WorkflowBulkResource.java#L100-L105
131,451
Netflix/conductor
core/src/main/java/com/netflix/conductor/service/AdminServiceImpl.java
AdminServiceImpl.getAllConfig
public Map<String, Object> getAllConfig() { Map<String, Object> map = config.getAll(); map.put("version", version); map.put("buildDate", buildDate); return map; }
java
public Map<String, Object> getAllConfig() { Map<String, Object> map = config.getAll(); map.put("version", version); map.put("buildDate", buildDate); return map; }
[ "public", "Map", "<", "String", ",", "Object", ">", "getAllConfig", "(", ")", "{", "Map", "<", "String", ",", "Object", ">", "map", "=", "config", ".", "getAll", "(", ")", ";", "map", ".", "put", "(", "\"version\"", ",", "version", ")", ";", "map",...
Get all the configuration parameters. @return all the configuration parameters.
[ "Get", "all", "the", "configuration", "parameters", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/AdminServiceImpl.java#L76-L81
131,452
Netflix/conductor
core/src/main/java/com/netflix/conductor/service/AdminServiceImpl.java
AdminServiceImpl.getListOfPendingTask
@Service public List<Task> getListOfPendingTask(String taskType, Integer start, Integer count) { List<Task> tasks = executionService.getPendingTasksForTaskType(taskType); int total = start + count; total = (tasks.size() > total) ? total : tasks.size(); if (start > tasks.size()) start...
java
@Service public List<Task> getListOfPendingTask(String taskType, Integer start, Integer count) { List<Task> tasks = executionService.getPendingTasksForTaskType(taskType); int total = start + count; total = (tasks.size() > total) ? total : tasks.size(); if (start > tasks.size()) start...
[ "@", "Service", "public", "List", "<", "Task", ">", "getListOfPendingTask", "(", "String", "taskType", ",", "Integer", "start", ",", "Integer", "count", ")", "{", "List", "<", "Task", ">", "tasks", "=", "executionService", ".", "getPendingTasksForTaskType", "(...
Get the list of pending tasks for a given task type. @param taskType Name of the task @param start Start index of pagination @param count Number of entries @return list of pending {@link Task}
[ "Get", "the", "list", "of", "pending", "tasks", "for", "a", "given", "task", "type", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/AdminServiceImpl.java#L91-L98
131,453
Netflix/conductor
core/src/main/java/com/netflix/conductor/service/AdminServiceImpl.java
AdminServiceImpl.requeueSweep
@Service public String requeueSweep(String workflowId) { boolean pushed = queueDAO.pushIfNotExists(WorkflowExecutor.DECIDER_QUEUE, workflowId, config.getSweepFrequency()); return pushed + "." + workflowId; }
java
@Service public String requeueSweep(String workflowId) { boolean pushed = queueDAO.pushIfNotExists(WorkflowExecutor.DECIDER_QUEUE, workflowId, config.getSweepFrequency()); return pushed + "." + workflowId; }
[ "@", "Service", "public", "String", "requeueSweep", "(", "String", "workflowId", ")", "{", "boolean", "pushed", "=", "queueDAO", ".", "pushIfNotExists", "(", "WorkflowExecutor", ".", "DECIDER_QUEUE", ",", "workflowId", ",", "config", ".", "getSweepFrequency", "(",...
Queue up all the running workflows for sweep. @param workflowId Id of the workflow @return the id of the workflow instance that can be use for tracking.
[ "Queue", "up", "all", "the", "running", "workflows", "for", "sweep", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/AdminServiceImpl.java#L106-L110
131,454
Netflix/conductor
common/src/main/java/com/netflix/conductor/common/utils/ConstraintParamUtil.java
ConstraintParamUtil.validateInputParam
public static List<String> validateInputParam(Map<String, Object> input, String taskName, WorkflowDef workflow) { ArrayList<String> errorList = new ArrayList<>(); for (Entry<String, Object> e : input.entrySet()) { Object value = e.getValue(); if (value instanceof String) { ...
java
public static List<String> validateInputParam(Map<String, Object> input, String taskName, WorkflowDef workflow) { ArrayList<String> errorList = new ArrayList<>(); for (Entry<String, Object> e : input.entrySet()) { Object value = e.getValue(); if (value instanceof String) { ...
[ "public", "static", "List", "<", "String", ">", "validateInputParam", "(", "Map", "<", "String", ",", "Object", ">", "input", ",", "String", "taskName", ",", "WorkflowDef", "workflow", ")", "{", "ArrayList", "<", "String", ">", "errorList", "=", "new", "Ar...
Validates inputParam and returns a list of errors if input is not valid. @param input {@link Map} of inputParameters @param taskName TaskName of inputParameters @param workflow WorkflowDef @return {@link List} of error strings.
[ "Validates", "inputParam", "and", "returns", "a", "list", "of", "errors", "if", "input", "is", "not", "valid", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/common/src/main/java/com/netflix/conductor/common/utils/ConstraintParamUtil.java#L23-L40
131,455
Netflix/conductor
core/src/main/java/com/netflix/conductor/core/utils/S3PayloadStorage.java
S3PayloadStorage.download
@Override public InputStream download(String path) { try { S3Object s3Object = s3Client.getObject(new GetObjectRequest(bucketName, path)); return s3Object.getObjectContent(); } catch (SdkClientException e) { String msg = "Error communicating with S3"; ...
java
@Override public InputStream download(String path) { try { S3Object s3Object = s3Client.getObject(new GetObjectRequest(bucketName, path)); return s3Object.getObjectContent(); } catch (SdkClientException e) { String msg = "Error communicating with S3"; ...
[ "@", "Override", "public", "InputStream", "download", "(", "String", "path", ")", "{", "try", "{", "S3Object", "s3Object", "=", "s3Client", ".", "getObject", "(", "new", "GetObjectRequest", "(", "bucketName", ",", "path", ")", ")", ";", "return", "s3Object",...
Downloads the payload stored in the s3 object. @param path the S3 key of the object @return an input stream containing the contents of the object Caller is expected to close the input stream.
[ "Downloads", "the", "payload", "stored", "in", "the", "s3", "object", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/core/utils/S3PayloadStorage.java#L143-L153
131,456
Netflix/conductor
es6-persistence/src/main/java/com/netflix/conductor/elasticsearch/query/parser/AbstractNode.java
AbstractNode.parse
private void parse() throws ParserException { //skip white spaces skipWhitespace(); try{ _parse(); }catch(Exception e){ System.out.println("\t" + this.getClass().getSimpleName() + "->" + this.toString()); if(!(e instanceof ParserException)){ throw new ParserException("Error parsing", e); }else{ ...
java
private void parse() throws ParserException { //skip white spaces skipWhitespace(); try{ _parse(); }catch(Exception e){ System.out.println("\t" + this.getClass().getSimpleName() + "->" + this.toString()); if(!(e instanceof ParserException)){ throw new ParserException("Error parsing", e); }else{ ...
[ "private", "void", "parse", "(", ")", "throws", "ParserException", "{", "//skip white spaces", "skipWhitespace", "(", ")", ";", "try", "{", "_parse", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "System", ".", "out", ".", "println", "(",...
Public stuff here
[ "Public", "stuff", "here" ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/es6-persistence/src/main/java/com/netflix/conductor/elasticsearch/query/parser/AbstractNode.java#L142-L156
131,457
Netflix/conductor
core/src/main/java/com/netflix/conductor/service/EventServiceImpl.java
EventServiceImpl.getEventHandlersForEvent
@Service public List<EventHandler> getEventHandlersForEvent(String event, boolean activeOnly) { return metadataService.getEventHandlersForEvent(event, activeOnly); }
java
@Service public List<EventHandler> getEventHandlersForEvent(String event, boolean activeOnly) { return metadataService.getEventHandlersForEvent(event, activeOnly); }
[ "@", "Service", "public", "List", "<", "EventHandler", ">", "getEventHandlersForEvent", "(", "String", "event", ",", "boolean", "activeOnly", ")", "{", "return", "metadataService", ".", "getEventHandlersForEvent", "(", "event", ",", "activeOnly", ")", ";", "}" ]
Get event handlers for a given event. @param event Event Name @param activeOnly `true|false` for active only events @return list of {@link EventHandler}
[ "Get", "event", "handlers", "for", "a", "given", "event", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/EventServiceImpl.java#L87-L90
131,458
Netflix/conductor
client/src/main/java/com/netflix/conductor/client/http/PayloadStorage.java
PayloadStorage.upload
@Override public void upload(String uri, InputStream payload, long payloadSize) { HttpURLConnection connection = null; try { URL url = new URI(uri).toURL(); connection = (HttpURLConnection) url.openConnection(); connection.setDoOutput(true); connectio...
java
@Override public void upload(String uri, InputStream payload, long payloadSize) { HttpURLConnection connection = null; try { URL url = new URI(uri).toURL(); connection = (HttpURLConnection) url.openConnection(); connection.setDoOutput(true); connectio...
[ "@", "Override", "public", "void", "upload", "(", "String", "uri", ",", "InputStream", "payload", ",", "long", "payloadSize", ")", "{", "HttpURLConnection", "connection", "=", "null", ";", "try", "{", "URL", "url", "=", "new", "URI", "(", "uri", ")", "."...
Uploads the payload to the uri specified. @param uri the location to which the object is to be uploaded @param payload an {@link InputStream} containing the json payload which is to be uploaded @param payloadSize the size of the json payload in bytes @throws ConductorClientException if the upload fails due...
[ "Uploads", "the", "payload", "to", "the", "uri", "specified", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/client/src/main/java/com/netflix/conductor/client/http/PayloadStorage.java#L77-L116
131,459
Netflix/conductor
client/src/main/java/com/netflix/conductor/client/http/PayloadStorage.java
PayloadStorage.download
@Override public InputStream download(String uri) { HttpURLConnection connection = null; String errorMsg; try { URL url = new URI(uri).toURL(); connection = (HttpURLConnection) url.openConnection(); connection.setDoOutput(false); // Check the ...
java
@Override public InputStream download(String uri) { HttpURLConnection connection = null; String errorMsg; try { URL url = new URI(uri).toURL(); connection = (HttpURLConnection) url.openConnection(); connection.setDoOutput(false); // Check the ...
[ "@", "Override", "public", "InputStream", "download", "(", "String", "uri", ")", "{", "HttpURLConnection", "connection", "=", "null", ";", "String", "errorMsg", ";", "try", "{", "URL", "url", "=", "new", "URI", "(", "uri", ")", ".", "toURL", "(", ")", ...
Downloads the payload from the given uri. @param uri the location from where the object is to be downloaded @return an inputstream of the payload in the external storage @throws ConductorClientException if the download fails due to an invalid path or an error from external storage
[ "Downloads", "the", "payload", "from", "the", "given", "uri", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/client/src/main/java/com/netflix/conductor/client/http/PayloadStorage.java#L125-L156
131,460
Netflix/conductor
mysql-persistence/src/main/java/com/netflix/conductor/dao/mysql/Query.java
Query.addParameters
public Query addParameters(Object... values) { for (Object v : values) { if (v instanceof String) { addParameter((String) v); } else if (v instanceof Integer) { addParameter((Integer) v); } else if (v instanceof Long) { addParam...
java
public Query addParameters(Object... values) { for (Object v : values) { if (v instanceof String) { addParameter((String) v); } else if (v instanceof Integer) { addParameter((Integer) v); } else if (v instanceof Long) { addParam...
[ "public", "Query", "addParameters", "(", "Object", "...", "values", ")", "{", "for", "(", "Object", "v", ":", "values", ")", "{", "if", "(", "v", "instanceof", "String", ")", "{", "addParameter", "(", "(", "String", ")", "v", ")", ";", "}", "else", ...
Add many primitive values at once. @param values The values to bind to the prepared statement. @return {@literal this} @throws IllegalArgumentException If a non-primitive/unsupported type is encountered.
[ "Add", "many", "primitive", "values", "at", "once", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/mysql-persistence/src/main/java/com/netflix/conductor/dao/mysql/Query.java#L172-L195
131,461
Netflix/conductor
mysql-persistence/src/main/java/com/netflix/conductor/dao/mysql/Query.java
Query.executeScalar
public <V> V executeScalar(Class<V> returnType) { try (ResultSet rs = executeQuery()) { if (!rs.next()) { Object value = null; if (Integer.class == returnType) { value = 0; } else if (Long.class == returnType) { ...
java
public <V> V executeScalar(Class<V> returnType) { try (ResultSet rs = executeQuery()) { if (!rs.next()) { Object value = null; if (Integer.class == returnType) { value = 0; } else if (Long.class == returnType) { ...
[ "public", "<", "V", ">", "V", "executeScalar", "(", "Class", "<", "V", ">", "returnType", ")", "{", "try", "(", "ResultSet", "rs", "=", "executeQuery", "(", ")", ")", "{", "if", "(", "!", "rs", ".", "next", "(", ")", ")", "{", "Object", "value", ...
Execute the PreparedStatement and return a single 'primitive' value from the ResultSet. @param returnType The type to return. @param <V> The type parameter to return a List of. @return A single result from the execution of the statement, as a type of {@literal returnType}. @throws ApplicationException {@literal retur...
[ "Execute", "the", "PreparedStatement", "and", "return", "a", "single", "primitive", "value", "from", "the", "ResultSet", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/mysql-persistence/src/main/java/com/netflix/conductor/dao/mysql/Query.java#L332-L350
131,462
Netflix/conductor
mysql-persistence/src/main/java/com/netflix/conductor/dao/mysql/Query.java
Query.executeScalarList
public <V> List<V> executeScalarList(Class<V> returnType) { try (ResultSet rs = executeQuery()) { List<V> values = new ArrayList<>(); while (rs.next()) { values.add(getScalarFromResultSet(rs, returnType)); } return values; } catch (SQLExcep...
java
public <V> List<V> executeScalarList(Class<V> returnType) { try (ResultSet rs = executeQuery()) { List<V> values = new ArrayList<>(); while (rs.next()) { values.add(getScalarFromResultSet(rs, returnType)); } return values; } catch (SQLExcep...
[ "public", "<", "V", ">", "List", "<", "V", ">", "executeScalarList", "(", "Class", "<", "V", ">", "returnType", ")", "{", "try", "(", "ResultSet", "rs", "=", "executeQuery", "(", ")", ")", "{", "List", "<", "V", ">", "values", "=", "new", "ArrayLis...
Execute the PreparedStatement and return a List of 'primitive' values from the ResultSet. @param returnType The type Class return a List of. @param <V> The type parameter to return a List of. @return A {@code List<returnType>}. @throws ApplicationException {@literal returnType} is unsupported, cannot be cast to from ...
[ "Execute", "the", "PreparedStatement", "and", "return", "a", "List", "of", "primitive", "values", "from", "the", "ResultSet", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/mysql-persistence/src/main/java/com/netflix/conductor/dao/mysql/Query.java#L362-L372
131,463
Netflix/conductor
mysql-persistence/src/main/java/com/netflix/conductor/dao/mysql/Query.java
Query.executeAndFetchFirst
public <V> V executeAndFetchFirst(Class<V> returnType) { Object o = executeScalar(); if (null == o) { return null; } return convert(o, returnType); }
java
public <V> V executeAndFetchFirst(Class<V> returnType) { Object o = executeScalar(); if (null == o) { return null; } return convert(o, returnType); }
[ "public", "<", "V", ">", "V", "executeAndFetchFirst", "(", "Class", "<", "V", ">", "returnType", ")", "{", "Object", "o", "=", "executeScalar", "(", ")", ";", "if", "(", "null", "==", "o", ")", "{", "return", "null", ";", "}", "return", "convert", ...
Execute the statement and return only the first record from the result set. @param returnType The Class to return. @param <V> The type parameter. @return An instance of {@literal <V>} from the result set.
[ "Execute", "the", "statement", "and", "return", "only", "the", "first", "record", "from", "the", "result", "set", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/mysql-persistence/src/main/java/com/netflix/conductor/dao/mysql/Query.java#L381-L387
131,464
Netflix/conductor
grpc-client/src/main/java/com/netflix/conductor/client/grpc/WorkflowClient.java
WorkflowClient.startWorkflow
public String startWorkflow(StartWorkflowRequest startWorkflowRequest) { Preconditions.checkNotNull(startWorkflowRequest, "StartWorkflowRequest cannot be null"); return stub.startWorkflow( protoMapper.toProto(startWorkflowRequest) ).getWorkflowId(); }
java
public String startWorkflow(StartWorkflowRequest startWorkflowRequest) { Preconditions.checkNotNull(startWorkflowRequest, "StartWorkflowRequest cannot be null"); return stub.startWorkflow( protoMapper.toProto(startWorkflowRequest) ).getWorkflowId(); }
[ "public", "String", "startWorkflow", "(", "StartWorkflowRequest", "startWorkflowRequest", ")", "{", "Preconditions", ".", "checkNotNull", "(", "startWorkflowRequest", ",", "\"StartWorkflowRequest cannot be null\"", ")", ";", "return", "stub", ".", "startWorkflow", "(", "p...
Starts a workflow @param startWorkflowRequest the {@link StartWorkflowRequest} object to start the workflow @return the id of the workflow instance that can be used for tracking
[ "Starts", "a", "workflow" ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/grpc-client/src/main/java/com/netflix/conductor/client/grpc/WorkflowClient.java#L34-L39
131,465
Netflix/conductor
grpc-client/src/main/java/com/netflix/conductor/client/grpc/WorkflowClient.java
WorkflowClient.pauseWorkflow
public void pauseWorkflow(String workflowId) { Preconditions.checkArgument(StringUtils.isNotBlank(workflowId), "workflow id cannot be blank"); stub.pauseWorkflow(WorkflowServicePb.PauseWorkflowRequest.newBuilder() .setWorkflowId(workflowId) .build() ); }
java
public void pauseWorkflow(String workflowId) { Preconditions.checkArgument(StringUtils.isNotBlank(workflowId), "workflow id cannot be blank"); stub.pauseWorkflow(WorkflowServicePb.PauseWorkflowRequest.newBuilder() .setWorkflowId(workflowId) .build() ); }
[ "public", "void", "pauseWorkflow", "(", "String", "workflowId", ")", "{", "Preconditions", ".", "checkArgument", "(", "StringUtils", ".", "isNotBlank", "(", "workflowId", ")", ",", "\"workflow id cannot be blank\"", ")", ";", "stub", ".", "pauseWorkflow", "(", "Wo...
Pause a workflow by workflow id @param workflowId the workflow id of the workflow to be paused
[ "Pause", "a", "workflow", "by", "workflow", "id" ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/grpc-client/src/main/java/com/netflix/conductor/client/grpc/WorkflowClient.java#L161-L167
131,466
Netflix/conductor
grpc-client/src/main/java/com/netflix/conductor/client/grpc/WorkflowClient.java
WorkflowClient.resumeWorkflow
public void resumeWorkflow(String workflowId) { Preconditions.checkArgument(StringUtils.isNotBlank(workflowId), "workflow id cannot be blank"); stub.resumeWorkflow(WorkflowServicePb.ResumeWorkflowRequest.newBuilder() .setWorkflowId(workflowId) .build() ); }
java
public void resumeWorkflow(String workflowId) { Preconditions.checkArgument(StringUtils.isNotBlank(workflowId), "workflow id cannot be blank"); stub.resumeWorkflow(WorkflowServicePb.ResumeWorkflowRequest.newBuilder() .setWorkflowId(workflowId) .build() ); }
[ "public", "void", "resumeWorkflow", "(", "String", "workflowId", ")", "{", "Preconditions", ".", "checkArgument", "(", "StringUtils", ".", "isNotBlank", "(", "workflowId", ")", ",", "\"workflow id cannot be blank\"", ")", ";", "stub", ".", "resumeWorkflow", "(", "...
Resume a paused workflow by workflow id @param workflowId the workflow id of the paused workflow
[ "Resume", "a", "paused", "workflow", "by", "workflow", "id" ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/grpc-client/src/main/java/com/netflix/conductor/client/grpc/WorkflowClient.java#L174-L180
131,467
Netflix/conductor
es6-persistence/src/main/java/com/netflix/conductor/elasticsearch/query/parser/ConstValue.java
ConstValue.readString
private String readString(InputStream is) throws Exception { char delim = (char)read(1)[0]; StringBuilder sb = new StringBuilder(); boolean valid = false; while(is.available() > 0){ char c = (char) is.read(); if(c == delim){ valid = true; break; } else if(c == '\\'){ // read the next charac...
java
private String readString(InputStream is) throws Exception { char delim = (char)read(1)[0]; StringBuilder sb = new StringBuilder(); boolean valid = false; while(is.available() > 0){ char c = (char) is.read(); if(c == delim){ valid = true; break; } else if(c == '\\'){ // read the next charac...
[ "private", "String", "readString", "(", "InputStream", "is", ")", "throws", "Exception", "{", "char", "delim", "=", "(", "char", ")", "read", "(", "1", ")", "[", "0", "]", ";", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "boolean...
Reads an escaped string @throws Exception
[ "Reads", "an", "escaped", "string" ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/es6-persistence/src/main/java/com/netflix/conductor/elasticsearch/query/parser/ConstValue.java#L98-L119
131,468
Netflix/conductor
mysql-persistence/src/main/java/com/netflix/conductor/dao/mysql/MySQLBaseDAO.java
MySQLBaseDAO.execute
protected void execute(Connection tx, String query, ExecuteFunction function) { try (Query q = new Query(objectMapper, tx, query)) { function.apply(q); } catch (SQLException ex) { throw new ApplicationException(ApplicationException.Code.BACKEND_ERROR, ex); } }
java
protected void execute(Connection tx, String query, ExecuteFunction function) { try (Query q = new Query(objectMapper, tx, query)) { function.apply(q); } catch (SQLException ex) { throw new ApplicationException(ApplicationException.Code.BACKEND_ERROR, ex); } }
[ "protected", "void", "execute", "(", "Connection", "tx", ",", "String", "query", ",", "ExecuteFunction", "function", ")", "{", "try", "(", "Query", "q", "=", "new", "Query", "(", "objectMapper", ",", "tx", ",", "query", ")", ")", "{", "function", ".", ...
Execute a statement with no expected return value within a given transaction. @param tx The transactional {@link Connection} to use. @param query The query string to prepare. @param function The functional callback to pass a {@link Query} to.
[ "Execute", "a", "statement", "with", "no", "expected", "return", "value", "within", "a", "given", "transaction", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/mysql-persistence/src/main/java/com/netflix/conductor/dao/mysql/MySQLBaseDAO.java#L195-L201
131,469
Netflix/conductor
core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java
WorkflowExecutor.validateWorkflow
private void validateWorkflow(WorkflowDef workflowDef, Map<String, Object> workflowInput, String externalStoragePath) { try { //Check if the input to the workflow is not null if (workflowInput == null && StringUtils.isBlank(externalStoragePath)) { LOGGER.error("The input ...
java
private void validateWorkflow(WorkflowDef workflowDef, Map<String, Object> workflowInput, String externalStoragePath) { try { //Check if the input to the workflow is not null if (workflowInput == null && StringUtils.isBlank(externalStoragePath)) { LOGGER.error("The input ...
[ "private", "void", "validateWorkflow", "(", "WorkflowDef", "workflowDef", ",", "Map", "<", "String", ",", "Object", ">", "workflowInput", ",", "String", "externalStoragePath", ")", "{", "try", "{", "//Check if the input to the workflow is not null", "if", "(", "workfl...
Performs validations for starting a workflow @throws ApplicationException if the validation fails
[ "Performs", "validations", "for", "starting", "a", "workflow" ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java#L313-L324
131,470
Netflix/conductor
core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java
WorkflowExecutor.taskToBeRescheduled
private Task taskToBeRescheduled(Task task) { Task taskToBeRetried = task.copy(); taskToBeRetried.setTaskId(IDGenerator.generate()); taskToBeRetried.setRetriedTaskId(task.getTaskId()); taskToBeRetried.setStatus(SCHEDULED); taskToBeRetried.setRetryCount(task.getRetryCount() + 1); ...
java
private Task taskToBeRescheduled(Task task) { Task taskToBeRetried = task.copy(); taskToBeRetried.setTaskId(IDGenerator.generate()); taskToBeRetried.setRetriedTaskId(task.getTaskId()); taskToBeRetried.setStatus(SCHEDULED); taskToBeRetried.setRetryCount(task.getRetryCount() + 1); ...
[ "private", "Task", "taskToBeRescheduled", "(", "Task", "task", ")", "{", "Task", "taskToBeRetried", "=", "task", ".", "copy", "(", ")", ";", "taskToBeRetried", ".", "setTaskId", "(", "IDGenerator", ".", "generate", "(", ")", ")", ";", "taskToBeRetried", ".",...
Reschedule a task @param task failed or cancelled task @return new instance of a task with "SCHEDULED" status
[ "Reschedule", "a", "task" ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java#L478-L489
131,471
Netflix/conductor
core/src/main/java/com/netflix/conductor/core/utils/JsonUtils.java
JsonUtils.expand
public Object expand(Object input) { if (input instanceof List) { expandList((List<Object>) input); return input; } else if (input instanceof Map) { expandMap((Map<String, Object>) input); return input; } else if (input instanceof String) { ...
java
public Object expand(Object input) { if (input instanceof List) { expandList((List<Object>) input); return input; } else if (input instanceof Map) { expandMap((Map<String, Object>) input); return input; } else if (input instanceof String) { ...
[ "public", "Object", "expand", "(", "Object", "input", ")", "{", "if", "(", "input", "instanceof", "List", ")", "{", "expandList", "(", "(", "List", "<", "Object", ">", ")", "input", ")", ";", "return", "input", ";", "}", "else", "if", "(", "input", ...
Expands a JSON object into a java object @param input the object to be expanded @return the expanded object containing java types like {@link Map} and {@link List}
[ "Expands", "a", "JSON", "object", "into", "a", "java", "object" ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/core/utils/JsonUtils.java#L43-L55
131,472
Netflix/conductor
core/src/main/java/com/netflix/conductor/core/utils/JsonUtils.java
JsonUtils.getJson
private Object getJson(String jsonAsString) { try { return objectMapper.readValue(jsonAsString, Object.class); } catch (Exception e) { logger.info("Unable to parse (json?) string: {}", jsonAsString, e); return jsonAsString; } }
java
private Object getJson(String jsonAsString) { try { return objectMapper.readValue(jsonAsString, Object.class); } catch (Exception e) { logger.info("Unable to parse (json?) string: {}", jsonAsString, e); return jsonAsString; } }
[ "private", "Object", "getJson", "(", "String", "jsonAsString", ")", "{", "try", "{", "return", "objectMapper", ".", "readValue", "(", "jsonAsString", ",", "Object", ".", "class", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "logger", ".", "in...
Used to obtain a JSONified object from a string @param jsonAsString the json object represented in string form @return the JSONified object representation if the input is a valid json string if the input is not a valid json string, it will be returned as-is and no exception is thrown
[ "Used", "to", "obtain", "a", "JSONified", "object", "from", "a", "string" ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/core/utils/JsonUtils.java#L90-L97
131,473
Netflix/conductor
core/src/main/java/com/netflix/conductor/service/utils/ServiceUtils.java
ServiceUtils.convertStringToList
public static List<String> convertStringToList(String inputStr) { List<String> list = new ArrayList<String>(); if (StringUtils.isNotBlank(inputStr)) { list = Arrays.asList(inputStr.split("\\|")); } return list; }
java
public static List<String> convertStringToList(String inputStr) { List<String> list = new ArrayList<String>(); if (StringUtils.isNotBlank(inputStr)) { list = Arrays.asList(inputStr.split("\\|")); } return list; }
[ "public", "static", "List", "<", "String", ">", "convertStringToList", "(", "String", "inputStr", ")", "{", "List", "<", "String", ">", "list", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "if", "(", "StringUtils", ".", "isNotBlank", "(", ...
Split string with "|" as delimiter. @param inputStr Input string @return List of String
[ "Split", "string", "with", "|", "as", "delimiter", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/utils/ServiceUtils.java#L35-L41
131,474
Netflix/conductor
core/src/main/java/com/netflix/conductor/service/utils/ServiceUtils.java
ServiceUtils.checkArgument
public static void checkArgument(boolean condition, String errorMessage){ if(!condition) { throw new ApplicationException(ApplicationException.Code.INVALID_INPUT, errorMessage); } }
java
public static void checkArgument(boolean condition, String errorMessage){ if(!condition) { throw new ApplicationException(ApplicationException.Code.INVALID_INPUT, errorMessage); } }
[ "public", "static", "void", "checkArgument", "(", "boolean", "condition", ",", "String", "errorMessage", ")", "{", "if", "(", "!", "condition", ")", "{", "throw", "new", "ApplicationException", "(", "ApplicationException", ".", "Code", ".", "INVALID_INPUT", ",",...
Ensures the truth of an condition involving one or more parameters to the calling method. @param condition a boolean expression @param errorMessage The exception message use if the input condition is not valid @throws com.netflix.conductor.core.execution.ApplicationException if input condition is not valid
[ "Ensures", "the", "truth", "of", "an", "condition", "involving", "one", "or", "more", "parameters", "to", "the", "calling", "method", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/utils/ServiceUtils.java#L50-L54
131,475
Netflix/conductor
core/src/main/java/com/netflix/conductor/service/utils/ServiceUtils.java
ServiceUtils.checkNotNullOrEmpty
public static void checkNotNullOrEmpty(Map<?, ?> map, String errorMessage) { if(map == null || map.isEmpty()) { throw new ApplicationException(ApplicationException.Code.INVALID_INPUT, errorMessage); } }
java
public static void checkNotNullOrEmpty(Map<?, ?> map, String errorMessage) { if(map == null || map.isEmpty()) { throw new ApplicationException(ApplicationException.Code.INVALID_INPUT, errorMessage); } }
[ "public", "static", "void", "checkNotNullOrEmpty", "(", "Map", "<", "?", ",", "?", ">", "map", ",", "String", "errorMessage", ")", "{", "if", "(", "map", "==", "null", "||", "map", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "ApplicationExcepti...
This method checks if the input map is valid or not. @param map input of type {@link Map} @param errorMessage The exception message use if the map is empty or null @throws com.netflix.conductor.core.execution.ApplicationException if input map is not valid
[ "This", "method", "checks", "if", "the", "input", "map", "is", "valid", "or", "not", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/utils/ServiceUtils.java#L75-L79
131,476
Netflix/conductor
core/src/main/java/com/netflix/conductor/service/utils/ServiceUtils.java
ServiceUtils.checkNotNullOrEmpty
public static void checkNotNullOrEmpty(String input, String errorMessage) { try { Preconditions.checkArgument(StringUtils.isNotBlank(input), errorMessage); } catch (IllegalArgumentException exception) { throw new ApplicationException(ApplicationException.Code.INVALID_INPUT, error...
java
public static void checkNotNullOrEmpty(String input, String errorMessage) { try { Preconditions.checkArgument(StringUtils.isNotBlank(input), errorMessage); } catch (IllegalArgumentException exception) { throw new ApplicationException(ApplicationException.Code.INVALID_INPUT, error...
[ "public", "static", "void", "checkNotNullOrEmpty", "(", "String", "input", ",", "String", "errorMessage", ")", "{", "try", "{", "Preconditions", ".", "checkArgument", "(", "StringUtils", ".", "isNotBlank", "(", "input", ")", ",", "errorMessage", ")", ";", "}",...
This method checks it the input string is null or empty. @param input input of type {@link String} @param errorMessage The exception message use if the string is empty or null @throws com.netflix.conductor.core.execution.ApplicationException if input string is not valid
[ "This", "method", "checks", "it", "the", "input", "string", "is", "null", "or", "empty", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/utils/ServiceUtils.java#L88-L94
131,477
Netflix/conductor
core/src/main/java/com/netflix/conductor/service/utils/ServiceUtils.java
ServiceUtils.checkNotNull
public static void checkNotNull(Object object, String errorMessage){ try { Preconditions.checkNotNull(object, errorMessage); } catch (NullPointerException exception) { throw new ApplicationException(ApplicationException.Code.INVALID_INPUT, errorMessage); } }
java
public static void checkNotNull(Object object, String errorMessage){ try { Preconditions.checkNotNull(object, errorMessage); } catch (NullPointerException exception) { throw new ApplicationException(ApplicationException.Code.INVALID_INPUT, errorMessage); } }
[ "public", "static", "void", "checkNotNull", "(", "Object", "object", ",", "String", "errorMessage", ")", "{", "try", "{", "Preconditions", ".", "checkNotNull", "(", "object", ",", "errorMessage", ")", ";", "}", "catch", "(", "NullPointerException", "exception", ...
This method checks if the object is null or empty. @param object input of type {@link Object} @param errorMessage The exception message use if the object is empty or null @throws com.netflix.conductor.core.execution.ApplicationException if input object is not valid
[ "This", "method", "checks", "if", "the", "object", "is", "null", "or", "empty", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/utils/ServiceUtils.java#L102-L108
131,478
Netflix/conductor
client/src/main/java/com/netflix/conductor/client/http/ClientBase.java
ClientBase.clientResponseToString
private String clientResponseToString(ClientResponse response) { if (response == null) { return null; } StringBuilder builder = new StringBuilder(); builder.append("[status: ").append(response.getStatus()); builder.append(", media type: ").append(response.getType()); ...
java
private String clientResponseToString(ClientResponse response) { if (response == null) { return null; } StringBuilder builder = new StringBuilder(); builder.append("[status: ").append(response.getStatus()); builder.append(", media type: ").append(response.getType()); ...
[ "private", "String", "clientResponseToString", "(", "ClientResponse", "response", ")", "{", "if", "(", "response", "==", "null", ")", "{", "return", "null", ";", "}", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ")", ";", "builder", ".", "ap...
Converts ClientResponse object to string with detailed debug information including status code, media type, response headers, and response body if exists.
[ "Converts", "ClientResponse", "object", "to", "string", "with", "detailed", "debug", "information", "including", "status", "code", "media", "type", "response", "headers", "and", "response", "body", "if", "exists", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/client/src/main/java/com/netflix/conductor/client/http/ClientBase.java#L291-L311
131,479
Netflix/conductor
es5-persistence/src/main/java/com/netflix/conductor/dao/es5/index/ElasticSearchDAOV5.java
ElasticSearchDAOV5.initIndex
private void initIndex() throws Exception { // 0. Add the tasklog template GetIndexTemplatesResponse result = elasticSearchClient.admin() .indices() .prepareGetTemplates("tasklog_template") .execute() .actionGet(); if (result.getIndexTemplates()....
java
private void initIndex() throws Exception { // 0. Add the tasklog template GetIndexTemplatesResponse result = elasticSearchClient.admin() .indices() .prepareGetTemplates("tasklog_template") .execute() .actionGet(); if (result.getIndexTemplates()....
[ "private", "void", "initIndex", "(", ")", "throws", "Exception", "{", "// 0. Add the tasklog template", "GetIndexTemplatesResponse", "result", "=", "elasticSearchClient", ".", "admin", "(", ")", ".", "indices", "(", ")", ".", "prepareGetTemplates", "(", "\"tasklog_tem...
Initializes the index with required templates and mappings.
[ "Initializes", "the", "index", "with", "required", "templates", "and", "mappings", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/es5-persistence/src/main/java/com/netflix/conductor/dao/es5/index/ElasticSearchDAOV5.java#L251-L277
131,480
Netflix/conductor
core/src/main/java/com/netflix/conductor/metrics/Monitors.java
Monitors.counter
private static void counter(String className, String name, String... additionalTags) { getCounter(className, name, additionalTags).increment(); }
java
private static void counter(String className, String name, String... additionalTags) { getCounter(className, name, additionalTags).increment(); }
[ "private", "static", "void", "counter", "(", "String", "className", ",", "String", "name", ",", "String", "...", "additionalTags", ")", "{", "getCounter", "(", "className", ",", "name", ",", "additionalTags", ")", ".", "increment", "(", ")", ";", "}" ]
Increment a counter that is used to measure the rate at which some event is occurring. Consider a simple queue, counters would be used to measure things like the rate at which items are being inserted and removed. @param className @param name @param additionalTags
[ "Increment", "a", "counter", "that", "is", "used", "to", "measure", "the", "rate", "at", "which", "some", "event", "is", "occurring", ".", "Consider", "a", "simple", "queue", "counters", "would", "be", "used", "to", "measure", "things", "like", "the", "rat...
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/metrics/Monitors.java#L82-L84
131,481
Netflix/conductor
core/src/main/java/com/netflix/conductor/metrics/Monitors.java
Monitors.gauge
private static void gauge(String className, String name, long measurement, String... additionalTags) { getGauge(className, name, additionalTags).getAndSet(measurement); }
java
private static void gauge(String className, String name, long measurement, String... additionalTags) { getGauge(className, name, additionalTags).getAndSet(measurement); }
[ "private", "static", "void", "gauge", "(", "String", "className", ",", "String", "name", ",", "long", "measurement", ",", "String", "...", "additionalTags", ")", "{", "getGauge", "(", "className", ",", "name", ",", "additionalTags", ")", ".", "getAndSet", "(...
Set a gauge is a handle to get the current value. Typical examples for gauges would be the size of a queue or number of threads in the running state. Since gauges are sampled, there is no information about what might have occurred between samples. @param className @param name @param measurement @param additionalTags
[ "Set", "a", "gauge", "is", "a", "handle", "to", "get", "the", "current", "value", ".", "Typical", "examples", "for", "gauges", "would", "be", "the", "size", "of", "a", "queue", "or", "number", "of", "threads", "in", "the", "running", "state", ".", "Sin...
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/metrics/Monitors.java#L97-L99
131,482
Netflix/conductor
grpc-client/src/main/java/com/netflix/conductor/client/grpc/TaskClient.java
TaskClient.batchPollTasksByTaskTypeAsync
public Iterator<Task> batchPollTasksByTaskTypeAsync(String taskType, String workerId, int count, int timeoutInMillisecond) { Preconditions.checkArgument(StringUtils.isNotBlank(taskType), "Task type cannot be blank"); Preconditions.checkArgument(StringUtils.isNotBlank(workerId), "Worker id cannot be blan...
java
public Iterator<Task> batchPollTasksByTaskTypeAsync(String taskType, String workerId, int count, int timeoutInMillisecond) { Preconditions.checkArgument(StringUtils.isNotBlank(taskType), "Task type cannot be blank"); Preconditions.checkArgument(StringUtils.isNotBlank(workerId), "Worker id cannot be blan...
[ "public", "Iterator", "<", "Task", ">", "batchPollTasksByTaskTypeAsync", "(", "String", "taskType", ",", "String", "workerId", ",", "int", "count", ",", "int", "timeoutInMillisecond", ")", "{", "Preconditions", ".", "checkArgument", "(", "StringUtils", ".", "isNot...
Perform a batch poll for tasks by task type. Batch size is configurable by count. Returns an iterator that streams tasks as they become available through GRPC. @param taskType Type of task to poll for @param workerId Name of the client worker. Used for logging. @param count Maxim...
[ "Perform", "a", "batch", "poll", "for", "tasks", "by", "task", "type", ".", "Batch", "size", "is", "configurable", "by", "count", ".", "Returns", "an", "iterator", "that", "streams", "tasks", "as", "they", "become", "available", "through", "GRPC", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/grpc-client/src/main/java/com/netflix/conductor/client/grpc/TaskClient.java#L73-L88
131,483
Netflix/conductor
grpc-client/src/main/java/com/netflix/conductor/client/grpc/TaskClient.java
TaskClient.updateTask
public void updateTask(TaskResult taskResult) { Preconditions.checkNotNull(taskResult, "Task result cannot be null"); stub.updateTask(TaskServicePb.UpdateTaskRequest.newBuilder() .setResult(protoMapper.toProto(taskResult)) .build() ); }
java
public void updateTask(TaskResult taskResult) { Preconditions.checkNotNull(taskResult, "Task result cannot be null"); stub.updateTask(TaskServicePb.UpdateTaskRequest.newBuilder() .setResult(protoMapper.toProto(taskResult)) .build() ); }
[ "public", "void", "updateTask", "(", "TaskResult", "taskResult", ")", "{", "Preconditions", ".", "checkNotNull", "(", "taskResult", ",", "\"Task result cannot be null\"", ")", ";", "stub", ".", "updateTask", "(", "TaskServicePb", ".", "UpdateTaskRequest", ".", "newB...
Updates the result of a task execution. @param taskResult TaskResults to be updated.
[ "Updates", "the", "result", "of", "a", "task", "execution", "." ]
78fae0ed9ddea22891f9eebb96a2ec0b2783dca0
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/grpc-client/src/main/java/com/netflix/conductor/client/grpc/TaskClient.java#L142-L148
131,484
Netflix/ribbon
ribbon-transport/src/main/java/com/netflix/ribbon/transport/netty/http/LoadBalancingHttpClient.java
LoadBalancingHttpClient.submit
public Observable<HttpClientResponse<O>> submit(Server server, final HttpClientRequest<I> request, final IClientConfig requestConfig) { return submit(server, request, null, requestConfig, getRxClientConfig(requestConfig)); }
java
public Observable<HttpClientResponse<O>> submit(Server server, final HttpClientRequest<I> request, final IClientConfig requestConfig) { return submit(server, request, null, requestConfig, getRxClientConfig(requestConfig)); }
[ "public", "Observable", "<", "HttpClientResponse", "<", "O", ">", ">", "submit", "(", "Server", "server", ",", "final", "HttpClientRequest", "<", "I", ">", "request", ",", "final", "IClientConfig", "requestConfig", ")", "{", "return", "submit", "(", "server", ...
Submit a request to run on a specific server @param server @param request @param requestConfig @return
[ "Submit", "a", "request", "to", "run", "on", "a", "specific", "server" ]
d15cd7715b0bf2f64ae6ca98c5e4d184f178e261
https://github.com/Netflix/ribbon/blob/d15cd7715b0bf2f64ae6ca98c5e4d184f178e261/ribbon-transport/src/main/java/com/netflix/ribbon/transport/netty/http/LoadBalancingHttpClient.java#L273-L275
131,485
Netflix/ribbon
ribbon-transport/src/main/java/com/netflix/ribbon/transport/netty/http/LoadBalancingHttpClient.java
LoadBalancingHttpClient.requestToOperation
protected ServerOperation<HttpClientResponse<O>> requestToOperation(final HttpClientRequest<I> request, final ClientConfig rxClientConfig) { Preconditions.checkNotNull(request); return new ServerOperation<HttpClientResponse<O>>() { final AtomicInteger count = new AtomicInteger(0); ...
java
protected ServerOperation<HttpClientResponse<O>> requestToOperation(final HttpClientRequest<I> request, final ClientConfig rxClientConfig) { Preconditions.checkNotNull(request); return new ServerOperation<HttpClientResponse<O>>() { final AtomicInteger count = new AtomicInteger(0); ...
[ "protected", "ServerOperation", "<", "HttpClientResponse", "<", "O", ">", ">", "requestToOperation", "(", "final", "HttpClientRequest", "<", "I", ">", "request", ",", "final", "ClientConfig", "rxClientConfig", ")", "{", "Preconditions", ".", "checkNotNull", "(", "...
Convert an HttpClientRequest to a ServerOperation @param server @param request @param rxClientConfig @return
[ "Convert", "an", "HttpClientRequest", "to", "a", "ServerOperation" ]
d15cd7715b0bf2f64ae6ca98c5e4d184f178e261
https://github.com/Netflix/ribbon/blob/d15cd7715b0bf2f64ae6ca98c5e4d184f178e261/ribbon-transport/src/main/java/com/netflix/ribbon/transport/netty/http/LoadBalancingHttpClient.java#L301-L331
131,486
Netflix/ribbon
ribbon-transport/src/main/java/com/netflix/ribbon/transport/netty/http/LoadBalancingHttpClient.java
LoadBalancingHttpClient.getRxClientConfig
private RxClient.ClientConfig getRxClientConfig(IClientConfig requestConfig) { if (requestConfig == null) { return DEFAULT_RX_CONFIG; } int requestReadTimeout = getProperty(IClientConfigKey.Keys.ReadTimeout, requestConfig, DefaultClientCo...
java
private RxClient.ClientConfig getRxClientConfig(IClientConfig requestConfig) { if (requestConfig == null) { return DEFAULT_RX_CONFIG; } int requestReadTimeout = getProperty(IClientConfigKey.Keys.ReadTimeout, requestConfig, DefaultClientCo...
[ "private", "RxClient", ".", "ClientConfig", "getRxClientConfig", "(", "IClientConfig", "requestConfig", ")", "{", "if", "(", "requestConfig", "==", "null", ")", "{", "return", "DEFAULT_RX_CONFIG", ";", "}", "int", "requestReadTimeout", "=", "getProperty", "(", "IC...
Construct an RxClient.ClientConfig from an IClientConfig @param requestConfig @return
[ "Construct", "an", "RxClient", ".", "ClientConfig", "from", "an", "IClientConfig" ]
d15cd7715b0bf2f64ae6ca98c5e4d184f178e261
https://github.com/Netflix/ribbon/blob/d15cd7715b0bf2f64ae6ca98c5e4d184f178e261/ribbon-transport/src/main/java/com/netflix/ribbon/transport/netty/http/LoadBalancingHttpClient.java#L339-L351
131,487
Netflix/ribbon
ribbon-transport/src/main/java/com/netflix/ribbon/transport/netty/http/LoadBalancingHttpClient.java
LoadBalancingHttpClient.submit
private Observable<HttpClientResponse<O>> submit(final Server server, final HttpClientRequest<I> request, final RetryHandler errorHandler, final IClientConfig requestConfig, final ClientConfig rxClientConfig) { RetryHandler retryHandler = errorHandler; if (retryHandler == null) { retryHandle...
java
private Observable<HttpClientResponse<O>> submit(final Server server, final HttpClientRequest<I> request, final RetryHandler errorHandler, final IClientConfig requestConfig, final ClientConfig rxClientConfig) { RetryHandler retryHandler = errorHandler; if (retryHandler == null) { retryHandle...
[ "private", "Observable", "<", "HttpClientResponse", "<", "O", ">", ">", "submit", "(", "final", "Server", "server", ",", "final", "HttpClientRequest", "<", "I", ">", "request", ",", "final", "RetryHandler", "errorHandler", ",", "final", "IClientConfig", "request...
Subject an operation to run in the load balancer @param request @param errorHandler @param requestConfig @param rxClientConfig @return
[ "Subject", "an", "operation", "to", "run", "in", "the", "load", "balancer" ]
d15cd7715b0bf2f64ae6ca98c5e4d184f178e261
https://github.com/Netflix/ribbon/blob/d15cd7715b0bf2f64ae6ca98c5e4d184f178e261/ribbon-transport/src/main/java/com/netflix/ribbon/transport/netty/http/LoadBalancingHttpClient.java#L397-L427
131,488
Netflix/ribbon
ribbon-transport/src/main/java/com/netflix/ribbon/transport/netty/http/LoadBalancingHttpClient.java
LoadBalancingHttpClient.submitToServerInURI
private Observable<HttpClientResponse<O>> submitToServerInURI( HttpClientRequest<I> request, IClientConfig requestConfig, ClientConfig config, RetryHandler errorHandler, ExecutionContext<HttpClientRequest<I>> context) { // First, determine server from the URI URI uri; tr...
java
private Observable<HttpClientResponse<O>> submitToServerInURI( HttpClientRequest<I> request, IClientConfig requestConfig, ClientConfig config, RetryHandler errorHandler, ExecutionContext<HttpClientRequest<I>> context) { // First, determine server from the URI URI uri; tr...
[ "private", "Observable", "<", "HttpClientResponse", "<", "O", ">", ">", "submitToServerInURI", "(", "HttpClientRequest", "<", "I", ">", "request", ",", "IClientConfig", "requestConfig", ",", "ClientConfig", "config", ",", "RetryHandler", "errorHandler", ",", "Execut...
Submits the request to the server indicated in the URI @param request @param requestConfig @param config @param errorHandler @param context @return
[ "Submits", "the", "request", "to", "the", "server", "indicated", "in", "the", "URI" ]
d15cd7715b0bf2f64ae6ca98c5e4d184f178e261
https://github.com/Netflix/ribbon/blob/d15cd7715b0bf2f64ae6ca98c5e4d184f178e261/ribbon-transport/src/main/java/com/netflix/ribbon/transport/netty/http/LoadBalancingHttpClient.java#L443-L474
131,489
Netflix/ribbon
ribbon-core/src/main/java/com/netflix/client/ClientException.java
ClientException.getErrorCodes
static public HashMap getErrorCodes ( Class clazz ) { HashMap map = new HashMap(23); // Use reflection to populte the erroCodeMap to have the reverse mapping // of error codes to symbolic names. Field flds[] = clazz.getDeclaredFields(); for (int i = 0; i < flds.length; i++) {...
java
static public HashMap getErrorCodes ( Class clazz ) { HashMap map = new HashMap(23); // Use reflection to populte the erroCodeMap to have the reverse mapping // of error codes to symbolic names. Field flds[] = clazz.getDeclaredFields(); for (int i = 0; i < flds.length; i++) {...
[ "static", "public", "HashMap", "getErrorCodes", "(", "Class", "clazz", ")", "{", "HashMap", "map", "=", "new", "HashMap", "(", "23", ")", ";", "// Use reflection to populte the erroCodeMap to have the reverse mapping", "// of error codes to symbolic names.", "Field", "flds"...
Return the codes that are defined on a subclass of our class. @param clazz a class that is a subclass of us. @return a hashmap of int error codes mapped to the string names.
[ "Return", "the", "codes", "that", "are", "defined", "on", "a", "subclass", "of", "our", "class", "." ]
d15cd7715b0bf2f64ae6ca98c5e4d184f178e261
https://github.com/Netflix/ribbon/blob/d15cd7715b0bf2f64ae6ca98c5e4d184f178e261/ribbon-core/src/main/java/com/netflix/client/ClientException.java#L154-L175
131,490
Netflix/ribbon
ribbon-loadbalancer/src/main/java/com/netflix/loadbalancer/AbstractServerPredicate.java
AbstractServerPredicate.getEligibleServers
public List<Server> getEligibleServers(List<Server> servers, Object loadBalancerKey) { if (loadBalancerKey == null) { return ImmutableList.copyOf(Iterables.filter(servers, this.getServerOnlyPredicate())); } else { List<Server> results = Lists.newArrayList(); ...
java
public List<Server> getEligibleServers(List<Server> servers, Object loadBalancerKey) { if (loadBalancerKey == null) { return ImmutableList.copyOf(Iterables.filter(servers, this.getServerOnlyPredicate())); } else { List<Server> results = Lists.newArrayList(); ...
[ "public", "List", "<", "Server", ">", "getEligibleServers", "(", "List", "<", "Server", ">", "servers", ",", "Object", "loadBalancerKey", ")", "{", "if", "(", "loadBalancerKey", "==", "null", ")", "{", "return", "ImmutableList", ".", "copyOf", "(", "Iterable...
Get servers filtered by this predicate from list of servers.
[ "Get", "servers", "filtered", "by", "this", "predicate", "from", "list", "of", "servers", "." ]
d15cd7715b0bf2f64ae6ca98c5e4d184f178e261
https://github.com/Netflix/ribbon/blob/d15cd7715b0bf2f64ae6ca98c5e4d184f178e261/ribbon-loadbalancer/src/main/java/com/netflix/loadbalancer/AbstractServerPredicate.java#L132-L144
131,491
Netflix/ribbon
ribbon-loadbalancer/src/main/java/com/netflix/loadbalancer/AbstractServerPredicate.java
AbstractServerPredicate.chooseRandomlyAfterFiltering
public Optional<Server> chooseRandomlyAfterFiltering(List<Server> servers) { List<Server> eligible = getEligibleServers(servers); if (eligible.size() == 0) { return Optional.absent(); } return Optional.of(eligible.get(random.nextInt(eligible.size()))); }
java
public Optional<Server> chooseRandomlyAfterFiltering(List<Server> servers) { List<Server> eligible = getEligibleServers(servers); if (eligible.size() == 0) { return Optional.absent(); } return Optional.of(eligible.get(random.nextInt(eligible.size()))); }
[ "public", "Optional", "<", "Server", ">", "chooseRandomlyAfterFiltering", "(", "List", "<", "Server", ">", "servers", ")", "{", "List", "<", "Server", ">", "eligible", "=", "getEligibleServers", "(", "servers", ")", ";", "if", "(", "eligible", ".", "size", ...
Choose a random server after the predicate filters a list of servers. Load balancer key is presumed to be null.
[ "Choose", "a", "random", "server", "after", "the", "predicate", "filters", "a", "list", "of", "servers", ".", "Load", "balancer", "key", "is", "presumed", "to", "be", "null", "." ]
d15cd7715b0bf2f64ae6ca98c5e4d184f178e261
https://github.com/Netflix/ribbon/blob/d15cd7715b0bf2f64ae6ca98c5e4d184f178e261/ribbon-loadbalancer/src/main/java/com/netflix/loadbalancer/AbstractServerPredicate.java#L167-L173
131,492
Netflix/ribbon
ribbon-loadbalancer/src/main/java/com/netflix/loadbalancer/AbstractServerPredicate.java
AbstractServerPredicate.chooseRoundRobinAfterFiltering
public Optional<Server> chooseRoundRobinAfterFiltering(List<Server> servers) { List<Server> eligible = getEligibleServers(servers); if (eligible.size() == 0) { return Optional.absent(); } return Optional.of(eligible.get(incrementAndGetModulo(eligible.size()))); }
java
public Optional<Server> chooseRoundRobinAfterFiltering(List<Server> servers) { List<Server> eligible = getEligibleServers(servers); if (eligible.size() == 0) { return Optional.absent(); } return Optional.of(eligible.get(incrementAndGetModulo(eligible.size()))); }
[ "public", "Optional", "<", "Server", ">", "chooseRoundRobinAfterFiltering", "(", "List", "<", "Server", ">", "servers", ")", "{", "List", "<", "Server", ">", "eligible", "=", "getEligibleServers", "(", "servers", ")", ";", "if", "(", "eligible", ".", "size",...
Choose a server in a round robin fashion after the predicate filters a list of servers. Load balancer key is presumed to be null.
[ "Choose", "a", "server", "in", "a", "round", "robin", "fashion", "after", "the", "predicate", "filters", "a", "list", "of", "servers", ".", "Load", "balancer", "key", "is", "presumed", "to", "be", "null", "." ]
d15cd7715b0bf2f64ae6ca98c5e4d184f178e261
https://github.com/Netflix/ribbon/blob/d15cd7715b0bf2f64ae6ca98c5e4d184f178e261/ribbon-loadbalancer/src/main/java/com/netflix/loadbalancer/AbstractServerPredicate.java#L179-L185
131,493
Netflix/ribbon
ribbon-loadbalancer/src/main/java/com/netflix/client/AbstractLoadBalancerAwareClient.java
AbstractLoadBalancerAwareClient.isRetriableException
@Deprecated protected boolean isRetriableException(Throwable e) { if (getRetryHandler() != null) { return getRetryHandler().isRetriableException(e, true); } return false; }
java
@Deprecated protected boolean isRetriableException(Throwable e) { if (getRetryHandler() != null) { return getRetryHandler().isRetriableException(e, true); } return false; }
[ "@", "Deprecated", "protected", "boolean", "isRetriableException", "(", "Throwable", "e", ")", "{", "if", "(", "getRetryHandler", "(", ")", "!=", "null", ")", "{", "return", "getRetryHandler", "(", ")", ".", "isRetriableException", "(", "e", ",", "true", ")"...
Determine if operation can be retried if an exception is thrown. For example, connect timeout related exceptions are typically retriable.
[ "Determine", "if", "operation", "can", "be", "retried", "if", "an", "exception", "is", "thrown", ".", "For", "example", "connect", "timeout", "related", "exceptions", "are", "typically", "retriable", "." ]
d15cd7715b0bf2f64ae6ca98c5e4d184f178e261
https://github.com/Netflix/ribbon/blob/d15cd7715b0bf2f64ae6ca98c5e4d184f178e261/ribbon-loadbalancer/src/main/java/com/netflix/client/AbstractLoadBalancerAwareClient.java#L72-L78
131,494
Netflix/ribbon
ribbon-loadbalancer/src/main/java/com/netflix/loadbalancer/DynamicServerListLoadBalancer.java
DynamicServerListLoadBalancer.updateAllServerList
protected void updateAllServerList(List<T> ls) { // other threads might be doing this - in which case, we pass if (serverListUpdateInProgress.compareAndSet(false, true)) { try { for (T s : ls) { s.setAlive(true); // set so that clients can start using thes...
java
protected void updateAllServerList(List<T> ls) { // other threads might be doing this - in which case, we pass if (serverListUpdateInProgress.compareAndSet(false, true)) { try { for (T s : ls) { s.setAlive(true); // set so that clients can start using thes...
[ "protected", "void", "updateAllServerList", "(", "List", "<", "T", ">", "ls", ")", "{", "// other threads might be doing this - in which case, we pass", "if", "(", "serverListUpdateInProgress", ".", "compareAndSet", "(", "false", ",", "true", ")", ")", "{", "try", "...
Update the AllServer list in the LoadBalancer if necessary and enabled @param ls
[ "Update", "the", "AllServer", "list", "in", "the", "LoadBalancer", "if", "necessary", "and", "enabled" ]
d15cd7715b0bf2f64ae6ca98c5e4d184f178e261
https://github.com/Netflix/ribbon/blob/d15cd7715b0bf2f64ae6ca98c5e4d184f178e261/ribbon-loadbalancer/src/main/java/com/netflix/loadbalancer/DynamicServerListLoadBalancer.java#L257-L272
131,495
Netflix/ribbon
ribbon-loadbalancer/src/main/java/com/netflix/loadbalancer/ServerListSubsetFilter.java
ServerListSubsetFilter.compare
@Override public int compare(T server1, T server2) { LoadBalancerStats lbStats = getLoadBalancerStats(); ServerStats stats1 = lbStats.getSingleServerStat(server1); ServerStats stats2 = lbStats.getSingleServerStat(server2); int failuresDiff = (int) (stats2.getFailureCount() - stats1.g...
java
@Override public int compare(T server1, T server2) { LoadBalancerStats lbStats = getLoadBalancerStats(); ServerStats stats1 = lbStats.getSingleServerStat(server1); ServerStats stats2 = lbStats.getSingleServerStat(server2); int failuresDiff = (int) (stats2.getFailureCount() - stats1.g...
[ "@", "Override", "public", "int", "compare", "(", "T", "server1", ",", "T", "server2", ")", "{", "LoadBalancerStats", "lbStats", "=", "getLoadBalancerStats", "(", ")", ";", "ServerStats", "stats1", "=", "lbStats", ".", "getSingleServerStat", "(", "server1", ")...
Function to sort the list by server health condition, with unhealthy servers before healthy servers. The servers are first sorted by failures count, and then concurrent connection count.
[ "Function", "to", "sort", "the", "list", "by", "server", "health", "condition", "with", "unhealthy", "servers", "before", "healthy", "servers", ".", "The", "servers", "are", "first", "sorted", "by", "failures", "count", "and", "then", "concurrent", "connection",...
d15cd7715b0bf2f64ae6ca98c5e4d184f178e261
https://github.com/Netflix/ribbon/blob/d15cd7715b0bf2f64ae6ca98c5e4d184f178e261/ribbon-loadbalancer/src/main/java/com/netflix/loadbalancer/ServerListSubsetFilter.java#L193-L204
131,496
Netflix/ribbon
ribbon-loadbalancer/src/main/java/com/netflix/client/ClientFactory.java
ClientFactory.createNamedClient
public static synchronized IClient createNamedClient(String name, Class<? extends IClientConfig> configClass) throws ClientException { IClientConfig config = getNamedConfig(name, configClass); return registerClientFromProperties(name, config); }
java
public static synchronized IClient createNamedClient(String name, Class<? extends IClientConfig> configClass) throws ClientException { IClientConfig config = getNamedConfig(name, configClass); return registerClientFromProperties(name, config); }
[ "public", "static", "synchronized", "IClient", "createNamedClient", "(", "String", "name", ",", "Class", "<", "?", "extends", "IClientConfig", ">", "configClass", ")", "throws", "ClientException", "{", "IClientConfig", "config", "=", "getNamedConfig", "(", "name", ...
Creates a named client using a IClientConfig instance created off the configClass class object passed in as the parameter. @throws ClientException if any error occurs, or if the client with the same name already exists
[ "Creates", "a", "named", "client", "using", "a", "IClientConfig", "instance", "created", "off", "the", "configClass", "class", "object", "passed", "in", "as", "the", "parameter", "." ]
d15cd7715b0bf2f64ae6ca98c5e4d184f178e261
https://github.com/Netflix/ribbon/blob/d15cd7715b0bf2f64ae6ca98c5e4d184f178e261/ribbon-loadbalancer/src/main/java/com/netflix/client/ClientFactory.java#L127-L130
131,497
Netflix/ribbon
ribbon-loadbalancer/src/main/java/com/netflix/client/ClientFactory.java
ClientFactory.getNamedLoadBalancer
public static synchronized ILoadBalancer getNamedLoadBalancer(String name, Class<? extends IClientConfig> configClass) { ILoadBalancer lb = namedLBMap.get(name); if (lb != null) { return lb; } else { try { lb = registerNamedLoadBalancerFromProperties(name,...
java
public static synchronized ILoadBalancer getNamedLoadBalancer(String name, Class<? extends IClientConfig> configClass) { ILoadBalancer lb = namedLBMap.get(name); if (lb != null) { return lb; } else { try { lb = registerNamedLoadBalancerFromProperties(name,...
[ "public", "static", "synchronized", "ILoadBalancer", "getNamedLoadBalancer", "(", "String", "name", ",", "Class", "<", "?", "extends", "IClientConfig", ">", "configClass", ")", "{", "ILoadBalancer", "lb", "=", "namedLBMap", ".", "get", "(", "name", ")", ";", "...
Get the load balancer associated with the name, or create one with an instance of configClass if does not exist @throws RuntimeException if any error occurs @see #registerNamedLoadBalancerFromProperties(String, Class)
[ "Get", "the", "load", "balancer", "associated", "with", "the", "name", "or", "create", "one", "with", "an", "instance", "of", "configClass", "if", "does", "not", "exist" ]
d15cd7715b0bf2f64ae6ca98c5e4d184f178e261
https://github.com/Netflix/ribbon/blob/d15cd7715b0bf2f64ae6ca98c5e4d184f178e261/ribbon-loadbalancer/src/main/java/com/netflix/client/ClientFactory.java#L158-L170
131,498
Netflix/ribbon
ribbon-core/src/main/java/com/netflix/client/ssl/URLSslContextFactory.java
URLSslContextFactory.createKeyStore
private static KeyStore createKeyStore(final URL storeFile, final String password) throws ClientSslSocketFactoryException { if(storeFile == null){ return null; } Preconditions.checkArgument(StringUtils.isNotEmpty(password), "Null keystore should have empty password, defined keystore mus...
java
private static KeyStore createKeyStore(final URL storeFile, final String password) throws ClientSslSocketFactoryException { if(storeFile == null){ return null; } Preconditions.checkArgument(StringUtils.isNotEmpty(password), "Null keystore should have empty password, defined keystore mus...
[ "private", "static", "KeyStore", "createKeyStore", "(", "final", "URL", "storeFile", ",", "final", "String", "password", ")", "throws", "ClientSslSocketFactoryException", "{", "if", "(", "storeFile", "==", "null", ")", "{", "return", "null", ";", "}", "Precondit...
Opens the specified key or trust store using the given password. In case of failure {@link com.netflix.client.ssl.ClientSslSocketFactoryException} is thrown, and wrapps the underlying cause exception. That could be: <ul> <li>KeyStoreException if the JRE doesn't support the standard Java Keystore format, in other words...
[ "Opens", "the", "specified", "key", "or", "trust", "store", "using", "the", "given", "password", "." ]
d15cd7715b0bf2f64ae6ca98c5e4d184f178e261
https://github.com/Netflix/ribbon/blob/d15cd7715b0bf2f64ae6ca98c5e4d184f178e261/ribbon-core/src/main/java/com/netflix/client/ssl/URLSslContextFactory.java#L98-L132
131,499
Netflix/ribbon
ribbon-loadbalancer/src/main/java/com/netflix/loadbalancer/RandomRule.java
RandomRule.choose
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE") public Server choose(ILoadBalancer lb, Object key) { if (lb == null) { return null; } Server server = null; while (server == null) { if (Thread.interrup...
java
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE") public Server choose(ILoadBalancer lb, Object key) { if (lb == null) { return null; } Server server = null; while (server == null) { if (Thread.interrup...
[ "@", "edu", ".", "umd", ".", "cs", ".", "findbugs", ".", "annotations", ".", "SuppressWarnings", "(", "value", "=", "\"RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE\"", ")", "public", "Server", "choose", "(", "ILoadBalancer", "lb", ",", "Object", "key", ")", "{", "if"...
Randomly choose from all living servers
[ "Randomly", "choose", "from", "all", "living", "servers" ]
d15cd7715b0bf2f64ae6ca98c5e4d184f178e261
https://github.com/Netflix/ribbon/blob/d15cd7715b0bf2f64ae6ca98c5e4d184f178e261/ribbon-loadbalancer/src/main/java/com/netflix/loadbalancer/RandomRule.java#L37-L84