/** * Reports the Avro schema from a generated class. * * @param className Fully-qualified name of the generated class to report the schema of. * @return Avro schema of the specified generated class. * @throws InvalidLayoutException if the specified class does not correspond to a valid Avro type. * In particular, throws {@link SchemaClassNotFoundException} if the class cannot be found. */ public static Schema getSchemaFromClass(String className) throws InvalidLayoutException { if (!JavaIdentifiers.isValidClassName(className)) { throw new InvalidLayoutException(String.format( "Invalid cell specification with Avro class type has invalid class name: '%s'.", className)); } try { final Class<? extends SpecificRecord> avroClass = Class.forName(className).asSubclass(SpecificRecord.class); return getSchemaFromClass(avroClass); } catch (ClassNotFoundException cnfe) { throw new SchemaClassNotFoundException( "Java class " + className + " was not found on the classpath."); } }
+ e.getMessage()); String qualifier = ""; if (col.getQualifier() != null) {