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

Robert Kanter commented on OOZIE-1054:
--------------------------------------

Hi Bowen,

Instead of doing this to get the {{FileSystem}}:
{code}
Configuration config = new Configuration();
config.set("fs.default.name", args[2]);
FileSystem fs = FileSystem.get(config);
Path srcPath = new Path(args[1]);
{code}
you should use the {{HadoopAccessorService}} because it'll load in other 
configurations that may be needed .  Something like this (please double check 
that this code works, I haven't actually tried it):
{code}
Path srcPath = new Path(args[1]);
URI srcUri = srcPath.toUri();
HadoopAccessorService has = Services.get().get(HadoopAccessorService.class);
Configuration fsConf = has.createJobConf(uri.getAuthority());
FileSystem fs = has.createFileSystem(System.getenv("user.name"), uri, fsConf);
{code}

Also, when built, the sharelib tar.gz is always named 
{{oozie-sharelib-$\{version\}.tar.gz}} and located in the root dir.  Can you 
make it so that the {{createsharelib}} and {{upgradesharelib}} options don't 
require the {{SHARED_LIBRARY}} argument?  (if not provided, it would try to use 
{{oozie-sharelib-$\{version\}.tar.gz}}).  
i.e
{noformat}
[-createsharelib HDFS_DEFAULT_NAME [SHARED_LIBRARY]]
[-createsharelib HDFS_DEFAULT_NAME [SHARED_LIBRARY]]
{noformat}

                
> Create script to properly upload sharelib to HDFS
> -------------------------------------------------
>
>                 Key: OOZIE-1054
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1054
>             Project: Oozie
>          Issue Type: New Feature
>          Components: scripts
>    Affects Versions: trunk
>            Reporter: Robert Kanter
>            Assignee: Bowen Zhang
>            Priority: Minor
>             Fix For: trunk
>
>         Attachments: oozie-1054.patch, oozie-1054.patch, oozie-1054.patch, 
> oozie-1054.patch, oozie-1054.patch
>
>
> A common confusion-point for users is how to properly install the sharelib in 
> HDFS.  It would be really useful if we could create a script to properly 
> upload the sharelib to HDFS so we can get rid of the confusion around this.  
> Alternatively, instead of a new script, we could have the oozie-setup.sh 
> script take an argument that does this.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to