• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java StepStatus类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getTransformationStatus

import org.pentaho.di.trans.step.StepStatus; //导入依赖的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


示例2: getTransformationStatus

import org.pentaho.di.trans.step.StepStatus; //导入依赖的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


示例3: getXML

import org.pentaho.di.trans.step.StepStatus; //导入依赖的package包/类
public String getXML()
 {
     StringBuffer xml = new StringBuffer();
     
     xml.append("<"+XML_TAG+">").append(Const.CR);
     xml.append(XMLHandler.addTagValue("transname", transName));                
     xml.append(XMLHandler.addTagValue("status_desc", statusDescription));                
     xml.append(XMLHandler.addTagValue("error_desc", errorDescription));          
     xml.append(XMLHandler.addTagValue("paused", paused));          
     
     xml.append("  <stepstatuslist>").append(Const.CR);
     for (int i = 0; i < stepStatusList.size(); i++)
     {
         StepStatus stepStatus = (StepStatus) stepStatusList.get(i);
         xml.append("    ").append(stepStatus.getXML()).append(Const.CR);
     }
     xml.append("  </stepstatuslist>").append(Const.CR);

     xml.append(XMLHandler.addTagValue("logging_string", XMLHandler.buildCDATA(loggingString)));          

     if (result!=null)
     {
     	try {
	String resultXML = result.getXML();
	xml.append(resultXML);
} catch (IOException e) {
	LogWriter.getInstance().logError("Slave server transformation status", "Unable to serialize result object as XML", e);
}
     }

     xml.append("</"+XML_TAG+">");
     
     return xml.toString();
 }
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:35,代码来源:SlaveServerTransStatus.java


示例4: getNrStepErrors

