Examples of Fetcher


Examples of org.apache.tez.runtime.library.shuffle.common.Fetcher

              if (LOG.isDebugEnabled()) {
                LOG.debug("Processing pending host: " + inputHost.toDetailedString());
              }
              if (inputHost.getNumPendingInputs() > 0) {
                LOG.info("Scheduling fetch for inputHost: " + inputHost.getIdentifier());
                Fetcher fetcher = constructFetcherForHost(inputHost);
                numRunningFetchers.incrementAndGet();
                if (isShutdown.get()) {
                  LOG.info("hasBeenShutdown, Breaking out of ShuffleScheduler Loop");
                }
                ListenableFuture<FetchResult> future = fetcherExecutor
View Full Code Here

Examples of org.apache.tez.runtime.library.shuffle.common.Fetcher

              if (LOG.isDebugEnabled()) {
                LOG.debug("Processing pending host: " + inputHost.toDetailedString());
              }
              if (inputHost.getNumPendingInputs() > 0) {
                LOG.info("Scheduling fetch for inputHost: " + inputHost.getHost());
                Fetcher fetcher = constructFetcherForHost(inputHost);
                numRunningFetchers.incrementAndGet();
                if (isShutdown.get()) {
                  LOG.info("hasBeenShutdown, Breaking out of ShuffleScheduler Loop");
                }
                ListenableFuture<FetchResult> future = fetcherExecutor
View Full Code Here

Examples of org.fenixedu.academic.ui.struts.action.teacher.siteArchive.Fetcher

        final Project project = getProject(request);
        final List<ProjectSubmission> projectSubmissions =
                new ArrayList<ProjectSubmission>(project.getLastProjectSubmissionForEachStudentGroup());

        Archive archive = new DiskZipArchive(response, project.getName());
        Fetcher fetcher = new Fetcher(archive, request, response);

        for (ProjectSubmission submission : projectSubmissions) {
            StudentGroup group = submission.getStudentGroup();

            fetcher.queue(new Resource(group.getGroupNumber() + getStudentsISTID(group) + "/"
                    + submission.getProjectSubmissionFile().getFilename(), submission.getProjectSubmissionFile().getDownloadUrl()));
        }

        fetcher.process();
        archive.finish();

        return null;
    }
View Full Code Here

Examples of org.fenixedu.academic.ui.struts.action.teacher.siteArchive.Fetcher

        Integer finishIndex = Math.min(projectSubmissions.size(), startIndex + pageSize);

        final List<ProjectSubmission> subList = projectSubmissions.subList(startIndex, finishIndex);

        Archive archive = new DiskZipArchive(response, project.getName() + "-" + (startIndex + 1) + "-" + finishIndex);
        Fetcher fetcher = new Fetcher(archive, request, response);

        for (ProjectSubmission submission : subList) {
            StudentGroup group = submission.getStudentGroup();

            fetcher.queue(new Resource(group.getGroupNumber() + getStudentsISTID(group) + "/"
                    + submission.getProjectSubmissionFile().getFilename(), submission.getProjectSubmissionFile().getDownloadUrl()));
        }

        fetcher.process();
        archive.finish();

        return null;
    }
View Full Code Here

Examples of org.stringtree.Fetcher

            query = req.getContent();
            req.put(Tract.CONTENT, "");
        }
        String url = req.get(MojasefConstants.REQUEST_URI);
        put(MojasefConstants.REQUEST_SELF, withoutQuery(url));
        Fetcher headers = req.getUnderlyingFetcher();
        if (headers instanceof Listable) {
            Listable<String> listable = (Listable<String>)headers;
            Iterator<String> it = listable.list();
            while (it.hasNext()) {
                String key = it.next();
                Object object = headers.getObject(key);
                if (object instanceof String) {
                    String value = (String)object;
                    if (key.startsWith(HTTPConstants.REQUEST_HEADER)) {
                        key = key.substring(HTTPConstants.REQUEST_HEADER.length());
                    }
View Full Code Here

Examples of org.stringtree.Fetcher

public class CommonContextFallbackTest extends TestCase {
   
    public void testGetFromContext() throws IOException {
        CommonContext context = new RemoteSpecCommonContext("src/test/files/fb/fa.spec");
        Fetcher tpls = (Fetcher)context.getObject(MojasefConstants.TEMPLATE_SOURCE);
        assertEquals("I am aa: ${*hello}", tpls.getObject("home"));
        assertEquals("Hello, ${value}!", tpls.getObject("hello"));
    }
View Full Code Here

Examples of org.stringtree.Fetcher

      new TractDirectoryRepository(pageDir, false, context),
      new TractDirectoryRepository(tplDir, false, context));
  }

  public void setup(StringFinder context, Fetcher tracts, Fetcher templates) {
    Fetcher oldTemplates = (Fetcher)context.getObject(Templater.TEMPLATE);
    if (oldTemplates != null) {
      templates = new FallbackFetcher(
            templates, oldTemplates);
    } else {
      templates = oldTemplates;
View Full Code Here

Examples of org.stringtree.Fetcher

  }

    private static Object getTemplate(StringFinder context, String name) {
        Object ret = null;
       
        Fetcher fetcher = (Fetcher) context.getObject(Templater.TEMPLATE_SOURCE);
        if (null != fetcher) ret = fetcher.getObject(name);
        if (null != ret) return ret;
       
        String fullname = Templater.TEMPLATE + "." + name;
        return FetcherHelper.getPeelback(context.getUnderlyingFetcher(), fullname);
    }
View Full Code Here

Examples of org.stringtree.Fetcher

        return context.get(MojasefConstants.REQUEST_PATHOBJECT);
  }

  public static StringFinder createSubcontext(StringFinder context, String path, String mountpoint) {
      MapFetcher repository = new MapFetcher();
      Fetcher subcontext = new FallbackFetcher(repository, context.getUnderlyingFetcher());
      repository.put(MojasefConstants.MOUNTCONTEXT, getMountContext(context));
      repository.put(MojasefConstants.MOUNTPOINT, mountpoint);
        repository.put(MojasefConstants.REQUEST_LOCALPATH, path);
      return new FetcherStringKeeper(subcontext);
  }
View Full Code Here

Examples of org.stringtree.Fetcher

      StringFinder context, Object application, Object dfl) throws IOException {
   
    String content = null;
    Token token = Token.CONTINUE;

    Fetcher underlying = context.getUnderlyingFetcher();
    Storer storer = StorerHelper.find(context);
        storer.put(Templater.BASE, context);
       
    if (application != null) {
      StringCollector buffer = new ByteArrayStringCollector();
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.