Examples of JobInfo


Examples of RemoteCluster.JobStatus.JobInfo

              .toString(), new AtomicInteger(0));
        }
      }
    }

    final JobInfo jobInfo = jobStatus.getJobInfo(directorJobId);
    final AtomicBoolean incomplete = new AtomicBoolean(false);
    ArrayList<Thread> queryList = new ArrayList<Thread>();

    for (final Future<Object> progress : progressList) {
      final ActorRef m = askMap.get(progress);
View Full Code Here

Examples of com.gamingmesh.jobs.container.JobInfo

                        }
                       
                        double income = section.getDouble("income", 0.0);
                        double experience = section.getDouble("experience", 0.0);
                       
                        jobInfo.add(new JobInfo(type+subType, income, incomeEquation, experience, expEquation));
                    }
                }
                job.setJobInfo(actionType, jobInfo);
            }
           
View Full Code Here

Examples of com.google.appengine.tools.pipeline.JobInfo

  private <I, K, V, O, R> void runWithPipeline(MapReduceSettings settings,
      MapReduceSpecification<I, K, V, O, R> mrSpec, Verifier<R> verifier) throws Exception {
    String jobId = pipelineService.startNewPipeline(new MapReduceJob<>(mrSpec, settings));
    assertFalse(jobId.isEmpty());
    executeTasksUntilEmpty("default");
    JobInfo info = pipelineService.getJobInfo(jobId);
    @SuppressWarnings("unchecked")
    MapReduceResult<R> result = (MapReduceResult<R>) info.getOutput();
    assertEquals(JobInfo.State.COMPLETED_SUCCESSFULLY, info.getJobState());
    assertNotNull(result);
    verifier.verify(result);
  }
View Full Code Here

Examples of com.google.appengine.tools.pipeline.JobInfo

  private <I, O, R> void runWithPipeline(MapSettings settings, MapSpecification<I, O, R> mrSpec,
      Verifier<R> verifier) throws Exception {
    String jobId = pipelineService.startNewPipeline(new MapJob<>(mrSpec, settings));
    assertFalse(jobId.isEmpty());
    executeTasksUntilEmpty("default");
    JobInfo info = pipelineService.getJobInfo(jobId);
    @SuppressWarnings("unchecked")
    MapReduceResult<R> result = (MapReduceResult<R>) info.getOutput();
    assertEquals(JobInfo.State.COMPLETED_SUCCESSFULLY, info.getJobState());
    assertNotNull(result);
    verifier.verify(result);
  }
View Full Code Here

Examples of com.google.appengine.tools.pipeline.JobInfo

              .setJobName("Shard-retry failed").setKeyMarshaller(Marshallers.getStringMarshaller())
              .setValueMarshaller(Marshallers.getLongMarshaller()).build();
      String jobId = pipelineService.startNewPipeline(new MapReduceJob<>(mrSpec, mrSettings));
      assertFalse(jobId.isEmpty());
      executeTasksUntilEmpty("default");
      JobInfo info = pipelineService.getJobInfo(jobId);
      assertNull(info.getOutput());
      assertEquals(JobInfo.State.STOPPED_BY_ERROR, info.getJobState());
      assertTrue(info.getException().getMessage()
          .matches("Stage map-.* was not completed successfuly \\(status=ERROR, message=.*\\)"));
    }

    // Disallow slice-retry
    runs = new int[][] { {5, 0}, {0, 5}, {4, 1}, {1, 4}};
    for (int[] run : runs) {
      RandomLongInput input = new RandomLongInput(10, shardsCount);
      RougeMapper mapper = new RougeMapper(shardsCount, run[0], run[1]);
      mapper.setAllowSliceRetry(false);
      MapReduceSettings mrSettings = new MapReduceSettings.Builder().setMillisPerSlice(0).build();
      MapReduceSpecification<Long, String, Long, String, String> mrSpec =
          new MapReduceSpecification.Builder<>(input, mapper,
              NoReducer.<String, Long, String>create(), new NoOutput<String, String>())
              .setJobName("Shard-retry failed").setKeyMarshaller(Marshallers.getStringMarshaller())
              .setValueMarshaller(Marshallers.getLongMarshaller()).build();
      String jobId = pipelineService.startNewPipeline(new MapReduceJob<>(mrSpec, mrSettings));
      assertFalse(jobId.isEmpty());
      executeTasksUntilEmpty("default");
      JobInfo info = pipelineService.getJobInfo(jobId);
      assertNull(info.getOutput());
      assertEquals(JobInfo.State.STOPPED_BY_ERROR, info.getJobState());
      assertTrue(info.getException().getMessage()
          .matches("Stage map-.* was not completed successfuly \\(status=ERROR, message=.*\\)"));
    }
  }
