Package com.google.appengine.tools.pipeline

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


 
  @SuppressWarnings("unchecked")
  @Test
  public void testExecute() {
    // setup service
    PipelineService mockPipeline = mock(PipelineService.class);
    when(mockPipeline.startNewPipeline(
        any(Job2.class), any(SelectStatement.class), any(StatementContext.class)
        )).thenReturn("key1").thenReturn("key2");
   
    UserServiceDelegate mockUserService = mock(UserServiceDelegate.class);
    when(mockUserService.getCurrentUser()).thenReturn(new User("testing@gmail.com", "google"));
View Full Code Here


  @SuppressWarnings("unused")
  private static final Logger log = Logger.getLogger(DeleteMatchingBlobs.class.getName());

  public static String start(Predicate<BlobInfo> predicate) {
    PipelineService pipelineService = PipelineServiceFactory.newPipelineService();
    return pipelineService.startNewPipeline(new DeleteMatchingBlobs(), predicate);
  }
View Full Code Here

   * Starts a {@link MapReduceJob} with the given parameters in a new Pipeline.
   * Returns the pipeline id.
   */
  public static <I, K, V, O, R> String start(MapReduceSpecification<I, K, V, O, R> specification,
      MapReduceSettings settings) {
    PipelineService pipelineService = PipelineServiceFactory.newPipelineService();
    return pipelineService.startNewPipeline(new MapReduceJob<I, K, V, O, R>(),
        specification, settings, Util.jobSettings(settings));
  }
View Full Code Here

        return war;
    }

    protected JobInfo getJobInfo(final String phase, final String handle) throws Exception {
        PipelineService pipelineService = PipelineServiceFactory.newPipelineService();
        return getJobInfo(pipelineService, phase, handle);
    }
View Full Code Here

        Assert.assertNotNull("Missing JobInfo - [ " + phase + " ] - handle: " + handle, jobInfo);
        return jobInfo;
    }

    protected JobInfo waitToFinish(final String phase, final String handle) throws Exception {
        PipelineService pipelineService = PipelineServiceFactory.newPipelineService();
        JobInfo jobInfo = getJobInfo(pipelineService, phase, handle);
        JobInfo.State state = jobInfo.getJobState();
        int N = 24; // 2min
        while (isRunning(state) && N > 0) {
            N--;
View Full Code Here

TOP

Related Classes of com.google.appengine.tools.pipeline.PipelineService

Copyright © 2018 www.massapicom. 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.