Number of regions in SYSTEM.SEQUENCE

2015-09-22 Thread Michael McAllister
Hi By default SYSTEM.SEQUENCE is installed with 256 regions. In an environment where you don’t have a large number of tables and regions (yet), the end result of this seems to be that with hbase balance_switch=true, you end up with a lot of region servers with nothing but empty SYSTEM.SEQUENCE

Re: Number of regions in SYSTEM.SEQUENCE

2015-09-22 Thread Mujtaba Chohan
Since Phoenix 4.5.x default has been changed for phoenix.sequence.saltBuckets to not split sequence table. See this

Re: Number of regions in SYSTEM.SEQUENCE

2015-09-22 Thread Michael McAllister
Mujtaba Thanks for this information. Seeing as I am using Phoenix 4.2, what is the safe and approved sequence of steps to drop this table and recreate it as you mention? Additionally, how do we ensure we don’t lose sequence data? Michael McAllister Staff Data Warehouse Engineer | Decision Syste

Re: Number of regions in SYSTEM.SEQUENCE

2015-09-22 Thread James Heather
If no one else will be hitting the table while you complete the operation, and if you don't mind about missing a few sequence values (i.e., having a gap), you should just need the following. SELECT NEXT VALUE FOR sequencename FROM sometable; That will tell you the next value the sequence w

Re: Number of regions in SYSTEM.SEQUENCE

2015-09-22 Thread Michael McAllister
OK - so the traditional methods of recreating sequences, that makes sense. Interestingly btw, at least from within Phoenix I can’t see the content of SYSTEM.SEQUENCE. I get the following error:- 0: jdbc:phoenix:redacted,> select count(*) from system.sequence; Error: ERROR 604 (42P00): Syntax err

Re: Number of regions in SYSTEM.SEQUENCE

2015-09-22 Thread James Heather
I don't think it's trying to stop you looking inside the table. I think it's complaining that SEQUENCE is a keyword, and shouldn't be appearing there. You could try quoting it. James On 22/09/15 21:11, Michael McAllister wrote: OK - so the traditional methods of recreating sequences, that mak

Re: Number of regions in SYSTEM.SEQUENCE

2015-09-22 Thread Michael McAllister
More failed attempts ... 0: jdbc:phoenix:redacted,> select count(*) from system."sequence"; Error: ERROR 1012 (42M03): Table undefined. tableName=SYSTEM.sequence (state=42M03,code=1012) 0: jdbc:phoenix:redacted,> select count(*) from "system.sequence"; Error: ERROR 1012 (42M03): Table undefined.

Re: Number of regions in SYSTEM.SEQUENCE

2015-09-22 Thread James Heather
Try the one you missed: SYSTEM."SEQUENCE" i.e., quote the bits separately (but SYSTEM doesn't need quoting), and put it in caps. James On 22/09/15 21:18, Michael McAllister wrote: More failed attempts ... 0: jdbc:phoenix:redacted,> select count(*) from system."sequence"; Error: ERROR 1

Re: Number of regions in SYSTEM.SEQUENCE

2015-09-22 Thread Michael McAllister
Thanks, that one worked :-) On Sep 22, 2015, at 3:28 PM, James Heather mailto:james.heat...@mendeley.com>> wrote: Try the one you missed: SYSTEM."SEQUENCE" i.e., quote the bits separately (but SYSTEM doesn't need quoting), and put it in caps. James On 22/09/15 21:18, Michael McAllister