void updateSparkEnv(Map<String, String> env) { env.put(SPARK_LIBRARY, LocalizationUtils.getLocalizedName(localizeResource.getURI())); } }
void updateSparkEnv(Map<String, String> env) { env.put(SPARK_LIBRARY, LocalizationUtils.getLocalizedName(localizeResource.getURI())); } }
void addLocalizeResource(Map<String, LocalizeResource> resources) { resources.put(LocalizationUtils.getLocalizedName(localizeResource.getURI()), localizeResource); }
void updateSparkEnv(Map<String, String> env) { env.put(SPARK_LIBRARY, LocalizationUtils.getLocalizedName(localizeResource.getURI())); } }
void addLocalizeResource(Map<String, LocalizeResource> resources) { resources.put(LocalizationUtils.getLocalizedName(localizeResource.getURI()), localizeResource); }
void addLocalizeResource(Map<String, LocalizeResource> resources) { resources.put(LocalizationUtils.getLocalizedName(localizeResource.getURI()), localizeResource); }
/** * Adds extra jars as defined in {@link CConfiguration} to the container and container classpath. */ private void addContainerJars(CConfiguration cConf, Map<String, LocalizeResource> localizeResources, Collection<String> classpath) { // Create localize resources and update classpath for the container based on the "program.container.dist.jars" // configuration. List<String> containerExtraJars = new ArrayList<>(); for (URI jarURI : CConfigurationUtil.getExtraJars(cConf)) { String scheme = jarURI.getScheme(); LocalizeResource localizeResource = new LocalizeResource(jarURI, false); String localizedName = LocalizationUtils.getLocalizedName(jarURI); localizeResources.put(localizedName, localizeResource); classpath.add(localizedName); String jarPath = "file".equals(scheme) ? localizedName : jarURI.toString(); containerExtraJars.add(jarPath); } // Set the "program.container.dist.jars" since files are already localized to the container. cConf.setStrings(Constants.AppFabric.PROGRAM_CONTAINER_DIST_JARS, containerExtraJars.toArray(new String[containerExtraJars.size()])); }
String localizedName = LocalizationUtils.getLocalizedName(uri);
/** * Adds extra jars as defined in {@link CConfiguration} to the container and container classpath. */ private void addContainerJars(CConfiguration cConf, Map<String, LocalizeResource> localizeResources, Collection<String> classpath) { // Create localize resources and update classpath for the container based on the "program.container.dist.jars" // configuration. List<String> containerExtraJars = new ArrayList<>(); for (URI jarURI : CConfigurationUtil.getExtraJars(cConf)) { String scheme = jarURI.getScheme(); LocalizeResource localizeResource = new LocalizeResource(jarURI, false); String localizedName = LocalizationUtils.getLocalizedName(jarURI); localizeResources.put(localizedName, localizeResource); classpath.add(localizedName); String jarPath = "file".equals(scheme) ? localizedName : jarURI.toString(); containerExtraJars.add(jarPath); } // Set the "program.container.dist.jars" since files are already localized to the container. cConf.setStrings(Constants.AppFabric.PROGRAM_CONTAINER_DIST_JARS, containerExtraJars.toArray(new String[containerExtraJars.size()])); }
String localizedName = LocalizationUtils.getLocalizedName(uri);
extraJars.add(Paths.get("$PWD", LocalizationUtils.getLocalizedName(jarURI)).toString()); localizeResources.add(new LocalizeResource(jarURI, false));
extraJars.add(Paths.get("$PWD", LocalizationUtils.getLocalizedName(jarURI)).toString()); localizeResources.add(new LocalizeResource(jarURI, false));
extraJars.add(Paths.get("$PWD", LocalizationUtils.getLocalizedName(jarURI)).toString()); localizeResources.add(new LocalizeResource(jarURI, false));
job.addCacheFile(jarURI); classpath.add(LocalizationUtils.getLocalizedName(jarURI));
job.addCacheFile(jarURI); classpath.add(LocalizationUtils.getLocalizedName(jarURI));