You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by joemeszaros <gi...@git.apache.org> on 2015/09/24 12:30:19 UTC

[GitHub] nifi pull request: NIFI-989: Support size() operation in distribut...

GitHub user joemeszaros opened a pull request:

    https://github.com/apache/nifi/pull/94

    NIFI-989: Support size() operation in distributed map cache

    The distributed map cache server is a great tool for caching along with the cache client (DistributedMapCacheClientService), but after you configure and enable it, it is a black box. You are unable to get any information from the cache e.g how much entries live in the cache.
    
    The purpose of this PR to create an extended cache interface and associated implementations to support the size() operation, which returns the number of entries in the distributed cache.
    
    It could be a first step in a direction of a more transparent cache, where the user can understand, what happens with the distributed cache. I mean after the size() operation, it could be really helpful to implement a stats() command, which s used to query the server about statistics it
    maintains and other internal data (e.g. evictions, hit rates, ...).
    
    Similar to:
    - memcached : https://docs.oracle.com/cd/E17952_01/refman-5.0-en/ha-memcached-stats-general.html
    - couchbase: http://blog.couchbase.com/monitoring-couchbase-cluster
    - redis: http://haydenjames.io/using-redis-stat-for-redis-statistics-tracking/
    
    I implemented a really simple command line tool, which can interact with the cache server from the command line, e.g. get a cache entry and it also able to get the size of the cache, which could be useful, when you would like to debug cache related problems, or just get basic interaction with the cache.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ImpressTV/nifi NIFI-989

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/94.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #94
    
----
commit 5a8578a70db1b9c61d26bbd06132ee035929378f
Author: Joe <jo...@impresstv.com>
Date:   2015-09-24T10:26:42Z

    NIFI-989: Support size() operation in distributed map cache

----


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

[GitHub] nifi pull request: NIFI-989: Support size() operation in distribut...

Posted by joemeszaros <gi...@git.apache.org>.
Github user joemeszaros commented on the pull request:

    https://github.com/apache/nifi/pull/94#issuecomment-160670895
  
    Ok, so we should wait for the Java 8 migration. We can reopen the PR at any time.



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

[GitHub] nifi pull request: NIFI-989: Support size() operation in distribut...

Posted by markap14 <gi...@git.apache.org>.
Github user markap14 commented on the pull request:

    https://github.com/apache/nifi/pull/94#issuecomment-144783629
  
    @joemeszaros the concern that I have with the notion of the ExtendedDistributedMapCacheClient is that once that is released, it will have the same caveats as the DistributedMapCacheClient - others can extend it, so we cannot change the interface in a non-backward-compatible way once we release it.
    
    I think if there are specific methods that we think will be added, then we need to implement those before we release the service. Otherwise, in order to add new methods to the ExtendedDistributedMapCacheClient we would need to create yet another interface that extends that one. This is all done because we consider the Standard Services API to be "public interfaces" so that once they are out there, we have no idea who has implemented them. As a result, if we change them, even if we update all of the code in Apache NiFi, we may be breaking someone else's "private" implementation.
    
    In theory, though, this will become a lot less painful once we move to 1.0.0 because I believe the intent is to move to Java 8, which means that we can include default implementations in the interfaces. As a result, we could potentially add new methods to interfaces as long as they can be implemented using existing methods.


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

[GitHub] nifi pull request: NIFI-989: Support size() operation in distribut...

Posted by joemeszaros <gi...@git.apache.org>.
Github user joemeszaros closed the pull request at:

    https://github.com/apache/nifi/pull/94


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