From 5998a179b45f76378ad9ef0721f9ace203505ff2 Mon Sep 17 00:00:00 2001
From: Suresh Srinivas o
is an EnumSetWritable with the same value,
* or both are null.
*/
+ @Override
public boolean equals(Object o) {
if (o == null) {
throw new IllegalArgumentException("null argument passed in equal().");
@@ -180,27 +183,25 @@ public class EnumSetWritableo
is a LongWritable with the same value. */
+ @Override
public boolean equals(Object o) {
if (!(o instanceof LongWritable))
return false;
@@ -58,17 +61,20 @@ public class LongWritable implements WritableComparableo
is an MD5Hash whose digest contains the
* same values. */
+ @Override
public boolean equals(Object o) {
if (!(o instanceof MD5Hash))
return false;
@@ -165,12 +169,14 @@ public class MD5Hash implements WritableComparableo
is a Text with the same contents. */
+ @Override
public boolean equals(Object o) {
if (o instanceof Text)
return super.equals(o);
@@ -346,6 +353,7 @@ public class Text extends BinaryComparable
super(Text.class);
}
+ @Override
public int compare(byte[] b1, int s1, int l1,
byte[] b2, int s2, int l2) {
int n1 = WritableUtils.decodeVIntSize(b1[s1]);
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/TwoDArrayWritable.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/TwoDArrayWritable.java
index 76304623eef..cf8947d32d0 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/TwoDArrayWritable.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/TwoDArrayWritable.java
@@ -57,6 +57,7 @@ public class TwoDArrayWritable implements Writable {
public Writable[][] get() { return values; }
+ @Override
public void readFields(DataInput in) throws IOException {
// construct matrix
values = new Writable[in.readInt()][];
@@ -81,6 +82,7 @@ public class TwoDArrayWritable implements Writable {
}
}
+ @Override
public void write(DataOutput out) throws IOException {
out.writeInt(values.length); // write values
for (int i = 0; i < values.length; i++) {
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/UTF8.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/UTF8.java
index 6a0f88673fe..ef7512996c7 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/UTF8.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/UTF8.java
@@ -110,6 +110,7 @@ public class UTF8 implements WritableComparable
close
is not allowed and may lead to undetermined results.
*/
+ @Override
public void close() throws IOException {
if (closed == true) {
return;
@@ -447,6 +448,7 @@ final class BCFile {
this.compressAlgo = compressAlgo;
}
+ @Override
public void register(long raw, long begin, long end) {
metaIndex.addEntry(new MetaIndexEntry(name, compressAlgo,
new BlockRegion(begin, end - begin, raw)));
@@ -463,6 +465,7 @@ final class BCFile {
// do nothing
}
+ @Override
public void register(long raw, long begin, long end) {
dataIndex.addBlockRegion(new BlockRegion(begin, end - begin, raw));
}
@@ -671,6 +674,7 @@ final class BCFile {
/**
* Finishing reading the BCFile. Release all resources.
*/
+ @Override
public void close() {
// nothing to be done now
}
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/CompareUtils.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/CompareUtils.java
index a9cb1ec1c3d..0808711f89a 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/CompareUtils.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/CompareUtils.java
@@ -68,6 +68,7 @@ class CompareUtils {
magnitude = m;
}
+ @Override
public long magnitude() {
return magnitude;
}
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/TFile.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/TFile.java
index 0b9ed9d2b39..9a57581c90c 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/TFile.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/TFile.java
@@ -297,6 +297,7 @@ public class TFile {
*
* The underlying FSDataOutputStream is not closed.
*/
+ @Override
public void close() throws IOException {
if ((state == State.CLOSED)) {
return;
@@ -820,6 +821,7 @@ public class TFile {
* Close the reader. The state of the Reader object is undefined after
* close. Calling close() for multiple times has no effect.
*/
+ @Override
public void close() throws IOException {
readerBCF.close();
}
@@ -1573,6 +1575,7 @@ public class TFile {
* scanner after calling close is not defined. The entry returned by the
* previous entry() call will be invalid.
*/
+ @Override
public void close() throws IOException {
parkCursorAtEnd();
}
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/nativeio/NativeIO.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/nativeio/NativeIO.java
index 2a7f883d957..4cfa0761edc 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/nativeio/NativeIO.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/nativeio/NativeIO.java
@@ -202,6 +202,7 @@ public class NativeIO {
this.mode = mode;
}
+ @Override
public String toString() {
return "Stat(owner='" + owner + "', group='" + group + "'" +
", mode=" + mode + ")";
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/nativeio/NativeIOException.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/nativeio/NativeIOException.java
index 5064df5d861..db653b23f42 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/nativeio/NativeIOException.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/nativeio/NativeIOException.java
@@ -38,6 +38,7 @@ public class NativeIOException extends IOException {
return errno;
}
+ @Override
public String toString() {
return errno.toString() + ": " + super.getMessage();
}
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/RetryPolicies.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/RetryPolicies.java
index 8b8387ce2ce..5c29a33312d 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/RetryPolicies.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/RetryPolicies.java
@@ -150,6 +150,7 @@ public class RetryPolicies {
}
static class TryOnceThenFail implements RetryPolicy {
+ @Override
public RetryAction shouldRetry(Exception e, int retries, int failovers,
boolean isMethodIdempotent) throws Exception {
return RetryAction.FAIL;
@@ -157,6 +158,7 @@ public class RetryPolicies {
}
static class RetryForever implements RetryPolicy {
+ @Override
public RetryAction shouldRetry(Exception e, int retries, int failovers,
boolean isMethodIdempotent) throws Exception {
return RetryAction.RETRY;
@@ -430,6 +432,7 @@ public class RetryPolicies {
this.exceptionToPolicyMap = exceptionToPolicyMap;
}
+ @Override
public RetryAction shouldRetry(Exception e, int retries, int failovers,
boolean isMethodIdempotent) throws Exception {
RetryPolicy policy = exceptionToPolicyMap.get(e.getClass());
@@ -457,6 +460,7 @@ public class RetryPolicies {
}
}
+ @Override
public RetryAction shouldRetry(Exception e, int retries, int failovers,
boolean isMethodIdempotent) throws Exception {
RetryPolicy policy = null;
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/serializer/DeserializerComparator.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/serializer/DeserializerComparator.java
index 7e74cb77322..05205c5523c 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/serializer/DeserializerComparator.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/serializer/DeserializerComparator.java
@@ -56,6 +56,7 @@ public abstract class DeserializerComparator
@@ -45,6 +42,7 @@ public class JavaSerialization implements Serialization