You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by su...@apache.org on 2012/08/25 03:03:34 UTC
svn commit: r1377168 [6/7] - in /hadoop/common/trunk/hadoop-common-project:
hadoop-annotations/src/main/java/org/apache/hadoop/classification/tools/
hadoop-common/src/main/java/org/apache/hadoop/conf/
hadoop-common/src/main/java/org/apache/hadoop/fs/ h...
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFcLocalFsUtil.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFcLocalFsUtil.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFcLocalFsUtil.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFcLocalFsUtil.java Sat Aug 25 01:03:22 2012
@@ -25,6 +25,7 @@ import org.junit.Before;
public class TestFcLocalFsUtil extends
FileContextUtilBase {
+ @Override
@Before
public void setUp() throws Exception {
fc = FileContext.getLocalFSFileContext();
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileSystemCaching.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileSystemCaching.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileSystemCaching.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileSystemCaching.java Sat Aug 25 01:03:22 2012
@@ -110,6 +110,7 @@ public class TestFileSystemCaching {
public static class InitializeForeverFileSystem extends LocalFileSystem {
final static Semaphore sem = new Semaphore(0);
+ @Override
public void initialize(URI uri, Configuration conf) throws IOException {
// notify that InitializeForeverFileSystem started initialization
sem.release();
@@ -127,6 +128,7 @@ public class TestFileSystemCaching {
public void testCacheEnabledWithInitializeForeverFS() throws Exception {
final Configuration conf = new Configuration();
Thread t = new Thread() {
+ @Override
public void run() {
conf.set("fs.localfs1.impl", "org.apache.hadoop.fs." +
"TestFileSystemCaching$InitializeForeverFileSystem");
@@ -167,11 +169,13 @@ public class TestFileSystemCaching {
UserGroupInformation ugiA = UserGroupInformation.createRemoteUser("foo");
UserGroupInformation ugiB = UserGroupInformation.createRemoteUser("bar");
FileSystem fsA = ugiA.doAs(new PrivilegedExceptionAction<FileSystem>() {
+ @Override
public FileSystem run() throws Exception {
return FileSystem.get(new URI("cachedfile://a"), conf);
}
});
FileSystem fsA1 = ugiA.doAs(new PrivilegedExceptionAction<FileSystem>() {
+ @Override
public FileSystem run() throws Exception {
return FileSystem.get(new URI("cachedfile://a"), conf);
}
@@ -180,6 +184,7 @@ public class TestFileSystemCaching {
assertSame(fsA, fsA1);
FileSystem fsB = ugiB.doAs(new PrivilegedExceptionAction<FileSystem>() {
+ @Override
public FileSystem run() throws Exception {
return FileSystem.get(new URI("cachedfile://a"), conf);
}
@@ -192,6 +197,7 @@ public class TestFileSystemCaching {
UserGroupInformation ugiA2 = UserGroupInformation.createRemoteUser("foo");
fsA = ugiA2.doAs(new PrivilegedExceptionAction<FileSystem>() {
+ @Override
public FileSystem run() throws Exception {
return FileSystem.get(new URI("cachedfile://a"), conf);
}
@@ -203,6 +209,7 @@ public class TestFileSystemCaching {
ugiA.addToken(t1);
fsA = ugiA.doAs(new PrivilegedExceptionAction<FileSystem>() {
+ @Override
public FileSystem run() throws Exception {
return FileSystem.get(new URI("cachedfile://a"), conf);
}
@@ -245,12 +252,14 @@ public class TestFileSystemCaching {
conf.set("fs.cachedfile.impl", FileSystem.getFileSystemClass("file", null).getName());
UserGroupInformation ugiA = UserGroupInformation.createRemoteUser("foo");
FileSystem fsA = ugiA.doAs(new PrivilegedExceptionAction<FileSystem>() {
+ @Override
public FileSystem run() throws Exception {
return FileSystem.get(new URI("cachedfile://a"), conf);
}
});
//Now we should get the cached filesystem
FileSystem fsA1 = ugiA.doAs(new PrivilegedExceptionAction<FileSystem>() {
+ @Override
public FileSystem run() throws Exception {
return FileSystem.get(new URI("cachedfile://a"), conf);
}
@@ -261,6 +270,7 @@ public class TestFileSystemCaching {
//Now we should get a different (newly created) filesystem
fsA1 = ugiA.doAs(new PrivilegedExceptionAction<FileSystem>() {
+ @Override
public FileSystem run() throws Exception {
return FileSystem.get(new URI("cachedfile://a"), conf);
}
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsOptions.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsOptions.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsOptions.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsOptions.java Sat Aug 25 01:03:22 2012
@@ -19,8 +19,6 @@ package org.apache.hadoop.fs;
import static org.junit.Assert.*;
-import java.io.IOException;
-
import org.apache.hadoop.fs.Options.ChecksumOpt;
import org.apache.hadoop.util.DataChecksum;
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellReturnCode.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellReturnCode.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellReturnCode.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellReturnCode.java Sat Aug 25 01:03:22 2012
@@ -411,6 +411,7 @@ public class TestFsShellReturnCode {
}
static class MyFsShell extends FsShell {
+ @Override
protected void registerCommands(CommandFactory factory) {
factory.addClass(InterruptCommand.class, "-testInterrupt");
}
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestListFiles.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestListFiles.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestListFiles.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestListFiles.java Sat Aug 25 01:03:22 2012
@@ -18,7 +18,6 @@
package org.apache.hadoop.fs;
import java.io.IOException;
-import java.util.Iterator;
import java.util.HashSet;
import java.util.Random;
import java.util.Set;
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalFSFileContextCreateMkdir.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalFSFileContextCreateMkdir.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalFSFileContextCreateMkdir.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalFSFileContextCreateMkdir.java Sat Aug 25 01:03:22 2012
@@ -23,6 +23,7 @@ import org.junit.Before;
public class TestLocalFSFileContextCreateMkdir extends
FileContextCreateMkdirBaseTest {
+ @Override
@Before
public void setUp() throws Exception {
fc = FileContext.getLocalFSFileContext();
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalFSFileContextMainOperations.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalFSFileContextMainOperations.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalFSFileContextMainOperations.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalFSFileContextMainOperations.java Sat Aug 25 01:03:22 2012
@@ -27,6 +27,7 @@ import org.junit.Test;
public class TestLocalFSFileContextMainOperations extends FileContextMainOperationsBaseTest {
+ @Override
@Before
public void setUp() throws Exception {
fc = FileContext.getLocalFSFileContext();
@@ -34,6 +35,7 @@ public class TestLocalFSFileContextMainO
}
static Path wd = null;
+ @Override
protected Path getDefaultWorkingDirectory() throws IOException {
if (wd == null)
wd = FileSystem.getLocal(new Configuration()).getWorkingDirectory();
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalFSFileContextSymlink.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalFSFileContextSymlink.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalFSFileContextSymlink.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalFSFileContextSymlink.java Sat Aug 25 01:03:22 2012
@@ -35,18 +35,22 @@ import org.junit.Before;
*/
public class TestLocalFSFileContextSymlink extends FileContextSymlinkBaseTest {
+ @Override
protected String getScheme() {
return "file";
}
+ @Override
protected String testBaseDir1() throws IOException {
return getAbsoluteTestRootDir(fc)+"/test1";
}
+ @Override
protected String testBaseDir2() throws IOException {
return getAbsoluteTestRootDir(fc)+"/test2";
}
+ @Override
protected URI testURI() {
try {
return new URI("file:///");
@@ -55,6 +59,7 @@ public class TestLocalFSFileContextSymli
}
}
+ @Override
@Before
public void setUp() throws Exception {
fc = FileContext.getLocalFSFileContext();
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalFsFCStatistics.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalFsFCStatistics.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalFsFCStatistics.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalFsFCStatistics.java Sat Aug 25 01:03:22 2012
@@ -47,15 +47,18 @@ public class TestLocalFsFCStatistics ext
fc.delete(getTestRootPath(fc, "test"), true);
}
+ @Override
protected void verifyReadBytes(Statistics stats) {
Assert.assertEquals(blockSize, stats.getBytesRead());
}
+ @Override
protected void verifyWrittenBytes(Statistics stats) {
//Extra 12 bytes are written apart from the block.
Assert.assertEquals(blockSize + 12, stats.getBytesWritten());
}
+ @Override
protected URI getFsUri() {
return URI.create(LOCAL_FS_ROOT_URI);
}
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocal_S3FileContextURI.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocal_S3FileContextURI.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocal_S3FileContextURI.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocal_S3FileContextURI.java Sat Aug 25 01:03:22 2012
@@ -24,6 +24,7 @@ import org.junit.Before;
public class TestLocal_S3FileContextURI extends FileContextURIBase {
+ @Override
@Before
public void setUp() throws Exception {
Configuration S3Conf = new Configuration();
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestS3_LocalFileContextURI.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestS3_LocalFileContextURI.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestS3_LocalFileContextURI.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestS3_LocalFileContextURI.java Sat Aug 25 01:03:22 2012
@@ -24,6 +24,7 @@ import org.junit.Before;
public class TestS3_LocalFileContextURI extends FileContextURIBase {
+ @Override
@Before
public void setUp() throws Exception {
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java Sat Aug 25 01:03:22 2012
@@ -67,6 +67,7 @@ public class TestTrash extends TestCase
// filter that matches all the files that start with fileName*
PathFilter pf = new PathFilter() {
+ @Override
public boolean accept(Path file) {
return file.getName().startsWith(prefix);
}
@@ -563,6 +564,7 @@ public class TestTrash extends TestCase
super();
this.home = home;
}
+ @Override
public Path getHomeDirectory() {
return home;
}
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/kfs/KFSEmulationImpl.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/kfs/KFSEmulationImpl.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/kfs/KFSEmulationImpl.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/kfs/KFSEmulationImpl.java Sat Aug 25 01:03:22 2012
@@ -39,16 +39,20 @@ public class KFSEmulationImpl implements
localFS = FileSystem.getLocal(conf);
}
+ @Override
public boolean exists(String path) throws IOException {
return localFS.exists(new Path(path));
}
+ @Override
public boolean isDirectory(String path) throws IOException {
return localFS.isDirectory(new Path(path));
}
+ @Override
public boolean isFile(String path) throws IOException {
return localFS.isFile(new Path(path));
}
+ @Override
public String[] readdir(String path) throws IOException {
FileStatus[] p = localFS.listStatus(new Path(path));
try {
@@ -64,10 +68,12 @@ public class KFSEmulationImpl implements
return entries;
}
+ @Override
public FileStatus[] readdirplus(Path path) throws IOException {
return localFS.listStatus(path);
}
+ @Override
public int mkdirs(String path) throws IOException {
if (localFS.mkdirs(new Path(path)))
return 0;
@@ -75,12 +81,14 @@ public class KFSEmulationImpl implements
return -1;
}
+ @Override
public int rename(String source, String dest) throws IOException {
if (localFS.rename(new Path(source), new Path(dest)))
return 0;
return -1;
}
+ @Override
public int rmdir(String path) throws IOException {
if (isDirectory(path)) {
// the directory better be empty
@@ -91,21 +99,26 @@ public class KFSEmulationImpl implements
return -1;
}
+ @Override
public int remove(String path) throws IOException {
if (isFile(path) && (localFS.delete(new Path(path), true)))
return 0;
return -1;
}
+ @Override
public long filesize(String path) throws IOException {
return localFS.getFileStatus(new Path(path)).getLen();
}
+ @Override
public short getReplication(String path) throws IOException {
return 1;
}
+ @Override
public short setReplication(String path, short replication) throws IOException {
return 1;
}
+ @Override
public String[][] getDataLocation(String path, long start, long len) throws IOException {
BlockLocation[] blkLocations =
localFS.getFileBlockLocations(localFS.getFileStatus(new Path(path)),
@@ -123,6 +136,7 @@ public class KFSEmulationImpl implements
return hints;
}
+ @Override
public long getModificationTime(String path) throws IOException {
FileStatus s = localFS.getFileStatus(new Path(path));
if (s == null)
@@ -131,18 +145,21 @@ public class KFSEmulationImpl implements
return s.getModificationTime();
}
+ @Override
public FSDataOutputStream append(String path, int bufferSize, Progressable progress) throws IOException {
// besides path/overwrite, the other args don't matter for
// testing purposes.
return localFS.append(new Path(path));
}
+ @Override
public FSDataOutputStream create(String path, short replication, int bufferSize, Progressable progress) throws IOException {
// besides path/overwrite, the other args don't matter for
// testing purposes.
return localFS.create(new Path(path));
}
+ @Override
public FSDataInputStream open(String path, int bufferSize) throws IOException {
return localFS.open(new Path(path));
}
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/kfs/TestKosmosFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/kfs/TestKosmosFileSystem.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/kfs/TestKosmosFileSystem.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/kfs/TestKosmosFileSystem.java Sat Aug 25 01:03:22 2012
@@ -18,21 +18,17 @@
package org.apache.hadoop.fs.kfs;
-import java.io.*;
-import java.net.*;
+import java.io.IOException;
+import java.net.URI;
import junit.framework.TestCase;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FSDataInputStream;
import org.apache.hadoop.fs.FSDataOutputStream;
-import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.FileStatus;
-import org.apache.hadoop.fs.FileUtil;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.fs.kfs.KosmosFileSystem;
-
public class TestKosmosFileSystem extends TestCase {
KosmosFileSystem kosmosFileSystem;
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/loadGenerator/DataGenerator.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/loadGenerator/DataGenerator.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/loadGenerator/DataGenerator.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/loadGenerator/DataGenerator.java Sat Aug 25 01:03:22 2012
@@ -67,6 +67,7 @@ public class DataGenerator extends Confi
* namespace. Afterwards it reads the file attributes and creates files
* in the file. All file content is filled with 'a'.
*/
+ @Override
public int run(String[] args) throws Exception {
int exitCode = 0;
exitCode = init(args);
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/loadGenerator/LoadGenerator.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/loadGenerator/LoadGenerator.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/loadGenerator/LoadGenerator.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/loadGenerator/LoadGenerator.java Sat Aug 25 01:03:22 2012
@@ -186,6 +186,7 @@ public class LoadGenerator extends Confi
/** Main loop
* Each iteration decides what's the next operation and then pauses.
*/
+ @Override
public void run() {
try {
while (shouldRun) {
@@ -281,6 +282,7 @@ public class LoadGenerator extends Confi
* Before exiting, it prints the average execution for
* each operation and operation throughput.
*/
+ @Override
public int run(String[] args) throws Exception {
int exitCode = init(args);
if (exitCode != 0) {
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/loadGenerator/StructureGenerator.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/loadGenerator/StructureGenerator.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/loadGenerator/StructureGenerator.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/loadGenerator/StructureGenerator.java Sat Aug 25 01:03:22 2012
@@ -214,6 +214,7 @@ public class StructureGenerator {
}
/** Output a file attribute */
+ @Override
protected void outputFiles(PrintStream out, String prefix) {
prefix = (prefix == null)?super.name: prefix + "/"+super.name;
out.println(prefix + " " + numOfBlocks);
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/s3/InMemoryFileSystemStore.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/s3/InMemoryFileSystemStore.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/s3/InMemoryFileSystemStore.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/s3/InMemoryFileSystemStore.java Sat Aug 25 01:03:22 2012
@@ -47,34 +47,42 @@ class InMemoryFileSystemStore implements
private SortedMap<Path, INode> inodes = new TreeMap<Path, INode>();
private Map<Long, byte[]> blocks = new HashMap<Long, byte[]>();
+ @Override
public void initialize(URI uri, Configuration conf) {
this.conf = conf;
}
+ @Override
public String getVersion() throws IOException {
return "0";
}
+ @Override
public void deleteINode(Path path) throws IOException {
inodes.remove(normalize(path));
}
+ @Override
public void deleteBlock(Block block) throws IOException {
blocks.remove(block.getId());
}
+ @Override
public boolean inodeExists(Path path) throws IOException {
return inodes.containsKey(normalize(path));
}
+ @Override
public boolean blockExists(long blockId) throws IOException {
return blocks.containsKey(blockId);
}
+ @Override
public INode retrieveINode(Path path) throws IOException {
return inodes.get(normalize(path));
}
+ @Override
public File retrieveBlock(Block block, long byteRangeStart) throws IOException {
byte[] data = blocks.get(block.getId());
File file = createTempFile();
@@ -100,6 +108,7 @@ class InMemoryFileSystemStore implements
return result;
}
+ @Override
public Set<Path> listSubPaths(Path path) throws IOException {
Path normalizedPath = normalize(path);
// This is inefficient but more than adequate for testing purposes.
@@ -112,6 +121,7 @@ class InMemoryFileSystemStore implements
return subPaths;
}
+ @Override
public Set<Path> listDeepSubPaths(Path path) throws IOException {
Path normalizedPath = normalize(path);
String pathString = normalizedPath.toUri().getPath();
@@ -128,10 +138,12 @@ class InMemoryFileSystemStore implements
return subPaths;
}
+ @Override
public void storeINode(Path path, INode inode) throws IOException {
inodes.put(normalize(path), inode);
}
+ @Override
public void storeBlock(Block block, File file) throws IOException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
byte[] buf = new byte[8192];
@@ -157,11 +169,13 @@ class InMemoryFileSystemStore implements
return new Path(path.toUri().getPath());
}
+ @Override
public void purge() throws IOException {
inodes.clear();
blocks.clear();
}
+ @Override
public void dump() throws IOException {
StringBuilder sb = new StringBuilder(getClass().getSimpleName());
sb.append(", \n");
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/s3native/InMemoryNativeFileSystemStore.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/s3native/InMemoryNativeFileSystemStore.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/s3native/InMemoryNativeFileSystemStore.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/s3native/InMemoryNativeFileSystemStore.java Sat Aug 25 01:03:22 2012
@@ -55,15 +55,18 @@ class InMemoryNativeFileSystemStore impl
new TreeMap<String, FileMetadata>();
private SortedMap<String, byte[]> dataMap = new TreeMap<String, byte[]>();
+ @Override
public void initialize(URI uri, Configuration conf) throws IOException {
this.conf = conf;
}
+ @Override
public void storeEmptyFile(String key) throws IOException {
metadataMap.put(key, new FileMetadata(key, 0, Time.now()));
dataMap.put(key, new byte[0]);
}
+ @Override
public void storeFile(String key, File file, byte[] md5Hash)
throws IOException {
@@ -86,10 +89,12 @@ class InMemoryNativeFileSystemStore impl
dataMap.put(key, out.toByteArray());
}
+ @Override
public InputStream retrieve(String key) throws IOException {
return retrieve(key, 0);
}
+ @Override
public InputStream retrieve(String key, long byteRangeStart)
throws IOException {
@@ -118,15 +123,18 @@ class InMemoryNativeFileSystemStore impl
return result;
}
+ @Override
public FileMetadata retrieveMetadata(String key) throws IOException {
return metadataMap.get(key);
}
+ @Override
public PartialListing list(String prefix, int maxListingLength)
throws IOException {
return list(prefix, maxListingLength, null, false);
}
+ @Override
public PartialListing list(String prefix, int maxListingLength,
String priorLastKey, boolean recursive) throws IOException {
@@ -165,16 +173,19 @@ class InMemoryNativeFileSystemStore impl
commonPrefixes.toArray(new String[0]));
}
+ @Override
public void delete(String key) throws IOException {
metadataMap.remove(key);
dataMap.remove(key);
}
+ @Override
public void copy(String srcKey, String dstKey) throws IOException {
metadataMap.put(dstKey, metadataMap.get(srcKey));
dataMap.put(dstKey, dataMap.get(srcKey));
}
+ @Override
public void purge(String prefix) throws IOException {
Iterator<Entry<String, FileMetadata>> i =
metadataMap.entrySet().iterator();
@@ -187,6 +198,7 @@ class InMemoryNativeFileSystemStore impl
}
}
+ @Override
public void dump() throws IOException {
System.out.println(metadataMap.values());
System.out.println(dataMap.keySet());
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestChRootedFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestChRootedFileSystem.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestChRootedFileSystem.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestChRootedFileSystem.java Sat Aug 25 01:03:22 2012
@@ -347,6 +347,7 @@ public class TestChRootedFileSystem {
MockFileSystem() {
super(mock(FileSystem.class));
}
+ @Override
public void initialize(URI name, Configuration conf) throws IOException {}
}
}
\ No newline at end of file
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestFSMainOperationsLocalFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestFSMainOperationsLocalFileSystem.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestFSMainOperationsLocalFileSystem.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestFSMainOperationsLocalFileSystem.java Sat Aug 25 01:03:22 2012
@@ -33,6 +33,7 @@ import org.junit.Test;
public class TestFSMainOperationsLocalFileSystem extends FSMainOperationsBaseTest {
static FileSystem fcTarget;
+ @Override
@Before
public void setUp() throws Exception {
Configuration conf = new Configuration();
@@ -42,6 +43,7 @@ public class TestFSMainOperationsLocalFi
super.setUp();
}
+ @Override
@After
public void tearDown() throws Exception {
super.tearDown();
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestFcCreateMkdirLocalFs.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestFcCreateMkdirLocalFs.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestFcCreateMkdirLocalFs.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestFcCreateMkdirLocalFs.java Sat Aug 25 01:03:22 2012
@@ -28,12 +28,14 @@ public class TestFcCreateMkdirLocalFs e
FileContextCreateMkdirBaseTest {
+ @Override
@Before
public void setUp() throws Exception {
fc = ViewFsTestSetup.setupForViewFsLocalFs();
super.setUp();
}
+ @Override
@After
public void tearDown() throws Exception {
super.tearDown();
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestFcMainOperationsLocalFs.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestFcMainOperationsLocalFs.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestFcMainOperationsLocalFs.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestFcMainOperationsLocalFs.java Sat Aug 25 01:03:22 2012
@@ -36,6 +36,7 @@ public class TestFcMainOperationsLocalFs
FileContext fclocal;
Path targetOfTests;
+ @Override
@Before
public void setUp() throws Exception {
/**
@@ -79,6 +80,7 @@ public class TestFcMainOperationsLocalFs
super.setUp();
}
+ @Override
@After
public void tearDown() throws Exception {
super.tearDown();
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestFcPermissionsLocalFs.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestFcPermissionsLocalFs.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestFcPermissionsLocalFs.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestFcPermissionsLocalFs.java Sat Aug 25 01:03:22 2012
@@ -27,12 +27,14 @@ import org.junit.Before;
public class TestFcPermissionsLocalFs extends FileContextPermissionBase {
+ @Override
@Before
public void setUp() throws Exception {
fc = ViewFsTestSetup.setupForViewFsLocalFs();
super.setUp();
}
+ @Override
@After
public void tearDown() throws Exception {
super.tearDown();
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemDelegationTokenSupport.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemDelegationTokenSupport.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemDelegationTokenSupport.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemDelegationTokenSupport.java Sat Aug 25 01:03:22 2012
@@ -160,6 +160,7 @@ public class TestViewFileSystemDelegatio
static class FakeFileSystem extends RawLocalFileSystem {
URI uri;
+ @Override
public void initialize(URI name, Configuration conf) throws IOException {
this.uri = name;
}
@@ -169,6 +170,7 @@ public class TestViewFileSystemDelegatio
return new Path("/"); // ctor calls getUri before the uri is inited...
}
+ @Override
public URI getUri() {
return uri;
}
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemLocalFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemLocalFileSystem.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemLocalFileSystem.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemLocalFileSystem.java Sat Aug 25 01:03:22 2012
@@ -39,6 +39,7 @@ import org.junit.Before;
public class TestViewFileSystemLocalFileSystem extends ViewFileSystemBaseTest {
+ @Override
@Before
public void setUp() throws Exception {
// create the test root on local_fs
@@ -47,6 +48,7 @@ public class TestViewFileSystemLocalFile
}
+ @Override
@After
public void tearDown() throws Exception {
fsTarget.delete(FileSystemTestHelper.getTestRootPath(fsTarget), true);
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemWithAuthorityLocalFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemWithAuthorityLocalFileSystem.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemWithAuthorityLocalFileSystem.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemWithAuthorityLocalFileSystem.java Sat Aug 25 01:03:22 2012
@@ -42,6 +42,7 @@ import org.junit.Test;
public class TestViewFileSystemWithAuthorityLocalFileSystem extends ViewFileSystemBaseTest {
URI schemeWithAuthority;
+ @Override
@Before
public void setUp() throws Exception {
// create the test root on local_fs
@@ -55,12 +56,14 @@ public class TestViewFileSystemWithAutho
fsView = FileSystem.get(schemeWithAuthority, conf);
}
+ @Override
@After
public void tearDown() throws Exception {
fsTarget.delete(FileSystemTestHelper.getTestRootPath(fsTarget), true);
super.tearDown();
}
+ @Override
@Test
public void testBasicPaths() {
Assert.assertEquals(schemeWithAuthority,
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsLocalFs.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsLocalFs.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsLocalFs.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsLocalFs.java Sat Aug 25 01:03:22 2012
@@ -26,6 +26,7 @@ import org.junit.Before;
public class TestViewFsLocalFs extends ViewFsBaseTest {
+ @Override
@Before
public void setUp() throws Exception {
// create the test root on local_fs
@@ -34,6 +35,7 @@ public class TestViewFsLocalFs extends V
}
+ @Override
@After
public void tearDown() throws Exception {
super.tearDown();
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsTrash.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsTrash.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsTrash.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsTrash.java Sat Aug 25 01:03:22 2012
@@ -30,7 +30,6 @@ import org.apache.hadoop.fs.TestTrash;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import org.mortbay.log.Log;
public class TestViewFsTrash {
FileSystem fsTarget; // the target file system - the mount will point here
@@ -46,6 +45,7 @@ public class TestViewFsTrash {
super();
this.home = home;
}
+ @Override
public Path getHomeDirectory() {
return home;
}
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsWithAuthorityLocalFs.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsWithAuthorityLocalFs.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsWithAuthorityLocalFs.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsWithAuthorityLocalFs.java Sat Aug 25 01:03:22 2012
@@ -41,6 +41,7 @@ import org.junit.Test;
public class TestViewFsWithAuthorityLocalFs extends ViewFsBaseTest {
URI schemeWithAuthority;
+ @Override
@Before
public void setUp() throws Exception {
// create the test root on local_fs
@@ -54,11 +55,13 @@ public class TestViewFsWithAuthorityLoca
fcView = FileContext.getFileContext(schemeWithAuthority, conf);
}
+ @Override
@After
public void tearDown() throws Exception {
super.tearDown();
}
+ @Override
@Test
public void testBasicPaths() {
Assert.assertEquals(schemeWithAuthority,
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewfsFileStatus.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewfsFileStatus.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewfsFileStatus.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewfsFileStatus.java Sat Aug 25 01:03:22 2012
@@ -23,7 +23,6 @@ import java.io.IOException;
import java.net.URISyntaxException;
import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.FileChecksum;
import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.FileUtil;
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ha/ClientBaseWithFixes.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ha/ClientBaseWithFixes.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ha/ClientBaseWithFixes.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ha/ClientBaseWithFixes.java Sat Aug 25 01:03:22 2012
@@ -25,7 +25,6 @@ import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.Socket;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.CountDownLatch;
@@ -82,6 +81,7 @@ public abstract class ClientBaseWithFixe
*
*/
protected class NullWatcher implements Watcher {
+ @Override
public void process(WatchedEvent event) { /* nada */ }
}
@@ -97,6 +97,7 @@ public abstract class ClientBaseWithFixe
clientConnected = new CountDownLatch(1);
connected = false;
}
+ @Override
synchronized public void process(WatchedEvent event) {
if (event.getState() == KeeperState.SyncConnected ||
event.getState() == KeeperState.ConnectedReadOnly) {
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ha/DummyHAService.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ha/DummyHAService.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ha/DummyHAService.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ha/DummyHAService.java Sat Aug 25 01:03:22 2012
@@ -184,6 +184,7 @@ class DummyHAService extends HAServiceTa
}
public static class DummyFencer implements FenceMethod {
+ @Override
public void checkArgs(String args) throws BadFencingConfigurationException {
}
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestGlobalFilter.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestGlobalFilter.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestGlobalFilter.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestGlobalFilter.java Sat Aug 25 01:03:22 2012
@@ -46,14 +46,17 @@ public class TestGlobalFilter extends Ht
static public class RecordingFilter implements Filter {
private FilterConfig filterConfig = null;
+ @Override
public void init(FilterConfig filterConfig) {
this.filterConfig = filterConfig;
}
+ @Override
public void destroy() {
this.filterConfig = null;
}
+ @Override
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
if (filterConfig == null)
@@ -69,6 +72,7 @@ public class TestGlobalFilter extends Ht
static public class Initializer extends FilterInitializer {
public Initializer() {}
+ @Override
public void initFilter(FilterContainer container, Configuration conf) {
container.addGlobalFilter("recording", RecordingFilter.class.getName(), null);
}
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestPathFilter.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestPathFilter.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestPathFilter.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestPathFilter.java Sat Aug 25 01:03:22 2012
@@ -46,14 +46,17 @@ public class TestPathFilter extends Http
static public class RecordingFilter implements Filter {
private FilterConfig filterConfig = null;
+ @Override
public void init(FilterConfig filterConfig) {
this.filterConfig = filterConfig;
}
+ @Override
public void destroy() {
this.filterConfig = null;
}
+ @Override
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
if (filterConfig == null)
@@ -69,6 +72,7 @@ public class TestPathFilter extends Http
static public class Initializer extends FilterInitializer {
public Initializer() {}
+ @Override
public void initFilter(FilterContainer container, Configuration conf) {
container.addFilter("recording", RecordingFilter.class.getName(), null);
}
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestServletFilter.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestServletFilter.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestServletFilter.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestServletFilter.java Sat Aug 25 01:03:22 2012
@@ -45,14 +45,17 @@ public class TestServletFilter extends H
static public class SimpleFilter implements Filter {
private FilterConfig filterConfig = null;
+ @Override
public void init(FilterConfig filterConfig) throws ServletException {
this.filterConfig = filterConfig;
}
+ @Override
public void destroy() {
this.filterConfig = null;
}
+ @Override
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
if (filterConfig == null)
@@ -67,6 +70,7 @@ public class TestServletFilter extends H
static public class Initializer extends FilterInitializer {
public Initializer() {}
+ @Override
public void initFilter(FilterContainer container, Configuration conf) {
container.addFilter("simple", SimpleFilter.class.getName(), null);
}
@@ -149,6 +153,7 @@ public class TestServletFilter extends H
public Initializer() {
}
+ @Override
public void initFilter(FilterContainer container, Configuration conf) {
container.addFilter("simple", ErrorFilter.class.getName(), null);
}
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/AvroTestUtil.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/AvroTestUtil.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/AvroTestUtil.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/AvroTestUtil.java Sat Aug 25 01:03:22 2012
@@ -18,12 +18,10 @@
package org.apache.hadoop.io;
-import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.lang.reflect.Type;
import org.apache.avro.Schema;
-import org.apache.avro.io.BinaryEncoder;
import org.apache.avro.io.EncoderFactory;
import org.apache.avro.reflect.ReflectData;
import org.apache.avro.reflect.ReflectDatumWriter;
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/RandomDatum.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/RandomDatum.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/RandomDatum.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/RandomDatum.java Sat Aug 25 01:03:22 2012
@@ -40,11 +40,13 @@ public class RandomDatum implements Writ
return length;
}
+ @Override
public void write(DataOutput out) throws IOException {
out.writeInt(length);
out.write(data);
}
+ @Override
public void readFields(DataInput in) throws IOException {
length = in.readInt();
if (data == null || length > data.length)
@@ -102,6 +104,7 @@ public class RandomDatum implements Writ
super(RandomDatum.class);
}
+ @Override
public int compare(byte[] b1, int s1, int l1,
byte[] b2, int s2, int l2) {
int n1 = readInt(b1, s1);
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestEnumSetWritable.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestEnumSetWritable.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestEnumSetWritable.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestEnumSetWritable.java Sat Aug 25 01:03:22 2012
@@ -19,17 +19,9 @@
package org.apache.hadoop.io;
import java.io.IOException;
-import java.io.ByteArrayOutputStream;
import java.util.EnumSet;
import java.lang.reflect.Type;
-import org.apache.avro.Schema;
-import org.apache.avro.reflect.ReflectData;
-import org.apache.avro.reflect.ReflectDatumWriter;
-import org.apache.avro.reflect.ReflectDatumReader;
-import org.apache.avro.io.BinaryEncoder;
-import org.apache.avro.io.DecoderFactory;
-
import junit.framework.TestCase;
/** Unit test for EnumSetWritable */
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestGenericWritable.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestGenericWritable.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestGenericWritable.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestGenericWritable.java Sat Aug 25 01:03:22 2012
@@ -48,9 +48,11 @@ public class TestGenericWritable extends
/** Dummy class for testing {@link GenericWritable} */
public static class Foo implements Writable {
private String foo = "foo";
+ @Override
public void readFields(DataInput in) throws IOException {
foo = Text.readString(in);
}
+ @Override
public void write(DataOutput out) throws IOException {
Text.writeString(out, foo);
}
@@ -65,15 +67,19 @@ public class TestGenericWritable extends
public static class Bar implements Writable, Configurable {
private int bar = 42; //The Answer to The Ultimate Question Of Life, the Universe and Everything
private Configuration conf = null;
+ @Override
public void readFields(DataInput in) throws IOException {
bar = in.readInt();
}
+ @Override
public void write(DataOutput out) throws IOException {
out.writeInt(bar);
}
+ @Override
public Configuration getConf() {
return conf;
}
+ @Override
public void setConf(Configuration conf) {
this.conf = conf;
}
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestMD5Hash.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestMD5Hash.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestMD5Hash.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestMD5Hash.java Sat Aug 25 01:03:22 2012
@@ -91,6 +91,7 @@ public class TestMD5Hash extends TestCas
closeHash1.hashCode() != closeHash2.hashCode());
Thread t1 = new Thread() {
+ @Override
public void run() {
for (int i = 0; i < 100; i++) {
MD5Hash hash = new MD5Hash(DFF);
@@ -100,6 +101,7 @@ public class TestMD5Hash extends TestCas
};
Thread t2 = new Thread() {
+ @Override
public void run() {
for (int i = 0; i < 100; i++) {
MD5Hash hash = new MD5Hash(D00);
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestSecureIOUtils.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestSecureIOUtils.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestSecureIOUtils.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestSecureIOUtils.java Sat Aug 25 01:03:22 2012
@@ -21,17 +21,14 @@ import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.security.UserGroupInformation;
import org.apache.hadoop.io.nativeio.NativeIO;
import org.junit.BeforeClass;
-import org.junit.Before;
import org.junit.Test;
import static org.junit.Assume.*;
import static org.junit.Assert.*;
import java.io.IOException;
import java.io.File;
-import java.io.FileInputStream;
import java.io.FileOutputStream;
public class TestSecureIOUtils {
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestSequenceFile.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestSequenceFile.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestSequenceFile.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestSequenceFile.java Sat Aug 25 01:03:22 2012
@@ -481,6 +481,7 @@ public class TestSequenceFile extends Te
super(in);
}
+ @Override
public void close() throws IOException {
closed = true;
super.close();
@@ -505,6 +506,7 @@ public class TestSequenceFile extends Te
try {
new SequenceFile.Reader(fs, path, conf) {
// this method is called by the SequenceFile.Reader constructor, overwritten, so we can access the opened file
+ @Override
protected FSDataInputStream openFile(FileSystem fs, Path file, int bufferSize, long length) throws IOException {
final InputStream in = super.openFile(fs, file, bufferSize, length);
openedFile[0] = new TestFSDataInputStream(in);
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestText.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestText.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestText.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestText.java Sat Aug 25 01:03:22 2012
@@ -284,6 +284,7 @@ public class TestText extends TestCase {
super(name);
}
+ @Override
public void run() {
String name = this.getName();
DataOutputBuffer out = new DataOutputBuffer();
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestVersionedWritable.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestVersionedWritable.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestVersionedWritable.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestVersionedWritable.java Sat Aug 25 01:03:22 2012
@@ -37,16 +37,19 @@ public class TestVersionedWritable exten
private static byte VERSION = 1;
+ @Override
public byte getVersion() {
return VERSION;
}
+ @Override
public void write(DataOutput out) throws IOException {
super.write(out); // version.
out.writeInt(state);
}
+ @Override
public void readFields(DataInput in) throws IOException {
super.readFields(in); // version
this.state = in.readInt();
@@ -61,6 +64,7 @@ public class TestVersionedWritable exten
/** Required by test code, below. */
+ @Override
public boolean equals(Object o) {
if (!(o instanceof SimpleVersionedWritable))
return false;
@@ -85,6 +89,7 @@ public class TestVersionedWritable exten
SimpleVersionedWritable containedObject = new SimpleVersionedWritable();
String[] testStringArray = {"The", "Quick", "Brown", "Fox", "Jumped", "Over", "The", "Lazy", "Dog"};
+ @Override
public void write(DataOutput out) throws IOException {
super.write(out);
out.writeUTF(shortTestString);
@@ -97,6 +102,7 @@ public class TestVersionedWritable exten
}
+ @Override
public void readFields(DataInput in) throws IOException {
super.readFields(in);
shortTestString = in.readUTF();
@@ -108,6 +114,7 @@ public class TestVersionedWritable exten
+ @Override
public boolean equals(Object o) {
super.equals(o);
@@ -134,6 +141,7 @@ public class TestVersionedWritable exten
/* This one checks that version mismatch is thrown... */
public static class SimpleVersionedWritableV2 extends SimpleVersionedWritable {
static byte VERSION = 2;
+ @Override
public byte getVersion() {
return VERSION;
}
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestWritable.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestWritable.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestWritable.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestWritable.java Sat Aug 25 01:03:22 2012
@@ -38,10 +38,12 @@ public class TestWritable extends TestCa
int state = RANDOM.nextInt();
+ @Override
public void write(DataOutput out) throws IOException {
out.writeInt(state);
}
+ @Override
public void readFields(DataInput in) throws IOException {
this.state = in.readInt();
}
@@ -53,6 +55,7 @@ public class TestWritable extends TestCa
}
/** Required by test code, below. */
+ @Override
public boolean equals(Object o) {
if (!(o instanceof SimpleWritable))
return false;
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestWritableName.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestWritableName.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestWritableName.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestWritableName.java Sat Aug 25 01:03:22 2012
@@ -39,10 +39,12 @@ public class TestWritableName extends Te
int state = RANDOM.nextInt();
+ @Override
public void write(DataOutput out) throws IOException {
out.writeInt(state);
}
+ @Override
public void readFields(DataInput in) throws IOException {
this.state = in.readInt();
}
@@ -54,6 +56,7 @@ public class TestWritableName extends Te
}
/** Required by test code, below. */
+ @Override
public boolean equals(Object o) {
if (!(o instanceof SimpleWritable))
return false;
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/compress/TestCodecFactory.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/compress/TestCodecFactory.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/compress/TestCodecFactory.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/compress/TestCodecFactory.java Sat Aug 25 01:03:22 2012
@@ -40,68 +40,81 @@ public class TestCodecFactory extends Te
return conf;
}
+ @Override
public CompressionOutputStream createOutputStream(OutputStream out)
throws IOException {
return null;
}
+ @Override
public Class<? extends Compressor> getCompressorType() {
return null;
}
+ @Override
public Compressor createCompressor() {
return null;
}
+ @Override
public CompressionInputStream createInputStream(InputStream in,
Decompressor decompressor)
throws IOException {
return null;
}
+ @Override
public CompressionInputStream createInputStream(InputStream in)
throws IOException {
return null;
}
+ @Override
public CompressionOutputStream createOutputStream(OutputStream out,
Compressor compressor)
throws IOException {
return null;
}
+ @Override
public Class<? extends Decompressor> getDecompressorType() {
return null;
}
+ @Override
public Decompressor createDecompressor() {
return null;
}
+ @Override
public String getDefaultExtension() {
return ".base";
}
}
private static class BarCodec extends BaseCodec {
+ @Override
public String getDefaultExtension() {
return "bar";
}
}
private static class FooBarCodec extends BaseCodec {
+ @Override
public String getDefaultExtension() {
return ".foo.bar";
}
}
private static class FooCodec extends BaseCodec {
+ @Override
public String getDefaultExtension() {
return ".foo";
}
}
private static class NewGzipCodec extends BaseCodec {
+ @Override
public String getDefaultExtension() {
return ".gz";
}
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/file/tfile/NanoTimer.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/file/tfile/NanoTimer.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/file/tfile/NanoTimer.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/file/tfile/NanoTimer.java Sat Aug 25 01:03:22 2012
@@ -93,6 +93,7 @@ public class NanoTimer {
*
* Note: If timer is never started, "ERR" will be returned.
*/
+ @Override
public String toString() {
if (!readable()) {
return "ERR";
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/file/tfile/TestTFileByteArrays.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/file/tfile/TestTFileByteArrays.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/file/tfile/TestTFileByteArrays.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/file/tfile/TestTFileByteArrays.java Sat Aug 25 01:03:22 2012
@@ -35,7 +35,6 @@ import org.apache.hadoop.io.file.tfile.T
import org.apache.hadoop.io.file.tfile.TFile.Writer;
import org.apache.hadoop.io.file.tfile.TFile.Reader.Location;
import org.apache.hadoop.io.file.tfile.TFile.Reader.Scanner;
-import org.apache.hadoop.util.NativeCodeLoader;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/file/tfile/TestTFileNoneCodecsJClassComparatorByteArrays.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/file/tfile/TestTFileNoneCodecsJClassComparatorByteArrays.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/file/tfile/TestTFileNoneCodecsJClassComparatorByteArrays.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/file/tfile/TestTFileNoneCodecsJClassComparatorByteArrays.java Sat Aug 25 01:03:22 2012
@@ -19,9 +19,6 @@ package org.apache.hadoop.io.file.tfile;
import java.io.IOException;
-import org.apache.hadoop.io.RawComparator;
-import org.apache.hadoop.io.WritableComparator;
-
/**
*
* Byte arrays test case class using GZ compression codec, base class of none
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/file/tfile/TestTFileSeqFileComparison.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/file/tfile/TestTFileSeqFileComparison.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/file/tfile/TestTFileSeqFileComparison.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/file/tfile/TestTFileSeqFileComparison.java Sat Aug 25 01:03:22 2012
@@ -148,12 +148,14 @@ public class TestTFileSeqFileComparison
this.writer = new TFile.Writer(fsdos, minBlkSize, compress, null, conf);
}
+ @Override
public void append(BytesWritable key, BytesWritable value)
throws IOException {
writer.append(key.get(), 0, key.getSize(), value.get(), 0, value
.getSize());
}
+ @Override
public void close() throws IOException {
writer.close();
fsdos.close();
@@ -196,22 +198,27 @@ public class TestTFileSeqFileComparison
- valueBuffer.length)];
}
+ @Override
public byte[] getKey() {
return keyBuffer;
}
+ @Override
public int getKeyLength() {
return keyLength;
}
+ @Override
public byte[] getValue() {
return valueBuffer;
}
+ @Override
public int getValueLength() {
return valueLength;
}
+ @Override
public boolean next() throws IOException {
if (scanner.atEnd()) return false;
Entry entry = scanner.entry();
@@ -225,6 +232,7 @@ public class TestTFileSeqFileComparison
return true;
}
+ @Override
public void close() throws IOException {
scanner.close();
reader.close();
@@ -266,11 +274,13 @@ public class TestTFileSeqFileComparison
}
}
+ @Override
public void append(BytesWritable key, BytesWritable value)
throws IOException {
writer.append(key, value);
}
+ @Override
public void close() throws IOException {
writer.close();
fsdos.close();
@@ -291,26 +301,32 @@ public class TestTFileSeqFileComparison
value = new BytesWritable();
}
+ @Override
public byte[] getKey() {
return key.get();
}
+ @Override
public int getKeyLength() {
return key.getSize();
}
+ @Override
public byte[] getValue() {
return value.get();
}
+ @Override
public int getValueLength() {
return value.getSize();
}
+ @Override
public boolean next() throws IOException {
return reader.next(key, value);
}
+ @Override
public void close() throws IOException {
reader.close();
}
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/nativeio/TestNativeIO.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/nativeio/TestNativeIO.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/nativeio/TestNativeIO.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/nativeio/TestNativeIO.java Sat Aug 25 01:03:22 2012
@@ -88,6 +88,7 @@ public class TestNativeIO {
List<Thread> statters = new ArrayList<Thread>();
for (int i = 0; i < 10; i++) {
Thread statter = new Thread() {
+ @Override
public void run() {
long et = Time.now() + 5000;
while (Time.now() < et) {
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/retry/TestFailoverProxy.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/retry/TestFailoverProxy.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/retry/TestFailoverProxy.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/retry/TestFailoverProxy.java Sat Aug 25 01:03:22 2012
@@ -252,6 +252,7 @@ public class TestFailoverProxy {
this.unreliable = unreliable;
}
+ @Override
public void run() {
try {
result = unreliable.failsIfIdentifierDoesntMatch("impl2");
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/retry/UnreliableImplementation.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/retry/UnreliableImplementation.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/retry/UnreliableImplementation.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/retry/UnreliableImplementation.java Sat Aug 25 01:03:22 2012
@@ -19,7 +19,6 @@ package org.apache.hadoop.io.retry;
import java.io.IOException;
-import org.apache.hadoop.io.retry.UnreliableInterface.UnreliableException;
import org.apache.hadoop.ipc.RemoteException;
import org.apache.hadoop.ipc.StandbyException;
@@ -60,24 +59,29 @@ public class UnreliableImplementation im
this.exceptionToFailWith = exceptionToFailWith;
}
+ @Override
public void alwaysSucceeds() {
// do nothing
}
+ @Override
public void alwaysFailsWithFatalException() throws FatalException {
throw new FatalException();
}
+ @Override
public void alwaysFailsWithRemoteFatalException() throws RemoteException {
throw new RemoteException(FatalException.class.getName(), "Oops");
}
+ @Override
public void failsOnceThenSucceeds() throws UnreliableException {
if (failsOnceInvocationCount++ == 0) {
throw new UnreliableException();
}
}
+ @Override
public boolean failsOnceThenSucceedsWithReturnValue() throws UnreliableException {
if (failsOnceWithValueInvocationCount++ == 0) {
throw new UnreliableException();
@@ -85,6 +89,7 @@ public class UnreliableImplementation im
return true;
}
+ @Override
public void failsTenTimesThenSucceeds() throws UnreliableException {
if (failsTenTimesInvocationCount++ < 10) {
throw new UnreliableException();
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/serializer/avro/Record.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/serializer/avro/Record.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/serializer/avro/Record.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/serializer/avro/Record.java Sat Aug 25 01:03:22 2012
@@ -21,10 +21,12 @@ package org.apache.hadoop.io.serializer.
public class Record {
public int x = 7;
+ @Override
public int hashCode() {
return x;
}
+ @Override
public boolean equals(Object obj) {
if (this == obj)
return true;
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/serializer/avro/TestAvroSerialization.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/serializer/avro/TestAvroSerialization.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/serializer/avro/TestAvroSerialization.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/serializer/avro/TestAvroSerialization.java Sat Aug 25 01:03:22 2012
@@ -70,10 +70,12 @@ public class TestAvroSerialization exten
public static class InnerRecord {
public int x = 7;
+ @Override
public int hashCode() {
return x;
}
+ @Override
public boolean equals(Object obj) {
if (this == obj)
return true;
@@ -91,10 +93,12 @@ public class TestAvroSerialization exten
public static class RefSerializable implements AvroReflectSerializable {
public int x = 7;
+ @Override
public int hashCode() {
return x;
}
+ @Override
public boolean equals(Object obj) {
if (this == obj)
return true;
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/MiniRPCBenchmark.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/MiniRPCBenchmark.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/MiniRPCBenchmark.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/MiniRPCBenchmark.java Sat Aug 25 01:03:22 2012
@@ -208,6 +208,7 @@ public class MiniRPCBenchmark {
try {
client = proxyUserUgi.doAs(new PrivilegedExceptionAction<MiniProtocol>() {
+ @Override
public MiniProtocol run() throws IOException {
MiniProtocol p = (MiniProtocol) RPC.getProxy(MiniProtocol.class,
MiniProtocol.versionID, addr, conf);
@@ -235,6 +236,7 @@ public class MiniRPCBenchmark {
long start = Time.now();
try {
client = currentUgi.doAs(new PrivilegedExceptionAction<MiniProtocol>() {
+ @Override
public MiniProtocol run() throws IOException {
return (MiniProtocol) RPC.getProxy(MiniProtocol.class,
MiniProtocol.versionID, addr, conf);
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestIPC.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestIPC.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestIPC.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestIPC.java Sat Aug 25 01:03:22 2012
@@ -130,6 +130,7 @@ public class TestIPC {
this.count = count;
}
+ @Override
public void run() {
for (int i = 0; i < count; i++) {
try {
@@ -219,6 +220,7 @@ public class TestIPC {
private static class IOEOnReadWritable extends LongWritable {
public IOEOnReadWritable() {}
+ @Override
public void readFields(DataInput in) throws IOException {
super.readFields(in);
maybeThrowIOE();
@@ -229,6 +231,7 @@ public class TestIPC {
private static class RTEOnReadWritable extends LongWritable {
public RTEOnReadWritable() {}
+ @Override
public void readFields(DataInput in) throws IOException {
super.readFields(in);
maybeThrowRTE();
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java Sat Aug 25 01:03:22 2012
@@ -106,17 +106,21 @@ public class TestRPC {
public static class TestImpl implements TestProtocol {
int fastPingCounter = 0;
+ @Override
public long getProtocolVersion(String protocol, long clientVersion) {
return TestProtocol.versionID;
}
+ @Override
public ProtocolSignature getProtocolSignature(String protocol, long clientVersion,
int hashcode) {
return new ProtocolSignature(TestProtocol.versionID, null);
}
+ @Override
public void ping() {}
+ @Override
public synchronized void slowPing(boolean shouldSlow) {
if (shouldSlow) {
while (fastPingCounter < 2) {
@@ -131,17 +135,22 @@ public class TestRPC {
}
}
+ @Override
public String echo(String value) throws IOException { return value; }
+ @Override
public String[] echo(String[] values) throws IOException { return values; }
+ @Override
public Writable echo(Writable writable) {
return writable;
}
+ @Override
public int add(int v1, int v2) {
return v1 + v2;
}
+ @Override
public int add(int[] values) {
int sum = 0;
for (int i = 0; i < values.length; i++) {
@@ -150,16 +159,19 @@ public class TestRPC {
return sum;
}
+ @Override
public int error() throws IOException {
throw new IOException("bobo");
}
+ @Override
public void testServerGet() throws IOException {
if (!(Server.get() instanceof RPC.Server)) {
throw new IOException("Server.get() failed");
}
}
+ @Override
public int[] exchange(int[] values) {
for (int i = 0; i < values.length; i++) {
values[i] = i;
@@ -186,6 +198,7 @@ public class TestRPC {
}
// do two RPC that transfers data.
+ @Override
public void run() {
int[] indata = new int[datasize];
int[] outdata = null;
@@ -220,6 +233,7 @@ public class TestRPC {
return done;
}
+ @Override
public void run() {
try {
proxy.slowPing(true); // this would hang until two fast pings happened
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPCCompatibility.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPCCompatibility.java?rev=1377168&r1=1377167&r2=1377168&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPCCompatibility.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPCCompatibility.java Sat Aug 25 01:03:22 2012
@@ -284,6 +284,7 @@ System.out.println("echo int is NOT supp
"org.apache.hadoop.ipc.TestRPCCompatibility$TestProtocol1")
public interface TestProtocol4 extends TestProtocol2 {
public static final long versionID = 4L;
+ @Override
int echo(int value) throws IOException;
}