You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/02/04 10:20:44 UTC

[GitHub] kl0u commented on a change in pull request #7639: [FLINK-9920] Only check part files in BucketingSinkFaultToleranceITCase

kl0u commented on a change in pull request #7639: [FLINK-9920] Only check part files in BucketingSinkFaultToleranceITCase
URL: https://github.com/apache/flink/pull/7639#discussion_r253410282
 
 

 ##########
 File path: flink-connectors/flink-connector-filesystem/src/main/java/org/apache/flink/streaming/connectors/fs/bucketing/BucketingSink.java
 ##########
 @@ -632,29 +632,33 @@ private Method reflectTruncate(FileSystem fs) {
 
 			// verify that truncate actually works
 			Path testPath = new Path(basePath, UUID.randomUUID().toString());
-			try (FSDataOutputStream outputStream = fs.create(testPath)) {
-				outputStream.writeUTF("hello");
-			} catch (IOException e) {
-				LOG.error("Could not create file for checking if truncate works.", e);
-				throw new RuntimeException("Could not create file for checking if truncate works. " +
-					"You can disable support for truncate() completely via " +
-					"BucketingSink.setUseTruncate(false).", e);
-			}
-
 			try {
-				m.invoke(fs, testPath, 2);
-			} catch (IllegalAccessException | InvocationTargetException e) {
-				LOG.debug("Truncate is not supported.", e);
-				m = null;
-			}
+				try (FSDataOutputStream outputStream = fs.create(testPath)) {
 
 Review comment:
   Same comments as above.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services