cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdusba...@apache.org
Subject svn commit: r927104 - in /cassandra/branches/cassandra-0.6: CHANGES.txt src/java/org/apache/cassandra/streaming/IncomingStreamReader.java
Date Wed, 24 Mar 2010 16:09:47 GMT
Author: gdusbabek
Date: Wed Mar 24 16:09:47 2010
New Revision: 927104

URL: http://svn.apache.org/viewvc?rev=927104&view=rev
Log:
CASSANDRA-916 streaming destination nodes do not update their jmx status. Patch by Gary Dusbabek,
reviewed by Jonathan Ellis.

Modified:
    cassandra/branches/cassandra-0.6/CHANGES.txt
    cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/streaming/IncomingStreamReader.java

Modified: cassandra/branches/cassandra-0.6/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/CHANGES.txt?rev=927104&r1=927103&r2=927104&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.6/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.6/CHANGES.txt Wed Mar 24 16:09:47 2010
@@ -11,6 +11,7 @@
  * Use microseconds-since-epoch (UTC) in cli, instead of milliseconds
  * Treat batch_mutate Deletion with null supercolumn as "apply this predicate 
    to top level supercolumns" (CASSANDRA-834)
+ * Streaming destination nodes do not update their JMX status (CASSANDRA-916)
 
 
 0.6.0-beta3

Modified: cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/streaming/IncomingStreamReader.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/streaming/IncomingStreamReader.java?rev=927104&r1=927103&r2=927104&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/streaming/IncomingStreamReader.java
(original)
+++ cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/streaming/IncomingStreamReader.java
Wed Mar 24 16:09:47 2010
@@ -48,6 +48,7 @@ public class IncomingStreamReader
 
     public void read() throws IOException
     {
+        StreamingService.instance.setStatus("Receiving stream");
         InetSocketAddress remoteAddress = (InetSocketAddress)socketChannel.socket().getRemoteSocketAddress();
         if (logger.isDebugEnabled())
           logger.debug("Creating file for " + pendingFile.getTargetFile());
@@ -61,6 +62,7 @@ public class IncomingStreamReader
                 bytesRead += fc.transferFrom(socketChannel, bytesRead, FileStreamTask.CHUNK_SIZE);
                 pendingFile.update(bytesRead);
             }
+            StreamingService.instance.setStatus("Receiving stream: finished reading chunk,
awaiting more");
         }
         catch (IOException ex)
         {
@@ -70,6 +72,7 @@ public class IncomingStreamReader
             /* Delete the orphaned file. */
             File file = new File(pendingFile.getTargetFile());
             file.delete();
+            StreamingService.instance.setStatus("Receiving stream: recovering from IO error");
             throw ex;
         }
         finally
@@ -84,6 +87,7 @@ public class IncomingStreamReader
                 logger.debug("Removing stream context " + pendingFile);
             }
             fc.close();
+            StreamingService.instance.setStatus(StreamingService.NOTHING);
             handleStreamCompletion(remoteAddress.getAddress());
         }
     }



Mime
View raw message