public class FSUtils extends Object
| Constructor and Description |
|---|
FSUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
closeReaders(org.apache.hadoop.io.MapFile.Reader[] readers)
Closes a group of MapFile readers.
|
static void |
closeReaders(org.apache.hadoop.io.SequenceFile.Reader[] readers)
Closes a group of SequenceFile readers.
|
static void |
replace(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path current,
org.apache.hadoop.fs.Path replacement,
boolean removeOld)
Replaces the current path with the new path and if set removes the old
path.
|
public static void replace(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path current,
org.apache.hadoop.fs.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(org.apache.hadoop.io.SequenceFile.Reader[] readers)
throws IOException
readers - The SequenceFile readers to close.IOException - If an error occurs while closing a reader.public static void closeReaders(org.apache.hadoop.io.MapFile.Reader[] readers)
throws IOException
readers - The MapFile readers to close.IOException - If an error occurs while closing a reader.Copyright © 2014 The Apache Software Foundation