Unverified Commit a4b189de authored by ZackYoung's avatar ZackYoung Committed by GitHub

[Fix]Fix some bug (#2355)

* add read checkpoint * optimize sse complete * optimize sse complete * update MysqlCdcSource * update checkpoint read * update checkpoint read * fix_some_bug
parent a4210381
......@@ -112,7 +112,6 @@ public class CheckpointRead implements CheckpointReadInterface {
new RegisteredOperatorStateBackendMetaInfo<>(stateMetaInfoSnapshot));
;
deserializeOperatorStateValues(partitionableListState, in, value);
partitionableListState.get().forEach(System.out::println);
// get checkpoint data
CheckpointReadFactory.getTable(partitionableListState)
.ifPresent(tableVO -> map.put(key, tableVO));
......
......@@ -30,6 +30,7 @@ import com.ververica.cdc.connectors.mysql.source.split.MySqlSplit;
import com.ververica.cdc.connectors.mysql.source.split.MySqlSplitSerializer;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
......@@ -82,12 +83,12 @@ public class MysqlCdcSource extends BaseCheckpointSource<MySqlSplit> {
JSONUtil.toJsonPrettyStr(split.getFinishedSnapshotSplitInfos()));
} else if (d.isSnapshotSplit()) {
MySqlSnapshotSplit split = d.asSnapshotSplit();
jsonObject.set("table-id", split.getTableId());
jsonObject.set("table-id", split.getTableId().identifier());
jsonObject.set("split-id", split.splitId());
jsonObject.set("split-key-type", split.getSplitKeyType());
jsonObject.set("split-start", split.getSplitStart());
jsonObject.set("split-end", split.getSplitEnd());
jsonObject.set("high-watermark", split.getHighWatermark());
jsonObject.set("split-key-type", split.getSplitKeyType().toString());
jsonObject.set("split-start", JSONUtil.toJsonStr(split.getSplitStart()));
jsonObject.set("split-end", JSONUtil.toJsonStr(split.getSplitEnd()));
jsonObject.set("high-watermark", StrUtil.toString(split.getHighWatermark()));
}
return jsonObject;
......
......@@ -76,6 +76,7 @@ const DagDataNode = (props: any) => {
);
}
const backpressure = data.backpressure;
return (
<Card
style={{ width: '250px', padding: 0, margin: 0, height: 140 }}
......@@ -97,13 +98,13 @@ const DagDataNode = (props: any) => {
<Text style={{ display: 'inline-flex', alignItems: 'center' }} type='secondary'>
{' '}
{l('devops.baseinfo.busy')}:
{renderRatio(data.backpressure.subtasks[0]?.busyRatio, false)}
{renderRatio(backpressure?backpressure.subtasks[0]?.busyRatio:0, false)}
</Text>
</Col>
<Col flex='auto'>
<Text type='secondary' ellipsis>
{l('devops.baseinfo.backpressure')}:
<StatusTag status={data.backpressure.status} bordered={false} animation={false} />
<StatusTag status={backpressure?backpressure.status:0} bordered={false} animation={false} />
</Text>
</Col>
</Row>
......@@ -112,7 +113,7 @@ const DagDataNode = (props: any) => {
<Col flex='35%'>
<Text style={{ display: 'inline-flex', alignItems: 'center' }} type='secondary'>
{l('devops.baseinfo.idle')}:
{renderRatio(data.backpressure.subtasks[0]?.idleRatio, true)}
{renderRatio(backpressure?backpressure.subtasks[0]?.idleRatio:0, true)}
</Text>
</Col>
<Col flex='auto'>
......
......@@ -156,7 +156,7 @@ const FlinkDag = (props: DagProps) => {
const [selectPath, setSelectPath] = useState<string>('');
const key = id + selectPath;
const [itemChildren, setItemChildren] = useState({[key]: [] as TabsProps['items']});
const checkpointArray = (checkPoints.history as any[]).filter(x => x.status === "COMPLETED").map(x => {
const checkpointArray = ((checkPoints.history?? []) as any[]).filter(x => x.status === "COMPLETED").map(x => {
return {checkpointType: x.checkpoint_type, path: x.external_path, id: x.id}
});
useEffect(() => {
......@@ -241,7 +241,7 @@ const FlinkDag = (props: DagProps) => {
},
{
key: '2',
label: 'CheckPoint Read',
label: 'CheckPointRead',
children: renderCheckpoint(currentSelect?.id),
},
]} tabBarGutter={10}/>}
......
......@@ -98,7 +98,7 @@ const StatusTag = (props: StatusTagProps) => {
return {
icon: <SyncOutlined spin />,
color: 'default',
text: 'UNKNOWN Status'
text: 'UNKNOWN'
};
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment