public boolean createTableDescriptorForTableDirectory(Path tableDir, TableDescriptor htd,
    boolean forceCreation) throws IOException {
    if (this.fsreadonly) {
      throw new NotImplementedException("Cannot create a table descriptor - in read only mode");
    }
    return createTableDescriptorForTableDirectory(this.fs, tableDir, htd, forceCreation);
  }
Create a new TableDescriptor in HDFS in the specified table directory. Happens when we create a
new table during cluster start or in Clone and Create Table Procedures. Checks readOnly flag
passed on construction.
@param tableDir      table directory under which we should write the file
@param htd           description of the table to write
@param forceCreation if <tt>true</tt>,then even if previous table descriptor is present it will
                     be overwritten
@return <tt>true</tt> if the we successfully created the file, <tt>false</tt> if the file
        already exists and we weren't forcing the descriptor creation.
@throws IOException if a filesystem error occurs
hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java