use of org.apache.flink.table.runtime.util.WindowKey in project flink by apache.
the class WindowBytesHashMapTest method generateRandomKeys.
@Override
public WindowKey[] generateRandomKeys(int num) {
final Random rnd = new Random(RANDOM_SEED);
BinaryRowData[] keys = getRandomizedInputs(num, rnd, true);
WindowKey[] windowKeys = new WindowKey[num];
for (int i = 0; i < num; i++) {
windowKeys[i] = new WindowKey(rnd.nextLong(), keys[i]);
}
return windowKeys;
}
use of org.apache.flink.table.runtime.util.WindowKey in project flink by apache.
the class WindowBytesMultiMapTest method generateRandomKeys.
@Override
public WindowKey[] generateRandomKeys(int num) {
final Random rnd = new Random(RANDOM_SEED);
BinaryRowData[] keys = getRandomizedInputs(num, rnd, true);
WindowKey[] windowKeys = new WindowKey[num];
for (int i = 0; i < num; i++) {
windowKeys[i] = new WindowKey(rnd.nextLong(), keys[i]);
}
return windowKeys;
}
use of org.apache.flink.table.runtime.util.WindowKey in project flink by apache.
the class WindowKeySerializer method deserialize.
@Override
public WindowKey deserialize(DataInputView source) throws IOException {
long window = source.readLong();
RowData key = keySerializer.deserialize(source);
return new WindowKey(window, key);
}
Aggregations