【发布时间】:2017-11-07 06:15:08
【问题描述】:
Hive 提供了两个表属性允许定义 Avro 模式:avro.schema.literal 和 avro.schema.url,其中前者可以指定 hdfs 路径或服务于模式的 http 端点。我想使用 Schema Registry 作为我的架构服务,但问题是它的 endpoints 返回架构包装在一个更大的 json 对象中:
请求:
GET /schemas/ids/1
回复:
HTTP/1.1 200 OK
Content-Type: application/vnd.schemaregistry.v1+json
{
"schema": "{\"type\": \"string\"}"
}
请求:
GET /subjects/test/versions/1
回复:
HTTP/1.1 200 OK
Content-Type: application/vnd.schemaregistry.v1+json
{
"name": "test",
"version": 1,
"schema": "{\"type\": \"string\"}"
}
Hive 无法解析上述响应。
【问题讨论】: