Package com.vmware.bdd.software.mgmt.thrift

Examples of com.vmware.bdd.software.mgmt.thrift.ClusterOperation$ClusterOperationTupleScheme


   public static ISoftwareManagementTask createThriftTask(String targetName,
         String specFileName, StatusUpdater statusUpdater,
         ManagementOperation managementOperation,
         ILockedClusterEntityManager lockClusterEntityMgr) {
      ClusterOperation clusterOperation = new ClusterOperation();
      switch (managementOperation) {
      case CREATE:
         clusterOperation.setAction(ClusterAction.CREATE);
         break;
      case RESIZE:
         clusterOperation.setAction(ClusterAction.CREATE);
         break;
      case QUERY:
         String clusterName = targetName.split("-")[0];
         boolean needQuery = checkAndResetNodePowerStatusChanged(clusterName,
               lockClusterEntityMgr.getClusterEntityMgr());
         if (needQuery) {
            clusterOperation.setAction(ClusterAction.QUERY);
            break;
         } else {
            return null;
         }
      case UPDATE:
         clusterOperation.setAction(ClusterAction.UPDATE);
         break;
      case START:
         clusterOperation.setAction(ClusterAction.START);
         break;
      case STOP:
         //When stop ironfan deployed cluster, don't need to stop
         //hadoop services, return directly.
         return null;
      case DESTROY:
         clusterOperation.setAction(ClusterAction.DESTROY);
         break;
      case CONFIGURE:
         clusterOperation.setAction(ClusterAction.CONFIGURE);
         break;
      default:
         return null;
      }
      clusterOperation.setTargetName(targetName);
      clusterOperation.setSpecFileName(specFileName);
      clusterOperation.setLogLevel(ClusterCmdUtil.getLogLevel());
      ThriftSoftwareManagementTask task =
            new ThriftSoftwareManagementTask(clusterOperation, statusUpdater,
                  lockClusterEntityMgr);
      return task;
   }
View Full Code Here


      client.close();
   }

   @Test(groups = { "software-management" })
   public void createCluster() {
      ClusterOperation clusterOperation = new ClusterOperation();
      clusterOperation.setAction(ClusterAction.CREATE);
      clusterOperation.setTargetName(clusterName);
      clusterOperation.setSpecFileName(configFileName);
      client.runClusterOperation(clusterOperation);
   }
View Full Code Here

      client.runClusterOperation(clusterOperation);
   }

   @Test(groups = { "software-management" })
   public void queryCluster() {
      ClusterOperation clusterOperation = new ClusterOperation();
      clusterOperation.setAction(ClusterAction.QUERY);
      clusterOperation.setTargetName(clusterName);
      clusterOperation.setSpecFileName(configFileName);
      client.runClusterOperation(clusterOperation);
   }
View Full Code Here

      client.runClusterOperation(clusterOperation);
   }

   @Test(groups = { "software-management" })
   public void updateCluster() {
      ClusterOperation clusterOperation = new ClusterOperation();
      clusterOperation.setAction(ClusterAction.UPDATE);
      clusterOperation.setTargetName(clusterName);
      clusterOperation.setSpecFileName(configFileName);
      client.runClusterOperation(clusterOperation);
   }
View Full Code Here

      client.runClusterOperation(clusterOperation);
   }

   @Test(groups = { "software-management" })
   public void startCluster() {
      ClusterOperation clusterOperation = new ClusterOperation();
      clusterOperation.setAction(ClusterAction.START);
      clusterOperation.setTargetName(clusterName);
      clusterOperation.setSpecFileName(configFileName);
      client.runClusterOperation(clusterOperation);
   }
View Full Code Here

      client.runClusterOperation(clusterOperation);
   }

   @Test(groups = { "software-management" })
   public void stopCluster() {
      ClusterOperation clusterOperation = new ClusterOperation();
      clusterOperation.setAction(ClusterAction.STOP);
      clusterOperation.setTargetName(clusterName);
      clusterOperation.setSpecFileName(configFileName);
      client.runClusterOperation(clusterOperation);
   }
View Full Code Here

      client.runClusterOperation(clusterOperation);
   }

   @Test(groups = { "software-management" })
   public void deleteCluster() {
      ClusterOperation clusterOperation = new ClusterOperation();
      clusterOperation.setAction(ClusterAction.DESTROY);
      clusterOperation.setTargetName(clusterName);
      clusterOperation.setSpecFileName(configFileName);
      client.runClusterOperation(clusterOperation);
   }
View Full Code Here

      client.runClusterOperation(clusterOperation);
   }

   @Test(groups = { "software-management" })
   public void configureCluster() {
      ClusterOperation clusterOperation = new ClusterOperation();
      clusterOperation.setAction(ClusterAction.CONFIGURE);
      clusterOperation.setTargetName(clusterName);
      clusterOperation.setSpecFileName(configFileName);
      client.runClusterOperation(clusterOperation);
   }
View Full Code Here

TOP

Related Classes of com.vmware.bdd.software.mgmt.thrift.ClusterOperation$ClusterOperationTupleScheme

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.