Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

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

avatar

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

avatar
Master 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

avatar
Master 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

avatar

Thank You for clarifying.

avatar
Master 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.

avatar

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

avatar
Master 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!

avatar
Master Mentor
@Shishir Saxena

You are confusing the NiFi functionality.

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

avatar

Thank you for above link.

avatar
Master Mentor

@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.

avatar
Master Mentor

questions is re: Nifi not Oozie