Package java.util.concurrent

Examples of java.util.concurrent.ScheduledThreadPoolExecutor


        }

        eventSupport = new TaskEventSupport();
        eventKeys = new EventKeys();
        eventSupport.addEventListener(new MessagingTaskEventListener(eventKeys));
        scheduler = new ScheduledThreadPoolExecutor(3);

        long now = System.currentTimeMillis();
        for (Object object : em.createNamedQuery("UnescalatedDeadlines").getResultList()) {
            DeadlineSummary summary = (DeadlineSummary) object;
            schedule(new ScheduledTaskDeadline(summary.getTaskId(),
View Full Code Here


    /**
     * Starts the service that looks for components.
     */
    public void start() {
        executor = new ScheduledThreadPoolExecutor(1);
        executor.scheduleWithFixedDelay(new ComponentMonitor(), 0, 10, TimeUnit.SECONDS);
    }
View Full Code Here

   protected void setUp() throws Exception
   {
      super.setUp();

      provider = TempFileProvider.create("test", new ScheduledThreadPoolExecutor(2));
   }
View Full Code Here

        }
    }

    public Object getObject() throws Exception {
        if (executor == null) {
            executor = new ScheduledThreadPoolExecutor(1);
            executor.scheduleAtFixedRate(new Runnable() {
                public void run() {
                    simulator.run();
                    try {
                        workingMemory.fireAllRules();
View Full Code Here

      {
        _connectors[i].start();
      }
    }
   
    _scheduler = new ScheduledThreadPoolExecutor(1);
   
    if (_router == null)
      _router = new DefaultRouter();
   
    if (_router instanceof LifeCycle)
View Full Code Here

      ZooKeeperConnectionException, IOException, ClassNotFoundException {
    super(conf);
    errors = getErrorReporter(conf);

    int numThreads = conf.getInt("hbasefsck.numthreads", MAX_NUM_THREADS);
    executor = new ScheduledThreadPoolExecutor(numThreads);
  }
View Full Code Here

      // Mess it up by leaving a hole in the assignment, meta, and hdfs data
      TEST_UTIL.getHBaseAdmin().disableTable(table);
     
      String[] args = {"-sidelineCorruptHFiles", "-repairHoles", "-ignorePreCheckPermission", table};
      ExecutorService exec = new ScheduledThreadPoolExecutor(10);
      HBaseFsck res = hbck.exec(exec, args);

      HFileCorruptionChecker hfcc = res.getHFilecorruptionChecker();
      assertEquals(hfcc.getHFilesChecked(), check);
      assertEquals(hfcc.getCorrupted().size(), corrupt);
View Full Code Here

   * has removed an hfile after the corruption checker learned about it.
   */
  @Test(timeout=120000)
  public void testQuarantineMissingHFile() throws Exception {
    String table = name.getMethodName();
    ExecutorService exec = new ScheduledThreadPoolExecutor(10);
    // inject a fault in the hfcc created.
    final FileSystem fs = FileSystem.get(conf);
    HBaseFsck hbck = new HBaseFsck(conf, exec) {
      public HFileCorruptionChecker createHFileCorruptionChecker(boolean sidelineCorruptHFiles) throws IOException {
        return new HFileCorruptionChecker(conf, executor, sidelineCorruptHFiles) {
View Full Code Here

   * has removed an colfam dir before the corruption checker got to it.
   */
  @Test(timeout=120000)
  public void testQuarantineMissingFamdir() throws Exception {
    String table = name.getMethodName();
    ExecutorService exec = new ScheduledThreadPoolExecutor(10);
    // inject a fault in the hfcc created.
    final FileSystem fs = FileSystem.get(conf);
    HBaseFsck hbck = new HBaseFsck(conf, exec) {
      public HFileCorruptionChecker createHFileCorruptionChecker(boolean sidelineCorruptHFiles) throws IOException {
        return new HFileCorruptionChecker(conf, executor, sidelineCorruptHFiles) {
View Full Code Here

   * has removed a region dir before the corruption checker got to it.
   */
  @Test(timeout=120000)
  public void testQuarantineMissingRegionDir() throws Exception {
    String table = name.getMethodName();
    ExecutorService exec = new ScheduledThreadPoolExecutor(10);
    // inject a fault in the hfcc created.
    final FileSystem fs = FileSystem.get(conf);
    HBaseFsck hbck = new HBaseFsck(conf, exec) {
      public HFileCorruptionChecker createHFileCorruptionChecker(boolean sidelineCorruptHFiles) throws IOException {
        return new HFileCorruptionChecker(conf, executor, sidelineCorruptHFiles) {
View Full Code Here

TOP

Related Classes of java.util.concurrent.ScheduledThreadPoolExecutor

Copyright © 2018 www.massapicom. 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.