Package org.apache.accumulo.proxy.thrift

Examples of org.apache.accumulo.proxy.thrift.Key


 
  // scan !METADATA table for file entries for the given table
  private int countFiles(String table) throws Exception {
    Map<String,String> tableIdMap = client.tableIdMap(creds);
    String tableId = tableIdMap.get(table);
    Key start = new Key();
    start.row = s2bb(tableId + ";");
    Key end = new Key();
    end.row = s2bb(tableId + "<");
    end = client.getFollowing(end, PartialKey.ROW);
    ScanOptions opt = new ScanOptions();
    opt.range = new Range(start, true, end, false);
    opt.columns = Collections.singletonList(new ScanColumn(s2bb("file")));
View Full Code Here


        tpc.proxy().updateAndFlush(userpass, testtable, mutations);
        mutations.clear();
      }
    }
   
    Key stop = new Key();
    stop.setRow("5".getBytes());
    BatchScanOptions options = new BatchScanOptions();
    options.ranges = Collections.singletonList(new Range(null, false, stop, false));
    String cookie = tpc.proxy().createBatchScanner(userpass, testtable, options);
   
    int i = 0;
View Full Code Here

        tpc.proxy().updateAndFlush(userpass, testtable, mutations);
        mutations.clear();
      }
    }
   
    Key stop = new Key();
    stop.setRow("5".getBytes());
    ScanOptions opts = new ScanOptions();
    opts.range = new Range(null, false, stop, false);
    String cookie = tpc.proxy().createScanner(userpass, testtable, opts);
   
    int i = 0;
View Full Code Here

 
  // scan !METADATA table for file entries for the given table
  private int countFiles(String table) throws Exception {
    Map<String,String> tableIdMap = client.tableIdMap(creds);
    String tableId = tableIdMap.get(table);
    Key start = new Key();
    start.row = s2bb(tableId + ";");
    Key end = new Key();
    end.row = s2bb(tableId + "<");
    end = client.getFollowing(end, PartialKey.ROW);
    ScanOptions opt = new ScanOptions();
    opt.range = new Range(start, true, end, false);
    opt.columns = Collections.singletonList(new ScanColumn(s2bb("file")));
View Full Code Here

        tpc.proxy().updateAndFlush(userpass, testtable, mutations);
        mutations.clear();
      }
    }
   
    Key stop = new Key();
    stop.setRow("5".getBytes());
    BatchScanOptions options = new BatchScanOptions();
    options.ranges = Collections.singletonList(new Range(null, false, stop, false));
    String cookie = tpc.proxy().createBatchScanner(userpass, testtable, options);
   
    int i = 0;
View Full Code Here

        tpc.proxy().updateAndFlush(userpass, testtable, mutations);
        mutations.clear();
      }
    }
   
    Key stop = new Key();
    stop.setRow("5".getBytes());
    ScanOptions opts = new ScanOptions();
    opts.range = new Range(null, false, stop, false);
    String cookie = tpc.proxy().createScanner(userpass, testtable, opts);
   
    int i = 0;
View Full Code Here

  public static IteratorSetting iteratorSetting2ProxyIteratorSetting(org.apache.accumulo.core.client.IteratorSetting is) {
    return new IteratorSetting(is.getPriority(), is.getName(), is.getIteratorClass(), is.getOptions());
  }
 
  public static Key toThrift(org.apache.accumulo.core.data.Key key) {
    Key pkey = new Key(ByteBuffer.wrap(key.getRow().getBytes()), ByteBuffer.wrap(key.getColumnFamily().getBytes()), ByteBuffer.wrap(key.getColumnQualifier()
        .getBytes()), ByteBuffer.wrap(key.getColumnVisibility().getBytes()));
    pkey.setTimestamp(key.getTimestamp());
    return pkey;
  }
View Full Code Here

 
  // scan !METADATA table for file entries for the given table
  private int countFiles(String table) throws Exception {
    Map<String,String> tableIdMap = client.tableIdMap(creds);
    String tableId = tableIdMap.get(table);
    Key start = new Key();
    start.row = s2bb(tableId + ";");
    Key end = new Key();
    end.row = s2bb(tableId + "<");
    end = client.getFollowing(end, PartialKey.ROW);
    ScanOptions opt = new ScanOptions();
    opt.range = new Range(start, true, end, false);
    opt.columns = Collections.singletonList(new ScanColumn(s2bb("file")));
View Full Code Here

    then = new Date();
    mutations.clear();
    String writer = tpc.proxy().createWriter(login, testTable, null);
    for (int i = 0; i < maxInserts; i++) {
      String result = String.format(format, i);
      Key pkey = new Key();
      pkey.setRow(result.getBytes(Constants.UTF8));
      ColumnUpdate update = new ColumnUpdate(ByteBuffer.wrap(("cf" + i).getBytes(Constants.UTF8)), ByteBuffer.wrap(("cq" + i).getBytes(Constants.UTF8)));
      update.setValue(Util.randStringBuffer(10));
      mutations.put(ByteBuffer.wrap(result.getBytes(Constants.UTF8)), Collections.singletonList(update));
      tpc.proxy().update(writer, mutations);
      mutations.clear();
View Full Code Here

  // scan metadata for file entries for the given table
  private int countFiles(String table) throws Exception {
    Map<String,String> tableIdMap = client.tableIdMap(creds);
    String tableId = tableIdMap.get(table);
    Key start = new Key();
    start.row = s2bb(tableId + ";");
    Key end = new Key();
    end.row = s2bb(tableId + "<");
    end = client.getFollowing(end, PartialKey.ROW);
    ScanOptions opt = new ScanOptions();
    opt.range = new Range(start, true, end, false);
    opt.columns = Collections.singletonList(new ScanColumn(s2bb("file")));
View Full Code Here

TOP

Related Classes of org.apache.accumulo.proxy.thrift.Key

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.