Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-615

refactor o.a.c.cli.CliClient

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 0.7 beta 3
    • Legacy/Tools
    • None

    Description

      There is a lot of code duplication when it comes to decomposing commands into keyspace, column family, keys, columns, etc, and validating the results. There would be even more if the error handling was more thorough.

      I think the cleanest way is to create a class that accepts a CommonTree in its constructor and assigns the results to members. A custom exception can be thrown for validation errors and CliClient can simply trap these, print the descriptive .msg, and return.

      Attachments

        1. CASSANDRA-615.patch
          99 kB
          Pavel Yaskevich

        Activity

          People

            xedin Pavel Yaskevich
            urandom Eric Evans
            Pavel Yaskevich
            Jonathan Ellis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: