phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "rajeshbabu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-1249) Support local immutable index
Date Sat, 13 Sep 2014 13:38:33 GMT

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

rajeshbabu commented on PHOENIX-1249:
-------------------------------------

[~jamestaylor]
Thanks for review. 
bq. We'll want to tweak the way we do index maintenance if the table is marked as immutable,
otherwise we'll get no perf advantage. You'll want to prevent the lookup of the "old" values
(as we know there are no "old" values), but still create the index updates for the "new" values
I think currently the indexing for tables with immutable rows is managed entirely on the client.
so no incremental index maintenance is required. Same thing applicable for local indexes also.

In the client we are preparing index updates from data updates and writing to index table
directly(not through coprocessors).
Here is code for the same in MutationState#commit
{code}
            Iterator<Pair<byte[],List<Mutation>>> mutationsIterator = addRowMutations(tableRef,
valuesMap, serverTimestamp, false);
            while (mutationsIterator.hasNext()) {
                Pair<byte[],List<Mutation>> pair = mutationsIterator.next();
                byte[] htableName = pair.getFirst();
                List<Mutation> mutations = pair.getSecond();
...
HTableInterface hTable = connection.getQueryServices().getTable(htableName);
...
hTable.batch(mutations);
{code}

Now I have made some changes such that when table is marked as immutable then preparing local
index updates at server side and write to local index table in the coprocessors without any
index maintenance. 
I will handle your comments and upload patch for review after some cleanup and perf testing.


> Support local immutable index 
> ------------------------------
>
>                 Key: PHOENIX-1249
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1249
>             Project: Phoenix
>          Issue Type: Sub-task
>    Affects Versions: 4.1
>         Environment: Hbase 0.98.4-Hadoop2
> Phoenix 4.1
>            Reporter: Sun Fulin
>            Assignee: rajeshbabu
>             Fix For: 5.0.0, 4.2
>
>         Attachments: PHOENIX-1249.patch
>
>
> Currently local indexing are forced created as default mutable index which requires index
maintenance and server side processing, while immutable indexes are appropriate for write-once/append-only
use case that may fit for many use cases. Hope some work for capability to create local index
as immutable index.



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

Mime
View raw message