this.setConsistency(get.getConsistency()); this.cacheBlocks = get.getCacheBlocks(); this.maxVersions = get.getMaxVersions(); this.storeLimit = get.getMaxResultsPerColumnFamily();
this.includeStopRow = true; this.filter = get.getFilter(); this.cacheBlocks = get.getCacheBlocks(); this.maxVersions = get.getMaxVersions(); this.storeLimit = get.getMaxResultsPerColumnFamily();
out.setCacheBlocks(in.getCacheBlocks()); out.setStoreLimit(in.getMaxResultsPerColumnFamily()); out.setStoreOffset(in.getRowOffsetPerColumnFamily());
ClientProtos.Get.newBuilder(); builder.setRow(ByteStringer.wrap(get.getRow())); builder.setCacheBlocks(get.getCacheBlocks()); builder.setMaxVersions(get.getMaxVersions()); if (get.getFilter() != null) {
ClientProtos.Get.newBuilder(); builder.setRow(UnsafeByteOperations.unsafeWrap(get.getRow())); builder.setCacheBlocks(get.getCacheBlocks()); builder.setMaxVersions(get.getMaxVersions()); if (get.getFilter() != null) {
assertEquals(get.getCacheBlocks(), scan.getCacheBlocks()); assertEquals(get.getConsistency(), scan.getConsistency()); assertEquals(get.getFilter(), scan.getFilter());
assertEquals(get.getMaxResultsPerColumnFamily(), copyGet.getMaxResultsPerColumnFamily()); assertEquals(get.getRowOffsetPerColumnFamily(), copyGet.getRowOffsetPerColumnFamily()); assertEquals(get.getCacheBlocks(), copyGet.getCacheBlocks()); assertEquals(get.getId(), copyGet.getId());
this.setConsistency(get.getConsistency()); this.cacheBlocks = get.getCacheBlocks(); this.maxVersions = get.getMaxVersions(); this.storeLimit = get.getMaxResultsPerColumnFamily();
this.includeStopRow = true; this.filter = get.getFilter(); this.cacheBlocks = get.getCacheBlocks(); this.maxVersions = get.getMaxVersions(); this.storeLimit = get.getMaxResultsPerColumnFamily();
@Override public boolean getCacheBlocks() { return get.getCacheBlocks(); }
ClientProtos.Get.newBuilder(); builder.setRow(ByteStringer.wrap(get.getRow())); builder.setCacheBlocks(get.getCacheBlocks()); builder.setMaxVersions(get.getMaxVersions()); if (get.getFilter() != null) {
ClientProtos.Get.newBuilder(); builder.setRow(UnsafeByteOperations.unsafeWrap(get.getRow())); builder.setCacheBlocks(get.getCacheBlocks()); builder.setMaxVersions(get.getMaxVersions()); if (get.getFilter() != null) {
assertEquals(get.getCacheBlocks(), scan.getCacheBlocks()); assertEquals(get.getConsistency(), scan.getConsistency()); assertEquals(get.getFilter(), scan.getFilter());
assertEquals(get.getMaxResultsPerColumnFamily(), copyGet.getMaxResultsPerColumnFamily()); assertEquals(get.getRowOffsetPerColumnFamily(), copyGet.getRowOffsetPerColumnFamily()); assertEquals(get.getCacheBlocks(), copyGet.getCacheBlocks()); assertEquals(get.getId(), copyGet.getId());
/** * Builds a scan object with the same specs as get. * @param get get to model scan after */ public Scan(Get get) { this.startRow = get.getRow(); this.stopRow = get.getRow(); this.filter = get.getFilter(); this.cacheBlocks = get.getCacheBlocks(); this.maxVersions = get.getMaxVersions(); this.tr = get.getTimeRange(); this.familyMap = get.getFamilyMap(); }
/** * Builds a scan object with the same specs as get. * @param get get to model scan after */ public Scan(Get get) { this.startRow = get.getRow(); this.stopRow = get.getRow(); this.filter = get.getFilter(); this.cacheBlocks = get.getCacheBlocks(); this.maxVersions = get.getMaxVersions(); this.storeLimit = get.getMaxResultsPerColumnFamily(); this.storeOffset = get.getRowOffsetPerColumnFamily(); this.tr = get.getTimeRange(); this.familyMap = get.getFamilyMap(); this.getScan = true; this.consistency = get.getConsistency(); this.setIsolationLevel(get.getIsolationLevel()); for (Map.Entry<String, byte[]> attr : get.getAttributesMap().entrySet()) { setAttribute(attr.getKey(), attr.getValue()); } for (Map.Entry<byte[], TimeRange> entry : get.getColumnFamilyTimeRange().entrySet()) { TimeRange tr = entry.getValue(); setColumnFamilyTimeRange(entry.getKey(), tr.getMin(), tr.getMax()); } }
this.setConsistency(get.getConsistency()); this.cacheBlocks = get.getCacheBlocks(); this.maxVersions = get.getMaxVersions(); this.storeLimit = get.getMaxResultsPerColumnFamily();
this.setConsistency(get.getConsistency()); this.cacheBlocks = get.getCacheBlocks(); this.maxVersions = get.getMaxVersions(); this.storeLimit = get.getMaxResultsPerColumnFamily();
/** * Builds a scan object with the same specs as get. * @param get get to model scan after */ public Scan(Get get) { this.startRow = get.getRow(); this.includeStartRow = true; this.stopRow = get.getRow(); this.includeStopRow = true; this.filter = get.getFilter(); this.cacheBlocks = get.getCacheBlocks(); this.maxVersions = get.getMaxVersions(); this.storeLimit = get.getMaxResultsPerColumnFamily(); this.storeOffset = get.getRowOffsetPerColumnFamily(); this.tr = get.getTimeRange(); this.familyMap = get.getFamilyMap(); this.asyncPrefetch = false; this.consistency = get.getConsistency(); this.setIsolationLevel(get.getIsolationLevel()); this.loadColumnFamiliesOnDemand = get.getLoadColumnFamiliesOnDemandValue(); for (Map.Entry<String, byte[]> attr : get.getAttributesMap().entrySet()) { setAttribute(attr.getKey(), attr.getValue()); } for (Map.Entry<byte[], TimeRange> entry : get.getColumnFamilyTimeRange().entrySet()) { TimeRange tr = entry.getValue(); setColumnFamilyTimeRange(entry.getKey(), tr.getMin(), tr.getMax()); } this.mvccReadPoint = -1L; setPriority(get.getPriority()); }
/** * Constructs an HBase Scan that describes the data requested in the FijiDataRequest. * * @param tableLayout The layout of the Fiji table to read from. This is required for * determining the mapping between Fiji columns and HBase columns. * @param scanOptions Custom options for this scan. * @return An HBase Scan descriptor. * @throws IOException If there is an error. */ public Scan toScan( final FijiTableLayout tableLayout, final HBaseScanOptions scanOptions ) throws IOException { // Unfortunately in HBase 95+, we can no longer create empty gets. // So create a fake one for this table and fill in the fields of a new scan. final Get tempGet = toGet(HBaseEntityId.fromHBaseRowKey(new byte[1]), tableLayout); final Scan scan = new Scan(); scan.setFilter(tempGet.getFilter()); scan.setCacheBlocks(tempGet.getCacheBlocks()); scan.setMaxVersions(tempGet.getMaxVersions()); scan.setTimeRange(tempGet.getTimeRange().getMin(), tempGet.getTimeRange().getMax()); scan.setFamilyMap(tempGet.getFamilyMap()); configureScan(scan, scanOptions); return scan; }