Package org.apache.accumulo.core.util

Examples of org.apache.accumulo.core.util.LoggingRunnable


              completeFailures.put(mapFile, empty);
            } else
              assignments.put(mapFile, tabletsToAssignMapFileTo);
          }
        };
        threadPool.submit(new TraceRunnable(new LoggingRunnable(log, getAssignments)));
      }
      threadPool.shutdown();
      while (!threadPool.isTerminated()) {
        try {
          threadPool.awaitTermination(60, TimeUnit.SECONDS);
View Full Code Here


         
          ais.put(entry.getKey(), assignmentInfoList);
        }
      };
     
      threadPool.submit(new TraceRunnable(new LoggingRunnable(log, estimationTask)));
    }
   
    threadPool.shutdown();
   
    while (!threadPool.isTerminated()) {
View Full Code Here

    ExecutorService threadPool = Executors.newFixedThreadPool(numThreads);
   
    for (Entry<String,Map<KeyExtent,List<PathSize>>> entry : assignmentsPerTabletServer.entrySet()) {
      String location = entry.getKey();
      threadPool
          .submit(new TraceRunnable(new LoggingRunnable(log, new AssignmentTask(credentials, assignmentFailures, tableName, location, entry.getValue()))));
    }
   
    threadPool.shutdown();
   
    while (!threadPool.isTerminated()) {
View Full Code Here

    ThreadFactory factory = new ThreadFactory() {
      AtomicInteger threadId = new AtomicInteger();
     
      @Override
      public Thread newThread(Runnable r) {
        return new Thread(new LoggingRunnable(log, r), "ClientPool-" + threadId.getAndIncrement());
      }
    };
    // 2. allow tasks to queue, potentially forever
    final BlockingQueue<Runnable> queue = new LinkedBlockingQueue<Runnable>();
    // 3. keep the number of threads small
View Full Code Here

        } catch (Error e) {
          Halt.halt("Unexpected error in TThreadPoolServer " + e + ", halting.");
        }
      }
    };
    serveTask = new LoggingRunnable(TServerUtils.log, serveTask);
    Thread thread = new Daemon(serveTask, threadName);
    thread.start();
    return result;
  }
View Full Code Here

            Tablet tablet = entry.getValue();
           
            // if we need to split AND compact, we need a good way
            // to decide what to do
            if (tablet.needsSplit()) {
              resourceManager.executeSplit(tablet.getExtent(), new LoggingRunnable(log, new SplitRunner(tablet)));
              continue;
            }
           
            int maxLogEntriesPerTablet = ServerConfiguration.getTableConfiguration(tablet.getExtent().getTableId().toString()).getCount(
                Property.TABLE_MINC_LOGS_MAX);
View Full Code Here

            public void run() {
              log.info("adding tablet " + extent + " back to the assignment pool (retry " + retryAttempt + ")");
              AssignmentHandler handler = new AssignmentHandler(extentToOpen, retryAttempt + 1);
              if (isMetaDataTablet) {
                if (Constants.ROOT_TABLET_EXTENT.equals(extent)) {
                  new Thread(new LoggingRunnable(log, handler), "Root tablet assignment retry").start();
                } else {
                  resourceManager.addMetaDataAssignment(handler);
                }
              } else {
                resourceManager.addAssignment(handler);
View Full Code Here

      }
     
      // add the assignment job to the appropriate queue
      log.info("Loading tablet " + extent);
     
      final Runnable ah = new LoggingRunnable(log, new AssignmentHandler(extent));
      // Root tablet assignment must take place immediately
      if (extent.compareTo(Constants.ROOT_TABLET_EXTENT) == 0) {
        new Thread("Root Tablet Assignment") {
          public void run() {
            ah.run();
            if (onlineTablets.containsKey(extent)) {
              log.info("Root tablet loaded: " + extent);
            } else {
              log.info("Root tablet failed to load");
            }
View Full Code Here

        throw new RuntimeException(e);
      }
     
      KeyExtent extent = new KeyExtent(textent);
     
      resourceManager.addMigration(extent, new LoggingRunnable(log, new UnloadTabletHandler(extent, save)));
    }
View Full Code Here

        public void run() {
          processTabletMemStats();
        }
      };
     
      Thread t1 = new Daemon(new LoggingRunnable(log, r1));
      t1.setPriority(Thread.NORM_PRIORITY + 1);
      t1.setName("Accumulo Memory Guard");
      t1.start();
     
      Runnable r2 = new Runnable() {
        public void run() {
          manageMemory();
        }
      };
     
      Thread t2 = new Daemon(new LoggingRunnable(log, r2));
      t2.setName("Accumulo Minor Compaction Initiator");
      t2.start();
     
    }
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.util.LoggingRunnable

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.