[
https://issues.apache.org/jira/browse/PHOENIX-1954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14621755#comment-14621755
]
Hudson commented on PHOENIX-1954:
---------------------------------
FAILURE: Integrated in Phoenix-master #825 (See
[https://builds.apache.org/job/Phoenix-master/825/])
PHOENIX-1954 Reserve chunks of numbers for a sequence (Jan Fernando) (jtaylor:
rev 3b1bfa0d7b83f0b9ee0ad535d6e1f99777c14cb6)
* phoenix-core/src/main/java/org/apache/phoenix/parse/ParseNodeFactory.java
*
phoenix-core/src/main/java/org/apache/phoenix/query/DelegateConnectionQueryServices.java
* phoenix-core/src/main/java/org/apache/phoenix/util/SequenceUtil.java
* phoenix-core/src/main/java/org/apache/phoenix/schema/Sequence.java
*
phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
*
phoenix-core/src/main/java/org/apache/phoenix/compile/SequenceValueExpression.java
*
phoenix-core/src/it/java/org/apache/phoenix/end2end/SequenceBulkAllocationIT.java
*
phoenix-core/src/test/java/org/apache/phoenix/schema/SequenceAllocationTest.java
* phoenix-core/src/main/java/org/apache/phoenix/schema/SequenceAllocation.java
* phoenix-core/src/main/antlr3/PhoenixSQL.g
* phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
*
phoenix-core/src/main/java/org/apache/phoenix/parse/SequenceValueParseNode.java
*
phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServices.java
*
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/SequenceRegionObserver.java
* phoenix-core/src/main/java/org/apache/phoenix/compile/SequenceManager.java
* phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixStatement.java
* phoenix-core/src/test/java/org/apache/phoenix/util/SequenceUtilTest.java
* phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
*
phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
> Reserve chunks of numbers for a sequence
> ----------------------------------------
>
> Key: PHOENIX-1954
> URL: https://issues.apache.org/jira/browse/PHOENIX-1954
> Project: Phoenix
> Issue Type: New Feature
> Reporter: Lars Hofhansl
> Assignee: Jan Fernando
> Attachments: PHOENIX-1954-4.x-HBase-0.98.patch,
> PHOENIX-1954-rebased.patch, PHOENIX-1954-wip.patch,
> PHOENIX-1954-wip2.patch.txt, PHOENIX-1954-wip3.patch,
> PHOENIX-1954-wip4.patch, PHOENIX-1954-wip5-rebased.patch,
> PHOENIX-1954-wip6.patch, PHOENIX-1954-wip7-rebase.patch
>
>
> In order to be able to generate many ids in bulk (for example in map reduce
> jobs) we need a way to generate or reserve large sets of ids. We also need to
> mix ids reserved with incrementally generated ids from other clients.
> For this we need to atomically increment the sequence and return the value it
> had when the increment happened.
> If we're OK to throw the current cached set of values away we can do
> {{NEXT VALUE FOR <seq>(,<N>)}}, that needs to increment value and return the
> value it incremented from (i.e. it has to throw the current cache away, and
> return the next value it found at the server).
> Or we can invent a new syntax {{RESERVE VALUES FOR <seq>, <N>}} that does the
> same, but does not invalidate the cache.
> Note that in either case we won't retrieve the reserved set of values via
> {{NEXT VALUE FOR}} because we'd need to be idempotent in our case, all we
> need to guarantee is that after a call to {{RESERVE VALUES FOR <seq>, <N>}},
> which returns a value <M> is that the range [M, M+N) won't be used by any
> other user of the sequence. My might need reserve 1bn ids this way ahead of a
> map reduce run.
> Any better ideas?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)