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 "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2017/05/08 06:59:04 UTC

[jira] [Commented] (OAK-6080) Index report service

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

Chetan Mehrotra commented on OAK-6080:
--------------------------------------

Attached is an [initial implementation|^OAK-6080-v1.patch] for this. Key points

The patch introduces a {{IndexInfoService}} which provide access to {{IndexInfo}} instance for all indexes present in the setup. In turn it makes use of {{IndexInfoProvider}} to get index specific details for different types of indexes. For now the info captured is like

{code}
public interface IndexInfo {
    /**
     * Returns paths of index definition in the repository
     */
    String getIndexPath();

    /**
     * Returns type of index definition like 'property' or 'lucene'
     */
    String getType();

    /**
     * Returns name of the async index lane to which this index is bound to
     * or null if its not an async index
     */
    @CheckForNull
    String getAsyncName();

    /**
     * Time in millis at which index was last updated
     *
     * @return time in millis or -1 if unknown
     */
    long getLastUpdatedTime();

    /**
     * Returns time in millis of the repository state upto which index is upto
     * date. This may or may not be same as {@code #getLastUpdatedTime}. For e.g.
     * consider an index at /oak:index/fooIndex bound to async lane "async".
     * The index might have got updated 2 cycle ago when async indexer traversed content
     * node which were indexed by this index and it was not updated in last index cycle.
     * Then {@code indexedUptoTime} would be the time of last complete cycle while
     * {@code lastUpdatedTime} would the time of 2nd last cycle
     *
     * @return time in millis or -1 if unknown
     */
    long getIndexedUptoTime();

    /**
     * An estimate of entry count in the index
     */
    long getEstimatedEntryCount();

    /**
     * Index data storage size

     * @return storage size or -1 if unknown
     */
    long getSizeInBytes();

    /**
     * Determines if index definition has changed but no reindexing
     * was done for that change.
     */
    boolean hasIndexDefinitionChangedWithoutReindexing();
}
{code}

In addition an {{IndexPrinter}} is implemented (see OAK-6179) which uses this service to render [this output|^status-oak-indexes.txt]. Going forward we can add following possible enhancements

# Perform index integrity check
# Dump index definitions as json 

[~tmueller] [~catholicon] [~teofili] [~dhasler] Please review and provide feedback

> Index report service
> --------------------
>
>                 Key: OAK-6080
>                 URL: https://issues.apache.org/jira/browse/OAK-6080
>             Project: Jackrabbit Oak
>          Issue Type: New Feature
>          Components: indexing
>            Reporter: Chetan Mehrotra
>             Fix For: 1.8
>
>         Attachments: OAK-6080-v1.patch, status-oak-indexes.txt
>
>
> Currently we have various MBeans which provide insight into current indexing state and index size etc. For enabling better understanding of index state on a setup we should provide an explicit IndexReportService which provide details about
> # Set of index present in setup and for each index
> ## Entry Count
> ## Size
> ## Health status
> ## Last indexing time
> # Current indexing status
> ## Current progress
> ## Health of indexing



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)