Package org.apache.accumulo.core.client

Examples of org.apache.accumulo.core.client.IteratorSetting.addOption()


    Scanner scanner;
   
    ScanTask(Connector conn, long time) throws Exception {
      scanner = conn.createScanner("cct", Constants.NO_AUTHS);
      IteratorSetting slow = new IteratorSetting(30, "slow", SlowIterator.class);
      slow.addOption("sleepTime", "" + time);
      scanner.addScanIterator(slow);
    }
   
    @Override
    public void run() {
View Full Code Here


         
          if (log.isDebugEnabled()) {
            log.debug("Setting scan option: " + EvaluatingIterator.QUERY_OPTION + " to " + queryString);
          }
          // Set the query option
          si.addOption(EvaluatingIterator.QUERY_OPTION, queryString);
          // Set the Indexed Terms List option. This is the field name and normalized field value pair separated
          // by a comma.
          StringBuilder buf = new StringBuilder();
          String sep = "";
          for (Entry<String,String> entry : termIndexInfo.getFieldNamesAndValues().entries()) {
View Full Code Here

          } catch (org.apache.commons.jexl2.parser.ParseException ex) {
            log.error("Could not parse query, Jexl ParseException: " + ex);
          } catch (Exception ex) {
            log.error("Problem rewriting query, Exception: " + ex.getMessage());
          }
          si.addOption(BooleanLogicIterator.FIELD_INDEX_QUERY, q);
         
          // Set the term cardinality option
          sep = "";
          buf.delete(0, buf.length());
          for (Entry<String,Long> entry : termIndexInfo.getTermCardinality().entrySet()) {
View Full Code Here

            buf.append(entry.getValue());
            sep = ",";
          }
          if (log.isDebugEnabled())
            log.debug("Setting scan option: " + BooleanLogicIterator.TERM_CARDINALITIES + " to " + buf.toString());
          si.addOption(BooleanLogicIterator.TERM_CARDINALITIES, buf.toString());
          if (this.useReadAheadIterator) {
            if (log.isDebugEnabled()) {
              log.debug("Enabling read ahead iterator with queue size: " + this.readAheadQueueSize + " and timeout: " + this.readAheadTimeOut);
            }
            si.addOption(ReadAheadIterator.QUEUE_SIZE, this.readAheadQueueSize);
View Full Code Here

          si.addOption(BooleanLogicIterator.TERM_CARDINALITIES, buf.toString());
          if (this.useReadAheadIterator) {
            if (log.isDebugEnabled()) {
              log.debug("Enabling read ahead iterator with queue size: " + this.readAheadQueueSize + " and timeout: " + this.readAheadTimeOut);
            }
            si.addOption(ReadAheadIterator.QUEUE_SIZE, this.readAheadQueueSize);
            si.addOption(ReadAheadIterator.TIMEOUT, this.readAheadTimeOut);
           
          }
         
          if (null != unevaluatedExpressions) {
View Full Code Here

          if (this.useReadAheadIterator) {
            if (log.isDebugEnabled()) {
              log.debug("Enabling read ahead iterator with queue size: " + this.readAheadQueueSize + " and timeout: " + this.readAheadTimeOut);
            }
            si.addOption(ReadAheadIterator.QUEUE_SIZE, this.readAheadQueueSize);
            si.addOption(ReadAheadIterator.TIMEOUT, this.readAheadTimeOut);
           
          }
         
          if (null != unevaluatedExpressions) {
            StringBuilder unevaluatedExpressionList = new StringBuilder();
View Full Code Here

              unevaluatedExpressionList.append(sep2).append(exp);
              sep2 = ",";
            }
            if (log.isDebugEnabled())
              log.debug("Setting scan option: " + EvaluatingIterator.UNEVALUTED_EXPRESSIONS + " to " + unevaluatedExpressionList.toString());
            si.addOption(EvaluatingIterator.UNEVALUTED_EXPRESSIONS, unevaluatedExpressionList.toString());
          }
         
          bs.addScanIterator(si);
         
          processResults.start();
View Full Code Here

    }
  }
 
  private void setupIter(ScannerBase scanner) throws Exception {
    IteratorSetting dropMod = new IteratorSetting(50, "dropMod", "org.apache.accumulo.server.test.functional.DropModIter");
    dropMod.addOption("mod", "2");
    dropMod.addOption("drop", "0");
    scanner.addScanIterator(dropMod);
  }
 
}
View Full Code Here

  }
 
  private void setupIter(ScannerBase scanner) throws Exception {
    IteratorSetting dropMod = new IteratorSetting(50, "dropMod", "org.apache.accumulo.server.test.functional.DropModIter");
    dropMod.addOption("mod", "2");
    dropMod.addOption("drop", "0");
    scanner.addScanIterator(dropMod);
  }
 
}
View Full Code Here

  }
 
  private void setRegexs(ScannerBase scanner, String rowRegEx, String cfRegEx, String cqRegEx, String valRegEx) {
    IteratorSetting regex = new IteratorSetting(50, "regex", RegExFilter.class);
    if (rowRegEx != null)
      regex.addOption(RegExFilter.ROW_REGEX, rowRegEx);
    if (cfRegEx != null)
      regex.addOption(RegExFilter.COLF_REGEX, cfRegEx);
    if (cqRegEx != null)
      regex.addOption(RegExFilter.COLQ_REGEX, cqRegEx);
    if (valRegEx != null)
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.