• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java JobEntryJob类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.pentaho.di.job.entries.job.JobEntryJob的典型用法代码示例。如果您正苦于以下问题:Java JobEntryJob类的具体用法?Java JobEntryJob怎么用?Java JobEntryJob使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



JobEntryJob类属于org.pentaho.di.job.entries.job包,在下文中一共展示了JobEntryJob类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: jobStopAll

import org.pentaho.di.job.entries.job.JobEntryJob; //导入依赖的package包/类
/**
* 停止作业,包含子作业和转换 <br/>
* @author jingma
* @param job
*/
public static void jobStopAll(Job job){
       job.stopAll();
       JobMeta jobMeta = job.getJobMeta();
       for(JobEntryCopy jec:jobMeta.getJobCopies()){
           if(jec.isTransformation()){
               JobEntryTrans jet = (JobEntryTrans)jec.getEntry();
               if(jet.getTrans()!=null){
                   jet.getTrans().stopAll();
               }
           }else if(jec.isJob()){
               JobEntryJob jej = (JobEntryJob)jec.getEntry();
               if(jej.getJob()!=null){
                   jobStopAll(jej.getJob());
               }
           }
       }
}
 
开发者ID:majinju,项目名称:KettleEasyExpand,代码行数:23,代码来源:KettleUtils.java


示例2: jobKillAll

import org.pentaho.di.job.entries.job.JobEntryJob; //导入依赖的package包/类
/**
* 结束作业,包含子作业和转换 <br/>
* @author jingma
* @param job
*/
@SuppressWarnings("deprecation")
public static void jobKillAll(Job job){
    job.stopAll();
    JobMeta jobMeta = job.getJobMeta();
    for(JobEntryCopy jec:jobMeta.getJobCopies()){
        if(jec.isTransformation()){
            JobEntryTrans jet = (JobEntryTrans)jec.getEntry();
            if(jet.getTrans()!=null){
                jet.getTrans().killAll();
            }
        }else if(jec.isJob()){
            JobEntryJob jej = (JobEntryJob)jec.getEntry();
            if(jej.getJob()!=null){
                jobKillAll(jej.getJob());
            }
        }
    }
    //采用线程中断结束卡住的线程
    if(job.getState().equals(State.BLOCKED)||job.getState().equals(State.TIMED_WAITING)){
        job.stop();
    }else{
        job.interrupt();
    }
}
 
开发者ID:majinju,项目名称:KettleEasyExpand,代码行数:30,代码来源:KettleUtils.java


示例3: jobCopy

import org.pentaho.di.job.entries.job.JobEntryJob; //导入依赖的package包/类
/**
* 将指定job复制到KettleUtils中的资源库 <br/>
* @author jingma
* @param jobName job名称
* @param jobPath job路径
* @param fromRepository 来源资源库
   * @param toRepository 目标资源库
* @throws KettleException
*/
public static void jobCopy(String jobName,String jobPath,Repository fromRepository,
        Repository toRepository) throws KettleException {
	JobMeta jobMeta = KettleUtils.loadJob(jobName,jobPath,fromRepository);
	for(JobEntryCopy jec:jobMeta.getJobCopies()){
		if(jec.isTransformation()){
			JobEntryTrans jet = (JobEntryTrans)jec.getEntry();
			transCopy(jet.getObjectName(), jet.getDirectory(),fromRepository,toRepository);
		}else if(jec.isJob()){
			JobEntryJob jej = (JobEntryJob)jec.getEntry();
			jobCopy(jej.getObjectName(),jej.getDirectory(),fromRepository,toRepository);
		}
	}
	jobMeta.setRepository(toRepository);
	jobMeta.setMetaStore(toRepository.getMetaStore());
	if(!isDirectoryExist(toRepository,jobPath)){
		//所在目录不存在则创建
	    toRepository.createRepositoryDirectory(toRepository.findDirectory("/"), jobPath);
	}
	KettleUtils.saveJob(toRepository,jobMeta);
}
 
开发者ID:majinju,项目名称:KettleEasyExpand,代码行数:30,代码来源:KettleUtils.java


示例4: init

