hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-13271) Table#puts(List<Put>) operation is indeterminate; needs fixing
Date Tue, 12 Sep 2017 00:01:39 GMT

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

stack commented on HBASE-13271:
-------------------------------

Please fix this sentence though it not written by you:

" Puts some data in the table, in batch."

Suggest Put singular or "Batch Put data into Table".

I'd suggest generalizing the following using the specific case as an example. Then, if we
figure we need to do another type of pre-check client-side, we won't have to adjust the javadoc:

"If a column is not
* specified for any of the mutations in the input list, {@link IllegalArgumentException} will
be
* thrown and no mutations will be applied."

Something like. The passed in List of Puts are validated before being sent to the cluster.
If an error is found, for example, a Mutation was supplied but was missing its Column, a ....

Small change to following:

"If there are any failures even after retries,
* {@link RetriesExhaustedWithDetailsException}, containing list of failed mutations and
* respective remote exceptions will be thrown."

Suggest.... "....after retries, a {@link ...} will be thrown. RetriesExhaustedWithDetailsException
contains a list of failed mutations and the respective exceptions thrown."

Repeat above edit for other types.

Did you want to add a general note saying pre-flight validations are run in the client and
an exception may be thrown if ill-specified (Delete or Get do not do this now but we might
in the future)?

Otherwise, excellent.

Sorry for being pedantic but these are probably the most important bits of javadoc in our
codebase and you are helping folks out nicely spec'ing exactly how the stuff works.

Thanks [~uagashe]


> Table#puts(List<Put>) operation is indeterminate; needs fixing
> --------------------------------------------------------------
>
>                 Key: HBASE-13271
>                 URL: https://issues.apache.org/jira/browse/HBASE-13271
>             Project: HBase
>          Issue Type: Improvement
>          Components: API
>    Affects Versions: 1.0.0
>            Reporter: stack
>            Assignee: Umesh Agashe
>            Priority: Critical
>             Fix For: 2.0.0-alpha-3
>
>         Attachments: hbase-13271.master.001.patch, hbase-13271.master.002.patch
>
>
> Another API issue found by [~larsgeorge]:
> "Table.put(List<Put) is questionable after the API change."
> {code}
> [Mar-17 9:21 AM] Lars George: Table.put(List<Put>) is weird since you cannot flush
partial lists
> [Mar-17 9:21 AM] Lars George: Say out of 5 the third is broken, then the put() call returns
with a local exception (say empty Put) and then you have 2 that are in the buffer
> [Mar-17 9:21 AM] Lars George: but how to you force commit them?
> [Mar-17 9:22 AM] Lars George: In the past you would call flushCache(), but that is "gone"
now
> [Mar-17 9:22 AM] Lars George: and flush() is not available on a Table
> [Mar-17 9:22 AM] Lars George: And you cannot access the underlying BufferedMutation neither
> [Mar-17 9:23 AM] Lars George: You can *only* add more Puts if you can, or call close()
> [Mar-17 9:23 AM] Lars George: that is just weird to explain
> {code}
> So, Table needs to get flush back or we deprecate this method or it flushes immediately
and does not return until complete in the implementation.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message