Return-Path: Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: (qmail 44180 invoked from network); 24 Jan 2011 16:16:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Jan 2011 16:16:08 -0000 Received: (qmail 15703 invoked by uid 500); 24 Jan 2011 16:16:08 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 15588 invoked by uid 500); 24 Jan 2011 16:16:06 -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 15580 invoked by uid 99); 24 Jan 2011 16:16:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Jan 2011 16:16:05 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Jan 2011 16:16:05 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p0OGFihK014820 for ; Mon, 24 Jan 2011 16:15:44 GMT Message-ID: <4201924.158041295885744495.JavaMail.jira@thor> Date: Mon, 24 Jan 2011 11:15:44 -0500 (EST) From: "Nick Bailey (JIRA)" To: commits@cassandra.apache.org Subject: [jira] Commented: (CASSANDRA-1898) json2sstable should support streaming In-Reply-To: <12589909.1031293128208162.JavaMail.jira@thor> 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-1898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985778#action_12985778 ] Nick Bailey commented on CASSANDRA-1898: ---------------------------------------- It certainly shouldn't error. I think the fix could be with with either export or import though. Is having a comma in an object with no attribute like that technically valid json? If so I would say json2sstable should handle that case and skip it. If not it might be easier to just fix sstable2json to not output that comma. Or maybe they should both be fixed. > json2sstable should support streaming > ------------------------------------- > > Key: CASSANDRA-1898 > URL: https://issues.apache.org/jira/browse/CASSANDRA-1898 > Project: Cassandra > Issue Type: Improvement > Components: Tools > Reporter: Nick Bailey > Assignee: Pavel Yaskevich > Fix For: 0.7.1 > > Attachments: CASSANDRA-1898-v2.patch, CASSANDRA-1898-v3.patch, CASSANDRA-1898-v4.patch, CASSANDRA-1898.patch > > Original Estimate: 8h > Time Spent: 8h > Remaining Estimate: 0h > > json2sstable loads the entire json file into memory. This is so it can sort the file before creating an sstable. If the file was created using sstable2json and the partitioner isn't changing, this isn't necessary. For very large files this means json2sstable requires a huge amount of memory. > There should be an option to stream the file. A simple check for out of order keys will prevent writing bad sstables. > This should be possible with the SAX style parser available in our current json library. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.