/** * 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; }
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; }
/** {@inheritDoc} */ @Override public void write(DataOutput out) throws IOException { super.write(out); // write all superclass fields. Bytes.writeByteArray(out, mRegionStartKey); }
/** {@inheritDoc} */ @Override public void readFields(DataInput in) throws IOException { super.readFields(in); // read all superclass fields. mRegionStartKey = Bytes.readByteArray(in); }