[ 
https://issues.apache.org/jira/browse/DRILL-5701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16137113#comment-16137113
 ] 

ASF GitHub Bot commented on DRILL-5701:
---------------------------------------

Github user bitblender commented on a diff in the pull request:

    https://github.com/apache/drill/pull/894#discussion_r134553446
  
    --- Diff: 
exec/java-exec/src/test/java/org/apache/drill/exec/rpc/user/security/TestUserBitKerberos.java
 ---
    @@ -137,6 +142,41 @@ public Void run() throws Exception {
         test("SELECT * FROM cp.`region.json` LIMIT 5");
       }
     
    +  @Test
    +  public void testUnecryptedConnectionCounter() throws Exception {
    +    final Properties connectionProps = new Properties();
    +    connectionProps.setProperty(DrillProperties.SERVICE_PRINCIPAL, 
krbHelper.SERVER_PRINCIPAL);
    +    connectionProps.setProperty(DrillProperties.KERBEROS_FROM_SUBJECT, 
"true");
    +    final Subject clientSubject = 
JaasKrbUtil.loginUsingKeytab(krbHelper.CLIENT_PRINCIPAL,
    +        krbHelper.clientKeytab.getAbsoluteFile());
    +
    +    Subject.doAs(clientSubject, new PrivilegedExceptionAction<Void>() {
    +      @Override
    +      public Void run() throws Exception {
    +        updateClient(connectionProps);
    +        return null;
    +      }
    +    });
    +
    +    // Run few queries using the new client
    +    testBuilder()
    +        .sqlQuery("SELECT session_user FROM (SELECT * FROM sys.drillbits 
LIMIT 1)")
    +        .unOrdered()
    +        .baselineColumns("session_user")
    +        .baselineValues(krbHelper.CLIENT_SHORT_NAME)
    +        .go();
    +
    +    // Check encrypted counters value
    --- End diff --
    
    Please explain the logic behind the different count values in the 
assertion. Same for other tests as well.


> drill.connections.rpc.<user/control/data>.<encrypted/unencrypted> metric not 
> behaving correctly
> -----------------------------------------------------------------------------------------------
>
>                 Key: DRILL-5701
>                 URL: https://issues.apache.org/jira/browse/DRILL-5701
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.11.0
>            Reporter: Sorabh Hamirwasia
>            Assignee: Sorabh Hamirwasia
>
> Reported by [~knguyen]
> When sqlline fails to connect to drillbit such as a handshake failure, the 
> drill.connections.rpc.user.<encrypted/unencrypted> metric subtracts 2 
> counters (one for handshake failure and one when the user exits from 
> sqlline). As a result, the metric can end up with a negative value. For 
> control connections if the handshake fails then again counters related to 
> those are updated incorrectly.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to