本文整理汇总了Java中org.pentaho.di.trans.step.StepStatus类的典型用法代码示例。如果您正苦于以下问题:Java StepStatus类的具体用法?Java StepStatus怎么用?Java StepStatus使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StepStatus类属于org.pentaho.di.trans.step包,在下文中一共展示了StepStatus类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例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();
}
示例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;
}
示例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;
}
示例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();
}
示例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;
}
示例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();
}
示例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();
}
示例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;
}
示例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;
}
示例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() );
}
}
示例13: SlaveServerTransStatus
import org.pentaho.di.trans.step.StepStatus; //导入依赖的package包/类
public SlaveServerTransStatus()
{
stepStatusList = new ArrayList<StepStatus>();
}
示例14: getStepStatusList
import org.pentaho.di.trans.step.StepStatus; //导入依赖的package包/类
/**
* @return the stepStatusList
*/
public List<StepStatus> getStepStatusList()
{
return stepStatusList;
}
示例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;
}