1. 程式人生 > >Apache Hudi 0.6.0版本重磅釋出

Apache Hudi 0.6.0版本重磅釋出

## 1. 下載資訊 * 原始碼:[Apache Hudi 0.6.0 Source Release](https://downloads.apache.org/hudi/0.6.0/hudi-0.6.0.src.tgz) ([asc](https://downloads.apache.org/hudi/0.6.0/hudi-0.6.0.src.tgz.asc), [sha512](https://downloads.apache.org/hudi/0.6.0/hudi-0.6.0.src.tgz.sha512)) * 二進位制Jar包:[nexus](https://repository.apache.org/#nexus-search;quick~hudi) ## 2. 遷移指南 - 如果您從0.5.3以前的版本遷移至0.6.0,請仔細核對每個版本的遷移指南; - 0.6.0版本從基於list的rollback策略變更為了基於marker檔案的rollback策略,為進行平穩遷移,會在`hoodie.properties`檔案中配置一個新屬性`hoodie.table.version`;無論何時使用Hudi表新版本,如1(從0.6.0以前遷移到0.6.0),將會自動進行升級,並且只會對Hudi表升級一次,升級後`hoodie.table.version`屬性將會自動更新。 - 類似也提供了一個降級命令列工具(-downgrade),如使用者想從0.6.0版本回退到之前的版本,此時`hoodie.table.version`將會從1變為0。 - 如果你在`bulkInsert()` RDD API中使用了自定義partitioner,注意0.6.0版本中該介面變為了`BulkInsertPartitioner`,需要對你的實現做適配。 ## 3. 重點特性 ### 3.1 寫入端改進 - 對已有Parquet表進行遷移:支援通過Spark Datasource/DeltaStreamer引導已存在的Parquet表遷移至Hudi,同時可通過Hive,SparkSQL,AWS Athena進行查詢(PrestoDB即將支援),技術細節請參考[RFC-15](https://cwiki.apache.org/confluence/display/HUDI/RFC+-+15%3A+HUDI+File+Listing+and+Query+Planning+Improvements)。該特性暫時標記為experimental,在後續的0.6.x版本將持續進行完善。與傳統重寫方案相比資源消耗和耗時都有資料量的提升。 - bulk_insert支援原生寫入:避免在bulk_insert寫入路徑中進行DataFrame - RDD轉化,可顯著提升bulk load的效能。後續的0.6.x版本將應用到其他的寫操作以使得schema管理更為輕鬆,徹底避免spark-avro的轉化。 - bulk_insert模式:Hudi bulk_insert對輸入進行排序以便優化檔案大小並避免在併發寫入DFS多分割槽時的記憶體溢位問題,對於想在寫入Hudi之前就已經準備好DataFrame的使用者,Hudi也提供了`hoodie.bulkinsert.sort.mode`配置項。 - 支援Cleaning與寫入併發執行,開啟`hoodie.clean.async=true`以減少commit過程的耗時; - Spark Streaming寫入支援非同步Compaction,可通過`hoodie.datasource.compaction.async.enable`進行配置。 - 支援通過marker檔案進行Rollback,而不再對全表進行listing,設定`hoodie.rollback.using.markers=true`啟用。 - 支援一種新的索引型別`hoodie.index.type=SIMPLE`,對於updates/deletes覆蓋表大多數資料的場景,會比`BLOOM_INDEX`更快。 - 支援`Azure Data Lake Storage V2`, `Alluxio` 和 `Tencent Cloud Object Storage` - [HoodieMultiDeltaStreamer](https://hudi.apache.org/docs/writing_data.html#multitabledeltastreamer) 支援在單個DeltaStreamer中消費多個Kafka流,降低使用DeltaStreamer作為資料湖攝取工具時的運維負擔。 - 新增新的工具類InitialCheckPointProvider,以便在遷移至DeltaStreamer後設置Checkpoint。 - DeltaStreamer工具支援攝取CSV資料來源,同時可chain多個transformers來構建更靈活的ETL作業。 - 引入新的Key生成器`CustomKeyGenerator`,對不同型別的Key、Partition路徑提供更靈活的配置,另外在`TimestampBasedKeyGenerator`中還支援更多時間單位。更多詳情請參考[docs](https://hudi.apache.org/docs/writing_data.html#key-generation) ### 3.2 查詢端改進 - 從0.6.0版本開始,Spark DataSource支援MoR表的SNAPSHOT查詢; - 在之前版本中,對CoW表,Hudi僅僅支援`HoodieCombineHiveInputFormat`來確保對於任何查詢都只會生成有限數量的mappers。Hudi現在對MoR表支援使用`HoodieCombineInputFormat`。 - 在HoodieROPathFilter中快取MetaClient來加速Spark查詢,這可以減少在S3上對Read-Optimized查詢進行檔案過濾的額外開銷。 ### 3.3 易用性提升 - 對Spark DAG賦名字以便更好的進行除錯。 - 支援使用者自定義可插拔指標報告者,另外內建Console,JMX,Prometheus,DataDog指標報告者。 - 新增Data Snapshot Exporter工具類,通過該工具類可將某一時刻的Hudi表匯出為Parquet檔案。 - 引入寫入提交回調鉤子,以便在Commit時可以通知增量pipelines,例如在新的commit到來後觸發Apache Airflow作業。 - 支援通過CLI刪除Savepoints。 * 新增命令 `export instants`來匯出instant元資料。 ## 4. 貢獻者 感謝以下貢獻者,排名不分先後 [hddong](https://github.com/apache/hudi/commits?author=hddong), [xushiyan](https://github.com/apache/hudi/commits?author=xushiyan), [wangxianghu](https://github.com/apache/hudi/commits?author=wangxianghu), [shenh062326](https://github.com/apache/hudi/commits?author=shenh062326), [prashantwason](https://github.com/apache/hudi/commits?author=prashantwason), [bvaradar](https://github.com/apache/hudi/commits?author=bvaradar), [vinothchandar](https://github.com/apache/hudi/commits?author=vinothchandar), [baobaoyeye](https://github.com/apache/hudi/commits?author=baobaoyeye), [andreitaleanu](https://github.com/apache/hudi/commits?author=andreitaleanu), [clocklear](https://github.com/apache/hudi/commits?author=clocklear) , [linshan-ma](https://github.com/apache/hudi/commits?author=linshan-ma), [satishkotha](https://github.com/apache/hudi/commits?author=satishkotha), [Trevor-zhang](https://github.com/apache/hudi/commits?author=Trevor-zhang), [pratyakshsharma](https://github.com/apache/hudi/commits?author=pratyakshsharma), [GuoPhilipse](https://github.com/apache/hudi/commits?author=GuoPhilipse), [nsivabalan](https://github.com/apache/hudi/commits?author=nsivabalan), [zhedoubushishi](https://github.com/apache/hudi/commits?author=zhedoubushishi), [umehrot2](https://github.com/apache/hudi/commits?author=umehrot2), [lw309637554](https://github.com/apache/hudi/commits?author=lw309637554), [DeyinZhong](https://github.com/apache/hudi/commits?author=DeyinZhong), [zherenyu831](https://github.com/apache/hudi/commits?author=zherenyu831), [lamber-ken](https://github.com/apache/hudi/commits?author=lamber-ken), [garyli1019](https://github.com/apache/hudi/commits?author=garyli1019), [bhasudha](https://github.com/apache/hudi/commits?author=bhasudha), [n3nash](https://github.com/apache/hudi/commits?author=n3nash), [yihua](https://github.com/apache/hudi/commits?author=yihua), [liujinhui1994](https://github.com/apache/hudi/commits?author=liujinhui1994), [sreeram26](https://github.com/apache/hudi/commits?author=sreeram26), [Yungthuis](https://github.com/apache/hudi/commits?author=Yungthuis), [cheshta2904](https://github.com/apache/hudi/commits?author=cheshta2904),