Tabnine Logo
SchemaMetadata.getValidationLevel
Code IndexAdd Tabnine to your IDE (free)

How to use
getValidationLevel
method
in
com.hortonworks.registries.schemaregistry.SchemaMetadata

Best Java code snippets using com.hortonworks.registries.schemaregistry.SchemaMetadata.getValidationLevel (Showing top 12 results out of 315)

origin: hortonworks/registry

@Override
public boolean equals(Object o) {
  if (this == o) return true;
  if (o == null || getClass() != o.getClass()) return false;
  SchemaMetadata that = (SchemaMetadata) o;
  if (evolve != that.evolve) return false;
  if (type != null ? !type.equals(that.type) : that.type != null) return false;
  if (schemaGroup != null ? !schemaGroup.equals(that.schemaGroup) : that.schemaGroup != null) return false;
  if (name != null ? !name.equals(that.name) : that.name != null) return false;
  if (description != null ? !description.equals(that.description) : that.description != null) return false;
  if (getValidationLevel() != null ? !getValidationLevel().equals(that.getValidationLevel())
                   : that.getValidationLevel() != null) return false;
  return getCompatibility() == that.getCompatibility();
}
origin: com.hortonworks.registries/schema-registry-common

@Override
public boolean equals(Object o) {
  if (this == o) return true;
  if (o == null || getClass() != o.getClass()) return false;
  SchemaMetadata that = (SchemaMetadata) o;
  if (evolve != that.evolve) return false;
  if (type != null ? !type.equals(that.type) : that.type != null) return false;
  if (schemaGroup != null ? !schemaGroup.equals(that.schemaGroup) : that.schemaGroup != null) return false;
  if (name != null ? !name.equals(that.name) : that.name != null) return false;
  if (description != null ? !description.equals(that.description) : that.description != null) return false;
  if (getValidationLevel() != null ? !getValidationLevel().equals(that.getValidationLevel())
                   : that.getValidationLevel() != null) return false;
  return getCompatibility() == that.getCompatibility();
}
origin: com.hortonworks.registries/schema-registry-common

@Override
public int hashCode() {
  int result = type != null ? type.hashCode() : 0;
  result = 31 * result + (schemaGroup != null ? schemaGroup.hashCode() : 0);
  result = 31 * result + (name != null ? name.hashCode() : 0);
  result = 31 * result + (description != null ? description.hashCode() : 0);
  result = 31 * result + (getCompatibility() != null ? getCompatibility().hashCode() : 0);
  result = 31 * result + (getValidationLevel() != null ? getValidationLevel().hashCode() : 0);
  result = 31 * result + (evolve ? 1 : 0);
  return result;
}
origin: hortonworks/registry

@Override
public int hashCode() {
  int result = type != null ? type.hashCode() : 0;
  result = 31 * result + (schemaGroup != null ? schemaGroup.hashCode() : 0);
  result = 31 * result + (name != null ? name.hashCode() : 0);
  result = 31 * result + (description != null ? description.hashCode() : 0);
  result = 31 * result + (getCompatibility() != null ? getCompatibility().hashCode() : 0);
  result = 31 * result + (getValidationLevel() != null ? getValidationLevel().hashCode() : 0);
  result = 31 * result + (evolve ? 1 : 0);
  return result;
}
origin: com.hortonworks.registries/schema-registry-common

public Builder(SchemaMetadata schemaMetadata) {
  name = schemaMetadata.getName();
  type = schemaMetadata.getType();
  schemaGroup = schemaMetadata.getSchemaGroup();
  description = schemaMetadata.getDescription();
  compatibility = schemaMetadata.getCompatibility();
  validationLevel = schemaMetadata.getValidationLevel();
  evolve = schemaMetadata.isEvolve();
}
origin: hortonworks/registry

public Builder(SchemaMetadata schemaMetadata) {
  name = schemaMetadata.getName();
  type = schemaMetadata.getType();
  schemaGroup = schemaMetadata.getSchemaGroup();
  description = schemaMetadata.getDescription();
  compatibility = schemaMetadata.getCompatibility();
  validationLevel = schemaMetadata.getValidationLevel();
  evolve = schemaMetadata.isEvolve();
}
origin: com.hortonworks.registries/schema-registry-common

SchemaMetadata schemaMetadata = schemaMetadataInfo.getSchemaMetadata();
String schemaName = schemaMetadata.getName();
SchemaValidationLevel validationLevel = schemaMetadata.getValidationLevel();
origin: hortonworks/registry

