Skip to content

Commit 07120a5

Browse files
author
Igor Melnichenko
committed
debugId -> logPrefix
1 parent 337b12f commit 07120a5

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

topic/src/main/java/tech/ydb/topic/read/impl/ReaderImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public abstract class ReaderImpl extends GrpcStreamRetrier {
5555
private final String consumerName;
5656

5757
public ReaderImpl(TopicRpc topicRpc, ReaderSettings settings) {
58-
super(settings.getDebugId(), topicRpc.getScheduler(), settings.getErrorsHandler());
58+
super(settings.getLogPrefix(), topicRpc.getScheduler(), settings.getErrorsHandler());
5959
this.topicRpc = topicRpc;
6060
this.settings = settings;
6161
this.session = new ReadSessionImpl();

topic/src/main/java/tech/ydb/topic/settings/ReaderSettings.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
public class ReaderSettings {
1818
private static final long MAX_MEMORY_USAGE_BYTES_DEFAULT = 100 * 1024 * 1024; // 100 MB
1919

20-
private final String debugId;
20+
private final String logPrefix;
2121
private final String consumerName;
2222
private final String readerName;
2323
private final List<TopicReadSettings> topics;
@@ -26,7 +26,7 @@ public class ReaderSettings {
2626
private final BiConsumer<Status, Throwable> errorsHandler;
2727

2828
private ReaderSettings(Builder builder) {
29-
this.debugId = builder.debugId;
29+
this.logPrefix = builder.logPrefix;
3030
this.consumerName = builder.consumerName;
3131
this.readerName = builder.readerName;
3232
this.topics = ImmutableList.copyOf(builder.topics);
@@ -35,8 +35,8 @@ private ReaderSettings(Builder builder) {
3535
this.errorsHandler = builder.errorsHandler;
3636
}
3737

38-
public String getDebugId() {
39-
return debugId;
38+
public String getLogPrefix() {
39+
return logPrefix;
4040
}
4141

4242
public String getConsumerName() {
@@ -72,7 +72,7 @@ public static Builder newBuilder() {
7272
* BUILDER
7373
*/
7474
public static class Builder {
75-
private String debugId = null;
75+
private String logPrefix = null;
7676
private String consumerName = null;
7777
private boolean readWithoutConsumer = false;
7878
private String readerName = null;
@@ -82,15 +82,15 @@ public static class Builder {
8282
private BiConsumer<Status, Throwable> errorsHandler = null;
8383

8484
/**
85-
* Sets an ID of a reader to be used for logging, tracing, etc. If is {@code null}, an autogenerated value will
86-
* be used.
85+
* Sets a prefix to be used in log messages of a reader. If is {@code null}, an autogenerated value will be
86+
* used.
8787
*
88-
* @param debugId the ID
88+
* @param logPrefix the prefix
8989
*
9090
* @return this builder
9191
*/
92-
public Builder setDebugId(String debugId) {
93-
this.debugId = debugId;
92+
public Builder setLogPrefix(String logPrefix) {
93+
this.logPrefix = logPrefix;
9494
return this;
9595
}
9696

topic/src/main/java/tech/ydb/topic/settings/WriterSettings.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class WriterSettings {
1212
private static final long MAX_MEMORY_USAGE_BYTES_DEFAULT = 20 * 1024 * 1024; // 20 MB
1313
private static final int MAX_IN_FLIGHT_COUNT_DEFAULT = 100000;
1414

15-
private final String debugId;
15+
private final String logPrefix;
1616
private final String topicPath;
1717
private final String producerId;
1818
private final String messageGroupId;
@@ -23,7 +23,7 @@ public class WriterSettings {
2323
private final BiConsumer<Status, Throwable> errorsHandler;
2424

2525
private WriterSettings(Builder builder) {
26-
this.debugId = builder.debugId;
26+
this.logPrefix = builder.logPrefix;
2727
this.topicPath = builder.topicPath;
2828
this.producerId = builder.producerId;
2929
this.messageGroupId = builder.messageGroupId;
@@ -38,8 +38,8 @@ public static Builder newBuilder() {
3838
return new Builder();
3939
}
4040

41-
public String getDebugId() {
42-
return debugId;
41+
public String getLogPrefix() {
42+
return logPrefix;
4343
}
4444

4545
public String getTopicPath() {
@@ -78,7 +78,7 @@ public int getMaxSendBufferMessagesCount() {
7878
* BUILDER
7979
*/
8080
public static class Builder {
81-
private String debugId = null;
81+
private String logPrefix = null;
8282
private String topicPath = null;
8383
private String producerId = null;
8484
private String messageGroupId = null;
@@ -89,15 +89,15 @@ public static class Builder {
8989
private BiConsumer<Status, Throwable> errorsHandler = null;
9090

9191
/**
92-
* Sets an ID of a writer to be used for logging, tracing, etc. If is {@code null}, an autogenerated value will
93-
* be used.
92+
* Sets a prefix to be used in log messages of a writer. If is {@code null}, an autogenerated value will be
93+
* used.
9494
*
95-
* @param debugId the ID
95+
* @param logPrefix the prefix
9696
*
9797
* @return this builder
9898
*/
99-
public Builder setDebugId(String debugId) {
100-
this.debugId = debugId;
99+
public Builder setLogPrefix(String logPrefix) {
100+
this.logPrefix = logPrefix;
101101
return this;
102102
}
103103

topic/src/main/java/tech/ydb/topic/write/impl/WriterImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public abstract class WriterImpl extends GrpcStreamRetrier {
6666
private CompletableFuture<WriteAck> lastAcceptedMessageFuture;
6767

6868
public WriterImpl(TopicRpc topicRpc, WriterSettings settings, Executor compressionExecutor) {
69-
super(settings.getDebugId(), topicRpc.getScheduler(), settings.getErrorsHandler());
69+
super(settings.getLogPrefix(), topicRpc.getScheduler(), settings.getErrorsHandler());
7070
this.topicRpc = topicRpc;
7171
this.settings = settings;
7272
this.session = new WriteSessionImpl();

0 commit comments

Comments
 (0)