@Override
  protected void onWriterReplaced(Writer nextWriter) {
    if (nextWriter != null && nextWriter instanceof ProtobufLogWriter) {
      this.hdfs_out = ((ProtobufLogWriter) nextWriter).getStream();
    } else {
      this.hdfs_out = null;
    }
    this.createSyncRunnersAndStart();
  }
This method allows subclasses to inject different writers without having to extend other
methods like rollWriter().
@return Writer instance
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java