You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/10/17 02:54:18 UTC

[GitHub] [hudi] eric9204 opened a new issue, #6965: [SUPPORT]Data can be found in the latest partition of hudi table, but not in the historical partition.

eric9204 opened a new issue, #6965:
URL: https://github.com/apache/hudi/issues/6965

   **_Tips before filing an issue_**
   
   - Have you gone through our [FAQs](https://hudi.apache.org/learn/faq/)?
   
   - Join the mailing list to engage in conversations and get faster support at dev-subscribe@hudi.apache.org.
   
   - If you have triaged this as a bug, then file an [issue](https://issues.apache.org/jira/projects/HUDI/issues) directly.
   
   **Describe the problem you faced**
   
   Data can be found in the latest partition of hudi table, but not in the historical partition.
   There is no error in the program,
   
   **To Reproduce**
   
   Steps to reproduce the behavior:
   
   ```
   hoodie.datasource.write.operation=insert
   hoodie.datasource.write.table.type=MERGE_ON_READ
   hoodie.datasource.write.precombine.field=ts
   hoodie.datasource.write.recordkey.field=id
   hoodie.datasource.write.partitionpath.field=part
   hoodie.table.name=ss_bucket_dsj_parquet_12
   hoodie.datasource.write.keygenerator.class=org.apache.hudi.keygen.SimpleKeyGenerator
   hoodie.insert.shuffle.parallelism=8
   hoodie.datasource.compaction.async.enable=true
   hoodie.compact.inline.max.delta.commits=4
   hoodie.index.type=BUCKET
   hoodie.bucket.index.num.buckets=8
   hoodie.bucket.index.hash.field=id
   hoodie.storage.layout.partitioner.class=org.apache.hudi.table.action.commit.SparkBucketIndexPartitioner
   hoodie.storage.layout.type=BUCKET
   hoodie.metadata.enable=true
   hoodie.embed.timeline.server=false
   path=/tmp/hudi/ss_bucket_dsj_parquet_12
   checkpointLocation=/tmp/hudi/ckp
   hoodie.datasource.hive_sync.enable=true
   hoodie.datasource.hive_sync.username=ocdp
   hoodie.datasource.hive_sync.database=default
   hoodie.datasource.hive_sync.table=ss_bucket_dsj_parquet_12
   hoodie.datasource.hive_sync.password=ocdp
   hoodie.datasource.hive_sync.jdbcurl=jdbc:hive2://10.1.9.44:10000
   hoodie.datasource.hive_sync.partition_extractor_class=org.apache.hudi.hive.MultiPartKeysValueExtractor
   hoodie.datasource.hive_sync.partition_fields=part
   hoodie.datasource.write.hive_style_partitioning=true
   hoodie.datasource.hive_sync.bucket_sync=true
   ```
   
   **Expected behavior**
   
   Data should be found in the history partition.
   
   **Environment Description**
   
   * Hudi version :
     Hudi-0.12.0
   * Spark version :
      Spark-3.1.1
   * Hive version :
      Hive-3.1.2
   * Hadoop version :
      Hdoop-3.3.0
   * Storage (HDFS/S3/GCS..) :
      Hdfs
   * Running on Docker? (yes/no) :
     No
   
   **Query result**
   
   ![image](https://user-images.githubusercontent.com/90449228/196078827-d5fc92fb-db80-409a-b640-d594ab6edfce.png)
   ![image](https://user-images.githubusercontent.com/90449228/196079128-f19a5816-a3fe-4545-bc2e-26a2770d7cf8.png)
   ![image](https://user-images.githubusercontent.com/90449228/196079292-70e8b812-96ec-476f-8dab-84cafdb5877f.png)
   
   
   
   
   


-- 
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: commits-unsubscribe@hudi.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] eric9204 commented on issue #6965: [SUPPORT]Data can be found in the latest partition of hudi table, but not in the historical partition.

Posted by GitBox <gi...@apache.org>.
eric9204 commented on issue #6965:
URL: https://github.com/apache/hudi/issues/6965#issuecomment-1285282118

   @xiarixiaoyao @nsivabalan 
   A new discovery: 
   if the partition table was not compacted, the data of all partitions except the first partition can be queried.
   The first partition has only parquet file, and other partitions have both parquet and log files.


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] eric9204 commented on issue #6965: [SUPPORT]Data can be found in the latest partition of hudi table, but not in the historical partition.

Posted by GitBox <gi...@apache.org>.
eric9204 commented on issue #6965:
URL: https://github.com/apache/hudi/issues/6965#issuecomment-1301754534

   @nsivabalan @xiarixiaoyao I have tested it, and this case can reproduce the same issue. Hope this can help you.
   
   ```
   import org.apache.spark.SparkConf
   import org.apache.spark.sql.SparkSession
   import org.apache.spark.sql.streaming.{OutputMode,Trigger}
   
   object RatePerMicroBatchSourceTest {
     def main(args: Array[String]): Unit = {
       val sparkConf = new SparkConf()
       sparkConf.set("spark.serializer", "org.apache.spark.serializer.KryoSerializer")
         .set("spark.sql.shuffle.partitions", "4")
       val spark = SparkSession.builder().config(sparkConf).master("local[6]").getOrCreate()
       val dataFrame = spark.readStream
         .format("rate")
         .option("rowsPerBatch", 4)
         .option("numPartitions", 4)
         .option("startTimestamp", 0)
         .option("advanceMillisPerBatch", 1000)
         .load()
       dataFrame.createTempView("t")
       val resultDf = spark.sql(
         """
           |select timestamp,value,date_format(now(),'yyyyMMddHHmm') as part from t
           |""".stripMargin)
       resultDf.writeStream
         .queryName("RateStreamSource")
         .format("hudi")
         .options(getHudiConfig)
         .outputMode(OutputMode.Append())
         .trigger(Trigger.ProcessingTime("10 seconds"))
         .start()
         .awaitTermination()
     }
   
     def getHudiConfig = {
       Map(
         "hoodie.datasource.write.operation" -> "insert",
         "hoodie.merge.allow.duplicate.on.inserts" -> "true",
         "hoodie.datasource.write.table.type" -> "MERGE_ON_READ",
         "hoodie.datasource.write.precombine.field" -> "timestamp",
         "hoodie.datasource.write.recordkey.field" -> "value",
         "hoodie.datasource.write.partitionpath.field" -> "part",
         "hoodie.table.name" -> "rateHudiTest",
         "hoodie.datasource.write.keygenerator.class" -> "org.apache.hudi.keygen.SimpleKeyGenerator",
         "hoodie.datasource.write.drop.partition.columns" -> "false",
         "hoodie.upsert.shuffle.parallelism" -> "4",
         "hoodie.insert.shuffle.parallelism" -> "4",
         "hoodie.datasource.compaction.async.enable" -> "false",
         "hoodie.compact.inline" -> "true",
         "hoodie.compact.inline.max.delta.commits" -> "3",
         "hoodie.index.type" -> "BUCKET",
         "hoodie.bucket.index.num.buckets" -> "4",
         "hoodie.bucket.index.hash.field" -> "value",
         "hoodie.storage.layout.partitioner.class" -> "org.apache.hudi.table.action.commit.SparkBucketIndexPartitioner",
         "hoodie.storage.layout.type" -> "BUCKET",
         "hoodie.metadata.enable" -> "true",
         "hoodie.embed.timeline.server" -> "false",
         "path" -> "/tmp/hudi/rateHudiTest",
         "checkpointLocation" -> "/tmp/hudi/ckp",
         "hoodie.datasource.hive_sync.enable" -> "true",
         "hoodie.datasource.hive_sync.username" -> "****",
         "hoodie.datasource.hive_sync.database" -> "default",
         "hoodie.datasource.hive_sync.table" -> "rateHudiTest",
         "hoodie.datasource.hive_sync.password" -> "****",
         "hoodie.datasource.hive_sync.jdbcurl" -> "jdbc:hive2://localhost:10000",
         "hoodie.datasource.hive_sync.partition_extractor_class" -> "org.apache.hudi.hive.MultiPartKeysValueExtractor",
         "hoodie.datasource.hive_sync.partition_fields" -> "part",
         "hoodie.datasource.write.hive_style_partitioning" -> "false"
       )
     }
   }
   ```


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] nsivabalan commented on issue #6965: [SUPPORT]Data can be found in the latest partition of hudi table, but not in the historical partition.

Posted by GitBox <gi...@apache.org>.
nsivabalan commented on issue #6965:
URL: https://github.com/apache/hudi/issues/6965#issuecomment-1283100132

   @xiarixiaoyao : can you take this up. its regarding bucket index. 


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] eric9204 commented on issue #6965: [SUPPORT]Data can be found in the latest partition of hudi table, but not in the historical partition.

Posted by GitBox <gi...@apache.org>.
eric9204 commented on issue #6965:
URL: https://github.com/apache/hudi/issues/6965#issuecomment-1283896352

   @xiarixiaoyao yes, several parquet format files were generated in partition 202210171021, the same as other's partitions.
   
   ![image](https://user-images.githubusercontent.com/90449228/196684344-7fc9105c-4867-4eea-ab06-b2a82c51a242.png)
   


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] nsivabalan commented on issue #6965: [SUPPORT]Data can be found in the latest partition of hudi table, but not in the historical partition.

Posted by GitBox <gi...@apache.org>.
nsivabalan commented on issue #6965:
URL: https://github.com/apache/hudi/issues/6965#issuecomment-1301562509

   @eric9204 : the ask is, can you give us a reproducible script. something like our quick start https://hudi.apache.org/docs/quick-start-guide but w/ sample data which can help us reproduce the same issue you are facing. looks like @xiarixiaoyao could not root cause the issue from the info provided. 
   
   


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] xiarixiaoyao commented on issue #6965: [SUPPORT]Data can be found in the latest partition of hudi table, but not in the historical partition.

