org.apache.samza.operators.windows.WindowKey.<init>()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(104)

本文整理了Java中org.apache.samza.operators.windows.WindowKey.<init>()方法的一些代码示例,展示了WindowKey.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WindowKey.<init>()方法的具体详情如下:
包路径:org.apache.samza.operators.windows.WindowKey
类名称:WindowKey
方法名:<init>

WindowKey.<init>介绍

暂无

代码示例

代码示例来源:origin: apache/samza

/**
 * Computes the pane output corresponding to a {@link TriggerKey} that fired.
 */
private WindowPane<K, Object> computePaneOutput(TriggerKey<K> triggerKey, Object windowVal) {
 WindowKey<K> windowKey = new WindowKey(triggerKey.getKey(), Long.toString(triggerKey.getTimestamp()));
 WindowPane<K, Object> paneOutput =
   new WindowPane<>(windowKey, windowVal, window.getAccumulationMode(), triggerKey.getType());
 LOG.trace("Emitting pane output for trigger key {}", triggerKey);
 return paneOutput;
}

代码示例来源:origin: org.apache.samza/samza-core_2.12

/**
 * Computes the pane output corresponding to a {@link TriggerKey} that fired.
 */
private WindowPane<K, Object> computePaneOutput(TriggerKey<K> triggerKey, Object windowVal) {
 WindowKey<K> windowKey = new WindowKey(triggerKey.getKey(), Long.toString(triggerKey.getTimestamp()));
 WindowPane<K, Object> paneOutput =
   new WindowPane<>(windowKey, windowVal, window.getAccumulationMode(), triggerKey.getType());
 LOG.trace("Emitting pane output for trigger key {}", triggerKey);
 return paneOutput;
}

代码示例来源:origin: org.apache.samza/samza-core_2.11

/**
 * Computes the pane output corresponding to a {@link TriggerKey} that fired.
 */
private WindowPane<K, Object> computePaneOutput(TriggerKey<K> triggerKey, Object windowVal) {
 WindowKey<K> windowKey = new WindowKey(triggerKey.getKey(), Long.toString(triggerKey.getTimestamp()));
 WindowPane<K, Object> paneOutput =
   new WindowPane<>(windowKey, windowVal, window.getAccumulationMode(), triggerKey.getType());
 LOG.trace("Emitting pane output for trigger key {}", triggerKey);
 return paneOutput;
}

代码示例来源:origin: org.apache.samza/samza-core_2.10

/**
 * Computes the pane output corresponding to a {@link TriggerKey} that fired.
 */
private WindowPane<K, Object> computePaneOutput(TriggerKey<K> triggerKey, Object windowVal) {
 WindowKey<K> windowKey = new WindowKey(triggerKey.getKey(), Long.toString(triggerKey.getTimestamp()));
 WindowPane<K, Object> paneOutput =
   new WindowPane<>(windowKey, windowVal, window.getAccumulationMode(), triggerKey.getType());
 LOG.trace("Emitting pane output for trigger key {}", triggerKey);
 return paneOutput;
}

代码示例来源:origin: org.apache.samza/samza-core

/**
 * Computes the pane output corresponding to a {@link TriggerKey} that fired.
 */
private WindowPane<K, Object> computePaneOutput(TriggerKey<K> triggerKey, Object windowVal) {
 WindowKey<K> windowKey = new WindowKey(triggerKey.getKey(), Long.toString(triggerKey.getTimestamp()));
 WindowPane<K, Object> paneOutput =
   new WindowPane<>(windowKey, windowVal, window.getAccumulationMode(), triggerKey.getType());
 LOG.trace("Emitting pane output for trigger key {}", triggerKey);
 return paneOutput;
}

代码示例来源:origin: apache/samza

@Test
 public void testConstructor() {
  WindowPane<String, Integer> wndOutput = new WindowPane<>(new WindowKey<>("testMsg", null), 10, AccumulationMode.DISCARDING, FiringType.EARLY);
  assertEquals(wndOutput.getKey().getKey(), "testMsg");
  assertEquals(wndOutput.getMessage(), Integer.valueOf(10));
 }
}

相关文章