[
https://issues.apache.org/jira/browse/BIGTOP-952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13933871#comment-13933871
]
Konstantin Boudnik commented on BIGTOP-952:
-------------------------------------------
Mostly looking good! A few minor things:
- shebang {{#!/usr/bin/env /opt/groovy-2.2.1/bin/groovy}} should point to
{{/usr/lib/bigtop-groovy/bin/groovy}}
- there's a bunch of unused imports. Clean them up
- {{exit}} should read {{System.exit}}
- {{def v = new JsonSlurper();}} is unused
- if I am not mistaking you can reduce the following
{noformat}
def dirs = (List) parsedData.get("dir");
def users = (List) parsedData.get("user");
{noformat}
to
{noformat}
def dirs = parsedData.dir as List;
def users = parsedData.user as List;
{noformat}
because - oh the greatness of Groovy - JSON elements will automatically become
object's properties with correct names. Also, save casting is a good idea
- {[def root_user}} is unused
- 117: {{Path file = new Path(name);}} is unused; perhaps you meant to use it
place of {{Path}} constructor's calling later?
- could you please use named constants in place of hardcoded paths at the end
of the script?
Thanks!
> init-hdfs.sh is dog slow. Let's replace it with a single VM call and better
> layout management
> ---------------------------------------------------------------------------------------------
>
> Key: BIGTOP-952
> URL: https://issues.apache.org/jira/browse/BIGTOP-952
> Project: Bigtop
> Issue Type: Improvement
> Components: Deployment
> Affects Versions: 0.5.0
> Reporter: Konstantin Boudnik
> Assignee: jay vyas
> Priority: Blocker
> Fix For: 0.8.0
>
> Attachments: BIGTOP-952-tested-refined.patch,
> BIGTOP-952-tested.patch, BIGTOP-952.patch, provision2.groovy, untar.groovy
>
>
> As has been proposed in [this
> patch|https://issues.apache.org/jira/secure/attachment/12575644/untarHdfs.groovy]
> by [~rvs] there's a very efficient way of creating layout in HDFS using a
> tarfile and Groovy script with direct call into DFS APIs.
> Let's making it happen.
--
This message was sent by Atlassian JIRA
(v6.2#6252)