Package org.apache.accumulo.core.client

Examples of org.apache.accumulo.core.client.BatchScanner.fetchColumnFamily()


    if (log.isDebugEnabled())
      log.debug("Querying global index table: " + tableName + ", range: " + rangeSuperSet.toString() + " colf: " + specificFieldName);
    BatchScanner bs = this.c.createBatchScanner(tableName, this.auths, this.queryThreads);
    bs.setRanges(rangeSuperSet);
    if (null != specificFieldName) {
      bs.fetchColumnFamily(new Text(specificFieldName));
    }
   
    for (Entry<Key,Value> entry : bs) {
      if (log.isDebugEnabled()) {
        log.debug("Index entry: " + entry.getKey().toString());
View Full Code Here


                            * connector.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS); ColumnFQ.fetch(scanner,
                            * Constants.METADATA_LOCATION_COLUMN); ColumnFQ.fetch(scanner, Constants.METADATA_PREV_ROW_COLUMN);
                            */
   
    BatchScanner bs = connector.createBatchScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS, 1);
    bs.fetchColumnFamily(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY);
    ColumnFQ.fetch(bs, Constants.METADATA_PREV_ROW_COLUMN);
   
    bs.setRanges(ranges);
   
    // System.out.println(ranges);
View Full Code Here

      // look for other tables that references this tables files
      Connector conn = instance.getConnector(SecurityConstants.getSystemCredentials());
      BatchScanner bs = conn.createBatchScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS, 8);
      try {
        bs.setRanges(Collections.singleton(Constants.NON_ROOT_METADATA_KEYSPACE));
        bs.fetchColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY);
        IteratorSetting cfg = new IteratorSetting(40, "grep", GrepIterator.class);
        GrepIterator.setTerm(cfg, "../" + tableId + "/");
        bs.addScanIterator(cfg);
       
        for (Entry<Key,Value> entry : bs) {
View Full Code Here

                            * connector.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS); ColumnFQ.fetch(scanner,
                            * Constants.METADATA_LOCATION_COLUMN); ColumnFQ.fetch(scanner, Constants.METADATA_PREV_ROW_COLUMN);
                            */
   
    BatchScanner bs = connector.createBatchScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS, 1);
    bs.fetchColumnFamily(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY);
    Constants.METADATA_PREV_ROW_COLUMN.fetch(bs);
   
    bs.setRanges(ranges);
   
    // System.out.println(ranges);
View Full Code Here

        Range allTables = MetadataSchema.TabletsSection.getRange();
        Range tableRange = MetadataSchema.TabletsSection.getRange(tableId);
        Range beforeTable = new Range(allTables.getStartKey(), true, tableRange.getStartKey(), false);
        Range afterTable = new Range(tableRange.getEndKey(), false, allTables.getEndKey(), true);
        bs.setRanges(Arrays.asList(beforeTable, afterTable));
        bs.fetchColumnFamily(DataFileColumnFamily.NAME);
        IteratorSetting cfg = new IteratorSetting(40, "grep", GrepIterator.class);
        GrepIterator.setTerm(cfg, "/" + tableId + "/");
        bs.addScanIterator(cfg);
       
        for (Entry<Key,Value> entry : bs) {
View Full Code Here

        if (opts.columns != null) {
          for (ScanColumn col : opts.columns) {
            if (col.isSetColQualifier())
              scanner.fetchColumn(ByteBufferUtil.toText(col.colFamily), ByteBufferUtil.toText(col.colQualifier));
            else
              scanner.fetchColumnFamily(ByteBufferUtil.toText(col.colFamily));
          }
        }
      }
     
      UUID uuid = UUID.randomUUID();
View Full Code Here

 
  private static ScanStats runScanTest(Connector connector, int numLoop, List<Range> ranges) throws Exception {
    Scanner scanner = null;
   
    BatchScanner bs = connector.createBatchScanner(MetadataTable.NAME, Authorizations.EMPTY, 1);
    bs.fetchColumnFamily(TabletsSection.CurrentLocationColumnFamily.NAME);
    TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.fetch(bs);
   
    bs.setRanges(ranges);
   
    // System.out.println(ranges);
View Full Code Here

    verify(connector, 2000, 1, 50, 0);
    connector.tableOperations().flush("test_ingest", null, null, true);
    BatchScanner bscanner = connector.createBatchScanner(MetadataTable.NAME, Authorizations.EMPTY, 1);
    String tableId = connector.tableOperations().tableIdMap().get("test_ingest");
    bscanner.setRanges(Collections.singletonList(new Range(new Text(tableId + ";"), new Text(tableId + "<"))));
    bscanner.fetchColumnFamily(DataFileColumnFamily.NAME);
    boolean foundFile = false;
    for (Entry<Key,Value> entry : bscanner) {
      foundFile = true;
      Process info = cluster.exec(PrintInfo.class, entry.getKey().getColumnQualifier().toString());
      assertEquals(0, info.waitFor());
View Full Code Here

                columnFamily),
            new Text(
                columnQualifier));
      }
      else {
        scanner.fetchColumnFamily(new Text(
            columnFamily));
      }
    }
    final Collection<Range> ranges = new ArrayList<Range>();
    if (primaryId != null) {
View Full Code Here

          e);
      return null;
    }
    if ((adapterIds != null) && !adapterIds.isEmpty()) {
      for (final ByteArrayId adapterId : adapterIds) {
        scanner.fetchColumnFamily(new Text(
            adapterId.getBytes()));
      }
    }
    return scanner;
  }
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.