public KeyValTailAssembly(Pipe keyValuePairs, ElephantDBTap outTap) {
// generate two random field names
String shardField = "shard" + UUID.randomUUID().toString();
String keySortField = "keysort" + UUID.randomUUID().toString();
DomainSpec spec = outTap.getSpec();
LOG.info("Instantiating spec: " + spec);
// Add the shard index as field #2.
Pipe out = new Each(keyValuePairs, new Fields(0), new Shardize(shardField, spec), Fields.ALL);