Java 类org.apache.hadoop.hdfs.DFSTestUtil.ShortCircuitTestContext 实例源码

项目:hadoop    文件:TestRead.java   
@Test(timeout=60000)
public void testEOFWithBlockReaderLocal() throws Exception {
  ShortCircuitTestContext testContext = 
      new ShortCircuitTestContext("testEOFWithBlockReaderLocal");
  try {
    final Configuration conf = testContext.newConfiguration();
    conf.setLong(DFSConfigKeys.DFS_CLIENT_CACHE_READAHEAD, BLOCK_SIZE);
    MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(1)
        .format(true).build();
    testEOF(cluster, 1);
    testEOF(cluster, 14);
    testEOF(cluster, 10000);
    cluster.shutdown();
  } finally {
    testContext.close();
  }
}
项目:aliyun-oss-hadoop-fs    文件:TestRead.java   
@Test(timeout=60000)
public void testEOFWithBlockReaderLocal() throws Exception {
  ShortCircuitTestContext testContext = 
      new ShortCircuitTestContext("testEOFWithBlockReaderLocal");
  try {
    final Configuration conf = testContext.newConfiguration();
    conf.setLong(HdfsClientConfigKeys.DFS_CLIENT_CACHE_READAHEAD, BLOCK_SIZE);
    MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(1)
        .format(true).build();
    testEOF(cluster, 1);
    testEOF(cluster, 14);
    testEOF(cluster, 10000);
    cluster.shutdown();
  } finally {
    testContext.close();
  }
}
项目:big-c    文件:TestRead.java   
@Test(timeout=60000)
public void testEOFWithBlockReaderLocal() throws Exception {
  ShortCircuitTestContext testContext = 
      new ShortCircuitTestContext("testEOFWithBlockReaderLocal");
  try {
    final Configuration conf = testContext.newConfiguration();
    conf.setLong(DFSConfigKeys.DFS_CLIENT_CACHE_READAHEAD, BLOCK_SIZE);
    MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(1)
        .format(true).build();
    testEOF(cluster, 1);
    testEOF(cluster, 14);
    testEOF(cluster, 10000);
    cluster.shutdown();
  } finally {
    testContext.close();
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestRead.java   
@Test(timeout=60000)
public void testEOFWithBlockReaderLocal() throws Exception {
  ShortCircuitTestContext testContext = 
      new ShortCircuitTestContext("testEOFWithBlockReaderLocal");
  try {
    final Configuration conf = testContext.newConfiguration();
    conf.setLong(DFSConfigKeys.DFS_CLIENT_CACHE_READAHEAD, BLOCK_SIZE);
    MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(1)
        .format(true).build();
    testEOF(cluster, 1);
    testEOF(cluster, 14);
    testEOF(cluster, 10000);
    cluster.shutdown();
  } finally {
    testContext.close();
  }
}
项目:FlexMap    文件:TestRead.java   
@Test(timeout=60000)
public void testEOFWithBlockReaderLocal() throws Exception {
  ShortCircuitTestContext testContext = 
      new ShortCircuitTestContext("testEOFWithBlockReaderLocal");
  try {
    final Configuration conf = testContext.newConfiguration();
    conf.setLong(DFSConfigKeys.DFS_CLIENT_CACHE_READAHEAD, BLOCK_SIZE);
    MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(1)
        .format(true).build();
    testEOF(cluster, 1);
    testEOF(cluster, 14);
    testEOF(cluster, 10000);
    cluster.shutdown();
  } finally {
    testContext.close();
  }
}
项目:hadoop-on-lustre2    文件:TestRead.java   
@Test(timeout=60000)
public void testEOFWithBlockReaderLocal() throws Exception {
  ShortCircuitTestContext testContext = 
      new ShortCircuitTestContext("testEOFWithBlockReaderLocal");
  try {
    final Configuration conf = testContext.newConfiguration();
    conf.setLong(DFSConfigKeys.DFS_CLIENT_CACHE_READAHEAD, BLOCK_SIZE);
    MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(1)
        .format(true).build();
    testEOF(cluster, 1);
    testEOF(cluster, 14);
    testEOF(cluster, 10000);
    cluster.shutdown();
  } finally {
    testContext.close();
  }
}