Github user sansanichfb commented on a diff in the pull request:
https://github.com/apache/incubator-hawq/pull/1209#discussion_r109271460
--- Diff:
pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/utilities/Utilities.java ---
@@ -151,4 +157,78 @@ public static String maskNonPrintables(String input) {
}
return input.replaceAll("[^a-zA-Z0-9_:/-]", ".");
}
+
+ /**
+ * Parses input data and returns fragment metadata.
+ *
+ * @param inputData input data which has protocol information
+ * @return fragment metadata
+ * @throws IllegalArgumentException if fragment metadata information
wasn't found in input data
+ * @throws Exception
+ */
+ public static FragmentMetadata parseFragmentMetadata(InputData
inputData) throws Exception {
+ byte[] serializedLocation = inputData.getFragmentMetadata();
+ if (serializedLocation == null) {
+ throw new IllegalArgumentException("Missing fragment location
information");
+ }
+ try (ByteArrayInputStream bytesStream = new
ByteArrayInputStream(serializedLocation);
--- End diff --
Thanks, makes sense.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---