diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java index 57482efa33d..6ff1f025cf5 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java @@ -1387,6 +1387,10 @@ public class HTable implements HTableInterface { */ @Override public void flushCommits() throws IOException { + if (mutator == null) { + // nothing to flush if there's no mutator; don't bother creating one. + return; + } getBufferedMutator().flush(); }