public class FileIOUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static long |
KB |
static org.slf4j.Logger |
LOG |
| Constructor and Description |
|---|
FileIOUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
closeQuietly(Closeable closeable)
Closes
Closeable quietly. |
static boolean |
copy(HoodieStorage srcStorage,
StoragePath src,
HoodieStorage dstStorage,
StoragePath dst,
boolean deleteSource,
boolean overwrite) |
static boolean |
copy(HoodieStorage srcStorage,
StoragePathInfo srcPathInfo,
HoodieStorage dstStorage,
StoragePath dst,
boolean deleteSource,
boolean overwrite)
Copy files between FileSystems.
|
static void |
copy(HoodieStorage storage,
StoragePath sourceFilePath,
StoragePath destFilePath)
Copies the file content from source path to destination path.
|
static void |
copy(InputStream inputStream,
OutputStream outputStream) |
static void |
createFileInPath(HoodieStorage storage,
StoragePath fullPath,
Option<byte[]> content) |
static void |
createFileInPath(HoodieStorage storage,
StoragePath fullPath,
Option<byte[]> content,
boolean ignoreIOE) |
static void |
deleteDirectory(File directory) |
static String[] |
getConfiguredLocalDirs()
Return the configured local directories where hudi can write files.
|
static String |
getDefaultSpillableMapBasePath() |
static void |
mkdir(File directory) |
static byte[] |
readAsByteArray(InputStream input) |
static byte[] |
readAsByteArray(InputStream input,
int outputSize) |
static String |
readAsUTFString(InputStream input) |
static String |
readAsUTFString(InputStream input,
int length) |
static List<String> |
readAsUTFStringLines(InputStream input)
Reads the input stream into String lines.
|
static Option<byte[]> |
readDataFromPath(HoodieStorage storage,
StoragePath detailPath) |
static Option<byte[]> |
readDataFromPath(HoodieStorage storage,
StoragePath detailPath,
boolean ignoreIOE) |
static void |
writeStringToFile(String str,
String filePath) |
public static final org.slf4j.Logger LOG
public static final long KB
public static void deleteDirectory(File directory) throws IOException
IOExceptionpublic static void mkdir(File directory) throws IOException
IOExceptionpublic static String readAsUTFString(InputStream input) throws IOException
IOExceptionpublic static String readAsUTFString(InputStream input, int length) throws IOException
IOExceptionpublic static List<String> readAsUTFStringLines(InputStream input)
input - InputStream instance.public static void copy(InputStream inputStream, OutputStream outputStream) throws IOException
IOExceptionpublic static void copy(HoodieStorage storage, StoragePath sourceFilePath, StoragePath destFilePath)
storage - HoodieStorage instance.sourceFilePath - Source file path.destFilePath - Destination file path.public static byte[] readAsByteArray(InputStream input) throws IOException
IOExceptionpublic static byte[] readAsByteArray(InputStream input, int outputSize) throws IOException
IOExceptionpublic static void writeStringToFile(String str, String filePath) throws IOException
IOExceptionpublic static void closeQuietly(Closeable closeable)
Closeable quietly.closeable - Closeable to closepublic static void createFileInPath(HoodieStorage storage, StoragePath fullPath, Option<byte[]> content, boolean ignoreIOE)
public static void createFileInPath(HoodieStorage storage, StoragePath fullPath, Option<byte[]> content)
public static boolean copy(HoodieStorage srcStorage, StoragePath src, HoodieStorage dstStorage, StoragePath dst, boolean deleteSource, boolean overwrite) throws IOException
IOExceptionpublic static boolean copy(HoodieStorage srcStorage, StoragePathInfo srcPathInfo, HoodieStorage dstStorage, StoragePath dst, boolean deleteSource, boolean overwrite) throws IOException
IOExceptionpublic static Option<byte[]> readDataFromPath(HoodieStorage storage, StoragePath detailPath, boolean ignoreIOE)
public static Option<byte[]> readDataFromPath(HoodieStorage storage, StoragePath detailPath)
public static String[] getConfiguredLocalDirs()
public static String getDefaultSpillableMapBasePath()
Copyright © 2024 The Apache Software Foundation. All rights reserved.