Alexey Serbin has posted comments on this change.

Change subject: KUDU-1571. Generate "deprecated" metrics in MDL

Patch Set 1:

File java/kudu-csd/

Line 34:   Return a set() representing the metrics in the given MDL JSON object.
nit: set() --> set ?

Line 42:   for entity_def in mdl['metricEntityTypeDefinitions']:
What if 'metricDefinitions' key is absent in the MDL?  Should it be an error or 
the script should with that like if the list of metric type entities is empty?

Line 62:   for m_type, m_entity, m_name in added_metrics:
nit: consider using '_' for unused fields:

for _, m_entity, m_name in added_metrics:

Line 64:   if len(removed_metrics):
> nit: This isn't very pythonic. Should be `if removed_metrics:`, I think.
nit: consider writing it with less code duplication, like

for metrics, tag in [(added_metrics, "Added"), (removed_metrics), "Removed"]:
  print "%s %d metric(s):" % (tag, len(metrics))
  for _, m_entity, m_name in metrics:
    print "  %s metric %s" % (m_entity, m_name)

print "Compatibility check %s" % ("FAILED" if removed_metrics else "PASSED")

PS1, Line 77: May also generate a file containing JSON
Probably I missed something, but I could not see how this script can do this 
without a slight modification :)

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I121203d781ab593cb94d7248d164cdad7bf26e78
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <>
Gerrit-Reviewer: Adar Dembo <>
Gerrit-Reviewer: Alexey Serbin <>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <>
Gerrit-Reviewer: Todd Lipcon <>
Gerrit-HasComments: Yes

Reply via email to