// currently only support unions with 2 types, one of which is NULL
final Schema nullschema = Schema.create(Schema.Type.NULL);
if (types.size() != 2 || !types.contains(nullschema)) {
- final String resultSting = userKey.getID()
+ final String resultSting = userKey.getId()
+ ": Apex currently only supports UNION schemas with 2 options, one must be NULL";
LOGGER.warn(resultSting);
throw new ContextRuntimeException(resultSting);
schema = types.get(1);
}
if (Schema.Type.NULL.equals(schema.getType())) {
- final String resultSting = userKey.getID()
+ final String resultSting = userKey.getId()
+ ": Apex currently only supports UNION schema2 with 2 options, only one can be NULL, and the other cannot be another UNION";
LOGGER.warn(resultSting);
throw new ContextRuntimeException(resultSting);
// Check that there is a definition for the mapper for this type
if (!AVRO_OBJECT_MAPPER_MAP.containsKey(avroType) || AVRO_OBJECT_MAPPER_MAP.get(avroType) == null) {
final String resultSting =
- userKey.getID() + ": no Avro object mapper defined for Avro type \"" + avroType + "\"";
+ userKey.getId() + ": no Avro object mapper defined for Avro type \"" + avroType + "\"";
LOGGER.warn(resultSting);
throw new ContextRuntimeException(resultSting);
}
}
} catch (final Exception e) {
- final String resultSting = userKey.getID() + ": could not create an Avro object mapper of type \""
+ final String resultSting = userKey.getId() + ": could not create an Avro object mapper of type \""
+ AVRO_OBJECT_MAPPER_MAP.get(avroType) + "\" for Avro type \"" + avroType + "\" : " + e;
LOGGER.warn(resultSting, e);
throw new ContextRuntimeException(resultSting, e);