[ 
https://issues.apache.org/jira/browse/PHOENIX-900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14337071#comment-14337071
 ] 

ASF GitHub Bot commented on PHOENIX-900:
----------------------------------------

Github user JamesRTaylor commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/37#discussion_r25372928
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java ---
    @@ -92,7 +100,7 @@ public MutationState(int maxSize, PhoenixConnection 
connection, long sizeOffset)
             this.sizeOffset = sizeOffset;
         }
         
    --- End diff --
    
    and this (part 2 of 3):
    
        // For tests to pass through a Map that maintains order (and keep 
this.mutations as final)
        public MutationState(int maxSize, PhoenixConnection connection, 
Map<ImmutableBytesPtr,RowMutationState> mutations) {
            this(maxSize,connection,0, mutations);
        }
    
        public MutationState(int maxSize, PhoenixConnection connection, long 
sizeOffset) {
            this.maxSize = maxSize;
            this.connection = connection;
            this.sizeOffset = sizeOffset;
            this.mutations = Maps.newHashMapWithExpectedSize(3); // TODO: size 
based on something else as this is a bad default
        }
        
    
        public MutationState(int maxSize, PhoenixConnection connection, long 
sizeOffset, Map<ImmutableBytesPtr,RowMutationState> mutations) {
            this.maxSize = maxSize;
            this.connection = connection;
            this.sizeOffset = sizeOffset;
            this.mutations = mutations;
        }
        
        



> 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
>         Attachments: PHOENIX-900.patch
>
>
> 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)

Reply via email to