Support Questions

Find answers, ask questions, and share your expertise

How to execute shell commands using ExecuteProcess processor in a kerberized environment ?

I have a Kerberized cluster and a shell script containing some sqoop commands. Can we use NiFi ExecuteProcess processor to execute this shell script ?

I don't want to use ExecuteSQL processor because sqoop script has some processing logic that can't be easily replicated in NiFi.

1 ACCEPTED SOLUTION

Mentor

@Shishir Saxena execute process is intended for Linux commands, nifi is not a scheduling tool, you still need to use Oozie. Especially if you want to maintain order of your transactions. Oozie is still the solution for that with sqoop job maintaining the last record processed in the sqoop metastore

View solution in original post

10 REPLIES 10

Mentor

@Shishir Saxena execute process is intended for Linux commands, nifi is not a scheduling tool, you still need to use Oozie. Especially if you want to maintain order of your transactions. Oozie is still the solution for that with sqoop job maintaining the last record processed in the sqoop metastore

Thank You for clarifying.

Mentor

@Shishir Saxena you can wrap the sqoop command in shell script and use ExecuteProcess if you'd like, would love to see it as an article on HCC when you get it done.

Thanks @Artem Ervits. This is what I originally intended, but ExecuteProcess processor doesn't have any option to specify kerberos credentials.

Mentor

ok good, but in general my original answer still applies, Nifi is not an Oozie and Sqoop replacement. @Shishir Saxena you need either Change Data Capture (CDC) like Golden Gate or Attunity Replicate or Sqoop job with metastore keeping track of all rows processed. Good luck!

@Shishir Saxena

You are confusing the NiFi functionality.

Solution: See this example https://prodlife.wordpress.com/2013/11/22/using-oozie-in-kerberized-cluster/

Thank you for above link.

@Shishir Saxena Never hurt to look into alternate solutions @Artem Ervits I know it's NiFi question but there is context to Oozie and kerberos use too.

Mentor

questions is re: Nifi not Oozie

Hi, I got into very similar issue. Did you find a way to run shell with kerberos principal. We are trying to do the same, wrap the sqoop script inside shell and use ExecuteProcess processor. It fails to execute with GSS credentials exception.

We tried to start the nifi service with 'nifi' user that has nifi service principal. We want nifi to use user kerberos principal while running this sqoop script.

Any thoughts?

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.