Comments (5)
As per our discussion today, assigning this to you @junrao
from schema-registry.
To support Hadoop ETL, we need to add the following api to get the version from a schema string.
POST /subjects/<subject>
body is the schema string; return the version if the schema exists; otherwise 404 status.
However, it does feel weird that on the following similar api, we return the id and not the version.
POST /subjects/<subject>/versions
from schema-registry.
I found an issue with the compatibility API while updating the docs. Maybe we should check in the docs so they get updated as part of the same patch.
POST /compatibility/subjects/{subject}/versions/{version}
The compatibility API takes in a subject and version. And we discussed about supporting a special "latest" version to make it convenient to check compatibility against the latest version of the schema. However, this API now accepts version as a string, which is weird and inconsistent with all other APIs. I think supporting a special latest version indicator is useful, though it should be an integer.
There are 2 choices
- -1
- Int.MAX_VALUE.
Option 2 is intuitive but annoying to use. Option 1 is easy to use but a little confusing to reason about "latest" with a negative value.
@granders @junrao @ewencp Thoughts?
from schema-registry.
Users have to encode the whole url as a string anyway, so it doesn't seem totally crazy to have "latest" as an option.
If we do go with an integer, Won't Int.MAX_VALUE vary between languages? -1 seems better defined, though slightly weird. If we wanted to have some logical approach behind negative indices, they could be interpreted like they are in python lists (if i < 0 arr[i] gives arr[len(arr) + i])
from schema-registry.
@granders
Since version is an int, it seems odd that we describe it to be a string. Also, all other APIs that deal with either schema id and version still expect integers, except this particular one.
If we do go with an integer, Won't Int.MAX_VALUE vary between languages?
Sorry, should've been more specific. I just meant the highest possible value for an unsigned int (2^31 - 1), not necessarily Java's definition of it. But this number is just cumbersome to express is what I thought. So suggested -1 similar to the latest offset definition in kafka
from schema-registry.
Related Issues (20)
- Full Compatibility schema requiring old schema IDs for deserialisation. HOT 1
- CPU usage increase to 100% after update to 7.5.x HOT 2
- Incompatibility between kafka-avro-serializer 7.4 and 7.5? HOT 1
- org.apache.kafka.common.errors.NotLeaderOrFollowerException- Register schema operation failed while writing to the Kafka store
- Switch from swagger-annotations to swagger-annotations-jakarta HOT 1
- Lookup subject's schema metadata/version/etc. on different independent schema-registry hosts
- Avro Serializer - SerializationException when using logical type is decimal HOT 3
- Schema registry multiple instance issue (getting unrecognized token with error code 50005)
- Can not set up HTTPS listener with PEM certificate HOT 2
- Propery "value.converter.ignore.default.for.nullables": "true" not work when use transforms HOT 1
- Lookup global schema id HOT 3
- Namespaced Schema Field for fixed logical type Decimal Fails
- More user-friendly JSON Schema compatibility checks HOT 1
- scrub.invalid.names has poor performance HOT 2
- Deprecated dependency jackson-datatype-guava
- Log spam "Error retrieving Avro schema"
- JAAS config for Oauthbearer configuration HOT 1
- Breaking change in 7.5.3 `ParsedSchema` `validate` method now requires boolean
- Unable to set "scrub.invalid.names" to "true" when using the JSONSchema Converter HOT 2
- Setting normalize=true fails to find existing schema HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from schema-registry.