本文整理汇总了Java中org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta.setNeverEnding方法的典型用法代码示例。如果您正苦于以下问题:Java RowGeneratorMeta.setNeverEnding方法的具体用法?Java RowGeneratorMeta.setNeverEnding怎么用?Java RowGeneratorMeta.setNeverEnding使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta
的用法示例。
在下文中一共展示了RowGeneratorMeta.setNeverEnding方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createPDI14676Transformation
import org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta; //导入方法依赖的package包/类
private String createPDI14676Transformation() throws IOException, KettleException {
// Setup Transformation
String rowGenStepName = "Generate Rows";
RowGeneratorMeta rowGenMeta = new RowGeneratorMeta();
rowGenMeta.setRowLimit( String.valueOf( Integer.MAX_VALUE ) );
rowGenMeta.setNeverEnding( true );
rowGenMeta.setIntervalInMs( "0" );
rowGenMeta.allocate( 0 );
TransMeta tMeta = TransTestFactory.generateTestTransformation( new Variables(), rowGenMeta, rowGenStepName );
// Remove the Injector step, as it's not needed for this transformation
TransHopMeta hopToRemove = tMeta.findTransHop( tMeta.findStep( TransTestFactory.INJECTOR_STEPNAME ), tMeta.findStep( rowGenStepName ) );
tMeta.removeTransHop( tMeta.indexOfTransHop( hopToRemove ) );
tMeta.removeStep( tMeta.indexOfStep( tMeta.findStep( TransTestFactory.INJECTOR_STEPNAME ) ) );
// Write transformation to temp file, for use within a job
String transFilename = TestUtilities.createEmptyTempFile( this.getClass().getSimpleName() + "_PDI14676_", ".ktr" );
FileObject transFile = TestUtils.getFileObject( transFilename );
OutputStream outStream = transFile.getContent().getOutputStream();
PrintWriter pw = new PrintWriter( outStream );
pw.write( tMeta.getXML() );
pw.close();
outStream.close();
return transFilename;
}
示例2: getInfo
import org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta; //导入方法依赖的package包/类
private void getInfo( RowGeneratorMeta meta ) throws KettleException {
meta.setRowLimit( wLimit.getText() );
meta.setNeverEnding( wNeverEnding.getSelection() );
meta.setIntervalInMs( wInterval.getText() );
meta.setRowTimeField( wRowTimeField.getText() );
meta.setLastTimeField( wLastTimeField.getText() );
int nrfields = wFields.nrNonEmpty();
meta.allocate( nrfields );
//CHECKSTYLE:Indentation:OFF
for ( int i = 0; i < nrfields; i++ ) {
TableItem item = wFields.getNonEmpty( i );
meta.getFieldName()[i] = item.getText( 1 );
meta.getFieldFormat()[i] = item.getText( 3 );
String slength = item.getText( 4 );
String sprec = item.getText( 5 );
meta.getCurrency()[i] = item.getText( 6 );
meta.getDecimal()[i] = item.getText( 7 );
meta.getGroup()[i] = item.getText( 8 );
meta.isSetEmptyString()[i] =
BaseMessages.getString( PKG, "System.Combo.Yes" ).equalsIgnoreCase( item.getText( 10 ) );
meta.getValue()[i] = meta.isSetEmptyString()[i] ? "" : item.getText( 9 );
meta.getFieldType()[i] = meta.isSetEmptyString()[i] ? "String" : item.getText( 2 );
meta.getFieldLength()[i] = Const.toInt( slength, -1 );
meta.getFieldPrecision()[i] = Const.toInt( sprec, -1 );
}
// Performs checks...
/*
* Commented out verification : if variables are used, this check is a pain!
*
* long longLimit = Const.toLong(transMeta.environmentSubstitute( wLimit.getText()), -1L ); if (longLimit<0) { throw
* new KettleException( BaseMessages.getString(PKG, "RowGeneratorDialog.Wrong.RowLimit.Number") ); }
*/
}