You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by yu...@apache.org on 2013/03/29 15:58:31 UTC

[1/3] git commit: Fix streaming compressed files when using encryption; patch by yukim reviewed by iamaleksey for CASSANDRA-5391

Updated Branches:
  refs/heads/cassandra-1.2 6de0495e5 -> cc6429e27
  refs/heads/trunk 338fa9a30 -> 95fc48947


Fix streaming compressed files when using encryption; patch by yukim reviewed by iamaleksey for CASSANDRA-5391


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

Branch: refs/heads/cassandra-1.2
Commit: cc6429e2722e764dce8cad77660732146ed596ab
Parents: 6de0495
Author: Yuki Morishita <yu...@apache.org>
Authored: Fri Mar 29 09:58:07 2013 -0500
Committer: Yuki Morishita <yu...@apache.org>
Committed: Fri Mar 29 09:58:07 2013 -0500

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 .../compress/CompressedFileStreamTask.java         |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cc6429e2/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 400e5c3..dafb9a8 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -13,6 +13,7 @@
  * Fix validation for IN where clauses with collections (CASSANDRA-5376)
  * Copy resultSet on count query to avoid ConcurrentModificationException (CASSANDRA-5382)
  * Correctly typecheck in CQL3 even with ReversedType (CASSANDRA-5386)
+ * Fix streaming compressed files when using encryption (CASSANDRA-5391)
 Merged from 1.1:
  * cli: Quote ks and cf names in schema output when needed (CASSANDRA-5052)
  * Fix bad default for min/max timestamp in SSTableMetadata (CASSANDRA-5372)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cc6429e2/src/java/org/apache/cassandra/streaming/compress/CompressedFileStreamTask.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/streaming/compress/CompressedFileStreamTask.java b/src/java/org/apache/cassandra/streaming/compress/CompressedFileStreamTask.java
index dda9d7d..2551ca0 100644
--- a/src/java/org/apache/cassandra/streaming/compress/CompressedFileStreamTask.java
+++ b/src/java/org/apache/cassandra/streaming/compress/CompressedFileStreamTask.java
@@ -92,6 +92,7 @@ public class CompressedFileStreamTask extends FileStreamTask
                     }
                     else
                     {
+                        file.seek(section.left);
                         // NIO is not available. Fall back to normal streaming.
                         // This happens when inter-node encryption is turned on.
                         if (transferBuffer == null)
@@ -106,6 +107,9 @@ public class CompressedFileStreamTask extends FileStreamTask
                     header.file.progress += lastWrite;
                 }
 
+                if (sc == null)
+                    socket.getOutputStream().flush();
+
                 logger.debug("Bytes transferred " + bytesTransferred + "/" + header.file.size);
             }
             StreamingMetrics.totalOutgoingBytes.inc(totalBytesTransferred);


[3/3] git commit: Merge branch 'cassandra-1.2' into trunk

Posted by yu...@apache.org.
Merge branch 'cassandra-1.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/95fc4894
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/95fc4894
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/95fc4894

Branch: refs/heads/trunk
Commit: 95fc48947beff9cb7574b314eb3e23ee1b2e4b53
Parents: 338fa9a cc6429e
Author: Yuki Morishita <yu...@apache.org>
Authored: Fri Mar 29 09:58:16 2013 -0500
Committer: Yuki Morishita <yu...@apache.org>
Committed: Fri Mar 29 09:58:16 2013 -0500

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 .../compress/CompressedFileStreamTask.java         |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/95fc4894/src/java/org/apache/cassandra/streaming/compress/CompressedFileStreamTask.java
----------------------------------------------------------------------


[2/3] git commit: Fix streaming compressed files when using encryption; patch by yukim reviewed by iamaleksey for CASSANDRA-5391

Posted by yu...@apache.org.
Fix streaming compressed files when using encryption; patch by yukim reviewed by iamaleksey for CASSANDRA-5391


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

Branch: refs/heads/trunk
Commit: cc6429e2722e764dce8cad77660732146ed596ab
Parents: 6de0495
Author: Yuki Morishita <yu...@apache.org>
Authored: Fri Mar 29 09:58:07 2013 -0500
Committer: Yuki Morishita <yu...@apache.org>
Committed: Fri Mar 29 09:58:07 2013 -0500

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 .../compress/CompressedFileStreamTask.java         |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cc6429e2/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 400e5c3..dafb9a8 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -13,6 +13,7 @@
  * Fix validation for IN where clauses with collections (CASSANDRA-5376)
  * Copy resultSet on count query to avoid ConcurrentModificationException (CASSANDRA-5382)
  * Correctly typecheck in CQL3 even with ReversedType (CASSANDRA-5386)
+ * Fix streaming compressed files when using encryption (CASSANDRA-5391)
 Merged from 1.1:
  * cli: Quote ks and cf names in schema output when needed (CASSANDRA-5052)
  * Fix bad default for min/max timestamp in SSTableMetadata (CASSANDRA-5372)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cc6429e2/src/java/org/apache/cassandra/streaming/compress/CompressedFileStreamTask.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/streaming/compress/CompressedFileStreamTask.java b/src/java/org/apache/cassandra/streaming/compress/CompressedFileStreamTask.java
index dda9d7d..2551ca0 100644
--- a/src/java/org/apache/cassandra/streaming/compress/CompressedFileStreamTask.java
+++ b/src/java/org/apache/cassandra/streaming/compress/CompressedFileStreamTask.java
@@ -92,6 +92,7 @@ public class CompressedFileStreamTask extends FileStreamTask
                     }
                     else
                     {
+                        file.seek(section.left);
                         // NIO is not available. Fall back to normal streaming.
                         // This happens when inter-node encryption is turned on.
                         if (transferBuffer == null)
@@ -106,6 +107,9 @@ public class CompressedFileStreamTask extends FileStreamTask
                     header.file.progress += lastWrite;
                 }
 
+                if (sc == null)
+                    socket.getOutputStream().flush();
+
                 logger.debug("Bytes transferred " + bytesTransferred + "/" + header.file.size);
             }
             StreamingMetrics.totalOutgoingBytes.inc(totalBytesTransferred);