public Set<String> list_resource(ResourceType t, List<String> filter) { Set<String> orig = resourceMaps.getResourceSet(t); if (orig == null) { return null; } if (filter == null) { return orig; } else { Set<String> fnl = new HashSet<String>(); for (String one : orig) { if (filter.contains(one)) { fnl.add(one); } } return fnl; } }
public Set<String> list_resource(ResourceType t, List<String> filter) { Set<String> orig = resourceMaps.getResourceSet(t); if (orig == null) { return null; } if (filter == null) { return orig; } else { Set<String> fnl = new HashSet<String>(); for (String one : orig) { if (filter.contains(one)) { fnl.add(one); } } return fnl; } }
public void delete_resources(ResourceType t) { Set<String> resources = resourceMaps.getResourceSet(t); if (resources != null && !resources.isEmpty()) { delete_resources(t, new ArrayList<String>(resources)); resourceMaps.getResourceMap().remove(t); } }
public Set<String> list_local_resource(ResourceType type) { Set<String> resources = new HashSet<String>(list_resource(type, null)); Set<String> set = resourceMaps.getResourceSet(type); for (String file : set){ if (resourceMaps.getLocalHdfsLocationMap(ResourceType.FILE).containsKey(file)){ resources.remove(file); } if (resourceMaps.getLocalHdfsLocationMap(ResourceType.JAR).containsKey(file)){ resources.remove(file); } } return resources; }
public void delete_resources(ResourceType t) { Set<String> resources = resourceMaps.getResourceSet(t); if (resources != null && !resources.isEmpty()) { delete_resources(t, new ArrayList<String>(resources)); resourceMaps.getResourceMap().remove(t); resourceMaps.getAllLocalHdfsLocationMap().remove(t); } }
public Set<String> list_hdfs_resource(ResourceType type) { Set<String> set = resourceMaps.getResourceSet(type); Set<String> result = new HashSet<String>(); for (String file : set){ if (resourceMaps.getLocalHdfsLocationMap(ResourceType.FILE).containsKey(file)){ result.add(resourceMaps.getLocalHdfsLocationMap(ResourceType.FILE).get(file)); } if (resourceMaps.getLocalHdfsLocationMap(ResourceType.JAR).containsKey(file)){ result.add(resourceMaps.getLocalHdfsLocationMap(ResourceType.JAR).get(file)); } } return result; }
public void delete_resources(ResourceType t, List<String> values) { Set<String> resources = resourceMaps.getResourceSet(t); if (resources == null || resources.isEmpty()) { return;
public void delete_resources(ResourceType t, List<String> values) { Set<String> resources = resourceMaps.getResourceSet(t); if (resources == null || resources.isEmpty()) { return;
public List<String> add_resources(ResourceType t, Collection<String> values, boolean convertToUnix) throws RuntimeException { Set<String> resourceSet = resourceMaps.getResourceSet(t); Map<String, Set<String>> resourcePathMap = resourceMaps.getResourcePathMap(t); Map<String, Set<String>> reverseResourcePathMap = resourceMaps.getReverseResourcePathMap(t);
public List<String> add_resources(ResourceType t, Collection<String> values, boolean convertToUnix) throws RuntimeException { Set<String> resourceSet = resourceMaps.getResourceSet(t); Map<String, Set<String>> resourcePathMap = resourceMaps.getResourcePathMap(t); Map<String, Set<String>> reverseResourcePathMap = resourceMaps.getReverseResourcePathMap(t);
public Set<String> list_resource(ResourceType t, List<String> filter) { Set<String> orig = resourceMaps.getResourceSet(t); if (orig == null) { return null; } if (filter == null) { return orig; } else { Set<String> fnl = new HashSet<String>(); for (String one : orig) { if (filter.contains(one)) { fnl.add(one); } } return fnl; } }
public void delete_resources(ResourceType t) { Set<String> resources = resourceMaps.getResourceSet(t); if (resources != null && !resources.isEmpty()) { delete_resources(t, new ArrayList<String>(resources)); resourceMaps.getResourceMap().remove(t); } }
public void delete_resources(ResourceType t, List<String> values) { Set<String> resources = resourceMaps.getResourceSet(t); if (resources == null || resources.isEmpty()) { return;
public List<String> add_resources(ResourceType t, Collection<String> values, boolean convertToUnix) throws RuntimeException { Set<String> resourceSet = resourceMaps.getResourceSet(t); Map<String, Set<String>> resourcePathMap = resourceMaps.getResourcePathMap(t); Map<String, Set<String>> reverseResourcePathMap = resourceMaps.getReverseResourcePathMap(t);