You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@impala.apache.org by Jim Apple <jb...@cloudera.com> on 2017/11/05 02:50:24 UTC

New Impala Contributors: IMPALA-3323

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-3323,
"impala-shell --ldap_password_cmd has no config file equivalent"?
First, make sure you have your development environment set up. Let's
see if we can reproduce the issue. Once your impala-server is running,
try to launch the impala shell with the --ldap_password_cmd flag set:


$ bin/impala-shell.sh --ldap_password_cmd
Usage: impala_shell.py [options]

impala_shell.py: error: --ldap_password_cmd option requires an argument
$ bin/impala-shell.sh --ldap_password_cmd SOME_ARGUMENT
Option --ldap_password_cmd requires using LDAP authentication mechanism (-l)
$ bin/impala-shell.sh --ldap_password_cmd SOME_ARGUMENT -l
LDAP credentials may not be sent over insecure connections. Enable SSL
or set --auth_creds_ok_in_clear
$ bin/impala-shell.sh --ldap_password_cmd SOME_ARGUMENT -l
--auth_creds_ok_in_clear
Starting Impala Shell using LDAP-based authentication
Error retrieving LDAP password (command was: 'SOME_ARGUMENT',
exception was: '[Errno 2] No such file or directory')

While not a resounding success, at least we know that the shell can
get past its argument parsing phase! To duplicate the issue referenced
in the ticket, let's create a .impalarc file that should recognize
that the --ldap_password_cmd flag is set. To see how a valid impalarc
flag looks, grep through the source code for references to it using
"git grep impalarc". You'll see references in
tests/shell/test_shell_commandline.py to the --config_file flag and a
file named good_impalarc. You can find that file using "find . -name
good_impalarc" and try to duplicate the command. Then, run it again,
but with a config file with a reference to ldap_password_cmd. What
error do you get? If you grep through the source code, where can you
find that error text referenced? What triggers it, and how can you fix
it?

Once you've solved that mystery and you can make an impala config file
that causes the shell to recognize the ldap_password_cmd option,
you'll want to write a regression test for it. In the
test_shell_commandline.py file, you'll see references to tests of
config files and tests of LDAP options. Use your best judgment on
whether this ticket deserves its own test method or can be folded into
one of the other two. As you iterate, you can test this file with

bin/impala-py.test
tests/shell/test_shell_commandline.py::TestImpalaShell::test_ldap_3323

In that example command line, test_ldap_3323 is a test method name -
you can change it to the method name of any other test method in that
file.

Have fun, and don't be afraid to ask dev@impala.apache.org is you have
any questions!