Examples of Job


Examples of org.apache.hadoop.mapred.jobcontrol.Job

        ConfigurationValidator.validatePigProperties(exe.getConfiguration());
        Configuration conf = ConfigurationUtil.toConfiguration(exe.getConfiguration());
        JobControlCompiler jcc = new JobControlCompiler(pc, conf);
       
        JobControl jobControl = jcc.compile(mrPlan, "Test");
        Job job = jobControl.getWaitingJobs().get(0);
        int parallel = job.getJobConf().getNumReduceTasks();

        assertTrue(parallel==100);
       
        pc.defaultParallel = -1;       
    }
View Full Code Here

Examples of org.apache.hadoop.mapreduce.Job

    conf.setBoolean("mapreduce.map.speculative", false);
    conf.setBoolean("mapreduce.reduce.speculative", false);
    conf.setBoolean("mapred.map.tasks.speculative.execution", false);
    conf.setBoolean("mapred.reduce.tasks.speculative.execution", false);

    Job job = new Job(conf);
    job.setJobName("ExportSnapshot");
    job.setJarByClass(ExportSnapshot.class);
    job.setMapperClass(ExportMapper.class);
    job.setInputFormatClass(SequenceFileInputFormat.class);
    job.setOutputFormatClass(NullOutputFormat.class);
    job.setNumReduceTasks(0);
    for (Path path: createInputFiles(conf, snapshotFiles, mappers)) {
      LOG.debug("Add Input Path=" + path);
      SequenceFileInputFormat.addInputPath(job, path);
    }

    return job.waitForCompletion(true);
  }
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.app.job.Job

        .getAppAttemptId();
    rm.sendAMLaunched(appAttemptId);
    dispatcher.await();

    JobId jobId = MRBuilderUtils.newJobId(appAttemptId.getApplicationId(), 0);
    Job mockJob = mock(Job.class);
    when(mockJob.getReport()).thenReturn(
        MRBuilderUtils.newJobReport(jobId, "job", "user", JobState.RUNNING, 0,
            0, 0, 0, 0, 0, 0, "jobfile", null, false, ""));
    MyContainerAllocator allocator = new MyContainerAllocator(rm, conf,
        appAttemptId, mockJob);
View Full Code Here

Examples of org.apache.ode.scheduler.simple.Job

        List<String> nids = _del.getNodeIds();
        assertNotNull(nids);
        assertEquals(0, nids.size());
       
        // try for one nodeid
        _del.insertJob(new Job(0L,true,new HashMap<String, Object>()), "abc", true);
        nids = _del.getNodeIds();
        assertEquals(1, nids.size());
        assertTrue(nids.contains("abc"));
       
        // check that dups are ignored.
        _del.insertJob(new Job(0L,true,new HashMap<String, Object>()), "abc", true);   
        nids = _del.getNodeIds();
        assertEquals(1, nids.size());
        assertTrue(nids.contains("abc"));
       
        // add another nodeid,
        _del.insertJob(new Job(0L,true,new HashMap<String, Object>()), "123", true);   
        nids = _del.getNodeIds();
        assertEquals(2, nids.size());
        assertTrue(nids.contains("abc"));       
        assertTrue(nids.contains("123"));       
    }
View Full Code Here

Examples of org.apache.oodt.cas.resource.structs.Job

    try {
      URL managerUrl = new URL(Args[0]);
      XmlRpcResourceManagerClient client = new XmlRpcResourceManagerClient(
          managerUrl);

      Job hw1 = new Job("JobOne", "HelloWorldJob",
          "org.apache.oodt.cas.resource.examples.HelloWorldJob",
          "org.apache.oodt.cas.resource.structs.NameValueJobInput", "quick",
          new Integer(1));
      NameValueJobInput hw1Input = new NameValueJobInput();
      hw1Input.setNameValuePair("user.name", "Dave");
View Full Code Here

Examples of org.apache.openejb.quartz.Job

            final JobSpec spec = (JobSpec) activationSpec;

            final MessageEndpoint endpoint = messageEndpointFactory.createEndpoint(null);
            spec.setEndpoint(endpoint);

            final Job job = (Job) endpoint;

            final JobDataMap jobDataMap = spec.getDetail().getJobDataMap();
            jobDataMap.put(Data.class.getName(), new Data(job));

            s.scheduleJob(spec.getDetail(), spec.getTrigger());
View Full Code Here

Examples of org.apache.qpid.pool.Job

                {
                    throw new RuntimeException("Failed to create thread", e);
                }
            }
        });
        _readJob = new Job(_poolReference, Job.MAX_JOB_EVENTS, true);
        _writeJob = new Job(_poolReference, Job.MAX_JOB_EVENTS, false);
        _poolReference.acquireExecutorService();
        _failoverHandler = new FailoverHandler(this);
    }
View Full Code Here

Examples of org.apache.slide.projector.engine.Job

            jobParameter.put(Dispose.STORE, new StringValue(Store.stores[Store.CACHE]));
            jobParameter.put(Dispose.KEY, new StringValue(uri.toString()));
            EventExpression expression = new EventExpression("Update");
            expression.addProperty(EventExpression.DEPTH, "0");
            expression.addProperty(EventExpression.URI, uri.toString());
            Scheduler.getInstance().registerJob(new Job(context.getProcessId()+":"+context.getStep(), new URIValue("dispose"), expression, expression, jobParameter, false, false));
      Scheduler.getInstance().saveJobs();
        }
        resultEntries.put(SimpleProcessor.OUTPUT, output);
        // build url to activate this processor on top level
        resultEntries.put(URL, new StringValue(url));
View Full Code Here

Examples of org.apache.sling.event.jobs.Job

            jobManager.addJob(TOPIC, Collections.singletonMap("id", (Object)"myid2"));
            cb.block();

            assertEquals(1, jobManager.findJobs(JobManager.QueryType.ALL, TOPIC, -1, (Map<String, Object>[])null).size());
            // job is currently waiting, therefore cancel fails
            final Job e1 = jobManager.getJob(TOPIC, Collections.singletonMap("id", (Object)"myid2"));
            assertNotNull(e1);
            cb2.block(); // and continue job

            sleep(200);

            // the job is now in the queue again
            final Job e2 = jobManager.getJob(TOPIC, Collections.singletonMap("id", (Object)"myid2"));
            assertNotNull(e2);
            assertTrue(jobManager.removeJobById(e2.getId()));
            assertEquals(0, jobManager.findJobs(JobManager.QueryType.ALL, TOPIC, -1, (Map<String, Object>[])null).size());
            final Collection<Job> col = jobManager.findJobs(JobManager.QueryType.HISTORY, TOPIC, -1, (Map<String, Object>[])null);
            try {
                assertEquals(1, col.size());
            } finally {
View Full Code Here

Examples of org.apache.stanbol.commons.jobs.api.Job

    private static void addJob() {
        final int max = countUntil;
        final int number = jobs.size() + 1;
        final int jst = jobsleepTime;
        jobs.add(jobManager.execute(new Job() {

            @Override
            public JobResult call() {
                final int num = number;
                for (int i = 0; i < max; i++) {
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.