You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ee...@apache.org on 2011/03/15 23:52:47 UTC
svn commit: r1081974 -
/cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java
Author: eevans
Date: Tue Mar 15 22:52:47 2011
New Revision: 1081974
URL: http://svn.apache.org/viewvc?rev=1081974&view=rev
Log:
handle SchemaDisagreementException in cli
Patch by eevans; reviewed by brandon.williams for CASSANDRA-2334
Modified:
cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java
Modified: cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java?rev=1081974&r1=1081973&r2=1081974&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java Tue Mar 15 22:52:47 2011
@@ -207,6 +207,10 @@ public class CliClient extends CliUserHe
{
throw new RuntimeException(e.getWhy());
}
+ catch (SchemaDisagreementException e)
+ {
+ throw new RuntimeException("schema does not match across nodes, (try again later).");
+ }
catch (Exception e)
{
throw new RuntimeException(e.getMessage());
@@ -958,9 +962,10 @@ public class CliClient extends CliUserHe
* @throws TException - exception
* @throws InvalidRequestException - exception
* @throws NotFoundException - exception
+ * @throws SchemaDisagreementException
*/
private void executeDelKeySpace(Tree statement)
- throws TException, InvalidRequestException, NotFoundException
+ throws TException, InvalidRequestException, NotFoundException, SchemaDisagreementException
{
if (!CliMain.isConnected())
return;
@@ -977,9 +982,10 @@ public class CliClient extends CliUserHe
* @throws TException - exception
* @throws InvalidRequestException - exception
* @throws NotFoundException - exception
+ * @throws SchemaDisagreementException
*/
private void executeDelColumnFamily(Tree statement)
- throws TException, InvalidRequestException, NotFoundException
+ throws TException, InvalidRequestException, NotFoundException, SchemaDisagreementException
{
if (!CliMain.isConnected() || !hasKeySpace())
return;