[docs][cdc-base] Optimize annotations (#1320)

This closes #1320.
pull/1339/head
Hang Ruan 3 years ago committed by GitHub
parent ccaaf4695d
commit c4429a962c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -70,6 +70,6 @@ public interface DataSourceDialect<ID extends DataCollectionId, S, C extends Sou
/** The fetch task used to fetch data of a snapshot split or stream split. */
FetchTask<SourceSplitBase> createFetchTask(SourceSplitBase sourceSplitBase);
/** The task context used fot fetch task to fetch data from external systems. */
/** The task context used for fetch task to fetch data from external systems. */
FetchTask.Context createFetchTaskContext(SourceSplitBase sourceSplitBase);
}

@ -27,8 +27,8 @@ import com.ververica.cdc.connectors.base.source.reader.JdbcIncrementalSourceRead
import java.util.Map;
/**
* The {@link SourceEvent} that {@link IncrementalSourceEnumerator} sends to {@link
* JdbcIncrementalSourceReader} to notify the snapshot split has read finished with the consistent
* The {@link SourceEvent} that {@link JdbcIncrementalSourceReader} sends to {@link
* IncrementalSourceEnumerator} to notify the snapshot split has read finished with the consistent
* binlog position.
*/
public class FinishedSnapshotSplitsReportEvent implements SourceEvent {

@ -28,7 +28,7 @@ import java.util.List;
/**
* The {@link SourceEvent} that {@link IncrementalSourceEnumerator} sends to {@link
* JdbcIncrementalSourceReader} to pass binlog meta data, i.e. {@link FinishedSnapshotSplitInfo}.
* JdbcIncrementalSourceReader} to pass binlog metadata, i.e. {@link FinishedSnapshotSplitInfo}.
*/
public class StreamSplitMetaEvent implements SourceEvent {
@ -36,10 +36,10 @@ public class StreamSplitMetaEvent implements SourceEvent {
private final String splitId;
/** The meta data of binlog split is divided to multiple groups. */
/** The metadata of binlog split is divided to multiple groups. */
private final int metaGroupId;
/**
* The serialized meta data of binlog split, it's serialized/deserialize by {@link
* The serialized metadata of binlog split, it's serialized/deserialized by {@link
* FinishedSnapshotSplitInfo#serialize()} and {@link
* FinishedSnapshotSplitInfo#deserialize(byte[])}.
*/

@ -24,8 +24,8 @@ import com.ververica.cdc.connectors.base.source.enumerator.IncrementalSourceEnum
import com.ververica.cdc.connectors.base.source.reader.JdbcIncrementalSourceReader;
/**
* The {@link SourceEvent} that {@link IncrementalSourceEnumerator} sends to {@link
* JdbcIncrementalSourceReader} to pull binlog meta data, i.e. sending {@link StreamSplitMetaEvent}.
* The {@link SourceEvent} that {@link JdbcIncrementalSourceReader} sends to {@link
* IncrementalSourceEnumerator} to pull binlog metadata, i.e. sending {@link StreamSplitMetaEvent}.
*/
public class StreamSplitMetaRequestEvent implements SourceEvent {

@ -27,11 +27,11 @@ import java.util.Map;
import java.util.Objects;
/**
* A structure describes a fine grained offset in a binlog event including binlog position and gtid
* A structure describes a fine-grained offset in a binlog event including binlog position and gtid
* set etc.
*
* <p>This structure can also be used to deal the binlog event in transaction, a transaction may
* contains multiple change events, and each change event may contain multiple rows. When restart
* contain multiple change events, and each change event may contain multiple rows. When restart
* from a specific {@link Offset}, we need to skip the processed change events and the processed
* rows.
*/

@ -40,7 +40,7 @@ public class SnapshotSplit extends SourceSplitBase {
@Nullable private final Object[] splitStart;
@Nullable private final Object[] splitEnd;
/** The high watermark is not bull when the split read finished. */
/** The high watermark is not null when the split read finished. */
@Nullable private final Offset highWatermark;
@Nullable transient byte[] serializedFormCache;

@ -22,7 +22,7 @@ import com.ververica.cdc.connectors.base.source.meta.offset.Offset;
import javax.annotation.Nullable;
/** The state of split to describe the binlog of MySql table(s). */
/** The state of split to describe the snapshot of table(s). */
public class SnapshotSplitState extends SourceSplitState {
@Nullable private Offset highWatermark;
@ -56,11 +56,6 @@ public class SnapshotSplitState extends SourceSplitState {
@Override
public String toString() {
return "MySqlSnapshotSplitState{"
+ "highWatermark="
+ highWatermark
+ ", split="
+ split
+ '}';
return "SnapshotSplitState{highWatermark=" + highWatermark + ", split=" + split + '}';
}
}

@ -122,7 +122,7 @@ public class StreamSplit extends SourceSplitBase {
}
// -------------------------------------------------------------------
// factory utils to build new MySqlBinlogSplit instance
// factory utils to build new StreamSplit instance
// -------------------------------------------------------------------
public static StreamSplit appendFinishedSplitInfos(
StreamSplit binlogSplit, List<FinishedSnapshotSplitInfo> splitInfos) {

@ -80,7 +80,7 @@ public class StreamSplitState extends SourceSplitState {
@Override
public String toString() {
return "MySqlBinlogSplitState{"
return "StreamSplitState{"
+ "startingOffset="
+ startingOffset
+ ", endingOffset="

@ -87,7 +87,7 @@ public class JdbcSourceScanFetcher implements Fetcher<SourceRecord, SourceSplitB
} catch (Exception e) {
LOG.error(
String.format(
"Execute snapshot read task for mysql split %s fail",
"Execute snapshot read task for snapshot split %s fail",
currentSnapshotSplit),
e);
readException = e;

@ -88,7 +88,7 @@ public class JdbcSourceStreamFetcher implements Fetcher<SourceRecord, SourceSpli
} catch (Exception e) {
LOG.error(
String.format(
"Execute binlog read task for mysql split %s fail",
"Execute binlog read task for stream split %s fail",
currentStreamSplit),
e);
readException = e;

@ -312,7 +312,7 @@ public class SourceRecordUtils {
case READ:
throw new IllegalStateException(
String.format(
"Binlog record shouldn't use READ operation, the the record is %s.",
"Binlog record shouldn't use READ operation, the record is %s.",
binlog));
}
}

Loading…
Cancel
Save