Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ private void tryOpen() {
assert this.session == null;
try {
this.open();
} catch (InvalidQueryException ignored) {}
} catch (InvalidQueryException ignored) {
// ignore
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ private Map<TokenRange, Long> getSubSplits(TokenRange tokenRange,
private Map<TokenRange, Set<Host>> getRangeMap() {
Metadata metadata = this.session.metadata();
return metadata.getTokenRanges().stream().collect(Collectors.toMap(
p -> p,
p -> metadata.getReplicas('"' + this.keyspace + '"', p)));
p -> p,
p -> metadata.getReplicas('"' + this.keyspace + '"', p)));
}

private static Map<TokenRange, Long> describeSplits(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,12 +475,12 @@ protected boolean existsKeyspace() {
}

protected boolean existsTable(String table) {
KeyspaceMetadata keyspace = this.cluster().getMetadata()
KeyspaceMetadata keyspace = this.cluster().getMetadata()
.getKeyspace(this.keyspace);
if (keyspace != null && keyspace.getTable(table) != null) {
return true;
}
return false;
if (keyspace != null && keyspace.getTable(table) != null) {
return true;
}
return false;
}

protected void initKeyspace() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ public Number queryNumber(CassandraSessionPool.Session session,
statement.setReadTimeoutMillis(timeout * 1000);
return session.query(statement);
}, (q, rs) -> {
Row row = rs.one();
if (row == null) {
return IteratorUtils.of(aggregate.defaultValue());
}
return IteratorUtils.of(row.getLong(0));
});
Row row = rs.one();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we keep the origin indentation style?

if (row == null) {
return IteratorUtils.of(aggregate.defaultValue());
}
return IteratorUtils.of(row.getLong(0));
});
Comment on lines +111 to +115
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how could it add 8 space in IDE's behavior? seems it's confuse

return aggregate.reduce(results);
}

Expand Down