[
https://issues.apache.org/jira/browse/HBASE-11136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14127934#comment-14127934
]
Andrew Purtell edited comment on HBASE-11136 at 9/10/14 2:00 AM:
-----------------------------------------------------------------
Also, please avoid copy-paste in the new methods in
RegionServerCoprocessorHost.java. You must be using an old version of trunk
somehow. The new way we write hooks after HBASE-11733 looks like:
{code}
public boolean preMergeCommit(final HRegion regionA, final HRegion regionB,
final @MetaMutationAnnotation List<Mutation> metaEntries) throws IOExcept\
ion {
return execOperation(coprocessors.isEmpty() ? null : new CoprocessorOperati\
on() {
@Override
public void call(RegionServerObserver oserver,
ObserverContext<RegionServerCoprocessorEnvironment> ctx) throws IOExc\
eption {
oserver.preMergeCommit(ctx, regionA, regionB, metaEntries);
}
});
}
{code}
was (Author: apurtell):
Also, please avoid copy-paste in the new methods in
RegionServerCoprocessorHost.java. You must be using an old version of trunk
somehow. The new way we write hooks looks like:
{code}
public boolean preMergeCommit(final HRegion regionA, final HRegion regionB,
final @MetaMutationAnnotation List<Mutation> metaEntries) throws IOExcept\
ion {
return execOperation(coprocessors.isEmpty() ? null : new CoprocessorOperati\
on() {
@Override
public void call(RegionServerObserver oserver,
ObserverContext<RegionServerCoprocessorEnvironment> ctx) throws IOExc\
eption {
oserver.preMergeCommit(ctx, regionA, regionB, metaEntries);
}
});
}
public void postMergeCommit(final HRegion regionA, final HRegion regionB,
final HRegion mergedRegion) throws IOException {
execOperation(coprocessors.isEmpty() ? null : new CoprocessorOperation() {
@Override
public void call(RegionServerObserver oserver,
ObserverContext<RegionServerCoprocessorEnvironment> ctx) throws IOExc\
eption {
oserver.postMergeCommit(ctx, regionA, regionB, mergedRegion);
}
});
}
{code}
after HBASE-11931
> Add permission check to roll WAL writer
> ----------------------------------------
>
> Key: HBASE-11136
> URL: https://issues.apache.org/jira/browse/HBASE-11136
> Project: HBase
> Issue Type: Improvement
> Components: regionserver, security
> Affects Versions: 0.96.2, 0.98.2
> Reporter: Jerry He
> Assignee: Jerry He
> Priority: Minor
> Fix For: 2.0.0, 0.98.7, 0.99.1
>
> Attachments: HBASE-11136-trunk-v1.patch
>
>
> Currently HBase provides HBaseAdmin.rollHLogWriter() and shell command to
> roll WAL on a region server. But no permission check is done on this
> operation in a secure cluster.
> We need to add permission check to prevent un-authorized user from running
> this operation.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)