当前位置: 首页>>代码示例>>Java>>正文


Java StepExecutionStatus类代码示例

本文整理汇总了Java中org.pentaho.di.trans.step.BaseStepData.StepExecutionStatus的典型用法代码示例。如果您正苦于以下问题:Java StepExecutionStatus类的具体用法?Java StepExecutionStatus怎么用?Java StepExecutionStatus使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


StepExecutionStatus类属于org.pentaho.di.trans.step.BaseStepData包,在下文中一共展示了StepExecutionStatus类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getEnded

import org.pentaho.di.trans.step.BaseStepData.StepExecutionStatus; //导入依赖的package包/类
public int getEnded()
{
	int nrEnded=0;

	if (steps==null) return 0;

	for (int i=0;i<steps.size();i++)
	{
		StepMetaDataCombi sid = steps.get(i);
		StepDataInterface data = sid.data;
           
		if ((sid.step!=null && !sid.step.isRunning()) ||  // Should normally not be needed anymore, status is kept in data.
                   data.getStatus()==StepExecutionStatus.STATUS_FINISHED || // Finished processing 
                   data.getStatus()==StepExecutionStatus.STATUS_HALTED ||   // Not launching because of init error
                   data.getStatus()==StepExecutionStatus.STATUS_STOPPED     // Stopped because of an error
                   )
           {
               nrEnded++;
           }
	}

	return nrEnded;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:24,代码来源:Trans.java

示例2: nrActiveSteps

import org.pentaho.di.trans.step.BaseStepData.StepExecutionStatus; //导入依赖的package包/类
public int nrActiveSteps()
{
	if (steps==null) return 0;

	int nr = 0;
	for (int i=0;i<steps.size();i++)
	{
		StepMetaDataCombi sid = steps.get(i);
		//without also considering a step status of not finished,
		//	the step execution results grid shows empty while
		//  the transformation has steps still running.
		//if ( sid.step.isRunning() ) nr++;
		if ( sid.step.isRunning() ||
				sid.step.getStatus() != StepExecutionStatus.STATUS_FINISHED ) {
			nr++;
		}
	}
	return nr;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:20,代码来源:Trans.java

示例3: run

import org.pentaho.di.trans.step.BaseStepData.StepExecutionStatus; //导入依赖的package包/类
public void run()
{
    // Set the internal variables also on the initialization thread!
    // ((BaseStep)combi.step).setInternalVariables();
    
    try
    {
        if (combi.step.init(combi.meta, combi.data))
        {
            combi.data.setStatus(StepExecutionStatus.STATUS_IDLE);
            ok = true;
        }
        else
        {
            combi.step.setErrors(1);
            log.logError(BaseMessages.getString(PKG, "Trans.Log.ErrorInitializingStep", combi.step.getStepname())); //$NON-NLS-1$ //$NON-NLS-2$
        }
    }
    catch (Throwable e)
    {
        log.logError(BaseMessages.getString(PKG, "Trans.Log.ErrorInitializingStep", combi.step.getStepname())); //$NON-NLS-1$ //$NON-NLS-2$
        log.logError(Const.getStackTracker(e));
    }
    
    finished=true;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:27,代码来源:StepInitThread.java

示例4: getEnded

import org.pentaho.di.trans.step.BaseStepData.StepExecutionStatus; //导入依赖的package包/类
/**
 * Gets the number of steps in the transformation that are in an end state, such as Finished, Halted, or Stopped.
 *
 * @return the number of ended steps
 */
public int getEnded()
{
	int nrEnded=0;

	if (steps==null) return 0;

	for (int i=0;i<steps.size();i++)
	{
		StepMetaDataCombi sid = steps.get(i);
		StepDataInterface data = sid.data;
           
		if ((sid.step!=null && !sid.step.isRunning()) ||  // Should normally not be needed anymore, status is kept in data.
                   data.getStatus()==StepExecutionStatus.STATUS_FINISHED || // Finished processing 
                   data.getStatus()==StepExecutionStatus.STATUS_HALTED ||   // Not launching because of init error
                   data.getStatus()==StepExecutionStatus.STATUS_STOPPED     // Stopped because of an error
                   )
           {
               nrEnded++;
           }
	}

	return nrEnded;
}
 
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:29,代码来源:Trans.java

示例5: nrActiveSteps

import org.pentaho.di.trans.step.BaseStepData.StepExecutionStatus; //导入依赖的package包/类
/**
 * Gets the number of active (i.e. not finished) steps in this transformation
 *
 * @return the number of active steps
 */
public int nrActiveSteps()
{
	if (steps==null) return 0;

	int nr = 0;
	for (int i=0;i<steps.size();i++)
	{
		StepMetaDataCombi sid = steps.get(i);
		//without also considering a step status of not finished,
		//	the step execution results grid shows empty while
		//  the transformation has steps still running.
		//if ( sid.step.isRunning() ) nr++;
		if ( sid.step.isRunning() ||
				sid.step.getStatus() != StepExecutionStatus.STATUS_FINISHED ) {
			nr++;
		}
	}
	return nr;
}
 
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:25,代码来源:Trans.java

示例6: getTransformationStatus

import org.pentaho.di.trans.step.BaseStepData.StepExecutionStatus; //导入依赖的package包/类
@GET
@Path("/status/{id : .+}")  @Produces({ MediaType.APPLICATION_JSON })
public TransformationStatus getTransformationStatus(@PathParam("id") String id) {
  TransformationStatus status = new TransformationStatus();
  // find trans
  Trans trans = CarteResource.getTransformation(id);
  CarteObjectEntry entry = CarteResource.getCarteObjectEntry(id);

  status.setId(entry.getId());
  status.setName(entry.getName());
  status.setStatus(trans.getStatus());

  for (int i = 0; i < trans.nrSteps(); i++) {
    StepInterface step = trans.getRunThread(i);
    if ((step.isRunning()) || step.getStatus() != StepExecutionStatus.STATUS_EMPTY) {
      StepStatus stepStatus = new StepStatus(step);
      status.addStepStatus(stepStatus);
    }
  }
  return status;
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:22,代码来源:TransformationResource.java

示例7: getTransformationStatus

import org.pentaho.di.trans.step.BaseStepData.StepExecutionStatus; //导入依赖的package包/类
@GET
@Path( "/status/{id : .+}" )
@Produces( { MediaType.APPLICATION_JSON } )
public TransformationStatus getTransformationStatus( @PathParam( "id" ) String id ) {
  TransformationStatus status = new TransformationStatus();
  // find trans
  Trans trans = CarteResource.getTransformation( id );
  CarteObjectEntry entry = CarteResource.getCarteObjectEntry( id );

  status.setId( entry.getId() );
  status.setName( entry.getName() );
  status.setStatus( trans.getStatus() );

  for ( int i = 0; i < trans.nrSteps(); i++ ) {
    StepInterface step = trans.getRunThread( i );
    if ( ( step.isRunning() ) || step.getStatus() != StepExecutionStatus.STATUS_EMPTY ) {
      StepStatus stepStatus = new StepStatus( step );
      status.addStepStatus( stepStatus );
    }
  }
  return status;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:23,代码来源:TransformationResource.java

示例8: getEnded

import org.pentaho.di.trans.step.BaseStepData.StepExecutionStatus; //导入依赖的package包/类
/**
 * Gets the number of steps in the transformation that are in an end state, such as Finished, Halted, or Stopped.
 *
 * @return the number of ended steps
 */
public int getEnded() {
  int nrEnded = 0;

  if ( steps == null ) {
    return 0;
  }

  for ( int i = 0; i < steps.size(); i++ ) {
    StepMetaDataCombi sid = steps.get( i );
    StepDataInterface data = sid.data;

    if ( ( sid.step != null && !sid.step.isRunning() )
        // Should normally not be needed anymore, status is kept in data.
        || data.getStatus() == StepExecutionStatus.STATUS_FINISHED || // Finished processing
        data.getStatus() == StepExecutionStatus.STATUS_HALTED || // Not launching because of init error
        data.getStatus() == StepExecutionStatus.STATUS_STOPPED // Stopped because of an error
    ) {
      nrEnded++;
    }
  }

  return nrEnded;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:29,代码来源:Trans.java

示例9: stopStep

import org.pentaho.di.trans.step.BaseStepData.StepExecutionStatus; //导入依赖的package包/类
public void stopStep( StepMetaDataCombi combi, boolean safeStop ) {
  StepInterface rt = combi.step;
  rt.setStopped( true );
  rt.setSafeStopped( safeStop );
  rt.resumeRunning();

  try {
    rt.stopRunning( combi.meta, combi.data );
  } catch ( Exception e ) {
    log.logError( "Something went wrong while trying to safe stop the transformation: ", e );
  }
  combi.data.setStatus( StepExecutionStatus.STATUS_STOPPED );
  if ( safeStop ) {
    rt.setOutputDone();
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:17,代码来源:Trans.java

示例10: nrActiveSteps

import org.pentaho.di.trans.step.BaseStepData.StepExecutionStatus; //导入依赖的package包/类
/**
 * Gets the number of active (i.e. not finished) steps in this transformation
 *
 * @return the number of active steps
 */
public int nrActiveSteps() {
  if ( steps == null ) {
    return 0;
  }

  int nr = 0;
  for ( int i = 0; i < steps.size(); i++ ) {
    StepMetaDataCombi sid = steps.get( i );
    // without also considering a step status of not finished,
    // the step execution results grid shows empty while
    // the transformation has steps still running.
    // if ( sid.step.isRunning() ) nr++;
    if ( sid.step.isRunning() || sid.step.getStatus() != StepExecutionStatus.STATUS_FINISHED ) {
      nr++;
    }
  }
  return nr;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:24,代码来源:Trans.java

示例11: getTransStepExecutionStatusLookup

import org.pentaho.di.trans.step.BaseStepData.StepExecutionStatus; //导入依赖的package包/类
/**
 * Checks the execution status of each step in the transformations.
 *
 * @return an array associated with the step list, indicating the status of that step.
 */
public StepExecutionStatus[] getTransStepExecutionStatusLookup() {
  if ( steps == null ) {
    return null;
  }

  // we need this snapshot for the TransGridDelegate refresh method to handle the
  // difference between a timed refresh and continual step status updates
  int totalSteps = steps.size();
  StepExecutionStatus[] tList = new StepExecutionStatus[totalSteps];
  for ( int i = 0; i < totalSteps; i++ ) {
    StepMetaDataCombi sid = steps.get( i );
    tList[i] = sid.step.getStatus();
  }
  return tList;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:21,代码来源:Trans.java

示例12: stopAll

import org.pentaho.di.trans.step.BaseStepData.StepExecutionStatus; //导入依赖的package包/类
public void stopAll()
{
	if (steps==null) return;
	
	//log.logDetailed("DIS: Checking wether of not ["+sname+"]."+cnr+" has started!");
	//log.logDetailed("DIS: hasStepStarted() looking in "+threads.size()+" threads");
	
	for (int i=0;i<steps.size();i++)
	{
		StepMetaDataCombi sid = steps.get(i);
		StepInterface rt = sid.step;
		rt.setStopped(true);
		rt.resumeRunning();

		// Cancel queries etc. by force...
		StepInterface si = (StepInterface)rt;
           try
           {
               si.stopRunning(sid.meta, sid.data);
           }
           catch(Exception e)
           {
               log.logError("Something went wrong while trying to stop the transformation: "+e.toString());
               log.logError(Const.getStackTracker(e));
           }
           
           sid.data.setStatus(StepExecutionStatus.STATUS_STOPPED);
	}
	
	//if it is stopped it is not paused
	paused.set(false);
	stopped.set(true);
	
	// Fire the stopped listener...
	//
	for (TransStoppedListener listener : transStoppedListeners) {
	  listener.transStopped(this);
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:40,代码来源:Trans.java

示例13: getTransStepIsRunningLookup

import org.pentaho.di.trans.step.BaseStepData.StepExecutionStatus; //导入依赖的package包/类
public boolean[] getTransStepIsRunningLookup() {
	if (steps==null) return null;
	
	boolean[] tResult = new boolean[steps.size()];
	for (int i = 0; i < steps.size(); i++)
	{
		StepMetaDataCombi sid = steps.get(i);
		tResult[i] = (sid.step.isRunning() || sid.step.getStatus() != StepExecutionStatus.STATUS_FINISHED);
	}
	return tResult;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:12,代码来源:Trans.java

示例14: getTransStepExecutionStatusLookup

import org.pentaho.di.trans.step.BaseStepData.StepExecutionStatus; //导入依赖的package包/类
public StepExecutionStatus[] getTransStepExecutionStatusLookup() {
	if (steps==null) return null;

	//we need this snapshot for the TransGridDelegate refresh method to handle the
	//	difference between a timed refresh and continual step status updates
	int totalSteps = steps.size();
	StepExecutionStatus[] tList = new StepExecutionStatus[totalSteps];
	for (int i = 0; i < totalSteps; i++)
	{
		StepMetaDataCombi sid = steps.get(i);
		tList[i] = sid.step.getStatus();
	}
	return tList;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:15,代码来源:Trans.java

示例15: hasHaltedSteps

import org.pentaho.di.trans.step.BaseStepData.StepExecutionStatus; //导入依赖的package包/类
/**
   * 
   * @return true if one or more steps are halted
   */
  public boolean hasHaltedSteps()
  {
  	// not yet 100% sure of this, if there are no steps... or none halted?
if (steps==null) return false;

      for (int i=0;i<steps.size();i++)
      {
          StepMetaDataCombi sid = steps.get(i);
          if (sid.data.getStatus()==StepExecutionStatus.STATUS_HALTED) return true;
      }
      return false;
  }
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:17,代码来源:Trans.java


注:本文中的org.pentaho.di.trans.step.BaseStepData.StepExecutionStatus类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。