title: Saving KMeansModel on HDFS
body: <p>I want to save a KMeans Model on Hdfs. To do this I use the method save and create the otuput directory during runtime(See code). I get the Error Exception metadata already exists. How can I solve this problem?</p>
  
  <pre><code>  val lastUrbanKMeansModel = KMeansModel.load(spark, defaultPath + "UrbanRoad/201692918")
    val newUrbanKMeansObject = new KMeans()
      .setK(7)
      .setMaxIterations(20)
      .setInitialModel(lastUrbanKMeansModel)
    val vectorUrbanRoad = typeStreet.filter(k =&gt; k._2 == 1).map(_._1)
  
    if (!vectorUrbanRoad.isEmpty()) {
  
      val newUrbanModel = newUrbanKMeansObject.run(vectorUrbanRoad)
      newUrbanModel.save(spark, defaultPath + "UrbanRoad/" + 
        Calendar.getInstance().get(Calendar.YEAR).toString
        + (Calendar.getInstance().get(Calendar.MONTH) + 1).toString + 
        Calendar.getInstance().get(Calendar.DAY_OF_MONTH).toString + 
        Calendar.getInstance().get(Calendar.HOUR_OF_DAY).toString)
    } 
  </code></pre>