Package org.apache.accumulo.core.client

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


          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());
         
          // TODO this used to be TabletIterator... any problems with splits/merges?
          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


      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);
     
      // TODO check that extents match prev extent

      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

  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);
     
      // TODO check that extents match prev extent

      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_CURRENT_LOCATION_COLUMN_FAMILY);
          scanner.fetchColumnFamily(Constants.METADATA_LOG_COLUMN_FAMILY);
          scanner.setRange(new KeyExtent(new Text(tableId), null, ByteBufferUtil.toText(startRow)).toMetadataRange());
         
          // TODO this used to be TabletIterator... any problems with splits/merges?
          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

      // either dissapear 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

    ColumnFQ.fetch(scanner, Constants.METADATA_DIRECTORY_COLUMN);
    scanner.fetchColumnFamily(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY);
   
    // TODO since not using tablet iterator, are there any issues w/ splits merges?
    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

      RowIterator rowIterator;
     
      @Override
      public void initialize(InputSplit inSplit, TaskAttemptContext attempt) throws IOException {
        super.initialize(inSplit, attempt);
        rowIterator = new RowIterator(scannerIterator);
        currentK = new Text();
        currentV = null;
      }
     
      @Override
View Full Code Here

    List<String> tableNames = (List<String>) state.get("tables");
   
    String tableName = tableNames.get(rand.nextInt(tableNames.size()));
   
    try {
      RowIterator iter = new RowIterator(new IsolatedScanner(conn.createScanner(tableName, Constants.NO_AUTHS)));
     
      while (iter.hasNext()) {
        PeekingIterator<Entry<Key,Value>> row = new PeekingIterator<Entry<Key,Value>>(iter.next());
        Entry<Key,Value> kv = null;
        if (row.hasNext())
          kv = row.peek();
        while (row.hasNext()) {
          Entry<Key,Value> currentKV = row.next();
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.