[
https://issues.apache.org/jira/browse/HBASE-6224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrew Purtell updated HBASE-6224:
----------------------------------
Attachment: HBASE-6224-apurtell.patch
Attached patch that addresses my re-review comments.
Here's the functional difference:
{code}
Index:
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
===================================================================
---
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
(revision 1352336)
+++
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
(working copy)
@@ -3122,10 +3122,20 @@
HRegion region = getRegion(request.getRegion());
List<Pair<byte[], String>> familyPaths = new ArrayList<Pair<byte[],
String>>();
for (FamilyPath familyPath: request.getFamilyPathList()) {
- familyPaths.add(new Pair<byte[], String>(
- familyPath.getFamily().toByteArray(), familyPath.getPath()));
+ familyPaths.add(new Pair<byte[],
String>(familyPath.getFamily().toByteArray(),
+ familyPath.getPath()));
}
- boolean loaded = region.bulkLoadHFiles(familyPaths);
+ boolean bypass = false;
+ if (region.getCoprocessorHost() != null) {
+ bypass = region.getCoprocessorHost().preBulkLoadHFile(familyPaths);
+ }
+ boolean loaded = false;
+ if (!bypass) {
+ loaded = region.bulkLoadHFiles(familyPaths);
+ }
+ if (region.getCoprocessorHost() != null) {
+ loaded = region.getCoprocessorHost().postBulkLoadHFile(familyPaths,
loaded);
+ }
BulkLoadHFileResponse.Builder builder =
BulkLoadHFileResponse.newBuilder();
builder.setLoaded(loaded);
return builder.build();
{code}
> add Pre and Post coprocessor hooks for BulkLoad
> -----------------------------------------------
>
> Key: HBASE-6224
> URL: https://issues.apache.org/jira/browse/HBASE-6224
> Project: HBase
> Issue Type: Sub-task
> Components: coprocessors
> Affects Versions: 0.96.0, 0.94.1
> Reporter: Francis Liu
> Assignee: Francis Liu
> Attachments: HBASE-6224-apurtell.patch, HBASE-6224.patch
>
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira