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

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

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

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

/**
 * Reports the compatibility of a reader/writer schema pair.
 *
 * <p> Memoizes the compatibility results. </p>
 *
 * @param reader Reader schema to test.
 * @param writer Writer schema to test.
 * @return the compatibility of the reader/writer schema pair.
 */
public SchemaCompatibilityType getCompatibility(
  final Schema reader,
  final Schema writer
) {
 LOG.debug("Checking compatibility of reader {} with writer {}", reader, writer);
 final ReaderWriter pair = new ReaderWriter(reader, writer);
 final SchemaCompatibilityType existing = mMemoizeMap.get(pair);
 if (existing != null) {
  if (existing == SchemaCompatibilityType.RECURSION_IN_PROGRESS) {
   // Break the recursion here.
   // schemas are compatible unless proven incompatible:
   return SchemaCompatibilityType.COMPATIBLE;
  }
  return existing;
 }
 // Mark this reader/writer pair as "in progress":
 mMemoizeMap.put(pair, SchemaCompatibilityType.RECURSION_IN_PROGRESS);
 final SchemaCompatibilityType calculated = calculateCompatibility(reader, writer);
 mMemoizeMap.put(pair, calculated);
 return calculated;
}
origin: com.moz.fiji.schema/fiji-schema

 return getCompatibility(reader.getElementType(), writer.getElementType());
 return getCompatibility(reader.getValueType(), writer.getValueType());
   if (getCompatibility(readerField.schema(), writerField.schema())
     == SchemaCompatibilityType.INCOMPATIBLE) {
    return SchemaCompatibilityType.INCOMPATIBLE;
  if (getCompatibility(reader, writerBranch) == SchemaCompatibilityType.INCOMPATIBLE) {
   return SchemaCompatibilityType.INCOMPATIBLE;
return getCompatibility(reader, writer.getTypes().get(0));
case UNION: {
 for (final Schema readerBranch : reader.getTypes()) {
  if (getCompatibility(readerBranch, writer) == SchemaCompatibilityType.COMPATIBLE) {
   return SchemaCompatibilityType.COMPATIBLE;
origin: com.moz.fiji.schema/fiji-schema

) {
 final SchemaCompatibilityType compatibility =
   new ReaderWriterCompatiblityChecker()
     .getCompatibility(reader, writer);
com.moz.fiji.schema.utilAvroUtils$ReaderWriterCompatiblityChecker

Javadoc

Determines the compatibility of a reader/writer schema pair.

Provides memoization to handle recursive schemas.

Most used methods

  • <init>
  • calculateCompatibility
    Calculates the compatibility of a reader/writer schema pair. Relies on external memoization performe
  • getCompatibility
    Reports the compatibility of a reader/writer schema pair. Memoizes the compatibility results.

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSharedPreferences (Context)
  • getSystemService (Context)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Permission (java.security)
    Legacy security code; do not use.
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Top plugins for Android Studio
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