<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Impala schedule with oozie -tutorial in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/23906#M4690</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm searching for a good tutorial about how to schedule impala jobs into oozie.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only threads that I found about this subject are:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;o &lt;A target="_blank" href="https://issues.apache.org/jira/browse/OOZIE-1591"&gt;https://issues.apache.org/jira/browse/OOZIE-1591&lt;/A&gt;&lt;/P&gt;&lt;P&gt;o &lt;A target="_blank" href="https://groups.google.com/a/cloudera.org/forum/#!topic/impala-user/8vM7fKR7F3A"&gt;https://groups.google.com/a/cloudera.org/forum/#!topic/impala-user/8vM7fKR7F3A&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please help? (give at least one example)&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 09:19:58 GMT</pubDate>
    <dc:creator>AlinaGHERMAN</dc:creator>
    <dc:date>2022-09-16T09:19:58Z</dc:date>
    <item>
      <title>Impala schedule with oozie -tutorial</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/23906#M4690</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm searching for a good tutorial about how to schedule impala jobs into oozie.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only threads that I found about this subject are:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;o &lt;A target="_blank" href="https://issues.apache.org/jira/browse/OOZIE-1591"&gt;https://issues.apache.org/jira/browse/OOZIE-1591&lt;/A&gt;&lt;/P&gt;&lt;P&gt;o &lt;A target="_blank" href="https://groups.google.com/a/cloudera.org/forum/#!topic/impala-user/8vM7fKR7F3A"&gt;https://groups.google.com/a/cloudera.org/forum/#!topic/impala-user/8vM7fKR7F3A&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please help? (give at least one example)&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 09:19:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/23906#M4690</guid>
      <dc:creator>AlinaGHERMAN</dc:creator>
      <dc:date>2022-09-16T09:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: Impala schedule with oozie -tutorial</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/23913#M4691</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently there is not an Impala action, so you must use a shell action that calls impala-shell. &amp;nbsp;The shell script that calls impala-shell must also include an entry to set the PYTHON EGGS location. &amp;nbsp;Here is an example shell script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#!/bin/bash&lt;/P&gt;&lt;P&gt;export PYTHON_EGG_CACHE=./myeggs&lt;BR /&gt;/usr/bin/kinit -kt cconner.keytab -V cconner&lt;BR /&gt;impala-shell -q "invalidate metadata"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTICE the PYTHON_EGG_CACHE, this is the location you must set or the job will fail. &amp;nbsp;This also does a kinit in the case of a kerberized cluster. &amp;nbsp;Here is the workflow that goes with that script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;workflow-app name="shell-impala-invalidate-wf" xmlns="uri:oozie:workflow:0.4"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;start to="shell-impala-invalidate"/&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;action name="shell-impala-invalidate"&amp;gt;&lt;BR /&gt;&amp;lt;shell xmlns="uri:oozie:shell-action:0.1"&amp;gt;&lt;BR /&gt;&amp;lt;job-tracker&amp;gt;${jobTracker}&amp;lt;/job-tracker&amp;gt;&lt;BR /&gt;&amp;lt;name-node&amp;gt;${nameNode}&amp;lt;/name-node&amp;gt;&lt;BR /&gt;&amp;lt;configuration&amp;gt;&lt;BR /&gt;&amp;lt;property&amp;gt;&lt;BR /&gt;&amp;lt;name&amp;gt;mapred.job.queue.name&amp;lt;/name&amp;gt;&lt;BR /&gt;&amp;lt;value&amp;gt;${queueName}&amp;lt;/value&amp;gt;&lt;BR /&gt;&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;/configuration&amp;gt;&lt;BR /&gt;&amp;lt;exec&amp;gt;shell-impala-invalidate.sh&amp;lt;/exec&amp;gt;&lt;BR /&gt;&amp;lt;file&amp;gt;shell-impala-invalidate.sh#shell-impala-invalidate.sh&amp;lt;/file&amp;gt;&lt;BR /&gt;&amp;lt;file&amp;gt;cconner.keytab#cconner.keytab&amp;lt;/file&amp;gt;&lt;BR /&gt;&amp;lt;/shell&amp;gt;&lt;BR /&gt;&amp;lt;ok to="end"/&amp;gt;&lt;BR /&gt;&amp;lt;error to="kill"/&amp;gt;&lt;BR /&gt;&amp;lt;/action&amp;gt;&lt;BR /&gt;&amp;lt;kill name="kill"&amp;gt;&lt;BR /&gt;&amp;lt;message&amp;gt;Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]&amp;lt;/message&amp;gt;&lt;BR /&gt;&amp;lt;/kill&amp;gt;&lt;BR /&gt;&amp;lt;end name="end"/&amp;gt;&lt;BR /&gt;&amp;lt;/workflow-app&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You must include the &amp;lt;file&amp;gt; tag with the shell script, but not the keytab part unless you are using kerberos.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jan 2015 18:55:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/23913#M4691</guid>
      <dc:creator>cconner</dc:creator>
      <dc:date>2015-01-21T18:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Impala schedule with oozie -tutorial</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/24584#M4692</link>
      <description>&lt;P&gt;Hi cconner&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; It worked by your example, thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; But if I want to execute impala-shell -f *.sql&amp;nbsp; , in Oozie ,there was error mentioned couldn't find the file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I had upload the sql file into Oozie workspace and add path for it .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I try to pass&amp;nbsp;shell argument, like ./impala-shell -f $2&amp;nbsp;,but it didn't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Could you please tell me how to do it in right way?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; This is my xml ( I&amp;nbsp;replaced sensitive info by ***):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;workflow-app name="impala-shelltest" xmlns="uri:oozie:workflow:0.4"&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;credentials&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;credential name="hcat" type="hcat"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;name&amp;gt;hcat.metastore.uri&amp;lt;/name&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;value&amp;gt;thrift://***:9083&amp;lt;/value&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;name&amp;gt;***&amp;lt;/name&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;value&amp;gt;***&amp;lt;/value&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/credential&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;credential name="hive2" type="hive2"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;name&amp;gt;hive2.jdbc.url&amp;lt;/name&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;value&amp;gt;jdbc:hive2://***:10000/default&amp;lt;/value&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;name&amp;gt;hive2.server.principal&amp;lt;/name&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;value&amp;gt;hive/***&amp;lt;/value&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/credential&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/credentials&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;start to="impalashell"/&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;action name="impalashell" cred="hcat,hive2"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;shell xmlns="uri:oozie:shell-action:0.1"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;job-tracker&amp;gt;${jobTracker}&amp;lt;/job-tracker&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;name-node&amp;gt;${nameNode}&amp;lt;/name-node&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;exec&amp;gt;runstats.sh&amp;lt;/exec&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;argument&amp;gt;***.keytab&amp;lt;/argument&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;argument&amp;gt;***.sql&amp;lt;/argument&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;file&amp;gt;runstats.sh#runstats.sh&amp;lt;/file&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;file&amp;gt;***.keytab#***.keytab&amp;lt;/file&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;file&amp;gt;***.sql#***.sql&amp;lt;/file&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;capture-output/&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/shell&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ok to="end"/&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;error to="kill"/&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/action&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;kill name="kill"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;message&amp;gt;Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]&amp;lt;/message&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/kill&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;end name="end"/&amp;gt;&lt;BR /&gt;&amp;lt;/workflow-app&amp;gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Feb 2015 06:32:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/24584#M4692</guid>
      <dc:creator>jackssqcyy</dc:creator>
      <dc:date>2015-02-12T06:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Impala schedule with oozie -tutorial</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/24604#M4693</link>
      <description>&lt;P&gt;The method you did was correct and should have worked. &amp;nbsp;Did you try a command like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;impala-shell -f ./file.sql&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Feb 2015 14:47:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/24604#M4693</guid>
      <dc:creator>cconner</dc:creator>
      <dc:date>2015-02-12T14:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Impala schedule with oozie -tutorial</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/24648#M4694</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; No, it didn't work....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I assume impala -f only support &amp;lt;local&amp;gt;path , but the hard thing is we couldn't which node will run the script and we couldn't sync the file to every node for some security reason.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Do you have more suggestion ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TK&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Feb 2015 06:55:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/24648#M4694</guid>
      <dc:creator>jackssqcyy</dc:creator>
      <dc:date>2015-02-13T06:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: Impala schedule with oozie -tutorial</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/24653#M4695</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also had this problem (&lt;SPAN&gt; impala -f only support &amp;lt;local&amp;gt;path) .&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As for myself, I did a shell script that downloads the file from hdfs to /tmp/somedirectory.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Afterwards, I call the&amp;nbsp;impala -f command.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(I did something like)&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;FILE_TO_LAUNCH_LOCAL='/tmp'
