[ 
https://issues.apache.org/jira/browse/CASSANDRA-15406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17187654#comment-17187654
 ] 

Stefan Miklosovic commented on CASSANDRA-15406:
-----------------------------------------------

[~blerer]

I have incorporated your changes.


Regarding for your last paragraph, the path how output stream gets into 
CassandraOutgoingFile#write. is located in 
NettyStreamingMessageSender#FileStreamTask#run() 

{code:java}
                try (DataOutputStreamPlus outPlus = new 
AsyncStreamingOutputPlus(channel))
                {
                    StreamMessage.serialize(msg, outPlus, streamingVersion, 
session);
                }
                finally
                {
                    channel.attr(TRANSFERRING_FILE_ATTR).set(Boolean.FALSE);
                }
{code}

The other intersting place is 

NettyStreamingMessageSender#sendControlMessage on line 272 but that code path 
does not exercise the CassandraOutgoingFile code.

{code:java}
        DataOutputBufferFixed out = new DataOutputBufferFixed(nioBuf);
        StreamMessage.serialize(message, out, streamingVersion, session);
{code}

DataOutputBufferFixed extends DataOutputBuffer whic extend 
BufferedDataOutputStreamPlus which extends DataOutputStreamPlus so it is not an 
instance of AsyncStreamingOutputPlus anyway.

CassandraStreamWriter and CassandraCompressedStreamWriter are always casting 
parameter of their write method to AsyncStreamingOutputPlus.
CassandraEntireSSTableStreamWriter does this casting in CassandraOutgoingFile 
instead and it takes AsyncStreamingOutputPlus into its write method already.

Hence I believe that such instanceof check is not necessary and it is useless 
there and I removed it. I have run all junit tests locally and nothing has 
errored out on that change.




> Show the progress of data streaming and index build 
> ----------------------------------------------------
>
>                 Key: CASSANDRA-15406
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15406
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Consistency/Streaming, Legacy/Streaming and Messaging, 
> Tool/nodetool
>            Reporter: maxwellguo
>            Assignee: Stefan Miklosovic
>            Priority: Normal
>             Fix For: 4.0, 4.x
>
>          Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> I found that we should supply a command to show the progress of streaming 
> when we do the operation of bootstrap/move/decommission/removenode. For when 
> do data streaming , noboday knows which steps there program are in , so I 
> think a command to show the joing/leaving node's is needed .
>  
> PR [https://github.com/apache/cassandra/pull/558]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to