[ 
https://issues.apache.org/jira/browse/FLINK-6177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15994553#comment-15994553
 ] 

ASF GitHub Bot commented on FLINK-6177:
---------------------------------------

Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3741#discussion_r114503212
  
    --- Diff: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
 ---
    @@ -1776,8 +1787,45 @@ public static void setDefaultLocalParallelism(int 
parallelism) {
        protected static void 
initializeContextEnvironment(StreamExecutionEnvironmentFactory ctx) {
                contextEnvironmentFactory = ctx;
        }
    -   
    +
        protected static void resetContextEnvironment() {
                contextEnvironmentFactory = null;
        }
    +
    +   /**
    +    * Registers a file at the distributed cache under the given name. The 
file will be accessible
    +    * from any user-defined function in the (distributed) runtime under a 
local path. Files
    +    * may be local files (as long as all relevant workers have access to 
it), or files in a distributed file system.
    +    * The runtime will copy the files temporarily to a local cache, if 
needed.
    +    * <p>
    +    * The {@link org.apache.flink.api.common.functions.RuntimeContext} can 
be obtained inside UDFs via
    +    * {@link 
org.apache.flink.api.common.functions.RichFunction#getRuntimeContext()} and 
provides access
    +    * {@link org.apache.flink.api.common.cache.DistributedCache} via
    +    * {@link 
org.apache.flink.api.common.functions.RuntimeContext#getDistributedCache()}.
    +    *
    +    * @param filePath The path of the file, as a URI (e.g. 
"file:///some/path" or "hdfs://host:port/and/path")
    +    * @param name The name under which the file is registered.
    +    */
    +   public void registerCachedFile(String filePath, String name){
    --- End diff --
    
    missing space before `{`.


> Add support for "Distributed Cache" in streaming applications
> -------------------------------------------------------------
>
>                 Key: FLINK-6177
>                 URL: https://issues.apache.org/jira/browse/FLINK-6177
>             Project: Flink
>          Issue Type: New Feature
>          Components: DataStream API
>            Reporter: Zohar Mizrahi
>            Assignee: Zohar Mizrahi
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to