phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Swaroopa Kadam (JIRA)" <j...@apache.org>
Subject [jira] [Created] (PHOENIX-4870) PQS metrics are not being logged when AutoCommit is set to true in LoggingPhoenixConnection
Date Mon, 27 Aug 2018 22:31:00 GMT
Swaroopa Kadam created PHOENIX-4870:
---------------------------------------

             Summary: PQS metrics are not being logged when AutoCommit is set to true in LoggingPhoenixConnection
                 Key: PHOENIX-4870
                 URL: https://issues.apache.org/jira/browse/PHOENIX-4870
             Project: Phoenix
          Issue Type: Bug
    Affects Versions: 4.14.0
            Reporter: Swaroopa Kadam
            Assignee: Swaroopa Kadam


{code:java}
@Test
public void testPhoenixMetricsLoggedOnAutoCommit() throws Exception {
    // Autocommit is turned on explicitly
    loggedConn.setAutoCommit(true);
    //with executeUpdate() method
    // run SELECT to verify read metrics are logged
    String query = "SELECT * FROM " + tableName1;
    verifyQueryLevelMetricsLogging(query);
    // run UPSERT SELECT to verify mutation metrics are logged
    String upsertSelect = "UPSERT INTO " + tableName2 + " SELECT * FROM " + tableName1;
    loggedConn.createStatement().executeUpdate(upsertSelect);
    // Autocommit is turned on explicitly
    // Hence mutation metrics are expected during implicit commit
    assertTrue("Mutation write metrics are not logged for " + tableName2,
            mutationWriteMetricsMap.size()  > 0);
    assertTrue("Mutation read metrics for not found for " + tableName1,
            mutationReadMetricsMap.get(tableName1).size() > 0);
    //with execute() method
    loggedConn.createStatement().execute(upsertSelect);
    // Autocommit is turned on explicitly
    // Hence mutation metrics are expected during implicit commit
    assertTrue("Mutation write metrics are not logged for " + tableName2,
            mutationWriteMetricsMap.size()  > 0);
    assertTrue("Mutation read metrics for not found for " + tableName1,
            mutationReadMetricsMap.get(tableName1).size() > 0);

    clearAllTestMetricMaps();
}
{code}
If we run above test, it fails. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message