Beispiel #1
0
  public List<String> add_resources(ResourceType t, List<String> values, boolean convertToUnix)
      throws RuntimeException {
    Set<String> resourceMap = getResourceMap(t);

    List<String> localized = new ArrayList<String>();
    try {
      for (String value : values) {
        localized.add(downloadResource(value, convertToUnix));
      }

      t.preHook(resourceMap, localized);

    } catch (RuntimeException e) {
      getConsole()
          .printError(
              e.getMessage(), "\n" + org.apache.hadoop.util.StringUtils.stringifyException(e));
      throw e;
    }

    getConsole().printInfo("Added resources: " + values);
    resourceMap.addAll(localized);

    return localized;
  }