本文整理汇总了Java中org.pentaho.di.trans.steps.dummytrans.DummyTransMeta类的典型用法代码示例。如果您正苦于以下问题:Java DummyTransMeta类的具体用法?Java DummyTransMeta怎么用?Java DummyTransMeta使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DummyTransMeta类属于org.pentaho.di.trans.steps.dummytrans包,在下文中一共展示了DummyTransMeta类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: generatePreviewTransformation
import org.pentaho.di.trans.steps.dummytrans.DummyTransMeta; //导入依赖的package包/类
public static final TransMeta generatePreviewTransformation(VariableSpace parent, StepMetaInterface oneMeta, String oneStepname)
{
StepLoader stepLoader = StepLoader.getInstance();
TransMeta previewMeta = new TransMeta(parent);
// At it to the first step.
StepMeta one = new StepMeta(stepLoader.getStepPluginID(oneMeta), oneStepname, oneMeta);
one.setLocation(50,50);
one.setDraw(true);
previewMeta.addStep(one);
DummyTransMeta twoMeta = new DummyTransMeta();
StepMeta two = new StepMeta(stepLoader.getStepPluginID(twoMeta), "dummy", twoMeta); //$NON-NLS-1$
two.setLocation(250,50);
two.setDraw(true);
previewMeta.addStep(two);
TransHopMeta hop = new TransHopMeta(one, two);
previewMeta.addTransHop(hop);
return previewMeta;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:24,代码来源:TransPreviewFactory.java
示例2: generatePreviewTransformation
import org.pentaho.di.trans.steps.dummytrans.DummyTransMeta; //导入依赖的package包/类
public static final TransMeta generatePreviewTransformation(VariableSpace parent, StepMetaInterface oneMeta, String oneStepname)
{
PluginRegistry registry = PluginRegistry.getInstance();
TransMeta previewMeta = new TransMeta(parent);
// The following operation resets the internal variables!
//
previewMeta.setName(parent==null ? "Preview transformation" : parent.toString());
// At it to the first step.
StepMeta one = new StepMeta(registry.getPluginId(StepPluginType.class, oneMeta), oneStepname, oneMeta);
one.setLocation(50,50);
one.setDraw(true);
previewMeta.addStep(one);
DummyTransMeta twoMeta = new DummyTransMeta();
StepMeta two = new StepMeta(registry.getPluginId(StepPluginType.class, twoMeta), "dummy", twoMeta); //$NON-NLS-1$
two.setLocation(250,50);
two.setDraw(true);
previewMeta.addStep(two);
TransHopMeta hop = new TransHopMeta(one, two);
previewMeta.addTransHop(hop);
return previewMeta;
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:27,代码来源:TransPreviewFactory.java
示例3: generatePreviewTransformation
import org.pentaho.di.trans.steps.dummytrans.DummyTransMeta; //导入依赖的package包/类
public static final TransMeta generatePreviewTransformation( VariableSpace parent, StepMetaInterface oneMeta,
String oneStepname ) {
PluginRegistry registry = PluginRegistry.getInstance();
TransMeta previewMeta = new TransMeta( parent );
// The following operation resets the internal variables!
//
previewMeta.setName( parent == null ? "Preview transformation" : parent.toString() );
// At it to the first step.
StepMeta one = new StepMeta( registry.getPluginId( StepPluginType.class, oneMeta ), oneStepname, oneMeta );
one.setLocation( 50, 50 );
one.setDraw( true );
previewMeta.addStep( one );
DummyTransMeta twoMeta = new DummyTransMeta();
StepMeta two = new StepMeta( registry.getPluginId( StepPluginType.class, twoMeta ), "dummy", twoMeta );
two.setLocation( 250, 50 );
two.setDraw( true );
previewMeta.addStep( two );
TransHopMeta hop = new TransHopMeta( one, two );
previewMeta.addTransHop( hop );
return previewMeta;
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:27,代码来源:TransPreviewFactory.java
示例4: modifiedTarget
import org.pentaho.di.trans.steps.dummytrans.DummyTransMeta; //导入依赖的package包/类
@Test
public void modifiedTarget() throws Exception {
FilterRowsMeta filterRowsMeta = new FilterRowsMeta();
StepMeta trueOutput = new StepMeta( "true", new DummyTransMeta() );
StepMeta falseOutput = new StepMeta( "false", new DummyTransMeta() );
filterRowsMeta.setCondition( new Condition() );
filterRowsMeta.setTrueStepname( trueOutput.getName() );
filterRowsMeta.setFalseStepname( falseOutput.getName() );
filterRowsMeta.searchInfoAndTargetSteps( ImmutableList.of( trueOutput, falseOutput ) );
trueOutput.setName( "true renamed" );
falseOutput.setName( "false renamed" );
assertEquals( "true renamed", filterRowsMeta.getTrueStepname() );
assertEquals( "false renamed", filterRowsMeta.getFalseStepname() );
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:18,代码来源:FilterRowsMetaTest.java
示例5: prepareStepMetas_cl1_cl1
import org.pentaho.di.trans.steps.dummytrans.DummyTransMeta; //导入依赖的package包/类
/**
* This case simulates when we do have 2 step partitioned with one same partitioner We want to get a 'swim-lanes'
* transformation
*
* @throws KettlePluginException
*/
private void prepareStepMetas_cl1_cl1() throws KettlePluginException {
StepMeta dummy1 = new StepMeta( ONE, null );
StepMeta dummy2 = new StepMeta( TWO, null );
PartitionSchema schema = new PartitionSchema( "p1", Arrays.asList( new String[] { PID1, PID2 } ) );
// for delayed binding StepPartitioning meta does not achieve
// schema name when using in constructor so we have to set it
// explicitly. See equals implementation for StepPartitioningMeta.
StepPartitioningMeta partMeta = new StepPartitioningMeta( "Mirror to all partitions", schema );
// that is what I am talking about:
partMeta.setPartitionSchemaName( schema.getName() );
dummy1.setStepPartitioningMeta( partMeta );
dummy2.setStepPartitioningMeta( partMeta );
chain.add( dummy1 );
chain.add( dummy2 );
for ( StepMeta item : chain ) {
item.setStepMetaInterface( new DummyTransMeta() );
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:28,代码来源:TransPartitioningTest.java
示例6: prepareStepMetas_cl1_cl2
import org.pentaho.di.trans.steps.dummytrans.DummyTransMeta; //导入依赖的package包/类
/**
* This is a case when we have 2 steps, but partitioned differently
*
* @throws KettlePluginException
*/
private void prepareStepMetas_cl1_cl2() throws KettlePluginException {
StepMeta dummy1 = new StepMeta( ONE, null );
StepMeta dummy2 = new StepMeta( TWO, null );
PartitionSchema schema1 = new PartitionSchema( "p1", Arrays.asList( new String[] { PID1, PID2 } ) );
PartitionSchema schema2 = new PartitionSchema( "p2", Arrays.asList( new String[] { PID1, PID2 } ) );
StepPartitioningMeta partMeta1 = new StepPartitioningMeta( "Mirror to all partitions", schema1 );
StepPartitioningMeta partMeta2 = new StepPartitioningMeta( "Mirror to all partitions", schema2 );
partMeta1.setPartitionSchemaName( schema1.getName() );
partMeta2.setPartitionSchemaName( schema2.getName() );
dummy1.setStepPartitioningMeta( partMeta1 );
dummy2.setStepPartitioningMeta( partMeta2 );
chain.add( dummy1 );
chain.add( dummy2 );
for ( StepMeta item : chain ) {
item.setStepMetaInterface( new DummyTransMeta() );
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:27,代码来源:TransPartitioningTest.java
示例7: prepareStepMetas_x2_cl1
import org.pentaho.di.trans.steps.dummytrans.DummyTransMeta; //导入依赖的package包/类
/**
* This is a case when first step running 2 copies and next is partitioned one.
*
* @throws KettlePluginException
*/
private void prepareStepMetas_x2_cl1() throws KettlePluginException {
StepMeta dummy1 = new StepMeta( ONE, null );
StepMeta dummy2 = new StepMeta( TWO, null );
PartitionSchema schema1 = new PartitionSchema( "p1", Arrays.asList( new String[] { PID1, PID2 } ) );
StepPartitioningMeta partMeta1 = new StepPartitioningMeta( "Mirror to all partitions", schema1 );
dummy2.setStepPartitioningMeta( partMeta1 );
dummy1.setCopies( 2 );
chain.add( dummy1 );
chain.add( dummy2 );
for ( StepMeta item : chain ) {
item.setStepMetaInterface( new DummyTransMeta() );
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:22,代码来源:TransPartitioningTest.java
示例8: generateTestTransformation
import org.pentaho.di.trans.steps.dummytrans.DummyTransMeta; //导入依赖的package包/类
public static TransMeta generateTestTransformation(VariableSpace parent, StepMetaInterface oneMeta, String oneStepname)
{
StepLoader stepLoader = StepLoader.getInstance();
TransMeta previewMeta = new TransMeta(parent);
// First the injector step...
//
InjectorMeta zeroMeta = new InjectorMeta();
StepMeta zero = new StepMeta(stepLoader.getStepPluginID(zeroMeta), INJECTOR_STEPNAME, zeroMeta);
zero.setLocation(50,50);
zero.setDraw(true);
previewMeta.addStep(zero);
// Then the middle step to test...
//
StepMeta one = new StepMeta(stepLoader.getStepPluginID(oneMeta), oneStepname, oneMeta);
one.setLocation(150,50);
one.setDraw(true);
previewMeta.addStep(one);
// Then we add the dummy step to read the results from
//
DummyTransMeta twoMeta = new DummyTransMeta();
StepMeta two = new StepMeta(stepLoader.getStepPluginID(twoMeta), DUMMY_STEPNAME, twoMeta); //$NON-NLS-1$
two.setLocation(250,50);
two.setDraw(true);
previewMeta.addStep(two);
// Add the hops between the 3 steps.
//
TransHopMeta zeroOne = new TransHopMeta(zero, one);
previewMeta.addTransHop(zeroOne);
TransHopMeta oneTwo= new TransHopMeta(one, two);
previewMeta.addTransHop(oneTwo);
return previewMeta;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:39,代码来源:TransTestFactory.java
示例9: createDummyStep
import org.pentaho.di.trans.steps.dummytrans.DummyTransMeta; //导入依赖的package包/类
/**
* Create a dummy step for this class.
* @param name
* @param registry
* @return
*/
private StepMeta createDummyStep(String name, PluginRegistry registry) {
// Create a dummy step 1 and add it to the tranMeta
String dummyStepName = "dummy step";
DummyTransMeta dm1 = new DummyTransMeta();
String dummyPid1 = registry.getPluginId(StepPluginType.class, dm1);
StepMeta dummyStep = new StepMeta(dummyPid1, dummyStepName, dm1);
return dummyStep;
}
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:16,代码来源:JsonOutputTest.java
示例10: buildHexadecimalChecksumTrans
import org.pentaho.di.trans.steps.dummytrans.DummyTransMeta; //导入依赖的package包/类
private Trans buildHexadecimalChecksumTrans(int checkSumType, boolean compatibilityMode) throws Exception {
KettleEnvironment.init();
// Create a new transformation...
TransMeta transMeta = new TransMeta();
transMeta.setName(getClass().getName());
// Create a CheckSum Step
String checkSumStepname = "CheckSum"; //$NON-NLS-1$
CheckSumMeta meta = new CheckSumMeta();
// Set the compatibility mode and other required fields
meta.setCompatibilityMode(compatibilityMode);
meta.setResultFieldName("hex"); //$NON-NLS-1$
meta.setCheckSumType(checkSumType);
meta.setResultType(CheckSumMeta.result_TYPE_HEXADECIMAL);
meta.setFieldName(new String[] { "test" }); //$NON-NLS-1$
String checkSumPluginPid = PluginRegistry.getInstance().getPluginId(StepPluginType.class, meta);
StepMeta checkSumStep = new StepMeta(checkSumPluginPid, checkSumStepname, meta);
transMeta.addStep(checkSumStep);
// Create a Dummy step
String dummyStepname = "Output"; //$NON-NLS-1$
DummyTransMeta dummyMeta = new DummyTransMeta();
String dummyStepPid = PluginRegistry.getInstance().getPluginId(StepPluginType.class, dummyMeta);
StepMeta dummyStep = new StepMeta(dummyStepPid, dummyStepname, dummyMeta);
transMeta.addStep(dummyStep);
// Create a hop from CheckSum to Output
TransHopMeta hop = new TransHopMeta(checkSumStep, dummyStep);
transMeta.addTransHop(hop);
return new Trans(transMeta);
}
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:36,代码来源:CheckSumTest.java
示例11: generateTestTransformation
import org.pentaho.di.trans.steps.dummytrans.DummyTransMeta; //导入依赖的package包/类
public static TransMeta generateTestTransformation(VariableSpace parent, StepMetaInterface oneMeta, String oneStepname)
{
PluginRegistry registry = PluginRegistry.getInstance();
TransMeta previewMeta = new TransMeta(parent);
// First the injector step...
//
InjectorMeta zeroMeta = new InjectorMeta();
StepMeta zero = new StepMeta(registry.getPluginId(StepPluginType.class, zeroMeta), INJECTOR_STEPNAME, zeroMeta);
zero.setLocation(50,50);
zero.setDraw(true);
previewMeta.addStep(zero);
// Then the middle step to test...
//
StepMeta one = new StepMeta(registry.getPluginId(StepPluginType.class, oneMeta), oneStepname, oneMeta);
one.setLocation(150,50);
one.setDraw(true);
previewMeta.addStep(one);
// Then we add the dummy step to read the results from
//
DummyTransMeta twoMeta = new DummyTransMeta();
StepMeta two = new StepMeta(registry.getPluginId(StepPluginType.class, twoMeta), DUMMY_STEPNAME, twoMeta); //$NON-NLS-1$
two.setLocation(250,50);
two.setDraw(true);
previewMeta.addStep(two);
// Add the hops between the 3 steps.
//
TransHopMeta zeroOne = new TransHopMeta(zero, one);
previewMeta.addTransHop(zeroOne);
TransHopMeta oneTwo= new TransHopMeta(one, two);
previewMeta.addTransHop(oneTwo);
return previewMeta;
}
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:39,代码来源:TransTestFactory.java
示例12: createDummyStep
import org.pentaho.di.trans.steps.dummytrans.DummyTransMeta; //导入依赖的package包/类
/**
* Creates a dummy
* @param name
* @param pluginRegistry
* @return StepMata
*/
public static synchronized StepMeta createDummyStep(String name, PluginRegistry pluginRegistry) {
DummyTransMeta dummyTransMeta = new DummyTransMeta();
String dummyPid = pluginRegistry.getPluginId(StepPluginType.class, dummyTransMeta);
StepMeta dummyStep = new StepMeta(dummyPid, name, dummyTransMeta);
return dummyStep;
}
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:14,代码来源:TestUtilities.java
示例13: generateResultStep
import org.pentaho.di.trans.steps.dummytrans.DummyTransMeta; //导入依赖的package包/类
private StepMeta generateResultStep() {
DummyTransMeta meta = new DummyTransMeta();
StepMeta stepMeta = new StepMeta("RESULT", meta);
stepMeta.setLocation(xLocation, 50);
xLocation+=100;
stepMeta.setDraw(true);
return stepMeta;
}
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:10,代码来源:SqlTransMeta.java
示例14: createDummyStep
import org.pentaho.di.trans.steps.dummytrans.DummyTransMeta; //导入依赖的package包/类
/**
* Create a dummy step for this class.
*
* @param name
* @param registry
* @return
*/
private StepMeta createDummyStep( String name, PluginRegistry registry ) {
// Create a dummy step 1 and add it to the tranMeta
String dummyStepName = "dummy step";
DummyTransMeta dm1 = new DummyTransMeta();
String dummyPid1 = registry.getPluginId( StepPluginType.class, dm1 );
StepMeta dummyStep = new StepMeta( dummyPid1, dummyStepName, dm1 );
return dummyStep;
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:17,代码来源:TextFileOutputIT.java
示例15: createAndTestTrans
import org.pentaho.di.trans.steps.dummytrans.DummyTransMeta; //导入依赖的package包/类
protected Trans createAndTestTrans( PluginRegistry registry, TransMeta transMeta, StepMeta inputStep,
RowStepCollector rowStepCollector, String name, int limit ) throws KettleException {
//
// Create a dummy step
//
String dummyStepname = "dummy step";
DummyTransMeta dm1 = new DummyTransMeta();
String dummyPid1 = registry.getPluginId( StepPluginType.class, dm1 );
StepMeta dummyStep1 = new StepMeta( dummyPid1, dummyStepname, dm1 );
transMeta.addStep( dummyStep1 );
TransHopMeta hi3 = new TransHopMeta( inputStep, dummyStep1 );
transMeta.addTransHop( hi3 );
// Now execute the transformation...
Trans trans = new Trans( transMeta );
trans.prepareExecution( null );
StepInterface si = trans.getStepInterface( dummyStepname, 0 );
si.addRowListener( rowStepCollector );
RowProducer rp = trans.addRowProducer( inputStep.getName(), 0 );
RowMeta rowMeta = new RowMeta();
rowMeta.addValueMeta( new ValueMetaString( "pageSize" ) );
rowMeta.addValueMeta( new ValueMetaString( "name" ) );
rp.putRow( rowMeta, new Object[] { Integer.valueOf( limit ), name } );
rp.finished();
return trans;
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:34,代码来源:RestInputIT.java
示例16: createDummyStep
import org.pentaho.di.trans.steps.dummytrans.DummyTransMeta; //导入依赖的package包/类
/**
* Creates a dummy
*
* @param name
* @param pluginRegistry
* @return StepMata
*/
public static synchronized StepMeta createDummyStep( String name, PluginRegistry pluginRegistry ) {
DummyTransMeta dummyTransMeta = new DummyTransMeta();
String dummyPid = pluginRegistry.getPluginId( StepPluginType.class, dummyTransMeta );
StepMeta dummyStep = new StepMeta( dummyPid, name, dummyTransMeta );
return dummyStep;
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:15,代码来源:TestUtilities.java
示例17: testsearchInfoAndTargetStepsTwice
import org.pentaho.di.trans.steps.dummytrans.DummyTransMeta; //导入依赖的package包/类
@Test
public void testsearchInfoAndTargetStepsTwice() {
StepMetaInterface defStep = new DummyTransMeta();
StepMeta stepMeta = new StepMeta( "id", "default", defStep );
SwitchCaseMeta meta = new SwitchCaseMeta();
meta.allocate();
meta.setDefaultTargetStepname( stepMeta.getName() );
meta.searchInfoAndTargetSteps( Collections.singletonList( stepMeta ) );
// would throw npe
meta.searchInfoAndTargetSteps( Collections.singletonList( stepMeta ) );
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:13,代码来源:SwitchCaseMetaTest.java
示例18: buildHexadecimalChecksumTrans
import org.pentaho.di.trans.steps.dummytrans.DummyTransMeta; //导入依赖的package包/类
private Trans buildHexadecimalChecksumTrans( int checkSumType, boolean compatibilityMode, boolean oldChecksumBehaviour ) throws Exception {
// Create a new transformation...
TransMeta transMeta = new TransMeta();
transMeta.setName( getClass().getName() );
// Create a CheckSum Step
String checkSumStepname = "CheckSum";
CheckSumMeta meta = new CheckSumMeta();
// Set the compatibility mode and other required fields
meta.setCompatibilityMode( compatibilityMode );
meta.setResultFieldName( "hex" );
meta.setCheckSumType( checkSumType );
meta.setResultType( CheckSumMeta.result_TYPE_HEXADECIMAL );
meta.setFieldName( new String[] { "test" } );
meta.setOldChecksumBehaviour( oldChecksumBehaviour );
String checkSumPluginPid = PluginRegistry.getInstance().getPluginId( StepPluginType.class, meta );
StepMeta checkSumStep = new StepMeta( checkSumPluginPid, checkSumStepname, meta );
transMeta.addStep( checkSumStep );
// Create a Dummy step
String dummyStepname = "Output";
DummyTransMeta dummyMeta = new DummyTransMeta();
String dummyStepPid = PluginRegistry.getInstance().getPluginId( StepPluginType.class, dummyMeta );
StepMeta dummyStep = new StepMeta( dummyStepPid, dummyStepname, dummyMeta );
transMeta.addStep( dummyStep );
// Create a hop from CheckSum to Output
TransHopMeta hop = new TransHopMeta( checkSumStep, dummyStep );
transMeta.addTransHop( hop );
return new Trans( transMeta );
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:35,代码来源:CheckSumTest.java
示例19: getReadStepMeta
import org.pentaho.di.trans.steps.dummytrans.DummyTransMeta; //导入依赖的package包/类
static StepMeta getReadStepMeta( String name ) {
DummyTransMeta twoMeta = new DummyTransMeta();
StepMeta two = new StepMeta( registry.getPluginId( StepPluginType.class, twoMeta ), name, twoMeta );
two.setLocation( 250, 50 );
two.setDraw( true );
return two;
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:8,代码来源:TransTestFactory.java
示例20: prepareStepMetas_1_x2
import org.pentaho.di.trans.steps.dummytrans.DummyTransMeta; //导入依赖的package包/类
/**
* one 'regular step' to 'step running in 2 copies'
*/
private void prepareStepMetas_1_x2() {
StepMeta dummy1 = new StepMeta( ONE, null );
StepMeta dummy2 = new StepMeta( TWO, null );
dummy2.setCopies( 2 );
chain.add( dummy1 );
chain.add( dummy2 );
for ( StepMeta item : chain ) {
item.setStepMetaInterface( new DummyTransMeta() );
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:15,代码来源:TransPartitioningTest.java
注:本文中的org.pentaho.di.trans.steps.dummytrans.DummyTransMeta类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论