hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/web/client/TestKeys.java
@BeforeClass
  public static void init() throws Exception {
    OzoneConfiguration conf = new OzoneConfiguration();

    // Set short block deleting service interval to speed up deletions.
    conf.setTimeDuration(OzoneConfigKeys.OZONE_BLOCK_DELETING_SERVICE_INTERVAL,
        1000, TimeUnit.MILLISECONDS);

    path = GenericTestUtils.getTempPath(TestKeys.class.getSimpleName());
    Logger.getLogger("log4j.logger.org.apache.http").setLevel(Level.DEBUG);

    ozoneCluster = MiniOzoneCluster.newBuilder(conf).build();
    ozoneCluster.waitForClusterToBeReady();
    final int port = ozoneCluster.getHddsDatanodes().get(0)
        .getDatanodeDetails().getOzoneRestPort();
    ozoneRestClient = new OzoneRestClient(
        String.format("http://localhost:%d", port));
    currentTime = Time.now();
  }
/**
   * Create a MiniDFSCluster for testing.
   *
   * @throws IOException
   */
Create a MiniDFSCluster for testing.
Create a MiniDFSCluster for testing .
@BeforeClass
  public static void init() throws Exception {
    OzoneConfiguration conf = new OzoneConfiguration();
    conf.setTimeDuration(OzoneConfigKeys.OZONE_BLOCK_DELETING_SERVICE_INTERVAL,
        1000, TimeUnit.MILLISECONDS);
    path = GenericTestUtils.getTempPath(TestKeys.class.getSimpleName());
    Logger.getLogger("log4j.logger.org.apache.http").setLevel(Level.DEBUG);
    ozoneCluster = MiniOzoneCluster.newBuilder(conf).build();
    ozoneCluster.waitForClusterToBeReady();
    final int port = ozoneCluster.getHddsDatanodes().get(0)
        .getDatanodeDetails().getOzoneRestPort();
    ozoneRestClient = new OzoneRestClient(
        String.format("http://localhost:%d", port));
    currentTime = Time.now();
  }
@ BeforeClass public static void init ( ) throws Exception { OzoneConfiguration conf = new OzoneConfiguration ( ) ; conf . setTimeDuration ( OzoneConfigKeys . OZONE_BLOCK_DELETING_SERVICE_INTERVAL , 1000 , TimeUnit . MILLISECONDS ) ; path = GenericTestUtils . getTempPath ( TestKeys . class . getSimpleName ( ) ) ; Logger . getLogger ( "log4j.logger.org.apache.http" ) . setLevel ( Level . DEBUG ) ; ozoneCluster = MiniOzoneCluster . newBuilder ( conf ) . build ( ) ; ozoneCluster . waitForClusterToBeReady ( ) ; final int port = ozoneCluster . getHddsDatanodes ( ) . get ( 0 ) . getDatanodeDetails ( ) . getOzoneRestPort ( ) ; ozoneRestClient = new OzoneRestClient ( String . format ( "http://localhost:%d" , port ) ) ; currentTime = Time . now ( ) ; }
Create a MiniDFSCluster for testing.
Create a MiniDFSCluster for testing .
// Set short block deleting service interval to speed up deletions.