本文整理匯總了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));
}