<?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 Re: Oozie Sqoop job - cannot restore job in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-job-cannot-restore-job/m-p/122933#M85686</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1196/latorres.html" nodeid="1196"&gt;@Luis Antonio Torres&lt;/A&gt;: &lt;A rel="user" href="https://community.cloudera.com/users/393/aervits.html" nodeid="393"&gt;@Artem Ervits&lt;/A&gt;That sounds like what would fix it for me. But I do have one more question, how do I pass username and password through &amp;lt;arg&amp;gt; for the metaconnect? I do have a password set and it does not allow to pass --username and --password like we usually do. Alternatively, I tried connectURL/sqoop?user=sqoop&amp;amp;password=sqoop, which actually works through command line but not when passed through oozie.&lt;/P&gt;</description>
    <pubDate>Mon, 09 May 2016 21:21:28 GMT</pubDate>
    <dc:creator>sim6</dc:creator>
    <dc:date>2016-05-09T21:21:28Z</dc:date>
    <item>
      <title>Oozie Sqoop job - cannot restore job</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-job-cannot-restore-job/m-p/122924#M85677</link>
      <description>&lt;P&gt;On HDP 2.3.4, using Oozie 4.2.0 and Sqoop 1.4.2, I'm trying to create a coordinator app that will execute sqoop jobs on a daily basis. I need the sqoop action to execute jobs because these are incremental imports. &lt;/P&gt;&lt;P&gt;I've configured `sqoop-site.xml` and started the `sqoop-metastore` and I'm able to create, list, and delete jobs via the command line but the workflow encounters the error: &lt;STRONG&gt;Cannot restore job: streamsummary_incremental&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;
&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;stderr&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;
&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;PRE&gt;Sqoop command arguments :
             job
             --exec
             streamsummary_incremental
Fetching child yarn jobs
tag id : oozie-26fcd4dc0afd8f53316fc929ac38eae2
2016-02-03 09:46:47,193 INFO  [main] client.RMProxy (RMProxy.java:createRMProxy(98)) - Connecting to ResourceManager at &amp;lt;myhost&amp;gt;/&amp;lt;myIP&amp;gt;:8032
Child yarn jobs are found - 
=================================================================

&amp;gt;&amp;gt;&amp;gt; Invoking Sqoop command line now &amp;gt;&amp;gt;&amp;gt;

2241 [main] WARN  org.apache.sqoop.tool.SqoopTool  - $SQOOP_CONF_DIR has not been set in the environment. Cannot check for additional configuration.
2016-02-03 09:46:47,404 WARN  [main] tool.SqoopTool (SqoopTool.java:loadPluginsFromConfDir(177)) - $SQOOP_CONF_DIR has not been set in the environment. Cannot check for additional configuration.
2263 [main] INFO  org.apache.sqoop.Sqoop  - Running Sqoop version: 1.4.6.2.3.4.0-3485
2016-02-03 09:46:47,426 INFO  [main] sqoop.Sqoop (Sqoop.java:&amp;lt;init&amp;gt;(97)) - Running Sqoop version: 1.4.6.2.3.4.0-3485
2552 [main] ERROR org.apache.sqoop.metastore.hsqldb.HsqldbJobStorage  - Cannot restore job: streamsummary_incremental
2016-02-03 09:46:47,715 ERROR [main] hsqldb.HsqldbJobStorage (HsqldbJobStorage.java:read(254)) - Cannot restore job: streamsummary_incremental
2552 [main] ERROR org.apache.sqoop.metastore.hsqldb.HsqldbJobStorage  - (No such job)
2016-02-03 09:46:47,715 ERROR [main] hsqldb.HsqldbJobStorage (HsqldbJobStorage.java:read(255)) - (No such job)
2553 [main] ERROR org.apache.sqoop.tool.JobTool  - I/O error performing job operation: java.io.IOException: Cannot restore missing job streamsummary_incremental
	at org.apache.sqoop.metastore.hsqldb.HsqldbJobStorage.read(HsqldbJobStorage.java:256)
	at org.apache.sqoop.tool.JobTool.execJob(JobTool.java:198)
	at org.apache.sqoop.tool.JobTool.run(JobTool.java:283)
	at org.apache.sqoop.Sqoop.run(Sqoop.java:148)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
	at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:184)
	at org.apache.sqoop.Sqoop.runTool(Sqoop.java:226)
	at org.apache.sqoop.Sqoop.runTool(Sqoop.java:235)
	at org.apache.sqoop.Sqoop.main(Sqoop.java:244)
	at org.apache.oozie.action.hadoop.SqoopMain.runSqoopJob(SqoopMain.java:197)
	at org.apache.oozie.action.hadoop.SqoopMain.run(SqoopMain.java:177)
	at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:47)
	at org.apache.oozie.action.hadoop.SqoopMain.main(SqoopMain.java:46)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:241)
	at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
	at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:453)
	at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
	at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:422)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
	at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:162)&lt;/PRE&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;
