fluo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From keith-turner <...@git.apache.org>
Subject [GitHub] incubator-fluo pull request #760: Fixes #758
Date Fri, 12 Aug 2016 18:34:51 GMT
Github user keith-turner commented on a diff in the pull request:

    https://github.com/apache/incubator-fluo/pull/760#discussion_r74639628
  
    --- Diff: modules/core/src/main/java/org/apache/fluo/core/impl/TransactionImpl.java ---
    @@ -203,12 +203,17 @@ public Bytes get(Bytes row, Column column) {
         ParallelSnapshotScanner pss = new ParallelSnapshotScanner(rowColumns, env, startTs,
stats);
     
         Map<Bytes, Map<Column, Bytes>> ret = pss.scan();
    +    Map<RowColumn, Bytes> bet = new HashMap<>();
     
         for (Entry<Bytes, Map<Column, Bytes>> entry : ret.entrySet()) {
           updateColumnsRead(entry.getKey(), entry.getValue().keySet());
    +      for (Entry<Column, Bytes> cols : entry.getValue().entrySet()) {
    +        // create RowColumn and add to new map
    +        bet.put(new RowColumn(cols.getValue()), cols.getValue());
    --- End diff --
    
    `cols` should probably be called `colVal`.  You need the row and col.  The entry in the
outer loop has the row.  The entry in the inner loop has col and value.
    
    ```java
    
         for (Entry<Bytes, Map<Column, Bytes>> entry : ret.entrySet()) {
           updateColumnsRead(entry.getKey(), entry.getValue().keySet());
           for (Entry<Column, Bytes> colVal : entry.getValue().entrySet()) {
             Bytes row = entry.getKey();
             Column col = colVal.getKey();
             Bytes val = colVal.getValue();
             bet.put(new RowColumn(row, col), val);
             
    
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message