Examples of ZipNumParams


Examples of org.archive.format.gzip.zipnum.ZipNumParams

   
  public void init() throws IOException
  {
    //this.cluster = new ZipNumCluster(clusterUri, summaryFile, blockLoader);
   
    oneBlockParams = new ZipNumParams();
    oneBlockParams.setMaxBlocks(1);
  }
View Full Code Here

Examples of org.archive.format.gzip.zipnum.ZipNumParams

        LOGGER.fine("CACHED");
      }
    }
     
    if (extraSource != null) {
      ZipNumParams params = new ZipNumParams();
      CloseableIterator<String> extraIter = extraSource.getCDXIterator(urlkey, urlkey, urlkey, params);
     
      if (extraIter.hasNext()) {
        SortedCompositeIterator<String> sortedIter = new SortedCompositeIterator<String>(MultiCDXInputSource.defaultComparator);
        sortedIter.addIterator(iter);
View Full Code Here

Examples of org.archive.format.gzip.zipnum.ZipNumParams

    //if (authChecker != null && authChecker.getPublicCdxFields() != null) {
      //publicCdxFields = new FieldSplitFormat(authChecker.getPublicCdxFields());
    //}
   
    if (defaultParams == null) {
      defaultParams = new ZipNumParams(maxPageSize, maxPageSize, 0, false);
    }

    super.afterPropertiesSet();
  }
View Full Code Here

Examples of org.archive.format.gzip.zipnum.ZipNumParams

                                                               PageResult pageResult,
                                                               CloseableIterator<String> idx) throws IOException
  {
      String searchKey = null;
     
        ZipNumParams params = new ZipNumParams(defaultParams);
       
        // Opt: testing out sequential load!
        if (Math.abs(query.limit) == 1) {
          params.setSequential(true);
        }
       
        params.setReverse(query.isReverse());
     
        if (!query.resumeKey.isEmpty()) {
            searchKey = URLDecoder.decode(query.resumeKey, "UTF-8");
            startEndUrl[0] = searchKey;
//            int lastSpace = startEndUrl[0].lastIndexOf(' ');
//            if (lastSpace > 0) {
//              startEndUrl[0] = searchKey.substring(0, lastSpace);
//            }
        } else if (!query.from.isEmpty()) {
            searchKey = startEndUrl[0] + " " + query.from;
        } else if (query.isReverse() && !query.closest.isEmpty()) {
            searchKey = startEndUrl[0];
            startEndUrl[1] = startEndUrl[0] + " " + query.closest;
        } else if (query.fastLatest) {
            String endkey = (query.closest.isEmpty() ? "!" : " " + query.closest);
            params.setMaxAggregateBlocks(1);
            searchKey = startEndUrl[0] + endkey;
        } else {
            searchKey = startEndUrl[0];
        }
       
        if (pageResult != null) {
          params.setTimestampDedupLength(0);
            return zipnumSource.getCDXIterator(idx, searchKey, startEndUrl[1],  query.page, pageResult.numPages, params);           
        } else {
            return cdxSource.getCDXIterator(searchKey, startEndUrl[0], startEndUrl[1], params);
        }       
  }
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.