title: How to set autoflush=false in HBase table
body: <p>I have this code that saves to HBase HTABLE. The expected behavior is that the table will push the commits or "flush" the puts to hbase for each partition. </p>
  
  <p>NOTE: This is the updated code</p>
  
  <pre><code>rdd.foreachPartition(p =&gt; {
    val table = connection.getTable(TableName.valueOf(HTABLE))
    val mutator = connection.getBufferedMutator(TableName.valueOf(HTABLE))
  
    p.foreach(row =&gt; {
      val hRow = new Put(rowkey)
      hRow.addColumn....
      // use table.exists instead of table.checkAndPut (in favor of BufferedMutator's flushCommits)
      val exists = table.exists(new Get(rowkey))
      if (!exists) {
        hRow.addColumn...
      }
      mutator.mutate(hRow)
    })
    table.close()
    mutator.flush()
    mutator.close()
  })
  </code></pre>
  
  <p>In HBase 1.1, HTable is deprecated and there's no flushCommits() available in org.apache.hadoop.hbase.client.Table. </p>
  
  <p>Replacing BufferedMutator.mutate(put) is ok for normal puts, but mutator does not have any checkAndPut similar to Table.</p>