Uploaded image for project: 'Apache Blur'
  1. Apache Blur
  2. BLUR-304

Add a Run or Execute command to the shell

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Blur Shell
    • None

    Description

      It'd be helpful to be able to execute a query from a file in the shell. For example:
      run mytable /path/to/query.json

      I think we could also provide a simple utility that does the writing, to make it easy to write to a logger... e.g.
      QueryWriter.toJsonString(BlurQuery q) {
      ...
      TProtocol p = new TJSONProtocol(new TIOStreamTransport(...));
      q.write(p);
      ...
      }

      Then the shell can just inflate the object and run the query, e.g.
      BIS in = new BufferedInputStream(new FIS(query.json));
      TProtocol p = new TJSONProtocol(new TIOStreamTransport(in));
      TBase<BlurQuery, BlurQuery._Fields> tbase = new BlurQuery();
      tbase.read(p);

      It'd be helpful for debugging large queries with unique characteristics (e.g. loads of facets).

      Attachments

        Activity

          People

            Unassigned Unassigned
            williamstw Tim Williams
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: