title: Spark structured streaming Elasticsearch integration issue. Data source es does not support streamed writing
body: <p>I am writing a Spark structured streaming application in which data processed with Spark needs be sink'ed to elastic search.</p>
  
  <p>This is my development environment, hence I have a standalone Elastic search.</p>
  
  <p>I have tried following two ways to sink the data in the DataSet to ES.</p>
  
  <p>1.<code>ds.writeStream().format("org.elasticsearch.spark.sql").start("spark/orders");</code>
  2.<code>ds.writeStream().format("es").start("spark/orders");</code></p>
  
  <p>In both cases I am getting the following error:</p>
  
  <p>Caused by: </p>
  
  <pre><code>java.lang.UnsupportedOperationException: Data source es does not support streamed writing
  at org.apache.spark.sql.execution.datasources.DataSource.createSink(DataSource.scala:287) ~[spark-sql_2.11-2.1.1.jar:2.1.1]
  at org.apache.spark.sql.streaming.DataStreamWriter.start(DataStreamWriter.scala:272) ~[spark-sql_2.11-2.1.1.jar:2.1.1]
  at org.apache.spark.sql.streaming.DataStreamWriter.start(DataStreamWriter.scala:213) ~[spark-sql_2.11-2.1.1.jar:2.1.1]
  </code></pre>
  
  <h2>pom.xml:</h2>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.apache.spark&lt;/groupId&gt;
          &lt;artifactId&gt;spark-core_2.11&lt;/artifactId&gt;
          &lt;version&gt;2.1.1&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
  
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.spark&lt;/groupId&gt;
          &lt;artifactId&gt;spark-sql_2.11&lt;/artifactId&gt;
          &lt;version&gt;2.1.1&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
  
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.mongodb.spark&lt;/groupId&gt;
          &lt;artifactId&gt;mongo-spark-connector_2.11&lt;/artifactId&gt;
          &lt;version&gt;2.0.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.spark&lt;/groupId&gt;
          &lt;artifactId&gt;spark-streaming_2.11&lt;/artifactId&gt;
          &lt;version&gt;2.1.1&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.spark&lt;/groupId&gt;
          &lt;artifactId&gt;spark-hive_2.11&lt;/artifactId&gt;
          &lt;version&gt;2.1.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.spark&lt;/groupId&gt;
          &lt;artifactId&gt;spark-streaming-kafka_2.11&lt;/artifactId&gt;
          &lt;version&gt;1.6.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.spark&lt;/groupId&gt;
          &lt;artifactId&gt;spark-sql-kafka-0-10_2.11&lt;/artifactId&gt;
          &lt;version&gt;2.1.1&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.elasticsearch&lt;/groupId&gt;
          &lt;artifactId&gt;elasticsearch-spark-20_2.11&lt;/artifactId&gt;
          &lt;version&gt;5.6.1&lt;/version&gt;
      &lt;/dependency&gt;
  
  
  Appreciate any help in resolving this issue.
  </code></pre>