Skip to content

Commit

Permalink
[Improve][Zeta] Remove assert key words (apache#5947)
Browse files Browse the repository at this point in the history
  • Loading branch information
CheneyYin authored Dec 2, 2023
1 parent 8a71b9e commit dcb4549
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions release-note.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
- [Zeta] Improve Zeta operation max count and ignore NPE (#4787)
- [Zeta] Remove serialize(deserialize) cost when use shuffle action (#4722)
- [zeta] Checkpoint exception status messages exclude state data (#5547)
- [Zeta] Remove assert key words (#5947)

## Feature

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import io.debezium.annotation.Immutable;
import io.debezium.relational.Selectors.TableIdToStringMapper;
import io.debezium.schema.DataCollectionId;
import lombok.NonNull;

import java.io.Serializable;

Expand Down Expand Up @@ -97,12 +98,11 @@ protected static TableId parse(String[] parts, int numParts, boolean useCatalogB
public TableId(
String catalogName,
String schemaName,
String tableName,
@NonNull String tableName,
TableIdToStringMapper tableIdMapper) {
this.catalogName = catalogName;
this.schemaName = schemaName;
this.tableName = tableName;
assert this.tableName != null;
this.id =
tableIdMapper == null
? tableId(this.catalogName, this.schemaName, this.tableName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,13 @@ CompletableFuture<PendingCheckpoint> triggerPendingCheckpoint(
long triggerTimestamp,
CompletableFuture<Long> idFuture,
CheckpointType checkpointType) {
assert Thread.holdsLock(lock);
if (!Thread.holdsLock(lock)) {
throw new RuntimeException(
String.format(
"Unsafe invoke, the current thread[%s] has not acquired the lock[%s].",
Thread.currentThread().getName(), this.lock.toString()));
}

latestTriggerTimestamp.set(triggerTimestamp);
return idFuture.thenApplyAsync(
checkpointId ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ private void getSystemMonitoringInformation(HttpGetCommand command) {
} catch (InterruptedException | ExecutionException e) {
logger.severe("get system monitoring information fail", e);
}
assert input != null;
String[] parts = input.split(", ");
JsonObject jobInfo = new JsonObject();
Arrays.stream(parts)
Expand Down

0 comments on commit dcb4549

Please sign in to comment.