hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stack <st...@duboce.net>
Subject Re: Unable to get coprocessor debug logs in regionserver.
Date Mon, 20 Mar 2017 19:10:43 GMT
Your code is in the default package. Try setting it into the
org.apache.hadoop.hbase package (or amending log4j.properties) to add INFO
logging on whatever your package is).
St.Ack

On Mon, Mar 20, 2017 at 7:16 AM, Sreeram <sreeram.v@gmail.com> wrote:

> Hi,
>
>   I am writing a coprocessor for postWALWrite event.
>
> I do not see the debug logs for the coprocessor in RS log.
>
> I could see that the coprocessor got loaded by the regionserver - below
> line is from RS log.
>
> 2017-03-20 18:59:17,132 INFO
> org.apache.hadoop.hbase.coprocessor.CoprocessorHost: System coprocessor
> Test.TestWALEditCP was loaded successfully with priority (536870912).
>
> Any thoughts what can be going wrong ?
>
> Thanks,
> Sreeram
>
> PS: My code is below.
> ================
>
> package Test;
>
> import org.apache.commons.logging.Log;
> import org.apache.commons.logging.LogFactory;
> import org.apache.hadoop.hbase.regionserver.wal.FSHLog;
> import org.apache.hadoop.hbase.regionserver.wal.WALEdit;
> import org.apache.hadoop.hbase.wal.WALKey;
>
> public class TestWALEditCP extends BaseWALObserver {
>     public static final Log LOG = LogFactory.getLog(FSHLog.class);
>
>     @Override
>     public void postWALWrite(ObserverContext<? extends
> WALCoprocessorEnvironment> ctx, HRegionInfo info, WALKey logkey, WALEdit
> logEdit) {
>         LOG.info("Post WAL edit is being triggered"); // <--- This line
> does not get printed in RS log
>         return;
>     }
> }
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message