Search in sources :

Example 36 with DFSClient

use of org.apache.hadoop.hdfs.DFSClient in project hadoop by apache.

the class TestRetryCacheWithHA method testRemoveCachePool.

@Test(timeout = 60000)
public void testRemoveCachePool() throws Exception {
    DFSClient client = genClientWithDummyHandler();
    AtMostOnceOp op = new RemoveCachePoolOp(client, "pool");
    testClientRetryWithFailover(op);
}
Also used : DFSClient(org.apache.hadoop.hdfs.DFSClient) Test(org.junit.Test)

Example 37 with DFSClient

use of org.apache.hadoop.hdfs.DFSClient in project hadoop by apache.

the class TestRetryCacheWithHA method testRemoveCacheDescriptor.

@Test(timeout = 60000)
public void testRemoveCacheDescriptor() throws Exception {
    DFSClient client = genClientWithDummyHandler();
    AtMostOnceOp op = new RemoveCacheDirectiveInfoOp(client, "pool", "/path");
    testClientRetryWithFailover(op);
}
Also used : DFSClient(org.apache.hadoop.hdfs.DFSClient) Test(org.junit.Test)

Example 38 with DFSClient

use of org.apache.hadoop.hdfs.DFSClient in project hadoop by apache.

the class TestRetryCacheWithHA method testConcat.

@Test(timeout = 60000)
public void testConcat() throws Exception {
    final DFSClient client = genClientWithDummyHandler();
    AtMostOnceOp op = new ConcatOp(client, new Path("/test/file"), 5);
    testClientRetryWithFailover(op);
}
Also used : DFSClient(org.apache.hadoop.hdfs.DFSClient) Path(org.apache.hadoop.fs.Path) Test(org.junit.Test)

Example 39 with DFSClient

use of org.apache.hadoop.hdfs.DFSClient in project hadoop by apache.

the class TestRetryCacheWithHA method testCreate.

@Test(timeout = 60000)
public void testCreate() throws Exception {
    final DFSClient client = genClientWithDummyHandler();
    AtMostOnceOp op = new CreateOp(client, "/testfile");
    testClientRetryWithFailover(op);
}
Also used : DFSClient(org.apache.hadoop.hdfs.DFSClient) Test(org.junit.Test)

Example 40 with DFSClient

use of org.apache.hadoop.hdfs.DFSClient in project hadoop by apache.

the class TestRetryCacheWithHA method testRename2.

@Test(timeout = 60000)
public void testRename2() throws Exception {
    final DFSClient client = genClientWithDummyHandler();
    AtMostOnceOp op = new Rename2Op(client, "/file1", "/file2");
    testClientRetryWithFailover(op);
}
Also used : DFSClient(org.apache.hadoop.hdfs.DFSClient) Test(org.junit.Test)

Aggregations

DFSClient (org.apache.hadoop.hdfs.DFSClient)107 Test (org.junit.Test)58 IOException (java.io.IOException)39 Nfs3FileAttributes (org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes)27 FileHandle (org.apache.hadoop.nfs.nfs3.FileHandle)26 Path (org.apache.hadoop.fs.Path)20 DistributedFileSystem (org.apache.hadoop.hdfs.DistributedFileSystem)19 VisibleForTesting (com.google.common.annotations.VisibleForTesting)18 Configuration (org.apache.hadoop.conf.Configuration)17 HdfsFileStatus (org.apache.hadoop.hdfs.protocol.HdfsFileStatus)15 MiniDFSCluster (org.apache.hadoop.hdfs.MiniDFSCluster)14 InetSocketAddress (java.net.InetSocketAddress)13 FileSystem (org.apache.hadoop.fs.FileSystem)12 NfsConfiguration (org.apache.hadoop.hdfs.nfs.conf.NfsConfiguration)12 FsPermission (org.apache.hadoop.fs.permission.FsPermission)10 HdfsDataOutputStream (org.apache.hadoop.hdfs.client.HdfsDataOutputStream)10 ArrayList (java.util.ArrayList)9 InvocationTargetException (java.lang.reflect.InvocationTargetException)8 LocatedBlock (org.apache.hadoop.hdfs.protocol.LocatedBlock)8 ShellBasedIdMapping (org.apache.hadoop.security.ShellBasedIdMapping)8