You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Pranay akula <pr...@gmail.com> on 2019/02/07 03:51:15 UTC
How to read the Index.db file
I was trying to get all the partition of a particular SSTable, i have tried
reading Index,db file i can read some part of it but not all of it , is
there any way to convert it to readable format?
Thanks
Pranay
Re: How to read the Index.db file
Posted by Jeff Jirsa <jj...@gmail.com>.
This will probably work if you’re comfortable writing java, but not if you’re running DSE
If you’re using OSS Cassandra, recall that we publish jars with all of the internal classes. You can hook into the index and sstablereader classes and iterate the keys directly (offline).
--
Jeff Jirsa
> On Feb 8, 2019, at 7:44 AM, Pranay akula <pr...@gmail.com> wrote:
>
> Thanks for reply, the problem I was trying to solve is two things count and list of partition keys(users) from cassandra production cluster, I have played around with dsbulk for DSE, so for Apache I thought I can get a list of partition keys from index.db file and remove duplicates which will end up giving me count and list of partition keys (in my case it wrks b/c it has single row per partition)
>
> But I couldn't find a direct way read index.db file
>
>
>
>> On Fri, Feb 8, 2019, 9:07 AM Kenneth Brotman <ke...@yahoo.com.invalid> wrote:
>> This link https://www.datastax.com/dev/blog/debugging-sstables-in-3-0-with-sstabledump explains how to read an SSTable with sstabledump for 3x and sstable2json for 2.x
>>
>>
>>
>> Kenneth Brotman
>>
>>
>>
>> From: Ben Slater [mailto:ben.slater@instaclustr.com]
>> Sent: Thursday, February 07, 2019 1:19 PM
>> To: Cassandra User
>> Subject: Re: How to read the Index.db file
>>
>>
>>
>> They don’t do exactly what you want but depending on why you are trying to get this info you might find our sstable-tools useful: https://github.com/instaclustr/cassandra-sstable-tools
>>
>> ---
>> Ben Slater
>> Chief Product Officer
>>
>>
>> Read our latest technical blog posts here.
>> This email has been sent on behalf of Instaclustr Pty. Limited (Australia) and Instaclustr Inc (USA).
>> This email and any attachments may contain confidential and legally privileged information. If you are not the intended recipient, do not copy or disclose its content, but please reply to this email immediately and highlight the error to the sender and then immediately delete the message.
>>
>>
>>
>>
>> On Fri, 8 Feb 2019 at 08:14, Kenneth Brotman <ke...@yahoo.com.invalid> wrote:
>>
>> When you say you’re trying to get all the partition of a particular SSTable, I’m not sure what you mean. Do you want to make a copy of it? I don’t understand.
>>
>>
>>
>> Kenneth Brotman
>>
>>
>>
>> From: Pranay akula [mailto:pranay.akula2323@gmail.com]
>> Sent: Wednesday, February 06, 2019 7:51 PM
>> To: user@cassandra.apache.org
>> Subject: How to read the Index.db file
>>
>>
>>
>> I was trying to get all the partition of a particular SSTable, i have tried reading Index,db file i can read some part of it but not all of it , is there any way to convert it to readable format?
>>
>>
>>
>>
>>
>> Thanks
>>
>> Pranay
Re: How to read the Index.db file
Posted by Pranay akula <pr...@gmail.com>.
Thanks for reply, the problem I was trying to solve is two things count and
list of partition keys(users) from cassandra production cluster, I have
played around with dsbulk for DSE, so for Apache I thought I can get a list
of partition keys from index.db file and remove duplicates which will end
up giving me count and list of partition keys (in my case it wrks b/c it
has single row per partition)
But I couldn't find a direct way read index.db file
On Fri, Feb 8, 2019, 9:07 AM Kenneth Brotman <ke...@yahoo.com.invalid>
wrote:
> This link
> https://www.datastax.com/dev/blog/debugging-sstables-in-3-0-with-sstabledump
> explains how to read an SSTable with sstabledump for 3x and sstable2json
> for 2.x
>
>
>
> Kenneth Brotman
>
>
>
> *From:* Ben Slater [mailto:ben.slater@instaclustr.com]
> *Sent:* Thursday, February 07, 2019 1:19 PM
> *To:* Cassandra User
> *Subject:* Re: How to read the Index.db file
>
>
>
> They don’t do exactly what you want but depending on why you are trying to
> get this info you might find our sstable-tools useful:
> https://github.com/instaclustr/cassandra-sstable-tools
>
> ---
>
> *Ben Slater*
> *Chief Product Officer*
>
> <https://www.facebook.com/instaclustr> <https://twitter.com/instaclustr>
> <https://www.linkedin.com/company/instaclustr>
>
> Read our latest technical blog posts here
> <https://www.instaclustr.com/blog/>.
>
> This email has been sent on behalf of Instaclustr Pty. Limited (Australia)
> and Instaclustr Inc (USA).
>
> This email and any attachments may contain confidential and legally
> privileged information. If you are not the intended recipient, do not copy
> or disclose its content, but please reply to this email immediately and
> highlight the error to the sender and then immediately delete the message.
>
>
>
>
>
> On Fri, 8 Feb 2019 at 08:14, Kenneth Brotman <ke...@yahoo.com.invalid>
> wrote:
>
> When you say you’re trying to get all the partition of a particular
> SSTable, I’m not sure what you mean. Do you want to make a copy of it? I
> don’t understand.
>
>
>
> Kenneth Brotman
>
>
>
> *From:* Pranay akula [mailto:pranay.akula2323@gmail.com]
> *Sent:* Wednesday, February 06, 2019 7:51 PM
> *To:* user@cassandra.apache.org
> *Subject:* How to read the Index.db file
>
>
>
> I was trying to get all the partition of a particular SSTable, i have
> tried reading Index,db file i can read some part of it but not all of it ,
> is there any way to convert it to readable format?
>
>
>
>
>
> Thanks
>
> Pranay
>
>
RE: How to read the Index.db file
Posted by Kenneth Brotman <ke...@yahoo.com.INVALID>.
This link https://www.datastax.com/dev/blog/debugging-sstables-in-3-0-with-sstabledump explains how to read an SSTable with sstabledump for 3x and sstable2json for 2.x
Kenneth Brotman
From: Ben Slater [mailto:ben.slater@instaclustr.com]
Sent: Thursday, February 07, 2019 1:19 PM
To: Cassandra User
Subject: Re: How to read the Index.db file
They don’t do exactly what you want but depending on why you are trying to get this info you might find our sstable-tools useful: https://github.com/instaclustr/cassandra-sstable-tools
---
Ben Slater
Chief Product Officer
<https://docs.google.com/uc?export=download&id=1KsSdSa-ucqhGi8XrGcV-a7nIx0TcFFGK&revid=0B-NJl5XxcJATV2ZkYzcveEFjcEhPRGZnS2FuQWtrWXVUNXFjPQ>
<https://www.facebook.com/instaclustr> <https://twitter.com/instaclustr> <https://www.linkedin.com/company/instaclustr>
Read our latest technical blog posts <https://www.instaclustr.com/blog/> here.
This email has been sent on behalf of Instaclustr Pty. Limited (Australia) and Instaclustr Inc (USA).
This email and any attachments may contain confidential and legally privileged information. If you are not the intended recipient, do not copy or disclose its content, but please reply to this email immediately and highlight the error to the sender and then immediately delete the message.
On Fri, 8 Feb 2019 at 08:14, Kenneth Brotman <ke...@yahoo.com.invalid> wrote:
When you say you’re trying to get all the partition of a particular SSTable, I’m not sure what you mean. Do you want to make a copy of it? I don’t understand.
Kenneth Brotman
From: Pranay akula [mailto:pranay.akula2323@gmail.com]
Sent: Wednesday, February 06, 2019 7:51 PM
To: user@cassandra.apache.org
Subject: How to read the Index.db file
I was trying to get all the partition of a particular SSTable, i have tried reading Index,db file i can read some part of it but not all of it , is there any way to convert it to readable format?
Thanks
Pranay
Re: How to read the Index.db file
Posted by Ben Slater <be...@instaclustr.com>.
They don’t do exactly what you want but depending on why you are trying to
get this info you might find our sstable-tools useful:
https://github.com/instaclustr/cassandra-sstable-tools
---
*Ben Slater*
*Chief Product Officer*
<https://www.facebook.com/instaclustr> <https://twitter.com/instaclustr>
<https://www.linkedin.com/company/instaclustr>
Read our latest technical blog posts here
<https://www.instaclustr.com/blog/>.
This email has been sent on behalf of Instaclustr Pty. Limited (Australia)
and Instaclustr Inc (USA).
This email and any attachments may contain confidential and legally
privileged information. If you are not the intended recipient, do not copy
or disclose its content, but please reply to this email immediately and
highlight the error to the sender and then immediately delete the message.
On Fri, 8 Feb 2019 at 08:14, Kenneth Brotman <ke...@yahoo.com.invalid>
wrote:
> When you say you’re trying to get all the partition of a particular
> SSTable, I’m not sure what you mean. Do you want to make a copy of it? I
> don’t understand.
>
>
>
> Kenneth Brotman
>
>
>
> *From:* Pranay akula [mailto:pranay.akula2323@gmail.com]
> *Sent:* Wednesday, February 06, 2019 7:51 PM
> *To:* user@cassandra.apache.org
> *Subject:* How to read the Index.db file
>
>
>
> I was trying to get all the partition of a particular SSTable, i have
> tried reading Index,db file i can read some part of it but not all of it ,
> is there any way to convert it to readable format?
>
>
>
>
>
> Thanks
>
> Pranay
>
RE: How to read the Index.db file
Posted by Kenneth Brotman <ke...@yahoo.com.INVALID>.
When you say you’re trying to get all the partition of a particular SSTable, I’m not sure what you mean. Do you want to make a copy of it? I don’t understand.
Kenneth Brotman
From: Pranay akula [mailto:pranay.akula2323@gmail.com]
Sent: Wednesday, February 06, 2019 7:51 PM
To: user@cassandra.apache.org
Subject: How to read the Index.db file
I was trying to get all the partition of a particular SSTable, i have tried reading Index,db file i can read some part of it but not all of it , is there any way to convert it to readable format?
Thanks
Pranay