FILE_TO_LAUNCH_LOCAL_WITH_TIMESTAMP=${FILE_TO_LAUNCH_LOCAL}/Oozie${TIMESTAMP}

export PYTHON_EGG_CACHE=./myeggs
mkdir ${FILE_TO_LAUNCH_LOCAL_WITH_TIMESTAMP}

mkdir ${FILE_TO_LAUNCH_LOCAL_WITH_TIMESTAMP}
hdfs dfs -copyToLocal ${FILE_TO_LAUNCH} ${FILE_TO_LAUNCH_LOCAL_WITH_TIMESTAMP}/

impala-shell -f ${FILE_TO_LAUNCH_LOCAL_WITH_TIMESTAMP}/myfile;

rm ${FILE_TO_LAUNCH_LOCAL_COMPLETE}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Alina&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Feb 2015 07:49:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/24653#M4695</guid>
      <dc:creator>AlinaGHERMAN</dc:creator>
      <dc:date>2015-02-13T07:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: Impala schedule with oozie -tutorial</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/24663#M4696</link>
      <description>&lt;P&gt;This right here works:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;workflow-app name="shell-impala-invalidate-wf" xmlns="uri:oozie:workflow:0.4"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;start to="shell-impala-invalidate"/&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;action name="shell-impala-invalidate"&amp;gt;&lt;BR /&gt;&amp;lt;shell xmlns="uri:oozie:shell-action:0.1"&amp;gt;&lt;BR /&gt;&amp;lt;job-tracker&amp;gt;${jobTracker}&amp;lt;/job-tracker&amp;gt;&lt;BR /&gt;&amp;lt;name-node&amp;gt;${nameNode}&amp;lt;/name-node&amp;gt;&lt;BR /&gt;&amp;lt;configuration&amp;gt;&lt;BR /&gt;&amp;lt;property&amp;gt;&lt;BR /&gt;&amp;lt;name&amp;gt;mapred.job.queue.name&amp;lt;/name&amp;gt;&lt;BR /&gt;&amp;lt;value&amp;gt;${queueName}&amp;lt;/value&amp;gt;&lt;BR /&gt;&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;/configuration&amp;gt;&lt;BR /&gt;&amp;lt;exec&amp;gt;shell-impala-invalidate.sh&amp;lt;/exec&amp;gt;&lt;BR /&gt;&amp;lt;file&amp;gt;shell-impala-invalidate.sh#shell-impala-invalidate.sh&amp;lt;/file&amp;gt;&lt;BR /&gt;&amp;lt;file&amp;gt;shell-impala-invalidate.sql#shell-impala-invalidate.sql&amp;lt;/file&amp;gt;&lt;BR /&gt;&amp;lt;file&amp;gt;cconner.keytab#cconner.keytab&amp;lt;/file&amp;gt;&lt;BR /&gt;&amp;lt;/shell&amp;gt;&lt;BR /&gt;&amp;lt;ok to="end"/&amp;gt;&lt;BR /&gt;&amp;lt;error to="kill"/&amp;gt;&lt;BR /&gt;&amp;lt;/action&amp;gt;&lt;BR /&gt;&amp;lt;kill name="kill"&amp;gt;&lt;BR /&gt;&amp;lt;message&amp;gt;Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]&amp;lt;/message&amp;gt;&lt;BR /&gt;&amp;lt;/kill&amp;gt;&lt;BR /&gt;&amp;lt;end name="end"/&amp;gt;&lt;BR /&gt;&amp;lt;/workflow-app&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Script:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;#!/bin/bash&lt;BR /&gt;LOG=/tmp/shell-impala-invalidate-$USER.log&lt;BR /&gt;ls -alrt &amp;gt; $LOG&lt;/P&gt;&lt;P&gt;export PYTHON_EGG_CACHE=./myeggs&lt;BR /&gt;/usr/bin/kinit -kt cconner.keytab -V cconner&lt;BR /&gt;/usr/bin/klist -e &amp;gt;&amp;gt; $LOG&lt;BR /&gt;impala-shell -f shell-impala-invalidate.sql&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: the &amp;lt;file&amp;gt; tag puts that file on the local file system where the impala-shell is going to run, so the file is indeed local for the -f flag and it goes in "PWD/&amp;lt;whatever is after #&amp;gt;". &amp;nbsp;For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;file&amp;gt;test.sql#/test1/test.sql&amp;lt;/file&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then test.sql will be found in:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PWD/test1/test.sql&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;file&amp;gt;test.sql#test.sql&amp;lt;/file&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then test.sql will be found in:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PWD/test.sql&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the shell script and the keytab are also in "PWD" because of the file tags. &amp;nbsp;I would do the following in your shell script to get some more insight:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#!/bin/bash&lt;BR /&gt;LOG=/tmp/shell-impala-invalidate-$USER.log&lt;BR /&gt;ls -alrtR &amp;gt; $LOG &amp;nbsp;#This will show you all the files in the directory and their relative paths&lt;/P&gt;&lt;P&gt;export PYTHON_EGG_CACHE=./myeggs&lt;BR /&gt;/usr/bin/kinit -kt cconner.keytab -V cconner&lt;BR /&gt;/usr/bin/klist -e &amp;gt;&amp;gt; $LOG&lt;/P&gt;&lt;P&gt;hadoop fs -put $LOG /tmp &amp;nbsp;#put the log file in HDFS to find it easily&lt;/P&gt;&lt;P&gt;impala-shell -f shell-impala-invalidate.sql&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTICE the "ls -lartR" and the "hadoop fs" command, this way you can easily grab the log file from HDFS and see what files are actually there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Feb 2015 13:59:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/24663#M4696</guid>
      <dc:creator>cconner</dc:creator>
      <dc:date>2015-02-13T13:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Impala schedule with oozie -tutorial</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/30592#M4697</link>
      <description>&lt;P&gt;In general 3 files are needed:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Linux shell-script to invoke&lt;/P&gt;&lt;P&gt;2) Sql file with impala queries/commands&lt;/P&gt;&lt;P&gt;3) Keytab&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Those 3 files should be uploaded to the workflow deployment folder of the Oozie wf, and references as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;lt;workflow-app name="logdirs" xmlns="uri:oozie:workflow:0.4"&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;lt;start to="invalidate_oozie"/&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;lt;action name="invalidate_oozie" cred=""&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;&amp;lt;shell xmlns="uri:oozie:shell-action:0.1"&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;job-tracker&amp;gt;${jobTracker}&amp;lt;/job-tracker&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;name-node&amp;gt;${nameNode}&amp;lt;/name-node&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;exec&amp;gt;${SHELL_SCRIPT}&amp;lt;/exec&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;env-var&amp;gt;PYTHON_EGG_CACHE=./python-eggs&amp;lt;/env-var&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;file&amp;gt;${SHELL_SCRIPT}#${SHELL_SCRIPT}&amp;lt;/file&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;file&amp;gt;${KEYTAB_FILE}#${KEYTAB_FILE}&amp;lt;/file&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;file&amp;gt;${SQL_FILE}#${SQL_FILE}&amp;lt;/file&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;capture-output/&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/shell&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;ok to="end"/&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;error to="kill"/&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;lt;/action&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;lt;kill name="kill"&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;message&amp;gt;Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]&amp;lt;/message&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;lt;/kill&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;lt;end name="end"/&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;lt;/workflow-app&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Later replace the variables when invoking the workflow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then those 3 files will be avialble/reachable for the shell-script under the $PWD path.&lt;/P&gt;&lt;P&gt;So kinit -kt &amp;lt;keytab_file&amp;gt; -V &amp;lt;username&amp;gt; can be done from the linux shell-script as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;kinit -kt $PWD/&amp;lt;keytab_file&amp;gt; -V &amp;lt;username&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and impala invoked as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;impala-shell -f $PWD/&amp;lt;sql_file&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In reallity, because the script is invoked from the PWD path, $PWD variable could be ommited. The important is to include the 3 files in the Shell action to make them available on runtime.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2015 15:19:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/30592#M4697</guid>
      <dc:creator>Ivan San Antonio</dc:creator>
      <dc:date>2015-08-07T15:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: Impala schedule with oozie -tutorial</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/32520#M4698</link>
      <description>&lt;P&gt;I hope I didn't necro this one. I just want to ask if I need the python eggs if I just want to schedule a job for impala. and oh, since i am using &amp;nbsp;the oozie web rest api, i wanted to know if there is any XML sample I could relate to, especially when I needed the SQL line to be dynamic enough. e.g. first http request would be "select * from table1" while the next from it would be "select * from table2".&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2015 09:32:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/32520#M4698</guid>
      <dc:creator>xylenet</dc:creator>
      <dc:date>2015-10-01T09:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: Impala schedule with oozie -tutorial</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/32543#M4699</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For me it didn't work without the&amp;nbsp;python eggs thing.&lt;/P&gt;&lt;P&gt;In order to by dynamic I replaced some well defined sequences in the shell script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example. I had my impala script something like this one:&lt;/P&gt;&lt;PRE&gt;select * from ${table1};
