Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 77A879231 for ; Tue, 12 Jun 2012 20:31:43 +0000 (UTC) Received: (qmail 11953 invoked by uid 500); 12 Jun 2012 20:31:43 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 11912 invoked by uid 500); 12 Jun 2012 20:31:43 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 11900 invoked by uid 99); 12 Jun 2012 20:31:43 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jun 2012 20:31:43 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id E9F9914285F for ; Tue, 12 Jun 2012 20:31:42 +0000 (UTC) Date: Tue, 12 Jun 2012 20:31:42 +0000 (UTC) From: "Jonathan Ellis (JIRA)" To: commits@cassandra.apache.org Message-ID: <286083518.9172.1339533102960.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1366038933.17263.1338400343636.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (CASSANDRA-4297) Use java NIO as much as possible when streaming compressed SSTables MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-4297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13293900#comment-13293900 ] Jonathan Ellis commented on CASSANDRA-4297: ------------------------------------------- LGTM, +1. bq. The reason why I use Set here is to eliminate duplicate chunks. Given two different file section can be mapped to just one chunk Can you expand the "since sections are not guaranteed to be sorted" comment to elaborate on that? (Still might be a bit cleaner to just new ArrayList(set) instead of manually copying to array; performance difference would be negligible.) > Use java NIO as much as possible when streaming compressed SSTables > ------------------------------------------------------------------- > > Key: CASSANDRA-4297 > URL: https://issues.apache.org/jira/browse/CASSANDRA-4297 > Project: Cassandra > Issue Type: Improvement > Reporter: Yuki Morishita > Assignee: Yuki Morishita > Priority: Minor > Labels: streaming > Fix For: 1.2 > > Attachments: 4297-v2.txt, 4297.txt > > > Back in 0.8, streaming uses java NIO (FileChannel#transferTo/transferFrom) to perform zero copy file transfer between nodes. Since 1.0, in order to add new features like sstable compression and internode encryption we had to switch to java IO Input/OutputStreams. What we currently do to transfer compressed SSTable is, in source node, 1) decompress chunk in SSTable, 2) compress using LZF for network, and in destination node, 3) decompress using LZF as reading from socket, 4) compress for SSTable on disk. > Now, 1.1 comes out with SSTable compression turned on by default. It is reasonable to transfer compressed file as is using NIO instead of decompress/compress in source node. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira