Re: Query on Token range
Thanks , it helped but also looking for a way to get total number of token ranges assigned to that node, which i am doing currently manually( subtracting) by using nodetool ring. Best Regards Ranju On Fri, Jun 9, 2023 at 12:50 PM guo Maxwell wrote: > I think nodetool info with --token may do some help. > > ranju goel 于2023年6月9日周五 15:09写道: > >> Hi everyone, >> >> Is there any faster way to calculate the number of token ranges allocated >> to a node >> (x.y.z.w)? >> >> I used the manual way by subtracting the last token with the start token >> shown in the nodetool ring, but it is time consuming. >> >> >> >> x.y.z.w RAC1 UpNormal 88 GiB 100.00% >> -5972602825521846313 >> x.y.z.w1 RAC1 UpNormal 87 GiB 100.00% >> -5956172717199559280 >> >> Best Regards >> Ranju Jain >> > > > -- > you are the apple of my eye ! >
Re: Query on Token range
I think nodetool info with --token may do some help. ranju goel 于2023年6月9日周五 15:09写道: > Hi everyone, > > Is there any faster way to calculate the number of token ranges allocated > to a node > (x.y.z.w)? > > I used the manual way by subtracting the last token with the start token > shown in the nodetool ring, but it is time consuming. > > > > x.y.z.w RAC1 UpNormal 88 GiB 100.00% > -5972602825521846313 > x.y.z.w1 RAC1 UpNormal 87 GiB 100.00% > -5956172717199559280 > > Best Regards > Ranju Jain > -- you are the apple of my eye !
Query on Token range
Hi everyone, Is there any faster way to calculate the number of token ranges allocated to a node (x.y.z.w)? I used the manual way by subtracting the last token with the start token shown in the nodetool ring, but it is time consuming. x.y.z.w RAC1 UpNormal 88 GiB 100.00% -5972602825521846313 x.y.z.w1 RAC1 UpNormal 87 GiB 100.00% -5956172717199559280 Best Regards Ranju Jain
Unable to query with token range.. unable to make long from ‘...'
I’m trying to query an entire table in parallel by splitting it up in token ranges. However, it’s not working because I get this: cqlsh:blogindex select token(hashcode), hashcode from source where token(hashcode) = 0 and token(hashcode) = 17014118346046923173168730371588410572 limit 10; Bad Request: unable to make long from '17014118346046923173168730371588410572' … so I’m trying to figure out what’s going on here. Is there some magic I have to use to force the string representation of the 128 bit long into a token pointer? -- Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com … or check out my Google+ profile https://plus.google.com/102718274791889610666/posts http://spinn3r.com
Re: Unable to query with token range.. unable to make long from ‘...'
It is expecting a 64 bit value … murmer3 partitioner uses 64 bit long tokens… where did you get your 128 bit long from, and what partitioner are you using? On Sep 28, 2014, at 1:39 PM, Kevin Burton bur...@spinn3r.com wrote: I’m trying to query an entire table in parallel by splitting it up in token ranges. However, it’s not working because I get this: cqlsh:blogindex select token(hashcode), hashcode from source where token(hashcode) = 0 and token(hashcode) = 17014118346046923173168730371588410572 limit 10; Bad Request: unable to make long from '17014118346046923173168730371588410572' … so I’m trying to figure out what’s going on here. Is there some magic I have to use to force the string representation of the 128 bit long into a token pointer? -- Founder/CEO Spinn3r.com Location: San Francisco, CA blog: http://burtonator.wordpress.com … or check out my Google+ profile smime.p7s Description: S/MIME cryptographic signature
Re: Unable to query with token range.. unable to make long from ‘...'
Hm.. is it 64 bits or 128 bits? I’m using Murmur3Partitioner … I can’t find any documentation on it (as usual.. ha) This says: http://www.datastax.com/docs/1.1/initialize/token_generation The tokens assigned to your nodes need to be distributed throughout the entire possible range of tokens (0 to 2127 -1) so it would need to be 2^63 -1 or 2^127-1 On Sun, Sep 28, 2014 at 1:19 PM, graham sanderson gra...@vast.com wrote: It is expecting a 64 bit value … murmer3 partitioner uses 64 bit long tokens… where did you get your 128 bit long from, and what partitioner are you using? On Sep 28, 2014, at 1:39 PM, Kevin Burton bur...@spinn3r.com wrote: I’m trying to query an entire table in parallel by splitting it up in token ranges. However, it’s not working because I get this: cqlsh:blogindex select token(hashcode), hashcode from source where token(hashcode) = 0 and token(hashcode) = 17014118346046923173168730371588410572 limit 10; Bad Request: unable to make long from '17014118346046923173168730371588410572' … so I’m trying to figure out what’s going on here. Is there some magic I have to use to force the string representation of the 128 bit long into a token pointer? -- Founder/CEO Spinn3r.com http://spinn3r.com/ Location: *San Francisco, CA* blog: http://burtonator.wordpress.com … or check out my Google+ profile https://plus.google.com/102718274791889610666/posts http://spinn3r.com/ -- Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com … or check out my Google+ profile https://plus.google.com/102718274791889610666/posts http://spinn3r.com
Re: Unable to query with token range.. unable to make long from ‘...'
Looks like you are looking at old docs (pre Murmer3 partitioner). Latest are here (don’t think it has changed in 2.1 from 2.0.x) http://www.datastax.com/documentation/cassandra/2.1/cassandra/configuration/configGenTokens_c.html Murmer3 is definitely 64 bits On Sep 28, 2014, at 5:55 PM, Kevin Burton bur...@spinn3r.com wrote: Hm.. is it 64 bits or 128 bits? I’m using Murmur3Partitioner … I can’t find any documentation on it (as usual.. ha) This says: http://www.datastax.com/docs/1.1/initialize/token_generation The tokens assigned to your nodes need to be distributed throughout the entire possible range of tokens (0 to 2127 -1) so it would need to be 2^63 -1 or 2^127-1 On Sun, Sep 28, 2014 at 1:19 PM, graham sanderson gra...@vast.com wrote: It is expecting a 64 bit value … murmer3 partitioner uses 64 bit long tokens… where did you get your 128 bit long from, and what partitioner are you using? On Sep 28, 2014, at 1:39 PM, Kevin Burton bur...@spinn3r.com wrote: I’m trying to query an entire table in parallel by splitting it up in token ranges. However, it’s not working because I get this: cqlsh:blogindex select token(hashcode), hashcode from source where token(hashcode) = 0 and token(hashcode) = 17014118346046923173168730371588410572 limit 10; Bad Request: unable to make long from '17014118346046923173168730371588410572' … so I’m trying to figure out what’s going on here. Is there some magic I have to use to force the string representation of the 128 bit long into a token pointer? -- Founder/CEO Spinn3r.com Location: San Francisco, CA blog: http://burtonator.wordpress.com … or check out my Google+ profile -- Founder/CEO Spinn3r.com Location: San Francisco, CA blog: http://burtonator.wordpress.com … or check out my Google+ profile smime.p7s Description: S/MIME cryptographic signature
Re: Unable to query with token range.. unable to make long from ‘...'
Got it.. and it works too.. …. select * from foo where token(hashcode) = -9223372036854775808 and token(hashcode) = -7378697629483820647 ; this should allow me to an easy distributed scan and analyze all the data in the database across machines.. On Sun, Sep 28, 2014 at 4:07 PM, graham sanderson gra...@vast.com wrote: Looks like you are looking at old docs (pre Murmer3 partitioner). Latest are here (don’t think it has changed in 2.1 from 2.0.x) http://www.datastax.com/documentation/cassandra/2.1/cassandra/configuration/configGenTokens_c.html Murmer3 is definitely 64 bits On Sep 28, 2014, at 5:55 PM, Kevin Burton bur...@spinn3r.com wrote: Hm.. is it 64 bits or 128 bits? I’m using Murmur3Partitioner … I can’t find any documentation on it (as usual.. ha) This says: http://www.datastax.com/docs/1.1/initialize/token_generation The tokens assigned to your nodes need to be distributed throughout the entire possible range of tokens (0 to 2127 -1) so it would need to be 2^63 -1 or 2^127-1 On Sun, Sep 28, 2014 at 1:19 PM, graham sanderson gra...@vast.com wrote: It is expecting a 64 bit value … murmer3 partitioner uses 64 bit long tokens… where did you get your 128 bit long from, and what partitioner are you using? On Sep 28, 2014, at 1:39 PM, Kevin Burton bur...@spinn3r.com wrote: I’m trying to query an entire table in parallel by splitting it up in token ranges. However, it’s not working because I get this: cqlsh:blogindex select token(hashcode), hashcode from source where token(hashcode) = 0 and token(hashcode) = 17014118346046923173168730371588410572 limit 10; Bad Request: unable to make long from '17014118346046923173168730371588410572' … so I’m trying to figure out what’s going on here. Is there some magic I have to use to force the string representation of the 128 bit long into a token pointer? -- Founder/CEO Spinn3r.com http://spinn3r.com/ Location: *San Francisco, CA* blog: http://burtonator.wordpress.com … or check out my Google+ profile https://plus.google.com/102718274791889610666/posts http://spinn3r.com/ -- Founder/CEO Spinn3r.com http://spinn3r.com/ Location: *San Francisco, CA* blog: http://burtonator.wordpress.com … or check out my Google+ profile https://plus.google.com/102718274791889610666/posts http://spinn3r.com/ -- Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com … or check out my Google+ profile https://plus.google.com/102718274791889610666/posts http://spinn3r.com