You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sa...@apache.org on 2015/05/20 12:09:46 UTC
[1/3] cassandra git commit: Check connection errors more reliably in
CqlRecordWriter
Repository: cassandra
Updated Branches:
refs/heads/cassandra-2.2 e4eba2538 -> f970de557
refs/heads/trunk eaf7d81e7 -> 16736314b
Check connection errors more reliably in CqlRecordWriter
Patch by Philip Thompson; reviewed by Sam Tunnicliffe for CASSANDRA-9419
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f970de55
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f970de55
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f970de55
Branch: refs/heads/cassandra-2.2
Commit: f970de55746dd074843d8cfd5385b12acda56ee9
Parents: e4eba25
Author: Philip Thompson <pt...@gmail.com>
Authored: Wed May 20 10:49:02 2015 +0100
Committer: Sam Tunnicliffe <sa...@beobal.com>
Committed: Wed May 20 10:51:45 2015 +0100
----------------------------------------------------------------------
.../org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f970de55/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java b/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java
index 132273c..c507197 100644
--- a/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java
+++ b/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java
@@ -28,6 +28,7 @@ import org.slf4j.LoggerFactory;
import com.datastax.driver.core.exceptions.AuthenticationException;
+import com.datastax.driver.core.exceptions.DriverException;
import com.datastax.driver.core.exceptions.InvalidQueryException;
import com.datastax.driver.core.exceptions.NoHostAvailableException;
import com.datastax.driver.core.BoundStatement;
@@ -321,7 +322,10 @@ class CqlRecordWriter extends RecordWriter<Map<String, ByteBuffer>, List<ByteBuf
catch (Exception e)
{
//If connection died due to Interrupt, just try connecting to the endpoint again.
- if (Thread.interrupted()) {
+ //There are too many ways for the Thread.interrupted() state to be cleared, so
+ //we can't rely on that here. Until the java driver gives us a better way of knowing
+ //that this exception came from an InterruptedException, this is the best solution.
+ if (e instanceof DriverException && e.getMessage().contains("Connection thread interrupted")) {
lastException = new IOException(e);
iter.previous();
}
@@ -334,6 +338,7 @@ class CqlRecordWriter extends RecordWriter<Map<String, ByteBuffer>, List<ByteBuf
lastException = new IOException(e);
break outer;
}
+ continue;
}
try
[3/3] cassandra git commit: Merge branch 'cassandra-2.2' into trunk
Posted by sa...@apache.org.
Merge branch 'cassandra-2.2' into trunk
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/16736314
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/16736314
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/16736314
Branch: refs/heads/trunk
Commit: 16736314b7a40de4c35eeccb8c88dfea03fb20e0
Parents: eaf7d81 f970de5
Author: Sam Tunnicliffe <sa...@beobal.com>
Authored: Wed May 20 10:58:53 2015 +0100
Committer: Sam Tunnicliffe <sa...@beobal.com>
Committed: Wed May 20 10:58:53 2015 +0100
----------------------------------------------------------------------
.../org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
[2/3] cassandra git commit: Check connection errors more reliably in
CqlRecordWriter
Posted by sa...@apache.org.
Check connection errors more reliably in CqlRecordWriter
Patch by Philip Thompson; reviewed by Sam Tunnicliffe for CASSANDRA-9419
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f970de55
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f970de55
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f970de55
Branch: refs/heads/trunk
Commit: f970de55746dd074843d8cfd5385b12acda56ee9
Parents: e4eba25
Author: Philip Thompson <pt...@gmail.com>
Authored: Wed May 20 10:49:02 2015 +0100
Committer: Sam Tunnicliffe <sa...@beobal.com>
Committed: Wed May 20 10:51:45 2015 +0100
----------------------------------------------------------------------
.../org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f970de55/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java b/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java
index 132273c..c507197 100644
--- a/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java
+++ b/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java
@@ -28,6 +28,7 @@ import org.slf4j.LoggerFactory;
import com.datastax.driver.core.exceptions.AuthenticationException;
+import com.datastax.driver.core.exceptions.DriverException;
import com.datastax.driver.core.exceptions.InvalidQueryException;
import com.datastax.driver.core.exceptions.NoHostAvailableException;
import com.datastax.driver.core.BoundStatement;
@@ -321,7 +322,10 @@ class CqlRecordWriter extends RecordWriter<Map<String, ByteBuffer>, List<ByteBuf
catch (Exception e)
{
//If connection died due to Interrupt, just try connecting to the endpoint again.
- if (Thread.interrupted()) {
+ //There are too many ways for the Thread.interrupted() state to be cleared, so
+ //we can't rely on that here. Until the java driver gives us a better way of knowing
+ //that this exception came from an InterruptedException, this is the best solution.
+ if (e instanceof DriverException && e.getMessage().contains("Connection thread interrupted")) {
lastException = new IOException(e);
iter.previous();
}
@@ -334,6 +338,7 @@ class CqlRecordWriter extends RecordWriter<Map<String, ByteBuffer>, List<ByteBuf
lastException = new IOException(e);
break outer;
}
+ continue;
}
try