Skip to content
Open
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
3 changes: 0 additions & 3 deletions src/java/org/apache/cassandra/db/virtual/GossipInfoTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ final class GossipInfoTable extends AbstractVirtualTable

static final String ADDRESS = "address";
static final String PORT = "port";
static final String HOSTNAME = "hostname";
static final String GENERATION = "generation";
static final String HEARTBEAT = "heartbeat";

Expand Down Expand Up @@ -96,7 +95,6 @@ public DataSet data()
EndpointState localState = new EndpointState(entry.getValue());

SimpleDataSet dataSet = result.row(endpoint.getAddress(), endpoint.getPort())
.column(HOSTNAME, endpoint.getHostName())
.column(GENERATION, getGeneration(localState))
.column(HEARTBEAT, getHeartBeat(localState));

Expand Down Expand Up @@ -173,7 +171,6 @@ private static TableMetadata buildTableMetadata(String keyspace)
.partitioner(new LocalPartitioner(InetAddressType.instance))
.addPartitionKeyColumn(ADDRESS, InetAddressType.instance)
.addClusteringColumn(PORT, Int32Type.instance)
.addRegularColumn(HOSTNAME, UTF8Type.instance)
.addRegularColumn(GENERATION, Int32Type.instance)
.addRegularColumn(HEARTBEAT, Int32Type.instance);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public void config()
public void testSelectAll() throws Throwable
{
ResultSet result = executeNet("SELECT * FROM vts.clients");
assertThat(result.getColumnDefinitions().size()).isEqualTo(12);

for (Row r : result)
{
Expand All @@ -65,7 +66,6 @@ public void testSelectAll() throws Throwable
Assert.assertNotNull(r.getMap("client_options", String.class, String.class));
Assert.assertTrue(r.getLong("request_count") > 0 );
// the following are questionable if they belong here
Assert.assertEquals("localhost", r.getString("hostname"));
Assertions.assertThat(r.getMap("client_options", String.class, String.class))
.hasEntrySatisfying("DRIVER_VERSION", value -> assertThat(value.contains(r.getString("driver_name"))))
.hasEntrySatisfying("DRIVER_VERSION", value -> assertThat(value.contains(r.getString("driver_version"))));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,12 @@ public void testSelectAllWithStateTransitions() throws Throwable

assertThat(resultSet.size()).isEqualTo(1);
UntypedResultSet.Row row = resultSet.one();
assertThat(row.getColumns().size()).isEqualTo(64);
assertThat(row.getColumns().size()).isEqualTo(63);

assertThat(endpoint).isNotNull();
assertThat(localState).isNotNull();
assertThat(row.getInetAddress("address")).isEqualTo(endpoint.getAddress());
assertThat(row.getInt("port")).isEqualTo(endpoint.getPort());
assertThat(row.getString("hostname")).isEqualTo(endpoint.getHostName());
assertThat(row.getInt("generation")).isEqualTo(localState.getHeartBeatState().getGeneration());
assertThat(row.getInt("heartbeat")).isNotNull();

Expand Down