Java Code Examples for org.pentaho.di.trans.TransMeta#setClusterSchemas()
The following examples show how to use
org.pentaho.di.trans.TransMeta#setClusterSchemas() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SharedObjectSyncUtilTest.java From pentaho-kettle with Apache License 2.0 | 6 votes |
@Test public void synchronizeClusterSchemas() throws Exception { final String clusterSchemaName = "SharedClusterSchema"; TransMeta transformarion1 = createTransMeta(); ClusterSchema clusterSchema1 = createClusterSchema( clusterSchemaName, true ); transformarion1.setClusterSchemas( Collections.singletonList( clusterSchema1 ) ); spoonDelegates.trans.addTransformation( transformarion1 ); TransMeta transformarion2 = createTransMeta(); ClusterSchema clusterSchema2 = createClusterSchema( clusterSchemaName, true ); transformarion2.setClusterSchemas( Collections.singletonList( clusterSchema2 ) ); spoonDelegates.trans.addTransformation( transformarion2 ); clusterSchema2.setDynamic( true ); sharedUtil.synchronizeClusterSchemas( clusterSchema2 ); assertThat( clusterSchema1.isDynamic(), equalTo( true ) ); }
Example 2
Source File: SharedObjectSyncUtilTest.java From pentaho-kettle with Apache License 2.0 | 6 votes |
@Test public void synchronizeClusterSchemas_sync_shared_only() throws Exception { final String clusterSchemaName = "ClusterSchema"; TransMeta transformarion1 = createTransMeta(); ClusterSchema clusterSchema1 = createClusterSchema( clusterSchemaName, true ); transformarion1.setClusterSchemas( Collections.singletonList( clusterSchema1 ) ); spoonDelegates.trans.addTransformation( transformarion1 ); TransMeta transformarion2 = createTransMeta(); ClusterSchema unsharedClusterSchema2 = createClusterSchema( clusterSchemaName, false ); transformarion2.setClusterSchemas( Collections.singletonList( unsharedClusterSchema2 ) ); spoonDelegates.trans.addTransformation( transformarion2 ); TransMeta transformarion3 = createTransMeta(); ClusterSchema clusterSchema3 = createClusterSchema( clusterSchemaName, true ); transformarion3.setClusterSchemas( Collections.singletonList( clusterSchema3 ) ); spoonDelegates.trans.addTransformation( transformarion3 ); clusterSchema3.setDynamic( true ); sharedUtil.synchronizeClusterSchemas( clusterSchema3 ); assertThat( clusterSchema1.isDynamic(), equalTo( true ) ); assertThat( unsharedClusterSchema2.isDynamic(), equalTo( false ) ); }
Example 3
Source File: SharedObjectSyncUtilTest.java From pentaho-kettle with Apache License 2.0 | 6 votes |
@Test public void synchronizeClusterSchemas_should_not_sync_unshared() throws Exception { final String clusterSchemaName = "ClusterSchema"; TransMeta transformarion1 = createTransMeta(); ClusterSchema clusterSchema1 = createClusterSchema( clusterSchemaName, true ); transformarion1.setClusterSchemas( Collections.singletonList( clusterSchema1 ) ); spoonDelegates.trans.addTransformation( transformarion1 ); TransMeta transformarion2 = createTransMeta(); ClusterSchema clusterSchema2 = createClusterSchema( clusterSchemaName, false ); transformarion2.setClusterSchemas( Collections.singletonList( clusterSchema2 ) ); spoonDelegates.trans.addTransformation( transformarion2 ); clusterSchema2.setDynamic( true ); sharedUtil.synchronizeClusterSchemas( clusterSchema2 ); assertThat( clusterSchema1.isDynamic(), equalTo( false ) ); }
Example 4
Source File: SharedObjectSyncUtilTest.java From pentaho-kettle with Apache License 2.0 | 6 votes |
@Test public void synchronizeClusterSchemas_use_case_sensitive_name() throws Exception { TransMeta transformarion1 = createTransMeta(); ClusterSchema clusterSchema1 = createClusterSchema( "ClusterSchema", true ); transformarion1.setClusterSchemas( Collections.singletonList( clusterSchema1 ) ); spoonDelegates.trans.addTransformation( transformarion1 ); TransMeta transformarion2 = createTransMeta(); ClusterSchema clusterSchema2 = createClusterSchema( "Clusterschema", true ); transformarion2.setClusterSchemas( Collections.singletonList( clusterSchema2 ) ); spoonDelegates.trans.addTransformation( transformarion2 ); clusterSchema2.setDynamic( true ); sharedUtil.synchronizeClusterSchemas( clusterSchema2 ); assertThat( clusterSchema1.isDynamic(), equalTo( false ) ); }