clean up printers -- remove serialiID to avoid warnings
git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_stabilization_printerfix@920 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ABooleanPrinter.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ABooleanPrinter.java
index 60ee1fe..33866df 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ABooleanPrinter.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ABooleanPrinter.java
@@ -8,7 +8,6 @@
public class ABooleanPrinter implements IPrinter {
- private static final long serialVersionUID = 1L;
public static final ABooleanPrinter INSTANCE = new ABooleanPrinter();
@Override
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ACirclePrinter.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ACirclePrinter.java
index 812d93b..e2da96e 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ACirclePrinter.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ACirclePrinter.java
@@ -8,7 +8,6 @@
public class ACirclePrinter implements IPrinter {
- private static final long serialVersionUID = 1L;
public static final ACirclePrinter INSTANCE = new ACirclePrinter();
@Override
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADatePrinter.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADatePrinter.java
index 24aa144..918e286 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADatePrinter.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADatePrinter.java
@@ -9,11 +9,10 @@
public class ADatePrinter implements IPrinter {
- private static final long serialVersionUID = 1L;
private static long CHRONON_OF_DAY = 24 * 60 * 60 * 1000;
public static final ADatePrinter INSTANCE = new ADatePrinter();
private static final GregorianCalendarSystem gCalInstance = GregorianCalendarSystem.getInstance();
-
+
@Override
public void init() {
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADateTimePrinter.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADateTimePrinter.java
index d856a20..96df767 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADateTimePrinter.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADateTimePrinter.java
@@ -9,7 +9,6 @@
public class ADateTimePrinter implements IPrinter {
- private static final long serialVersionUID = 1L;
public static final ADateTimePrinter INSTANCE = new ADateTimePrinter();
private static final GregorianCalendarSystem gCalInstance = GregorianCalendarSystem.getInstance();
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADoublePrinter.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADoublePrinter.java
index 3a255c6..ae50d0e 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADoublePrinter.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADoublePrinter.java
@@ -8,7 +8,6 @@
public class ADoublePrinter implements IPrinter {
- private static final long serialVersionUID = 1L;
public static final ADoublePrinter INSTANCE = new ADoublePrinter();
@Override
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADurationPrinter.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADurationPrinter.java
index a59b9ac..061d372 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADurationPrinter.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADurationPrinter.java
@@ -12,7 +12,6 @@
public class ADurationPrinter implements IPrinter {
- private static final long serialVersionUID = 1L;
public static final ADurationPrinter INSTANCE = new ADurationPrinter();
private static final GregorianCalendarSystem gCalInstance = GregorianCalendarSystem.getInstance();
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AFloatPrinter.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AFloatPrinter.java
index 27d2e2c..96c9ee9 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AFloatPrinter.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AFloatPrinter.java
@@ -8,7 +8,6 @@
public class AFloatPrinter implements IPrinter {
- private static final long serialVersionUID = 1L;
public static final AFloatPrinter INSTANCE = new AFloatPrinter();
@Override
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AInt16Printer.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AInt16Printer.java
index 8961013..1687fb1 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AInt16Printer.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AInt16Printer.java
@@ -13,8 +13,6 @@
public class AInt16Printer implements IPrinter {
- private static final long serialVersionUID = 1L;
-
private static final String SUFFIX_STRING = "i16";
private static byte[] _suffix;
private static int _suffix_count;
@@ -23,6 +21,7 @@
DataOutput dout = new DataOutputStream(interm);
try {
dout.writeUTF(SUFFIX_STRING);
+ interm.close();
} catch (IOException e) {
e.printStackTrace();
}
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AInt32Printer.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AInt32Printer.java
index a5c3245..b20db34 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AInt32Printer.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AInt32Printer.java
@@ -10,7 +10,6 @@
public class AInt32Printer implements IPrinter {
- private static final long serialVersionUID = 1L;
public static final AInt32Printer INSTANCE = new AInt32Printer();
@Override
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AInt64Printer.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AInt64Printer.java
index 318828e..312802a 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AInt64Printer.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AInt64Printer.java
@@ -13,8 +13,6 @@
public class AInt64Printer implements IPrinter {
- private static final long serialVersionUID = 1L;
-
private static final String SUFFIX_STRING = "i64";
private static byte[] _suffix;
private static int _suffix_count;
@@ -23,6 +21,7 @@
DataOutput dout = new DataOutputStream(interm);
try {
dout.writeUTF(SUFFIX_STRING);
+ interm.close();
} catch (IOException e) {
e.printStackTrace();
}
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AInt8Printer.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AInt8Printer.java
index bd4139d..a5a421d 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AInt8Printer.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AInt8Printer.java
@@ -13,8 +13,6 @@
public class AInt8Printer implements IPrinter {
- private static final long serialVersionUID = 1L;
-
private static final String SUFFIX_STRING = "i8";
private static byte[] _suffix;
private static int _suffix_count;
@@ -23,6 +21,7 @@
DataOutput dout = new DataOutputStream(interm);
try {
dout.writeUTF(SUFFIX_STRING);
+ interm.close();
} catch (IOException e) {
e.printStackTrace();
}
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ALinePrinter.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ALinePrinter.java
index f99727a..40f405c 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ALinePrinter.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ALinePrinter.java
@@ -8,7 +8,6 @@
public class ALinePrinter implements IPrinter {
- private static final long serialVersionUID = 1L;
public static final ALinePrinter INSTANCE = new ALinePrinter();
@Override
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ANullPrinter.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ANullPrinter.java
index 6abc0e1..daea967 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ANullPrinter.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ANullPrinter.java
@@ -5,11 +5,8 @@
import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
import edu.uci.ics.hyracks.algebricks.data.IPrinter;
-
-
public class ANullPrinter implements IPrinter {
- private static final long serialVersionUID = 1L;
public static final ANullPrinter INSTANCE = new ANullPrinter();
@Override
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AObjectPrinter.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AObjectPrinter.java
index aff30f7..edcfc8a 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AObjectPrinter.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AObjectPrinter.java
@@ -10,7 +10,6 @@
public class AObjectPrinter implements IPrinter {
- private static final long serialVersionUID = 1L;
public static final AObjectPrinter INSTANCE = new AObjectPrinter();
private IPrinter recordPrinter = new ARecordPrinterFactory(null).createPrinter();
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/APoint3DPrinter.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/APoint3DPrinter.java
index 699cb77..7394dc5 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/APoint3DPrinter.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/APoint3DPrinter.java
@@ -8,7 +8,6 @@
public class APoint3DPrinter implements IPrinter {
- private static final long serialVersionUID = 1L;
public static final APoint3DPrinter INSTANCE = new APoint3DPrinter();
@Override
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/APointPrinter.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/APointPrinter.java
index 50fbb0b..7c50905 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/APointPrinter.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/APointPrinter.java
@@ -8,7 +8,6 @@
public class APointPrinter implements IPrinter {
- private static final long serialVersionUID = 1L;
public static final APointPrinter INSTANCE = new APointPrinter();
@Override
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/APolygonPrinter.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/APolygonPrinter.java
index 794dae7..bc1e553 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/APolygonPrinter.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/APolygonPrinter.java
@@ -9,7 +9,6 @@
public class APolygonPrinter implements IPrinter {
- private static final long serialVersionUID = 1L;
public static final APolygonPrinter INSTANCE = new APolygonPrinter();
@Override
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ARectanglePrinter.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ARectanglePrinter.java
index 17caa53..0618f28 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ARectanglePrinter.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ARectanglePrinter.java
@@ -8,7 +8,6 @@
public class ARectanglePrinter implements IPrinter {
- private static final long serialVersionUID = 1L;
public static final ARectanglePrinter INSTANCE = new ARectanglePrinter();
@Override
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AStringPrinter.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AStringPrinter.java
index 6f5b629..d491777 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AStringPrinter.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/AStringPrinter.java
@@ -9,7 +9,6 @@
public class AStringPrinter implements IPrinter {
- private static final long serialVersionUID = 1L;
public static final AStringPrinter INSTANCE = new AStringPrinter();
@Override
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ATimePrinter.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ATimePrinter.java
index 72a6e37..b77ee64 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ATimePrinter.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ATimePrinter.java
@@ -9,10 +9,9 @@
public class ATimePrinter implements IPrinter {
- private static final long serialVersionUID = 1L;
public static final ATimePrinter INSTANCE = new ATimePrinter();
private static final GregorianCalendarSystem gCalInstance = GregorianCalendarSystem.getInstance();
-
+
@Override
public void init() {
@@ -21,7 +20,7 @@
@Override
public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
int time = AInt32SerializerDeserializer.getInt(b, s + 1);
-
+
ps.print("time(\"");
ps.append(String.format("%02d", gCalInstance.getHourOfDay(time))).append(":")
.append(String.format("%02d", gCalInstance.getMinOfHour(time))).append(":")
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/runtime/pointables/printer/AListPrinter.java b/asterix-om/src/main/java/edu/uci/ics/asterix/runtime/pointables/printer/AListPrinter.java
index 5e38f93..e16a5f6 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/runtime/pointables/printer/AListPrinter.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/runtime/pointables/printer/AListPrinter.java
@@ -27,8 +27,8 @@
import edu.uci.ics.hyracks.algebricks.common.utils.Pair;
/**
- * This class is to do the runtime type cast for a list. It is ONLY visible to
- * ACastVisitor.
+ * This class is to print the content of a list. It is ONLY visible to
+ * APrintVisitor.
*/
class AListPrinter {
private static String LEFT_PAREN = "{{ ";
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/runtime/pointables/printer/APrintVisitor.java b/asterix-om/src/main/java/edu/uci/ics/asterix/runtime/pointables/printer/APrintVisitor.java
index b674055..10ea58c 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/runtime/pointables/printer/APrintVisitor.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/runtime/pointables/printer/APrintVisitor.java
@@ -50,14 +50,8 @@
/**
* This class is a IVisitablePointableVisitor implementation which recursively
- * visit a given record, list or flat value of a given type, and cast it to a
- * specified type. For example:
- * A record { "hobby": {{"music", "coding"}}, "id": "001", "name":
- * "Person Three"} which confirms to closed type ( id: string, name: string,
- * hobby: {{string}}? ) can be casted to a open type (id: string )
- * Since the open/closed part of a record has a completely different underlying
- * memory/storage layout, the visitor will change the layout as specified at
- * runtime.
+ * visit a given record, list or flat value of a given type, and print it to a
+ * PrintStream in adm format.
*/
public class APrintVisitor implements IVisitablePointableVisitor<Void, Pair<PrintStream, ATypeTag>> {
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/runtime/pointables/printer/ARecordPrinter.java b/asterix-om/src/main/java/edu/uci/ics/asterix/runtime/pointables/printer/ARecordPrinter.java
index 86d502d..13c0ad7 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/runtime/pointables/printer/ARecordPrinter.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/runtime/pointables/printer/ARecordPrinter.java
@@ -27,8 +27,8 @@
import edu.uci.ics.hyracks.algebricks.common.utils.Pair;
/**
- * This class is to do the runtime type cast for a record. It is ONLY visible to
- * ACastVisitor.
+ * This class is to print the content of a record. It is ONLY visible to
+ * APrintVisitor.
*/
class ARecordPrinter {
private static String LEFT_PAREN = "{ ";