Codota Logo
com.facebook.presto.client
Code IndexAdd Codota to your IDE (free)

How to use com.facebook.presto.client

Best Java code snippets using com.facebook.presto.client (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: prestodb/presto

private synchronized Session getSession()
    throws LoginException, GSSException
{
  if ((clientSession == null) || clientSession.needsRefresh()) {
    clientSession = createSession();
  }
  return clientSession;
}
origin: prestodb/presto

public static ClientSession stripTransactionId(ClientSession session)
{
  return ClientSession.builder(session)
      .withoutTransactionId()
      .build();
}
origin: prestodb/presto

private static RuntimeException getCause(QueryError queryError)
{
  if (queryError.getFailureInfo() != null) {
    return queryError.getFailureInfo().toException();
  }
  return null;
}
origin: prestodb/presto

public RuntimeException toException()
{
  return toException(this);
}
origin: prestodb/presto

@Override
public void close()
{
  // If the query is not done, abort the query.
  if (state.compareAndSet(State.RUNNING, State.CLIENT_ABORTED)) {
    URI uri = currentResults.get().getNextUri();
    if (uri != null) {
      httpDelete(uri);
    }
  }
}
origin: prestodb/presto

@Override
public void close()
{
  client.close();
}
origin: prestodb/presto

@Override
public void cancelLeafStage()
{
  checkState(!isClientAborted(), "client is closed");
  URI uri = currentStatusInfo().getPartialCancelUri();
  if (uri != null) {
    httpDelete(uri);
  }
}
origin: prestodb/presto

@Test
public void testFormat()
{
  assertMillis(0, "0 00:00:00.000");
  assertMillis(1, "0 00:00:00.001");
  assertMillis(-1, "-0 00:00:00.001");
  assertMillis(toMillis(12, 13, 45, 56, 789), "12 13:45:56.789");
  assertMillis(toMillis(-12, -13, -45, -56, -789), "-12 13:45:56.789");
  assertMillis(Long.MAX_VALUE, "106751991167 07:12:55.807");
  assertMillis(Long.MIN_VALUE + 1, "-106751991167 07:12:55.807");
  assertMillis(Long.MIN_VALUE, "-106751991167 07:12:55.808");
}
origin: prestodb/presto

public Set<String> getResetSessionProperties()
{
  return client.getResetSessionProperties();
}
origin: prestodb/presto

public SqlIntervalDayTime(int day, int hour, int minute, int second, int millis)
{
  milliSeconds = toMillis(day, hour, minute, second, millis);
}
origin: prestodb/presto

  @Override
  public String toString()
  {
    String message = getMessage();
    if (message != null) {
      return type + ": " + message;
    }
    return type;
  }
}
origin: prestodb/presto

public static Builder builder()
{
  return new Builder();
}
origin: prestodb/presto

public static Builder builder()
{
  return new Builder();
}
origin: prestodb/presto

@Override
public String getVersion()
{
  return nodeVersion.getVersion();
}
origin: prestodb/presto

  public static StatementClient newStatementClient(OkHttpClient httpClient, ClientSession session, String query)
  {
    return new StatementClientV1(httpClient, session, query);
  }
}
origin: prestodb/presto

public static Builder builder(ClientSession clientSession)
{
  return new Builder(clientSession);
}
origin: prestodb/presto

public Optional<String> getSetCatalog()
{
  return client.getSetCatalog();
}
origin: prestodb/presto

public Optional<String> getSetSchema()
{
  return client.getSetSchema();
}
origin: prestodb/presto

public static void setupSocksProxy(OkHttpClient.Builder clientBuilder, Optional<HostAndPort> socksProxy)
{
  setupProxy(clientBuilder, socksProxy, SOCKS);
}
origin: prestodb/presto

public Set<String> getDeallocatedPreparedStatements()
{
  return client.getDeallocatedPreparedStatements();
}
com.facebook.presto.client

Most used classes

  • Column
  • FailureInfo
  • StatementStats
  • ClientSession
  • QueryResults
  • QueryError,
  • StatementClient,
  • QueryData,
  • StageStats,
  • ClientTypeSignature,
  • ErrorLocation,
  • StatementStats$Builder,
  • ClientTypeSignatureParameter,
  • IntervalDayTime,
  • IntervalYearMonth,
  • NodeVersion,
  • ServerInfo,
  • StageStats$Builder,
  • StatementClientFactory
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