&lt;STRONG&gt;sqoop-site.xml&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;  &amp;lt;property&amp;gt;
    &amp;lt;name&amp;gt;sqoop.metastore.client.enable.autoconnect&amp;lt;/name&amp;gt;
    &amp;lt;value&amp;gt;false&amp;lt;/value&amp;gt;
    &amp;lt;description&amp;gt;If true, Sqoop will connect to a local metastore for job management when no other metastore arguments are provided.
    &amp;lt;/description&amp;gt;
  &amp;lt;/property&amp;gt;
  &amp;lt;property&amp;gt;
    &amp;lt;name&amp;gt;sqoop.metastore.client.autoconnect.url&amp;lt;/name&amp;gt;
    &amp;lt;value&amp;gt;jdbc:hsqldb:hsql://&amp;lt;myhost&amp;gt;:12345&amp;lt;/value&amp;gt;
    &amp;lt;description&amp;gt;The connect string to use when connecting to a job-management metastore. If unspecified, uses ~/.sqoop/. You can specify a different path here.
    &amp;lt;/description&amp;gt;
  &amp;lt;/property&amp;gt;
  &amp;lt;property&amp;gt;
    &amp;lt;name&amp;gt;sqoop.metastore.client.autoconnect.username&amp;lt;/name&amp;gt;
    &amp;lt;value&amp;gt;SA&amp;lt;/value&amp;gt;
    &amp;lt;description&amp;gt;The username to bind to the metastore.
    &amp;lt;/description&amp;gt;
  &amp;lt;/property&amp;gt;
  &amp;lt;property&amp;gt;
    &amp;lt;name&amp;gt;sqoop.metastore.client.autoconnect.password&amp;lt;/name&amp;gt;
    &amp;lt;value&amp;gt;&amp;lt;/value&amp;gt;
    &amp;lt;description&amp;gt;The password to bind to the metastore.
    &amp;lt;/description&amp;gt;
  &amp;lt;/property&amp;gt;
  &amp;lt;property&amp;gt;
    &amp;lt;name&amp;gt;sqoop.metastore.server.location&amp;lt;/name&amp;gt;
    &amp;lt;value&amp;gt;/tmp/sqoop-metastore/shared.db&amp;lt;/value&amp;gt;
    &amp;lt;description&amp;gt;Path to the shared metastore database files. If this is not set, it will be placed in ~/.sqoop/.
    &amp;lt;/description&amp;gt;
  &amp;lt;/property&amp;gt;   
  &amp;lt;property&amp;gt;
    &amp;lt;name&amp;gt;sqoop.metastore.server.port&amp;lt;/name&amp;gt;
    &amp;lt;value&amp;gt;12345&amp;lt;/value&amp;gt;
    &amp;lt;description&amp;gt;Port that this metastore should listen on.
    &amp;lt;/description&amp;gt;
  &amp;lt;/property&amp;gt;&lt;/PRE&gt;&lt;P&gt;
