public TScan deepCopy() { return new TScan(this); }
TScan scan = new TScan(); List<TColumn> columns = new ArrayList<>(1); TColumn column = new TColumn();
@Test public void testScanWithReadOnly() throws Exception { ThriftHBaseServiceHandler handler = createHandler(); ByteBuffer table = wrap(tableAname); TScan scan = new TScan(); boolean exceptionCaught = false; try { int scanId = handler.openScanner(table, scan); handler.getScannerRows(scanId, 10); handler.closeScanner(scanId); } catch (TIOError e) { exceptionCaught = true; } finally { assertFalse(exceptionCaught); } } }
public static TScan scanFromHBase(Scan in) throws IOException { TScan out = new TScan(); out.setStartRow(in.getStartRow()); out.setStopRow(in.getStopRow());
TScan scan = new TScan(); scan.setStartRow(Bytes.toBytes("testSmallScan")); scan.setStopRow(Bytes.toBytes("testSmallScan\uffff"));
assertArrayEquals(put.getAttribute("attribute1"), attributeValue); TScan tScan = new TScan(); tScan.setAttributes(attributes); Scan scan = scanFromThrift(tScan);
TScan scan = new TScan(); List<TColumn> columns = new ArrayList<>(1); TColumn column = new TColumn();
TScan scan = new TScan(); scan.setReversed(true); List<TColumn> columns = new ArrayList<>(1);
TScan scan = new TScan(); List<TColumn> columns = new ArrayList<>(1); TColumn column = new TColumn();
TScan scan = new TScan(); Map<ByteBuffer,TTimeRange> colFamTimeRangeMap = new HashMap<>(2); colFamTimeRangeMap.put(wrap(familyAname), new TTimeRange(minTimestamp + 3, minTimestamp + 5));
TScan scan = new TScan(); List<TColumn> columns = new ArrayList<>(1); TColumn column = new TColumn();
TScan scan = new TScan(); List<TColumn> columns = new ArrayList<>(1); TColumn column = new TColumn();
TScan scan = new TScan(); List<TColumn> columns = new ArrayList<>(1); TColumn column = new TColumn();
@Test public void testConsistency() throws Exception { byte[] rowName = Bytes.toBytes("testConsistency"); TGet tGet = new TGet(wrap(rowName)); tGet.setConsistency(TConsistency.STRONG); Get get = getFromThrift(tGet); assertEquals(Consistency.STRONG, get.getConsistency()); tGet.setConsistency(TConsistency.TIMELINE); tGet.setTargetReplicaId(1); get = getFromThrift(tGet); assertEquals(Consistency.TIMELINE, get.getConsistency()); assertEquals(1, get.getReplicaId()); TScan tScan = new TScan(); tScan.setConsistency(TConsistency.STRONG); Scan scan = scanFromThrift(tScan); assertEquals(Consistency.STRONG, scan.getConsistency()); tScan.setConsistency(TConsistency.TIMELINE); tScan.setTargetReplicaId(1); scan = scanFromThrift(tScan); assertEquals(Consistency.TIMELINE, scan.getConsistency()); assertEquals(1, scan.getReplicaId()); TResult tResult = new TResult(); assertFalse(tResult.isSetStale()); tResult.setStale(true); assertTrue(tResult.isSetStale()); }
/** * Performs a deep copy on <i>other</i>. */ public openScanner_args(openScanner_args other) { if (other.isSetTable()) { this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); } if (other.isSetScan()) { this.scan = new TScan(other.scan); } }
/** * Performs a deep copy on <i>other</i>. */ public getScannerResults_args(getScannerResults_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetTable()) { this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); } if (other.isSetScan()) { this.scan = new TScan(other.scan); } this.numRows = other.numRows; }
/** * Performs a deep copy on <i>other</i>. */ public openScanner_args(openScanner_args other) { if (other.isSetTable()) { this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); } if (other.isSetScan()) { this.scan = new TScan(other.scan); } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, openScanner_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.table = iprot.readBinary(); struct.setTableIsSet(true); struct.scan = new TScan(); struct.scan.read(iprot); struct.setScanIsSet(true); } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, openScanner_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.table = iprot.readBinary(); struct.setTableIsSet(true); struct.scan = new TScan(); struct.scan.read(iprot); struct.setScanIsSet(true); } }