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

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

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

origin: hortonworks/registry

@Override
public CompatibilityResult checkForCompatibility(SchemaMetadata schemaMetadata,
                         String toSchemaText,
                         String existingSchemaText) {
  return checkCompatibility(schemaMetadata.getType(), toSchemaText, existingSchemaText, schemaMetadata.getCompatibility());
}
origin: hortonworks/registry

public SchemaVersionInfo getSchemaVersionInfo(String schemaName,
                       String schemaText) throws SchemaNotFoundException, InvalidSchemaException, SchemaBranchNotFoundException {
  SchemaMetadataInfo schemaMetadataInfo = getSchemaMetadataInfo(schemaName);
  if (schemaMetadataInfo == null) {
    throw new SchemaNotFoundException("No schema found for schema metadata key: " + schemaName);
  }
  return findSchemaVersion(SchemaBranch.MASTER_BRANCH, schemaMetadataInfo.getSchemaMetadata()
                                      .getType(), schemaText, schemaName);
}
origin: com.hortonworks.registries/schema-registry-webservice

schemaMetadata.trim();
checkValueAsNullOrEmpty("Schema name", schemaMetadata.getName());
checkValueAsNullOrEmpty("Schema type", schemaMetadata.getType());
checkValidNames(schemaMetadata.getName());
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: hortonworks/registry

schemaMetadata.trim();
checkValueAsNullOrEmpty("Schema name", schemaMetadata.getName());
checkValueAsNullOrEmpty("Schema type", schemaMetadata.getType());
checkValidNames(schemaMetadata.getName());
origin: hortonworks/registry

public Long addSchemaMetadata(SchemaMetadata schemaMetadata,
               boolean throwErrorIfExists) throws UnsupportedSchemaTypeException {
  SchemaMetadataStorable givenSchemaMetadataStorable = SchemaMetadataStorable.fromSchemaMetadataInfo(new SchemaMetadataInfo(schemaMetadata));
  String type = schemaMetadata.getType();
  if (schemaTypeWithProviders.get(type) == null) {
    throw new UnsupportedSchemaTypeException("Given schema type " + type + " not supported");
  }
  if (!throwErrorIfExists) {
    Storable schemaMetadataStorable = storageManager.get(givenSchemaMetadataStorable.getStorableKey());
    if (schemaMetadataStorable != null) {
      return schemaMetadataStorable.getId();
    }
  }
  final Long nextId = storageManager.nextId(givenSchemaMetadataStorable.getNameSpace());
  givenSchemaMetadataStorable.setId(nextId);
  givenSchemaMetadataStorable.setTimestamp(System.currentTimeMillis());
  storageManager.add(givenSchemaMetadataStorable);
  // Add a schema branch for this metadata
  SchemaBranchStorable schemaBranchStorable = new SchemaBranchStorable(SchemaBranch.MASTER_BRANCH, schemaMetadata.getName(), String.format(SchemaBranch.MASTER_BRANCH_DESC, schemaMetadata.getName()), System.currentTimeMillis());
  schemaBranchStorable.setId(storageManager.nextId(SchemaBranchStorable.NAME_SPACE));
  storageManager.add(schemaBranchStorable);
  storageManager.add(new SchemaLockStorable(givenSchemaMetadataStorable.getNameSpace(), givenSchemaMetadataStorable.getName(), System.currentTimeMillis()));
  return givenSchemaMetadataStorable.getId();
}
origin: hortonworks/registry

SchemaVersionInfo latestSchemaVersionInfo = getLatestEnabledSchemaVersionInfo(schemaBranchName, schemaName);
if (latestSchemaVersionInfo != null) {
  compatibilityResult = checkCompatibility(schemaMetadata.getType(),
                       toSchema,
                       latestSchemaVersionInfo.getSchemaText(),
for (SchemaVersionInfo schemaVersionInfo : schemaVersionInfos) {
  if (SchemaVersionLifecycleStates.ENABLED.getId().equals(schemaVersionInfo.getStateId())) {
    compatibilityResult = checkCompatibility(schemaMetadata.getType(),
                         toSchema,
                         schemaVersionInfo.getSchemaText(),
origin: hortonworks/registry

SchemaVersionInfo existingSchemaVersionInfo = findSchemaVersion(SchemaBranch.MASTER_BRANCH,
                                schemaMetadataInfo.getSchemaMetadata()
                                         .getType(),
                                schemaVersionInfo.getSchemaText(),
                                schemaMetadataInfo.getSchemaMetadata()
origin: hortonworks/registry

public SchemaIdVersion addSchemaVersion(String schemaBranchName,
                    SchemaMetadataInfo schemaMetadataInfo,
                    SchemaVersion schemaVersion)
    throws SchemaNotFoundException, IncompatibleSchemaException, InvalidSchemaException, SchemaBranchNotFoundException {
  Preconditions.checkNotNull(schemaBranchName, "Schema branch name can't be null");
  checkSchemaText(schemaVersion.getSchemaText());
  SchemaVersionInfo schemaVersionInfo;
  // check whether there exists schema-metadata for schema-metadata-key
  SchemaMetadata schemaMetadata = schemaMetadataInfo.getSchemaMetadata();
  // check whether the same schema text exists
  schemaVersionInfo = findSchemaVersion(schemaBranchName, schemaMetadata.getType(), schemaVersion.getSchemaText(), schemaMetadataInfo
      .getSchemaMetadata().getName());
  if (schemaVersionInfo == null) {
    schemaVersionInfo = createSchemaVersion(schemaBranchName,
                        schemaMetadata,
                        schemaMetadataInfo.getId(),
                        schemaVersion);
  }
  return new SchemaIdVersion(schemaMetadataInfo.getId(), schemaVersionInfo.getVersion(), schemaVersionInfo.getId());
}
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

Preconditions.checkNotNull(schemaMetadataId, "schemaMetadataId must not be null");
String type = schemaMetadata.getType();
if (getSchemaProvider(type) == null) {
  throw new UnsupportedSchemaTypeException("Given schema type " + type + " not supported");
com.hortonworks.registries.schemaregistrySchemaMetadatagetType

Popular methods of SchemaMetadata

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

Popular in Java

  • Reading from database using SQL prepared statement
  • startActivity (Activity)
  • addToBackStack (FragmentTransaction)
  • getContentResolver (Context)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • 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