&lt;STRONG&gt;workflow.xml&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;  &amp;lt;action name="sqoop-import-job"&amp;gt;
    &amp;lt;sqoop xmlns="uri:oozie:sqoop-action:0.2"&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;prepare&amp;gt;
        &amp;lt;delete path="${outputDir}"/&amp;gt;
      &amp;lt;/prepare&amp;gt;
      &amp;lt;arg&amp;gt;job&amp;lt;/arg&amp;gt;
      &amp;lt;arg&amp;gt;--exec&amp;lt;/arg&amp;gt;
      &amp;lt;arg&amp;gt;${jobId}&amp;lt;/arg&amp;gt;
    &amp;lt;/sqoop&amp;gt;
    &amp;lt;ok to="hive-load"/&amp;gt;
    &amp;lt;error to="kill-sqoop"/&amp;gt;
  &amp;lt;/action&amp;gt;&lt;/PRE&gt;&lt;P&gt;
Additional info:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt; We're only running a single-node cluster. &lt;/LI&gt;&lt;LI&gt;Only Sqoop Client is
  installed.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I'm thinking maybe Oozie isn't able to connect to the metastore because we don't have sqoop server? Could anyone confirm this? If not that, could I have missed anything else?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 12:01:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-job-cannot-restore-job/m-p/122924#M85677</guid>
      <dc:creator>latorres</dc:creator>
      <dc:date>2016-02-03T12:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Sqoop job - cannot restore job</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-job-cannot-restore-job/m-p/122925#M85678</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/1196/latorres.html" nodeid="1196"&gt;@Luis Antonio Torres&lt;/A&gt;&lt;P&gt; please issue &lt;STRONG&gt;sqoop job --list &lt;/STRONG&gt;from this node and from the node where oozie server runs.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 23:01:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-job-cannot-restore-job/m-p/122925#M85678</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-02-03T23:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Sqoop job - cannot restore job</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-job-cannot-restore-job/m-p/122926#M85679</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/393/aervits.html" nodeid="393"&gt;@Artem Ervits&lt;/A&gt; our HDP is running on a single-node configuration, and I am able to list the sqoop jobs from this node&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 08:35:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-job-cannot-restore-job/m-p/122926#M85679</guid>
      <dc:creator>latorres</dc:creator>
      <dc:date>2016-02-04T08:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Sqoop job - cannot restore job</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-job-cannot-restore-job/m-p/122927#M85680</link>
      <description>&lt;P&gt;After some more testing, I finally resolved this issue by explicitly passing in the metastore URL in the workflow.xml like so:&lt;/P&gt;&lt;PRE&gt;&amp;lt;arg&amp;gt;job&amp;lt;/arg&amp;gt;
&amp;lt;arg&amp;gt;--meta-connect&amp;lt;/arg&amp;gt;
&amp;lt;arg&amp;gt;jdbc:hsqldb:hsql://&amp;lt;myhost&amp;gt;:12345/sqoop&amp;lt;/arg&amp;gt;
&amp;lt;arg&amp;gt;--exec&amp;lt;/arg&amp;gt;
&amp;lt;arg&amp;gt;myjob&amp;lt;/arg&amp;gt;&lt;/PRE&gt;&lt;P&gt;I'm not exactly sure, but I think that Oozie tries to connect to a local metastore because it doesn't have a copy of `sqoop-site.xml` and so it doesn't know the metastore url (even though I'm running on a single-node configuration)?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 09:37:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-job-cannot-restore-job/m-p/122927#M85680</guid>
      <dc:creator>latorres</dc:creator>
      <dc:date>2016-02-04T09:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Sqoop job - cannot restore job</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-job-cannot-restore-job/m-p/122928#M85681</link>
      <description>&lt;P&gt;excellent, you beat me by 5min, I was about to point you to the doc for that. I should've looked at your workflow more carefully. &lt;A rel="user" href="https://community.cloudera.com/users/1196/latorres.html" nodeid="1196"&gt;@Luis Antonio Torres&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 09:44:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-job-cannot-restore-job/m-p/122928#M85681</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-02-04T09:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Sqoop job - cannot restore job</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-job-cannot-restore-job/m-p/122929#M85682</link>
      <description>&lt;P&gt;Thanks for all of your help so far, Artem. I do have a question regarding the metastore though - hopefully you could shed some light on this for me. So far, I've only been able to start the metastore via command-line and 
