cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject [5/6] git commit: Merge branch 'cassandra-1.1' into cassandra-1.2
Date Fri, 01 Feb 2013 21:35:16 GMT
Merge branch 'cassandra-1.1' into cassandra-1.2

Conflicts:
	src/java/org/apache/cassandra/tools/NodeProbe.java


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/15214fee
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/15214fee
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/15214fee

Branch: refs/heads/cassandra-1.2
Commit: 15214fee107ba27aa9cc7f74524e071f31085257
Parents: fa1f9ba 6bddbb2
Author: Yuki Morishita <yukim@apache.org>
Authored: Fri Feb 1 15:34:44 2013 -0600
Committer: Yuki Morishita <yukim@apache.org>
Committed: Fri Feb 1 15:34:44 2013 -0600

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 .../cassandra/service/AntiEntropyService.java      |    5 ++-
 src/java/org/apache/cassandra/tools/NodeCmd.java   |    2 +-
 src/java/org/apache/cassandra/tools/NodeProbe.java |   17 ++++++++++++--
 4 files changed, 19 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/15214fee/CHANGES.txt
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15214fee/src/java/org/apache/cassandra/service/AntiEntropyService.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/service/AntiEntropyService.java
index a4af6b9,f3ca1c2..704ff86
--- a/src/java/org/apache/cassandra/service/AntiEntropyService.java
+++ b/src/java/org/apache/cassandra/service/AntiEntropyService.java
@@@ -663,12 -687,13 +663,13 @@@ public class AntiEntropyServic
              {
                  if (!FailureDetector.instance.isAlive(endpoint))
                  {
+                     String message = String.format("Cannot proceed on repair because a neighbor
(%s) is dead: session failed", endpoint);
                      differencingDone.signalAll();
-                     logger.info(String.format("[repair #%s] Cannot proceed on repair because
a neighbor (%s) is dead: session failed", getName(), endpoint));
-                     return;
+                     logger.error(String.format("[repair #%s] ", getName()) + message);
+                     throw new IOException(message);
                  }
  
 -                if (Gossiper.instance.getVersion(endpoint) < MessagingService.VERSION_11
&& isSequential)
 +                if (MessagingService.instance().getVersion(endpoint) < MessagingService.VERSION_11
&& isSequential)
                  {
                      logger.info(String.format("[repair #%s] Cannot repair using snapshots
as node %s is pre-1.1", getName(), endpoint));
                      return;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15214fee/src/java/org/apache/cassandra/tools/NodeCmd.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15214fee/src/java/org/apache/cassandra/tools/NodeProbe.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/tools/NodeProbe.java
index 7a7c60c,036d653..80abb87
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@@ -77,9 -79,8 +77,10 @@@ public class NodeProb
      public MessagingServiceMBean msProxy;
      private FailureDetectorMBean fdProxy;
      private CacheServiceMBean cacheService;
 +    private PBSPredictorMBean PBSPredictorProxy;
      private StorageProxyMBean spProxy;
 +    private HintedHandOffManagerMBean hhProxy;
+     private boolean failed;
  
      /**
       * Creates a NodeProbe using the specified JMX host, port, username, and password.
@@@ -217,7 -214,8 +218,8 @@@
          try
          {
              ssProxy.addNotificationListener(runner, null, null);
-             runner.repairAndWait(ssProxy, isSequential, isLocal, primaryRange);
 -            if (!runner.repairAndWait(ssProxy, isSequential, primaryRange))
++            if (!runner.repairAndWait(ssProxy, isSequential, isLocal, primaryRange))
+                 failed = true;
          }
          catch (Exception e)
          {
@@@ -864,9 -820,9 +872,9 @@@ class RepairRunner implements Notificat
          this.columnFamilies = columnFamilies;
      }
  
-     public void repairAndWait(StorageServiceMBean ssProxy, boolean isSequential, boolean
isLocal, boolean primaryRangeOnly) throws InterruptedException
 -    public boolean repairAndWait(StorageServiceMBean ssProxy, boolean isSequential, boolean
primaryRangeOnly) throws InterruptedException
++    public boolean repairAndWait(StorageServiceMBean ssProxy, boolean isSequential, boolean
isLocal, boolean primaryRangeOnly) throws InterruptedException
      {
 -        cmd = ssProxy.forceRepairAsync(keyspace, isSequential, primaryRangeOnly, columnFamilies);
 +        cmd = ssProxy.forceRepairAsync(keyspace, isSequential, isLocal, primaryRangeOnly,
columnFamilies);
          if (cmd > 0)
          {
              condition.await();
@@@ -888,8 -847,9 +897,10 @@@
              {
                  String message = String.format("[%s] %s", format.format(notification.getTimeStamp()),
notification.getMessage());
                  out.println(message);
 +                // repair status is int array with [0] = cmd number, [1] = status
-                 if (status[1] == AntiEntropyService.Status.FINISHED.ordinal())
+                 if (status[1] == AntiEntropyService.Status.SESSION_FAILED.ordinal())
+                     success = false;
+                 else if (status[1] == AntiEntropyService.Status.FINISHED.ordinal())
                      condition.signalAll();
              }
          }


Mime
View raw message