微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

org.apache.hadoop.hdfs.server.datanode.BlockPoolSliceScanner的实例源码

项目:hadoop-plus    文件TestMultipleNNDataBlockScanner.java   
@Test(timeout=120000)
public void test2NNBlockRescanInterval() throws IOException {
  ((Log4JLogger)BlockPoolSliceScanner.LOG).getLogger().setLevel(Level.ALL);
  Configuration conf = new HdfsConfiguration();
  cluster = new MiniDFSCluster.Builder(conf)
      .nnTopology(MiniDFSNNTopology.simpleFederatedTopology(3))
      .build();

  try {
    FileSystem fs = cluster.getFileSystem(1);
    Path file2 = new Path("/test/testBlockScanInterval");
    DFSTestUtil.createFile(fs,file2,30,(short) 1,0);

    fs = cluster.getFileSystem(0);
    Path file1 = new Path("/test/testBlockScanInterval");
    DFSTestUtil.createFile(fs,file1,0);
    for (int i = 0; i < 8; i++) {
      LOG.info("Verifying that the blockscanner scans exactly once");
      waitAndScanBlocks(1,1);
    }
  } finally {
    cluster.shutdown();
  }
}
项目:hadoop-plus    文件TestMultipleNNDataBlockScanner.java   
/**
 * HDFS-3828: DN rescans blocks too frequently
 * 
 * @throws Exception
 */
@Test(timeout=120000)
public void testBlockRescanInterval() throws IOException {
  ((Log4JLogger)BlockPoolSliceScanner.LOG).getLogger().setLevel(Level.ALL);
  Configuration conf = new HdfsConfiguration();
  cluster = new MiniDFSCluster.Builder(conf).build();

  try {
    FileSystem fs = cluster.getFileSystem();
    Path file1 = new Path("/test/testBlockScanInterval");
    DFSTestUtil.createFile(fs,0);
    for (int i = 0; i < 4; i++) {
      LOG.info("Verifying that the blockscanner scans exactly once");
      waitAndScanBlocks(1,1);
    }
  } finally {
    cluster.shutdown();
  }
}
项目:hadoop-TCP    文件TestMultipleNNDataBlockScanner.java   
@Test(timeout=120000)
public void test2NNBlockRescanInterval() throws IOException {
  ((Log4JLogger)BlockPoolSliceScanner.LOG).getLogger().setLevel(Level.ALL);
  Configuration conf = new HdfsConfiguration();
  cluster = new MiniDFSCluster.Builder(conf)
      .nnTopology(MiniDFSNNTopology.simpleFederatedTopology(3))
      .build();

  try {
    FileSystem fs = cluster.getFileSystem(1);
    Path file2 = new Path("/test/testBlockScanInterval");
    DFSTestUtil.createFile(fs,1);
    }
  } finally {
    cluster.shutdown();
  }
}
项目:hadoop-TCP    文件TestMultipleNNDataBlockScanner.java   
/**
 * HDFS-3828: DN rescans blocks too frequently
 * 
 * @throws Exception
 */
@Test(timeout=120000)
public void testBlockRescanInterval() throws IOException {
  ((Log4JLogger)BlockPoolSliceScanner.LOG).getLogger().setLevel(Level.ALL);
  Configuration conf = new HdfsConfiguration();
  cluster = new MiniDFSCluster.Builder(conf).build();

  try {
    FileSystem fs = cluster.getFileSystem();
    Path file1 = new Path("/test/testBlockScanInterval");
    DFSTestUtil.createFile(fs,1);
    }
  } finally {
    cluster.shutdown();
  }
}
项目:hardfs    文件TestMultipleNNDataBlockScanner.java   
@Test(timeout=120000)
public void test2NNBlockRescanInterval() throws IOException {
  ((Log4JLogger)BlockPoolSliceScanner.LOG).getLogger().setLevel(Level.ALL);
  Configuration conf = new HdfsConfiguration();
  cluster = new MiniDFSCluster.Builder(conf)
      .nnTopology(MiniDFSNNTopology.simpleFederatedTopology(3))
      .build();

  try {
    FileSystem fs = cluster.getFileSystem(1);
    Path file2 = new Path("/test/testBlockScanInterval");
    DFSTestUtil.createFile(fs,1);
    }
  } finally {
    cluster.shutdown();
  }
}
项目:hardfs    文件TestMultipleNNDataBlockScanner.java   
/**
 * HDFS-3828: DN rescans blocks too frequently
 * 
 * @throws Exception
 */
@Test(timeout=120000)
public void testBlockRescanInterval() throws IOException {
  ((Log4JLogger)BlockPoolSliceScanner.LOG).getLogger().setLevel(Level.ALL);
  Configuration conf = new HdfsConfiguration();
  cluster = new MiniDFSCluster.Builder(conf).build();

  try {
    FileSystem fs = cluster.getFileSystem();
    Path file1 = new Path("/test/testBlockScanInterval");
    DFSTestUtil.createFile(fs,1);
    }
  } finally {
    cluster.shutdown();
  }
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。