@Override public void callExtensionPoint( LogChannelInterface logChannelInterface, Object o ) throws KettleException { AbstractMeta abstractMeta = (AbstractMeta) o; final EmbeddedMetaStore embeddedMetaStore = abstractMeta.getEmbeddedMetaStore(); RunConfigurationManager embeddedRunConfigurationManager = EmbeddedRunConfigurationManager.build( embeddedMetaStore ); List<RunConfiguration> runConfigurationList = embeddedRunConfigurationManager.load(); List<String> runConfigurationNames = runConfigurationList.stream().map( RunConfiguration::getName ).collect( Collectors.toList() ); runConfigurationNames.addAll( runConfigurationManager.getNames() ); runConfigurationList.addAll( createSlaveServerRunConfigurations( runConfigurationNames, abstractMeta ) ); for ( RunConfiguration runConfiguration : runConfigurationList ) { if ( !runConfiguration.getName().equals( DefaultRunConfigurationProvider.DEFAULT_CONFIG_NAME ) ) { runConfigurationManager.save( runConfiguration ); } } }
/** * Class creates an embedded metastores for NamedClusters * * @param meta The TransMeta or JobMeta */ public NamedClusterEmbedManager( AbstractMeta meta, LogChannelInterface log ) { this.meta = meta; this.log = log; NamedClusterServiceOsgi ncso = meta.getNamedClusterServiceOsgi(); if ( ncso == null ) { //throw new IllegalArgumentException( "Meta does not contain a NamedClusterService" ); embeddedMetaStoreFactory = null; // Should only happen from test classes return; } if ( testMetaStoreFactory == null ) { embeddedMetaStoreFactory = new MetaStoreFactory( ncso.getClusterTemplate().getClass(), meta.getEmbeddedMetaStore(), NAMESPACE ); } else { embeddedMetaStoreFactory = testMetaStoreFactory; } }
@Override public void callExtensionPoint( LogChannelInterface logChannelInterface, Object o ) throws KettleException { AbstractMeta abstractMeta = (AbstractMeta) ( (Object[]) o )[ 0 ]; String runConfiguration = (String) ( (Object[]) o )[ 1 ]; final EmbeddedMetaStore embeddedMetaStore = abstractMeta.getEmbeddedMetaStore(); RunConfigurationManager embeddedRunConfigurationManager = EmbeddedRunConfigurationManager.build( embeddedMetaStore ); embeddedRunConfigurationManager.deleteAll(); RunConfiguration loadedRunConfiguration = runConfigurationManager.load( abstractMeta.environmentSubstitute( runConfiguration ) ); embeddedRunConfigurationManager.save( loadedRunConfiguration ); }
@Test public void testGetEmbeddedMetaStore() { assertNotNull( meta.getEmbeddedMetaStore() ); }
VariableSpace variableSpace = (VariableSpace) ( (Object[]) o )[ 2 ]; Repository repository = (Repository) ( (Object[]) o )[ 3 ]; EmbeddedMetaStore embeddedMetaStore = meta.getEmbeddedMetaStore();