From commits-return-23958-archive-asf-public=cust-asf.ponee.io@pulsar.apache.org Wed Mar 6 09:34:29 2019 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 [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 4BFDB180656 for ; Wed, 6 Mar 2019 10:34:28 +0100 (CET) Received: (qmail 96886 invoked by uid 500); 6 Mar 2019 09:34:27 -0000 Mailing-List: contact commits-help@pulsar.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pulsar.apache.org Delivered-To: mailing list commits@pulsar.apache.org Received: (qmail 96877 invoked by uid 99); 6 Mar 2019 09:34:27 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Mar 2019 09:34:27 +0000 From: GitBox To: commits@pulsar.apache.org Subject: [GitHub] [pulsar] sijie opened a new pull request #3766: Support passing schema definition for JSON and AVRO schemas Message-ID: <155186486655.10850.17418505565384801947.gitbox@gitbox.apache.org> Date: Wed, 06 Mar 2019 09:34:26 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit sijie opened a new pull request #3766: Support passing schema definition for JSON and AVRO schemas URL: https://github.com/apache/pulsar/pull/3766 *Motivation* Currently AVRO and Schema generated schemas from POJO directly. Sometime people would like to use pre-generated/defined schemas, so allow passing in schema definitions would clear the confusions on parsing schemas from POJO. *Modifications* - Abstract a common base class `StructSchema` for AVRO/PROTOBUF/JSON - Standarize on using avro schema for defining schema (we already did that. this change only makes it clearer) - Add methods to pass schema definition for JSON and AVRO schemas *NOTES* We don't support passing schema definition for PROTOBUF. since we only supported generated messages as POJO class for protobuf schema, and we generate schema definition from the generated messages. it doesn't make sense to pass in a different schema definition. *Related Issues*: #3752 #3741 ### Does this pull request potentially affect one of the following parts: *If `yes` was chosen, please highlight the changes* - Dependencies (does it add or upgrade a dependency): (no) - The public API: (*yes*) - The schema: (*yes*) - The default values of configurations: (no) - The wire protocol: (no) - The rest endpoints: (no) - The admin cli options: (no) - Anything that affects deployment: (no) ### Documentation - Does this pull request introduce a new feature? (no) - If yes, how is the feature documented? (not applicable) - If a feature is not applicable for documentation, explain why? - If a feature is not documented yet in this PR, please create a followup issue for adding the documentation ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services