public TCellVisibility deepCopy() { return new TCellVisibility(this); }
/** * Performs a deep copy on <i>other</i>. */ public TPut(TPut other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetRow()) { this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row); } if (other.isSetColumnValues()) { java.util.List<TColumnValue> __this__columnValues = new java.util.ArrayList<TColumnValue>(other.columnValues.size()); for (TColumnValue other_element : other.columnValues) { __this__columnValues.add(new TColumnValue(other_element)); } this.columnValues = __this__columnValues; } this.timestamp = other.timestamp; if (other.isSetAttributes()) { java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer> __this__attributes = new java.util.HashMap<java.nio.ByteBuffer,java.nio.ByteBuffer>(other.attributes); this.attributes = __this__attributes; } if (other.isSetDurability()) { this.durability = other.durability; } if (other.isSetCellVisibility()) { this.cellVisibility = new TCellVisibility(other.cellVisibility); } }
/** * Performs a deep copy on <i>other</i>. */ public TIncrement(TIncrement other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetRow()) { this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row); } if (other.isSetColumns()) { java.util.List<TColumnIncrement> __this__columns = new java.util.ArrayList<TColumnIncrement>(other.columns.size()); for (TColumnIncrement other_element : other.columns) { __this__columns.add(new TColumnIncrement(other_element)); } this.columns = __this__columns; } if (other.isSetAttributes()) { java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer> __this__attributes = new java.util.HashMap<java.nio.ByteBuffer,java.nio.ByteBuffer>(other.attributes); this.attributes = __this__attributes; } if (other.isSetDurability()) { this.durability = other.durability; } if (other.isSetCellVisibility()) { this.cellVisibility = new TCellVisibility(other.cellVisibility); } this.returnResults = other.returnResults; }
/** * Performs a deep copy on <i>other</i>. */ public TAppend(TAppend other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetRow()) { this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row); } if (other.isSetColumns()) { java.util.List<TColumnValue> __this__columns = new java.util.ArrayList<TColumnValue>(other.columns.size()); for (TColumnValue other_element : other.columns) { __this__columns.add(new TColumnValue(other_element)); } this.columns = __this__columns; } if (other.isSetAttributes()) { java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer> __this__attributes = new java.util.HashMap<java.nio.ByteBuffer,java.nio.ByteBuffer>(other.attributes); this.attributes = __this__attributes; } if (other.isSetDurability()) { this.durability = other.durability; } if (other.isSetCellVisibility()) { this.cellVisibility = new TCellVisibility(other.cellVisibility); } this.returnResults = other.returnResults; }
case 6: // CELL_VISIBILITY if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.cellVisibility = new TCellVisibility(); struct.cellVisibility.read(iprot); struct.setCellVisibilityIsSet(true);
case 7: // CELL_VISIBILITY if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.cellVisibility = new TCellVisibility(); struct.cellVisibility.read(iprot); struct.setCellVisibilityIsSet(true);
case 5: // CELL_VISIBILITY if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.cellVisibility = new TCellVisibility(); struct.cellVisibility.read(iprot); struct.setCellVisibilityIsSet(true);
CellVisibility cellVisibility = in.getCellVisibility(); if (cellVisibility != null) { TCellVisibility tCellVisibility = new TCellVisibility(); tCellVisibility.setExpression(cellVisibility.getExpression()); out.setCellVisibility(tCellVisibility);
@Test public void testIncrementWithTagsWithNotMatchLabels() throws Exception { ThriftHBaseServiceHandler handler = createHandler(); byte[] rowName = Bytes.toBytes("testIncrementWithTagsWithNotMatchLabels"); ByteBuffer table = wrap(tableAname); List<TColumnValue> columnValues = new ArrayList<>(1); columnValues.add(new TColumnValue(wrap(familyAname), wrap(qualifierAname), wrap(Bytes.toBytes(1L)))); TPut put = new TPut(wrap(rowName), columnValues); put.setColumnValues(columnValues); put.setCellVisibility(new TCellVisibility().setExpression(PRIVATE)); handler.put(table, put); List<TColumnIncrement> incrementColumns = new ArrayList<>(1); incrementColumns.add(new TColumnIncrement(wrap(familyAname), wrap(qualifierAname))); TIncrement increment = new TIncrement(wrap(rowName), incrementColumns); increment.setCellVisibility(new TCellVisibility().setExpression(SECRET)); handler.increment(table, increment); TGet get = new TGet(wrap(rowName)); TAuthorization tauth = new TAuthorization(); List<String> labels = new ArrayList<>(1); labels.add(PUBLIC); tauth.setLabels(labels); get.setAuthorizations(tauth); TResult result = handler.get(table, get); assertNull(result.getRow()); }
struct.cellVisibility = new TCellVisibility(); struct.cellVisibility.read(iprot); struct.setCellVisibilityIsSet(true);
struct.cellVisibility = new TCellVisibility(); struct.cellVisibility.read(iprot); struct.setCellVisibilityIsSet(true);
struct.cellVisibility = new TCellVisibility(); struct.cellVisibility.read(iprot); struct.setCellVisibilityIsSet(true);
@Test public void testGetsWithLabels() throws Exception { ThriftHBaseServiceHandler handler = createHandler(); byte[] rowName = Bytes.toBytes("testPutGet"); ByteBuffer table = wrap(tableAname); List<TColumnValue> columnValues = new ArrayList<>(2); columnValues.add(new TColumnValue(wrap(familyAname), wrap(qualifierAname), wrap(valueAname))); columnValues.add(new TColumnValue(wrap(familyBname), wrap(qualifierBname), wrap(valueBname))); TPut put = new TPut(wrap(rowName), columnValues); put.setColumnValues(columnValues); put.setCellVisibility(new TCellVisibility().setExpression("(" + SECRET + "|" + CONFIDENTIAL + ")" + "&" + "!" + TOPSECRET)); handler.put(table, put); TGet get = new TGet(wrap(rowName)); TAuthorization tauth = new TAuthorization(); List<String> labels = new ArrayList<>(2); labels.add(SECRET); labels.add(PRIVATE); tauth.setLabels(labels); get.setAuthorizations(tauth); TResult result = handler.get(table, get); assertArrayEquals(rowName, result.getRow()); List<TColumnValue> returnedColumnValues = result.getColumnValues(); assertTColumnValuesEqual(columnValues, returnedColumnValues); }
CellVisibility cellVisibility = in.getCellVisibility(); if (cellVisibility != null) { TCellVisibility tCellVisibility = new TCellVisibility(); tCellVisibility.setExpression(cellVisibility.getExpression()); out.setCellVisibility(tCellVisibility);
CellVisibility cellVisibility = in.getCellVisibility(); if (cellVisibility != null) { TCellVisibility tCellVisibility = new TCellVisibility(); tCellVisibility.setExpression(cellVisibility.getExpression()); out.setCellVisibility(tCellVisibility);
@Test public void testIncrementWithTags() throws Exception { ThriftHBaseServiceHandler handler = createHandler(); byte[] rowName = Bytes.toBytes("testIncrementWithTags"); ByteBuffer table = wrap(tableAname); List<TColumnValue> columnValues = new ArrayList<>(1); columnValues.add(new TColumnValue(wrap(familyAname), wrap(qualifierAname), wrap(Bytes.toBytes(1L)))); TPut put = new TPut(wrap(rowName), columnValues); put.setColumnValues(columnValues); put.setCellVisibility(new TCellVisibility().setExpression(PRIVATE)); handler.put(table, put); List<TColumnIncrement> incrementColumns = new ArrayList<>(1); incrementColumns.add(new TColumnIncrement(wrap(familyAname), wrap(qualifierAname))); TIncrement increment = new TIncrement(wrap(rowName), incrementColumns); increment.setCellVisibility(new TCellVisibility().setExpression(SECRET)); handler.increment(table, increment); TGet get = new TGet(wrap(rowName)); TAuthorization tauth = new TAuthorization(); List<String> labels = new ArrayList<>(1); labels.add(SECRET); tauth.setLabels(labels); get.setAuthorizations(tauth); TResult result = handler.get(table, get); assertArrayEquals(rowName, result.getRow()); assertEquals(1, result.getColumnValuesSize()); TColumnValue columnValue = result.getColumnValues().get(0); assertArrayEquals(Bytes.toBytes(2L), columnValue.getValue()); }
TPut put = new TPut(wrap(rowName), columnValues); put.setColumnValues(columnValues); put.setCellVisibility(new TCellVisibility().setExpression(PRIVATE)); handler.put(table, put); wrap(v2))); TAppend append = new TAppend(wrap(rowName), appendColumns); append.setCellVisibility(new TCellVisibility().setExpression(SECRET)); handler.append(table, append);
public TCellVisibility deepCopy() { return new TCellVisibility(this); }
wrap(Bytes.toBytes("testGetScannerResults" + pad(i, (byte) 2))), columnValues); if (i == 3) { put.setCellVisibility(new TCellVisibility().setExpression(PUBLIC)); } else { put.setCellVisibility(new TCellVisibility().setExpression("(" + SECRET + "|" + CONFIDENTIAL + ")" + "&" + "!" + TOPSECRET));
TPut put = new TPut(wrap(Bytes.toBytes("testScan" + i)), columnValues); if (i == 5) { put.setCellVisibility(new TCellVisibility().setExpression(PUBLIC)); } else { put.setCellVisibility(new TCellVisibility().setExpression("(" + SECRET + "|" + CONFIDENTIAL + ")" + "&" + "!" + TOPSECRET));