Tabnine Logo
SuccessCallback.invoke
Code IndexAdd Tabnine to your IDE (free)

How to use
invoke
method
in
com.yahoo.bard.webservice.druid.client.SuccessCallback

Best Java code snippets using com.yahoo.bard.webservice.druid.client.SuccessCallback.invoke (Showing top 6 results out of 315)

origin: yahoo/fili

@Override
public Future<JsonNode> executeQuery(
    DruidQuery<?> druidQuery,
    SuccessCallback successCallback,
    FailureCallback failureCallback
) {
  RequestLog logCtx = RequestLog.dump();
  //todo eventually stop/start RequestLog phases
  return CompletableFuture.supplyAsync(() -> {
        try {
          JsonNode jsonNode = executeAndProcessQuery((DruidAggregationQuery) druidQuery);
          if (successCallback != null) {
            successCallback.invoke(jsonNode);
          }
          return jsonNode;
        } catch (Throwable t) {
          LOG.warn("Failed while querying ", t);
          if (failureCallback != null) {
            failureCallback.dispatch(t);
          }
        } finally {
          RequestLog.restore(logCtx);
        }
        return null;
      }
  );
}
origin: yahoo/fili

@Override
public Response onCompleted(Response response) {
  String druidQueryId = response.getHeader("X-Druid-Query-Id");
  Status status = Status.fromStatusCode(response.getStatusCode());
  logRequest(logCtx, timerName, outstanding, druidQueryId, status);
  if (hasError(status)) {
    markError(status, response, druidQueryId, error);
  } else {
    try {
      success.invoke(jsonNodeBuilderStrategy.apply(response));
    } catch (RuntimeException e) {
      failure.invoke(e);
    }
  }
  // we consumed this response, so pass null to any chains
  return null;
}
origin: com.yahoo.fili/fili-core

  success.invoke(mapper.readTree(weightResponse));
} else if (statusCode == 200) {
  success.invoke(mapper.readTree(jsonResponse.call()));
} else {
  error.invoke(statusCode, reasonPhrase, jsonResponse.call());
origin: yahoo/fili

  success.invoke(mapper.readTree(jsonResponse.call()));
} else {
  error.invoke(statusCode, reasonPhrase, jsonResponse.call());
origin: yahoo/fili

  success.invoke(mapper.readTree(weightResponse));
} else if (statusCode == 200) {
  success.invoke(mapper.readTree(jsonResponse.call()));
} else {
  error.invoke(statusCode, reasonPhrase, jsonResponse.call());
origin: com.yahoo.fili/fili-core

  success.invoke(mapper.readTree(jsonResponse.call()));
} else {
  error.invoke(statusCode, reasonPhrase, jsonResponse.call());
com.yahoo.bard.webservice.druid.clientSuccessCallbackinvoke

Javadoc

Invoke the success callback code.

Popular methods of SuccessCallback

    Popular in Java

    • Start an intent from android
    • setScale (BigDecimal)
    • putExtra (Intent)
    • setContentView (Activity)
    • FileInputStream (java.io)
      An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
    • SimpleDateFormat (java.text)
      Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
    • HashSet (java.util)
      HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
    • Iterator (java.util)
      An iterator over a sequence of objects, such as a collection.If a collection has been changed since
    • ConcurrentHashMap (java.util.concurrent)
      A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
    • ReentrantLock (java.util.concurrent.locks)
      A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
    • CodeWhisperer alternatives
    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