[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. */ /** The fetch task used to fetch data of a snapshot split or stream split. */
FetchTask<SourceSplitBase> createFetchTask(SourceSplitBase sourceSplitBase); 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); FetchTask.Context createFetchTaskContext(SourceSplitBase sourceSplitBase);
} }

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

@ -39,7 +39,7 @@ public class StreamSplitMetaEvent implements SourceEvent {
/** The metadata of binlog split is divided to multiple groups. */ /** The metadata of binlog split is divided to multiple groups. */
private final int metaGroupId; 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#serialize()} and {@link
* FinishedSnapshotSplitInfo#deserialize(byte[])}. * 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; import com.ververica.cdc.connectors.base.source.reader.JdbcIncrementalSourceReader;
/** /**
* The {@link SourceEvent} that {@link IncrementalSourceEnumerator} sends to {@link * The {@link SourceEvent} that {@link JdbcIncrementalSourceReader} sends to {@link
* JdbcIncrementalSourceReader} to pull binlog meta data, i.e. sending {@link StreamSplitMetaEvent}. * IncrementalSourceEnumerator} to pull binlog metadata, i.e. sending {@link StreamSplitMetaEvent}.
*/ */
public class StreamSplitMetaRequestEvent implements SourceEvent { public class StreamSplitMetaRequestEvent implements SourceEvent {

@ -27,11 +27,11 @@ import java.util.Map;
import java.util.Objects; 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. * set etc.
* *
* <p>This structure can also be used to deal the binlog event in transaction, a transaction may * <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 * from a specific {@link Offset}, we need to skip the processed change events and the processed
* rows. * rows.
*/ */

@ -40,7 +40,7 @@ public class SnapshotSplit extends SourceSplitBase {
@Nullable private final Object[] splitStart; @Nullable private final Object[] splitStart;
@Nullable private final Object[] splitEnd; @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 private final Offset highWatermark;
@Nullable transient byte[] serializedFormCache; @Nullable transient byte[] serializedFormCache;

@ -22,7 +22,7 @@ import com.ververica.cdc.connectors.base.source.meta.offset.Offset;
import javax.annotation.Nullable; 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 { public class SnapshotSplitState extends SourceSplitState {
@Nullable private Offset highWatermark; @Nullable private Offset highWatermark;
@ -56,11 +56,6 @@ public class SnapshotSplitState extends SourceSplitState {
@Override @Override
public String toString() { public String toString() {
return "MySqlSnapshotSplitState{" return "SnapshotSplitState{highWatermark=" + highWatermark + ", split=" + split + '}';
+ "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( public static StreamSplit appendFinishedSplitInfos(
StreamSplit binlogSplit, List<FinishedSnapshotSplitInfo> splitInfos) { StreamSplit binlogSplit, List<FinishedSnapshotSplitInfo> splitInfos) {

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

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

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

@ -312,7 +312,7 @@ public class SourceRecordUtils {
case READ: case READ:
throw new IllegalStateException( throw new IllegalStateException(
String.format( 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)); binlog));
} }
} }

Loading…
Cancel
Save