Uploaded image for project: 'Apache Lens (Retired)'
  1. Apache Lens (Retired)
  2. LENS-456

Provide QueryAcceptors to be declared in configuration

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • 2.1
    • server
    • None

    Description

      Creation:

        private List<QueryAcceptor> queryAcceptors = new ArrayList<QueryAcceptor>();
      
      
      
      
      

      Usage:

        private void accept(String query, Configuration conf, SubmitOp submitOp) throws LensException {
          // run through all the query acceptors, and throw Exception if any of them
          // return false
          for (QueryAcceptor acceptor : queryAcceptors) {
            String cause = "";
            String rejectionCause = acceptor.accept(query, conf, submitOp);
            if (rejectionCause != null) {
              getEventService().notifyEvent(new QueryRejected(System.currentTimeMillis(), query, rejectionCause, null));
              throw new LensException("Query not accepted because " + cause);
            }
          }
          getEventService().notifyEvent(new QueryAccepted(System.currentTimeMillis(), null, query, null));
        }
      
      
      
      
      
      

      We can take from conf and populate the list. Right now it's not populated.

      Attachments

        Issue Links

          Activity

            People

              prongs Rajat Khandelwal
              prongs Rajat Khandelwal
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: