{"id":101745,"date":"2026-09-07T13:09:41","date_gmt":"2026-09-07T05:09:41","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/101745.html"},"modified":"2026-09-07T13:09:41","modified_gmt":"2026-09-07T05:09:41","slug":"apache-paimon-%e5%ae%9e%e6%97%b6%e6%b9%96%e4%bb%93%e5%ae%9e%e6%88%98%ef%bc%88%e7%ac%ac-1-%e7%af%87%ef%bc%89%ef%bc%9a%e5%88%ab%e5%86%8d%e8%af%b4-paimon-%e5%8f%aa%e6%98%af%e8%a1%a8%e6%a0%bc%e5%bc%8f","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/101745.html","title":{"rendered":"Apache Paimon \u5b9e\u65f6\u6e56\u4ed3\u5b9e\u6218\uff08\u7b2c 1 \u7bc7\uff09\uff1a\u522b\u518d\u8bf4 Paimon \u53ea\u662f\u8868\u683c\u5f0f\uff0c\u771f\u6b63\u503c\u94b1\u7684\u662f\u8ba9\u66f4\u65b0\u8fdb\u5165\u6570\u636e\u6e56"},"content":{"rendered":"<p>\u8ba2\u5355 CDC \u5df2\u7ecf\u843d\u5230\u5bf9\u8c61\u5b58\u50a8&#xff0c;Spark \u4e5f\u80fd\u67e5\u3002\u4e1a\u52a1\u7b2c\u4e8c\u5929\u8981\u770b\u8ba2\u5355\u5f53\u524d\u72b6\u6001&#xff0c;\u56e2\u961f\u624d\u53d1\u73b0\u540c\u4e00\u4e2a order_id \u6709\u5341\u51e0\u4e2a\u7248\u672c&#xff1a;CREATED\u3001PAID\u3001CANCELLED \u5168\u5728&#xff0c;\u54ea\u4e00\u6761\u624d\u662f\u73b0\u5728&#xff0c;\u5f97\u7531\u6bcf\u6761 SQL \u4e34\u65f6\u5224\u65ad\u3002<\/p>\n<p>\u628a\u6570\u636e\u5199\u6210 Parquet \u4e0d\u96be&#xff0c;\u7ed9\u6587\u4ef6\u8865\u4e0a Schema\u3001\u5206\u533a\u548c Snapshot \u4e5f\u4e0d\u96be\u3002\u771f\u6b63\u96be\u7684\u662f&#xff1a;\u4e0d\u628a\u5bf9\u8c61\u5b58\u50a8\u6539\u9020\u6210\u6570\u636e\u5e93&#xff0c;\u4ecd\u80fd\u6301\u7eed\u63a5\u6536 Update\/Delete&#xff0c;\u8ba9\u6279\u67e5\u8be2\u8bfb\u5230\u53ef\u4fe1\u5f53\u524d\u72b6\u6001&#xff0c;\u540c\u65f6\u8ba9\u6d41\u4efb\u52a1\u4ece\u63d0\u4ea4\u8fb9\u754c\u7ee7\u7eed\u6d88\u8d39\u3002<\/p>\n<p>Paimon \u7684\u5173\u952e\u5dee\u5f02\u4e0d\u662f\u53c8\u7ba1\u7406\u4e86\u4e00\u6279\u6587\u4ef6&#xff0c;\u800c\u662f\u7528 Bucket \u5185 LSM \u627f\u63a5\u4e3b\u952e\u66f4\u65b0&#xff0c;\u518d\u7528\u539f\u5b50 Snapshot \u628a\u5f53\u524d\u72b6\u6001\u3001\u6279\u91cf\u91cd\u7b97\u548c\u6d41\u5f0f\u589e\u91cf\u63a5\u5230\u540c\u4e00\u5f20\u6e56\u8868\u4e0a\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260907050938-6a9e4712c0c80.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>\u540c\u4e00\u6279\u8ba2\u5355\u843d\u6e56&#xff0c;\u56db\u6761\u8def\u5f84\u627f\u62c5\u7684\u8d23\u4efb\u4e0d\u540c<\/h3>\n<p>\u5148\u56fa\u5b9a\u5171\u540c\u524d\u63d0&#xff1a;MySQL \u8ba2\u5355\u6301\u7eed\u4ea7\u751f Insert\u3001Update\u3001Delete&#xff1b;\u540c\u4e00\u4e3b\u952e\u53ef\u80fd\u4e71\u5e8f&#xff1b;\u5206\u949f\u7ea7\u53ef\u89c1\u5373\u53ef&#xff1b;Flink \u7ee7\u7eed\u6d88\u8d39\u53d8\u5316&#xff0c;Spark \u9700\u8981\u968f\u65f6\u91cd\u7b97&#xff1b;\u5e95\u5c42\u4f7f\u7528\u5171\u4eab\u6587\u4ef6\u7cfb\u7edf\u6216\u5bf9\u8c61\u5b58\u50a8\u3002\u673a\u5668\u89c4\u6a21\u3001\u5b9e\u9645\u541e\u5410\u548c SLA \u672a\u63d0\u4f9b&#xff0c;\u56e0\u6b64\u8fd9\u91cc\u53ea\u6bd4\u8f83\u6267\u884c\u8def\u5f84&#xff0c;\u4e0d\u6bd4\u8f83\u8dd1\u5206\u3002<\/p>\n<table>\n<tr>\u8def\u5f84\u66f4\u65b0\u600e\u6837\u4fdd\u5b58\u5f53\u524d\u72b6\u6001\u7531\u8c01\u8ba1\u7b97\u6279\u6d41\u5982\u4f55\u5bf9\u9f50\u4e3b\u8981\u4ee3\u4ef7<\/tr>\n<tbody>\n<tr>\n<td>\u666e\u901a Parquet \u8ffd\u52a0\u76ee\u5f55<\/td>\n<td>\u6bcf\u6b21\u53d8\u5316\u7ee7\u7eed\u8ffd\u52a0<\/td>\n<td>\u6bcf\u4e2a\u67e5\u8be2\u6309\u4e3b\u952e\u6392\u5e8f\u53bb\u91cd<\/td>\n<td>\u53e6\u5efa\u6587\u4ef6\u53d1\u73b0\u3001\u4f4d\u70b9\u548c\u91cd\u653e\u89c4\u5219<\/td>\n<td>\u903b\u8f91\u5206\u6563&#xff0c;\u5220\u9664\u3001\u4e71\u5e8f\u548c\u6062\u590d\u5bb9\u6613\u5404\u7b97\u4e00\u5957<\/td>\n<\/tr>\n<tr>\n<td>Paimon Append Table<\/td>\n<td>\u4ee5\u8ffd\u52a0\u8bb0\u5f55\u4e3a\u4e3b<\/td>\n<td>\u4e0a\u6e38\u6216\u67e5\u8be2\u8d1f\u8d23\u72b6\u6001\u5316<\/td>\n<td>Snapshot \u63d0\u4f9b\u63d0\u4ea4\u8fb9\u754c&#xff0c;\u53ef\u6d41\u5f0f\u8bfb\u8ffd\u52a0\u6570\u636e<\/td>\n<td>\u4e0d\u5b9a\u4e49\u4e3b\u952e\u65f6&#xff0c;\u4e0d\u80fd\u76f4\u63a5\u9760 Upsert \u63a5\u6536\u5b8c\u6574 Changelog<\/td>\n<\/tr>\n<tr>\n<td>Paimon Primary Key Table<\/td>\n<td>\u540c\u4e00 Bucket \u5185\u5f62\u6210\u591a\u7ec4\u6709\u5e8f\u6587\u4ef6<\/td>\n<td>LSM \u8bfb\u53d6\u4e0e Merge Engine \u5408\u5e76\u540c\u4e3b\u952e\u8bb0\u5f55<\/td>\n<td>\u6279\u8bfb\u4e0e\u6d41\u8bfb\u56f4\u7ed5\u540c\u4e00\u7ec4 Snapshot \u63a8\u8fdb<\/td>\n<td>Compaction\u3001Bucket\u3001Changelog \u548c\u4fdd\u7559\u7b56\u7565\u5fc5\u987b\u6cbb\u7406<\/td>\n<\/tr>\n<tr>\n<td>\u670d\u52a1\u578b\u6570\u636e\u5e93<\/td>\n<td>\u6570\u636e\u5e93\u5185\u90e8\u5b8c\u6210\u4e3b\u952e\u66f4\u65b0<\/td>\n<td>\u6570\u636e\u5e93\u8fd4\u56de\u5f53\u524d\u884c<\/td>\n<td>\u589e\u91cf\u901a\u5e38\u901a\u8fc7\u65e5\u5fd7\u3001\u8ba2\u9605\u6216\u5bfc\u51fa\u94fe\u8def\u63d0\u4f9b<\/td>\n<td>\u5728\u7ebf\u670d\u52a1\u5f3a&#xff0c;\u4f46\u5b58\u50a8\u6210\u672c\u3001\u591a\u5f15\u64ce\u91cd\u7b97\u548c\u5386\u53f2\u5f00\u653e\u6027\u662f\u53e6\u4e00\u5957\u53d6\u820d<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8fd9\u5f20\u8868\u6ca1\u6709\u7edd\u5bf9\u51a0\u519b\u3002\u53ea\u4fdd\u5b58\u4e0d\u53ef\u53d8\u65e5\u5fd7&#xff0c;Paimon Append Table \u66f4\u7b80\u5355&#xff1b;\u9700\u8981\u6beb\u79d2\u7ea7\u70b9\u67e5\u548c\u9ad8\u5e76\u53d1\u63a5\u53e3&#xff0c;\u670d\u52a1\u578b\u6570\u636e\u5e93\u4ecd\u5e94\u4fdd\u7559&#xff1b;\u9700\u8981\u540c\u4e00\u4efd\u4f4e\u6210\u672c\u6570\u636e\u540c\u65f6\u627f\u63a5\u6301\u7eed\u66f4\u65b0\u3001\u6d41\u5f0f\u6d88\u8d39\u548c\u6279\u91cf\u91cd\u7b97&#xff0c;Primary Key Table \u624d\u4f53\u73b0\u51fa\u5dee\u5f02\u3002<\/p>\n<h3>LSM \u6ca1\u6709\u6d88\u706d\u66f4\u65b0\u6210\u672c&#xff0c;\u53ea\u628a\u968f\u673a\u6539\u5199\u53d8\u6210\u987a\u5e8f\u8ffd\u52a0\u4e0e\u540e\u53f0\u5408\u5e76<\/h3>\n<p>Paimon 2.0 Primary Key Table \u6587\u6863 \u660e\u786e\u8bf4\u660e&#xff1a;\u4e00\u5f20\u8868\u6216\u4e00\u4e2a\u5206\u533a\u4f1a\u88ab\u62c6\u6210\u591a\u4e2a Bucket&#xff0c;\u6bcf\u4e2a Bucket \u5185\u90e8\u662f\u4e00\u68f5 LSM Tree\u3002Bucket \u662f\u6700\u5c0f\u8bfb\u5199\u5355\u5143&#xff0c;\u4e5f\u9650\u5236\u6700\u5927\u5904\u7406\u5e76\u884c\u5ea6\u3002<\/p>\n<p>\u65b0\u8bb0\u5f55\u4e0d\u662f\u53bb\u5bf9\u8c61\u5b58\u50a8\u91cc\u627e\u5230\u65e7\u884c\u5e76\u539f\u5730\u4fee\u6539\u3002\u5199\u5165\u5148\u8fdb\u5165\u5185\u5b58\u7f13\u51b2&#xff0c;\u6392\u5e8f\u540e\u5f62\u6210\u65b0\u7684 Sorted Run\u3002\u4e0d\u540c Sorted Run \u7684\u4e3b\u952e\u8303\u56f4\u53ef\u4ee5\u91cd\u53e0&#xff0c;\u4e5f\u53ef\u4ee5\u51fa\u73b0\u540c\u4e00\u4e2a\u4e3b\u952e&#xff1b;\u8bfb\u53d6\u65f6\u5fc5\u987b\u6309\u7167 Merge Engine \u548c\u8bb0\u5f55\u987a\u5e8f\u5408\u5e76\u3002<\/p>\n<p>CDC RowKind \/ \u4e1a\u52a1\u7248\u672c<br \/>\n\u2192 Partition \u4e0e Bucket \u8def\u7531<br \/>\n\u2192 \u5185\u5b58\u7f13\u51b2\u5e76\u6309\u4e3b\u952e\u6392\u5e8f<br \/>\n\u2192 Checkpoint \u5237\u51fa L0 Sorted Run<br \/>\n\u2192 Commit \u6c47\u603b Manifest \u53d8\u5316<br \/>\n\u2192 Snapshot \u6587\u4ef6\u63d0\u4ea4\u6210\u529f\u540e\u5168\u5c40\u53ef\u89c1<br \/>\n\u2192 \u8bfb\u53d6\u65f6\u5408\u5e76&#xff0c;\u6216\u7531 Compaction \/ Deletion Vector \u63d0\u524d\u6d88\u5316\u65e7\u7248\u672c<\/p>\n<p>\u8fd9\u6761\u94fe\u628a\u5bf9\u8c61\u5b58\u50a8\u4e0d\u64c5\u957f\u7684\u968f\u673a\u66f4\u65b0&#xff0c;\u8f6c\u6362\u6210\u8ffd\u52a0\u65b0\u6587\u4ef6\u3001\u63d0\u4ea4\u5143\u6570\u636e\u548c\u540e\u7eed\u5408\u5e76\u3002\u6536\u76ca\u662f\u5199\u5165\u53ef\u4ee5\u4fdd\u6301\u987a\u5e8f I\/O&#xff0c;\u4ee3\u4ef7\u5219\u5206\u6563\u5230\u4e09\u5904&#xff1a;Writer \u7684 Flush \u4e0e\u63d0\u4ea4\u3001\u540e\u53f0 Compaction\u3001Reader \u7684\u591a\u8def\u5f52\u5e76\u3002<\/p>\n<p>Table Mode \u6587\u6863 \u56e0\u6b64\u624d\u533a\u5206 MOR\u3001COW \u548c MOW\u3002MOR \u628a\u66f4\u591a\u6210\u672c\u7559\u7ed9\u8bfb\u53d6&#xff0c;COW \u628a\u5168\u91cf\u5408\u5e76\u653e\u8fdb\u5199\u5165&#xff0c;MOW \u7528 Deletion Vector \u6539\u5584\u8bfb\u53d6&#xff0c;\u4f46 L0 \u6587\u4ef6\u4ecd\u6709 Compaction \u540e\u624d\u53ef\u89c1\u7684\u8fb9\u754c\u3002\u6240\u8c13\u5b9e\u65f6\u66f4\u65b0\u4e0d\u662f\u514d\u8d39\u66f4\u65b0&#xff0c;\u800c\u662f\u53ef\u4ee5\u660e\u786e\u9009\u62e9\u6210\u672c\u7531\u8c01\u3001\u5728\u4ec0\u4e48\u65f6\u5019\u652f\u4ed8\u3002<\/p>\n<h3>\u771f\u6b63\u7684\u53ef\u89c1\u6027\u5f00\u5173\u4e0d\u662f\u6587\u4ef6\u5199\u5b8c&#xff0c;\u800c\u662f Snapshot \u63d0\u4ea4\u6210\u529f<\/h3>\n<p>Paimon \u7684 Data File\u3001Manifest \u548c Snapshot \u4e0d\u662f\u540c\u4e00\u4e2a\u5c42\u6b21\u3002Data File \u4fdd\u5b58\u6570\u636e&#xff0c;Manifest \u63cf\u8ff0\u6587\u4ef6\u589e\u5220&#xff0c;Snapshot \u5f15\u7528\u4e00\u7ec4\u80fd\u591f\u5171\u540c\u89e3\u91ca\u8868\u72b6\u6001\u7684\u5143\u6570\u636e\u3002<\/p>\n<p>Snapshot \u683c\u5f0f\u8bf4\u660e \u7ed9\u51fa\u4e00\u4e2a\u5173\u952e\u4e8b\u5b9e&#xff1a;\u6bcf\u6b21 Commit \u751f\u6210\u4e00\u4e2a\u8fde\u7eed\u7f16\u53f7\u7684 Snapshot&#xff1b;\u5199\u5165\u65b9\u62a2\u5360\u4e0b\u4e00\u4e2a Snapshot ID&#xff0c;Snapshot \u6587\u4ef6\u6210\u529f\u5199\u5165\u540e&#xff0c;\u672c\u6b21\u63d0\u4ea4\u624d\u53ef\u89c1\u3002<\/p>\n<p>\u56fa\u5b9a\u5230 release-2.0.0&#xff0c;\u6700\u77ed\u6e90\u7801\u94fe\u662f&#xff1a;<\/p>\n<p>StoreSinkWrite \/ StoreSinkWriteImpl<br \/>\n\u2192 Committable \/ ManifestCommittable<br \/>\n\u2192 StoreCommitter<br \/>\n\u2192 FileStoreCommitImpl<br \/>\n\u2192 SnapshotCommit<br \/>\n\u2192 RenamingSnapshotCommit \u6216 CatalogSnapshotCommit<\/p>\n<p>FileStoreCommitImpl \u4f1a\u5728\u63d0\u4ea4\u524d\u68c0\u67e5\u5f85\u5220\u9664\u6587\u4ef6\u548c\u4fee\u6539\u8303\u56f4\u51b2\u7a81&#xff0c;\u518d\u901a\u8fc7 SnapshotCommit \u5b8c\u6210\u539f\u5b50\u63d0\u4ea4\u3002\u6587\u4ef6\u7cfb\u7edf\u63d0\u4ea4\u8def\u5f84\u4e2d\u7684 RenamingSnapshotCommit \u6700\u7ec8\u5c1d\u8bd5\u539f\u5b50\u5199\u5165 snapshot-&lt;id&gt;&#xff1b;\u6210\u529f\u540e\u66f4\u65b0 LATEST \u63d0\u793a\u3002<\/p>\n<p>LATEST \u53ea\u662f\u63d0\u793a\u6587\u4ef6&#xff0c;\u53ef\u80fd\u4e0d\u51c6\u786e\u3002\u8bfb\u53d6\u7aef\u5728\u63d0\u793a\u4e0d\u53ef\u4fe1\u65f6\u4ecd\u4f1a\u626b\u63cf Snapshot \u6587\u4ef6\u786e\u5b9a\u8fb9\u754c\u3002\u56e0\u6b64\u4e0d\u80fd\u628a\u76ee\u5f55\u91cc\u51fa\u73b0\u65b0 Data File\u3001LATEST \u88ab\u66f4\u65b0&#xff0c;\u6216 Flink \u67d0\u4e2a Subtask \u5df2\u5b8c\u6210&#xff0c;\u5f53\u4f5c\u6574\u5f20\u8868\u5df2\u63d0\u4ea4\u7684\u5145\u5206\u8bc1\u636e\u3002<\/p>\n<h3>\u4e00\u7ec4\u4e71\u5e8f\u8ba2\u5355&#xff0c;\u80fd\u540c\u65f6\u9a8c\u8bc1\u4e09\u5c42\u6b63\u786e\u6027<\/h3>\n<p>\u4e0b\u9762\u662f\u4e00\u5957\u6700\u5c0f\u5b9e\u9a8c\u8bbe\u8ba1&#xff0c;\u4e0d\u662f\u751f\u4ea7\u6027\u80fd\u62a5\u544a\u3002<\/p>\n<p>Paimon&#xff1a;2.0.0<br \/>\n\u8ba1\u7b97\u5f15\u64ce&#xff1a;Flink 1.20<br \/>\n\u5b58\u50a8&#xff1a;\u672c\u5730\u6587\u4ef6\u7cfb\u7edf&#xff0c;\u4ec5\u7528\u4e8e\u9694\u79bb\u8bed\u4e49<br \/>\n\u8868\u6a21\u5f0f&#xff1a;Primary Key Table&#xff0c;\u9ed8\u8ba4 deduplicate \/ MOR<br \/>\n\u53d8\u5316\u53d8\u91cf&#xff1a;\u540c\u4e00 order_id \u7684\u8f93\u5165\u987a\u5e8f<br \/>\n\u672a\u9a8c\u8bc1&#xff1a;\u5bf9\u8c61\u5b58\u50a8\u5ef6\u8fdf\u3001\u5e76\u53d1 Writer\u3001\u6545\u969c\u6062\u590d\u548c\u751f\u4ea7\u541e\u5410<\/p>\n<p>\u5148\u521b\u5efa\u4e00\u5f20\u8ba2\u5355\u5f53\u524d\u72b6\u6001\u8868\u3002\u5b9e\u9a8c\u4f7f\u7528\u5355\u8c03\u4e1a\u52a1\u7248\u672c source_version&#xff0c;\u907f\u514d\u628a\u5904\u7406\u65f6\u95f4\u8bef\u5f53\u6210\u4e1a\u52a1\u987a\u5e8f\u3002<\/p>\n<p><span class=\"token keyword\">CREATE<\/span> <span class=\"token keyword\">TABLE<\/span> orders <span class=\"token punctuation\">(<\/span><br \/>\n    order_id <span class=\"token keyword\">BIGINT<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token keyword\">status<\/span> STRING<span class=\"token punctuation\">,<\/span><br \/>\n    amount <span class=\"token keyword\">DECIMAL<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">18<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">2<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    source_version <span class=\"token keyword\">BIGINT<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token keyword\">PRIMARY<\/span> <span class=\"token keyword\">KEY<\/span> <span class=\"token punctuation\">(<\/span>order_id<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">NOT<\/span> ENFORCED<br \/>\n<span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">WITH<\/span> <span class=\"token punctuation\">(<\/span><br \/>\n    <span class=\"token string\">&#039;bucket&#039;<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#039;4&#039;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token string\">&#039;sequence.field&#039;<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#039;source_version&#039;<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u5bf9\u540c\u4e00\u4e3b\u952e\u4f9d\u6b21\u63d0\u4ea4\u4e09\u6761\u6570\u636e&#xff0c;\u6700\u540e\u4e00\u6761\u6545\u610f\u8fdf\u5230&#xff1a;<\/p>\n<p><span class=\"token keyword\">INSERT<\/span> <span class=\"token keyword\">INTO<\/span> orders <span class=\"token keyword\">VALUES<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token number\">1001<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;CREATED&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">100.00<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">INSERT<\/span> <span class=\"token keyword\">INTO<\/span> orders <span class=\"token keyword\">VALUES<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token number\">1001<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;PAID&#039;<\/span><span class=\"token punctuation\">,<\/span>    <span class=\"token number\">100.00<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">3<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">INSERT<\/span> <span class=\"token keyword\">INTO<\/span> orders <span class=\"token keyword\">VALUES<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token number\">1001<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;CANCELLED&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">100.00<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">2<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u6279\u8bfb\u7684\u9884\u671f\u7ed3\u679c\u4ecd\u5e94\u662f\u7248\u672c 3 \u7684 PAID\u3002\u82e5\u5220\u9664 sequence.field \u540e\u91cd\u590d\u5b9e\u9a8c&#xff0c;\u9ed8\u8ba4\u5408\u5e76\u987a\u5e8f\u4f9d\u8d56\u8f93\u5165\u987a\u5e8f&#xff0c;\u8fdf\u5230\u7684\u7248\u672c 2 \u53ef\u80fd\u6210\u4e3a\u6700\u7ec8\u884c\u3002\u8fd9\u4e00\u5bf9\u7167\u8bc1\u660e\u7684\u662f Sequence \u4e0e Merge Engine \u5982\u4f55\u51b3\u5b9a\u8868\u5185\u5f53\u524d\u72b6\u6001&#xff0c;\u4e0d\u8bc1\u660e Paimon \u6bd4\u5176\u4ed6\u7cfb\u7edf\u66f4\u5feb\u3002<\/p>\n<p><span class=\"token comment\">&#8212; \u89c2\u5bdf\u5bf9\u8c61&#xff1a;\u8868\u5185\u6700\u7ec8\u4e1a\u52a1\u72b6\u6001&#xff1b;\u53ea\u8bfb\u3002<\/span><br \/>\n<span class=\"token comment\">&#8212; \u6b63\u5e38\u4fe1\u53f7&#xff1a;1001 \u53ea\u8fd4\u56de\u4e00\u884c&#xff0c;source_version &#061; 3\u3002<\/span><br \/>\n<span class=\"token comment\">&#8212; \u5f02\u5e38\u4fe1\u53f7&#xff1a;\u51fa\u73b0\u591a\u884c&#xff0c;\u6216\u6700\u7ec8\u7248\u672c\u4e0d\u662f 3\u3002<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> <span class=\"token operator\">*<\/span><br \/>\n<span class=\"token keyword\">FROM<\/span> orders<br \/>\n<span class=\"token keyword\">WHERE<\/span> order_id <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">1001<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u63a5\u7740\u6838\u5bf9\u63d0\u4ea4\u8fb9\u754c&#xff1a;<\/p>\n<p><span class=\"token comment\">&#8212; \u89c2\u5bdf\u5bf9\u8c61&#xff1a;Snapshot \u63d0\u4ea4\u5e8f\u5217&#xff1b;\u53ea\u8bfb\u3002<\/span><br \/>\n<span class=\"token comment\">&#8212; \u6b63\u5e38\u4fe1\u53f7&#xff1a;snapshot_id \u8fde\u7eed&#xff0c;\u6700\u8fd1\u5199\u5165\u4ea7\u751f APPEND \u7c7b\u63d0\u4ea4\u3002<\/span><br \/>\n<span class=\"token comment\">&#8212; \u5b83\u4e0d\u80fd\u8bc1\u660e&#xff1a;\u8ba2\u5355\u6700\u7ec8\u72b6\u6001\u6b63\u786e\u3001\u4e0b\u6e38\u83b7\u5f97\u5b8c\u6574 UPDATE_BEFORE\u3002<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> snapshot_id<span class=\"token punctuation\">,<\/span><br \/>\n       commit_user<span class=\"token punctuation\">,<\/span><br \/>\n       commit_identifier<span class=\"token punctuation\">,<\/span><br \/>\n       commit_kind<span class=\"token punctuation\">,<\/span><br \/>\n       commit_time<span class=\"token punctuation\">,<\/span><br \/>\n       total_record_count<span class=\"token punctuation\">,<\/span><br \/>\n       changelog_record_count<br \/>\n<span class=\"token keyword\">FROM<\/span> orders$snapshots<br \/>\n<span class=\"token keyword\">ORDER<\/span> <span class=\"token keyword\">BY<\/span> snapshot_id<span class=\"token punctuation\">;<\/span><\/p>\n<p>\u6700\u540e\u68c0\u67e5\u7269\u7406\u6587\u4ef6&#xff1a;<\/p>\n<p><span class=\"token comment\">&#8212; \u89c2\u5bdf\u5bf9\u8c61&#xff1a;\u5f53\u524d Snapshot \u5f15\u7528\u7684\u6570\u636e\u6587\u4ef6&#xff1b;\u53ea\u8bfb\u3002<\/span><br \/>\n<span class=\"token comment\">&#8212; \u5224\u65ad\u76ee\u6807&#xff1a;\u540c\u4e00\u4e3b\u952e\u53ef\u80fd\u4ecd\u5b58\u5728\u4e8e\u4e0d\u540c Sorted Run&#xff0c;\u903b\u8f91\u4e00\u884c\u4e0d\u7b49\u4e8e\u7269\u7406\u4e00\u884c\u3002<\/span><br \/>\n<span class=\"token comment\">&#8212; \u6ce8\u610f&#xff1a;\u751f\u4ea7\u5927\u8868\u5e94\u9650\u5b9a Snapshot\u3001\u5206\u533a\u6216\u62bd\u6837\u8303\u56f4&#xff0c;\u907f\u514d\u9ad8\u6210\u672c\u5143\u6570\u636e\u626b\u63cf\u3002<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> <span class=\"token operator\">*<\/span> <span class=\"token keyword\">FROM<\/span> orders$files<span class=\"token punctuation\">;<\/span><\/p>\n<p>\u8fd9\u5957\u5b9e\u9a8c\u80fd\u591f\u8bc1\u660e\u4e09\u4ef6\u4e8b&#xff1a;\u4e1a\u52a1\u7248\u672c\u63a7\u5236\u4e71\u5e8f\u66f4\u65b0\u3001Snapshot \u662f\u63d0\u4ea4\u53ef\u89c1\u6027\u8fb9\u754c\u3001\u903b\u8f91\u5f53\u524d\u884c\u4e0e\u7269\u7406\u65e7\u7248\u672c\u53ef\u4ee5\u540c\u65f6\u5b58\u5728\u3002\u5b83\u4e0d\u80fd\u8bc1\u660e\u6d41\u5f0f\u4e0b\u6e38\u4e00\u5b9a\u5f97\u5230\u5b8c\u6574\u64a4\u56de&#xff0c;\u4e5f\u4e0d\u80fd\u8bc1\u660e\u67d0\u79cd Bucket \u6216 Compaction \u914d\u7f6e\u9002\u5408\u751f\u4ea7\u3002<\/p>\n<h3>\u8868\u91cc\u662f 100&#xff0c;Snapshot \u4e5f\u6210\u529f&#xff0c;\u4e0b\u6e38\u4ecd\u53ef\u80fd\u7b97\u9519<\/h3>\n<p>\u6279\u8bfb\u5f97\u5230\u4e00\u884c\u6b63\u786e\u7684 PAID&#xff0c;\u53ea\u8bc1\u660e Primary Key Table \u7684\u5f53\u524d\u72b6\u6001\u6b63\u786e\u3002\u4e0b\u6e38\u82e5\u6309\u95e8\u5e97\u6c47\u603b\u91d1\u989d&#xff0c;\u66f4\u65b0 100 \u2192 80 \u65f6\u9700\u8981\u77e5\u9053\u65e7\u503c 100&#xff0c;\u624d\u80fd\u5148\u64a4\u56de\u518d\u52a0\u5165 80\u3002<\/p>\n<p>Paimon \u9ed8\u8ba4 changelog-producer&#061;none \u4e0d\u989d\u5916\u4fdd\u5b58\u5b8c\u6574\u65e7\u503c\u53d8\u5316&#xff1b;Flink \u53ef\u80fd\u9700\u8981 Normalize State \u8bb0\u4f4f\u6bcf\u4e2a\u4e3b\u952e\u7684\u65e7\u503c\u3002input\u3001lookup \u548c full-compaction \u53ef\u4ee5\u5728\u4e0d\u540c\u524d\u63d0\u4e0b\u63d0\u4f9b\u66f4\u5b8c\u6574\u7684 Changelog&#xff0c;\u5374\u4f1a\u589e\u52a0\u6587\u4ef6\u3001\u72b6\u6001\u6216 Compaction \u6210\u672c\u3002<\/p>\n<p>\u56e0\u6b64\u9700\u8981\u5206\u5f00\u9a8c\u6536&#xff1a;<\/p>\n<p>\u6e90\u4e8b\u4ef6\u5b8c\u6574<br \/>\n\u2260 Checkpoint \u5bf9\u5e94 Snapshot \u5df2\u63d0\u4ea4<br \/>\n\u2260 \u8868\u5185\u5f53\u524d\u72b6\u6001\u6b63\u786e<br \/>\n\u2260 \u4e0b\u6e38\u6536\u5230\u5b8c\u6574 Changelog<br \/>\n\u2260 \u6545\u969c\u6062\u590d\u540e\u4e1a\u52a1\u7ed3\u679c\u8fde\u7eed<\/p>\n<p>\u5b8c\u6574 Changelog \u7684\u9009\u62e9\u548c\u4ee3\u4ef7\u4f1a\u5728\u7cfb\u5217\u7b2c 03 \u7bc7\u5355\u72ec\u5c55\u5f00\u3002\u672c\u7bc7\u53ea\u4fdd\u7559\u8fb9\u754c&#xff1a;\u8868\u5185\u72b6\u6001\u6b63\u786e\u4e0d\u80fd\u66ff\u4e0b\u6e38\u8ba1\u7b97\u6b63\u786e\u4f5c\u8bc1\u3002<\/p>\n<h3>Paimon \u503c\u5f97\u8fdb\u5165\u67b6\u6784\u7684\u4fe1\u53f7\u53ea\u6709\u4e09\u4e2a<\/h3>\n<p>\u7b2c\u4e00&#xff0c;\u540c\u4e00\u4efd\u6570\u636e\u65e2\u6709 Update\/Delete&#xff0c;\u53c8\u8981\u7559\u5728\u4f4e\u6210\u672c\u5171\u4eab\u5b58\u50a8\u4e2d\u3002\u7b2c\u4e8c&#xff0c;Flink \u9700\u8981\u6301\u7eed\u6d88\u8d39\u53d8\u5316&#xff0c;Spark \u6216\u5176\u4ed6\u5f15\u64ce\u53c8\u8981\u57fa\u4e8e\u540c\u4e00\u63d0\u4ea4\u70b9\u6279\u91cf\u91cd\u7b97\u3002\u7b2c\u4e09&#xff0c;\u56e2\u961f\u613f\u610f\u6cbb\u7406 Bucket\u3001Compaction\u3001Snapshot \u4fdd\u7559\u548c Changelog&#xff0c;\u800c\u4e0d\u662f\u628a\u5b83\u4eec\u5f53\u6210\u9ed8\u8ba4\u53c2\u6570\u3002<\/p>\n<p>\u4e0d\u6ee1\u8db3\u8fd9\u4e9b\u6761\u4ef6\u65f6&#xff0c;\u9009\u62e9\u5e94\u66f4\u7b80\u5355&#xff1a;<\/p>\n<ul>\n<li>\u53ea\u6709\u4e0d\u53ef\u53d8\u4e8b\u4ef6&#xff0c;\u4f18\u5148\u8bc4\u4f30 Append Table&#xff1b;<\/li>\n<li>\u53ea\u6709\u5728\u7ebf\u4e3b\u952e\u67e5\u8be2\u548c\u4e8b\u52a1\u5199\u5165&#xff0c;\u4fdd\u7559 OLTP \u6216\u670d\u52a1\u578b\u6570\u636e\u5e93&#xff1b;<\/li>\n<li>\u6307\u6807\u5b8c\u5168\u56fa\u5b9a\u4e14\u8981\u6c42\u6781\u4f4e\u8bfb\u5ef6\u8fdf&#xff0c;\u9884\u8ba1\u7b97\u548c\u7f13\u5b58\u53ef\u80fd\u66f4\u76f4\u63a5&#xff1b;<\/li>\n<li>\u65e0\u6cd5\u627f\u62c5 Compaction\u3001\u6587\u4ef6\u6570\u548c Snapshot \u751f\u547d\u5468\u671f\u6cbb\u7406&#xff0c;\u4e0d\u8981\u53ea\u56e0\u5b9e\u65f6\u6e56\u4ed3\u56db\u4e2a\u5b57\u5f15\u5165 Paimon\u3002<\/li>\n<\/ul>\n<p>Paimon \u66ff\u6389\u7684\u4e0d\u662f Flink\u3001Spark \u6216\u6570\u636e\u5e93&#xff0c;\u800c\u662f\u540c\u4e00\u4efd\u66f4\u65b0\u4e8b\u5b9e\u4e3a\u4e86\u6d41\u8ba1\u7b97\u3001\u6279\u91cf\u91cd\u7b97\u548c\u5386\u53f2\u5b58\u50a8\u88ab\u8feb\u7ef4\u62a4\u591a\u5957\u4e0d\u4e00\u81f4\u526f\u672c\u7684\u90a3\u90e8\u5206\u590d\u6742\u5ea6\u3002<\/p>\n<p>\u6587\u4ef6\u80fd\u88ab\u5f88\u591a\u5f15\u64ce\u8bfb\u53d6&#xff0c;\u53ea\u8bf4\u660e\u5b83\u8db3\u591f\u5f00\u653e&#xff1b;\u66f4\u65b0\u80fd\u5728\u540c\u4e00\u4e2a Snapshot \u5e8f\u5217\u91cc\u88ab\u63d0\u4ea4\u3001\u5408\u5e76\u3001\u91cd\u7b97\u548c\u7ee7\u7eed\u6d88\u8d39&#xff0c;\u624d\u662f Paimon \u771f\u6b63\u503c\u94b1\u7684\u5730\u65b9\u3002<\/p>\n<h3>\u9762\u8bd5\u8868\u8fbe\u4e3b\u7ebf<\/h3>\n<p>\u9762\u8bd5\u65f6\u4e0d\u8981\u505c\u5728\u201cPaimon \u652f\u6301\u6d41\u6279\u4e00\u4f53\u201d\u3002\u5148\u8bf4 Primary Key Table \u5982\u4f55\u5728 Bucket \u5185\u4ee5 LSM \u63a5\u6536\u66f4\u65b0&#xff0c;\u518d\u8bf4 Snapshot \u5982\u4f55\u5f62\u6210\u539f\u5b50\u53ef\u89c1\u8fb9\u754c&#xff0c;\u6700\u540e\u4e3b\u52a8\u8865\u4e0a Compaction\u3001Changelog \u4e0e\u5728\u7ebf\u70b9\u67e5\u4e0d\u662f\u514d\u8d39\u80fd\u529b\u3002\u8fd9\u6837\u56de\u7b54\u7684\u662f\u673a\u5236\u3001\u6536\u76ca\u4e0e\u4ee3\u4ef7&#xff0c;\u800c\u4e0d\u662f\u4ea7\u54c1\u53e3\u53f7\u3002<\/p>\n<h3>Java \u628a\u4e00\u6b21\u5199\u5165\u771f\u6b63\u63d0\u4ea4\u6210 Snapshot<\/h3>\n<p>\u4f9d\u8d56 paimon-flink-1.20:2.0.0&#xff0c;\u53c2\u6570\u4f20\u672c\u5730\u6216\u5bf9\u8c61\u5b58\u50a8 Warehouse\u3002\u7a0b\u5e8f\u7b49\u5f85 TableResult&#xff0c;\u5931\u8d25\u4f1a\u76f4\u63a5\u629b\u51fa&#xff0c;\u800c\u4e0d\u662f\u628a SQL \u5df2\u63d0\u4ea4\u5f53\u6210\u6570\u636e\u5df2\u53ef\u89c1\u3002<\/p>\n<p><span class=\"token keyword\">import<\/span> <span class=\"token import\"><span class=\"token namespace\">org<span class=\"token punctuation\">.<\/span>apache<span class=\"token punctuation\">.<\/span>flink<span class=\"token punctuation\">.<\/span>table<span class=\"token punctuation\">.<\/span>api<span class=\"token punctuation\">.<\/span><\/span><span class=\"token class-name\">EnvironmentSettings<\/span><\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">import<\/span> <span class=\"token import\"><span class=\"token namespace\">org<span class=\"token punctuation\">.<\/span>apache<span class=\"token punctuation\">.<\/span>flink<span class=\"token punctuation\">.<\/span>table<span class=\"token punctuation\">.<\/span>api<span class=\"token punctuation\">.<\/span><\/span><span class=\"token class-name\">TableEnvironment<\/span><\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">import<\/span> <span class=\"token import\"><span class=\"token namespace\">org<span class=\"token punctuation\">.<\/span>apache<span class=\"token punctuation\">.<\/span>flink<span class=\"token punctuation\">.<\/span>table<span class=\"token punctuation\">.<\/span>api<span class=\"token punctuation\">.<\/span><\/span><span class=\"token class-name\">TableResult<\/span><\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token keyword\">public<\/span> <span class=\"token keyword\">final<\/span> <span class=\"token keyword\">class<\/span> <span class=\"token class-name\">PaimonSnapshotWrite<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">public<\/span> <span class=\"token keyword\">static<\/span> <span class=\"token keyword\">void<\/span> <span class=\"token function\">main<\/span><span class=\"token punctuation\">(<\/span><span class=\"token class-name\">String<\/span><span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span> args<span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">throws<\/span> <span class=\"token class-name\">Exception<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>args<span class=\"token punctuation\">.<\/span>length <span class=\"token operator\">!&#061;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">throw<\/span> <span class=\"token keyword\">new<\/span> <span class=\"token class-name\">IllegalArgumentException<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;warehouse is required&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token class-name\">TableEnvironment<\/span> t <span class=\"token operator\">&#061;<\/span> <span class=\"token class-name\">TableEnvironment<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">create<\/span><span class=\"token punctuation\">(<\/span><br \/>\n                <span class=\"token class-name\">EnvironmentSettings<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">newInstance<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">inBatchMode<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">build<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        t<span class=\"token punctuation\">.<\/span><span class=\"token function\">executeSql<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;CREATE CATALOG p WITH (&#039;type&#039;&#061;&#039;paimon&#039;,&#039;warehouse&#039;&#061;&#039;&#034;<\/span> <span class=\"token operator\">&#043;<\/span> args<span class=\"token punctuation\">[<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&#043;<\/span> <span class=\"token string\">&#034;&#039;)&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        t<span class=\"token punctuation\">.<\/span><span class=\"token function\">executeSql<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;USE CATALOG p&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        t<span class=\"token punctuation\">.<\/span><span class=\"token function\">executeSql<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;CREATE DATABASE IF NOT EXISTS demo&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        t<span class=\"token punctuation\">.<\/span><span class=\"token function\">executeSql<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;CREATE TABLE IF NOT EXISTS demo.orders (id BIGINT, status STRING, ver BIGINT, &#034;<\/span><br \/>\n                <span class=\"token operator\">&#043;<\/span> <span class=\"token string\">&#034;PRIMARY KEY (id) NOT ENFORCED) WITH (&#039;bucket&#039;&#061;&#039;4&#039;,&#039;sequence.field&#039;&#061;&#039;ver&#039;)&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token class-name\">TableResult<\/span> write <span class=\"token operator\">&#061;<\/span> t<span class=\"token punctuation\">.<\/span><span class=\"token function\">executeSql<\/span><span class=\"token punctuation\">(<\/span><br \/>\n                <span class=\"token string\">&#034;INSERT INTO demo.orders VALUES (1001,&#039;PAID&#039;,3),(1001,&#039;CANCELLED&#039;,2)&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        write<span class=\"token punctuation\">.<\/span><span class=\"token function\">await<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        t<span class=\"token punctuation\">.<\/span><span class=\"token function\">executeSql<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;SELECT * FROM demo.orders$snapshots ORDER BY snapshot_id&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>executeSql(INSERT) \u8fdb\u5165 Flink Sink&#xff0c;\u6700\u7ec8\u6cbf StoreSinkWrite \u2192 StoreCommitter \u2192 FileStoreCommitImpl \u2192 SnapshotCommit \u63d0\u4ea4&#xff1b;await() \u5f02\u5e38\u662f\u5199\u5165\u5931\u8d25\u4fe1\u53f7&#xff0c;$snapshots \u6709\u65b0\u884c\u624d\u8bc1\u660e\u5f62\u6210\u53ef\u89c1\u63d0\u4ea4\u3002\u8be5\u793a\u4f8b\u9a8c\u8bc1\u63d0\u4ea4\u4e0e\u4e71\u5e8f\u8bed\u4e49&#xff0c;\u4e0d\u4ee3\u8868\u751f\u4ea7\u541e\u5410\u3002<\/p>\n<p>Paimon \u4e0d\u662f\u666e\u901a Parquet \u76ee\u5f55\u52a0\u5143\u6570\u636e\u3002Primary Key Table \u5728 Bucket \u5185\u7528 LSM \u628a\u968f\u673a\u66f4\u65b0\u8f6c\u6210\u6709\u5e8f\u8ffd\u52a0&#xff0c;\u7531 Merge Engine \u5f97\u5230\u5f53\u524d\u72b6\u6001&#xff0c;\u518d\u901a\u8fc7\u539f\u5b50 Snapshot \u7edf\u4e00\u6279\u8bfb\u4e0e\u6d41\u8bfb\u8fb9\u754c\u3002\u4ee3\u4ef7\u662f Compaction\u3001Bucket\u3001Changelog \u548c Snapshot \u751f\u547d\u5468\u671f\u5fc5\u987b\u6cbb\u7406&#xff0c;\u5b83\u4e5f\u4e0d\u66ff\u4ee3 OLTP \u4e0e\u5728\u7ebf\u67e5\u8be2\u6570\u636e\u5e93\u3002<\/p>\n<h3>\u5b98\u65b9\u8d44\u6599<\/h3>\n<ul>\n<li>Apache Paimon 2.0 Documentation<\/li>\n<li>Primary Key Table<\/li>\n<li>Append Table<\/li>\n<li>Table Mode<\/li>\n<li>Sequence Field and RowKind<\/li>\n<li>Snapshot Specification<\/li>\n<li>System Tables<\/li>\n<li>Apache Paimon release-2.0.0<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u8ba2\u5355 CDC \u5df2\u7ecf\u843d\u5230\u5bf9\u8c61\u5b58\u50a8&#xff0c;Spark \u4e5f\u80fd\u67e5\u3002\u4e1a\u52a1\u7b2c\u4e8c\u5929\u8981\u770b\u8ba2\u5355\u5f53\u524d\u72b6\u6001&#xff0c;\u56e2\u961f\u624d\u53d1\u73b0\u540c\u4e00\u4e2a order_id \u6709\u5341\u51e0\u4e2a\u7248\u672c&#xff1a;CREATED\u3001PAID\u3001CANCELLED \u5168\u5728&#xff0c;\u54ea\u4e00\u6761\u624d\u662f\u73b0\u5728&#xff0c;\u5f97\u7531\u6bcf\u6761 SQL \u4e34\u65f6\u5224\u65ad\u3002<br \/>\n\u628a\u6570\u636e\u5199\u6210 Parquet \u4e0d\u96be&#xff0c;\u7ed9\u6587\u4ef6\u8865\u4e0a Schema\u3001\u5206\u533a\u548c Snapshot \u4e5f\u4e0d\u96be\u3002\u771f\u6b63\u96be\u7684\u662f&#xff1a;\u4e0d\u628a\u5bf9\u8c61\u5b58\u50a8\u6539\u9020\u6210\u6570\u636e\u5e93&#xff0c;\u4ecd\u80fd\u6301<\/p>\n","protected":false},"author":2,"featured_media":101744,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[11623,331,664,323,176],"topic":[],"class_list":["post-101745","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-paimon","tag-apache","tag-664","tag-323","tag-176"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Apache Paimon \u5b9e\u65f6\u6e56\u4ed3\u5b9e\u6218\uff08\u7b2c 1 \u7bc7\uff09\uff1a\u522b\u518d\u8bf4 Paimon \u53ea\u662f\u8868\u683c\u5f0f\uff0c\u771f\u6b63\u503c\u94b1\u7684\u662f\u8ba9\u66f4\u65b0\u8fdb\u5165\u6570\u636e\u6e56 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/101745.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Apache Paimon \u5b9e\u65f6\u6e56\u4ed3\u5b9e\u6218\uff08\u7b2c 1 \u7bc7\uff09\uff1a\u522b\u518d\u8bf4 Paimon \u53ea\u662f\u8868\u683c\u5f0f\uff0c\u771f\u6b63\u503c\u94b1\u7684\u662f\u8ba9\u66f4\u65b0\u8fdb\u5165\u6570\u636e\u6e56 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u8ba2\u5355 CDC \u5df2\u7ecf\u843d\u5230\u5bf9\u8c61\u5b58\u50a8&#xff0c;Spark \u4e5f\u80fd\u67e5\u3002\u4e1a\u52a1\u7b2c\u4e8c\u5929\u8981\u770b\u8ba2\u5355\u5f53\u524d\u72b6\u6001&#xff0c;\u56e2\u961f\u624d\u53d1\u73b0\u540c\u4e00\u4e2a order_id \u6709\u5341\u51e0\u4e2a\u7248\u672c&#xff1a;CREATED\u3001PAID\u3001CANCELLED \u5168\u5728&#xff0c;\u54ea\u4e00\u6761\u624d\u662f\u73b0\u5728&#xff0c;\u5f97\u7531\u6bcf\u6761 SQL \u4e34\u65f6\u5224\u65ad\u3002 \u628a\u6570\u636e\u5199\u6210 Parquet \u4e0d\u96be&#xff0c;\u7ed9\u6587\u4ef6\u8865\u4e0a Schema\u3001\u5206\u533a\u548c Snapshot \u4e5f\u4e0d\u96be\u3002\u771f\u6b63\u96be\u7684\u662f&#xff1a;\u4e0d\u628a\u5bf9\u8c61\u5b58\u50a8\u6539\u9020\u6210\u6570\u636e\u5e93&#xff0c;\u4ecd\u80fd\u6301\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/101745.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-07T05:09:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260907050938-6a9e4712c0c80.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/101745.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/101745.html\",\"name\":\"Apache Paimon \u5b9e\u65f6\u6e56\u4ed3\u5b9e\u6218\uff08\u7b2c 1 \u7bc7\uff09\uff1a\u522b\u518d\u8bf4 Paimon \u53ea\u662f\u8868\u683c\u5f0f\uff0c\u771f\u6b63\u503c\u94b1\u7684\u662f\u8ba9\u66f4\u65b0\u8fdb\u5165\u6570\u636e\u6e56 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-07T05:09:41+00:00\",\"dateModified\":\"2026-09-07T05:09:41+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/101745.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/101745.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/101745.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Apache Paimon \u5b9e\u65f6\u6e56\u4ed3\u5b9e\u6218\uff08\u7b2c 1 \u7bc7\uff09\uff1a\u522b\u518d\u8bf4 Paimon \u53ea\u662f\u8868\u683c\u5f0f\uff0c\u771f\u6b63\u503c\u94b1\u7684\u662f\u8ba9\u66f4\u65b0\u8fdb\u5165\u6570\u636e\u6e56\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Apache Paimon \u5b9e\u65f6\u6e56\u4ed3\u5b9e\u6218\uff08\u7b2c 1 \u7bc7\uff09\uff1a\u522b\u518d\u8bf4 Paimon \u53ea\u662f\u8868\u683c\u5f0f\uff0c\u771f\u6b63\u503c\u94b1\u7684\u662f\u8ba9\u66f4\u65b0\u8fdb\u5165\u6570\u636e\u6e56 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/101745.html","og_locale":"zh_CN","og_type":"article","og_title":"Apache Paimon \u5b9e\u65f6\u6e56\u4ed3\u5b9e\u6218\uff08\u7b2c 1 \u7bc7\uff09\uff1a\u522b\u518d\u8bf4 Paimon \u53ea\u662f\u8868\u683c\u5f0f\uff0c\u771f\u6b63\u503c\u94b1\u7684\u662f\u8ba9\u66f4\u65b0\u8fdb\u5165\u6570\u636e\u6e56 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u8ba2\u5355 CDC \u5df2\u7ecf\u843d\u5230\u5bf9\u8c61\u5b58\u50a8&#xff0c;Spark \u4e5f\u80fd\u67e5\u3002\u4e1a\u52a1\u7b2c\u4e8c\u5929\u8981\u770b\u8ba2\u5355\u5f53\u524d\u72b6\u6001&#xff0c;\u56e2\u961f\u624d\u53d1\u73b0\u540c\u4e00\u4e2a order_id \u6709\u5341\u51e0\u4e2a\u7248\u672c&#xff1a;CREATED\u3001PAID\u3001CANCELLED \u5168\u5728&#xff0c;\u54ea\u4e00\u6761\u624d\u662f\u73b0\u5728&#xff0c;\u5f97\u7531\u6bcf\u6761 SQL \u4e34\u65f6\u5224\u65ad\u3002 \u628a\u6570\u636e\u5199\u6210 Parquet \u4e0d\u96be&#xff0c;\u7ed9\u6587\u4ef6\u8865\u4e0a Schema\u3001\u5206\u533a\u548c Snapshot \u4e5f\u4e0d\u96be\u3002\u771f\u6b63\u96be\u7684\u662f&#xff1a;\u4e0d\u628a\u5bf9\u8c61\u5b58\u50a8\u6539\u9020\u6210\u6570\u636e\u5e93&#xff0c;\u4ecd\u80fd\u6301","og_url":"https:\/\/www.wsisp.com\/helps\/101745.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-07T05:09:41+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260907050938-6a9e4712c0c80.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/101745.html","url":"https:\/\/www.wsisp.com\/helps\/101745.html","name":"Apache Paimon \u5b9e\u65f6\u6e56\u4ed3\u5b9e\u6218\uff08\u7b2c 1 \u7bc7\uff09\uff1a\u522b\u518d\u8bf4 Paimon \u53ea\u662f\u8868\u683c\u5f0f\uff0c\u771f\u6b63\u503c\u94b1\u7684\u662f\u8ba9\u66f4\u65b0\u8fdb\u5165\u6570\u636e\u6e56 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-07T05:09:41+00:00","dateModified":"2026-09-07T05:09:41+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/101745.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/101745.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/101745.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Apache Paimon \u5b9e\u65f6\u6e56\u4ed3\u5b9e\u6218\uff08\u7b2c 1 \u7bc7\uff09\uff1a\u522b\u518d\u8bf4 Paimon \u53ea\u662f\u8868\u683c\u5f0f\uff0c\u771f\u6b63\u503c\u94b1\u7684\u662f\u8ba9\u66f4\u65b0\u8fdb\u5165\u6570\u636e\u6e56"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/101745","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=101745"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/101745\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/101744"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=101745"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=101745"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=101745"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=101745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}