public void addMigration(KeyExtent tablet, Runnable migrationHandler) { if (tablet.isRootTablet()) { migrationHandler.run(); } else if (tablet.isMeta()) { defaultMigrationPool.execute(migrationHandler); } else { migrationPool.execute(migrationHandler); } }
public void executeMajorCompaction(KeyExtent tablet, Runnable compactionTask) { if (tablet.isRootTablet()) { rootMajorCompactionThreadPool.execute(compactionTask); } else if (tablet.isMeta()) { defaultMajorCompactionThreadPool.execute(compactionTask); } else { majorCompactionThreadPool.execute(compactionTask); } }
public void executeReadAhead(KeyExtent tablet, Runnable task) { if (tablet.isRootTablet()) { task.run(); } else if (tablet.isMeta()) { defaultReadAheadThreadPool.execute(task); } else { readAheadThreadPool.execute(task); } }
public void executeSplit(KeyExtent tablet, Runnable splitTask) { if (tablet.isMeta()) { if (tablet.isRootTablet()) { log.warn("Saw request to split root tablet, ignoring"); return; } defaultSplitThreadPool.execute(splitTask); } else { splitThreadPool.execute(splitTask); } }