Java Code Examples for org.apache.hadoop.hbase.client.OperationWithAttributes#setAttribute()
The following examples show how to use
org.apache.hadoop.hbase.client.OperationWithAttributes#setAttribute() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ThriftHBaseServiceHandler.java From hbase with Apache License 2.0 | 5 votes |
/** * Adds all the attributes into the Operation object */ private static void addAttributes(OperationWithAttributes op, Map<ByteBuffer, ByteBuffer> attributes) { if (attributes == null || attributes.isEmpty()) { return; } for (Map.Entry<ByteBuffer, ByteBuffer> entry : attributes.entrySet()) { String name = Bytes.toStringBinary(getBytes(entry.getKey())); byte[] value = getBytes(entry.getValue()); op.setAttribute(name, value); } }
Example 2
Source File: ThriftUtilities.java From hbase with Apache License 2.0 | 5 votes |
/** * Adds all the attributes into the Operation object */ private static void addAttributes(OperationWithAttributes op, Map<ByteBuffer, ByteBuffer> attributes) { if (attributes == null || attributes.isEmpty()) { return; } for (Map.Entry<ByteBuffer, ByteBuffer> entry : attributes.entrySet()) { String name = Bytes.toStringBinary(getBytes(entry.getKey())); byte[] value = getBytes(entry.getValue()); op.setAttribute(name, value); } }
Example 3
Source File: TTable.java From phoenix-omid with Apache License 2.0 | 5 votes |
static private void propagateAttributes(OperationWithAttributes from, OperationWithAttributes to) { Map<String,byte[]> attributeMap = from.getAttributesMap(); for (Map.Entry<String,byte[]> entry : attributeMap.entrySet()) { to.setAttribute(entry.getKey(), entry.getValue()); } }
Example 4
Source File: TransactionAwareHTable.java From phoenix-tephra with Apache License 2.0 | 4 votes |
public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); }
Example 5
Source File: TransactionAwareHTableTest.java From phoenix-tephra with Apache License 2.0 | 4 votes |
@Override public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.OLD_TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); }
Example 6
Source File: TransactionAwareHTable.java From phoenix-tephra with Apache License 2.0 | 4 votes |
public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); }
Example 7
Source File: TransactionAwareHTableTest.java From phoenix-tephra with Apache License 2.0 | 4 votes |
@Override public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.OLD_TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); }
Example 8
Source File: TransactionAwareHTable.java From phoenix-tephra with Apache License 2.0 | 4 votes |
public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); }
Example 9
Source File: TransactionAwareHTableTest.java From phoenix-tephra with Apache License 2.0 | 4 votes |
@Override public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.OLD_TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); }
Example 10
Source File: TransactionAwareHTable.java From phoenix-tephra with Apache License 2.0 | 4 votes |
public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); }
Example 11
Source File: TransactionAwareHTableTest.java From phoenix-tephra with Apache License 2.0 | 4 votes |
@Override public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.OLD_TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); }
Example 12
Source File: TransactionAwareHTableTest.java From phoenix-tephra with Apache License 2.0 | 4 votes |
@Override public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.OLD_TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); }
Example 13
Source File: TransactionAwareHTable.java From phoenix-tephra with Apache License 2.0 | 4 votes |
public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); }
Example 14
Source File: TransactionAwareHTableTest.java From phoenix-tephra with Apache License 2.0 | 4 votes |
@Override public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.OLD_TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); }
Example 15
Source File: TransactionAwareHTable.java From phoenix-tephra with Apache License 2.0 | 4 votes |
public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); }
Example 16
Source File: TransactionAwareHTableTest.java From phoenix-tephra with Apache License 2.0 | 4 votes |
@Override public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.OLD_TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); }
Example 17
Source File: TransactionAwareHTable.java From phoenix-tephra with Apache License 2.0 | 4 votes |
public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); }
Example 18
Source File: TransactionAwareHTableTest.java From phoenix-tephra with Apache License 2.0 | 4 votes |
@Override public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.OLD_TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); }
Example 19
Source File: TransactionAwareHTable.java From phoenix-tephra with Apache License 2.0 | 4 votes |
public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); }