Cassandra
  1. Cassandra
  2. CASSANDRA-2953

Use lazy initialization instead of class initialization in NodeId

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Fix Version/s: 0.8.3
    • Component/s: Core
    • Labels:
      None

      Description

      The class initialization of NodeId triggers a read to a system table. When using the class introduced in CASSANDRA-2911, this happens to be triggered even though this is not necessary. This a a pain because when you use those classes, you don't have to have to set reasonable values for the data_dir and commitlog_dir in cassandra.yaml (it is a pain to have to have a cassandra.yaml in the classpath in the first place, but that's for another ticket).

      This ticket proposes using lazy initialization in NodeId to avoid that.

        Activity

        Sylvain Lebresne created issue -
        Sylvain Lebresne made changes -
        Field Original Value New Value
        Attachment 0001-Use-lazy-initialization-for-NodeId.patch [ 12487950 ]
        Sylvain Lebresne made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Jonathan Ellis added a comment -

        +1

        Show
        Jonathan Ellis added a comment - +1
        Hide
        Sylvain Lebresne added a comment -

        Committed, thanks

        Show
        Sylvain Lebresne added a comment - Committed, thanks
        Sylvain Lebresne made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Reviewer jbellis
        Resolution Fixed [ 1 ]
        Hide
        Hudson added a comment -

        Integrated in Cassandra-0.8 #240 (See https://builds.apache.org/job/Cassandra-0.8/240/)
        Use lazy initialization instead of class initialization in NodeId
        patch by slebresne; reviewed by jbellis for CASSANDRA-2953

        slebresne : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1151495
        Files :

        • /cassandra/branches/cassandra-0.8/CHANGES.txt
        • /cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/utils/NodeId.java
        Show
        Hudson added a comment - Integrated in Cassandra-0.8 #240 (See https://builds.apache.org/job/Cassandra-0.8/240/ ) Use lazy initialization instead of class initialization in NodeId patch by slebresne; reviewed by jbellis for CASSANDRA-2953 slebresne : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1151495 Files : /cassandra/branches/cassandra-0.8/CHANGES.txt /cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/utils/NodeId.java
        Gavin made changes -
        Workflow no-reopen-closed, patch-avail [ 12623705 ] patch-available, re-open possible [ 12751725 ]
        Gavin made changes -
        Workflow patch-available, re-open possible [ 12751725 ] reopen-resolved, no closed status, patch-avail, testing [ 12757883 ]

          People

          • Assignee:
            Sylvain Lebresne
            Reporter:
            Sylvain Lebresne
            Reviewer:
            Jonathan Ellis
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development