[
https://issues.apache.org/jira/browse/PHOENIX-900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14303946#comment-14303946
]
Eli Levine commented on PHOENIX-900:
------------------------------------
Some notes:
- In MutationState need to use HTable.batch(List, Object[]) to be able to
obtain partial results per HTable. Currently we use deprecated
HTable.batch(List), meaning a partial failure within an HTable is treated as a
full failure.
- It would be useful to expose partial results in CommitException as a list of
result objects (similar to how HTable.batch() does it). A position in the
results object would correspond to the order of UPSERT/DELETE statement issued
on a Connection. CommitException has getUncommittedState() and
getOmmittedState(), which is a good start. However, they return MutationState,
a low-level construct, which seems to not preserve the order of Mutations. Need
to carry per-Connection mutation order somehow...
- [~jamestaylor], any idea how a partial failure might be simulated in a unit
test or IT?
> Partial results for mutations
> -----------------------------
>
> Key: PHOENIX-900
> URL: https://issues.apache.org/jira/browse/PHOENIX-900
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 3.0.0, 4.0.0
> Reporter: Eli Levine
> Assignee: Eli Levine
>
> HBase provides a way to retrieve partial results of a batch operation:
> http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/HTable.html#batch%28java.util.List,%20java.lang.Object[]%29
> Chatted with James about this offline:
> Yes, this could be included in the CommitException we throw
> (MutationState:412). We already include the batches that have been
> successfully committed to the HBase server in this exception. Would you be up
> for adding this additional information? You'd want to surface this in a
> Phoenix-y way in a method on CommitException, something like this: ResultSet
> getPartialCommits(). You can easily create an in memory ResultSet using
> MaterializedResultIterator plus the PhoenixResultSet constructor that accepts
> this (just create a new empty PhoenixStatement with the PhoenixConnection for
> the other arg).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)