本文整理汇总了Java中org.apache.accumulo.core.data.Key.getColumnFamily方法的典型用法代码示例。如果您正苦于以下问题:Java Key.getColumnFamily方法的具体用法?Java Key.getColumnFamily怎么用?Java Key.getColumnFamily使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.accumulo.core.data.Key
的用法示例。
在下文中一共展示了Key.getColumnFamily方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getEventKeyUid
import org.apache.accumulo.core.data.Key; //导入方法依赖的package包/类
private String getEventKeyUid(Key k) {
if (k == null || k.getColumnFamily() == null) {
return null;
} else {
return k.getColumnFamily().toString();
}
}
示例2: advanceNegatives
import org.apache.accumulo.core.data.Key; //导入方法依赖的package包/类
private void advanceNegatives(Key k) throws IOException {
if (log.isDebugEnabled()) {
log.debug("advancingNegatives for Key: " + k);
}
Text rowID = k.getRow();
Text colFam = k.getColumnFamily();
for (BooleanLogicTreeNode neg : negatives) {
Key startKey = new Key(rowID, neg.getFieldName(), new Text(neg.getFieldValue() + "\0" + colFam));
Key endKey = new Key(rowID, neg.getFieldName(), new Text(neg.getFieldValue() + "\0" + colFam + "\1"));
Range range = new Range(startKey, true, endKey, false);
if (log.isDebugEnabled()) {
log.debug("range: " + range);
}
neg.seek(range, EMPTY_COL_FAMS, false);
if (neg.hasTop()) {
neg.setValid(false);
}
if (log.isDebugEnabled()) {
if (neg.hasTop()) {
log.debug("neg top key: " + neg.getTopKey());
} else {
log.debug("neg has no top");
}
}
}
}
示例3: next
import org.apache.accumulo.core.data.Key; //导入方法依赖的package包/类
public void next() throws IOException {
if (log.isDebugEnabled()) {
log.debug("next");
}
if (key != null) {
key = null;
value = null;
}
if (eventSpecificRange) {
// Then this will probably return nothing
event.next();
if (event.hasTop()) {
key = event.getTopKey();
value = event.getTopValue();
}
} else {
do {
index.next();
// If the index has a match, then seek the event to the key
if (index.hasTop()) {
Key eventKey = index.getTopKey();
Key endKey = eventKey.followingKey(PartialKey.ROW_COLFAM);
Key startKey = new Key(eventKey.getRow(), eventKey.getColumnFamily());
Range eventRange = new Range(startKey, endKey);
HashSet<ByteSequence> cf = new HashSet<ByteSequence>();
cf.add(eventKey.getColumnFamilyData());
event.seek(eventRange, cf, true);
if (event.hasTop()) {
key = event.getTopKey();
value = event.getTopValue();
}
}
} while (key == null && index.hasTop());
}
// Sanity check. Make sure both returnValue and returnKey are null or both are not null
if (!((key == null && value == null) || (key != null && value != null))) {
log.warn("Key: " + ((key == null) ? "null" : key.toString()));
log.warn("Value: " + ((value == null) ? "null" : value.toString()));
throw new IOException("Return values are inconsistent");
}
}
示例4: getDataLocation
import org.apache.accumulo.core.data.Key; //导入方法依赖的package包/类
/**
* Returns the given key's dataLocation
*
* @param key
* @return The given key's dataLocation
*/
protected Text getDataLocation(Key key) {
return key.getColumnFamily();
}