Hadoop Common
  1. Hadoop Common
  2. HADOOP-6693

Add metrics to track kerberos login activity

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.22.0
    • Fix Version/s: 0.22.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      New metrics "login" of type MetricTimeVaryingRate is added under new metrics context name "ugi" and metrics record name "ugi".

      Description

      Need metrics to track kerberos login activity such as login rate and the time taken for login.

      1. HADOOP-6693.rel20.patch
        10 kB
        Suresh Srinivas
      2. HADOOP-6693.rel20.1.patch
        10 kB
        Suresh Srinivas
      3. HADOOP-6693.patch
        9 kB
        Suresh Srinivas

        Activity

        Hide
        Suresh Srinivas added a comment -

        Patch adds new metrics "login" of type MetricTimeVaryingRate under metrics context "ugi" and metrics record "ugi".

        Show
        Suresh Srinivas added a comment - Patch adds new metrics "login" of type MetricTimeVaryingRate under metrics context "ugi" and metrics record "ugi".
        Hide
        Suresh Srinivas added a comment -

        Note that the new metrics is aggregated across all the nodes in the cluster, since no distinction made in metrics record name about the node where the metrics was reported from.

        Show
        Suresh Srinivas added a comment - Note that the new metrics is aggregated across all the nodes in the cluster, since no distinction made in metrics record name about the node where the metrics was reported from.
        Hide
        Owen O'Malley added a comment -

        To figure out the time take for login, we also need the number of logins to divide by. I'd suggest adding the number of successes and failures for keytab logins.

        Show
        Owen O'Malley added a comment - To figure out the time take for login, we also need the number of logins to divide by. I'd suggest adding the number of successes and failures for keytab logins.
        Hide
        Suresh Srinivas added a comment -

        Owen, MetricsTimeVaryingRate exposes two pieces of information: Number of operations and average time taken for the operation. Does it cover your requirement?

        I will change the patch to include two metrics - one for tracking login success and another for login failure.

        Show
        Suresh Srinivas added a comment - Owen, MetricsTimeVaryingRate exposes two pieces of information: Number of operations and average time taken for the operation. Does it cover your requirement? I will change the patch to include two metrics - one for tracking login success and another for login failure.
        Hide
        Suresh Srinivas added a comment -

        Also should we add metrics for logout?

        Show
        Suresh Srinivas added a comment - Also should we add metrics for logout?
        Hide
        Suresh Srinivas added a comment -

        New patch adds MetricsTimeVaryingRate metrics for login success and failure.

        Show
        Suresh Srinivas added a comment - New patch adds MetricsTimeVaryingRate metrics for login success and failure.
        Hide
        Owen O'Malley added a comment -

        +1

        Show
        Owen O'Malley added a comment - +1
        Hide
        Suresh Srinivas added a comment -

        20 version of the patch. I added bumping up metrics in loginUserFromKeytabAndReturnUGI also.

        The login code in UserGroupInformation is repeated in many places. There is an opportunity to improve the code by making a method for it.

        Show
        Suresh Srinivas added a comment - 20 version of the patch. I added bumping up metrics in loginUserFromKeytabAndReturnUGI also. The login code in UserGroupInformation is repeated in many places. There is an opportunity to improve the code by making a method for it.
        Hide
        Suresh Srinivas added a comment -

        New patch with unnecessary debug logs removed. Tested it on cluster to ensure metrics is being updated.

        Show
        Suresh Srinivas added a comment - New patch with unnecessary debug logs removed. Tested it on cluster to ensure metrics is being updated.
        Hide
        Owen O'Malley added a comment -

        +1

        Show
        Owen O'Malley added a comment - +1
        Hide
        Erik Steffl added a comment -

        If/when there is a patch for trunk the patch in https://issues.apache.org/jira/browse/HADOOP-6808 should also be included.

        Show
        Erik Steffl added a comment - If/when there is a patch for trunk the patch in https://issues.apache.org/jira/browse/HADOOP-6808 should also be included.
        Hide
        Suresh Srinivas added a comment -

        Trunk version of the patch.

        Show
        Suresh Srinivas added a comment - Trunk version of the patch.
        Hide
        Suresh Srinivas added a comment -

        New trunk patch that incorporates additional change from HADOOP-6808.

        Show
        Suresh Srinivas added a comment - New trunk patch that incorporates additional change from HADOOP-6808 .
        Hide
        Suresh Srinivas added a comment -

        New patch to fix a patch merge problem

        Show
        Suresh Srinivas added a comment - New patch to fix a patch merge problem
        Hide
        Jitendra Nath Pandey added a comment -

        +1.
        The kinit login in spawnAutoRenewalThreadForUserCreds is not tracked by these metrics, which is fine because this thread is spawned only at clients and purpose of these metrics is to track logins on the servers.

        Show
        Jitendra Nath Pandey added a comment - +1. The kinit login in spawnAutoRenewalThreadForUserCreds is not tracked by these metrics, which is fine because this thread is spawned only at clients and purpose of these metrics is to track logins on the servers.
        Hide
        Suresh Srinivas added a comment -

        Since hudson has some issues, ran the unit tests and testpatch. All the tests passed.

        Show
        Suresh Srinivas added a comment - Since hudson has some issues, ran the unit tests and testpatch. All the tests passed.
        Hide
        Suresh Srinivas added a comment -

        I committed the patch.

        Show
        Suresh Srinivas added a comment - I committed the patch.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #359 (See https://hudson.apache.org/hudson/job/Hadoop-Common-trunk-Commit/359/)
        HADOOP-6693. Add metrics to track kerberol login activity. Contributed by Suresh Srinivas.

        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #359 (See https://hudson.apache.org/hudson/job/Hadoop-Common-trunk-Commit/359/ ) HADOOP-6693 . Add metrics to track kerberol login activity. Contributed by Suresh Srinivas.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk #427 (See https://hudson.apache.org/hudson/job/Hadoop-Common-trunk/427/)
        HADOOP-6693. Add metrics to track kerberol login activity. Contributed by Suresh Srinivas.

        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk #427 (See https://hudson.apache.org/hudson/job/Hadoop-Common-trunk/427/ ) HADOOP-6693 . Add metrics to track kerberol login activity. Contributed by Suresh Srinivas.

          People

          • Assignee:
            Suresh Srinivas
            Reporter:
            Suresh Srinivas
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development