@Test @SuppressWarnings("rawtypes") public void testWritables() throws Exception { AvroType at = Avros.writables(LongWritable.class); LongWritable lw = new LongWritable(1729L); assertEquals(lw, at.getInputMapFn().map(at.getOutputMapFn().map(lw))); }
public static final <T extends Writable> AvroType<T> writables( Class<T> clazz) { return new AvroType<T>(clazz, Schema.create(Schema.Type.BYTES), new BytesToWritableMapFn<T>(clazz), new WritableToBytesMapFn<T>()); }
Avros { public static final <T extends Writable> AvroType<T> writables( Class<T> clazz) { return new AvroType<T>(clazz, Schema.create(Schema.Type.BYTES), new BytesToWritableMapFn<T>(clazz), new WritableToBytesMapFn<T>()); } }
Avros { public static final <T extends Writable> AvroType<T> writables( Class<T> clazz) { return new AvroType<T>(clazz, Schema.create(Schema.Type.BYTES), new BytesToWritableMapFn<T>(clazz), new WritableToBytesMapFn<T>()); } private  Avros(); }
Avros { public static final <T extends Writable> AvroType<T> writables( Class<T> clazz) { return new AvroType<T>(clazz, Schema.create(Schema.Type.BYTES), new BytesToWritableMapFn<T>(clazz), new WritableToBytesMapFn<T>()); } private  Avros(); static void configureReflectDataFactory(Configuration conf); static ReflectDataFactory getReflectDataFactory(Configuration conf); static void register(Class<T> clazz, AvroType<T> ptype); static PType<T> getPrimitiveType(Class<T> clazz); static final AvroType<Void> nulls(); static final AvroType<String> strings(); static final AvroType<Long> longs(); static final AvroType<Integer> ints(); static final AvroType<Float> floats(); static final AvroType<Double> doubles(); static final AvroType<Boolean> booleans(); static final AvroType<ByteBuffer> bytes(); static final AvroType<T> records(Class<T> clazz); static final AvroType<GenericData.Record> generics(Schema schema); static final AvroType<T> containers(Class<T> clazz); static final AvroType<T> reflects(Class<T> clazz); static final AvroType<T> writables(
			Class<T> clazz); static final AvroType<Collection<T>> collections(PType<T> ptype); static final AvroType<Map<String, T>> maps(PType<T> ptype); static final AvroType<Pair<V1, V2>> pairs(PType<V1> p1,
			PType<V2> p2); static final AvroType<Tuple3<V1, V2, V3>> triples(
			PType<V1> p1, PType<V2> p2, PType<V3> p3); static final AvroType<Tuple4<V1, V2, V3, V4>> quads(
			PType<V1> p1, PType<V2> p2, PType<V3> p3, PType<V4> p4); static final AvroType<TupleN> tuples(PType... ptypes); static AvroType<T> tuples(Class<T> clazz,
			PType... ptypes); static final AvroType<T> derived(Class<T> clazz,
			MapFn<S, T> inputFn, MapFn<T, S> outputFn, PType<S> base); static PType<T> jsons(Class<T> clazz); static final AvroTableType<K, V> tableOf(PType<K> key,
			PType<V> value); }
Avros { public static final <T extends Writable> AvroType<T> writables( Class<T> clazz) { return new AvroType<T>(clazz, Schema.create(Schema.Type.BYTES), new BytesToWritableMapFn<T>(clazz), new WritableToBytesMapFn<T>()); } private  Avros(); static void configureReflectDataFactory(Configuration conf); static ReflectDataFactory getReflectDataFactory(Configuration conf); static void register(Class<T> clazz, AvroType<T> ptype); static PType<T> getPrimitiveType(Class<T> clazz); static final AvroType<Void> nulls(); static final AvroType<String> strings(); static final AvroType<Long> longs(); static final AvroType<Integer> ints(); static final AvroType<Float> floats(); static final AvroType<Double> doubles(); static final AvroType<Boolean> booleans(); static final AvroType<ByteBuffer> bytes(); static final AvroType<T> records(Class<T> clazz); static final AvroType<GenericData.Record> generics(Schema schema); static final AvroType<T> containers(Class<T> clazz); static final AvroType<T> reflects(Class<T> clazz); static final AvroType<T> writables(
			Class<T> clazz); static final AvroType<Collection<T>> collections(PType<T> ptype); static final AvroType<Map<String, T>> maps(PType<T> ptype); static final AvroType<Pair<V1, V2>> pairs(PType<V1> p1,
			PType<V2> p2); static final AvroType<Tuple3<V1, V2, V3>> triples(
			PType<V1> p1, PType<V2> p2, PType<V3> p3); static final AvroType<Tuple4<V1, V2, V3, V4>> quads(
			PType<V1> p1, PType<V2> p2, PType<V3> p3, PType<V4> p4); static final AvroType<TupleN> tuples(PType... ptypes); static AvroType<T> tuples(Class<T> clazz,
			PType... ptypes); static final AvroType<T> derived(Class<T> clazz,
			MapFn<S, T> inputFn, MapFn<T, S> outputFn, PType<S> base); static PType<T> jsons(Class<T> clazz); static final AvroTableType<K, V> tableOf(PType<K> key,
			PType<V> value); static ReflectDataFactory REFLECT_DATA_FACTORY; static final String REFLECT_DATA_FACTORY_CLASS; static MapFn<CharSequence, String> UTF8_TO_STRING; static MapFn<String, Utf8> STRING_TO_UTF8; static MapFn<Object, ByteBuffer> BYTES_IN; }