Codota Logo
SuccessCallback.invoke
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
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

    • Running tasks concurrently on multiple threads
    • getApplicationContext (Context)
    • scheduleAtFixedRate (ScheduledExecutorService)
      Creates and executes a periodic action that becomes enabled first after the given initial delay, and
    • setRequestProperty (URLConnection)
      Sets the general request property. If a property with the key already exists, overwrite its value wi
    • Runnable (java.lang)
      Represents a command that can be executed. Often used to run code in a different Thread.
    • ByteBuffer (java.nio)
      A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
    • ThreadPoolExecutor (java.util.concurrent)
      An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
    • Annotation (javassist.bytecode.annotation)
      The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
    • Servlet (javax.servlet)
      Defines methods that all servlets must implement.A servlet is a small Java program that runs within
    • JOptionPane (javax.swing)
    Codota Logo
    • Products

      Search for Java codeSearch for JavaScript codeEnterprise
    • IDE Plugins

      IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Codota for your IDE now