Return-Path: X-Original-To: apmail-avro-dev-archive@www.apache.org Delivered-To: apmail-avro-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E610917BBB for ; Tue, 7 Apr 2015 18:43:12 +0000 (UTC) Received: (qmail 11812 invoked by uid 500); 7 Apr 2015 18:43:12 -0000 Delivered-To: apmail-avro-dev-archive@avro.apache.org Received: (qmail 11750 invoked by uid 500); 7 Apr 2015 18:43:12 -0000 Mailing-List: contact dev-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@avro.apache.org Delivered-To: mailing list dev@avro.apache.org Received: (qmail 11739 invoked by uid 99); 7 Apr 2015 18:43:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Apr 2015 18:43:12 +0000 Date: Tue, 7 Apr 2015 18:43:12 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@avro.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AVRO-1649) SchemaCompatability should be more descriptive when schemas are incompatible MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AVRO-1649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14483754#comment-14483754 ] ASF GitHub Bot commented on AVRO-1649: -------------------------------------- GitHub user kurtharriger opened a pull request: https://github.com/apache/avro/pull/33 AVRO-1649 - More informative messages for schema compatibility checks This PR attempts to move forward the the PR originally submitted by @bcotton https://github.com/apache/avro/pull/24 The previous PR introduced changes to enum that may have caused backward compatibility changes. I initially attempted the proposed resolution of creating and caching the SchemaPairCompatibility objects in calculateCompatibility, but this resulted in SchemaPairCompatibilty objects from leaf nodes being returned in the case of recursion (e.g. line 285 https://github.com/apache/avro/compare/trunk...kurtharriger:AVRO-1649?expand=1#diff-21a81984a51d0e95d688360b526f0b04R285) and on updating the tests found the resulting error messages confusing without more context. In some cases just recreating a new SchemaPairCompatibility would work, but this became messy and more difficult to test. I decided instead to create a new enum SchemaCompatibilityResult based on @bcotton's the private methods now use this more informative enum and a new method getCompatibilityResult and deprecating getCompatibility which now maps from SchemaCompatibilityResult to SchemaCompatibility. The static helper method now uses the new method to return SchemaPairCompatibity objects with the new more informative descriptions. You can merge this pull request into a Git repository by running: $ git pull https://github.com/kurtharriger/avro AVRO-1649 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/avro/pull/33.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #33 ---- commit 1aa7f688bbec3cebbde345ed4ddc028a013dd278 Author: Bob Cotton Date: 2015-03-11T20:06:37Z AVRO-1649: Teach SchemaCompatability to be more descriptive with failing compatibility checks. Also adds enums to SchemaCompatability.SchemaCompatibilityType for the various compatability checks. commit e2c324c5d4bfb07cebf5ec7cd9084ea1832bc9c7 Author: Kurt Harriger Date: 2015-04-07T17:49:47Z AVRO-1649: Revert prior changes commit 70495bbbb301fc0d2c4ca6a00952b165b7fd311f Author: Kurt Harriger Date: 2015-04-07T18:02:16Z AVRO-1649: Add SchemaCompatibilityResult Modify private methods without breaking backward compatibility commit f3abb7cb8f3c92aa767e722eedd49bf99fb2cdf3 Author: Kurt Harriger Date: 2015-04-07T18:06:12Z AVRO-1649: Return more informative description Return SchemaPairCompatibility with a more informative incompatibility description ---- > SchemaCompatability should be more descriptive when schemas are incompatible > ---------------------------------------------------------------------------- > > Key: AVRO-1649 > URL: https://issues.apache.org/jira/browse/AVRO-1649 > Project: Avro > Issue Type: Improvement > Components: java > Affects Versions: 1.7.7 > Reporter: Bob Cotton > Priority: Minor > > When resolving schema incompatibilities it would be nice to have a more descriptive error message when schemas are not compatible. -- This message was sent by Atlassian JIRA (v6.3.4#6332)