最近使用了HDF的最新版本,这个版本的Nifi从1.5升级到了1.7, 原来有个 NiFi 1.5的环境, 上面有用到Schema Registry.
原来想偷一下懒,直接使用1.7对应的Schema Registry, 没想到报错了.
查了下日志,发现可能新版本增加了一个字段:schemaMetadataId
Caused by: java.io.IOException: Failed to retrieve schema with name 'crm'
at org.apache.nifi.schemaregistry.hortonworks.HortonworksSchemaRegistry.handleException(HortonworksSchemaRegistry.java:332)
at org.apache.nifi.schemaregistry.hortonworks.HortonworksSchemaRegistry.retrieveSchema(HortonworksSchemaRegistry.java:252)
at sun.reflect.GeneratedMethodAccessor996.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:89)
at com.sun.proxy.$Proxy210.retrieveSchema(Unknown Source)
at org.apache.nifi.schema.access.SchemaNamePropertyStrategy.getSchema(SchemaNamePropertyStrategy.java:53)
... 21 common frames omitted
Caused by: java.lang.RuntimeException: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "schemaMetadataId" (class com.hortonworks.registries.schemaregistry.SchemaVersionInfo), not marked as ignorable (6 known properties: "timestamp", "version", "id", "description", "schemaText", "name"])
这个没办法了,只能升级了, 升级到1.7后问题解决(具体怎么升级,我整理下发出来).