本文整理汇总了Java中org.pentaho.di.job.entry.JobEntryCopy.isTransformation方法的典型用法代码示例。如果您正苦于以下问题:Java JobEntryCopy.isTransformation方法的具体用法?Java JobEntryCopy.isTransformation怎么用?Java JobEntryCopy.isTransformation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.job.entry.JobEntryCopy
的用法示例。
在下文中一共展示了JobEntryCopy.isTransformation方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: jobStopAll
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的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());
}
}
}
}
示例2: jobKillAll
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的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();
}
}
示例3: jobCopy
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的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);
}