本文整理汇总了Java中org.apache.hadoop.hbase.client.OperationWithAttributes.getAttribute方法的典型用法代码示例。如果您正苦于以下问题:Java OperationWithAttributes.getAttribute方法的具体用法?Java OperationWithAttributes.getAttribute怎么用?Java OperationWithAttributes.getAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.hbase.client.OperationWithAttributes
的用法示例。
在下文中一共展示了OperationWithAttributes.getAttribute方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getFromOperation
import org.apache.hadoop.hbase.client.OperationWithAttributes; //导入方法依赖的package包/类
private Transaction getFromOperation(OperationWithAttributes op) throws IOException {
byte[] encoded = op.getAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY);
if (encoded == null) {
// to support old clients
encoded = op.getAttribute(TxConstants.OLD_TX_OPERATION_ATTRIBUTE_KEY);
}
if (encoded != null) {
return txCodec.decode(encoded);
}
return null;
}
示例2: isRollbackOperation
import org.apache.hadoop.hbase.client.OperationWithAttributes; //导入方法依赖的package包/类
private boolean isRollbackOperation(OperationWithAttributes op) throws IOException {
return op.getAttribute(TxConstants.TX_ROLLBACK_ATTRIBUTE_KEY) != null ||
// to support old clients
op.getAttribute(TxConstants.OLD_TX_ROLLBACK_ATTRIBUTE_KEY) != null;
}
示例3: getPredicateFilter
import org.apache.hadoop.hbase.client.OperationWithAttributes; //导入方法依赖的package包/类
private EntryPredicateFilter getPredicateFilter(OperationWithAttributes operation) throws IOException{
final byte[] serializedPredicateFilter=operation.getAttribute(ENTRY_PREDICATE_LABEL);
return EntryPredicateFilter.fromBytes(serializedPredicateFilter);
}
示例4: shouldUseSI
import org.apache.hadoop.hbase.client.OperationWithAttributes; //导入方法依赖的package包/类
private boolean shouldUseSI(OperationWithAttributes op){
if(op.getAttribute(SIConstants.SI_NEEDED)==null) return false;
else return op.getAttribute(SIConstants.SUPPRESS_INDEXING_ATTRIBUTE_NAME)==null;
}