Esempio n. 1
0
 @Override
 public URI createTaskLocation(Node node, TaskId taskId) {
   Preconditions.checkNotNull(node, "node is null");
   Preconditions.checkNotNull(taskId, "taskId is null");
   return uriBuilderFrom(node.getHttpUri())
       .appendPath("/v1/task")
       .appendPath(taskId.toString())
       .build();
 }
Esempio n. 2
0
 private void addRows(Builder table, Set<Node> nodes, NodeState state) {
   for (Node node : nodes) {
     table.addRow(
         node.getNodeIdentifier(),
         node.getHttpUri().toString(),
         getNodeVersion(node),
         isCoordinator(node),
         state.toString().toLowerCase());
   }
 }