accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-3913) Add per table sampling
Date Tue, 01 Sep 2015 03:58:45 GMT

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

ASF GitHub Bot commented on ACCUMULO-3913:
------------------------------------------

GitHub user keith-turner opened a pull request:

    https://github.com/apache/accumulo/pull/46

    ACCUMULO-3913 Added per table sampling

    This a large PR, if you don't have time to look at the impl, a review of the API changes,
docs, and test would be very helpful.
    
    I took Readme.sample from this PR and made a [Gist](https://gist.github.com/keith-turner/1a073eb032e4d8c448cb)
out of it so it would render nicely for reading.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/keith-turner/accumulo ACCUMULO-3913

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/accumulo/pull/46.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #46
    
----
commit 7654fa1161aa4dd99960a030aee2a35c6e274c11
Author: Keith Turner <kturner@apache.org>
Date:   2015-08-31T20:00:14Z

    ACCUMULO-3913 Added per table sampling

----


> Add per table sampling
> ----------------------
>
>                 Key: ACCUMULO-3913
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-3913
>             Project: Accumulo
>          Issue Type: Improvement
>            Reporter: Keith Turner
>             Fix For: 1.8.0
>
>
> I am working on prototyping adding hash based sampling to Accumulo.  I am trying to accomplish
the following goals in the prototype.
>   # Have each RFile store a sample per locality group.  Also store the configuration
used to generate the sample.
>   # Use sampling functions that ensure the same row columns exist across the samples
in all RFiles. Hash mod is a good candidate that gives a random sample that's consistent across
files.
>   # Have scanners support scanning RFile's samples sets.  Scan should fail if RFiles
have different sample configuration.  Different sampling config implies the RFile's sample
sets contain a possibly disjoint set of row columns.
>   # Support generating sample data for RFiles generated for bulk import
>   # Support sample data in the memory map
>   # Support enabling and disabling sampling per table AND configuring a sample function.
> I am currently using the following function in my prototype to determine what data an
RFile stores in its sample set.  This code will always select same subset of rows for each
RFile's sample set.  I have not yet made the function configurable.
> {code:java}
> public class RowSampler implements Sampler {
>   private HashFunction hasher = Hashing.murmur3_32();
>   @Override
>   public boolean accept(Key k) {
>     ByteSequence row = k.getRowData();
>     HashCode hc = hasher.hashBytes(row.getBackingArray(), row.offset(), row.length());
>     return hc.asInt() % 1009 == 0;
>   }
> }
> {code}
> Although not yet implemented, the divisor in this RowSample could be configurable. RFiles
with sample data would store the fact that a RowSample with a divisor of 1009 was used to
generate sample data.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message