private void beginNextTransaction() throws StreamingException {
    if (currentTransactionBatch == null) {
      currentTransactionBatch = createNewTransactionBatch();
      LOG.info("Opened new transaction batch {}", currentTransactionBatch);
    }

    if (currentTransactionBatch.isClosed()) {
      throw new StreamingException("Cannot begin next transaction on a closed streaming connection");
    }

    if (currentTransactionBatch.remainingTransactions() == 0) {
      LOG.info("Transaction batch {} is done. Rolling over to next transaction batch.",
        currentTransactionBatch);
      closeCurrentTransactionBatch();
      currentTransactionBatch = createNewTransactionBatch();
      LOG.info("Rolled over to new transaction batch {}", currentTransactionBatch);
    }
    currentTransactionBatch.beginNextTransaction();
  }
Returns the file that would be used to store rows under this.
parameters
@param partitionValues partition values
@param bucketId bucket id
@param minWriteId min write Id
@param maxWriteId max write Id
@param statementId statement Id
@return the location of the file.
@throws StreamingException when the path is not found
streaming/src/java/org/apache/hive/streaming/HiveStreamingConnection.java