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 #817: fixes #816 introduced better way to setup ...
Date Wed, 22 Mar 2017 17:31:28 GMT
Github user keith-turner commented on a diff in the pull request:

    https://github.com/apache/incubator-fluo/pull/817#discussion_r107480219
  
    --- Diff: modules/integration/src/test/java/org/apache/fluo/integration/impl/CollisionIT.java
---
    @@ -81,27 +77,22 @@ public void load(TransactionBase tx, Context context) throws Exception
{
         }
       }
     
    -  public static class TotalObserver extends AbstractObserver {
    -
    +  public static class CollisionObserverProvider implements ObserverProvider {
         @Override
    -    public Observer.ObservedColumn getObservedColumn() {
    -      return new Observer.ObservedColumn(STAT_CHANGED, NotificationType.WEAK);
    -    }
    -
    -    @Override
    -    public void process(TransactionBase tx, Bytes rowBytes, Column col) throws Exception
{
    -      String row = rowBytes.toString();
    -      int total = Integer.parseInt(tx.gets(row, STAT_TOTAL));
    -      int processed = TestUtil.getOrDefault(tx, row, STAT_PROCESSED, 0);
    -
    -      tx.set(row, STAT_PROCESSED, total + "");
    -      TestUtil.increment(tx, "all", STAT_TOTAL, total - processed);
    +    public void provide(Registry consumer, Context ctx) {
    --- End diff --
    
    I switched everything to use `or` as a short for observer registry.  Its probably too
short though.  Still trying to think of a shorter variable name for this.  `observerRegistry`
is too long.  May just go with `registry` as you suggested.


---
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