void insertPartitionClassName(String clusterName, String partitionClassName) throws SQLException {
    try (Connection connection = dataSource.getConnection()) {
      try (PreparedStatement insertStatement = connection.prepareStatement(insertPartitionClassNamesSql)) {
        long startTimeMs = System.currentTimeMillis();
        insertStatement.setString(1, clusterName);
        insertStatement.setString(2, partitionClassName);
        insertStatement.executeUpdate();
        metrics.writeTimeMs.update(System.currentTimeMillis() - startTimeMs);
        metrics.writeSuccessCount.inc();
      }
    } catch (SQLIntegrityConstraintViolationException e) {
      // If somehow the unique pair(clusterName, partitionClassName) is inserted, consider this as a success
      // ignore it
    } catch (SQLException e) {
      metrics.writeFailureCount.inc();
      logger.error("Failed to execute of {}, with parameter {} {}", insertPartitionClassNamesSql, clusterName,
          partitionClassName, e);
      throw e;
    }
  }
Insert the partition class name under given {@code clusterName}. Same partition class name can be inserted to different
clusterNames. If partition class name is already inserted under clusterName, this method would treat it as a no-op.
@param clusterName The clusterName.
@param partitionClassName The partition class name.
@throws SQLException
ambry-mysql/src/main/java/com/github/ambry/accountstats/PartitionClassReportsDao.java