commit | 1374e7522c2967529ba272432436078f8b66d159 | [log] [tgz] |
---|---|---|
author | madhusudancs@gmail.com <madhusudancs@gmail.com@123451ca-8445-de46-9d55-352943316053> | Fri Mar 01 04:59:55 2013 +0000 |
committer | madhusudancs@gmail.com <madhusudancs@gmail.com@123451ca-8445-de46-9d55-352943316053> | Fri Mar 01 04:59:55 2013 +0000 |
tree | 597bca6148dc3b67577239e9bf74c43efe652d8a | |
parent | c03819be8addf07106dccbb271fe9d0f3a973071 [diff] |
Define an init method for the serializer and call it in result writer's open method. git-svn-id: https://hyracks.googlecode.com/svn/branches/fullstack_hyracks_result_distribution@3011 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/dataflow/value/IResultSerializer.java b/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/dataflow/value/IResultSerializer.java index afb17e4..ba2ff9a 100644 --- a/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/dataflow/value/IResultSerializer.java +++ b/hyracks/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/dataflow/value/IResultSerializer.java
@@ -21,6 +21,11 @@ public interface IResultSerializer extends Serializable { /** + * Initializes the serializer. + */ + public void init() throws HyracksDataException; + + /** * Method to serialize the result and append it to the provided output stream * * @param tAccess
diff --git a/hyracks/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/result/ResultWriterOperatorDescriptor.java b/hyracks/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/result/ResultWriterOperatorDescriptor.java index 7518449..e500307 100644 --- a/hyracks/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/result/ResultWriterOperatorDescriptor.java +++ b/hyracks/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/result/ResultWriterOperatorDescriptor.java
@@ -78,6 +78,7 @@ try { datasetPartitionWriter = dpm.createDatasetPartitionWriter(ctx, rsId, ordered, partition, nPartitions); datasetPartitionWriter.open(); + resultSerializer.init(); } catch (HyracksException e) { throw new HyracksDataException(e); }