accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William Slacum (JIRA)" <>
Subject [jira] [Created] (ACCUMULO-2915) Avoid copying all Mutations when using a TabletServerBatchWriter
Date Mon, 16 Jun 2014 22:30:04 GMT
William Slacum created ACCUMULO-2915:

             Summary: Avoid copying all Mutations when using a TabletServerBatchWriter
                 Key: ACCUMULO-2915
             Project: Accumulo
          Issue Type: Improvement
          Components: client
    Affects Versions: 1.6.0, 1.5.1, 1.5.0, 1.6.1, 1.7.0
            Reporter: William Slacum
             Fix For: 1.5.2, 1.6.1, 1.7.0

Currently in the TabletServerBatchWriter, the following behavior is exhibited:

    // create a copy of mutation so that after this method returns the user
    // is free to reuse the mutation object, like calling readFields... this
    // is important for the case where a mutation is passed from map to reduce
    // to batch writer... the map reduce code will keep passing the same mutation
    // object into the reduce method
    m = new Mutation(m);
    totalMemUsed += m.estimatedMemoryUsed();
    mutations.addMutation(table, m);

This means all data is copied twice when writing. The logic for doing this is a bit dubious,
since not all clients are going to be subject to MapReduce's use of references. 

It'd be good if we provided users with a way of signaling that there's no need to copy the
mutation payload. [~elserj] suggested creating something akin to an {{ImmutableMutation}},
which help avoid some of the fears the batchwriter attempts to defend against.

This message was sent by Atlassian JIRA

View raw message