From commits-return-11971-archive-asf-public=cust-asf.ponee.io@hudi.apache.org Sun Feb 23 18:36:03 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id E840E180652 for ; Sun, 23 Feb 2020 19:36:02 +0100 (CET) Received: (qmail 35932 invoked by uid 500); 23 Feb 2020 18:36:02 -0000 Mailing-List: contact commits-help@hudi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hudi.apache.org Delivered-To: mailing list commits@hudi.apache.org Received: (qmail 35923 invoked by uid 99); 23 Feb 2020 18:36:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Feb 2020 18:36:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 9CCD4E103B for ; Sun, 23 Feb 2020 18:36:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 430CD7808F4 for ; Sun, 23 Feb 2020 18:36:00 +0000 (UTC) Date: Sun, 23 Feb 2020 18:36:00 +0000 (UTC) From: "Yixue (Andrew) Zhu (Jira)" To: commits@hudi.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (HUDI-603) HoodieDeltaStreamer should periodically fetch table schema update MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HUDI-603?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D170430= 16#comment-17043016 ]=20 Yixue (Andrew) Zhu edited comment on HUDI-603 at 2/23/20 6:35 PM: ------------------------------------------------------------------ I am still working on reading Hudi code base, but I think one possible appr= oach would work: # A SchemaProvider derived class can be introduced to retrieve latest Sche= ma if needed, from Confluence Schema registry.=C2=A0 # Enhance=C2=A0class=C2=A0AvroSource or Source derived class=C2=A0to recor= d Avro schema id for serialization, as used by Confluence Schema registry. = When deserialized for compaction, translate to refreshed schema (shortcut i= f schema ids match), snapshot by HoodieWriteHandle (or derived) class, from= =C2=A0SchemaProvider. # Custom serializer for GenericRecord can be registered in Spark, to use s= chema id. was (Author: yx3zhu@gmail.com): I am still working on reading Hudi code base, but I think one possible appr= oach would work: # A SchemaProvider derived class can be introduced to retrieve latest Sche= ma if needed, from Confluence Schema registry.=C2=A0 # Enhance=C2=A0class=C2=A0AvroSource or Source derived class=C2=A0to recor= d Avro schema id for serialization, as used by Confluence Schema registry. = When deserialized for compaction, translate to refreshed schema (shortcut i= f schema ids match). # Custom serializer for GenericRecord can be registered in Spark, to use s= chema id. > HoodieDeltaStreamer should periodically fetch table schema update > ----------------------------------------------------------------- > > Key: HUDI-603 > URL: https://issues.apache.org/jira/browse/HUDI-603 > Project: Apache Hudi (incubating) > Issue Type: Bug > Components: DeltaStreamer > Reporter: Yixue Zhu > Priority: Major > Labels: evolution, schema > > HoodieDeltaStreamer create=C2=A0SchemaProvider instance and delegate to D= eltaSync for periodical sync. However, default implementation of SchemaProv= ider does not refresh schema, which can change due to schema evolution. Del= taSync=C2=A0snapshot the schema when it creates writeClient, using the Sche= maProvider instance or pick up from source, and the schema for writeClient = is not refreshed during the loop of Sync. > I think this needs to be addressed to support schema evolution fully. -- This message was sent by Atlassian Jira (v8.3.4#803005)