Examples of JobContext


Examples of com.taobao.zeus.jobs.JobContext

    }
    return super.run();
  }

  public static void main(String[] args) {
    JobContext context=JobContext.getTempJobContext();
    Map<String, String> map=new HashMap<String, String>();
    map.put("hadoop.ugi.name", "uginame");
    HierarchyProperties properties=new HierarchyProperties(map);
    context.setProperties(properties);
   
    new MapReduceJob(context);
  }
View Full Code Here

Examples of de.innovationgate.wgpublisher.scheduler.JobContext

            additionalMsg = "(error object of invalid type: " + error.getClass().getName() + ")";
        }
       
        // Try to find job context. If available use the job log to put out error
        Logger theLog = context.getlog();
        JobContext jobContext = null;
        Object jcObj = thisObj.get("jobContext", thisObj);
        if (jcObj != null && jcObj instanceof NativeJavaObject) {
            jcObj = ((NativeJavaObject) jcObj).unwrap();
            if (jcObj instanceof JobContext) {
                jobContext = (JobContext) jcObj;
                theLog = jobContext.getLog();
            }
        }

        // Put out
        if (additionalMsg != null) {
View Full Code Here

Examples of io.crate.operation.reference.sys.job.JobContext

        NodeSettingsService nodeSettingsService = new NodeSettingsService(ImmutableSettings.EMPTY);
        Settings settings = ImmutableSettings.builder()
                .put(CrateSettings.STATS_ENABLED.settingName(), true).build();
        StatsTables stats = new StatsTables(settings, nodeSettingsService);

        stats.jobsLog.get().add(new JobContextLog(new JobContext(UUID.randomUUID(), "select 1", 1L), null));

        stats.listener.onRefreshSettings(ImmutableSettings.builder()
                .put(CrateSettings.STATS_ENABLED.settingName(), true)
                .put(CrateSettings.STATS_JOBS_LOG_SIZE.settingName(), 200).build());
View Full Code Here

Examples of javax.batch.runtime.context.JobContext

  public void testInitialCreationSingleThreadUsingStepScope() throws Exception {
    factoryBean.setBatchPropertyContext(propertyContext);

    StepSynchronizationManager.register(new StepExecution("step1", new JobExecution(5L)));

    JobContext jobContext = factoryBean.getObject();

    assertEquals(5L, jobContext.getExecutionId());
    StepSynchronizationManager.close();
  }
View Full Code Here

Examples of org.apache.airavata.core.gfac.context.JobContext

    public synchronized boolean invoke() throws WorkflowException {
        try {
            OMElement inputMessage = createActualParameters();
            Object wsifMessageElement = new WSIFMessageElement(XMLUtil.stringToXmlElement3(inputMessage.toStringWithConsume()));
            this.notifier.invokingService(new WSIFMessageElement((XmlElement)wsifMessageElement));
            JobContext jobContext = new JobContext(actualParameters, EmbeddedGFacInvoker.this.topic,
                    EmbeddedGFacInvoker.this.serviceName, EmbeddedGFacInvoker.this.gfacURL);
            GFacConfiguration gFacConfiguration = new GFacConfiguration(EmbeddedGFacInvoker.this.configuration.getMyProxyServer(),
                    EmbeddedGFacInvoker.this.configuration.getMyProxyUsername(),
                    EmbeddedGFacInvoker.this.configuration.getMyProxyPassphrase(), EmbeddedGFacInvoker.this.configuration.getMyProxyLifetime(),
                    EmbeddedGFacInvoker.this.airavataAPI, EmbeddedGFacInvoker.this.configuration.getTrustedCertLocation());
View Full Code Here

Examples of org.apache.hadoop.mapred.JobContext

    HiveApiOutputFormat outputFormat = new HiveApiOutputFormat();
    outputFormat.setMyProfileId(profile);

    TaskAttemptID taskAttemptID = TaskAttemptID.forName(taskAttemptIdStr);
    TaskAttemptContext taskContext = new HackTaskAttemptContext(new JobConf(conf), taskAttemptID);
    JobContext jobContext = new HackJobContext(new JobConf(conf), taskAttemptID.getJobID());

    RecordWriterImpl recordWriter = outputFormat.getRecordWriter(taskContext);

    HiveApiOutputCommitter committer = outputFormat.getOutputCommitter(taskContext);
    committer.setupJob(jobContext);
View Full Code Here

Examples of org.apache.hadoop.mapreduce.JobContext

                                              new Path [] {submitJobDir},
                                              jobCopy);

          Path submitJobFile = JobSubmissionFiles.getJobConfPath(submitJobDir);
          int reduces = jobCopy.getNumReduceTasks();
          JobContext context = new JobContext(jobCopy, jobId);

          jobCopy = (JobConf)context.getConfiguration();

          // Check the output specification
          if (reduces == 0 ? jobCopy.getUseNewMapper() :
            jobCopy.getUseNewReducer()) {
            org.apache.hadoop.mapreduce.OutputFormat<?,?> output =
              ReflectionUtils.newInstance(context.getOutputFormatClass(),
                  jobCopy);
            output.checkOutputSpecs(context);
          } else {
            jobCopy.getOutputFormat().checkOutputSpecs(fs, jobCopy);
          }
View Full Code Here

Examples of org.apache.hadoop.mapreduce.JobContext

    checkExpectedRangeBins(10, new String[] {"C", "A", "B"}, new int[] {29, 9, 19});
    checkExpectedRangeBins(10, new String[] {"", "AA", "BB", "CC"}, new int[] {9, 19, 29, 39});
  }
 
  private RangePartitioner prepPartitioner(int numSubBins) {
    JobContext job = ContextFactory.createJobContext();
    RangePartitioner.setNumSubBins(job, numSubBins);
    RangePartitioner rp = new RangePartitioner();
    rp.setConf(job.getConfiguration());
    return rp;
  }
View Full Code Here

Examples of org.apache.hadoop.mapreduce.JobContext

   
    CommitterEventHandler handler = new CommitterEventHandler(mockContext,
        mockCommitter, new TestingRMHeartbeatHandler());
    YarnConfiguration conf = new YarnConfiguration();
    conf.set(MRJobConfig.MR_AM_STAGING_DIR, stagingDir);
    JobContext mockJobContext = mock(JobContext.class);
    ApplicationAttemptId attemptid =
      ConverterUtils.toApplicationAttemptId("appattempt_1234567890000_0001_0");
    JobId jobId =  TypeConverter.toYarn(
        TypeConverter.fromYarn(attemptid.getApplicationId()));
   
View Full Code Here

Examples of org.apache.hadoop.mapreduce.JobContext

   
    CommitterEventHandler handler = new CommitterEventHandler(mockContext,
        mockCommitter, new TestingRMHeartbeatHandler());
    YarnConfiguration conf = new YarnConfiguration();
    conf.set(MRJobConfig.MR_AM_STAGING_DIR, stagingDir);
    JobContext mockJobContext = mock(JobContext.class);
    ApplicationAttemptId attemptid =
      ConverterUtils.toApplicationAttemptId("appattempt_1234567890000_0001_0");
    JobId jobId =  TypeConverter.toYarn(
        TypeConverter.fromYarn(attemptid.getApplicationId()));
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.