Skip to content

HBASE-22755 Removed deprecated methods from Mutation #478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is odd. It seems to be telling me use this method -- i.e. the one that is deprecated -- instead.... but I don't think it impinges upon this effort....

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something about getTimeStamp vs getTimestamp?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. We had this discussion a while ago and changed it to xxxTimestamp.

*/
@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