it runs in foreground. This is of course unacceptable in a fully 
automated process. I'm assuming there's a way to run this as a service 
instead, and for that I would need sqoop server?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 09:49:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-job-cannot-restore-job/m-p/122929#M85682</guid>
      <dc:creator>latorres</dc:creator>
      <dc:date>2016-02-04T09:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Sqoop job - cannot restore job</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-job-cannot-restore-job/m-p/122930#M85683</link>
      <description>&lt;P&gt;unfortunately I don't know of any built-in solution to run it as a service at least in 1.x line. What I have been doing was putting sqoop metastore service in background. YOu'd do that by issuing your command "&lt;STRONG&gt;sqoop metastore &amp;amp;&lt;/STRONG&gt;" you can also run &lt;STRONG&gt;screen &lt;/STRONG&gt; and run sqoop metastore in screen session and detach from it. Of course you have no idea if it goes down until jobs start failing. There was a promise to have metastore running in a relational database but I haven't heard anything yet. &lt;A rel="user" href="https://community.cloudera.com/users/1196/latorres.html" nodeid="1196"&gt;@Luis Antonio Torres&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 09:55:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-job-cannot-restore-job/m-p/122930#M85683</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-02-04T09:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Sqoop job - cannot restore job</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-job-cannot-restore-job/m-p/122931#M85684</link>
      <description>&lt;P&gt;I find that odd and such a shame. It seems like a metastore service is something that would be an important requirement in order to run incremental imports as jobs and then called from a coordinator app. I did see &lt;A href="http://techuniqe.blogspot.com/2014/10/sqoop-mysql-metastore.html"&gt;this blog&lt;/A&gt; describing how to manually set-up mysql to work as the metastore, though I never tried it myself. I wonder if this would be preferable to running `sqoop metastore &amp;amp;`?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 10:24:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-job-cannot-restore-job/m-p/122931#M85684</guid>
      <dc:creator>latorres</dc:creator>
      <dc:date>2016-02-04T10:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Sqoop job - cannot restore job</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-job-cannot-restore-job/m-p/122932#M85685</link>
      <description>&lt;P&gt;try it out and blog about it here. I'm sure people will find it valuable. The other thing I just thought of is you can write a script that will constantly ping the metastore and send email if it's down. I've done that to check for firewall status. I feel your pain and I was in the same boat. You can look at Attunity Replicate or Golden Gate for CDC solution and not rely on sqoop incremental jobs. &lt;A rel="user" href="https://community.cloudera.com/users/1196/latorres.html" nodeid="1196"&gt;@Luis Antonio Torres&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 10:34:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-job-cannot-restore-job/m-p/122932#M85685</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-02-04T10:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Sqoop job - cannot restore job</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-job-cannot-restore-job/m-p/122933#M85686</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1196/latorres.html" nodeid="1196"&gt;@Luis Antonio Torres&lt;/A&gt;: &lt;A rel="user" href="https://community.cloudera.com/users/393/aervits.html" nodeid="393"&gt;@Artem Ervits&lt;/A&gt;That sounds like what would fix it for me. But I do have one more question, how do I pass username and password through &amp;lt;arg&amp;gt; for the metaconnect? I do have a password set and it does not allow to pass --username and --password like we usually do. Alternatively, I tried connectURL/sqoop?user=sqoop&amp;amp;password=sqoop, which actually works through command line but not when passed through oozie.&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 21:21:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-job-cannot-restore-job/m-p/122933#M85686</guid>
      <dc:creator>sim6</dc:creator>
      <dc:date>2016-05-09T21:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie Sqoop job - cannot restore job</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-job-cannot-restore-job/m-p/122934#M85687</link>
      <description>&lt;P&gt;Unfortunately, I can't help you there. It's not something I've tried. You should create a new question for that to get better visibility and hopefully attract answers.&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2016 08:13:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oozie-Sqoop-job-cannot-restore-job/m-p/122934#M85687</guid>
      <dc:creator>latorres</dc:creator>
      <dc:date>2016-05-10T08:13:14Z</dc:date>
    </item>
  </channel>
</rss>

