code: public static void writeSchema(String outputPath, Schema schema, JavaSparkContext sc) throws IOException {
          writeStringToFile(outputPath, schema.toString(), sc);
      }
docs: Write a schema to a HDFS (or, local) file in a human-readable format
  
  @param outputPath    Output path to write to
  @param schema        Schema to write
  @param sc            Spark context