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.BulkLoadListener
prepareBulkLoad
in interface HRegion.BulkLoadListener
family
- family being loaded tosrcPath
- path of HFileIOException
public void doneBulkLoad(byte[] family, String srcPath) throws IOException
HRegion.BulkLoadListener
doneBulkLoad
in interface HRegion.BulkLoadListener
family
- family being loaded tosrcPath
- path of HFileIOException
private void closeSrcFs() throws IOException
IOException
public void failedBulkLoad(byte[] family, String srcPath) throws IOException
HRegion.BulkLoadListener
failedBulkLoad
in interface HRegion.BulkLoadListener
family
- family being loaded tosrcPath
- path of HFileIOException
private boolean isFile(org.apache.hadoop.fs.Path p) throws IOException
p
- IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.