1

I need to store in the workspace of a workflow the result of a query. To achieve this I used:

INSERT OVERWRITE LOCAL DIRECTORY '/apps/myProject/conf/oozie/workspaces/myWorkflow' 
ROW FORMAT DELIMITED 
FIELDS TERMINATED BY ','  
LINES TERMINATED BY "\n"
SELECT * FROM myTable
LIMIT 10;

But I am getting the error:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-5.8.5-1.cdh5.8.5.p0.5/jars/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/data/12/yarn/nm/filecache/294953/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

The solutions I found in this other questions link1 and link2 are to remove libraries, but the problem is I don't have permission to do that. Is there another way around?

I also would like to mention that if I set the following path there is not problem

INSERT OVERWRITE LOCAL DIRECTORY 'tmp/user/output' 
ROW FORMAT DELIMITED 
FIELDS TERMINATED BY ','  
LINES TERMINATED BY "\n"
SELECT * FROM myTable
LIMIT 10;
Ignacio Alorre
  • 7,307
  • 8
  • 57
  • 94

1 Answers1

2

The workflow user ( hadoop) doesn't have write access in /apps/myProject/conf/oozie/workspaces/myWorkflow directory. By default user have write access in /tmp directory, hence it is working. Could you please check the access privileges of the workflow execution user.

SLF4J is just warning message only and won't stop the workflow execution.

To confirm this, create a directory for hadoop user and try.

Hope this helps.

-Ravi

Ravikumar
  • 1,121
  • 1
  • 12
  • 23
  • Hi, thanks for the answer. But the directory /apps/myProject/conf/oozie/workspaces/myWorkflow is the workspace of the workflow. I expected it would have permissions to write in its own workspace. Do you know how could I grant permisions to a workflow to write in it's own workspace? I also want to add that I am the creator and the submitter of the workflow – Ignacio Alorre Feb 20 '18 at 07:29
  • Hi, Could you please provide write privileges to group using **chgrp** and add the workflow user to the group of the directory. You can able to see the group **ls -l** – Ravikumar Feb 20 '18 at 16:19