Examples of BaseContext


Examples of com.google.appengine.tools.mapreduce.impl.BaseContext

        queue = "default";
      }
      settings = new MapReduceSettings.Builder().setWorkerQueueName(queue).build();
    }
    String jobId = getJobKey().getName();
    Context context = new BaseContext(jobId);
    Input<I> input = specification.getInput();
    input.setContext(context);
    List<? extends InputReader<I>> readers;
    try {
      readers = input.createReaders();
View Full Code Here

Examples of com.google.appengine.tools.mapreduce.impl.BaseContext

     * The format for how the data is written out is defined by {@link GoogleCloudStorageSortOutput}
     */
    @Override
    public Value<MapReduceResult<FilesByShard>> run(MapReduceResult<FilesByShard> mapResult) {

      Context context = new BaseContext(mrJobId);
      int mapShards = findMaxFilesPerShard(mapResult.getOutputResult());
      int reduceShards = mrSpec.getNumReducers();
      FilesByShard filesByShard = mapResult.getOutputResult();
      filesByShard.splitShards(Math.max(mapShards, reduceShards));
      GoogleCloudStorageSortInput input = new GoogleCloudStorageSortInput(filesByShard);
View Full Code Here

Examples of com.google.appengine.tools.mapreduce.impl.BaseContext

     * method will invoke itself recursively.
     */
    @Override
    public Value<MapReduceResult<FilesByShard>> run(MapReduceResult<FilesByShard> priorResult) {

      Context context = new BaseContext(mrJobId);
      FilesByShard sortFiles = priorResult.getOutputResult();
      int maxFilesPerShard = findMaxFilesPerShard(sortFiles);
      if (maxFilesPerShard <= settings.getMergeFanin()) {
        return immediate(priorResult);
      }
View Full Code Here

Examples of com.google.appengine.tools.mapreduce.impl.BaseContext

     * ordered input.
     * The way the data is read in is defined by {@link GoogleCloudStorageReduceInput}
     */
    @Override
    public Value<MapReduceResult<R>> run(MapReduceResult<FilesByShard> mergeResult) {
      Context context = new BaseContext(mrJobId);
      Output<O, R> output = mrSpec.getOutput();
      output.setContext(context);
      GoogleCloudStorageReduceInput<K, V> input = new GoogleCloudStorageReduceInput<>(
          mergeResult.getOutputResult(), mrSpec.getKeyMarshaller(), mrSpec.getValueMarshaller());
      ((Input<?>) input).setContext(context);
View Full Code Here

Examples of com.google.appengine.tools.mapreduce.impl.BaseContext

     *
     * @returns A future containing the FilesByShard for the sortJob
     */
    @Override
    public Value<MapReduceResult<FilesByShard>> run() {
      Context context = new BaseContext(mrJobId);
      Input<I> input = mrSpec.getInput();
      input.setContext(context);
      List<? extends InputReader<I>> readers;
      try {
        readers = input.createReaders();
View Full Code Here

Examples of org.apache.cayenne.BaseContext

    public void testLocalCacheStaysLocal() {

        SelectQuery query = new SelectQuery(ClientMtTable1.class);
        query.setCacheStrategy(QueryCacheStrategy.LOCAL_CACHE);

        BaseContext child1 = (BaseContext) context.createChildContext();

        assertNull(child1.getQueryCache().get(
                query.getMetaData(child1.getEntityResolver())));

        assertNull(context.getQueryCache().get(
                query.getMetaData(context.getEntityResolver())));

        List<?> results = child1.performQuery(query);
        assertSame(results, child1.getQueryCache().get(
                query.getMetaData(child1.getEntityResolver())));

        assertNull(context.getQueryCache().get(
                query.getMetaData(context.getEntityResolver())));
    }
View Full Code Here

Examples of org.apache.cayenne.BaseContext

    public void testLocalCacheStaysLocal() {

        SelectQuery query = new SelectQuery(ClientMtTable1.class);
        query.setCacheStrategy(QueryCacheStrategy.LOCAL_CACHE);

        BaseContext child1 = (BaseContext) runtime.newContext(clientContext);

        assertNull(child1.getQueryCache().get(
                query.getMetaData(child1.getEntityResolver())));

        assertNull(clientContext.getQueryCache().get(
                query.getMetaData(clientContext.getEntityResolver())));

        List<?> results = child1.performQuery(query);
        assertSame(results, child1.getQueryCache().get(
                query.getMetaData(child1.getEntityResolver())));

        assertNull(clientContext.getQueryCache().get(
                query.getMetaData(clientContext.getEntityResolver())));
    }
View Full Code Here

Examples of org.apache.cayenne.BaseContext

    public void testLocalCacheStaysLocal() {

        SelectQuery query = new SelectQuery(ClientMtTable1.class);
        query.setCacheStrategy(QueryCacheStrategy.LOCAL_CACHE);

        BaseContext child1 = (BaseContext) clientContext.createChildContext();

        assertNull(child1.getQueryCache().get(
                query.getMetaData(child1.getEntityResolver())));

        assertNull(clientContext.getQueryCache().get(
                query.getMetaData(clientContext.getEntityResolver())));

        List<?> results = child1.performQuery(query);
        assertSame(results, child1.getQueryCache().get(
                query.getMetaData(child1.getEntityResolver())));

        assertNull(clientContext.getQueryCache().get(
                query.getMetaData(clientContext.getEntityResolver())));
    }
View Full Code Here

Examples of org.apache.openejb.core.BaseContext

    }
    /**
     * Insure that timer methods can be invoked for the current operation on this Context.
     */
    private void checkState() throws IllegalStateException {
        final BaseContext context = (BaseContext) deployment.get(EJBContext.class);
        context.check(BaseContext.Call.timerMethod);
    }
View Full Code Here

Examples of org.apache.openejb.core.BaseContext

    }
    /**
     * Insure that timer methods can be invoked for the current operation on this Context.
     */
    private void checkState() throws IllegalStateException {
        final BaseContext context = (BaseContext) deployment.get(EJBContext.class);
        context.check(BaseContext.Call.timerMethod);
    }
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.