View Full Code Here

Examples of com.google.appengine.tools.pipeline.JobInfo

    MapReduceSettings mrSettings = new MapReduceSettings.Builder().build();
    String jobId = pipelineService.startNewPipeline(
        new MapReduceJob<>(mrSpecBuilder.build(), mrSettings));
    assertFalse(jobId.isEmpty());
    executeTasksUntilEmpty("default");
    JobInfo info = pipelineService.getJobInfo(jobId);
    assertEquals(State.COMPLETED_SUCCESSFULLY, info.getJobState());
    @SuppressWarnings("unchecked")
    MapReduceResult<Boolean> result = (MapReduceResult<Boolean>) info.getOutput();
    assertNotNull(result);
    assertTrue(result.getOutputResult());
  }
View Full Code Here

Examples of com.microsoft.windowsazure.services.media.models.JobInfo

        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        InputStream inputStream = response.getEntityInputStream();
        ReaderWriter.writeTo(inputStream, byteArrayOutputStream);
        response.setEntityInputStream(new ByteArrayInputStream(
                byteArrayOutputStream.toByteArray()));
        JobInfo jobInfo;

        List<DataSource> parts = parseParts(response.getEntityInputStream(),
                response.getHeaders().getFirst("Content-Type"));

        if (parts.size() == 0 || parts.size() > entityBatchOperations.size()) {
View Full Code Here

Examples of com.sforce.async.JobInfo

    when(context.getConfiguration()).thenReturn(conf);
   
    SFHandler mockSFHandler = mock(SFHandler.class);
    when(mockSFHandler.getBulkConnection(user, password)).thenReturn(null);
   
    JobInfo info = new JobInfo();
    String id = "id";
    info.setId(id);
    when(mockSFHandler.createJob(sObject, null)).thenReturn(info);
   
    ExportSalesforceMapper mapper = new ExportSalesforceMapper();
    mapper.setSfHandler(mockSFHandler);
    mapper.setup(context);
View Full Code Here

Examples of com.sforce.async.JobInfo

    String id = "id";
    batchInfo.setId(id);
    Text batchId = new Text();
    mapper.setBatchId(batchId);   
   
    JobInfo info = new JobInfo();
    String id1 = "id1";
    info.setId(id1);
    when(mockSFHandler.createBatch(any(FSDataInputStream.class), any(BulkConnection.class), any(JobInfo.class))).thenReturn(
        batchInfo);
    mapper.setSfHandler(mockSFHandler);
    mapper.setJob(info);
    mapper.setJobId(new Text(id1));
    mapper.map(new Text("abc"), mock(FSDataInputStream.class), context);
    assertEquals(id, batchId.toString());
    verify(context, times(1)).write(new Text(info.getId()), batchId);   
  }
View Full Code Here

Examples of com.sforce.async.JobInfo

   * @return The JobInfo for the new job.
   * @throws AsyncApiException
   */
  public JobInfo createJob(String sobjectType,
      BulkConnection connection) throws AsyncApiException {
    JobInfo job = new JobInfo();
    job.setObject(sobjectType);
    job.setOperation(OperationEnum.insert);
    job.setContentType(ContentType.CSV);
    job = connection.createJob(job);
    System.out.println(job);
    return job;
  }
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.