public class InLineFSUtils extends Object
| Constructor and Description |
|---|
InLineFSUtils() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.hadoop.fs.Path |
getInlineFilePath(org.apache.hadoop.fs.Path outerPath,
String origScheme,
long inLineStartOffset,
long inLineLength)
Get the InlineFS Path for a given schema and its Path.
|
static org.apache.hadoop.fs.Path |
getOuterFilePathFromInlinePath(org.apache.hadoop.fs.Path inlineFSPath)
InlineFS Path format:
"inlinefs://path/to/outer/file/outer_file_scheme/?start_offset=start_offset>&length=
|
static long |
length(org.apache.hadoop.fs.Path inlinePath)
Returns length of the block (embedded w/in the base file) identified by the given InlineFS path
input: "inlinefs:/file1/s3a/?start_offset=20&length=40".
|
static long |
startOffset(org.apache.hadoop.fs.Path inlineFSPath)
Returns start offset w/in the base for the block identified by the given InlineFS path
input: "inlinefs://file1/s3a/?start_offset=20&length=40".
|
public static org.apache.hadoop.fs.Path getInlineFilePath(org.apache.hadoop.fs.Path outerPath,
String origScheme,
long inLineStartOffset,
long inLineLength)
Examples: Input Path: s3a://file1, origScheme: file, startOffset = 20, length = 40 Output: "inlinefs://file1/s3a/?start_offset=20&length=40"
outerPath - The outer file PathorigScheme - The file schemainLineStartOffset - Start offset for the inline fileinLineLength - Length for the inline filepublic static org.apache.hadoop.fs.Path getOuterFilePathFromInlinePath(org.apache.hadoop.fs.Path inlineFSPath)
Outer File Path format: "outer_file_scheme://path/to/outer/file"
Example Input: "inlinefs://file1/s3a/?start_offset=20&length=40". Output: "s3a://file1"
inlineFSPath - InLineFS Path to get the outer file Pathpublic static long startOffset(org.apache.hadoop.fs.Path inlineFSPath)
public static long length(org.apache.hadoop.fs.Path inlinePath)
Copyright © 2022 The Apache Software Foundation. All rights reserved.