@Test public void testGetSchemaFromFileSystem() throws IOException, URISyntaxException { Schema schema = AvroUtil.getAvroSchemaFromFileSystem(schemaUrl.toString(), new TajoConf()); assertEquals(expected, schema); }
public static Schema getAvroSchemaFromFileSystem(String schemaURL, Configuration conf) throws IOException { Path schemaPath = new Path(schemaURL); FileSystem fs = schemaPath.getFileSystem(conf); FSDataInputStream inputStream = fs.open(schemaPath); try { return new Schema.Parser().parse(inputStream); } finally { IOUtils.closeStream(inputStream); } }
AvroUtil { public static Schema getAvroSchemaFromFileSystem(String schemaURL, Configuration conf) throws IOException { Path schemaPath = new Path(schemaURL); FileSystem fs = schemaPath.getFileSystem(conf); FSDataInputStream inputStream = fs.open(schemaPath); try { return new Schema.Parser().parse(inputStream); } finally { IOUtils.closeStream(inputStream); } } }
AvroUtil { public static Schema getAvroSchemaFromFileSystem(String schemaURL, Configuration conf) throws IOException { Path schemaPath = new Path(schemaURL); FileSystem fs = schemaPath.getFileSystem(conf); FSDataInputStream inputStream = fs.open(schemaPath); try { return new Schema.Parser().parse(inputStream); } finally { IOUtils.closeStream(inputStream); } }  }
AvroUtil { public static Schema getAvroSchemaFromFileSystem(String schemaURL, Configuration conf) throws IOException { Path schemaPath = new Path(schemaURL); FileSystem fs = schemaPath.getFileSystem(conf); FSDataInputStream inputStream = fs.open(schemaPath); try { return new Schema.Parser().parse(inputStream); } finally { IOUtils.closeStream(inputStream); } }  static Schema getAvroSchema(TableMeta meta, Configuration conf); static Schema getAvroSchemaFromHttp(String schemaURL); static Schema getAvroSchemaFromFileSystem(String schemaURL, Configuration conf); }
AvroUtil { public static Schema getAvroSchemaFromFileSystem(String schemaURL, Configuration conf) throws IOException { Path schemaPath = new Path(schemaURL); FileSystem fs = schemaPath.getFileSystem(conf); FSDataInputStream inputStream = fs.open(schemaPath); try { return new Schema.Parser().parse(inputStream); } finally { IOUtils.closeStream(inputStream); } }  static Schema getAvroSchema(TableMeta meta, Configuration conf); static Schema getAvroSchemaFromHttp(String schemaURL); static Schema getAvroSchemaFromFileSystem(String schemaURL, Configuration conf);  }