@InterfaceAudience.Private public class HFileArchiver extends Object
StoreFiles)
for a HRegion from the FileSystem. The hfiles will be archived or deleted, depending on
the state of the system.| Modifier and Type | Method and Description |
|---|---|
static void |
archiveFamily(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.conf.Configuration conf,
RegionInfo parent,
org.apache.hadoop.fs.Path tableDir,
byte[] family)
Remove from the specified region the store files of the specified column family, either by
archiving them or outright deletion
|
static void |
archiveFamilyByFamilyDir(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.conf.Configuration conf,
RegionInfo parent,
org.apache.hadoop.fs.Path familyDir,
byte[] family)
Removes from the specified region the store files of the specified column family, either by
archiving them or outright deletion
|
static void |
archiveRecoveredEdits(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
RegionInfo regionInfo,
byte[] family,
Collection<HStoreFile> replayedEdits)
Archive recovered edits using existing logic for archiving store files.
|
static void |
archiveRegion(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
RegionInfo info)
Cleans up all the files for a HRegion by archiving the HFiles to the archive directory
|
static boolean |
archiveRegion(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path rootdir,
org.apache.hadoop.fs.Path tableDir,
org.apache.hadoop.fs.Path regionDir)
Remove an entire region from the table directory via archiving the region's hfiles.
|
static void |
archiveRegions(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path rootDir,
org.apache.hadoop.fs.Path tableDir,
List<org.apache.hadoop.fs.Path> regionDirList)
Archive the specified regions in parallel.
|
static void |
archiveStoreFile(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
RegionInfo regionInfo,
org.apache.hadoop.fs.Path tableDir,
byte[] family,
org.apache.hadoop.fs.Path storeFile)
Archive the store file
|
static void |
archiveStoreFiles(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
RegionInfo regionInfo,
org.apache.hadoop.fs.Path tableDir,
byte[] family,
Collection<HStoreFile> compactedFiles)
Remove the store files, either by archiving them or outright deletion
|
static boolean |
exists(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
RegionInfo info)
Returns True if the Region exits in the filesystem.
|
public static boolean exists(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
RegionInfo info)
throws IOException
IOExceptionpublic static void archiveRegion(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
RegionInfo info)
throws IOException
conf - the configuration to usefs - the file system objectinfo - RegionInfo for region to be deletedIOExceptionpublic static boolean archiveRegion(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path rootdir,
org.apache.hadoop.fs.Path tableDir,
org.apache.hadoop.fs.Path regionDir)
throws IOException
fs - FileSystem from which to remove the regionrootdir - Path to the root directory where hbase files are stored (for building
the archive path)tableDir - Path to where the table is being stored (for building the archive
path)regionDir - Path to where a region is being stored (for building the archive path)IOException - if the request cannot be completedpublic static void archiveRegions(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path rootDir,
org.apache.hadoop.fs.Path tableDir,
List<org.apache.hadoop.fs.Path> regionDirList)
throws IOException
conf - the configuration to usefs - FileSystem from which to remove the regionrootDir - Path to the root directory where hbase files are stored (for
building the archive path)tableDir - Path to where the table is being stored (for building the archive
path)regionDirList - Path to where regions are being stored (for building the archive
path)IOException - if the request cannot be completedpublic static void archiveFamily(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.conf.Configuration conf,
RegionInfo parent,
org.apache.hadoop.fs.Path tableDir,
byte[] family)
throws IOException
fs - the filesystem where the store files liveconf - Configuration to examine to determine the archive directoryparent - Parent region hosting the store filestableDir - Path to where the table is being stored (for building the archive path)family - the family hosting the store filesIOException - if the files could not be correctly disposed.public static void archiveFamilyByFamilyDir(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.conf.Configuration conf,
RegionInfo parent,
org.apache.hadoop.fs.Path familyDir,
byte[] family)
throws IOException
fs - the filesystem where the store files liveconf - Configuration to examine to determine the archive directoryparent - Parent region hosting the store filesfamilyDir - Path to where the family is being storedfamily - the family hosting the store filesIOException - if the files could not be correctly disposed.public static void archiveStoreFiles(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
RegionInfo regionInfo,
org.apache.hadoop.fs.Path tableDir,
byte[] family,
Collection<HStoreFile> compactedFiles)
throws IOException
conf - Configuration to examine to determine the archive directoryfs - the filesystem where the store files liveregionInfo - RegionInfo of the region hosting the store filesfamily - the family hosting the store filescompactedFiles - files to be disposed of. No further reading of these files should be
attempted; otherwise likely to cause an IOExceptionIOException - if the files could not be correctly disposed.public static void archiveRecoveredEdits(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
RegionInfo regionInfo,
byte[] family,
Collection<HStoreFile> replayedEdits)
throws IOException
conf - Configuration to determine the archive directory.fs - the filesystem used for storing WAL files.regionInfo - RegionInfo a pseudo region representation for the archiving logic.family - a pseudo familiy representation for the archiving logic.replayedEdits - the recovered edits to be archived.IOException - if files can't be achived due to some internal error.public static void archiveStoreFile(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
RegionInfo regionInfo,
org.apache.hadoop.fs.Path tableDir,
byte[] family,
org.apache.hadoop.fs.Path storeFile)
throws IOException
fs - the filesystem where the store files liveregionInfo - region hosting the store filesconf - Configuration to examine to determine the archive directorytableDir - Path to where the table is being stored (for building the archive
path)family - the family hosting the store filesstoreFile - file to be archivedIOException - if the files could not be correctly disposed.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.