HBASE-1043 Removing @Override attributes where they are no longer needed.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@722995 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
914e6de8de
commit
a636e10601
|
@ -90,6 +90,8 @@ Release 0.19.0 - Unreleased
|
|||
HBASE-1041 Migration throwing NPE
|
||||
HBASE-1042 OOME but we don't abort
|
||||
HBASE-927 We don't recover if HRS hosting -ROOT-/.META. goes down
|
||||
HBASE-1043 Removing @Override attributes where they are no longer needed.
|
||||
|
||||
|
||||
IMPROVEMENTS
|
||||
HBASE-901 Add a limit to key length, check key and value length on client side
|
||||
|
|
|
@ -65,19 +65,16 @@ public class RegexStringComparator implements WritableByteArrayComparable {
|
|||
this.pattern = Pattern.compile(expr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(byte[] value) {
|
||||
// Use find() for subsequence match instead of matches() (full sequence
|
||||
// match) to adhere to the principle of least surprise.
|
||||
return pattern.matcher(Bytes.toString(value)).find() ? 1 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFields(DataInput in) throws IOException {
|
||||
this.pattern = Pattern.compile(in.readUTF());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(DataOutput out) throws IOException {
|
||||
out.writeUTF(pattern.toString());
|
||||
}
|
||||
|
|
|
@ -56,17 +56,14 @@ public class SubstringComparator implements WritableByteArrayComparable {
|
|||
this.substr = substr.toLowerCase();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(byte[] value) {
|
||||
return Bytes.toString(value).toLowerCase().contains(substr) ? 1 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFields(DataInput in) throws IOException {
|
||||
substr = in.readUTF();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(DataOutput out) throws IOException {
|
||||
out.writeUTF(substr);
|
||||
}
|
||||
|
|
|
@ -35,6 +35,9 @@ import org.apache.hadoop.mapred.Partitioner;
|
|||
* This is used to partition the output keys into groups of keys.
|
||||
* Keys are grouped according to the regions that currently exist
|
||||
* so that each reducer fills a single region so load is distributed.
|
||||
*
|
||||
* @param <K2>
|
||||
* @param <V2>
|
||||
*/
|
||||
public class HRegionPartitioner<K2,V2>
|
||||
implements Partitioner<ImmutableBytesWritable, V2> {
|
||||
|
@ -57,9 +60,8 @@ implements Partitioner<ImmutableBytesWritable, V2> {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPartition(ImmutableBytesWritable key, V2 value,
|
||||
int numPartitions) {
|
||||
public int getPartition(ImmutableBytesWritable key,
|
||||
@SuppressWarnings("unused") V2 value, int numPartitions) {
|
||||
byte[] region = null;
|
||||
// Only one region return 0
|
||||
if (this.startKeys.length == 1){
|
||||
|
@ -78,9 +80,8 @@ implements Partitioner<ImmutableBytesWritable, V2> {
|
|||
// cover if we have less reduces then regions.
|
||||
return (Integer.toString(i).hashCode()
|
||||
& Integer.MAX_VALUE) % numPartitions;
|
||||
} else {
|
||||
return i;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
}
|
||||
// if above fails to find start key that match we need to return something
|
||||
|
|
|
@ -1561,7 +1561,6 @@ public class HRegionServer implements HConstants, HRegionInterface, Runnable {
|
|||
region.deleteAll(row, timestamp, getLockFromId(lockId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAllByRegex(byte[] regionName, byte[] row, String colRegex,
|
||||
long timestamp, long lockId) throws IOException {
|
||||
getRegion(regionName).deleteAllByRegex(row, colRegex, timestamp,
|
||||
|
@ -1575,7 +1574,6 @@ public class HRegionServer implements HConstants, HRegionInterface, Runnable {
|
|||
getLockFromId(lockId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteFamilyByRegex(byte[] regionName, byte[] row, String familyRegex,
|
||||
long timestamp, long lockId) throws IOException {
|
||||
getRegion(regionName).deleteFamilyByRegex(row, familyRegex, timestamp,
|
||||
|
@ -1922,7 +1920,7 @@ public class HRegionServer implements HConstants, HRegionInterface, Runnable {
|
|||
}
|
||||
|
||||
public long getProtocolVersion(final String protocol,
|
||||
final long clientVersion)
|
||||
@SuppressWarnings("unused") final long clientVersion)
|
||||
throws IOException {
|
||||
if (protocol.equals(HRegionInterface.class.getName())) {
|
||||
return HBaseRPCProtocolVersion.versionID;
|
||||
|
|
Loading…
Reference in New Issue