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 B9DB018408 for ; Tue, 15 Mar 2016 19:49:34 +0000 (UTC) Received: (qmail 97858 invoked by uid 500); 15 Mar 2016 19:49:34 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 97807 invoked by uid 500); 15 Mar 2016 19:49:34 -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 97558 invoked by uid 99); 15 Mar 2016 19:49:33 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Mar 2016 19:49:33 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id B8B012C1F56 for ; Tue, 15 Mar 2016 19:49:33 +0000 (UTC) Date: Tue, 15 Mar 2016 19:49:33 +0000 (UTC) From: "Paulo Motta (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-8928) Add downgradesstables 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-8928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15196064#comment-15196064 ] Paulo Motta commented on CASSANDRA-8928: ---------------------------------------- bq. I tried to find something similar of changes on version 2.2 but I didn't find anything, do you have any similar references or similar things, I'll try to see if I can breakdown it, but it seems quite difficult in the sense that I'm not familiar with Cassandra code base. This [blog post|http://distributeddatastore.blogspot.com.br/2013/08/cassandra-sstable-storage-format.html] might have some useful info on previous sstable format to start with. I understand this is not a trivial task so you might need to do a lot of background reading before start doing some real work. You might want to watch these [tutorials|http://www.datastax.com/dev/blog/deep-into-cassandra-internals] on C* internals, in particular the read write path and compactions to understand in which context sstables fit in. The [ccm|https://github.com/pcmanus/ccm] tool is very handy to create throw-away cassandra clusters. A simple exercise you can make to get acquainted with the sstable format is to create a simple table on C* 2.2, insert some data on it, and inspect it with [sstable2json tool|https://docs.datastax.com/en/cassandra/1.2/cassandra/tools/toolsSStable2json_t.html]. Then create the same table on C* 3.X and inspect it with [sstabledump|http://www.datastax.com/dev/blog/debugging-sstables-in-3-0-with-sstabledump] and compare the results. After that you might inspect the {{StandaloneScrubber}} class on {{trunk}} (which implements the [sstablescrub|https://docs.datastax.com/en/cassandra/1.2/cassandra/tools/toolsSSTableScrub_t.html] tool) to understand the flow of reading an sstable and rewriting it in the current format + fix corruptions. Then you might want to hack this tool to read in the current format and write in the {{ka}} format by replacing the {{SSTableRewriter}} with a {{LegacySSTableWriter}} that could initially be a copy of the 2.2 {{BigTableWriter}} (you'll probably have fun for a few weeks with this already). bq. Also before jumping to draw up the framework, I'd like to know is our purpose downgrade an existing SSTable to certain older version or add the possibility to write older version of SSTable? SSTable are immutable structures, so in order to downgrade and existing sstable you need to read it in the current format and then write it in an older format. So the flow is: la-sstable -> -> ka-sstable Please note that if you have questions along the way you can also reach out on #cassandra-dev on irc.freenode.net. > Add downgradesstables > --------------------- > > Key: CASSANDRA-8928 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8928 > Project: Cassandra > Issue Type: New Feature > Components: Tools > Reporter: Jeremy Hanna > Priority: Minor > Labels: gsoc2016, mentor > > As mentioned in other places such as CASSANDRA-8047 and in the wild, sometimes you need to go back. A downgrade sstables utility would be nice for a lot of reasons and I don't know that supporting going back to the previous major version format would be too much code since we already support reading the previous version. -- This message was sent by Atlassian JIRA (v6.3.4#6332)