Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-7585

Plasma-store-server does not support --help, shows backtrace on getopt error

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: C++ - Plasma
    • Labels:
      None

      Description

      I'm trying out Plasma, using plasma-store-server. The first thing I usually do then is to run the binary without arguments, and that usually gives me a message showing usage. However, with plasma-store-server, the initial experience there is a backtrace:

      $ ./debug/plasma-store-server
      /Users/chrish/Code/arrow/cpp/src/plasma/store.cc:1237: please specify socket for incoming connections with -s switch
      0   plasma-store-server                 0x000000010b4d7c04 _ZN5arrow4util7CerrLog14PrintBackTraceEv + 52
      1   plasma-store-server                 0x000000010b4d7b24 _ZN5arrow4util7CerrLogD2Ev + 100
      2   plasma-store-server                 0x000000010b4d7a85 _ZN5arrow4util7CerrLogD1Ev + 21
      3   plasma-store-server                 0x000000010b4d7aa9 _ZN5arrow4util7CerrLogD0Ev + 25
      4   plasma-store-server                 0x000000010b4d7990 _ZN5arrow4util8ArrowLogD2Ev + 80
      5   plasma-store-server                 0x000000010b4d79c5 _ZN5arrow4util8ArrowLogD1Ev + 21
      6   plasma-store-server                 0x000000010b463152 main + 1122
      7   libdyld.dylib                       0x00007fff7765a3d5 start + 1
      fish: './debug/plasma-store-server' terminated by signal SIGABRT (Abort)
      

      Also, neither of the "h" or "help" command-line switches is supported, and so to start plasma-store-server, you either find the doc, or iteratively add arguments until you stop getting "please specify ..." backtraces.

      I know it's not a big thing, but it'd be nice if that initial experience was a little bit more user-friendly. Also submitting this because it feels like a good first time issue, so I would be very happy to do the work, and would like to tackle it. I'd like to 1) add --help support that shows all the options and gives an example with the required ones, and 2) remove the unnecessary backtraces on normal errors like these in the main() function.

      Just asking beforehand here: 1) would this kind of patch be welcome, and 2) is there a C++ library for command-line option parsing that I could be using. I can find one on my own, but I'd rather ask here which one would be approved for using in the Arrow codebase... or should I just stick to getopt() and do things manually? Thanks!

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                chrish42 Christian Hudon
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: