@Test public void testLoadTransMetaRepo() throws Exception { String dir = "/repo/path"; String file = "testTrans"; when( space.environmentSubstitute( dir ) ).thenReturn( dir ); when( space.environmentSubstitute( file ) ).thenReturn( file ); when( repository.loadRepositoryDirectoryTree() ).thenReturn( directoryInterface ); when( directoryInterface.findDirectory( dir ) ).thenReturn( directoryInterface ); JobEntryHadoopTransJobExecutor.loadTransMeta( space, repository, dir + "/" + file, null, null, null ); verify( repository ).loadTransformation( file, directoryInterface, null, true, null ); }
protected static final TransMeta loadTransMeta( VariableSpace space, Repository rep, String filename, ObjectId transformationId, String repositoryDir, String repositoryFile ) throws KettleException { TransMeta transMeta = null; if ( rep == null ) { if ( !Const.isEmpty( filename ) ) { String realFilename = space.environmentSubstitute( filename ); transMeta = new TransMeta( realFilename ); } } else { if ( !Const.isEmpty( filename ) ) { transMeta = getTransMetaFromRepo( filename, rep, space ); } else if ( transformationId != null ) { transMeta = rep.loadTransformation( transformationId, null ); } else if ( !Const.isEmpty( repositoryDir ) && !Const.isEmpty( repositoryFile ) ) { transMeta = getTransMetaFromRepo( repositoryDir, repositoryFile, rep, space ); } } return transMeta; }
JobEntryHadoopTransJobExecutor extends JobEntryBase implements Cloneable, JobEntryInterface,
  HasRepositoryDirectories { protected static final TransMeta loadTransMeta( VariableSpace space, Repository rep, String filename, ObjectId transformationId, String repositoryDir, String repositoryFile ) throws KettleException { TransMeta transMeta = null; if ( rep == null ) { if ( !Const.isEmpty( filename ) ) { String realFilename = space.environmentSubstitute( filename ); transMeta = new TransMeta( realFilename ); } } else { if ( !Const.isEmpty( filename ) ) { transMeta = getTransMetaFromRepo( filename, rep, space ); } else if ( transformationId != null ) { transMeta = rep.loadTransformation( transformationId, null ); } else if ( !Const.isEmpty( repositoryDir ) && !Const.isEmpty( repositoryFile ) ) { transMeta = getTransMetaFromRepo( repositoryDir, repositoryFile, rep, space ); } } return transMeta; } }
JobEntryHadoopTransJobExecutor extends JobEntryBase implements Cloneable, JobEntryInterface,
  HasRepositoryDirectories { protected static final TransMeta loadTransMeta( VariableSpace space, Repository rep, String filename, ObjectId transformationId, String repositoryDir, String repositoryFile ) throws KettleException { TransMeta transMeta = null; if ( rep == null ) { if ( !Const.isEmpty( filename ) ) { String realFilename = space.environmentSubstitute( filename ); transMeta = new TransMeta( realFilename ); } } else { if ( !Const.isEmpty( filename ) ) { transMeta = getTransMetaFromRepo( filename, rep, space ); } else if ( transformationId != null ) { transMeta = rep.loadTransformation( transformationId, null ); } else if ( !Const.isEmpty( repositoryDir ) && !Const.isEmpty( repositoryFile ) ) { transMeta = getTransMetaFromRepo( repositoryDir, repositoryFile, rep, space ); } } return transMeta; } JobEntryHadoopTransJobExecutor( NamedClusterService namedClusterService,
                                         RuntimeTestActionService runtimeTestActionService,
                                         RuntimeTester runtimeTester,
                                         NamedClusterServiceLocator namedClusterServiceLocator ); }
JobEntryHadoopTransJobExecutor extends JobEntryBase implements Cloneable, JobEntryInterface,
  HasRepositoryDirectories { protected static final TransMeta loadTransMeta( VariableSpace space, Repository rep, String filename, ObjectId transformationId, String repositoryDir, String repositoryFile ) throws KettleException { TransMeta transMeta = null; if ( rep == null ) { if ( !Const.isEmpty( filename ) ) { String realFilename = space.environmentSubstitute( filename ); transMeta = new TransMeta( realFilename ); } } else { if ( !Const.isEmpty( filename ) ) { transMeta = getTransMetaFromRepo( filename, rep, space ); } else if ( transformationId != null ) { transMeta = rep.loadTransformation( transformationId, null ); } else if ( !Const.isEmpty( repositoryDir ) && !Const.isEmpty( repositoryFile ) ) { transMeta = getTransMetaFromRepo( repositoryDir, repositoryFile, rep, space ); } } return transMeta; } JobEntryHadoopTransJobExecutor( NamedClusterService namedClusterService,
                                         RuntimeTestActionService runtimeTestActionService,
                                         RuntimeTester runtimeTester,
                                         NamedClusterServiceLocator namedClusterServiceLocator ); static TransMeta getTransMetaFromRepo( String fullPath, Repository rep, VariableSpace space ); static TransMeta getTransMetaFromRepo( String repositoryDir, String repositoryFile, Repository rep, VariableSpace space  ); static String[] splitInputPaths( String inputPath, VariableSpace variableSpace ); String getHadoopJobName(); void setHadoopJobName( String hadoopJobName ); @Override ObjectLocationSpecificationMethod[] getSpecificationMethods(); @Override String[] getDirectories(); @Override void setDirectories( String[] directory ); String getMapTrans(); void setMapTrans( String mapTrans ); String getCombinerTrans(); void setCombinerTrans( String combinerTrans ); String getReduceTrans(); void setReduceTrans( String reduceTrans ); String getMapRepositoryDir(); void setMapRepositoryDir( String mapRepositoryDir ); String getMapRepositoryFile(); void setMapRepositoryFile( String mapRepositoryFile ); ObjectId getMapRepositoryReference(); void setMapRepositoryReference( ObjectId mapRepositoryReference ); String getCombinerRepositoryDir(); void setCombinerRepositoryDir( String combinerRepositoryDir ); String getCombinerRepositoryFile(); void setCombinerRepositoryFile( String combinerRepositoryFile ); ObjectId getCombinerRepositoryReference(); void setCombinerRepositoryReference( ObjectId combinerRepositoryReference ); String getReduceRepositoryDir(); void setReduceRepositoryDir( String reduceRepositoryDir ); String getReduceRepositoryFile(); void setReduceRepositoryFile( String reduceRepositoryFile ); ObjectId getReduceRepositoryReference(); void setReduceRepositoryReference( ObjectId reduceRepositoryReference ); String getMapInputStepName(); void setMapInputStepName( String mapInputStepName ); String getMapOutputStepName(); void setMapOutputStepName( String mapOutputStepName ); String getCombinerInputStepName(); void setCombinerInputStepName( String combinerInputStepName ); String getCombinerOutputStepName(); void setCombinerOutputStepName( String combinerOutputStepName ); String getReduceInputStepName(); void setReduceInputStepName( String reduceInputStepName ); String getReduceOutputStepName(); void setReduceOutputStepName( String reduceOutputStepName ); boolean getSuppressOutputOfMapKey(); void setSuppressOutputOfMapKey( boolean suppress ); boolean getSuppressOutputOfMapValue(); void setSuppressOutputOfMapValue( boolean suppress ); boolean getSuppressOutputOfKey(); void setSuppressOutputOfKey( boolean suppress ); boolean getSuppressOutputOfValue(); void setSuppressOutputOfValue( boolean suppress ); String getInputFormatClass(); void setInputFormatClass( String inputFormatClass ); String getOutputFormatClass(); void setOutputFormatClass( String outputFormatClass ); String getInputPath(); void setInputPath( String inputPath ); String getOutputPath(); void setOutputPath( String outputPath ); boolean isCleanOutputPath(); void setCleanOutputPath( boolean cleanOutputPath ); boolean isBlocking(); void setBlocking( boolean blocking ); String getLoggingInterval(); void setLoggingInterval( String loggingInterval ); List<UserDefinedItem> getUserDefined(); void setUserDefined( List<UserDefinedItem> userDefined ); String getNumMapTasks(); void setNumMapTasks( String numMapTasks ); String getNumReduceTasks(); void setNumReduceTasks( String numReduceTasks ); Result execute( Result result, int arg1 ); PluginInterface getPluginInterface(); void printJobStatus( MapReduceJobAdvanced runningJob ); @Override void loadXML( Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers, Repository rep,
                       IMetaStore metaStore ); @Override String getXML(); @Override void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,
                       List<SlaveServer> slaveServers ); void saveRep( Repository rep, ObjectId id_job ); boolean evaluates(); boolean isUnconditional(); boolean isReducingSingleThreaded(); void setReducingSingleThreaded( boolean reducingSingleThreaded ); boolean isCombiningSingleThreaded(); void setCombiningSingleThreaded( boolean combiningSingleThreaded ); String[] getReferencedObjectDescriptions(); boolean[] isReferencedObjectEnabled(); Object loadReferencedObject( int index, Repository rep, VariableSpace space ); @Override String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions,
                                 ResourceNamingInterface namingInterface, Repository repository, IMetaStore metaStore ); NamedClusterService getNamedClusterService(); NamedCluster getNamedCluster(); void setNamedCluster( NamedCluster namedCluster ); RuntimeTester getRuntimeTester(); RuntimeTestActionService getRuntimeTestActionService(); @Override String getDialogClassName(); }
JobEntryHadoopTransJobExecutor extends JobEntryBase implements Cloneable, JobEntryInterface,
  HasRepositoryDirectories { protected static final TransMeta loadTransMeta( VariableSpace space, Repository rep, String filename, ObjectId transformationId, String repositoryDir, String repositoryFile ) throws KettleException { TransMeta transMeta = null; if ( rep == null ) { if ( !Const.isEmpty( filename ) ) { String realFilename = space.environmentSubstitute( filename ); transMeta = new TransMeta( realFilename ); } } else { if ( !Const.isEmpty( filename ) ) { transMeta = getTransMetaFromRepo( filename, rep, space ); } else if ( transformationId != null ) { transMeta = rep.loadTransformation( transformationId, null ); } else if ( !Const.isEmpty( repositoryDir ) && !Const.isEmpty( repositoryFile ) ) { transMeta = getTransMetaFromRepo( repositoryDir, repositoryFile, rep, space ); } } return transMeta; } JobEntryHadoopTransJobExecutor( NamedClusterService namedClusterService,
                                         RuntimeTestActionService runtimeTestActionService,
                                         RuntimeTester runtimeTester,
                                         NamedClusterServiceLocator namedClusterServiceLocator ); static TransMeta getTransMetaFromRepo( String fullPath, Repository rep, VariableSpace space ); static TransMeta getTransMetaFromRepo( String repositoryDir, String repositoryFile, Repository rep, VariableSpace space  ); static String[] splitInputPaths( String inputPath, VariableSpace variableSpace ); String getHadoopJobName(); void setHadoopJobName( String hadoopJobName ); @Override ObjectLocationSpecificationMethod[] getSpecificationMethods(); @Override String[] getDirectories(); @Override void setDirectories( String[] directory ); String getMapTrans(); void setMapTrans( String mapTrans ); String getCombinerTrans(); void setCombinerTrans( String combinerTrans ); String getReduceTrans(); void setReduceTrans( String reduceTrans ); String getMapRepositoryDir(); void setMapRepositoryDir( String mapRepositoryDir ); String getMapRepositoryFile(); void setMapRepositoryFile( String mapRepositoryFile ); ObjectId getMapRepositoryReference(); void setMapRepositoryReference( ObjectId mapRepositoryReference ); String getCombinerRepositoryDir(); void setCombinerRepositoryDir( String combinerRepositoryDir ); String getCombinerRepositoryFile(); void setCombinerRepositoryFile( String combinerRepositoryFile ); ObjectId getCombinerRepositoryReference(); void setCombinerRepositoryReference( ObjectId combinerRepositoryReference ); String getReduceRepositoryDir(); void setReduceRepositoryDir( String reduceRepositoryDir ); String getReduceRepositoryFile(); void setReduceRepositoryFile( String reduceRepositoryFile ); ObjectId getReduceRepositoryReference(); void setReduceRepositoryReference( ObjectId reduceRepositoryReference ); String getMapInputStepName(); void setMapInputStepName( String mapInputStepName ); String getMapOutputStepName(); void setMapOutputStepName( String mapOutputStepName ); String getCombinerInputStepName(); void setCombinerInputStepName( String combinerInputStepName ); String getCombinerOutputStepName(); void setCombinerOutputStepName( String combinerOutputStepName ); String getReduceInputStepName(); void setReduceInputStepName( String reduceInputStepName ); String getReduceOutputStepName(); void setReduceOutputStepName( String reduceOutputStepName ); boolean getSuppressOutputOfMapKey(); void setSuppressOutputOfMapKey( boolean suppress ); boolean getSuppressOutputOfMapValue(); void setSuppressOutputOfMapValue( boolean suppress ); boolean getSuppressOutputOfKey(); void setSuppressOutputOfKey( boolean suppress ); boolean getSuppressOutputOfValue(); void setSuppressOutputOfValue( boolean suppress ); String getInputFormatClass(); void setInputFormatClass( String inputFormatClass ); String getOutputFormatClass(); void setOutputFormatClass( String outputFormatClass ); String getInputPath(); void setInputPath( String inputPath ); String getOutputPath(); void setOutputPath( String outputPath ); boolean isCleanOutputPath(); void setCleanOutputPath( boolean cleanOutputPath ); boolean isBlocking(); void setBlocking( boolean blocking ); String getLoggingInterval(); void setLoggingInterval( String loggingInterval ); List<UserDefinedItem> getUserDefined(); void setUserDefined( List<UserDefinedItem> userDefined ); String getNumMapTasks(); void setNumMapTasks( String numMapTasks ); String getNumReduceTasks(); void setNumReduceTasks( String numReduceTasks ); Result execute( Result result, int arg1 ); PluginInterface getPluginInterface(); void printJobStatus( MapReduceJobAdvanced runningJob ); @Override void loadXML( Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers, Repository rep,
                       IMetaStore metaStore ); @Override String getXML(); @Override void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,
                       List<SlaveServer> slaveServers ); void saveRep( Repository rep, ObjectId id_job ); boolean evaluates(); boolean isUnconditional(); boolean isReducingSingleThreaded(); void setReducingSingleThreaded( boolean reducingSingleThreaded ); boolean isCombiningSingleThreaded(); void setCombiningSingleThreaded( boolean combiningSingleThreaded ); String[] getReferencedObjectDescriptions(); boolean[] isReferencedObjectEnabled(); Object loadReferencedObject( int index, Repository rep, VariableSpace space ); @Override String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions,
                                 ResourceNamingInterface namingInterface, Repository repository, IMetaStore metaStore ); NamedClusterService getNamedClusterService(); NamedCluster getNamedCluster(); void setNamedCluster( NamedCluster namedCluster ); RuntimeTester getRuntimeTester(); RuntimeTestActionService getRuntimeTestActionService(); @Override String getDialogClassName(); static final String MAPREDUCE_APPLICATION_CLASSPATH; static final String DEFAULT_MAPREDUCE_APPLICATION_CLASSPATH; static final String PENTAHO_MAPREDUCE_PROPERTY_USE_DISTRIBUTED_CACHE; static final String PENTAHO_MAPREDUCE_PROPERTY_PMR_LIBRARIES_ARCHIVE_FILE; static final String PENTAHO_MAPREDUCE_PROPERTY_KETTLE_HDFS_INSTALL_DIR; static final String PENTAHO_MAPREDUCE_PROPERTY_KETTLE_INSTALLATION_ID; static final String PENTAHO_MAPREDUCE_PROPERTY_ADDITIONAL_PLUGINS; static final String DIALOG_NAME; }