select * from ${table2};&lt;/PRE&gt;&lt;P&gt;Then in the shell script I did something like:&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;sed&lt;/STRONG&gt;  &lt;STRONG&gt;"s/\${table1}/my_real_table_one/g;s/\${table2}/my_real_table_two/g;"&lt;/STRONG&gt; $LOCAL_FILE_PATH &amp;gt; $LOCAL_FILE_WITH_VARIABLE_REPLACED&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this and my other post with the &lt;STRONG&gt;copyToLocal command &lt;/STRONG&gt;for copying in local will help you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alina GHERMAN&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2015 13:34:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/32543#M4699</guid>
      <dc:creator>AlinaGHERMAN</dc:creator>
      <dc:date>2015-10-01T13:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Impala schedule with oozie -tutorial</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/37715#M4700</link>
      <description>&lt;P&gt;Thanks to all who participated in this thread. Check out the &lt;A href="https://community.cloudera.com/t5/Interactive-Short-cycle-SQL/How-to-Schedule-Impala-Jobs-with-Oozie/ta-p/31277" target="_blank"&gt;Community Knowledge article&lt;/A&gt; we created based on it. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2016 21:58:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/37715#M4700</guid>
      <dc:creator>cjervis</dc:creator>
      <dc:date>2016-02-22T21:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Impala schedule with oozie -tutorial</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/44622#M4701</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;2016-09-01 12:32:17,252 WARN org.apache.oozie.action.hadoop.ShellActionExecutor: SERVER[******] USER[****] GROUP[-] TOKEN[] APP[PV3] JOB[0000050-160512133914543-oozie-oozi-W] ACTION[0000050-160512133914543-oozie-oozi-W@shell-7170] Launcher ERROR, reason: Main class [org.apache.oozie.action.hadoop.ShellMain], main() threw exception, Cannot run program "shell-impala-invalidate.sh" (in directory "/data/4/yarn/nm/usercache/****/appcache/application_1463053085953_30120/container_e49_1463053085953_30120_01_000002"): error=2, No such file or directory
