YugaByte SQL JDBC Driver aggregate

YugaByte JDBC aggregate project

Группа

Группа

com.yugabyte
Идентификатор

Идентификатор

ybjdbc-aggregate
Последняя версия

Последняя версия

42.2.7-yb-2
Дата

Дата

Тип

Тип

pom
Описание

Описание

YugaByte SQL JDBC Driver aggregate
YugaByte JDBC aggregate project
Ссылка на сайт

Ссылка на сайт

https://github.com/YugaByte/ybjdbc
Система контроля версий

Система контроля версий

https://github.com/yugabyte/jdbc-yugabytedb

Скачать ybjdbc-aggregate

Имя Файла Размер
ybjdbc-aggregate-42.2.7-yb-2.pom 1 KB
Обзор

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.yugabyte/ybjdbc-aggregate/ -->
<dependency>
    <groupId>com.yugabyte</groupId>
    <artifactId>ybjdbc-aggregate</artifactId>
    <version>42.2.7-yb-2</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/com.yugabyte/ybjdbc-aggregate/
implementation 'com.yugabyte:ybjdbc-aggregate:42.2.7-yb-2'
// https://jarcasting.com/artifacts/com.yugabyte/ybjdbc-aggregate/
implementation ("com.yugabyte:ybjdbc-aggregate:42.2.7-yb-2")
'com.yugabyte:ybjdbc-aggregate:pom:42.2.7-yb-2'
<dependency org="com.yugabyte" name="ybjdbc-aggregate" rev="42.2.7-yb-2">
  <artifact name="ybjdbc-aggregate" type="pom" />
</dependency>
@Grapes(
@Grab(group='com.yugabyte', module='ybjdbc-aggregate', version='42.2.7-yb-2')
)
libraryDependencies += "com.yugabyte" % "ybjdbc-aggregate" % "42.2.7-yb-2"
[com.yugabyte/ybjdbc-aggregate "42.2.7-yb-2"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

  • ybjdbc

YugabyteDB JDBC Driver

This is a distributed JDBC driver for YugabyteDB SQL. This driver is based on the PostgreSQL JDBC Driver.

NOTE: This project is currently experimental and should not be used for production facing applications. If you are interested in more details or helping with this effort, let us know on the Yugabyte Community Slack.

Features

This JDBC driver has the following features:

Cluster Awareness to eliminate need for a load balancer

This driver adds a YBClusterAwareDataSource that requires only an initial contact point for the YugabyteDB cluster, using which it discovers the rest of the nodes. Additionally, it automatically learns about the nodes being started/added or stopped/removed. Internally a connection pool is maintained for each node. A random live node is chosen to connect to the cluster and execute a statement. it will choose a live node to get a connection. When the connection is closed by the application, it is returned to the respective pool.

Topology Awareness to enable geo-distributed apps

NOTE: This feature is still in progress.

Shard awareness for high performance

NOTE: This feature is still in the design phase.

Get the Driver

From Maven

Add the following lines to your maven project.

<dependency>
  <groupId>com.yugabyte</groupId>
  <artifactId>jdbc-yugabytedb</artifactId>
  <version>42.2.7-yb-3</version>
</dependency>

Build locally

  1. Clone this repository.

    git clone https://github.com/yugabyte/jdbc-yugabytedb.git && cd jdbc-yugabytedb
    
  2. Build and install into your local maven folder.

     mvn clean install -DskipTests
    
  3. Finally, use it by adding the lines below to your project.

    <dependency>
        <groupId>com.yugabyte</groupId>
        <artifactId>jdbc-yugabytedb</artifactId>
        <version>42.2.7-yb-3-SNAPSHOT</version>
    </dependency> 

Use the Driver

  • Create the DataSource by passing an initial contact point

    String jdbcUrl = "jdbc:postgresql://127.0.0.1:5433/yugabyte";
    YBClusterAwareDataSource ds = new YBClusterAwareDataSource(jdbcUrl);
    
  • Use like a regular (pooling) DataSource

    // Using try-with-resources to auto-close the connection when done.
    try (Connection connection = ds.getConnection()) {
        // Use the connection as usual.
    } catch (java.sql.SQLException e) {
        // Handle/Report error.
    }
    
com.yugabyte

yugabyte

The high-performance distributed SQL database for global, internet-scale apps.

Версии библиотеки

Версия
42.2.7-yb-2
42.2.7-yb-1