congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
RequestLog.accumulate
Code IndexAdd Tabnine to your IDE (free)

How to use
accumulate
method
in
com.yahoo.bard.webservice.logging.RequestLog

Best Java code snippets using com.yahoo.bard.webservice.logging.RequestLog.accumulate (Showing top 1 results out of 315)

origin: yahoo/fili

  /**
   * Take a list of Jackson ArrayNodes and merge their contents, preserving order.
   *
   * @param responses  A list of pairs that encompass JSON nodes and response metadata
   *
   * @return A new pair holding the merged json and the aggregate request log context
   */
  private Pair<JsonNode, LoggingContext> mergeResponses(List<Pair<JsonNode, LoggingContext>> responses) {
    JsonNodeFactory factory = new JsonNodeFactory(true);
    ArrayNode result = factory.arrayNode();
    RequestLog.restore(logCtx);
    for (Pair<JsonNode, LoggingContext> entry : responses) {
      for (JsonNode jsonNode : entry.getKey()) {
        result.add(jsonNode);
      }
      RequestLog.accumulate(entry.getValue().getRequestLog());
    }
    RequestLog updatedCtx = RequestLog.dump();
    return new Pair<>(result, new LoggingContext(updatedCtx));
  }
}
com.yahoo.bard.webservice.loggingRequestLogaccumulate

Javadoc

Accumulates timings and threads to current thread's request log context. It fills in the contents found in ctx. If the two contexts refer to different requests, then it logs a warning and returns.

Popular methods of RequestLog

  • dump
  • restore
  • copy
    Exports a snapshot of the request log of the current thread without resetting the request log for th
  • log
  • startTiming
  • stopTiming
  • <init>
    Copy constructor is also private.
  • addIdPrefix
    Prepend an id prefix to generated druid query id.
  • aggregateDurations
    Adds the durations in milliseconds of all the recorded timed phases to a map.
  • clear
    Resets the contents of a request log at the calling thread.
  • durations
    Adds the durations in milliseconds of all the recorded timed phases to a map.
  • export
    Exports current thread's request log object as a formatted string without resetting it.
  • durations,
  • export,
  • getId,
  • getLoginfoOrder,
  • init,
  • isRunning,
  • record,
  • registerTime,
  • retrieve

Popular in Java

  • Start an intent from android
  • getExternalFilesDir (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • requestLocationUpdates (LocationManager)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now