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

Rohini Palaniswamy commented on OOZIE-2380:
-------------------------------------------

-Djava.io.tmpdir should be set to ./tmp so that whatever a task does is cleaned 
up after it is done. Mapreduce already sets it for all tasks, but it does not 
do it for the AM. It should be fixed in mapreduce for the AM as well. I created 
an internal jira for our hadoop team leaving it to them to create the Apache 
one. Will create an Apache one as well and link it to that jira. When we 
started running launcher in uber mode, java.io.tmpdir was not referring to 
./tmp anymore like the map task and that caused problem. We put the fix in 
Oozie first, as getting it fixed in hadoop will take longer and will also work 
with older versions of hadoop. Since it is already set for tasks by mapreduce, 
OOZIE-2260 (followup for OOZIE-2209)  set -Djava.io.tmpdir=./tmp only for the 
launcher AMs. 

 Setting it to System.getProperty("user.dir") + "/tmp" is not good as
   - many cluster deployments will not have home directory for users on the 
task nodes and it will break them
  - There is no cleanup which will accumulate over time and make the nodes go 
out of disk space

 Surprising that none of our users have reported this issue. May be it is 
because they are not using show tables or show databases command in the script. 
 

[~vaifer],
    This issue does not happen with any other command in hive action right? 
Only show tables and show databases?  Mapreduce sets it to 
-Djava.io.tmpdir=${PWD}/tmp for tasks, so most likely it will run fine as 
${PWD} will expand to an absolute path. We could not do that in Oozie as it 
will expand to server's ${PWD} and so had to do ./tmp instead. Can you test 
once with uber mode disabled for the particular hive action and see if that 
works?

> Oozie Hive action failed with wrong tmp path
> --------------------------------------------
>
>                 Key: OOZIE-2380
>                 URL: https://issues.apache.org/jira/browse/OOZIE-2380
>             Project: Oozie
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 4.2.0
>            Reporter: Sergey Svinarchuk
>            Assignee: Sergey Svinarchuk
>              Labels: patch
>             Fix For: trunk
>
>         Attachments: OOZIE-2380-1.patch
>
>
> Hive action with command "show tables" or "show databases" failed
> {code}
> 22257 [uber-SubtaskRunner] ERROR org.apache.hadoop.hive.ql.Driver  - FAILED: 
> IllegalArgumentException java.net.URISyntaxException: Relative path in 
> absolute URI: 
> file:./tmp/mapr/b79b1ef5-c8a4-4da9-a307-b4f9045c7bb9/hive_2015-10-01_11-30$
> java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative 
> path in absolute URI: 
> file:./tmp/mapr/b79b1ef5-c8a4-4da9-a307-b4f9045c7bb9/hive_2015-10-01_11-30-46_978_7012892802177357645-1
>         at org.apache.hadoop.fs.Path.initialize(Path.java:217)
>         at org.apache.hadoop.fs.Path.<init>(Path.java:208)
>         at org.apache.hadoop.hive.ql.Context.getScratchDir(Context.java:284)
>         at 
> org.apache.hadoop.hive.ql.Context.getLocalScratchDir(Context.java:319)
>         at org.apache.hadoop.hive.ql.Context.getLocalTmpPath(Context.java:414)
>         at 
> org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeInternal(DDLSemanticAnalyzer.java:337)
>         at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:227)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:424)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:308)
>         at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1122)
>         at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1170)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1059)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1049)
>         at 
> org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:213)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:165)
>         at 
> org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:376)
>         at 
> org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:311)
>         at 
> org.apache.hadoop.hive.cli.CliDriver.processReader(CliDriver.java:409)
>         at 
> org.apache.hadoop.hive.cli.CliDriver.processFile(CliDriver.java:425)
>         at 
> org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:714)
>         at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:621)
>         at org.apache.oozie.action.hadoop.HiveMain.runHive(HiveMain.java:306)
>         at org.apache.oozie.action.hadoop.HiveMain.run(HiveMain.java:290)
>         at 
> org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:47)
>         at org.apache.oozie.action.hadoop.HiveMain.main(HiveMain.java:68)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at 
> org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:230)
>         at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
>         at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:458)
>         at org.apache.hadoop.mapred.MapTask.run(MapTask.java:348)
>         at 
> org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler.runSubtask(LocalContainerLauncher.java:370)
>         at 
> org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler.runTask(LocalContainerLauncher.java:295)
>         at 
> org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler.access$200(LocalContainerLauncher.java:181)
>         at 
> org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler$1.run(LocalContainerLauncher.java:224)
>         at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: java.net.URISyntaxException: Relative path in absolute URI: 
> file:./tmp/mapr/b79b1ef5-c8a4-4da9-a307-b4f9045c7bb9/hive_2015-10-01_11-30-46_978_7012892802177357645-1
>         at java.net.URI.checkPath(URI.java:1804)
>         at java.net.URI.<init>(URI.java:752)
>         at org.apache.hadoop.fs.Path.initialize(Path.java:214)
>         ... 42 more
> 22257 [uber-SubtaskRunner] INFO  org.apache.hadoop.hive.ql.log.PerfLogger  - 
> </PERFLOG method=compile start=1443688246930 end=1443688247907 duration=977 
> from=org.apache.hadoop.hive.ql.Driver>
> {code}



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

Reply via email to