Skip to content

Instantly share code, notes, and snippets.

@KKcorps
Created September 23, 2019 16:22
Show Gist options
  • Save KKcorps/0200db8c278b967d8f8572fba180f153 to your computer and use it in GitHub Desktop.
Save KKcorps/0200db8c278b967d8f8572fba180f153 to your computer and use it in GitHub Desktop.
TypeInformation<Integer> resultType = TypeExtractor.createTypeInfo(Integer.class);
TypeSerializer<Integer> serializer = resultType.createSerializer(new ExecutionConfig());
RocksIterator iterator = db.newIterator(columnFamilyHandle);
iterator.seekToFirst();
iterator.status();
while (iterator.isValid()) {
byte[] key = iterator.key();
System.out.write(key);
System.out.println(serializer.deserialize(new TestInputView(iterator.value())));
iterator.next();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment