From oak-issues-return-71047-archive-asf-public=cust-asf.ponee.io@jackrabbit.apache.org Mon Apr 29 11:55:02 2019 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 16DFA18067E for ; Mon, 29 Apr 2019 13:55:01 +0200 (CEST) Received: (qmail 62560 invoked by uid 500); 29 Apr 2019 11:55:01 -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 62537 invoked by uid 99); 29 Apr 2019 11:55:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Apr 2019 11:55:01 +0000 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 67FA8E28C3 for ; Mon, 29 Apr 2019 11:55: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 2F31825814 for ; Mon, 29 Apr 2019 11:55:00 +0000 (UTC) Date: Mon, 29 Apr 2019 11:55:00 +0000 (UTC) From: "Marcel Reutegger (JIRA)" To: oak-issues@jackrabbit.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (OAK-8186) Create API in OAK for file access to binaries in the repository. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OAK-8186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16829180#comment-16829180 ] Marcel Reutegger commented on OAK-8186: --------------------------------------- I'm sorry, that's my fault. There was not enough context with my reply. I was referring to {{Binary.read(byte[], long)}}. > Create API in OAK for file access to binaries in the repository. > ---------------------------------------------------------------- > > Key: OAK-8186 > URL: https://issues.apache.org/jira/browse/OAK-8186 > Project: Jackrabbit Oak > Issue Type: Improvement > Reporter: Henry Saginor > Priority: Major > Attachments: FileCopyTest3.java, OAK File Access.jpg, fileCopyTest-0.0.1-SNAPSHOT.jar > > > To get file access applications normally write binaries to temp files. It would be nice if an API existed to get file access directly from OAK. This might also meet some use cases documented at [https://wiki.apache.org/jackrabbit/JCR%20Binary%20Usecase] > Suggested API and implementation can be found here [1]. Also, see attached diagram [2]. > I can create a patch if I can get some feedback. Note that suggested API makes it explicit that a temp file is created. I am not sure if direct access to files in datasore would be safe. But I am open to suggestions. > [1] > [https://github.com/hsaginor/jackrabbit-oak/blob/directFileAccess/oak-api/src/main/java/org/apache/jackrabbit/oak/api/blob/FileReferencable.java] > [https://github.com/hsaginor/jackrabbit-oak/blob/directFileAccess/oak-api/src/main/java/org/apache/jackrabbit/oak/api/blob/TempFileReference.java] > [https://github.com/hsaginor/jackrabbit-oak/blob/directFileAccess/oak-api/src/main/java/org/apache/jackrabbit/oak/api/blob/TempFileReferenceProvider.java] > [https://github.com/hsaginor/jackrabbit-oak/blob/directFileAccess/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/datastore/FileDSBlobTempFileReference.java] > [https://github.com/hsaginor/jackrabbit-oak/blob/directFileAccess/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/datastore/DataStoreBlobStore.java] > [https://github.com/hsaginor/jackrabbit-oak/blob/directFileAccess/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentBlob.java] > [https://github.com/hsaginor/jackrabbit-oak/blob/directFileAccess/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/plugins/value/jcr/BinaryImpl.java] > [2] > !OAK File Access.jpg! -- This message was sent by Atlassian JIRA (v7.6.3#76005)