Class SecureBulkLoadManager.SecureBulkLoadListener
java.lang.Object
org.apache.hadoop.hbase.regionserver.SecureBulkLoadManager.SecureBulkLoadListener
- All Implemented Interfaces:
HRegion.BulkLoadListener
- Enclosing class:
- SecureBulkLoadManager
static class SecureBulkLoadManager.SecureBulkLoadListener
extends Object
implements HRegion.BulkLoadListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.apache.hadoop.conf.Configurationprivate final org.apache.hadoop.fs.FileSystemprivate org.apache.hadoop.fs.FileSystemprivate final String -
Constructor Summary
ConstructorsConstructorDescriptionSecureBulkLoadListener(org.apache.hadoop.fs.FileSystem fs, String stagingDir, org.apache.hadoop.conf.Configuration conf) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidvoiddoneBulkLoad(byte[] family, String srcPath) Called after a successful HFile loadvoidfailedBulkLoad(byte[] family, String stagedPath) Called after a failed HFile loadprivate booleanisFile(org.apache.hadoop.fs.Path p) Check if the path is referencing a file.prepareBulkLoad(byte[] family, String srcPath, boolean copyFile, String customStaging) Called before an HFile is actually loaded
-
Field Details
-
fs
-
stagingDir
-
conf
-
srcFs
-
origPermissions
-
origSources
-
-
Constructor Details
-
SecureBulkLoadListener
public SecureBulkLoadListener(org.apache.hadoop.fs.FileSystem fs, String stagingDir, org.apache.hadoop.conf.Configuration conf)
-
-
Method Details
-
prepareBulkLoad
public String prepareBulkLoad(byte[] family, String srcPath, boolean copyFile, String customStaging) throws IOException Description copied from interface:HRegion.BulkLoadListenerCalled before an HFile is actually loaded- Specified by:
prepareBulkLoadin interfaceHRegion.BulkLoadListener- Parameters:
family- family being loaded tosrcPath- path of HFile- Returns:
- final path to be used for actual loading
- Throws:
IOException
-
doneBulkLoad
Description copied from interface:HRegion.BulkLoadListenerCalled after a successful HFile load- Specified by:
doneBulkLoadin interfaceHRegion.BulkLoadListener- Parameters:
family- family being loaded tosrcPath- path of HFile- Throws:
IOException
-
closeSrcFs
- Throws:
IOException
-
failedBulkLoad
Description copied from interface:HRegion.BulkLoadListenerCalled after a failed HFile load- Specified by:
failedBulkLoadin interfaceHRegion.BulkLoadListener- Parameters:
family- family being loaded tostagedPath- path of HFile- Throws:
IOException
-
isFile
Check if the path is referencing a file. This is mainly needed to avoid symlinks.- Returns:
- true if the p is a file
- Throws:
IOException
-