SchemaMetadata schemaMetadata = schemaMetadataInfo.getSchemaMetadata();
String schemaName = schemaMetadata.getName();
SchemaValidationLevel validationLevel = schemaMetadata.getValidationLevel();
origin: hortonworks/registry

public static SchemaMetadataStorable updateSchemaMetadata(SchemaMetadataStorable schemaMetadataStorable, SchemaMetadata schemaMetadata) {
  schemaMetadataStorable.setType(schemaMetadata.getType());
  schemaMetadataStorable.setSchemaGroup(schemaMetadata.getSchemaGroup());
  schemaMetadataStorable.setName(schemaMetadata.getName());
  schemaMetadataStorable.setDescription(schemaMetadata.getDescription());
  schemaMetadataStorable.setCompatibility(schemaMetadata.getCompatibility());
  schemaMetadataStorable.setValidationLevel(schemaMetadata.getValidationLevel());
  schemaMetadataStorable.setEvolve(schemaMetadata.isEvolve());
  return schemaMetadataStorable;
}
origin: hortonworks/registry

SchemaValidationLevel validationLevel = schemaMetadata.getValidationLevel();
CompatibilityResult compatibilityResult = null;
switch (validationLevel) {
origin: hortonworks/registry

.getValidationLevel());
origin: hortonworks/registry

@Test
public void testValidationLevels() throws Exception {
  SchemaMetadata schemaMetadata = createSchemaMetadata(TEST_NAME_RULE.getMethodName(), SchemaCompatibility.BOTH);
  String schemaName = schemaMetadata.getName();
  Long id = SCHEMA_REGISTRY_CLIENT.registerSchemaMetadata(schemaMetadata);
  SCHEMA_REGISTRY_CLIENT.addSchemaVersion(schemaName, new SchemaVersion(AvroSchemaRegistryClientUtil.getSchema("/schema-1.avsc"), "Initial version of the schema"));
  SCHEMA_REGISTRY_CLIENT.addSchemaVersion(schemaName, new SchemaVersion(AvroSchemaRegistryClientUtil.getSchema("/schema-2.avsc"), "Second version of the schema"));
  SCHEMA_REGISTRY_CLIENT.addSchemaVersion(schemaName, new SchemaVersion(AvroSchemaRegistryClientUtil.getSchema("/schema-3.avsc"), "Third version of the schema, removes name field"));
  try {
    SCHEMA_REGISTRY_CLIENT.addSchemaVersion(schemaName, new SchemaVersion(AvroSchemaRegistryClientUtil.getSchema("/schema-4.avsc"), "Forth version of the schema, adds back name field, but different type"));
    Assert.fail("Should throw IncompatibleSchemaException as check against all schema's would find name field is not compatible with v1 and v2");
  } catch (IncompatibleSchemaException ise) {
    //expected
  }
  SchemaMetadata currentSchemaMetadata = SCHEMA_REGISTRY_CLIENT.getSchemaMetadataInfo(schemaName)
                                 .getSchemaMetadata();
  SchemaMetadata schemaMetadataToUpdateTo = new SchemaMetadata.Builder(currentSchemaMetadata).validationLevel(SchemaValidationLevel.LATEST)
                                                .build();
  SchemaMetadataInfo updatedSchemaMetadata = SCHEMA_REGISTRY_CLIENT.updateSchemaMetadata(schemaName, schemaMetadataToUpdateTo);
  Assert.assertEquals(SchemaValidationLevel.LATEST, updatedSchemaMetadata.getSchemaMetadata()
                                      .getValidationLevel());
  try {
    SCHEMA_REGISTRY_CLIENT.addSchemaVersion(schemaName, new SchemaVersion(AvroSchemaRegistryClientUtil.getSchema("/schema-4.avsc"), "Forth version of the schema, adds back name field, but different type"));
  } catch (IncompatibleSchemaException ise) {
    Assert.fail("Should not throw IncompatibleSchemaException as check against only latest schema as such should ignore v1 and v2");
  }
}
com.hortonworks.registries.schemaregistrySchemaMetadatagetValidationLevel

Popular methods of SchemaMetadata

  • getName
  • getDescription
  • getType
  • getCompatibility
  • getSchemaGroup
  • isEvolve
  • <init>
  • equals
  • hashCode
  • toString
  • trim
  • trim

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setScale (BigDecimal)
  • getSystemService (Context)
  • findViewById (Activity)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • JButton (javax.swing)
  • JFileChooser (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
  • Top Vim plugins
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