Class DistributedCache
- java.lang.Object
-
- org.apache.flink.api.common.cache.DistributedCache
-
@Public public class DistributedCache extends Object
DistributedCache provides static methods to write the registered cache files into job configuration or decode them from job configuration. It also provides user access to the file locally.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDistributedCache.DistributedCacheEntryMeta info about an entry inDistributedCache.
-
Constructor Summary
Constructors Constructor Description DistributedCache(Map<String,Future<Path>> cacheCopyTasks)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FilegetFile(String name)static List<Tuple2<String,DistributedCache.DistributedCacheEntry>>parseCachedFilesFromString(List<String> files)Parses a list of distributed cache entries encoded in a string.static List<String>parseStringFromCachedFiles(List<Tuple2<String,DistributedCache.DistributedCacheEntry>> files)static Set<Map.Entry<String,DistributedCache.DistributedCacheEntry>>readFileInfoFromConfig(Configuration conf)static voidwriteFileInfoToConfig(String name, DistributedCache.DistributedCacheEntry e, Configuration conf)
-
-
-
Method Detail
-
writeFileInfoToConfig
public static void writeFileInfoToConfig(String name, DistributedCache.DistributedCacheEntry e, Configuration conf)
-
readFileInfoFromConfig
public static Set<Map.Entry<String,DistributedCache.DistributedCacheEntry>> readFileInfoFromConfig(Configuration conf)
-
parseCachedFilesFromString
public static List<Tuple2<String,DistributedCache.DistributedCacheEntry>> parseCachedFilesFromString(List<String> files)
Parses a list of distributed cache entries encoded in a string. Can be used to parse a config option described byPipelineOptions.CACHED_FILES.See
PipelineOptions.CACHED_FILESfor the format.- Parameters:
files- List of string encoded distributed cache entries.
-
-