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

    https://github.com/apache/flink/pull/2797#discussion_r88113221
  
    --- Diff: 
flink-streaming-connectors/flink-connector-filesystem/src/main/java/org/apache/flink/streaming/connectors/fs/bucketing/BucketingSink.java
 ---
    @@ -341,23 +355,49 @@ public void setInputType(TypeInformation<?> type, 
ExecutionConfig executionConfi
        }
     
        @Override
    -   public void open(Configuration parameters) throws Exception {
    -           super.open(parameters);
    +   public void initializeState(FunctionInitializationContext context) 
throws Exception {
    +           Preconditions.checkArgument(this.restoredBucketStates == null, 
"The operator has already been initialized.");
     
    -           subtaskIndex = getRuntimeContext().getIndexOfThisSubtask();
    +           initFileSystem();
     
    -           state = new State<T>();
    --- End diff --
    
    undoing it was a bit of an overstatement; moving it into a separate commit 
with all the other formatting changes would do the trick as well. If you try 
that out you will see that the changes to open and initializeState no longer 
intersect so heavily.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to