Esempio n. 1
0
 @Override
 public Response addNode(final String clusterName, final String hostName) {
   Preconditions.checkNotNull(clusterName);
   Preconditions.checkNotNull(hostName);
   if (hiveManager.getCluster(clusterName) == null) {
     return Response.status(Response.Status.INTERNAL_SERVER_ERROR)
         .entity(clusterName + " cluster not found.")
         .build();
   }
   UUID uuid = hiveManager.addNode(clusterName, hostName);
   OperationState state = waitUntilOperationFinish(uuid);
   return createResponse(uuid, state);
 }