Skip to content

Commit

Permalink
Address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
GOODBOY008 committed Oct 19, 2023
1 parent 33bf82e commit 231e790
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.netease.arctic.server.table;

import com.google.common.base.Objects;
import com.google.common.base.Preconditions;
import com.google.common.collect.Sets;
import com.netease.arctic.AmoroTable;
import com.netease.arctic.ams.api.BlockableOperation;
Expand Down Expand Up @@ -319,9 +320,7 @@ public void initialize() {
}

public TableRuntime getAndCheckExist(ServerTableIdentifier tableIdentifier) {
if (tableIdentifier == null) {
throw new IllegalArgumentException("ServerTableIdentifier is null");
}
Preconditions.checkArgument(tableIdentifier != null, "tableIdentifier cannot be null");
TableRuntime tableRuntime = getRuntime(tableIdentifier);
if (tableRuntime == null) {
throw new ObjectNotExistsException(tableIdentifier);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ private void open() throws MetaException {
LOG.info("Waiting " + retryDelaySeconds + " seconds before next connection attempt.");
Thread.sleep(retryDelaySeconds * 1000);
} catch (InterruptedException ignore) {
LOG.warn("Unexpected InterruptedException while waiting between connection retries.", ignore);
ignore.printStackTrace();
}
}
}
Expand Down Expand Up @@ -2310,7 +2310,7 @@ public NotificationEventResponse getNextNotification(
return rsp;
} else {
NotificationEventResponse filtered = new NotificationEventResponse();
if (rsp.getEvents() != null) {
if (rsp != null && rsp.getEvents() != null) {
for (NotificationEvent e : rsp.getEvents()) {
if (filter.accept(e)) {
filtered.addToEvents(e);
Expand Down

0 comments on commit 231e790

Please sign in to comment.