@Test
  public void testTransactionBatchSizeValidation() throws Exception {
    final String schemes = conf.get(HiveConf.ConfVars.HIVE_BLOBSTORE_SUPPORTED_SCHEMES.varname);
    // the output stream of this FS doesn't used to support hflush earlier, now it shouldn't throw any exception
    conf.setVar(HiveConf.ConfVars.HIVE_BLOBSTORE_SUPPORTED_SCHEMES, "raw");

    StrictDelimitedInputWriter writer = StrictDelimitedInputWriter.newBuilder()
        .withFieldDelimiter(',')
        .build();

    try {
      HiveStreamingConnection.newBuilder()
          .withDatabase(dbName)
          .withTable(tblName)
          .withAgentInfo("UT_" + Thread.currentThread().getName())
          .withRecordWriter(writer)
          .withTransactionBatchSize(2)
          .withHiveConf(conf)
          .connect();

    } finally {
      conf.setVar(HiveConf.ConfVars.HIVE_BLOBSTORE_SUPPORTED_SCHEMES, schemes);
    }
  }
Starting with HDFS 3.3.1, the underlying system NOW SUPPORTS hflush so there should
be no exception.
streaming/src/test/org/apache/hive/streaming/TestStreaming.java