public WriterFactory withPath(FileSystem fs, Path path) {
      Preconditions.checkNotNull(fs);
      Preconditions.checkNotNull(path);
      this.fs = fs;
      this.path = path;
      return this;
    }
This variety of ways to construct writers is used throughout the code, and we want to be able
to swap writer implementations.
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFile.java