Package org.apache.accumulo.core.data

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


      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

   */
 
  @Override
  public synchronized void fetchColumnFamily(Text col) {
    ArgumentChecker.notNull(col);
    Column c = new Column(TextUtil.getBytes(col), null, null);
    fetchedColumns.add(c);
  }
View Full Code Here

  }
 
  @Override
  public synchronized void fetchColumn(Text colFam, Text colQual) {
    ArgumentChecker.notNull(colFam, colQual);
    Column c = new Column(TextUtil.getBytes(colFam), TextUtil.getBytes(colQual), null);
    fetchedColumns.add(c);
  }
View Full Code Here

  public void test3() {
    Value dv = new Value();
    TreeMap<Key,Value> tm = new TreeMap<Key,Value>();
    ArrayList<Filter> f = new ArrayList<Filter>();
    HashSet<Column> hsc = new HashSet<Column>();
    hsc.add(new Column("c".getBytes(), null, null));
    ColumnQualifierFilter a = new ColumnQualifierFilter(hsc);
    f.add(a);
   
    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);
   
    int size = filter(tm, f);
    assertTrue(size == 1000);
   
    f = new ArrayList<Filter>();
    hsc = new HashSet<Column>();
    hsc.add(new Column("a".getBytes(), "b".getBytes(), null));
    a = new ColumnQualifierFilter(hsc);
    f.add(a);
    size = filter(tm, f);
    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 = filter(tm, ncqf(new Column("c".getBytes(), null, null)));
    assertTrue(size == 5);
   
    size = filter(tm, ncqf(new Column("a".getBytes(), null, null)));
    assertTrue(size == 5);
   
    size = filter(tm, ncqf(new Column("a".getBytes(), "x".getBytes(), null)));
    assertTrue(size == 1);
   
    size = filter(tm, ncqf(new Column("a".getBytes(), "x".getBytes(), null), new Column("b".getBytes(), "x".getBytes(), null)));
    assertTrue(size == 2);
   
    size = filter(tm, ncqf(new Column("a".getBytes(), "x".getBytes(), null), new Column("b".getBytes(), "y".getBytes(), null)));
    assertTrue(size == 2);
   
    size = filter(tm, ncqf(new Column("a".getBytes(), "x".getBytes(), null), new Column("b".getBytes(), null, null)));
    assertTrue(size == 3);
   
  }
View Full Code Here

  Key nk(String row, String cf, String cq) {
    return new Key(new Text(row), new Text(cf), new Text(cq));
  }
 
  Column nc(String cf) {
    return new Column(cf.getBytes(), null, null);
  }
View Full Code Here

  Column nc(String cf) {
    return new Column(cf.getBytes(), null, null);
  }
 
  Column nc(String cf, String cq) {
    return new Column(cf.getBytes(), cq.getBytes(), null);
  }
View Full Code Here

  public void init(HashSet<Column> columns) {
    this.columnFamilies = new HashSet<ByteSequence>();
    this.columnsQualifiers = new HashMap<ByteSequence,HashSet<ByteSequence>>();
   
    for (Iterator<Column> iter = columns.iterator(); iter.hasNext();) {
      Column col = iter.next();
      if (col.columnQualifier != null) {
        ArrayByteSequence cq = new ArrayByteSequence(col.columnQualifier);
        HashSet<ByteSequence> cfset = this.columnsQualifiers.get(cq);
        if (cfset == null) {
          cfset = new HashSet<ByteSequence>();
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

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.