public class FSUtils extends Object
Constructor and Description |
---|
FSUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
closeReaders(MapFile.Reader[] readers)
Closes a group of MapFile readers.
|
static void |
closeReaders(SequenceFile.Reader[] readers)
Closes a group of SequenceFile readers.
|
static void |
replace(FileSystem fs,
Path current,
Path replacement,
boolean removeOld)
Replaces the current path with the new path and if set removes the old
path.
|
public static void replace(FileSystem fs, Path current, Path replacement, boolean removeOld) throws IOException
fs
- The FileSystem.current
- The end path, the one being replaced.replacement
- The path to replace with.removeOld
- True if we are removing the current path.IOException
- If an error occurs during replacement.public static void closeReaders(SequenceFile.Reader[] readers) throws IOException
readers
- The SequenceFile readers to close.IOException
- If an error occurs while closing a reader.public static void closeReaders(MapFile.Reader[] readers) throws IOException
readers
- The MapFile readers to close.IOException
- If an error occurs while closing a reader.Copyright © 2015 The Apache Software Foundation