hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Lowe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-8822) relnotes.py was deleted post mavenization
Date Wed, 19 Sep 2012 22:50:08 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-8822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13459184#comment-13459184

Jason Lowe commented on HADOOP-8822:

Thanks for the update!  One more thing -- I took a closer look at the Version class, and I
think it could be simplified.  We're basically converting a version string to a list of numbers
and comparing them in order.  Python already knows how to compare lists, so we can simply
let it compare the lists directly.  For example:

class Version:
  """Represents a version number"""
  def __init__(self, data):
    self.parts = [ int(p) for p in data.split('.') ]
    # backfill version with zeroes if missing parts
    self.parts.extend((0,) * (3 - len(self.parts)))

  def decBugFix(self):
    self.parts[2] -= 1
    return self

  def __str__(self):
    return '.'.join([ str(p) for p in self.parts ])

  def __cmp__(self, other):
    return cmp(self.parts, other.parts)

> relnotes.py was deleted post mavenization
> -----------------------------------------
>                 Key: HADOOP-8822
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8822
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 0.23.3
>            Reporter: Robert Joseph Evans
>            Assignee: Robert Joseph Evans
>         Attachments: HADOOP-8822.txt, HADOOP-8822.txt, HADOOP-8822.txt, HADOOP-8822.txt,
> relnotes.py was removed post mavinization.  It needs to be added back in so we can generate
release notes, and it should be updated to deal with YARN and the separate release notes files.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message