diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/Reference.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/Reference.java index 93f03f0..df0c602 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/Reference.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/Reference.java @@ -33,7 +33,6 @@ import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.protobuf.ProtobufUtil; import org.apache.hadoop.hbase.protobuf.generated.FSProtos; import org.apache.hadoop.hbase.util.Bytes; -import org.apache.hadoop.io.Writable; import com.google.protobuf.ByteString; @@ -56,7 +55,7 @@ import com.google.protobuf.ByteString; * references. References are cleaned up by compactions. */ @InterfaceAudience.Private -public class Reference implements Writable { +public class Reference { private byte [] splitkey; private Range region; @@ -99,7 +98,6 @@ public class Reference implements Writable { /** * Used by serializations. - * @deprecated Use the pb serializations instead. Writables are going away. */ @Deprecated // Make this private when it comes time to let go of this constructor. Needed by pb serialization. @@ -130,27 +128,6 @@ public class Reference implements Writable { return "" + this.region; } - /** - * @deprecated Writables are going away. Use the pb serialization methods instead. - */ - @Deprecated - public void write(DataOutput out) throws IOException { - // Write true if we're doing top of the file. - out.writeBoolean(isTopFileRegion(this.region)); - Bytes.writeByteArray(out, this.splitkey); - } - - /** - * @deprecated Writables are going away. Use the pb serialization methods instead. - */ - @Deprecated - public void readFields(DataInput in) throws IOException { - boolean tmp = in.readBoolean(); - // If true, set region to top. - this.region = tmp? Range.top: Range.bottom; - this.splitkey = Bytes.readByteArray(in); - } - public static boolean isTopFileRegion(final Range r) { return r.equals(Range.top); } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/TimeRange.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/TimeRange.java index 2320582..1df344c 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/TimeRange.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/TimeRange.java @@ -23,8 +23,6 @@ import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; -import org.apache.hadoop.io.Writable; - import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability; import org.apache.hadoop.hbase.util.Bytes; @@ -39,7 +37,7 @@ import org.apache.hadoop.hbase.util.Bytes; */ @InterfaceAudience.Public @InterfaceStability.Stable -public class TimeRange implements Writable { +public class TimeRange { private long minStamp = 0L; private long maxStamp = Long.MAX_VALUE; private boolean allTime = false; @@ -184,17 +182,4 @@ public class TimeRange implements Writable { sb.append(this.minStamp); return sb.toString(); } - - //Writable - public void readFields(final DataInput in) throws IOException { - this.minStamp = in.readLong(); - this.maxStamp = in.readLong(); - this.allTime = in.readBoolean(); - } - - public void write(final DataOutput out) throws IOException { - out.writeLong(minStamp); - out.writeLong(maxStamp); - out.writeBoolean(this.allTime); - } -} +} \ No newline at end of file diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/TimeRangeTracker.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/TimeRangeTracker.java index 3606a8c..daec64e 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/TimeRangeTracker.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/TimeRangeTracker.java @@ -149,5 +149,4 @@ public class TimeRangeTracker implements Writable { return "[" + minimumTimestamp + "," + maximumTimestamp + "]"; } -} - +} \ No newline at end of file diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestSerialization.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestSerialization.java index 3f7edd0..3316179 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestSerialization.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestSerialization.java @@ -521,17 +521,6 @@ public class TestSerialization { } */ - @Test public void testTimeRange() throws Exception{ - TimeRange tr = new TimeRange(0,5); - byte [] mb = Writables.getBytes(tr); - TimeRange deserializedTr = - (TimeRange)Writables.getWritable(mb, new TimeRange()); - - assertEquals(tr.getMax(), deserializedTr.getMax()); - assertEquals(tr.getMin(), deserializedTr.getMin()); - - } - protected static final int MAXVERSIONS = 3; protected final static byte [] fam1 = Bytes.toBytes("colfamily1"); protected final static byte [] fam2 = Bytes.toBytes("colfamily2");