halkar opened a new issue #2174:
URL: https://github.com/apache/hudi/issues/2174
I'm trying to use Hudi with Spark EMR. Everything is ok when I run a batch
job of S3 data. But when I run it of Kinesis stream it creates tens of versions
of the output file and never removes them.
**To Reproduce**
This is my code
```
val hudiOptions = Map[String,String](
DataSourceWriteOptions.TABLE_TYPE_OPT_KEY ->
DataSourceWriteOptions.COW_TABLE_TYPE_OPT_VAL,
DataSourceWriteOptions.OPERATION_OPT_KEY ->
DataSourceWriteOptions.UPSERT_OPERATION_OPT_VAL,
HoodieStorageConfig.PARQUET_COMPRESSION_CODEC -> "snappy",
HoodieCompactionConfig.AUTO_CLEAN_PROP -> "true",
HoodieCompactionConfig.CLEANER_FILE_VERSIONS_RETAINED_PROP -> "1",
HoodieCompactionConfig.CLEANER_COMMITS_RETAINED_PROP -> "1",
DataSourceWriteOptions.HIVE_STYLE_PARTITIONING_OPT_KEY -> "true",
"hoodie.upsert.shuffle.parallelism" -> "5",
HoodieCompactionConfig.PARQUET_SMALL_FILE_LIMIT_BYTES -> (512 * 1024 *
1024).toString,
"hoodie.combine.before.insert" -> "true",
DataSourceWriteOptions.INSERT_DROP_DUPS_OPT_KEY -> "true"
)
dataframe
.write
.format("org.apache.hudi")
.options(hudiOptions)
.option(HoodieWriteConfig.TABLE_NAME, tableName)
.option(DataSourceWriteOptions.TABLE_NAME_OPT_KEY, tableName)
.option(DataSourceWriteOptions.PARTITIONPATH_FIELD_OPT_KEY,
partitionPathField)
.option(DataSourceWriteOptions.RECORDKEY_FIELD_OPT_KEY, recordKeyField)
.option(DataSourceWriteOptions.PRECOMBINE_FIELD_OPT_KEY,
precombineFieldKey)
.mode(SaveMode.Append)
.save(destinationPath)
```
**Environment Description**
* Hudi version: 0.6.0
* Spark version: 2.4.4
* Hive version: 2.3.7
* Hadoop version: 2.10
* Storage (HDFS/S3/GCS..): S3
----------------------------------------------------------------
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]