/** * This method allows you to set an identifier on an operation. The original * motivation for this was to allow the identifier to be used in slow query * logging, but this could obviously be useful in other places. One use of * this could be to put a class.method identifier in here to see where the * slow query is coming from. * @param id * id to set for the scan */ public OperationWithAttributes setId(String id) { setAttribute(ID_ATRIBUTE, Bytes.toBytes(id)); return this; }
/** * 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); } }
/** * 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); } }
/** * This method allows you to set an identifier on an operation. The original * motivation for this was to allow the identifier to be used in slow query * logging, but this could obviously be useful in other places. One use of * this could be to put a class.method identifier in here to see where the * slow query is coming from. * @param id * id to set for the scan */ public OperationWithAttributes setId(String id) { setAttribute(ID_ATRIBUTE, Bytes.toBytes(id)); return this; }
/** * This method allows you to set an identifier on an operation. The original * motivation for this was to allow the identifier to be used in slow query * logging, but this could obviously be useful in other places. One use of * this could be to put a class.method identifier in here to see where the * slow query is coming from. * @param id * id to set for the scan */ public void setId(String id) { setAttribute(ID_ATRIBUTE, Bytes.toBytes(id)); }
/** * This method allows you to set an identifier on an operation. The original * motivation for this was to allow the identifier to be used in slow query * logging, but this could obviously be useful in other places. One use of * this could be to put a class.method identifier in here to see where the * slow query is coming from. * @param id * id to set for the scan */ public OperationWithAttributes setId(String id) { setAttribute(ID_ATRIBUTE, Bytes.toBytes(id)); return this; }
/** * @see {@link #APP_NAME_ATT} */ public static void setApplication(String appName, OperationWithAttributes op) { op.setAttribute(APP_NAME_ATT, Bytes.toBytes(appName)); }
public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); } }
public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); } }
public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); } }
public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); } }
public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); } }
public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); } }
public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); } }
public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); } }
/** * @see {@link #EXTRA_PERMISSION_ATT} */ public static void setExtraPermissions(Set<String> permissions, OperationWithAttributes op) { op.setAttribute(EXTRA_PERMISSION_ATT, serialize(permissions)); }
public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); }
public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); }
/** * Adds all the attributes into the Operation object */ private static void addAttributes(OperationWithAttributes op, Map<ByteBuffer, ByteBuffer> attributes) { if (attributes == null || attributes.size() == 0) { 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); } }
/** * 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); } }