diff --git accumulo-handler/src/test/org/apache/hadoop/hive/accumulo/mr/TestHiveAccumuloTypes.java accumulo-handler/src/test/org/apache/hadoop/hive/accumulo/mr/TestHiveAccumuloTypes.java index a378535..926f572 100644 --- accumulo-handler/src/test/org/apache/hadoop/hive/accumulo/mr/TestHiveAccumuloTypes.java +++ accumulo-handler/src/test/org/apache/hadoop/hive/accumulo/mr/TestHiveAccumuloTypes.java @@ -245,7 +245,7 @@ public void testBinaryTypes() throws Exception { Timestamp timestampValue = new Timestamp(now.getTime()); ByteStream.Output output = new ByteStream.Output(); TimestampWritable timestampWritable = new TimestampWritable(new Timestamp(now.getTime())); - timestampWritable.write(output); + timestampWritable.write(new DataOutputStream(output)); output.close(); m.put(cfBytes, "timestamp".getBytes(), output.toByteArray()); diff --git serde/src/java/org/apache/hadoop/hive/serde2/io/TimestampWritable.java serde/src/java/org/apache/hadoop/hive/serde2/io/TimestampWritable.java index 305fdbe..7759806 100644 --- serde/src/java/org/apache/hadoop/hive/serde2/io/TimestampWritable.java +++ serde/src/java/org/apache/hadoop/hive/serde2/io/TimestampWritable.java @@ -369,15 +369,11 @@ public void readFields(DataInput in) throws IOException { this.offset = 0; } - public void write(OutputStream out) throws IOException { + public void write(DataOutput out) throws IOException { checkBytes(); out.write(currentBytes, offset, getTotalLength()); } - public void write(DataOutput out) throws IOException { - write((OutputStream) out); - } - public int compareTo(TimestampWritable t) { checkBytes(); long s1 = this.getSeconds();