import org.pentaho.di.trans.step.StepStatus; //导入依赖的package包/类
public long getNrStepErrors()
{
    long errors = 0L;
    for (int i=0;i<stepStatusList.size();i++)
    {
        StepStatus stepStatus = (StepStatus) stepStatusList.get(i);
        errors+=stepStatus.getErrors();
    }
    return errors;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:11,代码来源:SlaveServerTransStatus.java


示例5: getResult

import org.pentaho.di.trans.step.StepStatus; //导入依赖的package包/类
public Result getResult(TransMeta transMeta)
 {
 	Result result = new Result();
 	
 	for (StepStatus stepStatus : stepStatusList) {
 		
result.setNrErrors(result.getNrErrors()+stepStatus.getErrors()+(result.isStopped()?1:0)); // If the remote trans is stopped, count as an error

if (transMeta.getReadStep()    !=null && stepStatus.getStepname().equals(transMeta.getReadStep().getName())) {
	result.setNrLinesRead(result.getNrLinesRead()+ stepStatus.getLinesRead());
}
if (transMeta.getInputStep()   !=null && stepStatus.getStepname().equals(transMeta.getInputStep().getName())) {
	result.setNrLinesInput(result.getNrLinesInput() + stepStatus.getLinesInput());
}
if (transMeta.getWriteStep()   !=null && stepStatus.getStepname().equals(transMeta.getWriteStep().getName())) {
	result.setNrLinesWritten(result.getNrLinesWritten()+stepStatus.getLinesWritten());
}
if (transMeta.getOutputStep()  !=null && stepStatus.getStepname().equals(transMeta.getOutputStep().getName())) {
	result.setNrLinesOutput(result.getNrLinesOutput()+stepStatus.getLinesOutput());
}
if (transMeta.getUpdateStep()  !=null && stepStatus.getStepname().equals(transMeta.getUpdateStep().getName())) {
	result.setNrLinesUpdated(result.getNrLinesUpdated()+stepStatus.getLinesUpdated());
}
         if (transMeta.getRejectedStep()!=null && stepStatus.getStepname().equals(transMeta.getRejectedStep().getName())) {
         	result.setNrLinesRejected(result.getNrLinesRejected()+stepStatus.getLinesRejected());
         }
         
         if (stepStatus.isStopped()) {
         	result.setStopped(true);
         	result.setResult(false);
         }
 	}
 	
 	return result;
 }
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:36,代码来源:SlaveServerTransStatus.java


示例6: getXML

import org.pentaho.di.trans.step.StepStatus; //导入依赖的package包/类
public String getXML() throws KettleException
 {
     StringBuffer xml = new StringBuffer();
     
     xml.append("<"+XML_TAG+">").append(Const.CR);
     xml.append(XMLHandler.addTagValue("transname", transName));                
     xml.append(XMLHandler.addTagValue("id", id));                
     xml.append(XMLHandler.addTagValue("status_desc", statusDescription));                
     xml.append(XMLHandler.addTagValue("error_desc", errorDescription));          
     xml.append(XMLHandler.addTagValue("paused", paused));          
     
     xml.append("  <stepstatuslist>").append(Const.CR);
     for (int i = 0; i < stepStatusList.size(); i++)
     {
         StepStatus stepStatus = (StepStatus) stepStatusList.get(i);
         xml.append("    ").append(stepStatus.getXML()).append(Const.CR);
     }
     xml.append("  </stepstatuslist>").append(Const.CR);

     xml.append(XMLHandler.addTagValue("first_log_line_nr", firstLoggingLineNr));          
     xml.append(XMLHandler.addTagValue("last_log_line_nr", lastLoggingLineNr));          

     if (result!=null)
     {
     	try {
	String resultXML = result.getXML();
	xml.append(resultXML);
} catch (IOException e) {
	throw new KettleException("Unable to serialize result object as XML", e);
}
     }

     xml.append(XMLHandler.addTagValue("logging_string", XMLHandler.buildCDATA(loggingString)));          

     xml.append("</"+XML_TAG+">");
     
     return xml.toString();
 }
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:39,代码来源:SlaveServerTransStatus.java


示例7: getResult

import org.pentaho.di.trans.step.StepStatus; //导入依赖的package包/类
public Result getResult(TransMeta transMeta)
 {
 	Result result = new Result();
 	
 	for (StepStatus stepStatus : stepStatusList) {
 		
result.setNrErrors(result.getNrErrors()+stepStatus.getErrors()+(result.isStopped()?1:0)); // If the remote trans is stopped, count as an error

if (stepStatus.getStepname().equals(transMeta.getTransLogTable().getStepnameRead())) {
	result.increaseLinesRead(stepStatus.getLinesRead());
}
if (stepStatus.getStepname().equals(transMeta.getTransLogTable().getStepnameInput())) {
	result.increaseLinesInput(stepStatus.getLinesInput());
}
if (stepStatus.getStepname().equals(transMeta.getTransLogTable().getStepnameWritten())) {
	result.increaseLinesWritten(stepStatus.getLinesWritten());
}
if (stepStatus.getStepname().equals(transMeta.getTransLogTable().getStepnameOutput())) {
	result.increaseLinesOutput(stepStatus.getLinesOutput());
}
if (stepStatus.getStepname().equals(transMeta.getTransLogTable().getStepnameUpdated())) {
	result.increaseLinesUpdated(stepStatus.getLinesUpdated());
}
if (stepStatus.getStepname().equals(transMeta.getTransLogTable().getStepnameRejected())) {
         	result.increaseLinesRejected(stepStatus.getLinesRejected());
         }
         
         if (stepStatus.isStopped()) {
         	result.setStopped(true);
         	result.setResult(false);
         }
 	}
 	
 	return result;
 }
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:36,代码来源:SlaveServerTransStatus.java


示例8: getXML

import org.pentaho.di.trans.step.StepStatus; //导入依赖的package包/类
public String getXML() throws KettleException
{
    StringBuffer xml = new StringBuffer();
    
    xml.append("<"+XML_TAG+">").append(Const.CR);
    xml.append(XMLHandler.addTagValue("transname", transName));                
    xml.append(XMLHandler.addTagValue("id", id));                
    xml.append(XMLHandler.addTagValue("status_desc", statusDescription));                
    xml.append(XMLHandler.addTagValue("error_desc", errorDescription));          
    xml.append(XMLHandler.addTagValue("paused", paused));          
    
    xml.append("  <stepstatuslist>").append(Const.CR);
    for (int i = 0; i < stepStatusList.size(); i++)
    {
        StepStatus stepStatus = (StepStatus) stepStatusList.get(i);
        xml.append("    ").append(stepStatus.getXML()).append(Const.CR);
    }
    xml.append("  </stepstatuslist>").append(Const.CR);

    xml.append(XMLHandler.addTagValue("first_log_line_nr", firstLoggingLineNr));          
    xml.append(XMLHandler.addTagValue("last_log_line_nr", lastLoggingLineNr));          

    if (result != null) {
      String resultXML = result.getXML();
      xml.append(resultXML);
    }

    xml.append(XMLHandler.addTagValue("logging_string", XMLHandler.buildCDATA(loggingString)));          

    xml.append("</"+XML_TAG+">");
    
    return xml.toString();
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:34,代码来源:SlaveServerTransStatus.java


示例9: getXML

import org.pentaho.di.trans.step.StepStatus; //导入依赖的package包/类
public String getXML() throws KettleException {
  // See PDI-15781
  boolean sendResultXmlWithStatus = EnvUtil.getSystemProperty( "KETTLE_COMPATIBILITY_SEND_RESULT_XML_WITH_FULL_STATUS", "N" ).equalsIgnoreCase( "Y" );
  StringBuilder xml = new StringBuilder();

  xml.append( XMLHandler.openTag( XML_TAG ) ).append( Const.CR );
  xml.append( "  " ).append( XMLHandler.addTagValue( "transname", transName ) );
  xml.append( "  " ).append( XMLHandler.addTagValue( "id", id ) );
  xml.append( "  " ).append( XMLHandler.addTagValue( "status_desc", statusDescription ) );
  xml.append( "  " ).append( XMLHandler.addTagValue( "error_desc", errorDescription ) );
  xml.append( "  " ).append( XMLHandler.addTagValue( "log_date", XMLHandler.date2string( logDate ) ) );
  xml.append( "  " ).append( XMLHandler.addTagValue( "paused", paused ) );

  xml.append( "  " ).append( XMLHandler.openTag( "stepstatuslist" ) ).append( Const.CR );
  for ( int i = 0; i < stepStatusList.size(); i++ ) {
    StepStatus stepStatus = stepStatusList.get( i );
    xml.append( "    " ).append( stepStatus.getXML() ).append( Const.CR );
  }
  xml.append( "  " ).append( XMLHandler.closeTag( "stepstatuslist" ) ).append( Const.CR );

  xml.append( "  " ).append( XMLHandler.addTagValue( "first_log_line_nr", firstLoggingLineNr ) );
  xml.append( "  " ).append( XMLHandler.addTagValue( "last_log_line_nr", lastLoggingLineNr ) );

  if ( result != null ) {
    String resultXML = sendResultXmlWithStatus ? result.getXML() : result.getBasicXml();
    xml.append( resultXML );
  }

  xml.append( "  " ).append( XMLHandler.addTagValue( "logging_string", XMLHandler.buildCDATA( loggingString ) ) );

  xml.append( XMLHandler.closeTag( XML_TAG ) );

  return xml.toString();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:35,代码来源:SlaveServerTransStatus.java


示例10: getNrStepErrors

import org.pentaho.di.trans.step.StepStatus; //导入依赖的package包/类
public long getNrStepErrors() {
  long errors = 0L;
  for ( int i = 0; i < stepStatusList.size(); i++ ) {
    StepStatus stepStatus = stepStatusList.get( i );
    errors += stepStatus.getErrors();
  }
  return errors;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:9,代码来源:SlaveServerTransStatus.java


示例11: getResult

import org.pentaho.di.trans.step.StepStatus; //导入依赖的package包/类
public Result getResult( TransMeta transMeta ) {
  Result result = new Result();

  for ( StepStatus stepStatus : stepStatusList ) {

    result.setNrErrors( result.getNrErrors() + stepStatus.getErrors() + ( result.isStopped() ? 1 : 0 ) ); // If the
                                                                                                          // remote
                                                                                                          // trans is
                                                                                                          // stopped,
                                                                                                          // count as
                                                                                                          // an error

    if ( stepStatus.getStepname().equals( transMeta.getTransLogTable().getStepnameRead() ) ) {
      result.increaseLinesRead( stepStatus.getLinesRead() );
    }
    if ( stepStatus.getStepname().equals( transMeta.getTransLogTable().getStepnameInput() ) ) {
      result.increaseLinesInput( stepStatus.getLinesInput() );
    }
    if ( stepStatus.getStepname().equals( transMeta.getTransLogTable().getStepnameWritten() ) ) {
      result.increaseLinesWritten( stepStatus.getLinesWritten() );
    }
    if ( stepStatus.getStepname().equals( transMeta.getTransLogTable().getStepnameOutput() ) ) {
      result.increaseLinesOutput( stepStatus.getLinesOutput() );
    }
    if ( stepStatus.getStepname().equals( transMeta.getTransLogTable().getStepnameUpdated() ) ) {
      result.increaseLinesUpdated( stepStatus.getLinesUpdated() );
    }
    if ( stepStatus.getStepname().equals( transMeta.getTransLogTable().getStepnameRejected() ) ) {
      result.increaseLinesRejected( stepStatus.getLinesRejected() );
    }

    if ( stepStatus.isStopped() ) {
      result.setStopped( true );
      result.setResult( false );
    }
  }

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


示例12: stop

import org.pentaho.di.trans.step.StepStatus; //导入依赖的package包/类
public void stop() {
  stopped = true;
  for ( Trans subTrans : running ) {
    subTrans.stopAll();
  }
  running.clear();
  for ( Map.Entry<String, StepStatus> entry : statuses.entrySet() ) {
    entry.getValue().setStatusDescription( StepExecutionStatus.STATUS_STOPPED.getDescription() );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:11,代码来源:SubtransExecutor.java


示例13: SlaveServerTransStatus

import org.pentaho.di.trans.step.StepStatus; //导入依赖的package包/类
public SlaveServerTransStatus()
{
    stepStatusList = new ArrayList<StepStatus>();
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:5,代码来源:SlaveServerTransStatus.java


示例14: getStepStatusList

import org.pentaho.di.trans.step.StepStatus; //导入依赖的package包/类
/**
 * @return the stepStatusList
 */
public List<StepStatus> getStepStatusList()
{
    return stepStatusList;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:8,代码来源:SlaveServerTransStatus.java


示例15: setStepStatusList

import org.pentaho.di.trans.step.StepStatus; //导入依赖的package包/类
/**
 * @param stepStatusList the stepStatusList to set
 */
public void setStepStatusList(List<StepStatus> stepStatusList)
{
    this.stepStatusList = stepStatusList;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:8,代码来源:SlaveServerTransStatus.java


示例16: getStepStatus

import org.pentaho.di.trans.step.StepStatus; //导入依赖的package包/类
public List<StepStatus> getStepStatus() {
  return stepStatus;
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:4,代码来源:TransformationStatus.java


示例17: setStepStatus

import org.pentaho.di.trans.step.StepStatus; //导入依赖的package包/类
public void setStepStatus(List<StepStatus> stepStatus) {
  this.stepStatus = stepStatus;
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:4,代码来源:TransformationStatus.java


示例18: addStepStatus

import org.pentaho.di.trans.step.StepStatus; //导入依赖的package包/类
public void addStepStatus(StepStatus status) {
  stepStatus.add(status);
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:4,代码来源:TransformationStatus.java


示例19: SlaveServerTransStatus

import org.pentaho.di.trans.step.StepStatus; //导入依赖的package包/类
public SlaveServerTransStatus() {
  stepStatusList = new ArrayList<StepStatus>();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:4,代码来源:SlaveServerTransStatus.java


示例20: getStepStatusList

import org.pentaho.di.trans.step.StepStatus; //导入依赖的package包/类
/**
 * @return the stepStatusList
 */
public List<StepStatus> getStepStatusList() {
  return stepStatusList;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:7,代码来源:SlaveServerTransStatus.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Descriptor类代码示例发布时间:2022-05-22
下一篇:
Java NativeSizeByReference类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap