Samrat002 opened a new pull request, #23725: URL: https://github.com/apache/flink/pull/23725
## What is the purpose of the change Fix the error due to IOException: Stream closed Calling persist() in case of filesystem is not syncable Persist() behaves in same manner as sync() Reference: https://nightlies.apache.org/flink/flink-docs-master/api/java/org/apache/flink/fs/s3/common/writer/S3RecoverableFsDataOutputStream.html#persist-- ## Verifying this change In sql client ``` Flink SQL> create table dummy_table ( > id int, > data string > ) with ( > 'connector' = 'filesystem', > 'path' = 's3://prabhuflinks3/xyz_table/', > 'format' = 'csv' > ); [INFO] Execute statement succeed. Flink SQL> INSERT INTO dummy_table2023-11-15 15:31:23,277 INFO org.apache.hadoop.yarn.client.DefaultNoHARMFailoverProxyProvider [] - Connecting to ResourceManager at ip-172-31-34-252.us-west-2.compute.internal/172.31.34.252:8032 2023-11-15 15:31:23,500 INFO org.apache.hadoop.yarn.client.AHSProxy [] - Connecting to Application History server at ip-172-31-34-252.us-west-2.compute.internal/172.31.34.252:10200 2023-11-15 15:31:23,508 INFO org.apache.flink.yarn.YarnClusterDescriptor [] - No path for the flink jar passed. Using the location of class org.apache.flink.yarn.YarnClusterDescriptor to locate the jar 2023-11-15 15:31:23,510 WARN org.apache.flink.yarn.YarnClusterDescriptor [] - Neither the HADOOP_CONF_DIR nor the YARN_CONF_DIR environment variable is set.The Flink YARN Client needs one of these to be set to properly load the Hadoop configuration for accessing YARN. 2023-11-15 15:31:23,613 INFO org.apache.flink.yarn.YarnClusterDescriptor [] - Found Web Interface ip-172-31-33-40.us-west-2.compute.internal:45505 of application 'application_1700033066610_0012'. [INFO] Submitting SQL update statement to the cluster... [INFO] SQL update statement has been successfully submitted to the cluster: Job ID: 8e2c6835714dd08b3f2ab0a0d1dd7b18 Flink SQL> select * from dummy_table;2023-11-15 15:32:31,324 INFO org.apache.hadoop.yarn.client.DefaultNoHARMFailoverProxyProvider [] - Connecting to ResourceManager at ip-172-xx-xx-xxx.us-west-2.compute.internal/172.31.34.252:8032 2023-11-15 15:32:31,328 INFO org.apache.hadoop.yarn.client.AHSProxy [] - Connecting to Application History server at ip-172-xx-xx-xxx.us-west-2.compute.internal/172.31.34.252:10200 2023-11-15 15:32:31,328 INFO org.apache.flink.yarn.YarnClusterDescriptor [] - No path for the flink jar passed. Using the location of class org.apache.flink.yarn.YarnClusterDescriptor to locate the jar 2023-11-15 15:32:31,328 WARN org.apache.flink.yarn.YarnClusterDescriptor [] - Neither the HADOOP_CONF_DIR nor the YARN_CONF_DIR environment variable is set.The Flink YARN Client needs one of these to be set to properly load the Hadoop configuration for accessing YARN. 2023-11-15 15:32:31,338 INFO org.apache.flink.yarn.YarnClusterDescriptor [] - Found Web Interface ip-172-31-33-40.us-west-2.compute.internal:45505 of application 'application_1700033066610_0012'. [INFO] Result retrieval cancelled. ``` Verift data in s3 properly ``` id data 1 Hello World 2 Hi 2 Hi 3 Hello 3 World 4 ADD 5 LINE ``` ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): (yes / no) no - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / no) no - The serializers: (yes / no / don't know) no - The runtime per-record code paths (performance sensitive): (yes / no / don't know) no - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know) no - The S3 file system connector: (yes / no / don't know) yes ## Documentation - Does this pull request introduce a new feature? (yes / no) no - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented) not applicable -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
