From commits-return-13489-archive-asf-public=cust-asf.ponee.io@hudi.apache.org Mon Mar 16 22:15:33 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 4779E180647 for ; Mon, 16 Mar 2020 23:15:33 +0100 (CET) Received: (qmail 73976 invoked by uid 500); 16 Mar 2020 22:15:32 -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 73954 invoked by uid 99); 16 Mar 2020 22:15:32 -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; Mon, 16 Mar 2020 22:15:32 +0000 From: GitBox To: commits@hudi.apache.org Subject: [GitHub] [incubator-hudi] vinothchandar commented on a change in pull request #1176: [HUDI-430] Adding InlineFileSystem to support embedding any file format as an InlineFile Message-ID: <158439693255.31355.118041088594410412.gitbox@gitbox.apache.org> References: In-Reply-To: Date: Mon, 16 Mar 2020 22:15:32 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit vinothchandar 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_r393286265 ########## File path: hudi-utilities/src/main/java/org/apache/hudi/utilities/inline/fs/InLineFSUtils.java ########## @@ -0,0 +1,94 @@ +/* + * 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.fs.Path; + +/** + * Utils to parse InlineFileSystem paths. + * Inline FS format: "inlinefs:////" + * "inlinefs:///inline_file/?start_offset=start_offset>&length=" + */ +public class InLineFSUtils { + + private static final String INLINE_FILE_STR = "inline_file"; + private static final String START_OFFSET_STR = "start_offset"; + private static final String LENGTH_STR = "length"; + private static final String EQUALS_STR = "="; + + /** + * Fetch embedded inline file path from outer path. + * Eg + * Input: + * Path = file:/file1, origScheme: file, startOffset = 20, length = 40 + * Output: "inlinefs:/file1/file/inline_file/?start_offset=20&length=40" + * + * @param outerPath + * @param origScheme + * @param inLineStartOffset + * @param inLineLength + * @return + */ + public static Path getEmbeddedInLineFilePath(Path outerPath, String origScheme, long inLineStartOffset, long inLineLength) { Review comment: rename: getInlineFilePath()? (Prefer Inline to InLine everywhere for camelcasing it) ---------------------------------------------------------------- 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