class HDFSFileSink extends Sink<T> {

  public static <T> HDFSFileSink<T, NullWritable, Text> toText(String path) {
    SerializableFunction<T, KV<NullWritable, Text>> outputConverter =
        new SerializableFunction<T, KV<NullWritable, Text>>() {
          @Override
          public KV<NullWritable, Text> apply(T input) {
            return KV.of(NullWritable.get(), new Text(input.toString()));
          }
        };
    return to(path, TextOutputFormat.class, NullWritable.class, Text.class, outputConverter);
  }

}