@Test public void testMain() throws Exception { String className = Identifier.class.getCanonicalName(); AvroSchemaGenerator.main(new String[] {className}); Properties properties = getStoredProperties(); assertNotNull(properties); assertEquals(1, properties.size()); assertTrue(properties.containsKey(className)); assertEquals(Identifier.SCHEMA$.toString(), properties.getProperty(className)); }
public static void main(String[] args) throws FileNotFoundException, IOException, ParseException { if (args.length==0) { throw new RuntimeException("no classes provided for schema generation"); } File file = new File(System.getProperty(OOZIE_ACTION_OUTPUT_FILENAME)); Properties props = new Properties(); OutputStream os = new FileOutputStream(file); for (int i=0; i<args.length; i++) { if (args[i]!=null && args[i].length()>0) { props.setProperty(args[i], AvroUtils.toSchema(args[i]).toString()); } } try { props.store(os, ""); } finally { os.close(); } }
AvroSchemaGenerator { public static void main(String[] args) throws FileNotFoundException, IOException, ParseException { if (args.length==0) { throw new RuntimeException("no classes provided for schema generation"); } File file = new File(System.getProperty(OOZIE_ACTION_OUTPUT_FILENAME)); Properties props = new Properties(); OutputStream os = new FileOutputStream(file); for (int i=0; i<args.length; i++) { if (args[i]!=null && args[i].length()>0) { props.setProperty(args[i], AvroUtils.toSchema(args[i]).toString()); } } try { props.store(os, ""); } finally { os.close(); } } }
AvroSchemaGenerator { public static void main(String[] args) throws FileNotFoundException, IOException, ParseException { if (args.length==0) { throw new RuntimeException("no classes provided for schema generation"); } File file = new File(System.getProperty(OOZIE_ACTION_OUTPUT_FILENAME)); Properties props = new Properties(); OutputStream os = new FileOutputStream(file); for (int i=0; i<args.length; i++) { if (args[i]!=null && args[i].length()>0) { props.setProperty(args[i], AvroUtils.toSchema(args[i]).toString()); } } try { props.store(os, ""); } finally { os.close(); } } private  AvroSchemaGenerator(); }
AvroSchemaGenerator { public static void main(String[] args) throws FileNotFoundException, IOException, ParseException { if (args.length==0) { throw new RuntimeException("no classes provided for schema generation"); } File file = new File(System.getProperty(OOZIE_ACTION_OUTPUT_FILENAME)); Properties props = new Properties(); OutputStream os = new FileOutputStream(file); for (int i=0; i<args.length; i++) { if (args[i]!=null && args[i].length()>0) { props.setProperty(args[i], AvroUtils.toSchema(args[i]).toString()); } } try { props.store(os, ""); } finally { os.close(); } } private  AvroSchemaGenerator(); static void main(String[] args); }
AvroSchemaGenerator { public static void main(String[] args) throws FileNotFoundException, IOException, ParseException { if (args.length==0) { throw new RuntimeException("no classes provided for schema generation"); } File file = new File(System.getProperty(OOZIE_ACTION_OUTPUT_FILENAME)); Properties props = new Properties(); OutputStream os = new FileOutputStream(file); for (int i=0; i<args.length; i++) { if (args[i]!=null && args[i].length()>0) { props.setProperty(args[i], AvroUtils.toSchema(args[i]).toString()); } } try { props.store(os, ""); } finally { os.close(); } } private  AvroSchemaGenerator(); static void main(String[] args);  }