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

    • Making http requests using okhttp
    • onCreateOptionsMenu (Activity)
    • requestLocationUpdates (LocationManager)
    • setContentView (Activity)
    • DateFormat (java.text)
      Formats or parses dates and times.This class provides factories for obtaining instances configured f
    • ArrayList (java.util)
      ArrayList is an implementation of List, backed by an array. All optional operations including adding
    • Date (java.util)
      A specific moment in time, with millisecond precision. Values typically come from System#currentTime
    • Semaphore (java.util.concurrent)
      A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
    • JPanel (javax.swing)
    • JTable (javax.swing)
    • 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