use of org.apache.hadoop.yarn.api.records.LocalResourceType in project samza by apache.
the class LocalizerResourceMapper method buildResourceMapping.
private Map<String, LocalResource> buildResourceMapping() {
ImmutableMap.Builder<String, LocalResource> localResourceMapBuilder = ImmutableMap.builder();
List<String> resourceNames = resourceConfig.getResourceNames();
for (String resourceName : resourceNames) {
String resourceLocalName = resourceConfig.getResourceLocalName(resourceName);
LocalResourceType resourceType = resourceConfig.getResourceLocalType(resourceName);
LocalResourceVisibility resourceVisibility = resourceConfig.getResourceLocalVisibility(resourceName);
Path resourcePath = resourceConfig.getResourcePath(resourceName);
LocalResource localResource = createLocalResource(resourcePath, resourceType, resourceVisibility);
localResourceMapBuilder.put(resourceLocalName, localResource);
log.info("preparing local resource: {}", resourceLocalName);
}
return localResourceMapBuilder.build();
}
Aggregations