Tabnine Logo
AvroUtils$SchemaSetCompatibility.getType
Code IndexAdd Tabnine to your IDE (free)

How to use
getType
method
in
com.moz.fiji.schema.util.AvroUtils$SchemaSetCompatibility

Best Java code snippets using com.moz.fiji.schema.util.AvroUtils$SchemaSetCompatibility.getType (Showing top 1 results out of 315)

origin: com.moz.fiji.schema/fiji-schema

/**
 * Validates each of a set of reader schemas against each of a set of writer schemas.
 *
 * @param readerSchemas the set of reader schemas to validate.
 * @param writerSchemas the set of writer schemas to validate.
 * @return a list of error messages corresponding to each invalid combination of a reader and
 *     writer schema.  Returns an empty list if all reader and writers schemas are compatible.
 */
private static List<String> validateReaderWriterSchemas(
  List<Schema> readerSchemas,
  List<Schema> writerSchemas) {
 final List<String> incompatabilityMessages = Lists.newArrayList();
 for (Schema readerSchema : readerSchemas) {
  // Check that each reader schema can read records written by all writer schemas.
  final SchemaSetCompatibility compat =
    AvroUtils.checkReaderCompatibility(readerSchema, writerSchemas.iterator());
  if (compat.getType() == SchemaCompatibilityType.INCOMPATIBLE) {
   for (SchemaPairCompatibility pairCompat : compat.getCauses()) {
    if (pairCompat.getType() == SchemaCompatibilityType.INCOMPATIBLE) {
     incompatabilityMessages.add(
       String.format("Reader schema: %s is incompatible with writer schema: %s.",
       pairCompat.getReader(), pairCompat.getWriter()));
    }
   }
  }
 }
 return incompatabilityMessages;
}
com.moz.fiji.schema.utilAvroUtils$SchemaSetCompatibilitygetType

Javadoc

Whether or not the schemas are compatible.

Popular methods of AvroUtils$SchemaSetCompatibility

  • <init>
    Constructs a new instance.
  • getCauses
    Returns the compatibility of each schema pair.

Popular in Java

  • Finding current android device location
  • putExtra (Intent)
  • notifyDataSetChanged (ArrayAdapter)
  • startActivity (Activity)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now