import org.pentaho.di.job.entries.job.JobEntryJob; //导入依赖的package包/类
public void init() {
  jobListeners = new ArrayList<JobListener>();
  jobEntryListeners = new ArrayList<JobEntryListener>();

  activeJobEntryTransformations = new HashMap<JobEntryCopy, JobEntryTrans>();
  activeJobEntryJobs = new HashMap<JobEntryCopy, JobEntryJob>();

  active = new AtomicBoolean(false);
  stopped = new AtomicBoolean(false);
  jobTracker = new JobTracker(jobMeta);
  jobEntryResults = new ArrayList<JobEntryResult>();
  initialized = new AtomicBoolean(false);
  finished = new AtomicBoolean(false);
  errors = new AtomicInteger(0);
  batchId = -1;
  passedBatchId = -1;
  maxJobEntriesLogged = Const.toInt(EnvUtil.getSystemProperty(Const.KETTLE_MAX_JOB_ENTRIES_LOGGED), 1000);

  result = null;
  this.setDefaultLogCommitSize();
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:22,代码来源:Job.java


示例5: getParameters

import org.pentaho.di.job.entries.job.JobEntryJob; //导入依赖的package包/类
protected void getParameters() {
  try {
    JobEntryJob jej = new JobEntryJob();
    getInfo(jej);
    JobMeta jm = jej.getJobMeta(rep, jobMeta);
    String[] parameters = jm.listParameters();
    
    String[] existing = wParameters.getItems(1);
    
    for (int i=0;i<parameters.length;i++) {
      if (Const.indexOfString(parameters[i], existing)<0) {
        TableItem item = new TableItem(wParameters.table, SWT.NONE);
        item.setText(1, parameters[i]);
      }
    }
    wParameters.removeEmptyRows();
    wParameters.setRowNums();
    wParameters.optWidth(true);
  } catch(Exception e) {
    new ErrorDialog(shell, 
        BaseMessages.getString(PKG, "JobEntryJobDialog.Exception.UnableToLoadJob.Title"), 
        BaseMessages.getString(PKG, "JobEntryJobDialog.Exception.UnableToLoadJob.Message"), e);
  }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:25,代码来源:JobEntryJobDialog.java


示例6: init

import org.pentaho.di.job.entries.job.JobEntryJob; //导入依赖的package包/类
/**
 * Initializes the Job.
 */
public void init() {
  jobListeners = new ArrayList<JobListener>();
  jobEntryListeners = new ArrayList<JobEntryListener>();

  activeJobEntryTransformations = new HashMap<JobEntryCopy, JobEntryTrans>();
  activeJobEntryJobs = new HashMap<JobEntryCopy, JobEntryJob>();

  active = new AtomicBoolean(false);
  stopped = new AtomicBoolean(false);
  jobTracker = new JobTracker(jobMeta);
  jobEntryResults = new LinkedList<JobEntryResult>();
  initialized = new AtomicBoolean(false);
  finished = new AtomicBoolean(false);
  errors = new AtomicInteger(0);
  batchId = -1;
  passedBatchId = -1;
  maxJobEntriesLogged = Const.toInt(EnvUtil.getSystemProperty(Const.KETTLE_MAX_JOB_ENTRIES_LOGGED), 1000);

  result = null;
  this.setDefaultLogCommitSize();
}
 
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:25,代码来源:Job.java


示例7: getParameters

import org.pentaho.di.job.entries.job.JobEntryJob; //导入依赖的package包/类
protected void getParameters( JobMeta inputJobMeta ) {
  try {
    if ( inputJobMeta == null ) {
      JobEntryJob jej = new JobEntryJob();
      getInfo( jej );
      inputJobMeta = jej.getJobMeta( rep, metaStore, jobMeta );
    }
    String[] parameters = inputJobMeta.listParameters();

    String[] existing = wParameters.getItems( 1 );

    for ( int i = 0; i < parameters.length; i++ ) {
      if ( Const.indexOfString( parameters[i], existing ) < 0 ) {
        TableItem item = new TableItem( wParameters.table, SWT.NONE );
        item.setText( 1, parameters[i] );
      }
    }
    wParameters.removeEmptyRows();
    wParameters.setRowNums();
    wParameters.optWidth( true );
  } catch ( Exception e ) {
    new ErrorDialog(
      shell, BaseMessages.getString( PKG, "JobEntryJobDialog.Exception.UnableToLoadJob.Title" ), BaseMessages
      .getString( PKG, "JobEntryJobDialog.Exception.UnableToLoadJob.Message" ), e );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:27,代码来源:JobEntryJobDialog.java


示例8: processLinkedJobs

import org.pentaho.di.job.entries.job.JobEntryJob; //导入依赖的package包/类
protected JobMeta processLinkedJobs( JobMeta jobMeta ) {
  for ( int i = 0; i < jobMeta.nrJobEntries(); i++ ) {
    JobEntryCopy jec = jobMeta.getJobEntry( i );
    if ( jec.getEntry() instanceof JobEntryJob ) {
      JobEntryJob jej = (JobEntryJob) jec.getEntry();
      ObjectLocationSpecificationMethod specMethod = jej.getSpecificationMethod();
      // If the reference is by filename, change it to Repository By Name. Otherwise it's fine so leave it alone
      if ( specMethod == ObjectLocationSpecificationMethod.FILENAME ) {
        jej.setSpecificationMethod( ObjectLocationSpecificationMethod.REPOSITORY_BY_NAME );
        String filename = jej.getFilename();
        String jobname = filename.substring( filename.lastIndexOf( "/" ) + 1, filename.lastIndexOf( '.' ) );
        String directory = filename.substring( 0, filename.lastIndexOf( "/" ) );
        jej.setJobName( jobname );
        jej.setDirectory( directory );
        jobMeta.setJobEntry( i, jec );
      }
    }
  }
  return jobMeta;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:21,代码来源:JobFileListener.java


示例9: testProcessLinkedJobsWithFilename

import org.pentaho.di.job.entries.job.JobEntryJob; //导入依赖的package包/类
@Test
public void testProcessLinkedJobsWithFilename() {
  JobEntryJob jobJobExecutor = spy( new JobEntryJob() );
  jobJobExecutor.setFileName( "/path/to/Job1.kjb" );
  jobJobExecutor.setSpecificationMethod( ObjectLocationSpecificationMethod.FILENAME );
  JobEntryCopy jobEntry = mock( JobEntryCopy.class );
  when( jobEntry.getEntry() ).thenReturn( jobJobExecutor );

  JobMeta parent = mock( JobMeta.class );
  when( parent.nrJobEntries() ).thenReturn( 1 );
  when( parent.getJobEntry( 0 ) ).thenReturn( jobEntry );

  JobMeta result = jobFileListener.processLinkedJobs( parent );

  JobEntryCopy meta = result.getJobEntry( 0 );
  assertNotNull( meta );
  JobEntryJob resultExecMeta = (JobEntryJob) meta.getEntry();
  assertEquals( ObjectLocationSpecificationMethod.REPOSITORY_BY_NAME, resultExecMeta.getSpecificationMethod() );
  assertEquals( resultExecMeta.getDirectory(), "/path/to" );
  assertEquals( resultExecMeta.getJobName(), "Job1" );

}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:23,代码来源:JobFileListenerTest.java


示例10: testProcessLinkedJobsWithNoFilename

import org.pentaho.di.job.entries.job.JobEntryJob; //导入依赖的package包/类
@Test
public void testProcessLinkedJobsWithNoFilename() {
  JobEntryJob jobJobExecutor = spy( new JobEntryJob() );
  jobJobExecutor.setFileName( null );
  jobJobExecutor.setDirectory( "/path/to" );
  jobJobExecutor.setJobName( "Job1" );
  jobJobExecutor.setSpecificationMethod( ObjectLocationSpecificationMethod.REPOSITORY_BY_NAME );
  JobEntryCopy jobEntry = mock( JobEntryCopy.class );
  when( jobEntry.getEntry() ).thenReturn( jobJobExecutor );

  JobMeta parent = mock( JobMeta.class );
  when( parent.nrJobEntries() ).thenReturn( 1 );
  when( parent.getJobEntry( 0 ) ).thenReturn( jobEntry );

  JobMeta result = jobFileListener.processLinkedJobs( parent );

  JobEntryCopy meta = result.getJobEntry( 0 );
  assertNotNull( meta );
  JobEntryJob resultExecMeta = (JobEntryJob) meta.getEntry();
  assertEquals( ObjectLocationSpecificationMethod.REPOSITORY_BY_NAME, resultExecMeta.getSpecificationMethod() );
  assertEquals( resultExecMeta.getDirectory(), "/path/to" );
  assertEquals( resultExecMeta.getJobName(), "Job1" );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:24,代码来源:JobFileListenerTest.java


示例11: init

import org.pentaho.di.job.entries.job.JobEntryJob; //导入依赖的package包/类
/**
 * Initializes the Job.
 */
public void init() {
  jobListeners = new ArrayList<JobListener>();
  jobEntryListeners = new ArrayList<JobEntryListener>();
  delegationListeners = new ArrayList<DelegationListener>();

  activeJobEntryTransformations = new HashMap<JobEntryCopy, JobEntryTrans>();
  activeJobEntryJobs = new HashMap<JobEntryCopy, JobEntryJob>();

  extensionDataMap = new HashMap<String, Object>();

  active = new AtomicBoolean( false );
  stopped = new AtomicBoolean( false );
  jobTracker = new JobTracker( jobMeta );
  synchronized ( jobEntryResults ) {
    jobEntryResults.clear();
  }
  initialized = new AtomicBoolean( false );
  finished = new AtomicBoolean( false );
  errors = new AtomicInteger( 0 );
  batchId = -1;
  passedBatchId = -1;
  maxJobEntriesLogged = Const.toInt( EnvUtil.getSystemProperty( Const.KETTLE_MAX_JOB_ENTRIES_LOGGED ), 1000 );

  result = null;
  startJobEntryCopy = null;
  startJobEntryResult = null;

  this.setDefaultLogCommitSize();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:33,代码来源:Job.java


示例12: findActiveJob

import org.pentaho.di.job.entries.job.JobEntryJob; //导入依赖的package包/类
public Job findActiveJob( Job job, JobEntryCopy jobEntryCopy ) {
  JobEntryJob jobEntryJob = job.getActiveJobEntryJobs().get( jobEntryCopy );
  if ( jobEntryJob == null ) {
    return null;
  }
  return jobEntryJob.getJob();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:8,代码来源:Spoon.java


示例13: JobEntryJobDialog

import org.pentaho.di.job.entries.job.JobEntryJob; //导入依赖的package包/类
public JobEntryJobDialog(Shell parent, JobEntryInterface jobEntryInt, Repository rep, JobMeta jobMeta)
{
	super(parent, jobEntryInt, rep, jobMeta);
	jobEntry = (JobEntryJob) jobEntryInt;
	this.log = LogWriter.getInstance();
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:7,代码来源:JobEntryJobDialog.java


示例14: openJob

import org.pentaho.di.job.entries.job.JobEntryJob; //导入依赖的package包/类
public void openJob() {
  final JobEntryInterface entry = getJobEntry().getEntry();
  openJob((JobEntryJob) entry);
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:5,代码来源:JobGraph.java


示例15: getActiveJobEntryJobs

import org.pentaho.di.job.entries.job.JobEntryJob; //导入依赖的package包/类
/**
 * @return the activeJobEntryJobs
 */
public Map<JobEntryCopy, JobEntryJob> getActiveJobEntryJobs() {
	return activeJobEntryJobs;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:7,代码来源:Job.java


示例16: JobEntryJobDialog

import org.pentaho.di.job.entries.job.JobEntryJob; //导入依赖的package包/类
public JobEntryJobDialog(Shell parent, JobEntryInterface jobEntryInt, Repository rep, JobMeta jobMeta) {
  super(parent, jobEntryInt, rep, jobMeta);
  jobEntry = (JobEntryJob) jobEntryInt;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:5,代码来源:JobEntryJobDialog.java


示例17: openJob

import org.pentaho.di.job.entries.job.JobEntryJob; //导入依赖的package包/类
public void openJob() {
JobEntryCopy jobEntryCopy = getJobEntry();
   final JobEntryInterface entry = jobEntryCopy.getEntry();
   openJob((JobEntryJob) entry, jobEntryCopy);
 }
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:6,代码来源:JobGraph.java


示例18: findActiveJob

import org.pentaho.di.job.entries.job.JobEntryJob; //导入依赖的package包/类
public Job findActiveJob(Job job, JobEntryCopy jobEntryCopy) {
  JobEntryJob jobEntryJob = job.getActiveJobEntryJobs().get(jobEntryCopy);
  if (jobEntryJob == null)
    return null;
  return jobEntryJob.getJob();
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:7,代码来源:Spoon.java


示例19: JobEntryJobDialog

import org.pentaho.di.job.entries.job.JobEntryJob; //导入依赖的package包/类
public JobEntryJobDialog( Shell parent, JobEntryInterface jobEntryInt, Repository rep, JobMeta jobMeta ) {
  super( parent, jobEntryInt, rep, jobMeta );
  jobEntry = (JobEntryJob) jobEntryInt;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:5,代码来源:JobEntryJobDialog.java


示例20: openJob

import org.pentaho.di.job.entries.job.JobEntryJob; //导入依赖的package包/类
public void openJob() {
  JobEntryCopy jobEntryCopy = getJobEntry();
  final JobEntryInterface entry = jobEntryCopy.getEntry();
  openJob( (JobEntryJob) entry, jobEntryCopy );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:6,代码来源:JobGraph.java



注:本文中的org.pentaho.di.job.entries.job.JobEntryJob类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RestorableMeter类代码示例发布时间:2022-05-23
下一篇:
Java JarClassSource类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap