Schema schema = new Schema(KeyValue.class);
JSONObject jsonRecord = new JSONObject("{key:" + keyValue.getKey()
+ ",value:" + keyValue.getValue() + "}");
Object event = LoadGenerator.makeRecord(jsonRecord, schema);
CompoundKeyInfo compoundKeyInfo = new CompoundKeyInfo();
compoundKeyInfo.setCompoundKey("key");
compoundKeyInfo.setCompoundValue("value");
List<CompoundKeyInfo> compoundKeyInfos = new ArrayList<CompoundKeyInfo>();
compoundKeyInfos.add(compoundKeyInfo);
EventWrapper eventWrapper = new EventWrapper(streamName, event,
compoundKeyInfos);
eventEmitter.emit(partitionId, eventWrapper);