本文整理汇总了Java中org.apache.accumulo.core.data.ColumnUpdate.getColumnFamily方法的典型用法代码示例。如果您正苦于以下问题:Java ColumnUpdate.getColumnFamily方法的具体用法?Java ColumnUpdate.getColumnFamily怎么用?Java ColumnUpdate.getColumnFamily使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.accumulo.core.data.ColumnUpdate
的用法示例。
在下文中一共展示了ColumnUpdate.getColumnFamily方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: write
import org.apache.accumulo.core.data.ColumnUpdate; //导入方法依赖的package包/类
@Override
public void write(Text table, Mutation mutation) throws IOException, InterruptedException {
TreeMap<Key,Value> buffer = getBuffer(table);
int mutationSize = 0;
for (ColumnUpdate update : mutation.getUpdates()) {
Key k = new Key(mutation.getRow(), update.getColumnFamily(), update.getColumnQualifier(), update.getColumnVisibility(), update.getTimestamp(),
update.isDeleted());
Value v = new Value(update.getValue());
// TODO account for object overhead
mutationSize += k.getSize();
mutationSize += v.getSize();
buffer.put(k, v);
}
size += mutationSize;
long bufferSize = bufferSizes.get(table);
// TODO use a MutableLong instead
bufferSize += mutationSize;
bufferSizes.put(table, bufferSize);
while (size >= maxSize) {
flushLargestTable();
}
}
示例2: MutableEntry
import org.apache.accumulo.core.data.ColumnUpdate; //导入方法依赖的package包/类
/**
* Creates a mutable entry for the given update.
*
* @param row
* The row that is being updated.
* @param update
* Update to wrap.
*/
public MutableEntry(byte[] row, ColumnUpdate update) {
this.row = row;
this.colF = update.getColumnFamily();
this.colQ = update.getColumnQualifier();
this.colVis = update.getColumnVisibility();
this.timestamp = update.getTimestamp();
this.delete = update.isDeleted();
this.value = update.getValue();
}
示例3: createTestData1
import org.apache.accumulo.core.data.ColumnUpdate; //导入方法依赖的package包/类
private void createTestData1() {
List<Tag> tags = Collections.singletonList(new Tag("host", "host1"));
for (long i = 0; i < 1000; i += 100) {
Metric m = new Metric("sys.loadAvg", i, .2, tags);
Mutation mutation = MetricAdapter.toMutation(m);
for (ColumnUpdate cu : mutation.getUpdates()) {
Key key = new Key(mutation.getRow(), cu.getColumnFamily(), cu.getColumnQualifier(),
cu.getColumnVisibility(), cu.getTimestamp());
testData1.put(key, new Value(cu.getValue()));
}
}
}
示例4: put
import org.apache.accumulo.core.data.ColumnUpdate; //导入方法依赖的package包/类
void put(Map<Key, Value> testData, Metric m) {
Mutation mutation = MetricAdapter.toMutation(m);
for (ColumnUpdate cu : mutation.getUpdates()) {
Key key = new Key(mutation.getRow(), cu.getColumnFamily(), cu.getColumnQualifier(),
cu.getColumnVisibility(), cu.getTimestamp());
testData.put(key, new Value(cu.getValue()));
}
}