Posted by GitBox <gi...@apache.org>.
xiarixiaoyao commented on issue #6965:
URL: https://github.com/apache/hudi/issues/6965#issuecomment-1283880791

   @eric9204 
   Whether there are files generated in partition 202210171021 ?


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] xiarixiaoyao commented on issue #6965: [SUPPORT]Data can be found in the latest partition of hudi table, but not in the historical partition.

Posted by GitBox <gi...@apache.org>.
xiarixiaoyao commented on issue #6965:
URL: https://github.com/apache/hudi/issues/6965#issuecomment-1288309523

   @eric9204  i try to reproduce this prolem, but failed,  could you pls provide some dummy data


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] eric9204 closed issue #6965: [SUPPORT]Data can be found in the latest partition of hudi table, but not in the historical partition.

Posted by "eric9204 (via GitHub)" <gi...@apache.org>.
eric9204 closed issue #6965: [SUPPORT]Data can be found in the latest partition of hudi table, but not in the historical partition.
URL: https://github.com/apache/hudi/issues/6965


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] eric9204 commented on issue #6965: [SUPPORT]Data can be found in the latest partition of hudi table, but not in the historical partition.

Posted by GitBox <gi...@apache.org>.
eric9204 commented on issue #6965:
URL: https://github.com/apache/hudi/issues/6965#issuecomment-1288338928

   > @eric9204 i try to reproduce this prolem, but failed, could you pls provide some dummy data
   
   @xiarixiaoyao sorry, I don't know what you mean, do you need hoodie parquet file on hdfs?  or like this:
   ![image](https://user-images.githubusercontent.com/90449228/197438688-3f7e87b0-55fc-4571-a117-a6c048f2cfc5.png)
   ![image](https://user-images.githubusercontent.com/90449228/197438831-c8db835d-f88a-4712-be1d-66119779cdc7.png)
   


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] nsivabalan commented on issue #6965: [SUPPORT]Data can be found in the latest partition of hudi table, but not in the historical partition.

Posted by GitBox <gi...@apache.org>.
nsivabalan commented on issue #6965:
URL: https://github.com/apache/hudi/issues/6965#issuecomment-1283138001

   on a high level, if its partitioned dataset w/ regular index, hudi does not ensure uniqueness of record keys across partitions. A pair of partition path and record key is guaranteed to be unqiue. 
   wrt bucket index, if you haven't changed the key configs (record key, partition path, key gen class), I don't expect any issues. but will let @xiarixiaoyao assist further. 
   
   


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org