byte[] row = get.getRow(); List<KeyValue> kvs = new ArrayList<KeyValue>(); if (!get.hasFamilies()) { kvs = toKeyValue(row, data.get(row), get.getMaxVersions()); } else {
void prepareGet(final Get get) throws IOException { checkRow(get.getRow(), "Get"); // Verify families are all valid if (get.hasFamilies()) { for (byte[] family : get.familySet()) { checkFamily(family); } } else { // Adding all families to scanner for (byte[] family : this.htableDescriptor.getColumnFamilyNames()) { get.addFamily(family); } } }
if (get.hasFamilies()) { Column.Builder columnBuilder = Column.newBuilder(); Map<byte[], NavigableSet<byte[]>> families = get.getFamilyMap();
if (get.hasFamilies()) { Column.Builder columnBuilder = Column.newBuilder(); Map<byte[], NavigableSet<byte[]>> families = get.getFamilyMap();
byte[] row = get.getRow(); List<KeyValue> kvs = new ArrayList<KeyValue>(); if (!get.hasFamilies()) { kvs = toKeyValue(row, data.get(row), get.getMaxVersions()); } else {
if (get.hasFamilies()) { Column.Builder columnBuilder = Column.newBuilder(); Map<byte[], NavigableSet<byte[]>> families = get.getFamilyMap();
if (get.hasFamilies()) { Column.Builder columnBuilder = Column.newBuilder(); Map<byte[], NavigableSet<byte[]>> families = get.getFamilyMap();
int maxResults = get.getMaxResultsPerColumnFamily(); if (!get.hasFamilies()) { kvs = toKeyValue(row, data.get(row), get.getMaxVersions()); if (filter != null) {
byte[] row = get.getRow(); List<KeyValue> kvs = new ArrayList<KeyValue>(); if (!get.hasFamilies()) { kvs = toKeyValue(row, data.get(row), get.getMaxVersions()); } else {
/** {@inheritDoc} */ @Override public FijiRowData get(EntityId entityId, FijiDataRequest dataRequest) throws IOException { final State state = mState.get(); Preconditions.checkState(state == State.OPEN, "Cannot get row from FijiTableReader instance %s in state %s.", this, state); final ReaderLayoutCapsule capsule = mReaderLayoutCapsule; // Make sure the request validates against the layout of the table. final FijiTableLayout tableLayout = capsule.getLayout(); validateRequestAgainstLayout(dataRequest, tableLayout); // Construct an HBase Get to send to the HTable. HBaseDataRequestAdapter hbaseRequestAdapter = new HBaseDataRequestAdapter(dataRequest, capsule.getColumnNameTranslator()); Get hbaseGet; try { hbaseGet = hbaseRequestAdapter.toGet(entityId, tableLayout); } catch (InvalidLayoutException e) { // The table layout should never be invalid at this point, since we got it from a valid // opened table. If it is, there's something seriously wrong. throw new InternalFijiError(e); } // Send the HTable Get. final Result result = hbaseGet.hasFamilies() ? doHBaseGet(hbaseGet) : new Result(); // Parse the result. return new HBaseFijiRowData( mTable, dataRequest, entityId, result, capsule.getCellDecoderProvider()); }
public static void prepareGet(Get get, Collection<HColumnDescriptor> families) { if (!get.hasFamilies()) { for (HColumnDescriptor family : families) { if (!Bytes.equals(family.getName(), ColumnUtil.LOCK_FAMILY_NAME)) { if (ColumnUtil.isCommitToSameFamily() || !ColumnUtil.isCommitFamily(family.getName())) { get.addFamily(family.getName()); } } } } }
new HBaseDataRequestAdapter(dataRequest, capsule.getColumnNameTranslator()); final Get get = hbaseDataRequestAdapter.toGet(entityId, tableLayout); final Result result = get.hasFamilies() ? doHBaseGet(get) : new Result(); return HBaseFijiResult.create( entityId,
@Override public Result get(final Get get) throws IOException { checkRow(get.getRow(), "Get"); // Verify families are all valid if (get.hasFamilies()) { for (byte [] family: get.familySet()) { checkFamily(family); } } else { // Adding all families to scanner for (byte[] family: this.htableDescriptor.getFamiliesKeys()) { get.addFamily(family); } } List<Cell> results = get(get, true); boolean stale = this.getRegionInfo().getReplicaId() != 0; return Result.create(results, get.isCheckExistenceOnly() ? !results.isEmpty() : null, stale); }
/** * @param get get object * @param lockid existing lock id, or null for no previous lock * @return result * @throws IOException read exceptions * @deprecated row locks (lockId) held outside the extent of the operation are deprecated. */ public Result get(final Get get, final Integer lockid) throws IOException { checkRow(get.getRow(), "Get"); // Verify families are all valid if (get.hasFamilies()) { for (byte [] family: get.familySet()) { checkFamily(family); } } else { // Adding all families to scanner for (byte[] family: this.htableDescriptor.getFamiliesKeys()) { get.addFamily(family); } } List<KeyValue> results = get(get, true); return new Result(results); }
if (get.hasFamilies()) { Column.Builder columnBuilder = Column.newBuilder(); Map<byte[], NavigableSet<byte[]>> families = get.getFamilyMap();
@SuppressWarnings("deprecation") @Override public DResult get(Get get, long startId) throws IOException { if (get.hasFamilies()) get.addFamily(DominoConst.INNER_FAMILY); get.setTimeRange(0, startId + 1); // [x, y) get.setMaxVersions(); Result preRead = region.get(get); List<KeyValue> status = preRead.getColumn(DominoConst.INNER_FAMILY, DominoConst.STATUS_COL); if (status == null || status.size() == 0) { Result ret = MVCC.handleResult(this, getTrxMetaTable(), preRead, startId, null); return new DResult(ret, null); } Integer lockId = region.getLock(null, get.getRow(), true); try { Result r = MVCC.handleResult(this, getTrxMetaTable(), region.get(get, lockId), startId, lockId); return new DResult(r, null); } catch (TransactionOutOfDateException oode) { return new DResult(null, oode.getMessage()); } catch (InvalidRowStatusException e) { return new DResult(null, e.getMessage()); } finally { region.releaseRowLock(lockId); } }
if (get.hasFamilies()) { Column.Builder columnBuilder = Column.newBuilder(); Map<byte[], NavigableSet<byte[]>> families = get.getFamilyMap();
if (get.hasFamilies()) { Column.Builder columnBuilder = Column.newBuilder(); Map<byte[], NavigableSet<byte[]>> families = get.getFamilyMap();