zhangwcoder opened a new issue #2404:
URL: https://github.com/apache/iceberg/issues/2404


   ### There are too many  small files in my flink steam job to iceberg with 
hive table ,  and most of them are empty  . 
   I set the checkpoint interval to 3 seconds ,  this means  empty files will 
created every 3 seconds, even no data is writen. 
   
   `StreamExecutionEnvironment env = 
StreamExecutionEnvironment.getExecutionEnvironment();
           env.getConfig().setGlobalJobParameters(parameterTool);
           
env.getConfig().addDefaultKryoSerializer(com.google.protobuf.Message.class, 
NonLazyProtobufSerializer.class);
           [env.enableCheckpointing(3000);`]
   
   
![image](https://user-images.githubusercontent.com/81735234/113249561-77d2a800-92f1-11eb-8f6f-c37da2689cdb.png)
   
   ### I learned that RewriteDataFilesAction  action could solve this problem , 
But  no files are merged after the action executed。 
   
   `ParameterTool parameterTool = ExecutionEnvUtil.createParameterTool(args);
           IcebergManager manager = new IcebergManager(parameterTool);
           TableLoader tableLoader = manager.tableLoad("demo", "test");
           Table table = tableLoader.loadTable();
           
org.apache.iceberg.flink.actions.Actions.forTable(table).rewriteDataFiles()
                   .targetSizeInBytes(500 * 1024 * 1024).execute();`
   
   How can i solve these two problems.
   


-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to