Java 类org.apache.hadoop.hdfs.server.datanode.DNConf 实例源码

项目:hadoop    文件:TestFsDatasetImpl.java   
@Before
public void setUp() throws IOException {
  datanode = mock(DataNode.class);
  storage = mock(DataStorage.class);
  this.conf = new Configuration();
  this.conf.setLong(DFS_DATANODE_SCAN_PERIOD_HOURS_KEY, 0);
  final DNConf dnConf = new DNConf(conf);

  when(datanode.getConf()).thenReturn(conf);
  when(datanode.getDnConf()).thenReturn(dnConf);
  final BlockScanner disabledBlockScanner = new BlockScanner(datanode, conf);
  when(datanode.getBlockScanner()).thenReturn(disabledBlockScanner);

  createStorageDirs(storage, conf, NUM_INIT_VOLUMES);
  dataset = new FsDatasetImpl(datanode, storage, conf);
  for (String bpid : BLOCK_POOL_IDS) {
    dataset.addBlockPool(bpid, conf);
  }

  assertEquals(NUM_INIT_VOLUMES, dataset.getVolumes().size());
  assertEquals(0, dataset.getNumFailedVolumes());
}
项目:aliyun-oss-hadoop-fs    文件:TestFsDatasetImpl.java   
@Before
public void setUp() throws IOException {
  datanode = mock(DataNode.class);
  storage = mock(DataStorage.class);
  this.conf = new Configuration();
  this.conf.setLong(DFS_DATANODE_SCAN_PERIOD_HOURS_KEY, 0);
  final DNConf dnConf = new DNConf(conf);

  when(datanode.getConf()).thenReturn(conf);
  when(datanode.getDnConf()).thenReturn(dnConf);
  final BlockScanner disabledBlockScanner = new BlockScanner(datanode, conf);
  when(datanode.getBlockScanner()).thenReturn(disabledBlockScanner);
  final ShortCircuitRegistry shortCircuitRegistry =
      new ShortCircuitRegistry(conf);
  when(datanode.getShortCircuitRegistry()).thenReturn(shortCircuitRegistry);

  createStorageDirs(storage, conf, NUM_INIT_VOLUMES);
  dataset = new FsDatasetImpl(datanode, storage, conf);
  for (String bpid : BLOCK_POOL_IDS) {
    dataset.addBlockPool(bpid, conf);
  }

  assertEquals(NUM_INIT_VOLUMES, getNumVolumes());
  assertEquals(0, dataset.getNumFailedVolumes());
}
项目:big-c    文件:TestFsDatasetImpl.java   
@Before
public void setUp() throws IOException {
  datanode = mock(DataNode.class);
  storage = mock(DataStorage.class);
  this.conf = new Configuration();
  this.conf.setLong(DFS_DATANODE_SCAN_PERIOD_HOURS_KEY, 0);
  final DNConf dnConf = new DNConf(conf);

  when(datanode.getConf()).thenReturn(conf);
  when(datanode.getDnConf()).thenReturn(dnConf);
  final BlockScanner disabledBlockScanner = new BlockScanner(datanode, conf);
  when(datanode.getBlockScanner()).thenReturn(disabledBlockScanner);

  createStorageDirs(storage, conf, NUM_INIT_VOLUMES);
  dataset = new FsDatasetImpl(datanode, storage, conf);
  for (String bpid : BLOCK_POOL_IDS) {
    dataset.addBlockPool(bpid, conf);
  }

  assertEquals(NUM_INIT_VOLUMES, dataset.getVolumes().size());
  assertEquals(0, dataset.getNumFailedVolumes());
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestFsDatasetImpl.java   
@Before
public void setUp() throws IOException {
  datanode = mock(DataNode.class);
  storage = mock(DataStorage.class);
  this.conf = new Configuration();
  this.conf.setLong(DFS_DATANODE_SCAN_PERIOD_HOURS_KEY, 0);
  final DNConf dnConf = new DNConf(conf);

  when(datanode.getConf()).thenReturn(conf);
  when(datanode.getDnConf()).thenReturn(dnConf);
  final BlockScanner disabledBlockScanner = new BlockScanner(datanode, conf);
  when(datanode.getBlockScanner()).thenReturn(disabledBlockScanner);

  createStorageDirs(storage, conf, NUM_INIT_VOLUMES);
  dataset = new FsDatasetImpl(datanode, storage, conf);
  for (String bpid : BLOCK_POOL_IDS) {
    dataset.addBlockPool(bpid, conf);
  }

  assertEquals(NUM_INIT_VOLUMES, dataset.getVolumes().size());
  assertEquals(0, dataset.getNumFailedVolumes());
}
项目:FlexMap    文件:TestFsDatasetImpl.java   
@Before
public void setUp() throws IOException {
  final DataNode datanode = Mockito.mock(DataNode.class);
  storage = Mockito.mock(DataStorage.class);
  scanner = Mockito.mock(DataBlockScanner.class);
  this.conf = new Configuration();
  final DNConf dnConf = new DNConf(conf);

  when(datanode.getConf()).thenReturn(conf);
  when(datanode.getDnConf()).thenReturn(dnConf);
  when(datanode.getBlockScanner()).thenReturn(scanner);

  createStorageDirs(storage, conf, NUM_INIT_VOLUMES);
  dataset = new FsDatasetImpl(datanode, storage, conf);
  for (String bpid : BLOCK_POOL_IDS) {
    dataset.addBlockPool(bpid, conf);
  }

  assertEquals(NUM_INIT_VOLUMES, dataset.getVolumes().size());
  assertEquals(0, dataset.getNumFailedVolumes());
}
项目:hadoop    文件:SaslDataTransferServer.java   
/**
 * Creates a new SaslDataTransferServer.
 *
 * @param dnConf configuration of DataNode
 * @param blockPoolTokenSecretManager used for checking block access tokens
 *   and encryption keys
 */
public SaslDataTransferServer(DNConf dnConf,
    BlockPoolTokenSecretManager blockPoolTokenSecretManager) {
  this.blockPoolTokenSecretManager = blockPoolTokenSecretManager;
  this.dnConf = dnConf;
}
项目:aliyun-oss-hadoop-fs    文件:SaslDataTransferServer.java   
/**
 * Creates a new SaslDataTransferServer.
 *
 * @param dnConf configuration of DataNode
 * @param blockPoolTokenSecretManager used for checking block access tokens
 *   and encryption keys
 */
public SaslDataTransferServer(DNConf dnConf,
    BlockPoolTokenSecretManager blockPoolTokenSecretManager) {
  this.blockPoolTokenSecretManager = blockPoolTokenSecretManager;
  this.dnConf = dnConf;
}
项目:big-c    文件:SaslDataTransferServer.java   
/**
 * Creates a new SaslDataTransferServer.
 *
 * @param dnConf configuration of DataNode
 * @param blockPoolTokenSecretManager used for checking block access tokens
 *   and encryption keys
 */
public SaslDataTransferServer(DNConf dnConf,
    BlockPoolTokenSecretManager blockPoolTokenSecretManager) {
  this.blockPoolTokenSecretManager = blockPoolTokenSecretManager;
  this.dnConf = dnConf;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:SaslDataTransferServer.java   
/**
 * Creates a new SaslDataTransferServer.
 *
 * @param dnConf configuration of DataNode
 * @param blockPoolTokenSecretManager used for checking block access tokens
 *   and encryption keys
 */
public SaslDataTransferServer(DNConf dnConf,
    BlockPoolTokenSecretManager blockPoolTokenSecretManager) {
  this.blockPoolTokenSecretManager = blockPoolTokenSecretManager;
  this.dnConf = dnConf;
}
项目:FlexMap    文件:SaslDataTransferServer.java   
/**
 * Creates a new SaslDataTransferServer.
 *
 * @param dnConf configuration of DataNode
 * @param blockPoolTokenSecretManager used for checking block access tokens
 *   and encryption keys
 */
public SaslDataTransferServer(DNConf dnConf,
    BlockPoolTokenSecretManager blockPoolTokenSecretManager) {
  this.blockPoolTokenSecretManager = blockPoolTokenSecretManager;
  this.dnConf = dnConf;
}