Package com.linkedin.data.schema.compatibility

Examples of com.linkedin.data.schema.compatibility.CompatibilityResult


    try
    {
      final DataSchema prevSchema = RestSpecCodec.textToSchema(prevType, _prevSchemaResolver);
      final DataSchema currSchema = RestSpecCodec.textToSchema(currType, _currSchemaResolver);

      CompatibilityResult compatibilityResult = CompatibilityChecker.checkCompatibility(prevSchema,
                                                                                        currSchema,
                                                                                        defaultOptions);

      if (!compatibilityResult.getMessages().isEmpty())
      {
        if (prevType.equals(currType) && prevSchema instanceof NamedDataSchema)
        {
          if (!_namedSchemasChecked.contains(prevType))
          {
            addNamedCompatibilityMessages(compatibilityResult.getMessages());
            _namedSchemasChecked.add(prevType);

          }
          return compatibilityResult.isError();
        }
        addCompatibilityMessages(pathTail, compatibilityResult.getMessages());
        return compatibilityResult.isError();
      }

      return true;
    }
    catch (IllegalArgumentException e)
View Full Code Here


    assertNotNull(olderSchema, olderSchemaText);
    assertNotNull(newerSchema, newerSchemaText);

    for (CompatibilityOptions option : compatibilityOptions)
    {
      CompatibilityResult result = CompatibilityChecker.checkCompatibility(olderSchema, newerSchema, option);
      String messageText = result.getMessages().toString();

      if (_debug) out.println(result);

      assertEquals(result.isError(), hasError, olderSchemaText + "\n" + newerSchemaText + "\n" + messageText);
      for (int i = expectedIndex; i < expected.length; i++)
      {
        String expectedText = ".*" + expected[i] + "\n.*";
        if (_debug) out.println(expectedText);
        Pattern pattern = Pattern.compile(expectedText, Pattern.DOTALL);
View Full Code Here

TOP

Related Classes of com.linkedin.data.schema.compatibility.CompatibilityResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.