本文整理汇总了Java中org.pentaho.di.job.entries.special.JobEntrySpecial类的典型用法代码示例。如果您正苦于以下问题:Java JobEntrySpecial类的具体用法?Java JobEntrySpecial怎么用?Java JobEntrySpecial使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JobEntrySpecial类属于org.pentaho.di.job.entries.special包,在下文中一共展示了JobEntrySpecial类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getFromStart
import org.pentaho.di.job.entries.special.JobEntrySpecial; //导入依赖的package包/类
/**
* 从kettle的start控件中获取定时信息 <br/>
* @author jingma
* @param start
*/
public static JSONObject getFromStart(JobEntrySpecial start) {
if(start==null){
return null;
}
JSONObject result = new JSONObject();
result.put("is_repeat", StringUtil.whether(start.isRepeat()));
result.put("scheduler_type", ""+start.getSchedulerType());
result.put("interval_minutes", start.getIntervalMinutes());
result.put("interval_seconds", start.getIntervalSeconds());
result.put("hour", start.getHour());
result.put("minutes", start.getMinutes());
result.put("week_day", start.getWeekDay());
result.put("day_of_month", start.getDayOfMonth());
return result;
}
开发者ID:majinju,项目名称:KettleEasyExpand,代码行数:21,代码来源:TimingUtil.java
示例2: findStart
import org.pentaho.di.job.entries.special.JobEntrySpecial; //导入依赖的package包/类
/**
* 查找JOB的开始控件 <br/>
* @author jingma
* @param jobMeta JOB元数据
* @return 开始控件
*/
public static JobEntrySpecial findStart(JobMeta jobMeta) {
for (int i = 0; i < jobMeta.nrJobEntries(); i++) {
JobEntryCopy jec = jobMeta.getJobEntry(i);
JobEntryInterface je = jec.getEntry();
if (je.getPluginId().equals("SPECIAL")) {
return (JobEntrySpecial) je;
}
}
return null;
}
开发者ID:majinju,项目名称:KettleEasyExpand,代码行数:17,代码来源:KettleUtils.java
示例3: getStartEntryByJobId
import org.pentaho.di.job.entries.special.JobEntrySpecial; //导入依赖的package包/类
/**
* 通过作业ID获取对应的START控件 <br/>
* @author jingma
* @param dbCode 所在资源库代码
* @param jobId 作业ID
* @return SATRT控件实体
* @throws KettleException
*/
public static JobEntrySpecial getStartEntryByJobId(String dbCode,int jobId) throws KettleException {
Integer startId = getStartIdByJobId(dbCode, jobId);
if(startId==null){
return null;
}
LongObjectId id = new LongObjectId(startId);
return KettleUtils.loadJobEntry(id, new JobEntrySpecial());
}
开发者ID:majinju,项目名称:KettleEasyExpand,代码行数:17,代码来源:TimingUtil.java
示例4: setStart
import org.pentaho.di.job.entries.special.JobEntrySpecial; //导入依赖的package包/类
/**
* 将定时信息设置到kettle的start控件中 <br/>
* @author jingma
* @param start
*/
public static void setStart(JobEntrySpecial start,JSONObject timing) {
start.setRepeat(UtilConst.WHETHER_TRUE.equals(timing.getString("is_repeat")));
start.setSchedulerType(Integer.parseInt(timing.getString("scheduler_type")));
start.setIntervalMinutes(timing.getBigDecimal("interval_minutes").intValue());
start.setIntervalSeconds(timing.getBigDecimal("interval_seconds").intValue());
start.setHour(timing.getBigDecimal("hour").intValue());
start.setMinutes(timing.getBigDecimal("minutes").intValue());
start.setWeekDay(Integer.parseInt(timing.getString("week_day")));
start.setDayOfMonth(timing.getBigDecimal("day_of_month").intValue());
}
开发者ID:majinju,项目名称:KettleEasyExpand,代码行数:16,代码来源:TimingUtil.java
示例5: saveTimingToKettle1
import org.pentaho.di.job.entries.special.JobEntrySpecial; //导入依赖的package包/类
/**
* 保存定时到kettle的表中方式1 <br/>
* 这时最正规的方式,但效率低<br/>
* @author jingma
* @return
* @throws KettleException
*/
public static int saveTimingToKettle1(JSONObject timing) throws KettleException {
int jobId = Integer.parseInt(timing.getString(UtilConst.FIELD_OID));
JobMeta jobMeta = KettleUtils.loadJob(jobId);
JobEntrySpecial start = KettleUtils.findStart(jobMeta);
setStart(start,timing);
KettleUtils.saveJob(jobMeta);
return jobId;
}
开发者ID:majinju,项目名称:KettleEasyExpand,代码行数:16,代码来源:TimingUtil.java
示例6: execute
import org.pentaho.di.job.entries.special.JobEntrySpecial; //导入依赖的package包/类
/**
* Execute a job without previous results. This is a job entry point (not recursive)<br>
* <br>
* @param fireJobListeners true if the job listeners need to be fired off
* @return the result of the execution
*
* @throws KettleException
*/
private Result execute(boolean fireJobListeners) throws KettleException
{
finished=false;
stopped=false;
// Start the tracking...
JobEntryResult jerStart = new JobEntryResult(null, Messages.getString("Job.Comment.JobStarted"), Messages.getString("Job.Reason.Started"), null);
jobTracker.addJobTracker(new JobTracker(jobMeta, jerStart));
active = true;
// Where do we start?
JobEntryCopy startpoint;
beginProcessing();
startpoint = jobMeta.findJobEntry(JobMeta.STRING_SPECIAL_START, 0, false);
if (startpoint == null) { throw new KettleJobException(Messages.getString("Job.Log.CounldNotFindStartingPoint")); }
JobEntrySpecial jes = (JobEntrySpecial) startpoint.getEntry();
Result res = null;
boolean isFirst = true;
while ( (jes.isRepeat() || isFirst) && !isStopped())
{
isFirst = false;
res = execute(0, null, startpoint, null, Messages.getString("Job.Reason.Started"));
}
// Save this result...
JobEntryResult jerEnd = new JobEntryResult(res, Messages.getString("Job.Comment.JobFinished"), Messages.getString("Job.Reason.Finished"), null);
jobTracker.addJobTracker(new JobTracker(jobMeta, jerEnd));
active = false;
// Tell the world that we've finished processing this job...
//
if (fireJobListeners) {
fireJobListeners();
}
return res;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:47,代码来源:Job.java
示例7: createStartEntry
import org.pentaho.di.job.entries.special.JobEntrySpecial; //导入依赖的package包/类
public static final JobEntryCopy createStartEntry() {
JobEntrySpecial jobEntrySpecial = new JobEntrySpecial(STRING_SPECIAL_START, true, false);
JobEntryCopy jobEntry = new JobEntryCopy();
jobEntry.setID(-1L);
jobEntry.setEntry(jobEntrySpecial);
jobEntry.setLocation(50, 50);
jobEntry.setDrawn(false);
jobEntry.setDescription(Messages.getString("JobMeta.StartJobEntry.Description")); //$NON-NLS-1$
return jobEntry;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:12,代码来源:JobMeta.java
示例8: createDummyEntry
import org.pentaho.di.job.entries.special.JobEntrySpecial; //导入依赖的package包/类
public static final JobEntryCopy createDummyEntry() {
JobEntrySpecial jobEntrySpecial = new JobEntrySpecial(STRING_SPECIAL_DUMMY, false, true);
JobEntryCopy jobEntry = new JobEntryCopy();
jobEntry.setID(-1L);
jobEntry.setEntry(jobEntrySpecial);
jobEntry.setLocation(50, 50);
jobEntry.setDrawn(false);
jobEntry.setDescription(Messages.getString("JobMeta.DummyJobEntry.Description")); //$NON-NLS-1$
return jobEntry;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:11,代码来源:JobMeta.java
示例9: createStartEntry
import org.pentaho.di.job.entries.special.JobEntrySpecial; //导入依赖的package包/类
public static final JobEntryCopy createStartEntry() {
JobEntrySpecial jobEntrySpecial = new JobEntrySpecial(STRING_SPECIAL_START, true, false);
JobEntryCopy jobEntry = new JobEntryCopy();
jobEntry.setObjectId(null);
jobEntry.setEntry(jobEntrySpecial);
jobEntry.setLocation(50, 50);
jobEntry.setDrawn(false);
jobEntry.setDescription(BaseMessages.getString(PKG, "JobMeta.StartJobEntry.Description")); //$NON-NLS-1$
return jobEntry;
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:12,代码来源:JobMeta.java
示例10: createDummyEntry
import org.pentaho.di.job.entries.special.JobEntrySpecial; //导入依赖的package包/类
public static final JobEntryCopy createDummyEntry() {
JobEntrySpecial jobEntrySpecial = new JobEntrySpecial(STRING_SPECIAL_DUMMY, false, true);
JobEntryCopy jobEntry = new JobEntryCopy();
jobEntry.setObjectId(null);
jobEntry.setEntry(jobEntrySpecial);
jobEntry.setLocation(50, 50);
jobEntry.setDrawn(false);
jobEntry.setDescription(BaseMessages.getString(PKG, "JobMeta.DummyJobEntry.Description")); //$NON-NLS-1$
return jobEntry;
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:11,代码来源:JobMeta.java
示例11: createStartEntry
import org.pentaho.di.job.entries.special.JobEntrySpecial; //导入依赖的package包/类
/**
* Creates the start entry.
*
* @return the job entry copy
*/
public static final JobEntryCopy createStartEntry() {
JobEntrySpecial jobEntrySpecial = new JobEntrySpecial(STRING_SPECIAL_START, true, false);
JobEntryCopy jobEntry = new JobEntryCopy();
jobEntry.setObjectId(null);
jobEntry.setEntry(jobEntrySpecial);
jobEntry.setLocation(50, 50);
jobEntry.setDrawn(false);
jobEntry.setDescription(BaseMessages.getString(PKG, "JobMeta.StartJobEntry.Description")); //$NON-NLS-1$
return jobEntry;
}
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:17,代码来源:JobMeta.java
示例12: createDummyEntry
import org.pentaho.di.job.entries.special.JobEntrySpecial; //导入依赖的package包/类
/**
* Creates the dummy entry.
*
* @return the job entry copy
*/
public static final JobEntryCopy createDummyEntry() {
JobEntrySpecial jobEntrySpecial = new JobEntrySpecial(STRING_SPECIAL_DUMMY, false, true);
JobEntryCopy jobEntry = new JobEntryCopy();
jobEntry.setObjectId(null);
jobEntry.setEntry(jobEntrySpecial);
jobEntry.setLocation(50, 50);
jobEntry.setDrawn(false);
jobEntry.setDescription(BaseMessages.getString(PKG, "JobMeta.DummyJobEntry.Description")); //$NON-NLS-1$
return jobEntry;
}
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:16,代码来源:JobMeta.java
示例13: createStartEntry
import org.pentaho.di.job.entries.special.JobEntrySpecial; //导入依赖的package包/类
/**
* Creates the start entry.
*
* @return the job entry copy
*/
public static final JobEntryCopy createStartEntry() {
JobEntrySpecial jobEntrySpecial = new JobEntrySpecial( STRING_SPECIAL_START, true, false );
JobEntryCopy jobEntry = new JobEntryCopy();
jobEntry.setObjectId( null );
jobEntry.setEntry( jobEntrySpecial );
jobEntry.setLocation( 50, 50 );
jobEntry.setDrawn( false );
jobEntry.setDescription( BaseMessages.getString( PKG, "JobMeta.StartJobEntry.Description" ) );
return jobEntry;
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:17,代码来源:JobMeta.java
示例14: createDummyEntry
import org.pentaho.di.job.entries.special.JobEntrySpecial; //导入依赖的package包/类
/**
* Creates the dummy entry.
*
* @return the job entry copy
*/
public static final JobEntryCopy createDummyEntry() {
JobEntrySpecial jobEntrySpecial = new JobEntrySpecial( STRING_SPECIAL_DUMMY, false, true );
JobEntryCopy jobEntry = new JobEntryCopy();
jobEntry.setObjectId( null );
jobEntry.setEntry( jobEntrySpecial );
jobEntry.setLocation( 50, 50 );
jobEntry.setDrawn( false );
jobEntry.setDescription( BaseMessages.getString( PKG, "JobMeta.DummyJobEntry.Description" ) );
return jobEntry;
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:16,代码来源:JobMeta.java
示例15: setUp
import org.pentaho.di.job.entries.special.JobEntrySpecial; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
originJobEntry = new JobEntryCopy();
copyJobEntry = new JobEntryCopy();
originEntry = new JobEntrySpecial( "EntrySpecial", false, false );
originEntry.setChanged( false );
originJobEntry.setEntry( originEntry );
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:11,代码来源:JobEntryCopyTest.java
示例16: JobEntrySpecialDialog
import org.pentaho.di.job.entries.special.JobEntrySpecial; //导入依赖的package包/类
public JobEntrySpecialDialog(Shell parent, JobEntryInterface jobEntryInt, Repository rep, JobMeta jobMeta)
{
super(parent, jobEntryInt, rep, jobMeta);
jobEntry = (JobEntrySpecial) jobEntryInt;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:6,代码来源:JobEntrySpecialDialog.java
示例17: editJobEntry
import org.pentaho.di.job.entries.special.JobEntrySpecial; //导入依赖的package包/类
public void editJobEntry(JobMeta jobMeta, JobEntryCopy je)
{
try
{
spoon.getLog().logBasic(spoon.toString(), Messages.getString("Spoon.Log.EditJobEntry", je.getName())); //$NON-NLS-1$
JobEntryCopy before = (JobEntryCopy) je.clone_deep();
JobEntryInterface jei = je.getEntry();
if (jei.isSpecial())
{
JobEntrySpecial special = (JobEntrySpecial) jei;
if (special.isDummy())
{
return;
}
}
JobEntryDialogInterface d = getJobEntryDialog(jei, jobMeta);
if (d != null)
{
if (d.open() != null)
{
// First see if the name changed.
// If so, we need to verify that the name is not already used in the job.
//
jobMeta.renameJobEntryIfNameCollides(je);
JobEntryCopy after = (JobEntryCopy) je.clone();
spoon.addUndoChange(jobMeta, new JobEntryCopy[] { before }, new JobEntryCopy[] { after }, new int[] { jobMeta.indexOfJobEntry(je) });
spoon.refreshGraph();
spoon.refreshTree();
}
}
else
{
MessageBox mb = new MessageBox(spoon.getShell(), SWT.OK | SWT.ICON_INFORMATION);
mb.setMessage(Messages.getString("Spoon.Dialog.JobEntryCanNotBeChanged.Message")); //$NON-NLS-1$
mb.setText(Messages.getString("Spoon.Dialog.JobEntryCanNotBeChanged.Title")); //$NON-NLS-1$
mb.open();
}
} catch (Exception e)
{
if (!spoon.getShell().isDisposed())
new ErrorDialog(
spoon.getShell(),
Messages.getString("Spoon.ErrorDialog.ErrorEditingJobEntry.Title"),
Messages.getString("Spoon.ErrorDialog.ErrorEditingJobEntry.Message"), e); //$NON-NLS-1$ //$NON-NLS-2$
}
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:53,代码来源:SpoonJobDelegate.java
示例18: execute
import org.pentaho.di.job.entries.special.JobEntrySpecial; //导入依赖的package包/类
/**
* Execute a job without previous results. This is a job entry point (not recursive)<br>
* <br>
* @return the result of the execution
*
* @throws KettleException
*/
private Result execute() throws KettleException
{
finished.set(false);
stopped.set(false);
log.logMinimal(BaseMessages.getString(PKG, "Job.Comment.JobStarted"));
// Start the tracking...
JobEntryResult jerStart = new JobEntryResult(null, null, BaseMessages.getString(PKG, "Job.Comment.JobStarted"), BaseMessages.getString(PKG, "Job.Reason.Started"), null, 0, null);
jobTracker.addJobTracker(new JobTracker(jobMeta, jerStart));
active.set(true);
// Where do we start?
JobEntryCopy startpoint;
// synchronize this to a parent job if needed.
//
Object syncObject=this;
if (parentJob!=null) syncObject=parentJob; // parallel execution in a job
synchronized(syncObject) {
beginProcessing();
}
if (startJobEntryCopy==null) {
startpoint = jobMeta.findJobEntry(JobMeta.STRING_SPECIAL_START, 0, false);
} else {
startpoint = startJobEntryCopy;
}
if (startpoint == null) { throw new KettleJobException(BaseMessages.getString(PKG, "Job.Log.CounldNotFindStartingPoint")); }
Result res = null;
JobEntryResult jerEnd = null;
if (startpoint.isStart()) {
// Perform optional looping in the special Start job entry...
//
long iteration=0;
boolean isFirst = true;
JobEntrySpecial jes = (JobEntrySpecial) startpoint.getEntry();
while ( (jes.isRepeat() || isFirst) && !isStopped()) {
isFirst = false;
res = execute(0, null, startpoint, null, BaseMessages.getString(PKG, "Job.Reason.Started"));
if (iteration>0 && (iteration%500)==0) {
System.out.println("other 500 iterations: "+iteration);
}
iteration++;
}
jerEnd = new JobEntryResult(res, jes.getLogChannelId(), BaseMessages.getString(PKG, "Job.Comment.JobFinished"), BaseMessages.getString(PKG, "Job.Reason.Finished"), null, 0, null);
} else {
// 递归执行Job中的节点,获得最终结果
res = execute(0, null, startpoint, null, BaseMessages.getString(PKG, "Job.Reason.Started"));
jerEnd = new JobEntryResult(res, startpoint.getEntry().getLogChannel().getLogChannelId(), BaseMessages.getString(PKG, "Job.Comment.JobFinished"), BaseMessages.getString(PKG, "Job.Reason.Finished"), null, 0, null);
}
// Save this result...
jobTracker.addJobTracker(new JobTracker(jobMeta, jerEnd));
log.logMinimal(BaseMessages.getString(PKG, "Job.Comment.JobFinished"));
active.set(false);
finished.set(true);
return res;
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:73,代码来源:Job.java
示例19: editJobEntry
import org.pentaho.di.job.entries.special.JobEntrySpecial; //导入依赖的package包/类
public void editJobEntry(JobMeta jobMeta, JobEntryCopy je)
{
try
{
spoon.getLog().logBasic(spoon.toString(), BaseMessages.getString(PKG, "Spoon.Log.EditJobEntry", je.getName())); //$NON-NLS-1$
JobEntryCopy before = (JobEntryCopy) je.clone_deep();
JobEntryInterface jei = je.getEntry();
if (jei.isSpecial())
{
JobEntrySpecial special = (JobEntrySpecial) jei;
if (special.isDummy())
{
return;
}
}
JobEntryDialogInterface d = getJobEntryDialog(jei, jobMeta);
if (d != null)
{
if (d.open() != null)
{
// First see if the name changed.
// If so, we need to verify that the name is not already used in the job.
//
jobMeta.renameJobEntryIfNameCollides(je);
JobEntryCopy after = (JobEntryCopy) je.clone();
spoon.addUndoChange(jobMeta, new JobEntryCopy[] { before }, new JobEntryCopy[] { after }, new int[] { jobMeta.indexOfJobEntry(je) });
spoon.refreshGraph();
spoon.refreshTree();
}
}
else
{
MessageBox mb = new MessageBox(spoon.getShell(), SWT.OK | SWT.ICON_INFORMATION);
mb.setMessage(BaseMessages.getString(PKG, "Spoon.Dialog.JobEntryCanNotBeChanged.Message")); //$NON-NLS-1$
mb.setText(BaseMessages.getString(PKG, "Spoon.Dialog.JobEntryCanNotBeChanged.Title")); //$NON-NLS-1$
mb.open();
}
} catch (Exception e)
{
if (!spoon.getShell().isDisposed())
new ErrorDialog(
spoon.getShell(),
BaseMessages.getString(PKG, "Spoon.ErrorDialog.ErrorEditingJobEntry.Title"), //$NON-NLS-1$
BaseMessages.getString(PKG, "Spoon.ErrorDialog.ErrorEditingJobEntry.Message"), e); //$NON-NLS-1$
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:53,代码来源:SpoonJobDelegate.java
示例20: execute
import org.pentaho.di.job.entries.special.JobEntrySpecial; //导入依赖的package包/类
/**
* Execute a job without previous results. This is a job entry point (not recursive).<br>
* <br>
* @return the result of the execution
*
* @throws KettleException
*/
private Result execute() throws KettleException
{
finished.set(false);
stopped.set(false);
log.logMinimal(BaseMessages.getString(PKG, "Job.Comment.JobStarted"));
// Start the tracking...
JobEntryResult jerStart = new JobEntryResult(null, null, BaseMessages.getString(PKG, "Job.Comment.JobStarted"), BaseMessages.getString(PKG, "Job.Reason.Started"), null, 0, null);
jobTracker.addJobTracker(new JobTracker(jobMeta, jerStart));
active.set(true);
// Where do we start?
JobEntryCopy startpoint;
// synchronize this to a parent job if needed.
//
Object syncObject=this;
if (parentJob!=null) syncObject=parentJob; // parallel execution in a job
synchronized(syncObject) {
beginProcessing();
}
if (startJobEntryCopy==null) {
startpoint = jobMeta.findJobEntry(JobMeta.STRING_SPECIAL_START, 0, false);
} else {
startpoint = startJobEntryCopy;
}
if (startpoint == null) { throw new KettleJobException(BaseMessages.getString(PKG, "Job.Log.CounldNotFindStartingPoint")); }
Result res = null;
JobEntryResult jerEnd = null;
if (startpoint.isStart()) {
// Perform optional looping in the special Start job entry...
//
long iteration=0;
boolean isFirst = true;
JobEntrySpecial jes = (JobEntrySpecial) startpoint.getEntry();
while ( (jes.isRepeat() || isFirst) && !isStopped()) {
isFirst = false;
res = execute(0, null, startpoint, null, BaseMessages.getString(PKG, "Job.Reason.Started"));
if (iteration>0 && (iteration%500)==0) {
System.out.println("other 500 iterations: "+iteration);
}
iteration++;
}
jerEnd = new JobEntryResult(res, jes.getLogChannelId(), BaseMessages.getString(PKG, "Job.Comment.JobFinished"), BaseMessages.getString(PKG, "Job.Reason.Finished"), null, 0, null);
} else {
res = execute(0, null, startpoint, null, BaseMessages.getString(PKG, "Job.Reason.Started"));
jerEnd = new JobEntryResult(res, startpoint.getEntry().getLogChannel().getLogChannelId(), BaseMessages.getString(PKG, "Job.Comment.JobFinished"), BaseMessages.getString(PKG, "Job.Reason.Finished"), null, 0, null);
}
// Save this result...
jobTracker.addJobTracker(new JobTracker(jobMeta, jerEnd));
log.logMinimal(BaseMessages.getString(PKG, "Job.Comment.JobFinished"));
active.set(false);
finished.set(true);
return res;
}
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:70,代码来源:Job.java
注:本文中的org.pentaho.di.job.entries.special.JobEntrySpecial类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论