code: public void flush()
      {
          try {
              // Flush index writer
              indexWriter.flush();
  
              // Write out metrics mutations
              BatchWriter metricsWriter = connector.createBatchWriter(table.getMetricsTableName(), writerConfig);
              metricsWriter.addMutations(getMetricsMutations());
              metricsWriter.close();
  
              // Re-initialize the metrics
              metrics.clear();
              metrics.put(METRICS_TABLE_ROW_COUNT, new AtomicLong(0));
          }
          catch (MutationsRejectedException e) {
              throw new PrestoException(UNEXPECTED_ACCUMULO_ERROR, "Index mutation was rejected by server on flush", e);
          }
          catch (TableNotFoundException e) {
              throw new PrestoException(ACCUMULO_TABLE_DNE, "Accumulo table does not exist", e);
          }
      }
docs: Flushes all Mutations in the index writer. And all metric mutations to the metrics table.
  Note that the metrics table is not updated until this method is explicitly called (or implicitly via close).