@Test public void testSchema() throws IOException, InjectionException { final JavaConfigurationBuilder builder = Tang.Factory.getTang().newConfigurationBuilder(); builder.bindNamedParameter(PathString.class, file.getAbsolutePath()); final Configuration conf = builder.build(); final Injector injector = Tang.Factory.getTang().newInjector(conf); final ParquetReader reader = injector.getInstance(ParquetReader.class); final Schema schema = reader.createAvroSchema(); Assert.assertEquals("User", schema.getName()); Assert.assertEquals(Schema.Type.RECORD, schema.getType()); }
public Schema createAvroSchema() throws IOException { return createAvroSchema(new Configuration(true), NO_FILTER); }
ParquetReader { public Schema createAvroSchema() throws IOException { return createAvroSchema(new Configuration(true), NO_FILTER); } }
ParquetReader { public Schema createAvroSchema() throws IOException { return createAvroSchema(new Configuration(true), NO_FILTER); } @Inject private  ParquetReader(@Parameter(PathString.class) final String path); }
ParquetReader { public Schema createAvroSchema() throws IOException { return createAvroSchema(new Configuration(true), NO_FILTER); } @Inject private  ParquetReader(@Parameter(PathString.class) final String path); Schema createAvroSchema(); void serializeToDisk(final File file); ByteBuffer serializeToByteBuffer(); }
ParquetReader { public Schema createAvroSchema() throws IOException { return createAvroSchema(new Configuration(true), NO_FILTER); } @Inject private  ParquetReader(@Parameter(PathString.class) final String path); Schema createAvroSchema(); void serializeToDisk(final File file); ByteBuffer serializeToByteBuffer();  }