If you'd like to contribute a patch to Impala, but aren't sure what
you want to work on, you can look at Impala's newbie issues:
https://issues.apache.org/jira/issues/?filter=12341668. You can find
detailed instructions on submitting patches at
https://cwiki.apache.org/confluence/display/IMPALA/Contributing+to+Impala.
This is a walkthrough of a ticket a new contributor could take on,
with hopefully enough detail to get you going but not so much to take
away the fun.

How can we fix https://issues.apache.org/jira/browse/IMPALA-5392,
"Stack depth for threads printed in the Catalog UI under JVM Threads
is not deep enough"?

First, set up your development environment and start a development
impala cluster by running bin/start-impala-cluster.py. Once it is
running, check out http://localhost:25020/jvm-threadz, which you will
see referenced offhand in
http://impala.apache.org/docs/build/html/topics/impala_webui.html.
That page has the stack traces the ticket (IMPALA-5392) is talking
about. You can see that several end in ellipses, indicating they are
cut off. Fixing that is the aim of this ticket.

In www/jvm-threadz.tmpl, you will see the template for creating this
page. The section to fix is "{{summary}}". To see where this is
populated, git grep jvm-threadz. There you will see it is referenced
in be/src/util/thread.cc. The references to summary in that file are
getting that information from a TJvmThreadInfo object, so we'll need
to trace where the summary field of that object is populated. That
object is referenced in common/thrift/Frontend.thrift, which is its
definition, and in
fe/src/main/java/org/apache/impala/common/JniUtil.java. In that file,
you will see setSummary called with the result of a call to
java.lang.management.ThreadInfo.toString(), which is described here:

https://docs.oracle.com/javase/8/docs/api/java/lang/management/ThreadInfo.html#toString--

Investigate those docs and find a way to add more stack trace
information. Once you think you have it, you will need to rebuild and
restart the cluster:

./buildall.sh -notests -noclean -ninja -start_impala_cluster

Reload the webpage and admire your handiwork! Once you're satisfied,
submit your patch for review following the instructions on
https://cwiki.apache.org/confluence/display/IMPALA/Contributing+to+Impala.

Reply via email to