Package com.sematext.hbase.hut

Examples of com.sematext.hbase.hut.ByteArrayWrapper


  public SumColumnsUp(Pair<byte[], byte[]>... columns) {
    Collection<Pair<ByteArrayWrapper, ByteArrayWrapper>> cols =
            new ArrayList<Pair<ByteArrayWrapper, ByteArrayWrapper>>(columns.length);
    for (Pair<byte[], byte[]> column : columns) {
      cols.add(new Pair<ByteArrayWrapper, ByteArrayWrapper>(
              new ByteArrayWrapper(column.getFirst()), new ByteArrayWrapper(column.getSecond())));
    }
    this.columns = cols;
  }
View Full Code Here


    // TODO: allow using processingResult as a map for that purpose?
    Map<ByteArrayWrapper, Map<ByteArrayWrapper, Long>> resultMap =
            new HashMap<ByteArrayWrapper, Map<ByteArrayWrapper, Long>>();
    for (Result row : records) {
      for (Pair<ByteArrayWrapper, ByteArrayWrapper> column : columns) {
        ByteArrayWrapper colfamKey = column.getFirst();
        byte[] colfam = colfamKey.getBytes();
        ByteArrayWrapper qualKey = column.getSecond();
        byte[] qual = qualKey.getBytes();
        byte[] value = row.getValue(colfam, qual);
        if (value == null || value.length != Bytes.SIZEOF_LONG) {
          continue;
        }
View Full Code Here

    columns = new ArrayList<Pair<ByteArrayWrapper, ByteArrayWrapper>>(columnsCount);
    for (int i = 0; i < columnsCount; i++) {
      byte[] colfam = Bytes.readByteArray(dataInput);
      byte[] qual = Bytes.readByteArray(dataInput);
      Pair<ByteArrayWrapper, ByteArrayWrapper> column =
              new Pair<ByteArrayWrapper, ByteArrayWrapper>(new ByteArrayWrapper(colfam), new ByteArrayWrapper(qual));
      columns.add(column);
    }
  }
View Full Code Here

TOP

Related Classes of com.sematext.hbase.hut.ByteArrayWrapper

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.