Package org.apache.accumulo.core.data

Examples of org.apache.accumulo.core.data.Column


      scanSession.ssiList = ssiList;
      scanSession.ssio = ssio;
      scanSession.interruptFlag = new AtomicBoolean();

      for (TColumn tcolumn : columns) {
        scanSession.columnSet.add(new Column(tcolumn));
      }

      scanSession.scanner = tablet.createScanner(new Range(range), batchSize, scanSession.columnSet, new Authorizations(authorizations), ssiList, ssio,
          isolated, scanSession.interruptFlag);
View Full Code Here


      for (List<Range> ranges : batch.values()) {
        mss.numRanges += ranges.size();
      }

      for (TColumn tcolumn : tcolumns)
        mss.columnSet.add(new Column(tcolumn));

      mss.threadPoolExtent = threadPoolExtent;

      long sid = sessionManager.createSession(mss, true);
View Full Code Here

  @Test
  public void test3() throws IOException {
    Value dv = new Value();
    TreeMap<Key,Value> tm = new TreeMap<Key,Value>();
    HashSet<Column> hsc = new HashSet<Column>();
    hsc.add(new Column("c".getBytes(), null, null));
   
    Text colf1 = new Text("a");
    Text colq1 = new Text("b");
    Text colf2 = new Text("c");
    Text colq2 = new Text("d");
    Text colf;
    Text colq;
    for (int i = 0; i < 1000; i++) {
      if (Math.abs(Math.ceil(i / 2.0) - i / 2.0) < .001) {
        colf = colf1;
        colq = colq1;
      } else {
        colf = colf2;
        colq = colq2;
      }
      Key k = new Key(new Text(String.format("%03d", i)), colf, colq);
      k.setTimestamp(157l);
      tm.put(k, dv);
    }
    assertTrue(tm.size() == 1000);
   
    ColumnQualifierFilter a = new ColumnQualifierFilter(new SortedMapIterator(tm), hsc);
    a.seek(new Range(), EMPTY_COL_FAMS, false);
    assertEquals(size(a), 1000);
   
    hsc = new HashSet<Column>();
    hsc.add(new Column("a".getBytes(), "b".getBytes(), null));
    a = new ColumnQualifierFilter(new SortedMapIterator(tm), hsc);
    a.seek(new Range(), EMPTY_COL_FAMS, false);
    int size = size(a);
    assertTrue("size was " + size, size == 500);
   
View Full Code Here

    tm.put(new Key(new Text(String.format("%03d", 4)), new Text("b"), new Text("x")), dv);
    tm.put(new Key(new Text(String.format("%03d", 5)), new Text("b"), new Text("y")), dv);
   
    assertTrue(tm.size() == 5);
   
    int size = size(ncqf(tm, new Column("c".getBytes(), null, null)));
    assertTrue(size == 5);
   
    size = size(ncqf(tm, new Column("a".getBytes(), null, null)));
    assertTrue(size == 5);
   
    size = size(ncqf(tm, new Column("a".getBytes(), "x".getBytes(), null)));
    assertTrue(size == 1);
   
    size = size(ncqf(tm, new Column("a".getBytes(), "x".getBytes(), null), new Column("b".getBytes(), "x".getBytes(), null)));
    assertTrue(size == 2);
   
    size = size(ncqf(tm, new Column("a".getBytes(), "x".getBytes(), null), new Column("b".getBytes(), "y".getBytes(), null)));
    assertTrue(size == 2);
   
    size = size(ncqf(tm, new Column("a".getBytes(), "x".getBytes(), null), new Column("b".getBytes(), null, null)));
    assertTrue(size == 3);
  }
View Full Code Here

    Connector conn = opts.getConnector();
    Scanner scanner = conn.createScanner(t.toString(), auths);
    scanner.setBatchSize(scanOpts.scanBatchSize);
    for (Entry<Key,Value> entry : scanner) {
      Key key = entry.getKey();
      Column column = new Column(TextUtil.getBytes(key.getColumnFamily()), TextUtil.getBytes(key.getColumnQualifier()), TextUtil.getBytes(key
          .getColumnVisibility()));
      result.add(new RowColumn(key.getRow(), column, key.getTimestamp()));
    }
    return result;
  }
View Full Code Here

    }
   
    List<SortedKeyValueIterator<Key,Value>> readers = openMapFiles(allFiles, fs, conf);
   
    HashSet<Column> columns = new HashSet<Column>();
    columns.add(new Column(TextUtil.getBytes(Constants.METADATA_DATAFILE_COLUMN_FAMILY), null, null));
    columns.add(new Column(TextUtil.getBytes(Constants.METADATA_LOG_COLUMN_FAMILY), null, null));
   
    SortedKeyValueIterator<Key,Value> ssi = createSystemIter(new Range(), readers, columns);
   
    int walogs = 0;
   
View Full Code Here

      scanSession.ssio = ssio;
      scanSession.auths = new Authorizations(authorizations);
      scanSession.interruptFlag = new AtomicBoolean();
     
      for (TColumn tcolumn : columns) {
        scanSession.columnSet.add(new Column(tcolumn));
      }
     
      scanSession.scanner = tablet.createScanner(new Range(range), batchSize, scanSession.columnSet, scanSession.auths, ssiList, ssio, isolated,
          scanSession.interruptFlag);
     
View Full Code Here

      for (List<Range> ranges : batch.values()) {
        mss.numRanges += ranges.size();
      }
     
      for (TColumn tcolumn : tcolumns)
        mss.columnSet.add(new Column(tcolumn));
     
      mss.threadPoolExtent = threadPoolExtent;
     
      long sid = sessionManager.createSession(mss, true);
     
View Full Code Here

    this.authorizations = new Authorizations(activeScan.authorizations);
   
    this.columns = new ArrayList<Column>(activeScan.columns.size());
   
    for (TColumn tcolumn : activeScan.columns)
      this.columns.add(new Column(tcolumn));
   
    this.ssiList = new ArrayList<String>();
    for (IterInfo ii : activeScan.ssiList) {
      this.ssiList.add(ii.iterName + "=" + ii.priority + "," + ii.className);
    }
View Full Code Here

      scanSession.auths = new Authorizations(authorizations);
      scanSession.interruptFlag = new AtomicBoolean();
      scanSession.readaheadThreshold = readaheadThreshold;

      for (TColumn tcolumn : columns) {
        scanSession.columnSet.add(new Column(tcolumn));
      }

      scanSession.scanner = tablet.createScanner(new Range(range), batchSize, scanSession.columnSet, scanSession.auths, ssiList, ssio, isolated,
          scanSession.interruptFlag);
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.data.Column

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.