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();
  }
}

相关文章

买水果
比较全面的redis工具类
gson 反序列化到多态子类
java 版本的 mb_strwidth
JAVA 反转字符串的最快方法,大概比StringBuffer.reverse()性...
com.google.gson.internal.bind.ArrayTypeAdapter的实例源码...