Ejemplo n.º 1
0
  /**
   * Create a new KijiTableSplit instance from an HBase TableSplit.
   *
   * @param tableSplit the HBase TableSplit to clone.
   * @param regionStartKey the starting key of the region associated with this split.
   */
  public KijiTableSplit(TableSplit tableSplit, byte[] regionStartKey) {
    super(
        tableSplit.getTableName(),
        tableSplit.getStartRow(),
        tableSplit.getEndRow(),
        tableSplit.getRegionLocation());

    checkNotNull(regionStartKey);
    mRegionStartKey = regionStartKey;
  }
Ejemplo n.º 2
0
 private String buildUrl() {
   String url =
       "http://"
           + address
           + "/table/scan?table="
           + Bytes.toString(split.getTableName())
           + "&from="
           + Bytes.toString(split.getStartRow())
           + "&to="
           + Bytes.toString(split.getEndRow());
   return url;
 }
Ejemplo n.º 3
0
 /** {@inheritDoc} */
 @Override
 public void write(DataOutput out) throws IOException {
   super.write(out); // write all superclass fields.
   Bytes.writeByteArray(out, mRegionStartKey);
 }
Ejemplo n.º 4
0
 /** {@inheritDoc} */
 @Override
 public void readFields(DataInput in) throws IOException {
   super.readFields(in); // read all superclass fields.
   mRegionStartKey = Bytes.readByteArray(in);
 }