diff --git a/CHANGES.txt b/CHANGES.txt index 68717dbe76e..8c57b59985d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -137,6 +137,7 @@ Release 0.91.0 - Unreleased all tests HBASE-4024 Major compaction may not be triggered, even though region server log says it is triggered (Ted Yu) + HBASE-3534 Action should not store or serialize regionName (Ted Yu) IMPROVEMENTS HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack) diff --git a/src/main/java/org/apache/hadoop/hbase/client/Action.java b/src/main/java/org/apache/hadoop/hbase/client/Action.java index 80f04059b47..40b0f2ef54a 100644 --- a/src/main/java/org/apache/hadoop/hbase/client/Action.java +++ b/src/main/java/org/apache/hadoop/hbase/client/Action.java @@ -34,7 +34,6 @@ import org.apache.hadoop.io.Writable; */ public class Action implements Writable, Comparable { - private byte[] regionName; private Row action; private int originalIndex; private R result; @@ -43,19 +42,27 @@ public class Action implements Writable, Comparable { super(); } + /* + * This constructor is replaced by {@link #Action(Row, int)} + */ + @Deprecated public Action(byte[] regionName, Row action, int originalIndex) { + this(action, originalIndex); + } + + public Action(Row action, int originalIndex) { super(); - this.regionName = regionName; this.action = action; - this.originalIndex = originalIndex; + this.originalIndex = originalIndex; } - + + @Deprecated public byte[] getRegionName() { - return regionName; + return null; } + @Deprecated public void setRegionName(byte[] regionName) { - this.regionName = regionName; } public R getResult() { @@ -84,7 +91,6 @@ public class Action implements Writable, Comparable { // /////////////////////////////////////////////////////////////////////////// public void write(final DataOutput out) throws IOException { - Bytes.writeByteArray(out, regionName); HbaseObjectWritable.writeObject(out, action, Row.class, null); out.writeInt(originalIndex); HbaseObjectWritable.writeObject(out, result, @@ -92,7 +98,6 @@ public class Action implements Writable, Comparable { } public void readFields(final DataInput in) throws IOException { - this.regionName = Bytes.readByteArray(in); this.action = (Row) HbaseObjectWritable.readObject(in, null); this.originalIndex = in.readInt(); this.result = (R) HbaseObjectWritable.readObject(in, null); diff --git a/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java b/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java index 9ad383ffc63..f5c2e88219f 100644 --- a/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java +++ b/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java @@ -1404,7 +1404,7 @@ public class HConnectionManager { actionsByServer.put(loc, actions); } - Action action = new Action(regionName, row, i); + Action action = new Action(row, i); lastServers[i] = loc; actions.add(regionName, action); }