Examples of tryStartOffPeakRequest()


Examples of org.apache.hadoop.hbase.regionserver.compactions.OffPeakCompactions.tryStartOffPeakRequest()

    int hourMinusTwo = ((hourOfDay-2+24)%24);

    Configuration conf = TEST_UTIL.getConfiguration();
    OffPeakCompactions opc = new OffPeakCompactions(conf);
    LOG.debug("Testing without off-peak settings...");
    assertFalse(opc.tryStartOffPeakRequest());

    // set peak hour to current time and check compact selection
    conf.setLong("hbase.offpeak.start.hour", hourMinusOne);
    conf.setLong("hbase.offpeak.end.hour", hourPlusOne);
    opc = new OffPeakCompactions(conf);
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.compactions.OffPeakCompactions.tryStartOffPeakRequest()

    conf.setLong("hbase.offpeak.start.hour", hourMinusOne);
    conf.setLong("hbase.offpeak.end.hour", hourPlusOne);
    opc = new OffPeakCompactions(conf);
    LOG.debug("Testing compact selection with off-peak settings (" +
        hourMinusOne + ", " + hourPlusOne + ")");
    assertTrue(opc.tryStartOffPeakRequest());
    opc.endOffPeakRequest();

    // set peak hour outside current selection and check compact selection
    conf.setLong("hbase.offpeak.start.hour", hourMinusTwo);
    conf.setLong("hbase.offpeak.end.hour", hourMinusOne);
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.compactions.OffPeakCompactions.tryStartOffPeakRequest()

    // set peak hour outside current selection and check compact selection
    conf.setLong("hbase.offpeak.start.hour", hourMinusTwo);
    conf.setLong("hbase.offpeak.end.hour", hourMinusOne);
    opc = new OffPeakCompactions(conf);
    assertFalse(opc.tryStartOffPeakRequest());
  }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.