[ 
https://issues.apache.org/jira/browse/SQOOP-2282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14647914#comment-14647914
 ] 

Joshua Stanfield commented on SQOOP-2282:
-----------------------------------------

Hey [~jarcec], our problem was that we had jobs stored in the metastore; we 
have a script that iterates through the stored jobs and tries to run each one. 
Effectively our script does
{code}
 for job in $(sqoop job --list); do
   sqoop job --exec $job
 done
{code}

So after the upgrade, trying to run any stored job failed with the message 
[~aaditya.prodigy] encountered.  
bq. Append mode for hive imports is not yet supported. Please remove the 
parameter --append-mode

I resolved by editing the metastore db script and setting all parameters where 
"hive.import" is true to have "hdfs.append.dir" set to false. Effectively
{code}
update sqoop_sessions ss 
inner join (select job_name from sqoop_sessions where propname='hive.import' 
and propval='true') jobs on jobs.job_name=ss.job_name
set ss.propval='false'
where 
 ss.propname='hdfs.append.dir'
{code}

Note - I didn't actually run this exact script; I hand edited the 
shared.db.script file itself. But thought the script above might come in handy 
for someone else. 

After editing the metastore and bringing it back up, everything worked fine. 

fwiw - I looked back at our old commits, and {code} --append {code} has been 
used for every stored job in our repo dating back to 2010; I think there was 
some confusion at the time as to what {code} --append {code} did at the time, 
as (iirc) it predates the {code} --incremental=append {code} option. 

> Add validation check for --hive-import and --append
> ---------------------------------------------------
>
>                 Key: SQOOP-2282
>                 URL: https://issues.apache.org/jira/browse/SQOOP-2282
>             Project: Sqoop
>          Issue Type: Bug
>            Reporter: Abraham Elmahrek
>            Assignee: Abraham Elmahrek
>             Fix For: 1.4.6
>
>         Attachments: SQOOP-2282.patch
>
>
> They don't work together currently. Though, it seems easy to add.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to