Package backtype.storm.metric.api

Examples of backtype.storm.metric.api.IMetricsConsumer$TaskInfo


        _context.getService().reconfigureDvsTask(dvSwitchMor, dvsSpec);
    }

    public TaskInfo updateVMWareDVSwitchGetTask(ManagedObjectReference dvSwitchMor, VMwareDVSConfigSpec dvsSpec) throws Exception {
        ManagedObjectReference task = _context.getService().reconfigureDvsTask(dvSwitchMor, dvsSpec);
        TaskInfo info = (TaskInfo)(_context.getVimClient().getDynamicProperty(task, "info"));
        _context.getVimClient().waitForTask(task);
        return info;
    }
View Full Code Here


    return dcMo.findDatastore(tokens[1]);
  }

  public void waitForTaskProgressDone(ManagedObjectReference morTask) throws Exception {
    while(true) {
      TaskInfo tinfo = (TaskInfo)_vimClient.getDynamicProperty(morTask, "info");
      Integer progress = tinfo.getProgress();
      if(progress == null)
        break;

      if(progress.intValue() >= 100)
        break;
View Full Code Here

                        throw new RuntimeException(getInfoException);
                    }
                }

                try {
                    TaskInfo tInfo = (TaskInfo) getDynamicProperty(task, "info");
                    if (tInfo != null) {
                        tState = tInfo.getState();
                    }
                } catch (Exception e) {
                    // silently catch 3 exceptions
                    getInfoException = e;
                }
View Full Code Here

   
    public static String getTaskFailureInfo(VmwareContext context, ManagedObjectReference morTask) {
      StringBuffer sb = new StringBuffer();
     
      try {
        TaskInfo info = (TaskInfo)context.getServiceUtil().getDynamicProperty(morTask, "info");
        if(info != null) {
          LocalizedMethodFault fault = info.getError();
          if(fault != null) {
            sb.append(fault.getLocalizedMessage()).append(" ");
           
            if(fault.getFault() != null)
              sb.append(fault.getFault().getClass().getName());
View Full Code Here

    return dcMo.findDatastore(tokens[1]);
  }
 
  public void waitForTaskProgressDone(ManagedObjectReference morTask) throws Exception {
    while(true) {
      TaskInfo tinfo = (TaskInfo)getServiceUtil().getDynamicProperty(morTask, "info");
      Integer progress = tinfo.getProgress();
      if(progress == null)
        break;
     
      if(progress.intValue() >= 100)
        break;
View Full Code Here

    return dcMo.findDatastore(tokens[1]);
  }

  public void waitForTaskProgressDone(ManagedObjectReference morTask) throws Exception {
    while(true) {
      TaskInfo tinfo = (TaskInfo)_vimClient.getDynamicProperty(morTask, "info");
      Integer progress = tinfo.getProgress();
      if(progress == null)
        break;

      if(progress.intValue() >= 100)
        break;
View Full Code Here

    {        
      return SUCCESS;
    }
    else
    {
      TaskInfo tinfo = (TaskInfo) getCurrentProperty(PROPNAME_INFO);        
      LocalizedMethodFault fault = tinfo.getError();
      String error = "Error Occured";
      if(fault!=null)
      {
        MethodFault mf = fault.getFault();
        throw mf;
View Full Code Here

            // wait if there are already VM snapshot task running
            ManagedObjectReference taskmgr = context.getServiceContent().getTaskManager();
            List<ManagedObjectReference> tasks = (ArrayList<ManagedObjectReference>)context.getVimClient().getDynamicProperty(taskmgr, "recentTask");
            for (ManagedObjectReference taskMor : tasks) {
                TaskInfo info = (TaskInfo) (context.getVimClient().getDynamicProperty(taskMor, "info"));
                if(info.getEntityName().equals(cmd.getVmName()) && info.getName().equalsIgnoreCase("CreateSnapshot_Task")){
                    s_logger.debug("There is already a VM snapshot task running, wait for it");
                    context.getVimClient().waitForTask(taskMor);
                }
            }
View Full Code Here

            // wait if there are already VM revert task running
            ManagedObjectReference taskmgr = context.getServiceContent().getTaskManager();
            List<ManagedObjectReference> tasks = (ArrayList<ManagedObjectReference>)context.getVimClient().getDynamicProperty(taskmgr, "recentTask");
            for (ManagedObjectReference taskMor : tasks) {
                TaskInfo info = (TaskInfo) (context.getVimClient().getDynamicProperty(taskMor, "info"));
                if(info.getEntityName().equals(cmd.getVmName()) && info.getName().equalsIgnoreCase("RevertToSnapshot_Task")){
                    s_logger.debug("There is already a VM snapshot task running, wait for it");
                    context.getVimClient().waitForTask(taskMor);
                }
            }
View Full Code Here

   
    System.out.println("\nRecent tasks:");
    Task[] recentTasks = taskMgr.getRecentTasks();
    for(int i=0; recentTasks!=null && i<recentTasks.length; i++)
    {
      TaskInfo ti = recentTasks[i].getTaskInfo();
      System.out.println("\nName:" + ti.getName());
      System.out.println("Key:" + ti.getKey());
      System.out.println("State:" + ti.getState());
    }
    si.getServerConnection().logout();
  }
View Full Code Here

TOP

Related Classes of backtype.storm.metric.api.IMetricsConsumer$TaskInfo

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.