HBASE-12111 Remove deprecated APIs from Mutation(s).
This commit is contained in:
parent
21e31f0c86
commit
b48a474988
|
@ -142,12 +142,6 @@ public class Append extends Mutation {
|
|||
return (Append) super.setId(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Append setWriteToWAL(boolean write) {
|
||||
return (Append) super.setWriteToWAL(write);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Append setDurability(Durability d) {
|
||||
return (Append) super.setDurability(d);
|
||||
|
@ -158,12 +152,6 @@ public class Append extends Mutation {
|
|||
return (Append) super.setFamilyCellMap(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Append setFamilyMap(NavigableMap<byte[], List<KeyValue>> map) {
|
||||
return (Append) super.setFamilyMap(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Append setClusterIds(List<UUID> clusterIds) {
|
||||
return (Append) super.setClusterIds(clusterIds);
|
||||
|
|
|
@ -339,12 +339,6 @@ public class Delete extends Mutation implements Comparable<Row> {
|
|||
return (Delete) super.setId(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Delete setWriteToWAL(boolean write) {
|
||||
return (Delete) super.setWriteToWAL(write);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Delete setDurability(Durability d) {
|
||||
return (Delete) super.setDurability(d);
|
||||
|
@ -355,12 +349,6 @@ public class Delete extends Mutation implements Comparable<Row> {
|
|||
return (Delete) super.setFamilyCellMap(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Delete setFamilyMap(NavigableMap<byte[], List<KeyValue>> map) {
|
||||
return (Delete) super.setFamilyMap(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Delete setClusterIds(List<UUID> clusterIds) {
|
||||
return (Delete) super.setClusterIds(clusterIds);
|
||||
|
|
|
@ -292,12 +292,6 @@ public class Increment extends Mutation implements Comparable<Row> {
|
|||
return (Increment) super.setId(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Increment setWriteToWAL(boolean write) {
|
||||
return (Increment) super.setWriteToWAL(write);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Increment setDurability(Durability d) {
|
||||
return (Increment) super.setDurability(d);
|
||||
|
@ -308,12 +302,6 @@ public class Increment extends Mutation implements Comparable<Row> {
|
|||
return (Increment) super.setFamilyCellMap(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Increment setFamilyMap(NavigableMap<byte[], List<KeyValue>> map) {
|
||||
return (Increment) super.setFamilyMap(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Increment setClusterIds(List<UUID> clusterIds) {
|
||||
return (Increment) super.setClusterIds(clusterIds);
|
||||
|
|
|
@ -50,7 +50,6 @@ import org.apache.hadoop.hbase.util.ClassSize;
|
|||
|
||||
import com.google.common.collect.ArrayListMultimap;
|
||||
import com.google.common.collect.ListMultimap;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
import com.google.common.io.ByteArrayDataOutput;
|
||||
import com.google.common.io.ByteStreams;
|
||||
|
@ -209,28 +208,6 @@ public abstract class Mutation extends OperationWithAttributes implements Row, C
|
|||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #getDurability()} instead.
|
||||
* @return true if edits should be applied to WAL, false if not
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean getWriteToWAL() {
|
||||
return this.durability == Durability.SKIP_WAL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether this Delete should be written to the WAL or not.
|
||||
* Not writing the WAL means you may lose edits on server crash.
|
||||
* This method will reset any changes made via {@link #setDurability(Durability)}
|
||||
* @param write true if edits should be written to WAL, false if not
|
||||
* @deprecated Use {@link #setDurability(Durability)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public Mutation setWriteToWAL(boolean write) {
|
||||
setDurability(write ? Durability.USE_DEFAULT : Durability.SKIP_WAL);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the durability for this mutation
|
||||
* @param d
|
||||
|
@ -263,39 +240,6 @@ public abstract class Mutation extends OperationWithAttributes implements Row, C
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method for retrieving the put's familyMap that is deprecated and inefficient.
|
||||
* @return the map
|
||||
* @deprecated use {@link #getFamilyCellMap()} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public NavigableMap<byte [], List<KeyValue>> getFamilyMap() {
|
||||
TreeMap<byte[], List<KeyValue>> fm =
|
||||
new TreeMap<byte[], List<KeyValue>>(Bytes.BYTES_COMPARATOR);
|
||||
for (Map.Entry<byte[], List<Cell>> e : familyMap.entrySet()) {
|
||||
List<KeyValue> kvl = new ArrayList<KeyValue>(e.getValue().size());
|
||||
for (Cell c : e.getValue()) {
|
||||
kvl.add(KeyValueUtil.ensureKeyValue(c));
|
||||
}
|
||||
fm.put(e.getKey(), kvl);
|
||||
}
|
||||
return fm;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method for setting the put's familyMap that is deprecated and inefficient.
|
||||
* @deprecated use {@link #setFamilyCellMap(NavigableMap)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public Mutation setFamilyMap(NavigableMap<byte [], List<KeyValue>> map) {
|
||||
TreeMap<byte[], List<Cell>> fm = new TreeMap<byte[], List<Cell>>(Bytes.BYTES_COMPARATOR);
|
||||
for (Map.Entry<byte[], List<KeyValue>> e : map.entrySet()) {
|
||||
fm.put(e.getKey(), Lists.<Cell>newArrayList(e.getValue()));
|
||||
}
|
||||
this.familyMap = fm;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to check if the familyMap is empty
|
||||
* @return true if empty, false otherwise
|
||||
|
|
|
@ -431,12 +431,6 @@ public class Put extends Mutation implements HeapSize, Comparable<Row> {
|
|||
return (Put) super.setId(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Put setWriteToWAL(boolean write) {
|
||||
return (Put) super.setWriteToWAL(write);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Put setDurability(Durability d) {
|
||||
return (Put) super.setDurability(d);
|
||||
|
@ -447,12 +441,6 @@ public class Put extends Mutation implements HeapSize, Comparable<Row> {
|
|||
return (Put) super.setFamilyCellMap(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public Put setFamilyMap(NavigableMap<byte[], List<KeyValue>> map) {
|
||||
return (Put) super.setFamilyMap(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Put setClusterIds(List<UUID> clusterIds) {
|
||||
return (Put) super.setClusterIds(clusterIds);
|
||||
|
|
Loading…
Reference in New Issue