From commits-return-13717-archive-asf-public=cust-asf.ponee.io@hudi.apache.org Fri Mar 20 01:11:50 2020 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 B0F93180661 for ; Fri, 20 Mar 2020 02:11:49 +0100 (CET) Received: (qmail 38341 invoked by uid 500); 20 Mar 2020 01:11:49 -0000 Mailing-List: contact commits-help@hudi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hudi.apache.org Delivered-To: mailing list commits@hudi.apache.org Received: (qmail 38332 invoked by uid 99); 20 Mar 2020 01:11:49 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Mar 2020 01:11:49 +0000 From: GitBox To: commits@hudi.apache.org Subject: [GitHub] [incubator-hudi] nsivabalan commented on a change in pull request #1176: [HUDI-430] Adding InlineFileSystem to support embedding any file format as an InlineFile Message-ID: <158466670900.9291.10467403109606196701.gitbox@gitbox.apache.org> References: In-Reply-To: Date: Fri, 20 Mar 2020 01:11:49 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit nsivabalan commented on a change in pull request #1176: [HUDI-430] Adding InlineFileSystem to support embedding any file format as an InlineFile URL: https://github.com/apache/incubator-hudi/pull/1176#discussion_r395399661 ########## File path: hudi-utilities/src/main/java/org/apache/hudi/utilities/inline/fs/InlineFileSystem.java ########## @@ -0,0 +1,133 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hudi.utilities.inline.fs; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.FSDataInputStream; +import org.apache.hadoop.fs.FSDataOutputStream; +import org.apache.hadoop.fs.FileStatus; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.Path; +import org.apache.hadoop.fs.permission.FsPermission; +import org.apache.hadoop.util.Progressable; + +import java.io.IOException; +import java.net.URI; + +/** + * Enables reading any inline file at a given offset and length. This {@link FileSystem} is used only in read path and does not support + * any write apis. + *

+ * - Reading an inlined file at a given offset, length, read it out as if it were an independent file of that length + * - Inlined path is of the form "inlinefs:///path/to/outer/file//inline_file/?start_offset=&length= + *

+ * TODO: The reader/writer may try to use relative paths based on the inlinepath and it may not work. Need to handle + * this gracefully eg. the parquet summary metadata reading. TODO: If this shows promise, also support directly writing + * the inlined file to the underneath file without buffer + */ +public class InlineFileSystem extends FileSystem { + + static final String SCHEME = "inlinefs"; Review comment: yes, I have fixed the scheme issue. Can you check once I have addressed all comments. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services