/** * When repair finished, do clean up */ public void run() { sessions.remove(session.getId()); } }, MoreExecutors.directExecutor());
/** * When repair finished, do clean up */ public void run() { sessions.remove(session.getId()); } }, MoreExecutors.directExecutor());
/** * When repair finished, do clean up */ public void run() { sessions.remove(session.getId()); } }, MoreExecutors.directExecutor());
/** * Snapshot, validation and sync failures are all handled here */ public void onFailure(Throwable t) { logger.warn("[repair #{}] {} sync failed", session.getId(), desc.columnFamily); SystemDistributedKeyspace.failedRepairJob(session.getId(), desc.keyspace, desc.columnFamily, t); setException(t); } }, taskExecutor);
/** * Snapshot, validation and sync failures are all handled here */ public void onFailure(Throwable t) { logger.warn("[repair #{}] {} sync failed", session.getId(), desc.columnFamily); SystemDistributedKeyspace.failedRepairJob(session.getId(), desc.keyspace, desc.columnFamily, t); setException(t); } }, taskExecutor);
/** * Snapshot, validation and sync failures are all handled here */ public void onFailure(Throwable t) { logger.warn("[repair #{}] {} sync failed", session.getId(), desc.columnFamily); SystemDistributedKeyspace.failedRepairJob(session.getId(), desc.keyspace, desc.columnFamily, t); setException(t); } }, taskExecutor);
public void removeFromActiveSessions(RepairSession session) { Gossiper.instance.unregister(session); sessions.remove(session.getId()); }
public void onFailure(Throwable t) { logger.error(String.format("[repair #%s] Session completed with the following error", getId()), t); Tracing.traceRepair("Session completed with the following error: {}", t); forceShutdown(t); } });
public void onFailure(Throwable t) { logger.error(String.format("[repair #%s] Session completed with the following error", getId()), t); Tracing.traceRepair("Session completed with the following error: {}", t); forceShutdown(t); } });
public void onFailure(Throwable t) { logger.error(String.format("[repair #%s] Session completed with the following error", getId()), t); Tracing.traceRepair("Session completed with the following error: {}", t); forceShutdown(t); } });
public void addToActiveSessions(RepairSession session) { sessions.put(session.getId(), session); Gossiper.instance.register(session); FailureDetector.instance.registerFailureDetectionEventListener(session); }
RepairFuture submitArtificialRepairSession(RepairJobDesc desc) { Set<InetAddress> neighbours = new HashSet<>(); Collection<Range<Token>> keyspaceLocalRanges = StorageService.instance.getLocalRanges(desc.keyspace); neighbours.addAll(ActiveRepairService.getNeighbors(desc.keyspace, keyspaceLocalRanges, desc.range, null, null)); RepairSession session = new RepairSession(desc.parentSessionId, desc.sessionId, desc.range, desc.keyspace, RepairParallelism.PARALLEL, neighbours, new String[]{desc.columnFamily}); sessions.put(session.getId(), session); RepairFuture futureTask = new RepairFuture(session); executor.execute(futureTask); return futureTask; }
/** * Create repair job to run on specific columnfamily * * @param session RepairSession that this RepairJob belongs * @param columnFamily name of the ColumnFamily to repair */ public RepairJob(RepairSession session, String columnFamily) { this.session = session; this.desc = new RepairJobDesc(session.parentRepairSession, session.getId(), session.keyspace, columnFamily, session.getRanges()); this.repairedAt = session.repairedAt; this.taskExecutor = session.taskExecutor; this.parallelismDegree = session.parallelismDegree; }
/** * Create repair job to run on specific columnfamily * * @param session RepairSession that this RepairJob belongs * @param columnFamily name of the ColumnFamily to repair */ public RepairJob(RepairSession session, String columnFamily) { this.session = session; this.desc = new RepairJobDesc(session.parentRepairSession, session.getId(), session.keyspace, columnFamily, session.getRanges()); this.repairedAt = session.repairedAt; this.taskExecutor = session.taskExecutor; this.parallelismDegree = session.parallelismDegree; }
public void onSuccess(List<RepairResult> results) { // this repair session is completed logger.info("[repair #{}] {}", getId(), "Session completed successfully"); Tracing.traceRepair("Completed sync of range {}", ranges); set(new RepairSessionResult(id, keyspace, ranges, results)); taskExecutor.shutdown(); // mark this session as terminated terminate(); }
public void onSuccess(List<RepairResult> results) { // this repair session is completed logger.info("[repair #{}] {}", getId(), "Session completed successfully"); Tracing.traceRepair("Completed sync of range {}", ranges); set(new RepairSessionResult(id, keyspace, ranges, results)); taskExecutor.shutdown(); // mark this session as terminated terminate(); }
public void onSuccess(List<RepairResult> results) { // this repair session is completed logger.info("[repair #{}] {}", getId(), "Session completed successfully"); Tracing.traceRepair("Completed sync of range {}", ranges); set(new RepairSessionResult(id, keyspace, ranges, results)); taskExecutor.shutdown(); // mark this session as terminated terminate(); }