When you say it is 'not working', what do you mean? What error do you
observe when you check task logs of the spawned launcher MR job of the
Hive Action?

On Fri, Feb 7, 2014 at 11:09 PM, Andrew O'Neill <[email protected]> wrote:
> Hello everyone,
>
> I am having an issue running the command "msck repair table <tablename>" from 
> an ooze hive action. My hive action is completing successfully; the table is 
> created but the data doesn't appear in hive until I manually run "msck repair 
> table checks;". Why would this command work when run manually, but not work 
> when run via oozie hive action? Again, every other part of the hive script 
> appears to be working as expected. My hive script "updatepartitions.q" is as 
> follows:
>
> create database IF NOT EXISTS ${scope};
> use ${scope};
> drop table checks;
> create external table checks
> partitioned by (p_date string, p_merchantId bigint)
> row format serde      'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
> stored as inputformat 
> 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'
> outputformat          
> 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat'
> location              '${datasetBase}/${scope}/checks'
> tblproperties (
>     'avro.schema.url'='${avroSchemaFile}'
> );
> msck repair table checks;
>
>
> And my hive action is:
>
>         <hive xmlns="uri:oozie:hive-action:0.2">
>             <job-tracker>${jobTracker}</job-tracker>
>             <name-node>${nameNode}</name-node>
>             <job-xml>${currentAutomation}/job-defaults.xml</job-xml>
>             <script>updatepartitions.q</script>
>             <param>scope=${scope}</param>
>             <param>datasetBase=${datasetBase}</param>
>             <param>avroSchemaFile=${avroSchemaFile}</param>
>         </hive>
>
> Any thoughts or feedback are much appreciated. Thanks!
>
>
> Best,
> Andrew



-- 
Harsh J

Reply via email to