本文整理汇总了Java中com.yahoo.sketches.tuple.Summary类的典型用法代码示例。如果您正苦于以下问题:Java Summary类的具体用法?Java Summary怎么用?Java Summary使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Summary类属于com.yahoo.sketches.tuple包,在下文中一共展示了Summary类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testSummaryCreation
import com.yahoo.sketches.tuple.Summary; //导入依赖的package包/类
@Test
public void testSummaryCreation() {
GroupDataSummaryFactory factory = new GroupDataSummaryFactory();
Summary summaryA = factory.newSummary();
Summary summaryB = factory.newSummary();
Assert.assertNotNull(summaryA);
Assert.assertNotNull(summaryB);
Assert.assertFalse(summaryA == summaryB);
}
示例2: updateUnion
import com.yahoo.sketches.tuple.Summary; //导入依赖的package包/类
private static <S extends Summary> void updateUnion(final DataBag bag, final Union<S> union)
throws ExecException {
for (final Tuple innerTuple: bag) {
if ((innerTuple.size() != 1) || (innerTuple.get(0) == null)) {
continue;
}
final Sketch<S> incomingSketch = Util.deserializeSketchFromTuple(innerTuple);
union.update(incomingSketch);
}
}
示例3: newSummary
import com.yahoo.sketches.tuple.Summary; //导入依赖的package包/类
@Override
public Summary newSummary() {
return new GroupDataSummary();
}
示例4: deserializeSketchFromTuple
import com.yahoo.sketches.tuple.Summary; //导入依赖的package包/类
static <S extends Summary> Sketch<S> deserializeSketchFromTuple(final Tuple tuple) throws ExecException {
final byte[] bytes = ((DataByteArray) tuple.get(0)).get();
return Sketches.heapifySketch(Memory.wrap(bytes));
}