You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Matt Ryan (JIRA)" <ji...@apache.org> on 2016/09/07 22:08:20 UTC

[jira] [Comment Edited] (OAK-4712) Publish S3DataStore stats in JMX MBean

    [ https://issues.apache.org/jira/browse/OAK-4712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15471936#comment-15471936 ] 

Matt Ryan edited comment on OAK-4712 at 9/7/16 10:07 PM:
---------------------------------------------------------

Requested changes applied in the latest patch (OAK-4712.4.diff).  It eliminates {{NodeIdMapper}} and consolidates the resolution logic into {{S3DataStoreStats}} for all relevant {{NodeStoreService}} classes.

Some items of note:
- {{S3DataStoreStats}} was moved from {{oak-blob-cloud}} to {{oak-core}}, alongside some other S3-related classes.  Moving the path resolution logic into {{S3DataStoreStats}} required this change since it relies on other classes in {{oak-core}} to work, and since {{oak-core}} already depends on {{oak-blob-cloud}}, leaving S3DataStoreStats in {{oak-blob-cloud}} would have ended up with a circular dependency.
- A new interface, {{BlobIdBlob}}, was added, extending {{Blob}}.  This represents a kind of blob that also has a blob ID that can be retrieved.  {{SegmentBlob}} and {{BlobStoreBlob}} now implement this interface, since both support {{getBlobId()}}.
- The active nodeStore is provided to the MBean at construction time.  I chose this approach over OSGi injection because the MBean also requires an additional parameter, the {{S3DataStore}}, and injection would have required that we also inject the {{S3DataStore}}, which at first look seems more trouble than it is worth (open to discussion however).


was (Author: mattvryan):
Requested changes applied in this patch.  It eliminates {{NodeIdMapper}} and consolidates the resolution logic into {{S3DataStoreStats}} for all relevant {{NodeStoreService}} classes.

Some items of note:
- {{S3DataStoreStats}} was moved from {{oak-blob-cloud}} to {{oak-core}}, alongside some other S3-related classes.  Moving the path resolution logic into {{S3DataStoreStats}} required this change since it relies on other classes in {{oak-core}} to work, and since {{oak-core}} already depends on {{oak-blob-cloud}}, leaving S3DataStoreStats in {{oak-blob-cloud}} would have ended up with a circular dependency.
- A new interface, {{BlobIdBlob}}, was added, extending {{Blob}}.  This represents a kind of blob that also has a blob ID that can be retrieved.  {{SegmentBlob}} and {{BlobStoreBlob}} now implement this interface, since both support {{getBlobId()}}.
- The active nodeStore is provided to the MBean at construction time.  I chose this approach over OSGi injection because the MBean also requires an additional parameter, the {{S3DataStore}}, and injection would have required that we also inject the {{S3DataStore}}, which at first look seems more trouble than it is worth (open to discussion however).

> Publish S3DataStore stats in JMX MBean
> --------------------------------------
>
>                 Key: OAK-4712
>                 URL: https://issues.apache.org/jira/browse/OAK-4712
>             Project: Jackrabbit Oak
>          Issue Type: New Feature
>          Components: blob
>            Reporter: Matt Ryan
>         Attachments: OAK-4712.2.diff, OAK-4712.3.diff, OAK-4712.4.diff
>
>
> This feature is to publish statistics about the S3DataStore via a JMX MBean.  There are two statistics suggested:
> * Indicate the number of files actively being synchronized from the local cache into S3
> * Given a path to a local file, indicate whether synchronization of file into S3 has completed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)