private static class SecureBulkLoadManager.SecureBulkLoadListener extends Object implements HRegion.BulkLoadListener
| Modifier and Type | Field and Description |
|---|---|
private org.apache.hadoop.conf.Configuration |
conf |
private org.apache.hadoop.fs.FileSystem |
fs |
private Map<String,org.apache.hadoop.fs.permission.FsPermission> |
origPermissions |
private org.apache.hadoop.fs.FileSystem |
srcFs |
private String |
stagingDir |
| Constructor and Description |
|---|
SecureBulkLoadListener(org.apache.hadoop.fs.FileSystem fs,
String stagingDir,
org.apache.hadoop.conf.Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
private void |
closeSrcFs() |
void |
doneBulkLoad(byte[] family,
String srcPath)
Called after a successful HFile load
|
void |
failedBulkLoad(byte[] family,
String srcPath)
Called after a failed HFile load
|
private boolean |
isFile(org.apache.hadoop.fs.Path p)
Check if the path is referencing a file.
|
String |
prepareBulkLoad(byte[] family,
String srcPath,
boolean copyFile)
Called before an HFile is actually loaded
|
private final org.apache.hadoop.fs.FileSystem fs
private final String stagingDir
private final org.apache.hadoop.conf.Configuration conf
private org.apache.hadoop.fs.FileSystem srcFs
private Map<String,org.apache.hadoop.fs.permission.FsPermission> origPermissions
public SecureBulkLoadListener(org.apache.hadoop.fs.FileSystem fs, String stagingDir, org.apache.hadoop.conf.Configuration conf)
public String prepareBulkLoad(byte[] family, String srcPath, boolean copyFile) throws IOException
HRegion.BulkLoadListenerprepareBulkLoad in interface HRegion.BulkLoadListenerfamily - family being loaded tosrcPath - path of HFileIOExceptionpublic void doneBulkLoad(byte[] family, String srcPath) throws IOException
HRegion.BulkLoadListenerdoneBulkLoad in interface HRegion.BulkLoadListenerfamily - family being loaded tosrcPath - path of HFileIOExceptionprivate void closeSrcFs() throws IOException
IOExceptionpublic void failedBulkLoad(byte[] family, String srcPath) throws IOException
HRegion.BulkLoadListenerfailedBulkLoad in interface HRegion.BulkLoadListenerfamily - family being loaded tosrcPath - path of HFileIOExceptionprivate boolean isFile(org.apache.hadoop.fs.Path p) throws IOException
p - IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.