Skip to content

Commit

Permalink
HBASE-22755 Removed deprecated methods from Mutation
Browse files Browse the repository at this point in the history
Signed-off-by: stack <stack@apache.org>
  • Loading branch information
HorizonNet authored Aug 23, 2019
1 parent 74fb204 commit 808f051
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,19 +301,6 @@ public Durability getDurability() {
return this.familyMap;
}

/**
* Method for setting the mutation's familyMap
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0.
* Use {@link Mutation#Mutation(byte[], long, NavigableMap)} instead
*/
@Deprecated
public Mutation setFamilyCellMap(NavigableMap<byte [], List<Cell>> map) {
// TODO: Shut this down or move it up to be a Constructor. Get new object rather than change
// this internal data member.
this.familyMap = map;
return this;
}

/**
* Method to check if the familyMap is empty
* @return true if empty, false otherwise
Expand Down Expand Up @@ -341,17 +328,6 @@ public int compareTo(final Row d) {
return Bytes.compareTo(this.getRow(), d.getRow());
}

/**
* Method for retrieving the timestamp
* @return timestamp
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0.
* Use {@link #getTimestamp()} instead
*/
@Deprecated
public long getTimeStamp() {
return this.getTimestamp();
}

/**
* Method for retrieving the timestamp.
*
Expand Down
11 changes: 0 additions & 11 deletions hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
Original file line number Diff line number Diff line change
Expand Up @@ -249,17 +249,6 @@ public Put setDurability(Durability d) {
return (Put) super.setDurability(d);
}

/**
* Method for setting the put's familyMap
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0.
* Use {@link Put#Put(byte[], long, NavigableMap)} instead
*/
@Deprecated
@Override
public Put setFamilyCellMap(NavigableMap<byte[], List<Cell>> map) {
return (Put) super.setFamilyCellMap(map);
}

@Override
public Put setClusterIds(List<UUID> clusterIds) {
return (Put) super.setClusterIds(clusterIds);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.apache.hadoop.hbase.client.Mutation;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.RegionInfo;
import org.apache.hadoop.hbase.client.Row;
import org.apache.hadoop.hbase.regionserver.HRegion;
import org.apache.hadoop.hbase.regionserver.wal.AbstractFSWAL;
import org.apache.hadoop.hbase.util.Bytes;
Expand Down Expand Up @@ -453,7 +454,7 @@ public MutationReplay(ClientProtos.MutationProto.MutationType type, Mutation mut

@Override
public int compareTo(final MutationReplay d) {
return this.mutation.compareTo(d.mutation);
return Row.COMPARATOR.compare(mutation, d.mutation);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ private void addStateAndBarrier(RegionInfo region, RegionState.State state, long
}
for (int i = 0; i < barriers.length; i++) {
put.addColumn(HConstants.REPLICATION_BARRIER_FAMILY, HConstants.SEQNUM_QUALIFIER,
put.getTimeStamp() - barriers.length + i, Bytes.toBytes(barriers[i]));
put.getTimestamp() - barriers.length + i, Bytes.toBytes(barriers[i]));
}
try (Table table = UTIL.getConnection().getTable(TableName.META_TABLE_NAME)) {
table.put(put);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ private void addStateAndBarrier(RegionInfo region, RegionState.State state, long
}
for (int i = 0; i < barriers.length; i++) {
put.addColumn(HConstants.REPLICATION_BARRIER_FAMILY, HConstants.SEQNUM_QUALIFIER,
put.getTimeStamp() - barriers.length + i, Bytes.toBytes(barriers[i]));
put.getTimestamp() - barriers.length + i, Bytes.toBytes(barriers[i]));
}
try (Table table = UTIL.getConnection().getTable(TableName.META_TABLE_NAME)) {
table.put(put);
Expand Down

0 comments on commit 808f051

Please sign in to comment.