本文整理汇总了Java中org.pentaho.di.job.JobExecutionConfiguration类的典型用法代码示例。如果您正苦于以下问题:Java JobExecutionConfiguration类的具体用法?Java JobExecutionConfiguration怎么用?Java JobExecutionConfiguration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JobExecutionConfiguration类属于org.pentaho.di.job包,在下文中一共展示了JobExecutionConfiguration类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: JobExecutionConfigurationDialog
import org.pentaho.di.job.JobExecutionConfiguration; //导入依赖的package包/类
public JobExecutionConfigurationDialog(Shell parent, JobExecutionConfiguration configuration, JobMeta jobMeta)
{
super(parent);
this.parent = parent;
this.configuration = configuration;
this.jobMeta = jobMeta;
// Fill the parameters, maybe do this in another place?
Map<String, String> params = configuration.getParams();
params.clear();
String[] paramNames = jobMeta.listParameters();
for ( String name : paramNames ) {
params.put(name, "");
}
props = PropsUI.getInstance();
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:18,代码来源:JobExecutionConfigurationDialog.java
示例2: execute
import org.pentaho.di.job.JobExecutionConfiguration; //导入依赖的package包/类
@Override
public void execute( RunConfiguration runConfiguration, ExecutionConfiguration executionConfiguration,
AbstractMeta meta, VariableSpace variableSpace, Repository repository ) throws KettleException {
DefaultRunConfiguration defaultRunConfiguration = (DefaultRunConfiguration) runConfiguration;
if ( executionConfiguration instanceof TransExecutionConfiguration ) {
configureTransExecution( (TransExecutionConfiguration) executionConfiguration, defaultRunConfiguration,
variableSpace, meta, repository );
}
if ( executionConfiguration instanceof JobExecutionConfiguration ) {
configureJobExecution( (JobExecutionConfiguration) executionConfiguration, defaultRunConfiguration, variableSpace,
meta, repository );
}
variableSpace.setVariable( "engine", null );
variableSpace.setVariable( "engine.remote", null );
variableSpace.setVariable( "engine.protocol", null );
variableSpace.setVariable( "engine.host", null );
variableSpace.setVariable( "engine.port", null );
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:21,代码来源:DefaultRunConfigurationExecutor.java
示例3: testExecuteRemoteJob
import org.pentaho.di.job.JobExecutionConfiguration; //导入依赖的package包/类
@Test
public void testExecuteRemoteJob() throws Exception {
DefaultRunConfiguration defaultRunConfiguration = new DefaultRunConfiguration();
defaultRunConfiguration.setName( "Default Configuration" );
defaultRunConfiguration.setLocal( false );
defaultRunConfiguration.setRemote( true );
defaultRunConfiguration.setServer( "Test Server" );
JobExecutionConfiguration jobExecutionConfiguration = new JobExecutionConfiguration();
doReturn( slaveServer ).when( abstractMeta ).findSlaveServer( "Test Server" );
defaultRunConfigurationExecutor
.execute( defaultRunConfiguration, jobExecutionConfiguration, abstractMeta, variableSpace, null );
assertFalse( jobExecutionConfiguration.isExecutingLocally() );
assertTrue( jobExecutionConfiguration.isExecutingRemotely() );
assertEquals( jobExecutionConfiguration.getRemoteServer(), slaveServer );
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:19,代码来源:DefaultRunConfigurationExecutorTest.java
示例4: testExecuteRemoteNotFoundJob
import org.pentaho.di.job.JobExecutionConfiguration; //导入依赖的package包/类
@Test
public void testExecuteRemoteNotFoundJob() throws Exception {
DefaultRunConfiguration defaultRunConfiguration = new DefaultRunConfiguration();
defaultRunConfiguration.setName( "Default Configuration" );
defaultRunConfiguration.setLocal( false );
defaultRunConfiguration.setRemote( true );
defaultRunConfiguration.setServer( "Test Server" );
JobExecutionConfiguration jobExecutionConfiguration = new JobExecutionConfiguration();
doReturn( slaveServer ).when( abstractMeta ).findSlaveServer( null );
try {
defaultRunConfigurationExecutor
.execute( defaultRunConfiguration, jobExecutionConfiguration, abstractMeta, variableSpace, null );
fail();
} catch ( KettleException e ) {
// expected
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:20,代码来源:DefaultRunConfigurationExecutorTest.java
示例5: testExecutePentahoJob
import org.pentaho.di.job.JobExecutionConfiguration; //导入依赖的package包/类
@Test
public void testExecutePentahoJob() throws Exception {
DefaultRunConfiguration defaultRunConfiguration = new DefaultRunConfiguration();
defaultRunConfiguration.setName( "Default Configuration" );
defaultRunConfiguration.setLocal( false );
defaultRunConfiguration.setPentaho( true );
defaultRunConfiguration.setRemote( false );
JobExecutionConfiguration jobExecutionConfiguration = new JobExecutionConfiguration();
defaultRunConfigurationExecutor
.execute( defaultRunConfiguration, jobExecutionConfiguration, abstractMeta, variableSpace, null );
assertFalse( jobExecutionConfiguration.isExecutingLocally() );
assertFalse( jobExecutionConfiguration.isExecutingRemotely() );
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:17,代码来源:DefaultRunConfigurationExecutorTest.java
示例6: jobDelegationStarted
import org.pentaho.di.job.JobExecutionConfiguration; //导入依赖的package包/类
@Override
public synchronized void jobDelegationStarted( Job delegatedJob,
JobExecutionConfiguration jobExecutionConfiguration ) {
JobConfiguration jc = new JobConfiguration( delegatedJob.getJobMeta(), jobExecutionConfiguration );
jobMap.registerJob( delegatedJob, jc );
delegatedJob.addDelegationListener( this );
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:10,代码来源:CarteDelegationHandler.java
示例7: configureJobExecution
import org.pentaho.di.job.JobExecutionConfiguration; //导入依赖的package包/类
private void configureJobExecution( JobExecutionConfiguration jobExecutionConfiguration,
DefaultRunConfiguration defaultRunConfiguration, VariableSpace variableSpace,
AbstractMeta meta, Repository repository ) throws KettleException {
jobExecutionConfiguration.setExecutingLocally( defaultRunConfiguration.isLocal() );
jobExecutionConfiguration.setExecutingRemotely( defaultRunConfiguration.isRemote() );
if ( defaultRunConfiguration.isRemote() ) {
setSlaveServer( jobExecutionConfiguration, meta, defaultRunConfiguration, variableSpace );
}
jobExecutionConfiguration.setPassingExport( defaultRunConfiguration.isSendResources() );
if ( defaultRunConfiguration.isPentaho() && repository != null ) {
sendNow( repository, (AbstractMeta) variableSpace );
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:15,代码来源:DefaultRunConfigurationExecutor.java
示例8: testExecuteLocalJob
import org.pentaho.di.job.JobExecutionConfiguration; //导入依赖的package包/类
@Test
public void testExecuteLocalJob() throws Exception {
DefaultRunConfiguration defaultRunConfiguration = new DefaultRunConfiguration();
defaultRunConfiguration.setName( "Default Configuration" );
defaultRunConfiguration.setLocal( true );
JobExecutionConfiguration jobExecutionConfiguration = new JobExecutionConfiguration();
defaultRunConfigurationExecutor
.execute( defaultRunConfiguration, jobExecutionConfiguration, abstractMeta, variableSpace, null );
assertTrue( jobExecutionConfiguration.isExecutingLocally() );
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:14,代码来源:DefaultRunConfigurationExecutorTest.java
示例9: getConfiguration
import org.pentaho.di.job.JobExecutionConfiguration; //导入依赖的package包/类
/**
* @return the configuration
*/
public JobExecutionConfiguration getConfiguration()
{
return configuration;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:8,代码来源:JobExecutionConfigurationDialog.java
示例10: setConfiguration
import org.pentaho.di.job.JobExecutionConfiguration; //导入依赖的package包/类
/**
* @param configuration the configuration to set
*/
public void setConfiguration(JobExecutionConfiguration configuration)
{
this.configuration = configuration;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:8,代码来源:JobExecutionConfigurationDialog.java
示例11: executeJob
import org.pentaho.di.job.JobExecutionConfiguration; //导入依赖的package包/类
public void executeJob(JobMeta jobMeta, boolean local, boolean remote, Date replayDate, boolean safe) throws KettleException {
if (jobMeta == null) {
return;
}
JobExecutionConfiguration executionConfiguration = spoon.getJobExecutionConfiguration();
// Remember the variables set previously
//
Object data[] = spoon.variables.getData();
String fields[] = spoon.variables.getRowMeta().getFieldNames();
Map<String, String> variableMap = new HashMap<String, String>();
for (int idx = 0; idx < fields.length; idx++) {
variableMap.put(fields[idx], data[idx].toString());
}
executionConfiguration.setVariables(variableMap);
executionConfiguration.getUsedVariables(jobMeta);
executionConfiguration.setReplayDate(replayDate);
executionConfiguration.setRepository(spoon.rep);
executionConfiguration.setSafeModeEnabled(safe);
executionConfiguration.setLogLevel(spoon.getLog().getLogLevel());
JobExecutionConfigurationDialog dialog = new JobExecutionConfigurationDialog(spoon.getShell(), executionConfiguration, jobMeta);
if (dialog.open()) {
// addJobLog(jobMeta);
JobGraph jobGraph = spoon.getActiveJobGraph();
LogWriter.getInstance().setLogLevel(executionConfiguration.getLogLevel());
// Set the variables that where specified...
//
for (String varName : executionConfiguration.getVariables().keySet())
{
String varValue = executionConfiguration.getVariables().get(varName);
jobMeta.setVariable(varName, varValue);
}
// Set and activate the parameters...
//
for (String paramName : executionConfiguration.getParams().keySet())
{
String paramValue = executionConfiguration.getParams().get(paramName);
jobMeta.setParameterValue(paramName, paramValue);
}
// Set the arguments too...
//
jobMeta.setArguments(executionConfiguration.getArgumentStrings());
// Is this a local execution?
//
if (executionConfiguration.isExecutingLocally()) {
jobGraph.startJob(executionConfiguration);
}
// Are we executing remotely?
//
else if (executionConfiguration.isExecutingRemotely()) {
// Activate the parameters, turn them into variables...
//
jobMeta.activateParameters();
if (executionConfiguration.getRemoteServer() != null) {
Job.sendToSlaveServer(jobMeta, executionConfiguration, spoon.rep);
spoon.delegates.slaves.addSpoonSlave(executionConfiguration.getRemoteServer());
} else {
MessageBox mb = new MessageBox(spoon.getShell(), SWT.OK | SWT.ICON_ERROR);
mb.setMessage(Messages.getString("Spoon.Dialog.NoRemoteServerSpecified.Message"));
mb.setText(Messages.getString("Spoon.Dialog.NoRemoteServerSpecified.Title"));
mb.open();
}
}
}
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:79,代码来源:SpoonJobDelegate.java
示例12: getJobExecutionConfiguration
import org.pentaho.di.job.JobExecutionConfiguration; //导入依赖的package包/类
/**
* @return the jobExecutionConfiguration
*/
public JobExecutionConfiguration getJobExecutionConfiguration() {
return jobExecutionConfiguration;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:7,代码来源:Spoon.java
示例13: executeJob
import org.pentaho.di.job.JobExecutionConfiguration; //导入依赖的package包/类
public void executeJob(JobMeta jobMeta, boolean local, boolean remote, Date replayDate, boolean safe, String startCopyName, int startCopyNr) throws KettleException {
if (jobMeta == null) {
return;
}
JobExecutionConfiguration executionConfiguration = spoon.getJobExecutionConfiguration();
// Remember the variables set previously
//
Object data[] = spoon.variables.getData();
String fields[] = spoon.variables.getRowMeta().getFieldNames();
Map<String, String> variableMap = new HashMap<String, String>();
for (int idx = 0; idx < fields.length; idx++) {
variableMap.put(fields[idx], data[idx].toString());
}
executionConfiguration.setVariables(variableMap);
executionConfiguration.getUsedVariables(jobMeta);
executionConfiguration.setReplayDate(replayDate);
executionConfiguration.setRepository(spoon.rep);
executionConfiguration.setSafeModeEnabled(safe);
executionConfiguration.setStartCopyName(startCopyName);
executionConfiguration.setStartCopyNr(startCopyNr);
executionConfiguration.setLogLevel(DefaultLogLevel.getLogLevel());
JobExecutionConfigurationDialog dialog = new JobExecutionConfigurationDialog(spoon.getShell(), executionConfiguration, jobMeta);
if (dialog.open()) {
// addJobLog(jobMeta);
JobGraph jobGraph = spoon.getActiveJobGraph();
// Set the variables that where specified...
//
for (String varName : executionConfiguration.getVariables().keySet())
{
String varValue = executionConfiguration.getVariables().get(varName);
jobMeta.setVariable(varName, varValue);
}
// Set and activate the parameters...
//
for (String paramName : executionConfiguration.getParams().keySet())
{
String paramValue = executionConfiguration.getParams().get(paramName);
jobMeta.setParameterValue(paramName, paramValue);
}
// Set the arguments too...
//
jobMeta.setArguments(executionConfiguration.getArgumentStrings());
// Is this a local execution?
//
if (executionConfiguration.isExecutingLocally()) {
jobGraph.startJob(executionConfiguration);
}
// Are we executing remotely?
//
else if (executionConfiguration.isExecutingRemotely()) {
// Activate the parameters, turn them into variables...
//
jobMeta.activateParameters();
if (executionConfiguration.getRemoteServer() != null) {
Job.sendToSlaveServer(jobMeta, executionConfiguration, spoon.rep);
spoon.delegates.slaves.addSpoonSlave(executionConfiguration.getRemoteServer());
} else {
MessageBox mb = new MessageBox(spoon.getShell(), SWT.OK | SWT.ICON_ERROR);
mb.setMessage(BaseMessages.getString(PKG, "Spoon.Dialog.NoRemoteServerSpecified.Message")); //$NON-NLS-1$
mb.setText(BaseMessages.getString(PKG, "Spoon.Dialog.NoRemoteServerSpecified.Title")); //$NON-NLS-1$
mb.open();
}
}
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:79,代码来源:SpoonJobDelegate.java
示例14: getJobExecutionConfiguration
import org.pentaho.di.job.JobExecutionConfiguration; //导入依赖的package包/类
/**
* @return the jobExecutionConfiguration
*/
public JobExecutionConfiguration getJobExecutionConfiguration() {
return jobExecutionConfiguration;
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:7,代码来源:Spoon.java
示例15: JobExecutionConfigurationDialog
import org.pentaho.di.job.JobExecutionConfiguration; //导入依赖的package包/类
public JobExecutionConfigurationDialog( Shell parent, JobExecutionConfiguration configuration, JobMeta jobMeta ) {
super( parent, configuration, jobMeta );
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:4,代码来源:JobExecutionConfigurationDialog.java
示例16: getConfiguration
import org.pentaho.di.job.JobExecutionConfiguration; //导入依赖的package包/类
/**
* @return the configuration
*/
public JobExecutionConfiguration getConfiguration() {
return (JobExecutionConfiguration) configuration;
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:7,代码来源:JobExecutionConfigurationDialog.java
示例17: setJobExecutionConfiguration
import org.pentaho.di.job.JobExecutionConfiguration; //导入依赖的package包/类
/**
* @param jobExecutionConfiguration
* the jobExecutionConfiguration to set
*/
public void setJobExecutionConfiguration(JobExecutionConfiguration jobExecutionConfiguration) {
this.jobExecutionConfiguration = jobExecutionConfiguration;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:8,代码来源:Spoon.java
示例18: setJobExecutionConfiguration
import org.pentaho.di.job.JobExecutionConfiguration; //导入依赖的package包/类
/**
* @param jobExecutionConfiguration
* the jobExecutionConfiguration to set
*/
public void setJobExecutionConfiguration(JobExecutionConfiguration jobExecutionConfiguration) {
this.jobExecutionConfiguration = jobExecutionConfiguration;
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:8,代码来源:Spoon.java
示例19: setJobExecutionConfiguration
import org.pentaho.di.job.JobExecutionConfiguration; //导入依赖的package包/类
/**
* @param jobExecutionConfiguration
* the jobExecutionConfiguration to set
*/
public void setJobExecutionConfiguration( JobExecutionConfiguration jobExecutionConfiguration ) {
this.jobExecutionConfiguration = jobExecutionConfiguration;
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:8,代码来源:Spoon.java
注:本文中的org.pentaho.di.job.JobExecutionConfiguration类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论