本文整理汇总了Java中org.pentaho.di.trans.step.StepPartitioningMeta.setPartitionSchemaName方法的典型用法代码示例。如果您正苦于以下问题:Java StepPartitioningMeta.setPartitionSchemaName方法的具体用法?Java StepPartitioningMeta.setPartitionSchemaName怎么用?Java StepPartitioningMeta.setPartitionSchemaName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.trans.step.StepPartitioningMeta
的用法示例。
在下文中一共展示了StepPartitioningMeta.setPartitionSchemaName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: prepareStepMetas_cl1_cl1
import org.pentaho.di.trans.step.StepPartitioningMeta; //导入方法依赖的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() );
}
}
示例2: prepareStepMetas_cl1_cl2
import org.pentaho.di.trans.step.StepPartitioningMeta; //导入方法依赖的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() );
}
}
示例3: loadStepPartitioningMeta
import org.pentaho.di.trans.step.StepPartitioningMeta; //导入方法依赖的package包/类
public StepPartitioningMeta loadStepPartitioningMeta(ObjectId id_step) throws KettleException
{
StepPartitioningMeta stepPartitioningMeta = new StepPartitioningMeta();
stepPartitioningMeta.setPartitionSchemaName( repository.getStepAttributeString(id_step, "PARTITIONING_SCHEMA") );
String methodCode = repository.getStepAttributeString(id_step, "PARTITIONING_METHOD");
stepPartitioningMeta.setMethod( StepPartitioningMeta.getMethod(methodCode) );
if( stepPartitioningMeta.getPartitioner() != null ) {
stepPartitioningMeta.getPartitioner().loadRep( repository, id_step);
}
stepPartitioningMeta.hasChanged(true);
return stepPartitioningMeta;
}
示例4: loadStepPartitioningMeta
import org.pentaho.di.trans.step.StepPartitioningMeta; //导入方法依赖的package包/类
public StepPartitioningMeta loadStepPartitioningMeta( ObjectId id_step ) throws KettleException {
StepPartitioningMeta stepPartitioningMeta = new StepPartitioningMeta();
stepPartitioningMeta.setPartitionSchemaName( repository
.getStepAttributeString( id_step, "PARTITIONING_SCHEMA" ) );
String methodCode = repository.getStepAttributeString( id_step, "PARTITIONING_METHOD" );
stepPartitioningMeta.setMethod( StepPartitioningMeta.getMethod( methodCode ) );
if ( stepPartitioningMeta.getPartitioner() != null ) {
stepPartitioningMeta.getPartitioner().loadRep( repository, id_step );
}
stepPartitioningMeta.hasChanged( true );
return stepPartitioningMeta;
}