Support Questions
Find answers, ask questions, and share your expertise

Knox: how to create a custom dispatch class

Explorer

Hello,

I've just read in detail the Knox dev guide.

But I face to an issue with logsearch on my HDP cluster.

This is a HDP 2.6.5 with Knox 0.12.0 I've created some XML files.

These files are in PJs. But I face to some 403 requests. In fact, some urls have been "urlencoded" twice:

Rewrote URL:

http://XXX:80/gateway/default/logsearch/api/v1/service/logs/histogram?page=0&pageSize=999999999&star...*%3A*...

direction: IN via implicit rule: LOGSEARCH/logsearch/inbound

to URL:

http://XXX:61888/api/v1/service/logs/histogram?q=*%253A*&startIndex=0...

Thus, we've got the string "q=%3A" replaced by "q=%253A"

How can I resolve this issue ?

I've written a custom dispatch class and reference it in the service.xml but my class seems to be ignored.

<dispatch classname="org.apache.hadoop.gateway.logsearch.LogsearchDispatch"/>

I've put my Jar that contains this class in the ext directory.Thus, it should be in the classpath.

Thanks in advance

Regards,

David