[Bug]Hudi 0.4.7 HoodieTable not found
Hello, I am seeing WARN [com.uber.hoodie.table.HoodieTable] - InValid data paths=[] when I upgraded to hoodie-spark-bundle 0.4.7. And Hudi not able to perform Upsert anymore. I am not using any existing dataset. I simply ran a job with SaveMode.OverWrite then ran an incremental job with SaveMode.Append. This warning appears in both jobs. The incremental portion has duplicate parquet files with the same size. Seems like the existing data was totally ignored.
I am running hudi with Cloudera version HDFS.
Update: The duplicate parquet files were caused by I didn't set up withCleanerPolicy(policy = KEEP_LATEST_COMMITS).
@garyli1019 The message "[com.uber.hoodie.table.HoodieTable] - InValid data paths=[] " should not cause duplicate records/files. From your latest comment, it seems to me that there are no issue. Let me know if it is otherwise.
Hi @bvaradar yes, it didn't cause any duplicate.
In my case, I would like to directly read parquet without hoodie format, but the different version of commits won't let me do so.
By setting
HoodieCompactionConfig.CLEANER_POLICY_PROP -> "KEEP_LATEST_FILE_VERSIONS"
HoodieCompactionConfig.CLEANER_FILE_VERSIONS_RETAINED_PROP -> "1" solve my problem. Thanks!
@garyli1019 : The Cleaner policy sounds good. But, this would only work when you are NOT querying the data during the time write is happening.
@bvaradar What will be the consequence of that? Based on my understanding, hudi will generate a new version first, then the cleaner will delete the old version. Do you mean it will fail to delete the old file if I am querying the data?
@garyli1019 : Yes, Hudi will generate a new version first and then cleaner will delete old version. If the reader doesn't recognize Hudi format (if using Parquet format directly), then there is no snapshot isolation guarantee to reader.
Hudi writer will first create new version of parquet files in place before committing and running cleaner. When you run a query around this time treating the dataset as raw parquet one, then the query could see partially written parquet files or duplicate data. Hudi's reader side integration (HoodieInputFormat/ Hudi-DataSource (for Spark)) ensures snapshot isolation.
@bvaradar Gotcha, I am trying to use impala to read the data. Currently, my approach is to maintain a single version of parquet. Impala table links to parquet files, and if the parquet file was deleted, I guess there will be some errors when running query. I will run a refresh job to relink impala table to new version parquet files after hudi finish writing. The gap will be after hudi delete the old version and impala finish refreshes the table. I will keep you guys posted if I found a better solution. Thanks!
lets work on the other thread. Impala integration won't be very hard I think, but we will need to engage with the project and make a code change like we did for Presto
I am also getting similar kind of issue in MapR Hadoop distribution.
spark-submit --master yarn --class com.uber.hoodie.utilities.deltastreamer.HoodieDeltaStreamer `ls /mapr/user/avenka23/hoodie/incubator-hudi/hoodie-utilities/target/hoodie-utilities-*-SNAPSHOT.jar` --props file:///mapr/user/avenka23/delta-streamer/config/dfs-source.properties --schemaprovider-class com.uber.hoodie.utilities.schema.FilebasedSchemaProvider --source-class com.uber.hoodie.utilities.sources.JsonDFSSource --source-ordering-field ts --target-base-path file:///mapr/user/avenka23/delta-streamer/output11 --target-table stock_ticks_cow2 --storage-type COPY_ON_WRITE
19/06/15 23:04:37 WARN Client: Neither spark.yarn.jars nor spark.yarn.archive is set, falling back to uploading libraries under SPARK_HOME.
19/06/15 23:04:53 WARN SparkContext: Using an existing SparkContext; some configuration may not take effect.
19/06/15 23:04:59 WARN HoodieTable: InValid data paths=[file:///mapr/user/avenka23/delta-streamer/output11/2018/08/31/c1b266c1-a96e-4d8f-96e7-7e24a9b67a56-0_0-20-21_20190615230456.parquet]
avenka23@dbsld0031:/mapr/user/avenka23/delta-streamer/config
I didn't see any output written.
IIUC @garyli1019 got it working.. So your issue might be different? Please open a new mailing list thread/issue?
InValid data paths=[file:///mapr/user/avenka23/delta-streamer/output11/2018/08/31/c1b266c1-a96e-4d8f-96e7-7e24a9b67a56-0_0-20-21_20190615230456.parquet]
avenka23@dbsld0031:/mapr/user/avenka23/delta-streamer/config
this line is curious..