Tabnine Logo
org.apache.calcite.avatica.remote
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.calcite.avatica.remote

Best Java code snippets using org.apache.calcite.avatica.remote (Showing top 20 results out of 315)

origin: apache/incubator-druid

@Inject
public DruidAvaticaHandler(
  final DruidMeta druidMeta,
  @Self final DruidNode druidNode,
  final AvaticaMonitor avaticaMonitor
)
{
 super(new LocalService(druidMeta), avaticaMonitor);
 setServerRpcMetadata(new Service.RpcMetadataResponse(druidNode.getHostAndPortToUse()));
}
origin: apache/kylin

protected List<Object> getParameterJDBCValues() {
  List<TypedValue> typeValues = getParameterValues();
  List<Object> jdbcValues = new ArrayList<Object>(typeValues.size());
  for (TypedValue typeValue : typeValues) {
    jdbcValues.add(typeValue.toJdbc(getCalendar()));
  }
  return jdbcValues;
}
origin: apache/phoenix

/**
 * Parses the serialization method from the configuration.
 *
 * @param conf The configuration to parse
 * @return The Serialization method
 */
Driver.Serialization getSerialization(Configuration conf) {
 String serializationName = conf.get(QueryServices.QUERY_SERVER_SERIALIZATION_ATTRIB,
   QueryServicesOptions.DEFAULT_QUERY_SERVER_SERIALIZATION);
 Driver.Serialization serialization;
 // Otherwise, use what was provided in the configuration
 try {
  serialization = Driver.Serialization.valueOf(serializationName);
 } catch (Exception e) {
  LOG.error("Unknown message serialization type for " + serializationName);
  throw e;
 }
 return serialization;
}
origin: apache/phoenix

private void setHandler(String[] args, HttpServer.Builder<Server> builder) throws Exception {
 Class<? extends PhoenixMetaFactory> factoryClass = getConf().getClass(
     QueryServices.QUERY_SERVER_META_FACTORY_ATTRIB, PhoenixMetaFactoryImpl.class,
     PhoenixMetaFactory.class);
 PhoenixMetaFactory factory =
     factoryClass.getDeclaredConstructor(Configuration.class).newInstance(getConf());
 Meta meta = factory.create(Arrays.asList(args));
 Service service = new LocalService(meta);
 builder.withHandler(service, getSerialization(getConf()));
}
origin: org.apache.calcite.avatica/avatica-core

@Override public Map<DatabaseProperty, Object> getDatabaseProperties(ConnectionHandle ch) {
 synchronized (this) {
  // Compute map on first use, and cache
  if (databaseProperties == null) {
   databaseProperties =
     service.apply(new Service.DatabasePropertyRequest(ch.id)).map;
  }
  return databaseProperties;
 }
}
origin: org.apache.calcite.avatica/avatica-core

 public Void call() {
  final Service.CloseStatementResponse response =
    service.apply(
      new Service.CloseStatementRequest(h.connectionId, h.id));
  return null;
 }
});
origin: org.apache.calcite/calcite-avatica

@Override CommitResponse deserialize(Message genericMsg) {
 // Checks the type of genericMsg
 ProtobufService.castProtobufMessage(genericMsg, Responses.CommitResponse.class);
 return new CommitResponse();
}
origin: org.apache.calcite/calcite-avatica

 public Void call() {
  final Service.RollbackResponse response =
    service.apply(new Service.RollbackRequest(ch.id));
  return null;
 }
});
origin: org.apache.calcite.avatica/avatica-core

 public Void call() {
  final Service.CommitResponse response =
    service.apply(new Service.CommitRequest(ch.id));
  return null;
 }
});
origin: org.apache.calcite/calcite-avatica

 public MetaResultSet call() {
  final Service.ResultSetResponse response =
    service.apply(new Service.CatalogsRequest(ch.id));
  return toResultSet(MetaCatalog.class, response);
 }
});
origin: org.apache.calcite/calcite-avatica

 public MetaResultSet call() {
  final Service.ResultSetResponse response =
    service.apply(
      new Service.SchemasRequest(ch.id, catalog, schemaPattern.s));
  return toResultSet(MetaSchema.class, response);
 }
});
origin: org.apache.calcite/calcite-avatica

 public MetaResultSet call() {
  final Service.ResultSetResponse response =
    service.apply(
      new Service.ColumnsRequest(ch.id, catalog, schemaPattern.s,
        tableNamePattern.s, columnNamePattern.s));
  return toResultSet(MetaColumn.class, response);
 }
});
origin: org.apache.calcite.avatica/avatica-core

 public Void call() {
  final Service.OpenConnectionResponse response =
    service.apply(new Service.OpenConnectionRequest(ch.id, info));
  return null;
 }
});
origin: org.apache.calcite.avatica/avatica-core

@Override public Response _apply(Request request) {
 if (request instanceof CloseConnectionRequest) {
  return new CloseConnectionResponse();
 }
 return dispatch(request);
}
origin: org.apache.calcite/calcite-avatica

@Override RpcMetadataResponse deserialize(Message genericMsg) {
 final Responses.RpcMetadata msg = ProtobufService.castProtobufMessage(genericMsg,
   Responses.RpcMetadata.class);
 return fromProto(msg);
}
origin: org.apache.calcite/calcite-avatica

PrepareResponse finagle(PrepareResponse response) {
 final Meta.StatementHandle statement = finagle(response.statement);
 if (statement == response.statement) {
  return response;
 }
 return new PrepareResponse(statement, rpcMetadata);
}
origin: org.apache.calcite/calcite-avatica

@Override ResultSetResponse deserialize(Message genericMsg) {
 final Responses.ResultSetResponse msg = ProtobufService.castProtobufMessage(genericMsg,
   Responses.ResultSetResponse.class);
 return fromProto(msg);
}
origin: org.apache.calcite.avatica/avatica-server

@Override public void setServerRpcMetadata(RpcMetadataResponse metadata) {
 // Set the metadata for the normal service calls
 service.setRpcMetadata(metadata);
 // Also add it to the handler to include with exceptions
 jsonHandler.setRpcMetadata(metadata);
}
origin: org.apache.calcite.avatica/avatica-server

@Override public void setServerRpcMetadata(RpcMetadataResponse metadata) {
 // Set the metadata for the normal service calls
 service.setRpcMetadata(metadata);
 // Also add it to the handler to include with exceptions
 pbHandler.setRpcMetadata(metadata);
}
origin: org.apache.calcite/calcite-avatica

@Override public Response _apply(Request request) {
 if (request instanceof CloseConnectionRequest) {
  return new CloseConnectionResponse();
 }
 return dispatch(request);
}
org.apache.calcite.avatica.remote

Most used classes

  • LocalService
    Implementation of Service that talks to a local Meta.
  • TypedValue
    Value and type.There are 3 representations: * JDBC - the representation used by JDBC get and set
  • Driver$Serialization
    Defines the method of message serialization used by the Driver
  • LocalJsonService
    Implementation of org.apache.calcite.avatica.remote.Servicethat goes to an in-process instance of Se
  • ProtobufTranslationImpl
    Implementation of ProtobufTranslationImpl that translates protobuf requests to POJO requests.
  • Service$RpcMetadataResponse,
  • Handler$HandlerResponse,
  • ProtobufTranslation,
  • Service,
  • AbstractHandler,
  • AvaticaHttpClientImpl,
  • AvaticaRuntimeException,
  • JsonHandler,
  • MetaDataOperation,
  • ProtobufHandler,
  • ProtobufService,
  • Service$CatalogsRequest,
  • Service$CloseConnectionRequest,
  • Service$CloseConnectionResponse
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