Java 类org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetFactory 实例源码

项目:hadoop    文件:FsDatasetSpi.java   
/** @return the configured factory. */
public static Factory<?> getFactory(Configuration conf) {
  @SuppressWarnings("rawtypes")
  final Class<? extends Factory> clazz = conf.getClass(
      DFSConfigKeys.DFS_DATANODE_FSDATASET_FACTORY_KEY,
      FsDatasetFactory.class,
      Factory.class);
  return ReflectionUtils.newInstance(clazz, conf);
}
项目:hadoop    文件:TestSimulatedFSDataset.java   
@Test
public void testFSDatasetFactory() {
  final Configuration conf = new Configuration();
  FsDatasetSpi.Factory<?> f = FsDatasetSpi.Factory.getFactory(conf);
  assertEquals(FsDatasetFactory.class, f.getClass());
  assertFalse(f.isSimulated());

  SimulatedFSDataset.setFactory(conf);
  FsDatasetSpi.Factory<?> s = FsDatasetSpi.Factory.getFactory(conf);
  assertEquals(SimulatedFSDataset.Factory.class, s.getClass());
  assertTrue(s.isSimulated());
}
项目:aliyun-oss-hadoop-fs    文件:FsDatasetSpi.java   
/** @return the configured factory. */
public static Factory<?> getFactory(Configuration conf) {
  @SuppressWarnings("rawtypes")
  final Class<? extends Factory> clazz = conf.getClass(
      DFSConfigKeys.DFS_DATANODE_FSDATASET_FACTORY_KEY,
      FsDatasetFactory.class,
      Factory.class);
  return ReflectionUtils.newInstance(clazz, conf);
}
项目:aliyun-oss-hadoop-fs    文件:TestSimulatedFSDataset.java   
@Test
public void testFSDatasetFactory() {
  final Configuration conf = new Configuration();
  FsDatasetSpi.Factory<?> f = FsDatasetSpi.Factory.getFactory(conf);
  assertEquals(FsDatasetFactory.class, f.getClass());
  assertFalse(f.isSimulated());

  SimulatedFSDataset.setFactory(conf);
  FsDatasetSpi.Factory<?> s = FsDatasetSpi.Factory.getFactory(conf);
  assertEquals(SimulatedFSDataset.Factory.class, s.getClass());
  assertTrue(s.isSimulated());
}
项目:aliyun-oss-hadoop-fs    文件:FsDatasetTestUtils.java   
/**
 * By default, it returns FsDatasetImplTestUtilsFactory.
 *
 * @return The configured Factory.
 */
