Thursday, February 25, 2016

How to enable function register debug in Drill

Goal:

How to enable function register debug in Drill.
After that, Drill will print the registered functions in drillbit.log when drillbit starts.
This can help troubleshoot if certain custom Drill UDF is registered or not.

Env:

Drill 1.4

Solution:

1. Put below entry into $DRILL_HOME/conf/logback.xml on all drillbit nodes.

For example, if it is Drill 1.4 on MapR, then the location is:
/opt/mapr/drill/drill-1.4.0/conf/logback.xml
<logger name="org.apache.drill.exec.expr.fn" additivity="false">
      <level value="trace" />
      <appender-ref ref="FILE" />
</logger>

2. Restart all drillbits.

3. Check the debug logs in drillbit.log

DrillSimpleFuncHolder [functionNames=[dup_string], returnType=MajorType[minor_type: VARCHAR mode: REQUIRED], nullHandling=NULL_IF_NULL, parameters=[ValueReference [type=MajorType[minor_type: VARCHAR mode: REQUIRED], name=input_vc], ValueReference [type=MajorType[minor_type: INT mode: REQUIRED], name=num_times]]]

No comments:

Post a Comment

Popular Posts