cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdusba...@apache.org
Subject svn commit: r947137 - in /cassandra/branches/cassandra-0.6: bin/nodetool.bat conf/storage-conf.xml src/java/org/apache/cassandra/streaming/StreamOutManager.java src/java/org/apache/cassandra/streaming/StreamingService.java
Date Fri, 21 May 2010 19:36:06 GMT
Author: gdusbabek
Date: Fri May 21 19:36:05 2010
New Revision: 947137

URL: http://svn.apache.org/viewvc?rev=947137&view=rev
Log:
remove echo from nodetool.bat

Modified:
    cassandra/branches/cassandra-0.6/bin/nodetool.bat
    cassandra/branches/cassandra-0.6/conf/storage-conf.xml
    cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/streaming/StreamOutManager.java
    cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/streaming/StreamingService.java

Modified: cassandra/branches/cassandra-0.6/bin/nodetool.bat
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/bin/nodetool.bat?rev=947137&r1=947136&r2=947137&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.6/bin/nodetool.bat (original)
+++ cassandra/branches/cassandra-0.6/bin/nodetool.bat Fri May 21 19:36:05 2010
@@ -39,7 +39,6 @@ goto runNodeTool
 
 :runNodeTool
 echo Starting NodeTool
-echo cp %CASSANDRA_CLASSPATH%
 "%JAVA_HOME%\bin\java" -cp "%CASSANDRA_CLASSPATH%" -Dstorage-config=%CASSANDRA_HOME%\conf\
-Dlog4j.configuration=log4j-tools.properties org.apache.cassandra.tools.NodeCmd %*
 goto finally
 

Modified: cassandra/branches/cassandra-0.6/conf/storage-conf.xml
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/conf/storage-conf.xml?rev=947137&r1=947136&r2=947137&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.6/conf/storage-conf.xml (original)
+++ cassandra/branches/cassandra-0.6/conf/storage-conf.xml Fri May 21 19:36:05 2010
@@ -131,7 +131,7 @@
        ~ a different datacenter, and the others on different racks in the same
        ~ one.)
       -->
-      <ReplicaPlacementStrategy>org.apache.cassandra.locator.RackUnawareStrategy</ReplicaPlacementStrategy>
+      <!-- <ReplicaPlacementStrategy>org.apache.cassandra.locator.RackUnawareStrategy</ReplicaPlacementStrategy>
-->
 
       <!-- Number of replicas of the data -->
       <ReplicationFactor>1</ReplicationFactor>

Modified: cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/streaming/StreamOutManager.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/streaming/StreamOutManager.java?rev=947137&r1=947136&r2=947137&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/streaming/StreamOutManager.java
(original)
+++ cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/streaming/StreamOutManager.java
Fri May 21 19:36:05 2010
@@ -78,6 +78,11 @@ public class StreamOutManager
         return hosts;        
     }
     
+    public static Set<InetAddress> getDestinationsWaiting()
+    {
+        return new HashSet<InetAddress>(pendingDestinations);
+    }
+    
     /** 
      * this method exists so that we don't have to call StreamOutManager.get() which has
a nasty side-effect of 
      * indicating that we are streaming to a particular host.

Modified: cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/streaming/StreamingService.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/streaming/StreamingService.java?rev=947137&r1=947136&r2=947137&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/streaming/StreamingService.java
(original)
+++ cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/streaming/StreamingService.java
Fri May 21 19:36:05 2010
@@ -51,24 +51,43 @@ public class StreamingService implements
     public String getStatus()
     {
         StringBuilder sb = new StringBuilder();
-        sb.append("Receiving from:\n");
-        for (InetAddress source : StreamInManager.getSources())
+        
+        Set<InetAddress> sources = StreamInManager.getSources();
+        if (sources.size() > 0)
         {
-            sb.append(String.format(" %s:\n", source.getHostAddress()));
-            for (PendingFile pf : StreamInManager.getIncomingFiles(source))
+            sb.append("Receiving from:\n");
+            for (InetAddress source : sources)
             {
-                sb.append(String.format("  %s %d/%d\n", pf.getTargetFile(), pf.getPtr(),
pf.getExpectedBytes()));
+                sb.append(String.format(" %s:\n", source.getHostAddress()));
+                for (PendingFile pf : StreamInManager.getIncomingFiles(source))
+                {
+                    sb.append(String.format("  %s %d/%d\n", pf.getTargetFile(), pf.getPtr(),
pf.getExpectedBytes()));
+                }
             }
         }
-        sb.append("Sending to:\n");
-        for (InetAddress dest : StreamOutManager.getDestinations())
+        
+        Set<InetAddress> destinations = StreamOutManager.getDestinations();
+        if (destinations.size() > 0)
         {
-            sb.append(String.format(" %s:\n", dest.getHostAddress()));
-            for (PendingFile pf : StreamOutManager.getPendingFiles(dest))
+            sb.append("Sending to:\n");
+            for (InetAddress dest : destinations)
             {
-                sb.append(String.format("  %s %d/%d\n", pf.getTargetFile(), pf.getPtr(),
pf.getExpectedBytes()));
+                sb.append(String.format(" %s:\n", dest.getHostAddress()));
+                for (PendingFile pf : StreamOutManager.getPendingFiles(dest))
+                {
+                    sb.append(String.format("  %s %d/%d\n", pf.getTargetFile(), pf.getPtr(),
pf.getExpectedBytes()));
+                }
             }
         }
+        
+        Set<InetAddress> waiting = StreamOutManager.getDestinationsWaiting();
+        if (waiting.size() > 0)
+        {
+            sb.append("Destinations waiting for anticompaction:\n");
+            for (InetAddress dest : waiting)
+                sb.append(String.format(" %s\n", dest.getHostAddress()));
+        }
+        
         return sb.toString();
         
     }



Mime
View raw message