Github user denalex commented on a diff in the pull request: https://github.com/apache/incubator-hawq/pull/1326#discussion_r159308210 --- Diff: pxf/pxf-hdfs/src/main/java/org/apache/hawq/pxf/plugins/hdfs/utilities/HdfsUtilities.java --- @@ -151,18 +153,42 @@ public static boolean isThreadSafe(String dataDir, String compCodec) { * @param fsp file split to be serialized * @return byte serialization of fsp * @throws IOException if I/O errors occur while writing to the underlying - * stream + * stream */ public static byte[] prepareFragmentMetadata(FileSplit fsp) throws IOException { - ByteArrayOutputStream byteArrayStream = new ByteArrayOutputStream(); - ObjectOutputStream objectStream = new ObjectOutputStream( - byteArrayStream); - objectStream.writeLong(fsp.getStart()); - objectStream.writeLong(fsp.getLength()); - objectStream.writeObject(fsp.getLocations()); + + return prepareFragmentMetadata(fsp.getStart(), fsp.getLength(), fsp.getLocations()); + + } + + public static byte[] prepareFragmentMetadata(long start, long length, String[] locations) --- End diff -- or better to incorporate 2 lines from this function into the parent function, if it only is used once.
---