hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From js...@email.de
Subject RegionObserver Coprocessor PreGet
Date Wed, 02 Feb 2011 15:24:29 GMT
Hi,
currently I am a little confused by the Hbase Blog RegionOberserver example (http://hbaseblog.com/2010/11/30/hbase-coprocessors/)
when trying to implement some similar functionality using the latest svn source checkout.

public class RBACCoprocessor extends BaseRegionObserver {
 @Override
 public Get preGet(CoprocessorEnvironment e, Get get)
 throws CoprocessorException {

 // check permissions..
 if (access_not_allowed)  {
 throw new AccessDeniedException("User is not allowed to access.");
 }
 return get;
 }
....

Here my questions 
a) I extended my class from BaseRegionObserverCoprocessor instead of BaseRegionObserver, is
that correct? Or where is the later class located?
b) as in difference to the example BaseRegionObserverCoprocessor.preGet() has return type
void, how could I actually change the Get Object to be returned?
C) is there some other code example for using BaseRegionObserver Coprocessor? The javadoc
example is somehow incomplete (but also extends BaseRegionObserverCoprocessor)

Sorry if these questions are trivial, just getting started...
 
Thanks for your support!
JS

Mime
View raw message