Created
January 20, 2016 16:38
-
-
Save heapxor/569336e8351b402f9bc3 to your computer and use it in GitHub Desktop.
sample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| main () { | |
| schema1 = readAvroSchema(source1); | |
| } | |
| public static String readAvroSchema(String source) { | |
| DataFileStream reader = null; | |
| Schema avSchema ; | |
| File f = new File(source); | |
| try { | |
| reader = new DataFileReader(f, new GenericDatumReader()); | |
| } catch (IOException e) { | |
| // TODO Auto-generated catch block | |
| e.printStackTrace(); | |
| } | |
| avSchema = reader.getSchema(); | |
| //System.out.println(avSchema.toString()); | |
| return avSchema.toString(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment