Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cassandra): adapt hugegraph-cassandra from 3.11.12 to 4.0.10 #2260

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion hugegraph-cassandra/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<dependency>
<groupId>org.apache.cassandra</groupId>
<artifactId>cassandra-all</artifactId>
<version>3.11.12</version>
<version>4.0.10</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ protected Map<String, Object> getMetricsByHost(String host) {
metrics.put(DISK_USAGE, UnitUtil.bytesToGB(diskSize));
metrics.put(DISK_USAGE + READABLE,
UnitUtil.bytesToReadableString(diskSize));
metrics.put(DISK_USAGE + "_details", probe.getLoadMap());
metrics.put(DISK_USAGE + "_details", probe.getLoadMap(false));
metrics.put(DISK_UNIT, "GB");

// Uptime Metrics
Expand All @@ -125,11 +125,11 @@ protected Map<String, Object> getMetricsByHost(String host) {
this.appendExtraMetrics(metrics, probe);

// Nodes Metrics
metrics.put("live_nodes", probe.getLiveNodes());
metrics.put("joining_nodes", probe.getJoiningNodes());
metrics.put("moving_nodes", probe.getMovingNodes());
metrics.put("leaving_nodes", probe.getLeavingNodes());
metrics.put("unreachable_nodes", probe.getUnreachableNodes());
metrics.put("live_nodes", probe.getLiveNodes(false));
metrics.put("joining_nodes", probe.getJoiningNodes(false));
metrics.put("moving_nodes", probe.getMovingNodes(false));
metrics.put("leaving_nodes", probe.getLeavingNodes(false));
metrics.put("unreachable_nodes", probe.getUnreachableNodes(false));

// Others
metrics.put("keyspaces", probe.getKeyspaces());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;

import org.apache.cassandra.config.SchemaConstants;
import org.apache.cassandra.schema.SchemaConstants;
import org.apache.cassandra.db.SystemKeyspace;
import org.apache.cassandra.dht.ByteOrderedPartitioner;
import org.apache.cassandra.dht.IPartitioner;
Expand Down Expand Up @@ -222,7 +222,7 @@ private static Map<TokenRange, Long> describeSplits(
"WHERE keyspace_name = ? AND table_name = ? AND " +
"range_start = ? AND range_end = ?",
SchemaConstants.SYSTEM_KEYSPACE_NAME,
SystemKeyspace.SIZE_ESTIMATES);
SystemKeyspace.LEGACY_SIZE_ESTIMATES);

ResultSet resultSet = session.execute(query, keyspace, table,
tokenRange.getStart().toString(),
Expand Down