Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kgyrtkirk committed Apr 8, 2020
1 parent f7f5814 commit 4a290c8
Showing 1 changed file with 3 additions and 34 deletions.
37 changes: 3 additions & 34 deletions src/main/java/hu/rxd/toolbox/switcher/GenericComponent.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,44 +117,13 @@ protected File downloadArtifact(List<URL> candidateUrls) throws IOException {

protected List<URL> getCandidateUrls(Version ver) throws Exception {
List<URL> ret = new ArrayList<>();

switch (ver.type) {
case APACHE: {
String componentVersion = ver.getComponentVersion(getComponentType());
for (Mirror m : ver.type.getMirrors().of0(ver)) {
ret.add(m.getFor(getComponentType(), componentVersion));
}
break;
}
case HDP:
{ // FIXME: can be moved?!
String componentVersion = ver.getComponentVersion(getComponentType());
for (Mirror m : HdpMirrors.of(ver)) {
ret.add(m.getFor(getComponentType(), componentVersion));
}
break;
}
case CDP: {
// FIXME: can be moved?!
String componentVersion = ver.getComponentVersion(getComponentType());
for (Mirror m : CDPMirrors.of(ver)) {
ret.add(m.getFor(getComponentType(), componentVersion));
}
}
break;
default:
// http: //public-repo-1.hortonworks.com/HDP/centos7/3.x/updates/3.0.0.0/artifacts.txt
// http: //s3.amazonaws.com/dev.hortonworks.com/HDP/centos7/3.x/BUILDS/3.0.0.0-1634/tars/tez/tez-0.9.1.3.0.0.0-1634.tar.gz

throw new RuntimeException("?");
String componentVersion = ver.getComponentVersion(getComponentType());
for (Mirror m : ver.type.getMirrors().of0(ver)) {
ret.add(m.getFor(getComponentType(), componentVersion));
}
return ret;
}

// public-repo-1.hortonworks.com/HDP/centos7/3.x/updates/3.0.0.0/tars/tez/tez-0.9.1.3.0.0.0-1634.tar.gz
// http://public-repo-1.hortonworks.com/HDP/centos7/3.x/updates/3.0.0.0/tars/tez/tez-0.9.1.3.0.0.0-1634.tar.gz]
// at hu.rxd.toolbox.HiveDevBoxSwitcher$GenericComponent.tryDownload(Hive

@Deprecated
abstract String getApacheMirrorPath(Version version) throws Exception;
}

0 comments on commit 4a290c8

Please sign in to comment.