congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
AvroUtils$SchemaPairCompatibility
Code IndexAdd Tabnine to your IDE (free)

How to use
AvroUtils$SchemaPairCompatibility
in
com.moz.fiji.schema.util

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

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

return new SchemaPairCompatibility(
  compatibility,
  reader,
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;
}
origin: com.moz.fiji.schema/fiji-schema

/**
 * Constructs a new instance.
 *
 * @param causes identifying the compatibilities of each schema pair.
 */
public SchemaSetCompatibility(List<SchemaPairCompatibility> causes) {
 SchemaCompatibilityType isCompatible = SchemaCompatibilityType.COMPATIBLE;
 for (SchemaPairCompatibility compatibility : causes) {
  if (compatibility.getType() == SchemaCompatibilityType.INCOMPATIBLE) {
   isCompatible = SchemaCompatibilityType.INCOMPATIBLE;
   break;
  }
 }
 mType = isCompatible;
 mCauses = causes;
}
com.moz.fiji.schema.utilAvroUtils$SchemaPairCompatibility

Javadoc

Provides information about the compatibility of a single reader and writer schema pair. Note: This class represents a one-way relationship from the reader to the writer schema.

Most used methods

  • <init>
    Constructs a new instance.
  • getReader
    Gets the reader schema that was validated.
  • getType
    Gets the type of this result.
  • getWriter
    Gets the writer schema that was validated.

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setRequestProperty (URLConnection)
  • requestLocationUpdates (LocationManager)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • JFileChooser (javax.swing)
  • JOptionPane (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • From CI to AI: The AI layer in your organization
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