KvSwap

Javadoc Javadoc


Takes a collection of key-value pairs and returns a collection of key-value pairs which has each key and value swapped.

Examples

Example:

PCollection<KV<String, Integer>> strIntPairs = /* ... */;
PCollection<KV<Integer, String>> intStrPairs = strIntPairs.apply(KvSwap.create());