2016-09-01 12:32:17,252 WARN org.apache.oozie.action.hadoop.ShellActionExecutor: SERVER[******] USER[****] GROUP[-] TOKEN[] APP[PV3] JOB[0000050-160512133914543-oozie-oozi-W] ACTION[0000050-160512133914543-oozie-oozi-W@shell-7170] Launcher exception: Cannot run program "shell-impala-invalidate.sh" (in directory "/data/4/yarn/nm/usercache/****/appcache/application_1463053085953_30120/container_e49_1463053085953_30120_01_000002"): error=2, No such file or directory
java.io.IOException: Cannot run program "shell-impala-invalidate.sh" (in directory "/data/4/yarn/nm/usercache/*******/appcache/application_1463053085953_30120/container_e49_1463053085953_30120_01_000002"): error=2, No such file or directory&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/435fbd8fba210f7fd35583c10d87a5935b34befe/68747470733a2f2f7332312e706f7374696d672e696f2f756c7865717733317a2f6f6f7a69652e706e67" border="0" alt="" width="823" height="602" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to follow the tutorial, but for some reasons i get the following error.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;My workflow.xml&lt;/P&gt;&lt;PRE&gt;&amp;lt;workflow-app name="shell-impala-invalidate-wf" xmlns="uri:oozie:workflow:0.4"&amp;gt;
&amp;lt;start to="shell-impala-invalidate"/&amp;gt;
&amp;lt;action name="shell-impala-invalidate"&amp;gt;
&amp;lt;shell xmlns="uri:oozie:shell-action:0.1"&amp;gt;
&amp;lt;job-tracker&amp;gt;${jobTracker}&amp;lt;/job-tracker&amp;gt;
&amp;lt;name-node&amp;gt;${nameNode}&amp;lt;/name-node&amp;gt;
&amp;lt;configuration&amp;gt;
&amp;lt;property&amp;gt;
&amp;lt;name&amp;gt;mapred.job.queue.name&amp;lt;/name&amp;gt;
&amp;lt;value&amp;gt;${queueName}&amp;lt;/value&amp;gt;
&amp;lt;/property&amp;gt;
&amp;lt;/configuration&amp;gt;
&amp;lt;exec&amp;gt;shell-impala-invalidate.sh&amp;lt;/exec&amp;gt;
&amp;lt;file&amp;gt;shell-impala-invalidate.sh#shell-impala-invalidate.sh&amp;lt;/file&amp;gt;
&amp;lt;file&amp;gt;shell-impala-invalidate.sql#shell-impala-invalidate.sql&amp;lt;/file&amp;gt;
&amp;lt;file&amp;gt;****.keytab#****.keytab&amp;lt;/file&amp;gt;
&amp;lt;/shell&amp;gt;
&amp;lt;ok to="end"/&amp;gt;
&amp;lt;error to="kill"/&amp;gt;
&amp;lt;/action&amp;gt;
&amp;lt;kill name="kill"&amp;gt;
&amp;lt;message&amp;gt;Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]&amp;lt;/message&amp;gt;
&amp;lt;/kill&amp;gt;
&amp;lt;end name="end"/&amp;gt;
&amp;lt;/workflow-app&amp;gt;&lt;/PRE&gt;&lt;P&gt;Shell:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;#!/bin/bash
LOG=/tmp/shell-impala-invalidate-$USER.log
ls -alrtR &amp;gt; $LOG  #This will show you all the files in the directory and their relative paths
export PYTHON_EGG_CACHE=./myeggs
/usr/bin/kinit -kt ***.keytab -V ***
/usr/bin/klist -e &amp;gt;&amp;gt; $LOG
hadoop fs -put $LOG /tmp  #put the log file in HDFS to find it easily
impala-shell -f shell-impala-invalidate.sql&lt;/PRE&gt;&lt;P&gt;I feel a bit of lost now. Could any of you please give me a push, what is wrong?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 12:25:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/44622#M4701</guid>
      <dc:creator>andras1234</dc:creator>
      <dc:date>2016-09-01T12:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: Impala schedule with oozie -tutorial</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/44654#M4702</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your problem is not linked to the impala scheduler, but to the shell. In fact oozie cannot find your shell file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.What are the permission on the file? does oozie has acces?&lt;/P&gt;&lt;PRE&gt;shell-impala-invalidate.sh&lt;/PRE&gt;&lt;P&gt;2.What are the premission to the folder?&lt;/P&gt;&lt;PRE&gt;/data/4/yarn/nm/usercache/*******/appcache/application_1463053085953_30120/container_e49_1463053085953_30120_01_000002&lt;/PRE&gt;&lt;P&gt;(this folder is on one of your workers)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alina&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2016 09:51:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/44654#M4702</guid>
      <dc:creator>AlinaGHERMAN</dc:creator>
      <dc:date>2016-09-02T09:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: Impala schedule with oozie -tutorial</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/44656#M4703</link>
      <description>&lt;P&gt;Hi Alina,&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Permissions" style="width: 600px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/2070i97506781035C1CBC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Permissions" alt="Permissions" /&gt;&lt;/span&gt;﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First attempt:&lt;BR /&gt;I placed everything into my own library user / username, and gave the same permissions as in the attached picture.&lt;BR /&gt;Second attempt:&lt;BR /&gt;All the files were placed into the oozie workspace, (user/hue/oozie/workspaces/...), with the above permissions but the log message is still the same.&lt;BR /&gt;&lt;BR /&gt;2.:&lt;BR /&gt;Can I check the permission to this folder through the webUI?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2016 11:30:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/44656#M4703</guid>
      <dc:creator>andras1234</dc:creator>
      <dc:date>2016-09-02T11:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: Impala schedule with oozie -tutorial</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/45130#M4704</link>
      <description>&lt;P&gt;Thyanks for the fruitful discussion , it saved my time. I have just made it working by making below changes&amp;nbsp;&lt;/P&gt;&lt;P&gt;My workflow app xml :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;workflow-app name="shell-impala-invalidate-wf" xmlns="uri:oozie:workflow:0.4"&amp;gt;&lt;BR /&gt;&amp;lt;start to="shell-impala-invalidate"/&amp;gt;&lt;BR /&gt;&amp;lt;action name="shell-impala-invalidate"&amp;gt;&lt;BR /&gt;&amp;lt;shell xmlns="uri:oozie:shell-action:0.1"&amp;gt;&lt;BR /&gt;&amp;lt;job-tracker&amp;gt;${jobTracker}&amp;lt;/job-tracker&amp;gt;&lt;BR /&gt;&amp;lt;name-node&amp;gt;${nameNode}&amp;lt;/name-node&amp;gt;&lt;BR /&gt;&amp;lt;configuration&amp;gt;&lt;BR /&gt;&amp;lt;property&amp;gt;&lt;BR /&gt;&amp;lt;name&amp;gt;mapred.job.queue.name&amp;lt;/name&amp;gt;&lt;BR /&gt;&amp;lt;value&amp;gt;${queueName}&amp;lt;/value&amp;gt;&lt;BR /&gt;&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;/configuration&amp;gt;&lt;BR /&gt;&amp;lt;exec&amp;gt;${EXEC}&amp;lt;/exec&amp;gt;&lt;BR /&gt;&amp;lt;file&amp;gt;${EXEC}#${EXEC}&amp;lt;/file&amp;gt;&lt;BR /&gt;&amp;lt;file&amp;gt;${EXECQSCRIPT}#${EXECQSCRIPT}&amp;lt;/file&amp;gt;&lt;BR /&gt;&amp;lt;/shell&amp;gt;&lt;BR /&gt;&amp;lt;ok to="end"/&amp;gt;&lt;BR /&gt;&amp;lt;error to="kill"/&amp;gt;&lt;BR /&gt;&amp;lt;/action&amp;gt;&lt;BR /&gt;&amp;lt;kill name="kill"&amp;gt;&lt;BR /&gt;&amp;lt;message&amp;gt;Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]&amp;lt;/message&amp;gt;&lt;BR /&gt;&amp;lt;/kill&amp;gt;&lt;BR /&gt;&amp;lt;end name="end"/&amp;gt;&lt;BR /&gt;&amp;lt;/workflow-app&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where&amp;nbsp;&lt;STRONG&gt;EXEC and&amp;nbsp;EXECQSCRIPT&amp;nbsp;&lt;/STRONG&gt;are the path to the shell script and my sql file respectively.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my shell script , I just need to add the following lines (I am not using secured environment here, so no Kerberos)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;export PYTHON_EGG_CACHE= /home/python-egg-catch&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;impala-shell -f shellq.sql&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where shellq.sql is my query file and python-egg-catch is the folder I have created with proper permission.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 12:35:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/45130#M4704</guid>
      <dc:creator>som81</dc:creator>
      <dc:date>2016-09-15T12:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: Impala schedule with oozie -tutorial</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/46971#M4706</link>
      <description>&lt;P&gt;Hi - see this is quite an old thread, but was very useful to get me going.&amp;nbsp; I've ended up writing a wrapper script to make the shell action behave like a HiveServer2 action from a parameter perspective.&amp;nbsp; Here it is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Usage Notes:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;There are 4 mandatory parameters which must be in the correct ordinal position:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Script file name: e.g. test.sql &lt;STRONG&gt;**MUST BE REFERENCED AS A FILE IN THE ACTION&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;The name of the keytab e.g. smithjon.keytab&amp;nbsp;&lt;STRONG&gt;**MUST BE REFERENCED AS A FILE IN THE ACTION OR "NO_KEYTAB" IF NOT RUNNING IN A KERBERISED ENVIRONMENT&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;The name of the principle in the keytab (who is requesting the query)&amp;nbsp;e.g. smithjon@FOO.BAR.NET&amp;nbsp;&lt;STRONG&gt;**USE NO_PRINCIPAL OR LEAVE BLANK IF NOT RUNNING IN A KERBERISED ENVIRONMENT&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;The name of the impala service principle that will be executing the query e.g. fp-service-impala-p&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Parameter 5 onwards&amp;nbsp;can be used for&amp;nbsp;parameters in your SQL file that you want to be substituted in your reference SQL file.&amp;nbsp; These take the form of &amp;lt;key&amp;gt;=&amp;lt;value&amp;gt; - and work in exactly the same way as HiveServer2 actions in that a parameter in the SQL file in the format "${&amp;lt;name&amp;gt;}" will be substituted with "&amp;lt;value&amp;gt;".&amp;nbsp; In our example we have 2 additional parameters:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;db_name=bddqsit01p&lt;/LI&gt;&lt;LI&gt;table_name=HELLO_IMPALA&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;So the ${db_name} and ${table_name} tokens will be substituted with the supplied&amp;nbsp;values:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="container"&gt;&lt;DIV class="line number1 index0 alt2"&gt;#!/bin/bash&lt;/DIV&gt;&lt;DIV class="line number2 index1 alt1"&gt;export PYTHON_EGG_CACHE=./myeggs&lt;/DIV&gt;&lt;DIV class="line number3 index2 alt2"&gt;#log the variables passed&lt;/DIV&gt;&lt;DIV class="line number4 index3 alt1"&gt;echo "script file: $1"&lt;/DIV&gt;&lt;DIV class="line number5 index4 alt2"&gt;echo "keytab file: $2"&lt;/DIV&gt;&lt;DIV class="line number6 index5 alt1"&gt;echo "local user: $3"&lt;/DIV&gt;&lt;DIV class="line number7 index6 alt2"&gt;echo "impala user: $4"&lt;/DIV&gt;&lt;DIV class="line number8 index7 alt1"&gt;# grab sql file into variable&lt;/DIV&gt;&lt;DIV class="line number9 index8 alt2"&gt;sql=`cat $1`&lt;/DIV&gt;&lt;DIV class="line number10 index9 alt1"&gt;&amp;nbsp;echo "Redirecting raw sql to stderr to avoid stdout buffer issues"&lt;/DIV&gt;&lt;DIV class="line number11 index10 alt2"&gt;&amp;nbsp;(&amp;gt;&amp;amp;2 echo "Received the following SQL")&lt;/DIV&gt;&lt;DIV class="line number12 index11 alt1"&gt;&amp;nbsp;(&amp;gt;&amp;amp;2 echo $sql)&lt;/DIV&gt;&lt;DIV class="line number13 index12 alt2"&gt;#loop through all parameters and sed into the sql variable&lt;/DIV&gt;&lt;DIV class="line number14 index13 alt1"&gt;COUNTER=1&lt;/DIV&gt;&lt;DIV class="line number15 index14 alt2"&gt;for TOKEN in $*&lt;/DIV&gt;&lt;DIV class="line number16 index15 alt1"&gt;do&lt;/DIV&gt;&lt;DIV class="line number17 index16 alt2"&gt;&amp;nbsp;&amp;nbsp;if [ $COUNTER -gt 4 ] ; then&lt;/DIV&gt;&lt;DIV class="line number18 index17 alt1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;IFS='='; arrTOKEN=($TOKEN); unset IFS&lt;/DIV&gt;&lt;DIV class="line number19 index18 alt2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;currKey=${arrTOKEN[0]}&lt;/DIV&gt;&lt;DIV class="line number20 index19 alt1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;currValue=${arrTOKEN[1]}&lt;/DIV&gt;&lt;DIV class="line number21 index20 alt2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo "$currKey=$currValue"&lt;/DIV&gt;&lt;DIV class="line number22 index21 alt1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;sql=$(echo $sql| sed -e "s/\${$currKey}/$currValue/g")&lt;/DIV&gt;&lt;DIV class="line number23 index22 alt2"&gt;&amp;nbsp;&amp;nbsp;fi&lt;/DIV&gt;&lt;DIV class="line number24 index23 alt1"&gt;&amp;nbsp;&amp;nbsp;let COUNTER=COUNTER+1&lt;/DIV&gt;&lt;DIV class="line number25 index24 alt2"&gt;done&lt;/DIV&gt;&lt;DIV class="line number26 index25 alt1"&gt;#kinit if required.&amp;nbsp; Keytab name is the second parameter, user id the third&lt;/DIV&gt;&lt;DIV class="line number27 index26 alt2"&gt;if [ $2 != "NO_KEYTAB" ]&amp;nbsp; ; then&lt;/DIV&gt;&lt;DIV class="line number28 index27 alt1"&gt;&amp;nbsp;echo "Invoking with keytab"&lt;/DIV&gt;&lt;DIV class="line number29 index28 alt2"&gt;&amp;nbsp;/usr/bin/kinit -kt $2 -V $3&lt;/DIV&gt;&lt;DIV class="line number30 index29 alt1"&gt;&amp;nbsp;echo "Redirecting parsed sql to stderr to avoid stdout buffer issues"&lt;/DIV&gt;&lt;DIV class="line number31 index30 alt2"&gt;&amp;nbsp;(&amp;gt;&amp;amp;2 echo "Executing the following SQL")&lt;/DIV&gt;&lt;DIV class="line number32 index31 alt1"&gt;&amp;nbsp;(&amp;gt;&amp;amp;2 echo $sql)&lt;/DIV&gt;&lt;DIV class="line number33 index32 alt2"&gt;&amp;nbsp;impala-shell -q "$sql" -k -s $4&lt;/DIV&gt;&lt;DIV class="line number34 index33 alt1"&gt;else&lt;/DIV&gt;&lt;DIV class="line number35 index34 alt2"&gt;&amp;nbsp;echo "Invoking with no keytab"&lt;/DIV&gt;&lt;DIV class="line number36 index35 alt1"&gt;&amp;nbsp;echo "Redirecting parsed sql to stderr to avoid stdout buffer issues"&lt;/DIV&gt;&lt;DIV class="line number37 index36 alt2"&gt;&amp;nbsp;(&amp;gt;&amp;amp;2 echo "Executing the following SQL")&lt;/DIV&gt;&lt;DIV class="line number38 index37 alt1"&gt;&amp;nbsp;(&amp;gt;&amp;amp;2 echo $sql)&lt;/DIV&gt;&lt;DIV class="line number39 index38 alt2"&gt;&amp;nbsp;impala-shell -q "$sql"&lt;/DIV&gt;&lt;DIV class="line number40 index39 alt1"&gt;fi&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 03 Nov 2016 13:06:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/46971#M4706</guid>
      <dc:creator>lacklustre</dc:creator>
      <dc:date>2016-11-03T13:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: Impala schedule with oozie -tutorial</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/83492#M4707</link>
      <description>Hi. How can you find your workflow from list of all workflows? They are nameless...</description>
      <pubDate>Mon, 10 Dec 2018 10:07:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Impala-schedule-with-oozie-tutorial/m-p/83492#M4707</guid>
      <dc:creator>Vhodnoylogin</dc:creator>
      <dc:date>2018-12-10T10:07:22Z</dc:date>
    </item>
  </channel>
</rss>

