Package org.apache.accumulo.core.client

Examples of org.apache.accumulo.core.client.RowIterator


   */
  public AccumuloResult(DataStore<K,T> dataStore, Query<K,T> query, Scanner scanner) {
    super(dataStore, query);
   
    // TODO set batch size based on limit, and construct iterator later
    iterator = new RowIterator(scanner.iterator());
  }
View Full Code Here


  public long deleteByQuery(Query<K,T> query) {
    try {
      Scanner scanner = createScanner(query);
      // add iterator that drops values on the server side
      scanner.addScanIterator(new IteratorSetting(Integer.MAX_VALUE, SortedKeyIterator.class));
      RowIterator iterator = new RowIterator(scanner.iterator());
     
      long count = 0;

      while (iterator.hasNext()) {
        Iterator<Entry<Key,Value>> row = iterator.next();
        Mutation m = null;
        while (row.hasNext()) {
          Entry<Key,Value> entry = row.next();
          Key key = entry.getKey();
          if (m == null)
View Full Code Here

  private Pair<KeyExtent,String> getTabletFiles(Range nextRange, List<String> relFiles) throws TableNotFoundException {
    Scanner scanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
    scanner.setBatchSize(100);
    scanner.setRange(nextRange);
   
    RowIterator rowIter = new RowIterator(scanner);
    Iterator<Entry<Key,Value>> row = rowIter.next();
   
    KeyExtent extent = null;
    String location = null;
   
    while (row.hasNext()) {
View Full Code Here

      scanner.fetchColumnFamily(Constants.METADATA_LAST_LOCATION_COLUMN_FAMILY);
      scanner.fetchColumnFamily(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY);
      scanner.fetchColumnFamily(Constants.METADATA_FUTURE_LOCATION_COLUMN_FAMILY);
      scanner.setRange(metadataRange);

      RowIterator rowIter = new RowIterator(scanner);

      KeyExtent lastExtent = null;

      while (rowIter.hasNext()) {
        Iterator<Entry<Key,Value>> row = rowIter.next();
        String last = "";
        KeyExtent extent = null;
        String location = null;

        while (row.hasNext()) {
View Full Code Here

      scanner.fetchColumnFamily(Constants.METADATA_LAST_LOCATION_COLUMN_FAMILY);
      scanner.fetchColumnFamily(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY);
      scanner.fetchColumnFamily(Constants.METADATA_FUTURE_LOCATION_COLUMN_FAMILY);
      scanner.setRange(metadataRange);

      RowIterator rowIter = new RowIterator(scanner);

      KeyExtent lastExtent = null;

      while (rowIter.hasNext()) {
        Iterator<Entry<Key,Value>> row = rowIter.next();
        String last = "";
        KeyExtent extent = null;
        String location = null;

        while (row.hasNext()) {
View Full Code Here

      }
    }
   
    scanner.clearColumns();
    scanner.fetchColumnFamily(BulkPlusOne.MARKER_CF);
    RowIterator rowIter = new RowIterator(scanner);
   
    while (rowIter.hasNext()) {
      Iterator<Entry<Key,Value>> row = rowIter.next();
      long prev = 0;
      Text rowText = null;
      while (row.hasNext()) {
        Entry<Key,Value> entry = row.next();
       
View Full Code Here

      // either disappear entirely or not all.. this is important for the case
      // where the process terminates in the loop below...
      scanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
      log.debug("Deleting range " + scanRange);
      scanner.setRange(scanRange);
      RowIterator rowIter = new RowIterator(scanner);
      while (rowIter.hasNext()) {
        Iterator<Entry<Key,Value>> row = rowIter.next();
        m = null;
        while (row.hasNext()) {
          Entry<Key,Value> entry = row.next();
          Key key = entry.getKey();
         
View Full Code Here

    Constants.METADATA_COMPACT_COLUMN.fetch(scanner);
    Constants.METADATA_DIRECTORY_COLUMN.fetch(scanner);
    scanner.fetchColumnFamily(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY);
   
    long t1 = System.currentTimeMillis();
    RowIterator ri = new RowIterator(scanner);
   
    int tabletsToWaitFor = 0;
    int tabletCount = 0;
   
    while (ri.hasNext()) {
      Iterator<Entry<Key,Value>> row = ri.next();
      long tabletCompactID = -1;
     
      TServerInstance server = null;
     
      Entry<Key,Value> entry = null;
View Full Code Here

          Constants.METADATA_DIRECTORY_COLUMN.fetch(scanner);
          scanner.fetchColumnFamily(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY);
          scanner.fetchColumnFamily(Constants.METADATA_LOG_COLUMN_FAMILY);
          scanner.setRange(new KeyExtent(new Text(tableId), null, ByteBufferUtil.toText(startRow)).toMetadataRange());
         
          RowIterator ri = new RowIterator(scanner);
         
          int tabletsToWaitFor = 0;
          int tabletCount = 0;
         
          Text ert = ByteBufferUtil.toText(endRow);
         
          while (ri.hasNext()) {
            Iterator<Entry<Key,Value>> row = ri.next();
            long tabletFlushID = -1;
            int logs = 0;
            boolean online = false;
           
            TServerInstance server = null;
View Full Code Here

  private Pair<KeyExtent,String> getTabletFiles(Range nextRange, List<String> relFiles) throws TableNotFoundException {
    Scanner scanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
    scanner.setBatchSize(100);
    scanner.setRange(nextRange);

    RowIterator rowIter = new RowIterator(scanner);
    Iterator<Entry<Key,Value>> row = rowIter.next();

    KeyExtent extent = null;
    String location = null;

    while (row.hasNext()) {
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.client.RowIterator

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.