From oak-issues-return-60940-archive-asf-public=cust-asf.ponee.io@jackrabbit.apache.org Wed Apr 4 15:13:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 7D0D9180675 for ; Wed, 4 Apr 2018 15:13:04 +0200 (CEST) Received: (qmail 49990 invoked by uid 500); 4 Apr 2018 13:13:03 -0000 Mailing-List: contact oak-issues-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-issues@jackrabbit.apache.org Received: (qmail 49979 invoked by uid 99); 4 Apr 2018 13:13:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Apr 2018 13:13:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 377B51A084C for ; Wed, 4 Apr 2018 13:13:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -102.311 X-Spam-Level: X-Spam-Status: No, score=-102.311 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id AVqAqgAzBRcy for ; Wed, 4 Apr 2018 13:13:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 3DE8C5FAD2 for ; Wed, 4 Apr 2018 13:13:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 70773E01A8 for ; Wed, 4 Apr 2018 13:13:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 3060625614 for ; Wed, 4 Apr 2018 13:13:00 +0000 (UTC) Date: Wed, 4 Apr 2018 13:13:00 +0000 (UTC) From: =?utf-8?Q?Michael_D=C3=BCrig_=28JIRA=29?= To: oak-issues@jackrabbit.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (OAK-6584) Add tooling API MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OAK-6584?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D164254= 83#comment-16425483 ]=20 Michael D=C3=BCrig commented on OAK-6584: ------------------------------------ To get started with my tooling based on Oak tooling API build and install t= o your local Maven cache (in this order): * Tool API: [https://github.com/mduerig/oak-tooling-api] * Initial impl: [https://github.com/mduerig/jackrabbit-oak/commits/OAK-658= 4] * Script Oak: [https://github.com/mduerig/script-oak/commits/OAK-6584] If all goes well this creates a {{script-oak-reactor/script-oak-shell/targe= t/script-oak-shell-1.3-SNAPSHOT.jar}}. Now cd to a repository folder (i.e. = such that there is a folder {{segmentstore}} in {{ls .}}). Now the script o= ak shell and hack away: {code} java -jar script-oak-shell-1.3-SNAPSHOT.jar Welcome to Script Oak 1.3-SNAPSHOT / oak-1.7.8 @ val fs =3D fileStoreAnalyser() fs: filestore.FileStoreAnalyser =3D michid.script.oak.fixture.package$$anon= $1@1c807b1d @ val sroot =3D fs.getNode("/").analyse sroot: nodestore.Items.Node =3D Node(Node(null, "", { }), "", { checkpoints= =3D { ... }, root =3D { ... } }) @ import michid.script.oak.nodestore.Items._ import michid.script.oak.nodestore.Items._ @ val nodes =3D collectNodes(sroot) nodes: Iterable[Node] =3D Items( Node(Node(null, "", { }), "", { checkpoints =3D { ... }, root =3D { ... }= }), Node( Node(Node(null, "", { }), "", { checkpoints =3D { ... }, root =3D { ...= } }), "checkpoints", { ff9ea4dc-bca4-47b7-bb21-5ff0bed6e678 =3D { ... }, c19a503b-61fe-4291-= b591-bc708184badf =3D { ... } } ), Node( Node( Node(Node(null, "", { }), "", { checkpoints =3D { ... }, root =3D { .= .. } }), "checkpoints", { ff9ea4dc-bca4-47b7-bb21-5ff0bed6e678 =3D { ... }, c19a503b-61fe-429= 1-b591-bc708184badf =3D { ... } } ), "ff9ea4dc-bca4-47b7-bb21-5ff0bed6e678", ... @ browse(nodes.take(100)) {code} To learn more about the Shell see: http://ammonite.io/ To learn more about Script Oak see: https://github.com/mduerig/script-oak/b= lob/master/script-oak-core/src/main/resources/scripts/FileStoreDemo.sc > Add tooling API > --------------- > > Key: OAK-6584 > URL: https://issues.apache.org/jira/browse/OAK-6584 > Project: Jackrabbit Oak > Issue Type: New Feature > Components: segment-tar > Reporter: Michael D=C3=BCrig > Assignee: Michael D=C3=BCrig > Priority: Major > Labels: tooling > Fix For: 1.10 > > > h3. Current situation > Current segment store related tools are implemented ad-hoc by potentially= relying on internal implementation details of Oak Segment Tar. This makes = those tools less useful, portable, stable and potentially applicable than t= hey should be. > h3. Goal > Provide a common and sufficiently stable Oak Tooling API for implementing= segment store related tools. The API should be independent of Oak and not = available for normal production use of Oak. Specifically it should not be p= ossible to it to implement production features and production features must= not rely on it. It must be possible to implement the Oak Tooling API in Oa= k 1.8 and it should be possible for Oak 1.6. > h3. Typical use cases > * Query the number of nodes / properties / values in a given path satisfy= ing some criteria > * Aggregate a certain value on queries like the above > * Calculate size of the content / size on disk > * Analyse changes. E.g. how many binaries bigger than a certain threshold= were added / removed between two given revisions. What is the sum of their= sizes? > * Analyse locality: measure of locality of node states. Incident plots (S= ee https://issues.apache.org/jira/browse/OAK-5655?focusedCommentId=3D158659= 73&page=3Dcom.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#= comment-15865973). > * Analyse level of deduplication (e.g. of checkpoint)=20 > h3. Validation > Reimplement [Script Oak|https://github.com/mduerig/script-oak] on top of = the tooling API.=20 > h3. API draft > * Whiteboard shot of the [API entities|https://wiki.apache.org/jackrabbit= /Oakathon%20August%202017?action=3DAttachFile&do=3Dview&target=3DIMG_201708= 22_163256.jpg] identified initially. > * Further [drafting of the API|https://github.com/mduerig/oak-tooling-api= ] takes place on Github for now. We'll move to the Apache SVN as soon as co= nsidered mature enough and have a consensus of where to best move it.=20 -- This message was sent by Atlassian JIRA (v7.6.3#76005)