You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Sreeram <sr...@gmail.com> on 2017/03/20 14:16:57 UTC
Unable to get coprocessor debug logs in regionserver.
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;
}
}
Re: Unable to get coprocessor debug logs in regionserver.
Posted by Stack <st...@duboce.net>.
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 <sr...@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;
> }
> }
>
Re: Unable to get coprocessor debug logs in regionserver.
Posted by Ted Yu <yu...@gmail.com>.
What were your log4j settings ?
Could it be due to org.apache.hadoop.hbase.regionserver.wal (where FSHLog
resides) not being at DEBUG level ?
Cheers
On Mon, Mar 20, 2017 at 7:16 AM, Sreeram <sr...@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;
> }
> }
>