[
https://issues.apache.org/jira/browse/HBASE-9612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13784558#comment-13784558
]
stack commented on HBASE-9612:
------------------------------
Here is a commit message:
{code}
Changes the pb model so we can send more than one region's worth of edits
to a server at a time; up to this we could only send one regions' worth of
edits in a multi call (One region-worth of edits only is a regression
over 0.94)
With this patch a MultiRequest is made of 1-* RegionActions.
A RegionAction is a set of Actions to apply to a Region. A RegionAction
has the regionspecifier and a list of Actions. An Action is a union of
Get or Mutation.
Before this patch, a MultiRequest had a region specifier so you could
only pass edits (MultiActions) for a single region at a time.
Also adds priority to the rpc header; needed so could set priority on
a MultiRequest (before this, priority was determined by looking at
the region name -- MultiRequest was expected to have a region name
but now it does not).
M hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
Minor formatting and rename of a few variables.
Fix in here is passing on the relative index into original list of actions.
Previous it was ignored.
M
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientSmallScanner.java
M hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
M hbase-client/src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java
Set priority on request.
M hbase-client/src/main/java/org/apache/hadoop/hbase/client/Get.java
Remove unused import.
M
hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
Minor formatting.
M hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
Add setting priority on calls. Minor reformatting.
M
hbase-client/src/main/java/org/apache/hadoop/hbase/client/MultiServerCallable.java
Cleanup of long hard-to-grok block of code. Variable renaming.
Format multi requests according to new model. Set absolute indices on Actions
sent over to the server.
M
hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/PayloadCarryingRpcController.java
Added being able to pass priority across the pb Service into rpc.
M hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java
Ran into an NPE because writer was closed on me by separate thread.
Synchronize it in close like all other access to out stream.
Pass on priority.
M hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java
M
hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/RequestConverter.java
M
hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ResponseConverter.java
Changes to produce the new pb types and a bit of utility.
M hbase-protocol/README.txt
ll is not on every machine.
M hbase-protocol/src/main/protobuf/Client.proto
Do new model so can send many regions-worth-of-edits at a time.
M hbase-protocol/src/main/protobuf/RPC.proto
Add priority as optional on header.
M
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java
Special case multi calls.
M
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Change the handling of multi so we can do regions-worth of edits
Make use of new types.
{code}
> Ability to batch edits destined to different regions
> ----------------------------------------------------
>
> Key: HBASE-9612
> URL: https://issues.apache.org/jira/browse/HBASE-9612
> Project: HBase
> Issue Type: Bug
> Affects Versions: 0.95.0, 0.95.1, 0.95.2, 0.96.0
> Reporter: Benoit Sigoure
> Assignee: stack
> Priority: Critical
> Fix For: 0.98.0, 0.96.0
>
> Attachments:
> 0001-fix-packaging-by-region-in-MultiServerCallable.patch, 9612.096.v5.txt,
> 9612revert.txt, 9612v2.txt, 9612v3.txt, 9612v4.txt, 9612v5.txt, 9612v5.txt,
> 9612v5.txt, 9612v7.txt, 9612.wip.txt
>
>
> The old (pre-PB) "multi" and "multiPut" RPCs allowed one to batch edits
> destined to different regions. Seems like we've lost this ability after the
> switch to protobufs.
> The {{MultiRequest}} only contains one {{RegionSpecifier}}, and a list of
> {{MultiAction}}. The {{MultiAction}} message is contains either a single
> {{MutationProto}} or a {{Get}} (but not both – so its name is misleading as
> there is nothing "multi" about it). Also it seems redundant with
> {{MultiGetRequest}}, I'm not sure what's the point of supporting {{Get}} in
> {{MultiAction}}.
> I propose that we change {{MultiRequest}} to be a just a list of
> {{MultiAction}}, and {{MultiAction}} will contain the {{RegionSpecifier}},
> the {{bool atomic}} and a list of {{MutationProto}}. This would be a
> non-backward compatible protobuf change.
> If we want we can support mixing edits and reads, in which case we'd also add
> a list of {{Get}} in {{MultiAction}}, and we'd have support having both that
> list and the list of {{MutationProto}} set at the same time. But this is a
> bonus and can be done later (in a backward compatible manner, hence no need
> to rush on this one).
--
This message was sent by Atlassian JIRA
(v6.1#6144)