asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "abdullah alamoudi (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: WIP: Add rebalance callback.
Date Wed, 12 Jul 2017 04:39:53 GMT
abdullah alamoudi has posted comments on this change.

Change subject: WIP: Add rebalance callback.
......................................................................


Patch Set 5:

(1 comment)

https://asterix-gerrit.ics.uci.edu/#/c/1863/5/asterixdb/asterix-app/src/main/java/org/apache/asterix/utils/RebalanceUtil.java
File asterixdb/asterix-app/src/main/java/org/apache/asterix/utils/RebalanceUtil.java:

PS5, Line 317: int numKeys = target.getPrimaryKeys().size();
             :         int[] primaryKeyFields = IntStream.range(0, numKeys).toArray();
instead of this, do:
int[] primaryKeyFields = getPrimaryUpsertOuputKeyIndexes(target);

where 

public static int[] getPrimaryUpsertOuputKeyIndexes(Dataset dataset) {
        // prev record first
        int f = 1;
        // add the previous meta second
        if (dataset.hasMetaPart()) {
            f++;
        }
        // add the previous filter third
        int numFilterFields = DatasetUtil.getFilterField(dataset) == null ? 0 : 1;
        if (numFilterFields > 0) {
            f++;
        }
        int numPrimaryKeys = dataset.getPrimaryKeys().size();
        int[] pkIndexes = new int[numPrimaryKeys];
        for (int i = 0; i < pkIndexes.length; i++) {
            pkIndexes[i] = f;
            f++;
        }
        return pkIndexes;
    }


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1863
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9a90ba975467c136371236195f82d48430d8319d
Gerrit-PatchSet: 5
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu <buyingyi@gmail.com>
Gerrit-Reviewer: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: abdullah alamoudi <bamousaa@gmail.com>
Gerrit-HasComments: Yes

Mime
View raw message