Skip to content

Commit

Permalink
Merge pull request #251 from alex268/develop
Browse files Browse the repository at this point in the history
Updated common and query module
  • Loading branch information
alex268 authored Mar 27, 2024
2 parents 1981ce8 + 5da7d30 commit 91d6da0
Show file tree
Hide file tree
Showing 18 changed files with 67 additions and 17 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
## 2.2.0 ##

* Added export module
* Core: Operation manager
* Updated implementation of CoordinationService
* Added module for QueryService
* Added module for ExportService
* Added common module with basic interfaces for transactions and retries
* Core: Added basic support of long operations
* Core: Added support for tracing requests with id
* Table: Added readRows operation in table service
* Topics: Added support of transaction between tables and topics

## 2.1.12 ##

Expand Down
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<properties>
<ydb-auth-api.version>1.0.0</ydb-auth-api.version>
<ydb-proto-api.version>1.6.2</ydb-proto-api.version>
<yc-auth.version>2.1.1</yc-auth.version>
<yc-auth.version>2.2.0</yc-auth.version>
</properties>

<licenses>
Expand Down
6 changes: 6 additions & 0 deletions common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tech.ydb.core;
package tech.ydb.common.retry;

/**
* Recipes should use the configured error policy to decide how to retry
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package tech.ydb.core.retry;
package tech.ydb.common.retry;

import java.util.concurrent.ThreadLocalRandom;

import tech.ydb.core.RetryPolicy;

/**
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
package tech.ydb.core.retry;

import tech.ydb.core.RetryPolicy;
package tech.ydb.common.retry;

/**
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tech.ydb.core.retry;
package tech.ydb.common.retry;

/**
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tech.ydb.core;
package tech.ydb.common.retry;

/**
* Abstracts the policy to use when retrying some actions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tech.ydb.core.retry;
package tech.ydb.common.retry;

/**
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
package tech.ydb.core.retry;
package tech.ydb.common.retry;

import tech.ydb.common.retry.RetryNTimes;
import tech.ydb.common.retry.RetryUntilElapsed;
import tech.ydb.common.retry.RetryForever;

import org.junit.Assert;
import org.junit.Test;
Expand Down
26 changes: 26 additions & 0 deletions common/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
</Console>
</Appenders>

<Loggers>
<Logger name="io.grpc" level="warn" additivity="false">
<AppenderRef ref="Console"/>
</Logger>
<Logger name="tech.ydb.core" level="debug" additivity="false">
<AppenderRef ref="Console"/>
</Logger>
<Logger name="tech.ydb.core.grpc.GrpcStatuses" level="error" additivity="false">
<AppenderRef ref="Console"/>
</Logger>
<Logger name="tech.ydb.core.impl.pool.GrpcChannel" level="error" additivity="false">
</Logger>

<Root level="debug" >
<AppenderRef ref="Console"/>
</Root>
</Loggers>
</Configuration>
2 changes: 1 addition & 1 deletion coordination/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<dependencies>
<dependency>
<groupId>tech.ydb</groupId>
<artifactId>ydb-sdk-core</artifactId>
<artifactId>ydb-sdk-common</artifactId>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import tech.ydb.common.retry.RetryPolicy;
import tech.ydb.coordination.CoordinationSession;
import tech.ydb.coordination.SemaphoreLease;
import tech.ydb.coordination.description.SemaphoreDescription;
Expand All @@ -30,7 +31,6 @@
import tech.ydb.coordination.settings.WatchSemaphoreMode;
import tech.ydb.core.Issue;
import tech.ydb.core.Result;
import tech.ydb.core.RetryPolicy;
import tech.ydb.core.Status;
import tech.ydb.core.StatusCode;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import java.time.Duration;
import java.util.concurrent.Executor;

import tech.ydb.core.RetryPolicy;
import tech.ydb.core.retry.RetryUntilElapsed;
import tech.ydb.common.retry.RetryPolicy;
import tech.ydb.common.retry.RetryUntilElapsed;

/**
*
Expand Down
3 changes: 3 additions & 0 deletions query/src/main/java/tech/ydb/query/QueryClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

import javax.annotation.WillNotClose;

import io.grpc.ExperimentalApi;

import tech.ydb.core.Result;
import tech.ydb.core.grpc.GrpcTransport;
import tech.ydb.query.impl.QueryClientImpl;
Expand All @@ -14,6 +16,7 @@
*
* @author Aleksandr Gorshenin
*/
@ExperimentalApi("QueryService is experimental and API may change without notice")
public interface QueryClient extends AutoCloseable {
static Builder newClient(@WillNotClose GrpcTransport transport) {
return QueryClientImpl.newClient(transport);
Expand Down
3 changes: 3 additions & 0 deletions query/src/main/java/tech/ydb/query/QuerySession.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import java.util.concurrent.CompletableFuture;

import io.grpc.ExperimentalApi;

import tech.ydb.common.transaction.TxMode;
import tech.ydb.core.Result;
import tech.ydb.query.settings.BeginTransactionSettings;
Expand All @@ -20,6 +22,7 @@
*
* @author Aleksandr Gorshenin
*/
@ExperimentalApi("QueryService is experimental and API may change without notice")
public interface QuerySession extends AutoCloseable {

/**
Expand Down
3 changes: 3 additions & 0 deletions query/src/main/java/tech/ydb/query/QueryStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import java.util.concurrent.CompletableFuture;

import io.grpc.ExperimentalApi;

import tech.ydb.core.Result;
import tech.ydb.query.result.QueryInfo;
import tech.ydb.query.result.QueryResultPart;
Expand All @@ -10,6 +12,7 @@
*
* @author Aleksandr Gorshenin
*/
@ExperimentalApi("QueryService is experimental and API may change without notice")
public interface QueryStream {
interface PartsHandler {
void onNextPart(QueryResultPart part);
Expand Down
3 changes: 3 additions & 0 deletions query/src/main/java/tech/ydb/query/QueryTransaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import java.util.concurrent.CompletableFuture;

import io.grpc.ExperimentalApi;

import tech.ydb.common.transaction.YdbTransaction;
import tech.ydb.core.Result;
import tech.ydb.core.Status;
Expand All @@ -20,6 +22,7 @@
*
* @author Aleksandr Gorshenin
*/
@ExperimentalApi("QueryService is experimental and API may change without notice")
public interface QueryTransaction extends YdbTransaction {

/**
Expand Down

0 comments on commit 91d6da0

Please sign in to comment.