accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Turner (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-1757) Create BatchDeleter with a provided BatchWriter instead of creating a new one
Date Tue, 08 Oct 2013 00:14:42 GMT

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

Keith Turner commented on ACCUMULO-1757:
----------------------------------------

bq. BatchReaders really aren't made to be reused the way BatchWriters are. BatchReaders are
destructive when they get repurposed.

Good point.  BatchReaders can be reused, but its difficult to do correctly.  To do it correctly
users would need to synchronize configuration and iterator creation.  After an iterator is
created from a batch reader subsequent changes to the batch reader config will not affect
the iterator.   Encouraging their reuse would probably result in bugs, so we should not do
that.  

I think passing a thread pool is  a good option if the underlying batch reader and batch writer
can share the thread pool w/o the possibility of deadlock. 

Passing a batch writer to the batch deleter makes assumptions about its implementation.  Maybe
one day the batch deleter will be modified to not use a batch read and batch writer, instead
it will push all of its work to the tablet servers and avoid bringing data back to the client.










> Create BatchDeleter with a provided BatchWriter instead of creating a new one
> -----------------------------------------------------------------------------
>
>                 Key: ACCUMULO-1757
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-1757
>             Project: Accumulo
>          Issue Type: Improvement
>          Components: client
>            Reporter: John Vines
>            Priority: Minor
>             Fix For: 1.6.0
>
>
> For the BatchDeleter, you pass it all the configs you need to create both a Scanner and
a BatchWriter for it to provide really convenient deletes. However, if a client already has
a BatchWriter, it would be convenient to just hand it an existing BatchWriter to use instead
of creating a separate one.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message