class IdentityHdfsRecordFormat implements RecordFormat {

    @Override
    public byte[] format(Tuple tuple) {
        byte[] data = ((StreamlineEvent) tuple.getValueByField(StreamlineEvent.STREAMLINE_EVENT)).getBytes();
        byte[] recordDelimiter = "\n".getBytes();
        byte[] result = new byte[data.length + recordDelimiter.length];
        System.arraycopy(data, 0, result, 0, data.length);
        System.arraycopy(recordDelimiter, 0, result, data.length,
                recordDelimiter.length);
        return result;
    }

}