void insertPartitionId(String clusterName, int partitionId, short partitionClassId) throws SQLException {
    try (Connection connection = dataSource.getConnection()) {
      try (PreparedStatement insertStatement = connection.prepareStatement(insertPartitionIdSql)) {
        long startTimeMs = System.currentTimeMillis();
        insertStatement.setString(1, clusterName);
        insertStatement.setInt(2, partitionId);
        insertStatement.setShort(3, partitionClassId);
        insertStatement.executeUpdate();
        metrics.writeTimeMs.update(System.currentTimeMillis() - startTimeMs);
        metrics.writeSuccessCount.inc();
      }
    } catch (SQLIntegrityConstraintViolationException e) {
      // If somehow the unique pair(clusterName, partitionId) is inserted, consider this as a success
      // ignore it
    } catch (SQLException e) {
      metrics.writeFailureCount.inc();
      logger.error("Failed to execute of {}, with parameter {} {} {}", insertPartitionIdSql, clusterName, partitionId,
          partitionClassId, e);
      throw e;
    }
  }
Insert partition id with it's partition class id of given {@code clusterName}. If the partition id already
exist for given {@code clusterName}, then this will be a no-op.
@param clusterName The clusterName
@param partitionId The id of the partition
@param partitionClassId The id of the partition class name
@throws SQLException
ambry-mysql/src/main/java/com/github/ambry/accountstats/PartitionClassReportsDao.java