Search in sources :

Example 16 with TransSplitter

use of org.pentaho.di.trans.cluster.TransSplitter in project pentaho-kettle by pentaho.

the class PartitioningIT method testClusteringWithPartitioningOnMaster.

/**
 * See PDI-12766
 *
 * @throws Exception
 */
public void testClusteringWithPartitioningOnMaster() throws Exception {
    init();
    ClusterGenerator clusterGenerator = new ClusterGenerator();
    LogChannel log = new LogChannel("cluster unit test <test-partitioning-on-master-and-clustering>");
    try {
        clusterGenerator.launchSlaveServers();
        TransMeta transMeta = loadAndModifyTestTransformation(clusterGenerator, "src/it/resources/org/pentaho/di/cluster/test-partitioning-on-master-and-clustering.ktr");
        TransExecutionConfiguration config = createClusteredTransExecutionConfiguration();
        TransSplitter transSplitter = Trans.executeClustered(transMeta, config);
        long nrErrors = Trans.monitorClusteredTransformation(log, transSplitter, null);
        assertEquals(0L, nrErrors);
    } catch (Exception e) {
        e.printStackTrace();
        fail(e.toString());
    } finally {
        try {
            clusterGenerator.stopSlaveServers();
        } catch (Exception e) {
            e.printStackTrace();
            fail(e.toString());
        }
    }
}
Also used : TransExecutionConfiguration(org.pentaho.di.trans.TransExecutionConfiguration) TransMeta(org.pentaho.di.trans.TransMeta) LogChannel(org.pentaho.di.core.logging.LogChannel) TransSplitter(org.pentaho.di.trans.cluster.TransSplitter)

Aggregations

TransSplitter (org.pentaho.di.trans.cluster.TransSplitter)16 TransMeta (org.pentaho.di.trans.TransMeta)15 TransExecutionConfiguration (org.pentaho.di.trans.TransExecutionConfiguration)14 LogChannel (org.pentaho.di.core.logging.LogChannel)13 Result (org.pentaho.di.core.Result)3 KettleException (org.pentaho.di.core.exception.KettleException)3 FileObject (org.apache.commons.vfs2.FileObject)2 SlaveServer (org.pentaho.di.cluster.SlaveServer)2 KettleExtensionPoint (org.pentaho.di.core.extension.KettleExtensionPoint)2 StepMeta (org.pentaho.di.trans.step.StepMeta)2 ArrayList (java.util.ArrayList)1 Map (java.util.Map)1 ResultFile (org.pentaho.di.core.ResultFile)1 RowMetaAndData (org.pentaho.di.core.RowMetaAndData)1 KettleDatabaseException (org.pentaho.di.core.exception.KettleDatabaseException)1 KettleXMLException (org.pentaho.di.core.exception.KettleXMLException)1 Point (org.pentaho.di.core.gui.Point)1 LogChannelFileWriter (org.pentaho.di.core.logging.LogChannelFileWriter)1 LogLevel (org.pentaho.di.core.logging.LogLevel)1 NamedParams (org.pentaho.di.core.parameters.NamedParams)1