public static Factory<?> getFactory(Configuration conf) {
  String className = conf.get(
      DFSConfigKeys.DFS_DATANODE_FSDATASET_FACTORY_KEY,
      FsDatasetFactory.class.getName());
  Preconditions.checkState(className.contains("Factory"));
  className = className.replaceFirst("(\\$)?Factory$", "TestUtilsFactory");
  final Class<? extends Factory> clazz = conf.getClass(
      className,
      FsDatasetImplTestUtilsFactory.class,
      Factory.class);
  return ReflectionUtils.newInstance(clazz, conf);
}
项目:big-c    文件:FsDatasetSpi.java   
/** @return the configured factory. */
public static Factory<?> getFactory(Configuration conf) {
  @SuppressWarnings("rawtypes")
  final Class<? extends Factory> clazz = conf.getClass(
      DFSConfigKeys.DFS_DATANODE_FSDATASET_FACTORY_KEY,
      FsDatasetFactory.class,
      Factory.class);
  return ReflectionUtils.newInstance(clazz, conf);
}
项目:big-c    文件:TestSimulatedFSDataset.java   
@Test
public void testFSDatasetFactory() {
  final Configuration conf = new Configuration();
  FsDatasetSpi.Factory<?> f = FsDatasetSpi.Factory.getFactory(conf);
  assertEquals(FsDatasetFactory.class, f.getClass());
  assertFalse(f.isSimulated());

  SimulatedFSDataset.setFactory(conf);
  FsDatasetSpi.Factory<?> s = FsDatasetSpi.Factory.getFactory(conf);
  assertEquals(SimulatedFSDataset.Factory.class, s.getClass());
  assertTrue(s.isSimulated());
}
项目:hadoop-2.6.0-cdh5.4.3    文件:FsDatasetSpi.java   
/** @return the configured factory. */
public static Factory<?> getFactory(Configuration conf) {
  @SuppressWarnings("rawtypes")
  final Class<? extends Factory> clazz = conf.getClass(
      DFSConfigKeys.DFS_DATANODE_FSDATASET_FACTORY_KEY,
      FsDatasetFactory.class,
      Factory.class);
  return ReflectionUtils.newInstance(clazz, conf);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestSimulatedFSDataset.java   
@Test
public void testFSDatasetFactory() {
  final Configuration conf = new Configuration();
  FsDatasetSpi.Factory<?> f = FsDatasetSpi.Factory.getFactory(conf);
  assertEquals(FsDatasetFactory.class, f.getClass());
  assertFalse(f.isSimulated());

  SimulatedFSDataset.setFactory(conf);
  FsDatasetSpi.Factory<?> s = FsDatasetSpi.Factory.getFactory(conf);
  assertEquals(SimulatedFSDataset.Factory.class, s.getClass());
  assertTrue(s.isSimulated());
}
项目:hadoop-plus    文件:FsDatasetSpi.java   
/** @return the configured factory. */
public static Factory<?> getFactory(Configuration conf) {
  @SuppressWarnings("rawtypes")
  final Class<? extends Factory> clazz = conf.getClass(
      DFSConfigKeys.DFS_DATANODE_FSDATASET_FACTORY_KEY,
      FsDatasetFactory.class,
      Factory.class);
  return ReflectionUtils.newInstance(clazz, conf);
}
项目:hadoop-plus    文件:TestSimulatedFSDataset.java   
@Test
public void testFSDatasetFactory() {
  final Configuration conf = new Configuration();
  FsDatasetSpi.Factory<?> f = FsDatasetSpi.Factory.getFactory(conf);
  assertEquals(FsDatasetFactory.class, f.getClass());
  assertFalse(f.isSimulated());

  SimulatedFSDataset.setFactory(conf);
  FsDatasetSpi.Factory<?> s = FsDatasetSpi.Factory.getFactory(conf);
  assertEquals(SimulatedFSDataset.Factory.class, s.getClass());
  assertTrue(s.isSimulated());
}
项目:FlexMap    文件:FsDatasetSpi.java   
/** @return the configured factory. */
public static Factory<?> getFactory(Configuration conf) {
  @SuppressWarnings("rawtypes")
  final Class<? extends Factory> clazz = conf.getClass(
      DFSConfigKeys.DFS_DATANODE_FSDATASET_FACTORY_KEY,
      FsDatasetFactory.class,
      Factory.class);
  return ReflectionUtils.newInstance(clazz, conf);
}
项目:FlexMap    文件:TestSimulatedFSDataset.java   
@Test
public void testFSDatasetFactory() {
  final Configuration conf = new Configuration();
  FsDatasetSpi.Factory<?> f = FsDatasetSpi.Factory.getFactory(conf);
  assertEquals(FsDatasetFactory.class, f.getClass());
  assertFalse(f.isSimulated());

  SimulatedFSDataset.setFactory(conf);
  FsDatasetSpi.Factory<?> s = FsDatasetSpi.Factory.getFactory(conf);
  assertEquals(SimulatedFSDataset.Factory.class, s.getClass());
  assertTrue(s.isSimulated());
}
项目:hops    文件:FsDatasetSpi.java   
/**
 * @return the configured factory.
 */
public static Factory<?> getFactory(Configuration conf) {
  @SuppressWarnings("rawtypes")
  final Class<? extends Factory> clazz =
      conf.getClass(DFSConfigKeys.DFS_DATANODE_FSDATASET_FACTORY_KEY,
          FsDatasetFactory.class, Factory.class);
  return ReflectionUtils.newInstance(clazz, conf);
}
项目:hops    文件:TestSimulatedFSDataset.java   
@Test
public void testFSDatasetFactory() {
  final Configuration conf = new Configuration();
  FsDatasetSpi.Factory<?> f = FsDatasetSpi.Factory.getFactory(conf);
  assertEquals(FsDatasetFactory.class, f.getClass());
  assertFalse(f.isSimulated());

  SimulatedFSDataset.setFactory(conf);
  FsDatasetSpi.Factory<?> s = FsDatasetSpi.Factory.getFactory(conf);
  assertEquals(SimulatedFSDataset.Factory.class, s.getClass());
  assertTrue(s.isSimulated());
}
项目:hadoop-TCP    文件:FsDatasetSpi.java   
/** @return the configured factory. */
public static Factory<?> getFactory(Configuration conf) {
  @SuppressWarnings("rawtypes")
  final Class<? extends Factory> clazz = conf.getClass(
      DFSConfigKeys.DFS_DATANODE_FSDATASET_FACTORY_KEY,
      FsDatasetFactory.class,
      Factory.class);
  return ReflectionUtils.newInstance(clazz, conf);
}
项目:hadoop-TCP    文件:TestSimulatedFSDataset.java   
@Test
public void testFSDatasetFactory() {
  final Configuration conf = new Configuration();
  FsDatasetSpi.Factory<?> f = FsDatasetSpi.Factory.getFactory(conf);
  assertEquals(FsDatasetFactory.class, f.getClass());
  assertFalse(f.isSimulated());

  SimulatedFSDataset.setFactory(conf);
  FsDatasetSpi.Factory<?> s = FsDatasetSpi.Factory.getFactory(conf);
  assertEquals(SimulatedFSDataset.Factory.class, s.getClass());
  assertTrue(s.isSimulated());
}
项目:hardfs    文件:FsDatasetSpi.java   
/** @return the configured factory. */
public static Factory<?> getFactory(Configuration conf) {
  @SuppressWarnings("rawtypes")
  final Class<? extends Factory> clazz = conf.getClass(
      DFSConfigKeys.DFS_DATANODE_FSDATASET_FACTORY_KEY,
      FsDatasetFactory.class,
      Factory.class);
  return ReflectionUtils.newInstance(clazz, conf);
}
项目:hardfs    文件:TestSimulatedFSDataset.java   
@Test
public void testFSDatasetFactory() {
  final Configuration conf = new Configuration();
  FsDatasetSpi.Factory<?> f = FsDatasetSpi.Factory.getFactory(conf);
  assertEquals(FsDatasetFactory.class, f.getClass());
  assertFalse(f.isSimulated());

  SimulatedFSDataset.setFactory(conf);
  FsDatasetSpi.Factory<?> s = FsDatasetSpi.Factory.getFactory(conf);
  assertEquals(SimulatedFSDataset.Factory.class, s.getClass());
  assertTrue(s.isSimulated());
}
项目:hadoop-on-lustre2    文件:FsDatasetSpi.java   
/** @return the configured factory. */
public static Factory<?> getFactory(Configuration conf) {
  @SuppressWarnings("rawtypes")
  final Class<? extends Factory> clazz = conf.getClass(
      DFSConfigKeys.DFS_DATANODE_FSDATASET_FACTORY_KEY,
      FsDatasetFactory.class,
      Factory.class);
  return ReflectionUtils.newInstance(clazz, conf);
}
项目:hadoop-on-lustre2    文件:TestSimulatedFSDataset.java   
@Test
public void testFSDatasetFactory() {
  final Configuration conf = new Configuration();
  FsDatasetSpi.Factory<?> f = FsDatasetSpi.Factory.getFactory(conf);
  assertEquals(FsDatasetFactory.class, f.getClass());
  assertFalse(f.isSimulated());

  SimulatedFSDataset.setFactory(conf);
  FsDatasetSpi.Factory<?> s = FsDatasetSpi.Factory.getFactory(conf);
  assertEquals(SimulatedFSDataset.Factory.class, s.getClass());
  assertTrue(s.isSimulated());
}