[ 
https://issues.apache.org/jira/browse/PHOENIX-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

rajeshbabu updated PHOENIX-1249:
--------------------------------
    Attachment: PHOENIX-1249_v3.patch

[~jamestaylor]
Here is the patch addressing the above comments.
bq. How about just starting at numNonKVColumns instead of 0 in the loop here?
It's silly mistake. handled.
bq. Just add an IndexMaintainer.isLocalIndex() method and an isImmutable 
boolean too in IndexMaintainer instead and use that to drive your logic on the 
server side.
Instead of different property UUID, added immtable rows and using it along with 
isLocalIndex to prepare index updates at server side, this work helps even if 
we make index immutable or table have mix of mutable and immutable indexes.
bq. Can we call this enabledGlobalIndexIterator instead?
Changed.
bq. Can we not have a forceSerialize flag and instead base this on whether the 
dataTable has indexes for which you'd want to send index maintainers (i.e. 
check that the index is local or not)?
changed. Now when table is immutable rows serializing only local indexes 
otherwise serialize all the indexes
bq. In IndexUtil, would you mind just moving your new generateIndexData method 
above the one that just calls it with null, null args so the diff is better? 
Otherwise it's hard to get a sense for what changed.
Now these changes are not required and removed.

Apart from the comments the main changes are in PhoenixIndexBuilder and 
PhoenixIndexCodec
1) in batchStarted scanning the data region if there are any mutable indexes 
for caching the blocks. Otherwise not scanning.
2) in getIndex{Upserts/Deletes} if any immutable indexes just preparing index 
updates from data mutations only. And the code in both the methods is almost 
same other than build index upserts or deletes. So extracted to one method and 
using boolean to prepare upserts or deletes.

And one more change is to handle PHOENIX-1293. It's just small change. Setting 
disabling wal only when user explicitly specify while creating index otherwise 
it's false.
{code}
             Boolean disableWALProp = (Boolean) 
tableProps.remove(PhoenixDatabaseMetaData.DISABLE_WAL);
-            if (disableWALProp == null) {
-                disableWAL = isParentImmutableRows; // By default, disable WAL 
for immutable indexes
-            } else {
+            if (disableWALProp != null) {
                 disableWAL = disableWALProp;
             }
{code}

> 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, PHOENIX-1249_v2.patch, 
> PHOENIX-1249_v3.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)

Reply via email to