[
https://issues.apache.org/jira/browse/BIGTOP-852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13617175#comment-13617175
]
Bruno Mahé commented on BIGTOP-852:
-----------------------------------
Seems like a nice start.
I know it's a rough prototype but some comments in case:
* It's missing the license header
* I would rather put code inside objects/functions to avoid ending up with code
all over the place
* Need proper arg parsing
* Shouldn't we check if the destination directory does not exist before doing
anything?
* I am no groovy expert, but doesn't the script need a shebang?
{quote}Now, if we go the Groovy route, we'd have to also import the Groovy jar
and decide where to keep it and all bigtop scripts. I propose
/usr/lib/bigtop/lib for jars (including Grovy) and /usr/lib/bigtop/bin for
scripts.{quote}
Having some util scripts as part of Apache Bigtop is very tempting, but I am
not really enjoying the idea of having to provide groovy. First of all, the
layout you propose is very groovy centric (unless you mean something like
/usr/lib/bigtop/lib/groovy for the root of all groovy things). If I contribute
another script in scala or jython (for the sake of the example), we may end up
with conflicting jars. But also, we will end up having to maintain new
languages environment. So distributing entire language environments seems quite
scary. I would rather distribute simple class files for now.
> Improve HDFS helper script
> --------------------------
>
> Key: BIGTOP-852
> URL: https://issues.apache.org/jira/browse/BIGTOP-852
> Project: Bigtop
> Issue Type: Sub-task
> Components: Deployment
> Affects Versions: 0.6.0
> Reporter: Mark Grover
> Assignee: Mark Grover
> Fix For: 0.6.0
>
> Attachments: untarHdfs.groovy
>
>
> There are a few things that can be improved regarding the HDFS helper script
> introduced by BIGTOP-547. Some of these issues have been discussed in
> BIGTOP-637.
> 1. The script seems to create user directories for users "root" and "jenkins"
> but not the current user running the script. I think it will be a good idea
> to add in the script the commands to create the /user/$USER directory in
> HDFS. Of course, we should be careful in case the user running the command is
> root or jenkins, in that case a simple mkdir command would throw error given
> that those directories already exist.
> 2. The script uses sudo which requires login shell. However, login shells are
> not available for certain use cases like init scripts. Consequently, we
> should consider using su instead.
> 3. Look into how the helper script can be made faster
> Folks, please feel free to add/edit if there is something I missed.
--
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