Package org.apache.accumulo.server.fs
Class VolumeUtil
- java.lang.Object
-
- org.apache.accumulo.server.fs.VolumeUtil
-
public class VolumeUtil extends Object
Utility methods for managing absolute URIs contained in Accumulo metadata.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VolumeUtil.TabletFiles
-
Constructor Summary
Constructors Constructor Description VolumeUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
removeTrailingSlash(String path)
static org.apache.hadoop.fs.Path
removeTrailingSlash(org.apache.hadoop.fs.Path path)
static String
switchRootTableVolume(String location)
static String
switchVolume(String path, VolumeManager.FileType ft, List<Pair<org.apache.hadoop.fs.Path,org.apache.hadoop.fs.Path>> replacements)
static VolumeUtil.TabletFiles
updateTabletVolumes(AccumuloServerContext context, ZooLock zooLock, VolumeManager vm, KeyExtent extent, VolumeUtil.TabletFiles tabletFiles, boolean replicate)
This method does two things.
-
-
-
Method Detail
-
removeTrailingSlash
public static org.apache.hadoop.fs.Path removeTrailingSlash(org.apache.hadoop.fs.Path path)
-
switchVolume
public static String switchVolume(String path, VolumeManager.FileType ft, List<Pair<org.apache.hadoop.fs.Path,org.apache.hadoop.fs.Path>> replacements)
-
switchRootTableVolume
public static String switchRootTableVolume(String location) throws IOException
- Throws:
IOException
-
updateTabletVolumes
public static VolumeUtil.TabletFiles updateTabletVolumes(AccumuloServerContext context, ZooLock zooLock, VolumeManager vm, KeyExtent extent, VolumeUtil.TabletFiles tabletFiles, boolean replicate) throws IOException
This method does two things. First, it switches any volumes a tablet is using that are configured in instance.volumes.replacements. Second, if a tablet dir is no longer configured for use it chooses a new tablet directory.- Throws:
IOException
-
-