[
https://issues.apache.org/jira/browse/HBASE-13917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588462#comment-14588462
]
Anoop Sam John commented on HBASE-13917:
----------------------------------------
+1.
{code}
private boolean isWriteRequest(final RequestHeader header, final Message
param) {
// TODO: Is there a better way to do this?
String methodName = header.getMethodName();
if (methodName.equalsIgnoreCase("multi") && param instanceof MultiRequest) {
MultiRequest multi = (MultiRequest)param;
for (RegionAction regionAction : multi.getRegionActionList()) {
for (Action action: regionAction.getActionList()) {
if (action.hasMutation()) {
return true;
}
}
}
}
{code}
We will need a better way for handling it like marking the request comes from
client as write and/or read. But not for this Jira any way.
> Remove string comparison to identify request priority
> -----------------------------------------------------
>
> Key: HBASE-13917
> URL: https://issues.apache.org/jira/browse/HBASE-13917
> Project: HBase
> Issue Type: Improvement
> Components: regionserver
> Reporter: Matteo Bertozzi
> Assignee: Matteo Bertozzi
> Priority: Minor
> Fix For: 2.0.0, 1.2.0
>
> Attachments: HBASE-13917-v0.patch
>
>
> We have a couple of if (methodName.equalsIgnoreCase("scan")) { ScanRequest
> req = (ScanRequest)parm; } we can replace that string comparison with an
> instanceof
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)