Java 类org.apache.hadoop.io.nativeio.SharedFileDescriptorFactory 实例源码

项目:hadoop    文件:TestShortCircuitShm.java   
@Test(timeout=60000)
public void testStartupShutdown() throws Exception {
  File path = new File(TEST_BASE, "testStartupShutdown");
  path.mkdirs();
  SharedFileDescriptorFactory factory =
      SharedFileDescriptorFactory.create("shm_",
          new String[] { path.getAbsolutePath() } );
  FileInputStream stream =
      factory.createDescriptor("testStartupShutdown", 4096);
  ShortCircuitShm shm = new ShortCircuitShm(ShmId.createRandom(), stream);
  shm.free();
  stream.close();
  FileUtil.fullyDelete(path);
}
项目:aliyun-oss-hadoop-fs    文件:TestShortCircuitShm.java   
@Test(timeout=60000)
public void testStartupShutdown() throws Exception {
  File path = new File(TEST_BASE, "testStartupShutdown");
  path.mkdirs();
  SharedFileDescriptorFactory factory =
      SharedFileDescriptorFactory.create("shm_",
          new String[] { path.getAbsolutePath() } );
  FileInputStream stream =
      factory.createDescriptor("testStartupShutdown", 4096);
  ShortCircuitShm shm = new ShortCircuitShm(ShmId.createRandom(), stream);
  shm.free();
  stream.close();
  FileUtil.fullyDelete(path);
}
项目:big-c    文件:TestShortCircuitShm.java   
@Test(timeout=60000)
public void testStartupShutdown() throws Exception {
  File path = new File(TEST_BASE, "testStartupShutdown");
  path.mkdirs();
  SharedFileDescriptorFactory factory =
      SharedFileDescriptorFactory.create("shm_",
          new String[] { path.getAbsolutePath() } );
  FileInputStream stream =
      factory.createDescriptor("testStartupShutdown", 4096);
  ShortCircuitShm shm = new ShortCircuitShm(ShmId.createRandom(), stream);
  shm.free();
  stream.close();
  FileUtil.fullyDelete(path);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestShortCircuitShm.java   
@Test(timeout=60000)
public void testStartupShutdown() throws Exception {
  File path = new File(TEST_BASE, "testStartupShutdown");
  path.mkdirs();
  SharedFileDescriptorFactory factory =
      SharedFileDescriptorFactory.create("shm_",
          new String[] { path.getAbsolutePath() } );
  FileInputStream stream =
      factory.createDescriptor("testStartupShutdown", 4096);
  ShortCircuitShm shm = new ShortCircuitShm(ShmId.createRandom(), stream);
  shm.free();
  stream.close();
  FileUtil.fullyDelete(path);
}
项目:FlexMap    文件:TestShortCircuitShm.java   
@Test(timeout=60000)
public void testStartupShutdown() throws Exception {
  File path = new File(TEST_BASE, "testStartupShutdown");
  path.mkdirs();
  SharedFileDescriptorFactory factory =
      SharedFileDescriptorFactory.create("shm_",
          new String[] { path.getAbsolutePath() } );
  FileInputStream stream =
      factory.createDescriptor("testStartupShutdown", 4096);
  ShortCircuitShm shm = new ShortCircuitShm(ShmId.createRandom(), stream);
  shm.free();
  stream.close();
  FileUtil.fullyDelete(path);
}
项目:hadoop-on-lustre2    文件:TestShortCircuitShm.java   
@Test(timeout=60000)
public void testStartupShutdown() throws Exception {
  File path = new File(TEST_BASE, "testStartupShutdown");
  path.mkdirs();
  SharedFileDescriptorFactory factory =
      SharedFileDescriptorFactory.create("shm_",
          new String[] { path.getAbsolutePath() } );
  FileInputStream stream =
      factory.createDescriptor("testStartupShutdown", 4096);
  ShortCircuitShm shm = new ShortCircuitShm(ShmId.createRandom(), stream);
  shm.free();
  stream.close();
  FileUtil.fullyDelete(path);
}
项目:hadoop    文件:TestShortCircuitShm.java   
@Before
public void before() {
  Assume.assumeTrue(null == 
      SharedFileDescriptorFactory.getLoadingFailureReason());
}
项目:aliyun-oss-hadoop-fs    文件:TestShortCircuitShm.java   
@Before
public void before() {
  Assume.assumeTrue(null == 
      SharedFileDescriptorFactory.getLoadingFailureReason());
}
项目:big-c    文件:TestShortCircuitShm.java   
@Before
public void before() {
  Assume.assumeTrue(null == 
      SharedFileDescriptorFactory.getLoadingFailureReason());
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestShortCircuitShm.java   
@Before
public void before() {
  Assume.assumeTrue(null == 
      SharedFileDescriptorFactory.getLoadingFailureReason());
}
项目:FlexMap    文件:TestShortCircuitShm.java   
@Before
public void before() {
  Assume.assumeTrue(null == 
      SharedFileDescriptorFactory.getLoadingFailureReason());
}
项目:hadoop-on-lustre2    文件:TestShortCircuitShm.java   
@Before
public void before() {
  Assume.assumeTrue(null == 
      SharedFileDescriptorFactory.getLoadingFailureReason());
}