当前位置: 首页>>代码示例>>Java>>正文


Java ColumnUpdate.getColumnFamily方法代码示例

本文整理汇总了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();
  }
}
 
开发者ID:apache,项目名称:accumulo-wikisearch,代码行数:25,代码来源:BufferingRFileRecordWriter.java

示例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();
}
 
开发者ID:mit-ll,项目名称:PACE,代码行数:18,代码来源:MutableEntry.java

示例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()));
        }
    }
}
 
开发者ID:NationalSecurityAgency,项目名称:timely,代码行数:14,代码来源:DownsampleIteratorTest.java

示例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()));
    }
}
 
开发者ID:NationalSecurityAgency,项目名称:timely,代码行数:9,代码来源:DownsampleIteratorTest.java


注:本文中的org.apache.accumulo.core.data.ColumnUpdate.getColumnFamily方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。