private void setPrevEndRow(Text prevEndRow, boolean check, boolean copy) { if (prevEndRow != null) if (copy) this.textPrevEndRow = new Text(prevEndRow); else this.textPrevEndRow = prevEndRow; else this.textPrevEndRow = null; hashCode = 0; if (check) check(); }
private void setEndRow(Text endRow, boolean check, boolean copy) { if (endRow != null) if (copy) this.textEndRow = new Text(endRow); else this.textEndRow = endRow; else this.textEndRow = null; hashCode = 0; if (check) check(); }
public KeyExtent(Text flattenedExtent, Value prevEndRow) { decodeMetadataRow(flattenedExtent); // decode the prev row this.setPrevEndRow(decodePrevEndRow(prevEndRow), false, true); check(); }
public KeyExtent(Text flattenedExtent, Text prevEndRow) { decodeMetadataRow(flattenedExtent); this.setPrevEndRow(null, false, false); if (prevEndRow != null) this.setPrevEndRow(prevEndRow, false, true); check(); }
public KeyExtent(String table, Text endRow, Text prevEndRow) { this.setTableId(table); this.setEndRow(endRow, false, true); this.setPrevEndRow(prevEndRow, false, true); check(); }
public KeyExtent(TKeyExtent tke) { this.setTableId(dedupeTableId(new String(ByteBufferUtil.toBytes(tke.table), UTF_8))); this.setEndRow(tke.endRow == null ? null : new Text(ByteBufferUtil.toBytes(tke.endRow)), false, false); this.setPrevEndRow( tke.prevEndRow == null ? null : new Text(ByteBufferUtil.toBytes(tke.prevEndRow)), false, false); check(); }
public KeyExtent(KeyExtent extent) { // extent has already deduped table id, so there is no need to do it again this.tableId = extent.tableId; this.setEndRow(extent.getEndRow(), false, true); this.setPrevEndRow(extent.getPrevEndRow(), false, true); check(); }
@Override public void readFields(DataInput in) throws IOException { Text tid = new Text(); tid.readFields(in); setTableId(tid.toString()); boolean hasRow = in.readBoolean(); if (hasRow) { Text er = new Text(); er.readFields(in); setEndRow(er, false, false); } else { setEndRow(null, false, false); } boolean hasPrevRow = in.readBoolean(); if (hasPrevRow) { Text per = new Text(); per.readFields(in); setPrevEndRow(per, false, true); } else { setPrevEndRow((Text) null); } hashCode = 0; check(); }