dineshjoshi commented on code in PR #2104:
URL: https://github.com/apache/cassandra/pull/2104#discussion_r1102110361
##########
src/java/org/apache/cassandra/streaming/StreamResultFuture.java:
##########
@@ -239,8 +239,16 @@ private synchronized void maybeComplete()
StreamState finalState = getCurrentState();
if (finalState.hasFailedSession())
{
- logger.warn("[Stream #{}] Stream failed", planId);
- tryFailure(new StreamException(finalState, "Stream failed"));
+ StringBuilder stringBuilder = new StringBuilder();
+ stringBuilder.append("Stream failed: ");
+ for (SessionInfo info : finalState.getAllSessionInfo())
+ {
+ if (info.isFailed())
+ stringBuilder.append("\nSession peer
").append(info.peer).append(" ").append(info.failureReason);
Review Comment:
Nit: use `append(' ')` instead of `append(" ")`.
##########
src/java/org/apache/cassandra/streaming/StreamState.java:
##########
@@ -56,4 +56,8 @@ public List<SessionSummary> createSummaries()
{
return Lists.newArrayList(Iterables.transform(sessions,
SessionInfo::createSummary));
}
+
+ public Set<SessionInfo> getAllSessionInfo() {
Review Comment:
nit: rename to `Set<SessionInfo> sessions()`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]