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

stanley shi commented on BIGTOP-1488:
-------------------------------------

Here's my plan:
1. implement a custom function and put at 
"bigtop_toolchain/lib/puppet/parser/functions/nearest_apache_mirror.rb", it 
will return the nearest apache mirror by parsing the json response from the URL 
"https://www.apache.org/dyn/closer.cgi?as_json=1";;
2. in the puppet code, use the custom function to replace the apache mirror 
prefixes;

But I have a questions that cannot be decided:
how to parsing the http/json response from the apache site: 
  a.   the ideal way would be to use ruby json gem; but this will need more 
dependency to be pulled in;
  b.  another way is to parse the json string as simple string and extract the 
content from it;
I am not sure which is the better way;

> bigtop_toolchain hardcode the apache mirror sites for downloading maven
> -----------------------------------------------------------------------
>
>                 Key: BIGTOP-1488
>                 URL: https://issues.apache.org/jira/browse/BIGTOP-1488
>             Project: Bigtop
>          Issue Type: Improvement
>          Components: build, general
>    Affects Versions: 0.8.0
>            Reporter: stanley shi
>
> In the bigtop_toolchain module, the puppet modules use hardcoded apache 
> mirror sites to download component tar balls(for example, use 
> ftp://mirror.reverse.net/pub/apache/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz
>  to download maven).
> In some cases the hardcoded mirror maybe very slow, causing the installation 
> to be very slow or even fail.
> We can use the "www.apache.org/dyn/closer.cgi" to choose apache mirrors 
> automatically and faster the installatin.



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

Reply via email to