Java Code Examples for org.pentaho.di.core.plugins.PluginInterface#getDescription()
The following examples show how to use
org.pentaho.di.core.plugins.PluginInterface#getDescription() .
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: PartitionSettings.java From pentaho-kettle with Apache License 2.0 | 5 votes |
public void fillOptionsAndCodesByPlugins( List<PluginInterface> plugins ) { int pluginIndex = 0; for ( PluginInterface plugin : plugins ) { options[ StepPartitioningMeta.methodDescriptions.length + pluginIndex ] = plugin.getDescription(); codes[ StepPartitioningMeta.methodCodes.length + pluginIndex ] = plugin.getIds()[ 0 ]; pluginIndex++; } }
Example 2
Source File: JobEntryCopy.java From pentaho-kettle with Apache License 2.0 | 4 votes |
/** * @return entry in JobEntryInterface.typeCode[] for native jobs, entry.getTypeCode() for plugins */ public String getTypeDesc() { PluginInterface plugin = PluginRegistry.getInstance().findPluginWithId( JobEntryPluginType.class, entry.getPluginId() ); return plugin.getDescription(); }
Example 3
Source File: MySQLBulkLoader.java From pentaho-kettle with Apache License 2.0 | 4 votes |
public boolean execute( MySQLBulkLoaderMeta meta ) throws KettleException { Runtime rt = Runtime.getRuntime(); try { // 1) Create the FIFO file using the "mkfifo" command... // Make sure to log all the possible output, also from STDERR // data.fifoFilename = environmentSubstitute( meta.getFifoFileName() ); File fifoFile = new File( data.fifoFilename ); if ( !fifoFile.exists() ) { // MKFIFO! // String mkFifoCmd = "mkfifo " + data.fifoFilename; // logBasic( BaseMessages.getString( PKG, "MySQLBulkLoader.Message.CREATINGFIFO", data.dbDescription, mkFifoCmd ) ); Process mkFifoProcess = rt.exec( mkFifoCmd ); StreamLogger errorLogger = new StreamLogger( log, mkFifoProcess.getErrorStream(), "mkFifoError" ); StreamLogger outputLogger = new StreamLogger( log, mkFifoProcess.getInputStream(), "mkFifoOuptut" ); new Thread( errorLogger ).start(); new Thread( outputLogger ).start(); int result = mkFifoProcess.waitFor(); if ( result != 0 ) { throw new Exception( BaseMessages.getString( PKG, "MySQLBulkLoader.Message.ERRORFIFORC", result, mkFifoCmd ) ); } String chmodCmd = "chmod 666 " + data.fifoFilename; logBasic( BaseMessages.getString( PKG, "MySQLBulkLoader.Message.SETTINGPERMISSIONSFIFO", data.dbDescription, chmodCmd ) ); Process chmodProcess = rt.exec( chmodCmd ); errorLogger = new StreamLogger( log, chmodProcess.getErrorStream(), "chmodError" ); outputLogger = new StreamLogger( log, chmodProcess.getInputStream(), "chmodOuptut" ); new Thread( errorLogger ).start(); new Thread( outputLogger ).start(); result = chmodProcess.waitFor(); if ( result != 0 ) { throw new Exception( BaseMessages.getString( PKG, "MySQLBulkLoader.Message.ERRORFIFORC", result, chmodCmd ) ); } } // 2) Make a connection to MySQL for sending SQL commands // (Also, we need a clear cache for getting up-to-date target metadata) DBCache.getInstance().clear( meta.getDatabaseMeta().getName() ); if ( meta.getDatabaseMeta() == null ) { logError( BaseMessages.getString( PKG, "MySQLBulkLoader.Init.ConnectionMissing", getStepname() ) ); return false; } data.db = new Database( this, meta.getDatabaseMeta() ); data.db.shareVariablesWith( this ); PluginInterface dbPlugin = PluginRegistry.getInstance().getPlugin( DatabasePluginType.class, meta.getDatabaseMeta().getDatabaseInterface() ); data.dbDescription = ( dbPlugin != null ) ? dbPlugin.getDescription() : BaseMessages.getString( PKG, "MySQLBulkLoader.UnknownDB" ); // Connect to the database if ( getTransMeta().isUsingUniqueConnections() ) { synchronized ( getTrans() ) { data.db.connect( getTrans().getTransactionId(), getPartitionID() ); } } else { data.db.connect( getPartitionID() ); } logBasic( BaseMessages.getString( PKG, "MySQLBulkLoader.Message.CONNECTED", data.dbDescription ) ); // 3) Now we are ready to run the load command... // executeLoadCommand(); } catch ( Exception ex ) { throw new KettleException( ex ); } return true; }
Example 4
Source File: JobEntryBase.java From pentaho-kettle with Apache License 2.0 | 2 votes |
/** * Gets the plug-in type description * * @return the plug-in type description */ public String getTypeDesc() { PluginInterface plugin = PluginRegistry.getInstance().findPluginWithId( JobEntryPluginType.class, configId ); return plugin.getDescription(); }