public void register(final StreamResultFuture result) { result.addEventListener(notifier); // Make sure we remove the stream on completion (whether successful or not) result.addListener(new Runnable() { public void run() { initiatedStreams.remove(result.planId); } }, MoreExecutors.directExecutor()); initiatedStreams.put(result.planId, result); }
public void register(final StreamResultFuture result) { result.addEventListener(notifier); // Make sure we remove the stream on completion (whether successful or not) result.addListener(new Runnable() { public void run() { initiatedStreams.remove(result.planId); } }, MoreExecutors.directExecutor()); initiatedStreams.put(result.planId, result); }
public void registerReceiving(final StreamResultFuture result) { result.addEventListener(notifier); // Make sure we remove the stream on completion (whether successful or not) result.addListener(new Runnable() { public void run() { receivingStreams.remove(result.planId); } }, MoreExecutors.directExecutor()); receivingStreams.put(result.planId, result); }
public void registerReceiving(final StreamResultFuture result) { result.addEventListener(notifier); // Make sure we remove the stream on completion (whether successful or not) result.addListener(new Runnable() { public void run() { receivingStreams.remove(result.planId); } }, MoreExecutors.directExecutor()); receivingStreams.put(result.planId, result); }
public void register(final StreamResultFuture result) { result.addEventListener(notifier); // Make sure we remove the stream on completion (whether successful or not) result.addListener(new Runnable() { public void run() { initiatedStreams.remove(result.planId); } }, MoreExecutors.sameThreadExecutor()); initiatedStreams.put(result.planId, result); }
public void register(final StreamResultFuture result) { result.addEventListener(notifier); // Make sure we remove the stream on completion (whether successful or not) result.addListener(new Runnable() { public void run() { initiatedStreams.remove(result.planId); } }, MoreExecutors.directExecutor()); initiatedStreams.put(result.planId, result); }
public void registerReceiving(final StreamResultFuture result) { result.addEventListener(notifier); // Make sure we remove the stream on completion (whether successful or not) result.addListener(new Runnable() { public void run() { receivingStreams.remove(result.planId); } }, MoreExecutors.directExecutor()); receivingStreams.put(result.planId, result); }
public void registerReceiving(final StreamResultFuture result) { result.addEventListener(notifier); // Make sure we remove the stream on completion (whether successful or not) result.addListener(new Runnable() { public void run() { receivingStreams.remove(result.planId); } }, MoreExecutors.sameThreadExecutor()); receivingStreams.put(result.planId, result); }
private void connectSequentially(StreamResultFuture future) { sessionsToConnect = getAllStreamSessions().iterator(); future.addEventListener(new StreamEventHandler() { public void handleStreamEvent(StreamEvent event) { if (event.eventType == StreamEvent.Type.STREAM_PREPARED || event.eventType == StreamEvent.Type.STREAM_COMPLETE) connectNext(); } public void onSuccess(StreamState result) { } public void onFailure(Throwable t) { } }); connectNext(); }
private void connectSequentially(StreamResultFuture future) { sessionsToConnect = getAllStreamSessions().iterator(); future.addEventListener(new StreamEventHandler() { public void handleStreamEvent(StreamEvent event) { if (event.eventType == StreamEvent.Type.STREAM_PREPARED || event.eventType == StreamEvent.Type.STREAM_COMPLETE) connectNext(); } public void onSuccess(StreamState result) { } public void onFailure(Throwable t) { } }); connectNext(); }
private void connectSequentially(StreamResultFuture future) { sessionsToConnect = getAllStreamSessions().iterator(); future.addEventListener(new StreamEventHandler() { public void handleStreamEvent(StreamEvent event) { if (event.eventType == StreamEvent.Type.STREAM_PREPARED || event.eventType == StreamEvent.Type.STREAM_COMPLETE) connectNext(); } public void onSuccess(StreamState result) { } public void onFailure(Throwable t) { } }); connectNext(); }
static StreamResultFuture init(UUID planId, String description, Collection<StreamEventHandler> listeners, StreamCoordinator coordinator) { StreamResultFuture future = createAndRegister(planId, description, coordinator); if (listeners != null) { for (StreamEventHandler listener : listeners) future.addEventListener(listener); } logger.info("[Stream #{}] Executing streaming plan for {}", planId, description); // Initialize and start all sessions for (final StreamSession session : coordinator.getAllStreamSessions()) { session.init(future); } coordinator.connect(future); return future; }
static StreamResultFuture init(UUID planId, String description, Collection<StreamEventHandler> listeners, StreamCoordinator coordinator) { StreamResultFuture future = createAndRegister(planId, description, coordinator); if (listeners != null) { for (StreamEventHandler listener : listeners) future.addEventListener(listener); } logger.info("[Stream #{}] Executing streaming plan for {}", planId, description); // Initialize and start all sessions for (final StreamSession session : coordinator.getAllStreamSessions()) { session.init(future); } coordinator.connectAllStreamSessions(); return future; }
static StreamResultFuture init(UUID planId, String description, Collection<StreamEventHandler> listeners, StreamCoordinator coordinator) { StreamResultFuture future = createAndRegister(planId, description, coordinator); if (listeners != null) { for (StreamEventHandler listener : listeners) future.addEventListener(listener); } logger.info("[Stream #{}] Executing streaming plan for {}", planId, description); // Initialize and start all sessions for (final StreamSession session : coordinator.getAllStreamSessions()) { session.init(future); } coordinator.connect(future); return future; }
static StreamResultFuture init(UUID planId, String description, Collection<StreamEventHandler> listeners, StreamCoordinator coordinator) { StreamResultFuture future = createAndRegister(planId, description, coordinator); if (listeners != null) { for (StreamEventHandler listener : listeners) future.addEventListener(listener); } logger.info("[Stream #{}] Executing streaming plan for {}", planId, description); // Initialize and start all sessions for (final StreamSession session : coordinator.getAllStreamSessions()) { session.init(future); } coordinator.connect(future); return future; }
private void initiateStreaming() { long repairedAt = ActiveRepairService.UNREPAIRED_SSTABLE; InetAddress dest = request.dst; InetAddress preferred = SystemKeyspace.getPreferredIP(dest); if (desc.parentSessionId != null && ActiveRepairService.instance.getParentRepairSession(desc.parentSessionId) != null) repairedAt = ActiveRepairService.instance.getParentRepairSession(desc.parentSessionId).repairedAt; logger.info(String.format("[streaming task #%s] Performing streaming repair of %d ranges with %s", desc.sessionId, request.ranges.size(), request.dst)); StreamResultFuture op = new StreamPlan("Repair", repairedAt, 1) .flushBeforeTransfer(true) // request ranges from the remote node .requestRanges(dest, preferred, desc.keyspace, request.ranges, desc.columnFamily) // send ranges to the remote node .transferRanges(dest, preferred, desc.keyspace, request.ranges, desc.columnFamily) .execute(); op.addEventListener(this); }
bootstrapStreamResult.addEventListener(new StreamEventHandler()
bootstrapStreamResult.addEventListener(new StreamEventHandler()
bootstrapStreamResult.addEventListener(new StreamEventHandler()