本文整理了Java中com.datastax.driver.core.Row.getInet
方法的一些代码示例,展示了Row.getInet
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Row.getInet
方法的具体详情如下:
包路径:com.datastax.driver.core.Row
类名称:Row
方法名:getInet
[英]Returns the ith value of this row as an InetAddress.
[中]将此行的第i个值作为InetAddress返回。
代码示例来源:origin: prestodb/presto
return Long.toString(row.getTimestamp(i).getTime());
case INET:
return CassandraCqlUtils.quoteStringLiteral(toAddrString(row.getInet(i)));
case VARINT:
return row.getVarint(i).toString();
代码示例来源:origin: apache/ignite
return row.getInet(col);
代码示例来源:origin: prestodb/presto
return NullableValue.of(nativeType, row.getTimestamp(i).getTime());
case INET:
return NullableValue.of(nativeType, utf8Slice(toAddrString(row.getInet(i))));
case VARINT:
return NullableValue.of(nativeType, utf8Slice(row.getVarint(i).toString()));
代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core
InetAddress nativeAddress = peersRow.getInet("native_address");
int nativePort = peersRow.getInt("native_port");
return cluster.translateAddress(new InetSocketAddress(nativeAddress, nativePort));
InetAddress broadcastAddress = peersRow.getInet("peer");
InetAddress rpcAddress = peersRow.getInet("rpc_address");
代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core
private String formatInvalidPeer(Row peerRow) {
StringBuilder sb = new StringBuilder("[peer=" + peerRow.getInet("peer"));
if (isPeersV2) {
formatMissingOrNullColumn(peerRow, "native_address", sb);
formatMissingOrNullColumn(peerRow, "native_port", sb);
} else {
formatMissingOrNullColumn(peerRow, "rpc_address", sb);
}
if (EXTENDED_PEER_CHECK) {
formatMissingOrNullColumn(peerRow, "host_id", sb);
formatMissingOrNullColumn(peerRow, "data_center", sb);
formatMissingOrNullColumn(peerRow, "rack", sb);
formatMissingOrNullColumn(peerRow, "tokens", sb);
}
sb.append("]");
return sb.toString();
}
代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core
row.getColumnDefinitions().contains("peer_port") ? row.getInt("peer_port") : 0;
InetSocketAddress broadcastAddress =
new InetSocketAddress(row.getInet("peer"), broadcastPort);
row.getColumnDefinitions().contains("listen_port") ? row.getInt("listen_port") : 0;
InetSocketAddress listenAddress =
new InetSocketAddress(row.getInet("listen_address"), listenPort);
listenAddresses.add(listenAddress);
} else {
代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core
coordinator = sessRow.getInet("coordinator");
if (!sessRow.isNull("parameters"))
parameters =
evRow.getString("activity"),
evRow.getUUID("event_id").timestamp(),
evRow.getInet("source"),
evRow.getInt("source_elapsed"),
evRow.getString("thread")));
代码示例来源:origin: Impetus/Kundera
retVal = row.getInet(columnName);
setFieldValue(entity, member, retVal);
break;
代码示例来源:origin: jsevellec/cassandra-unit
@Override
public InetAddress getInet(String name)
{
return row.getInet(name);
}
代码示例来源:origin: org.apache.cassandra/cassandra-all
@Override
public InetAddress getInet(int i)
{
return row.getInet(i);
}
代码示例来源:origin: jsevellec/cassandra-unit
@Override
public InetAddress getInet(int i)
{
return row.getInet(i);
}
代码示例来源:origin: com.strapdata.cassandra/cassandra-all
@Override
public InetAddress getInet(int i)
{
return row.getInet(i);
}
代码示例来源:origin: com.strapdata.cassandra/cassandra-all
@Override
public InetAddress getInet(String name)
{
return row.getInet(name);
}
代码示例来源:origin: com.tuplejump/calliope-core
@Override
public InetAddress getInet(String name) {
return row.getInet(name);
}
代码示例来源:origin: net.oneandone.troilus/troilus-core-java7
@Override
public InetAddress getInet(String name) {
return row.getInet(name);
}
代码示例来源:origin: org.apache.cassandra/cassandra-all
@Override
public InetAddress getInet(String name)
{
return row.getInet(name);
}
代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core
@Test(groups = "short")
public void should_check_agreement_through_cluster_metadata() {
Cluster controlCluster = register(TestUtils.buildControlCluster(cluster(), ccm()));
Session controlSession = controlCluster.connect();
Row localRow = controlSession.execute("SELECT schema_version FROM system.local").one();
UUID localVersion = localRow.getUUID("schema_version");
Row peerRow = controlSession.execute("SELECT peer, schema_version FROM system.peers").one();
InetAddress peerAddress = peerRow.getInet("peer");
UUID peerVersion = peerRow.getUUID("schema_version");
// The two nodes should be in agreement at this point, but check just in case:
assertThat(localVersion).isEqualTo(peerVersion);
// Now check the method under test:
assertThat(cluster().getMetadata().checkSchemaAgreement()).isTrue();
// Insert a fake version to simulate a disagreement:
forceSchemaVersion(controlSession, peerAddress, UUIDs.random());
assertThat(cluster().getMetadata().checkSchemaAgreement()).isFalse();
forceSchemaVersion(controlSession, peerAddress, peerVersion);
}
代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core
int broadcastPort =
row.getColumnDefinitions().contains("peer_port") ? row.getInt("peer_port") : 0;
broadcastAddress = new InetSocketAddress(row.getInet("peer"), broadcastPort);
} else if (row.getColumnDefinitions().contains("broadcast_address")) { // system.local
int broadcastPort =
row.getColumnDefinitions().contains("broadcast_port") ? row.getInt("broadcast_port") : 0;
broadcastAddress = new InetSocketAddress(row.getInet("broadcast_address"), broadcastPort);
int listenPort =
row.getColumnDefinitions().contains("listen_port") ? row.getInt("listen_port") : 0;
listenAddress = new InetSocketAddress(row.getInet("listen_address"), listenPort);
代码示例来源:origin: io.prestosql.cassandra/cassandra-driver
private static String formatInvalidPeer(Row peerRow) {
StringBuilder sb = new StringBuilder("[peer=" + peerRow.getInet("peer"));
formatMissingOrNullColumn(peerRow, "rpc_address", sb);
if (EXTENDED_PEER_CHECK) {
formatMissingOrNullColumn(peerRow, "host_id", sb);
formatMissingOrNullColumn(peerRow, "data_center", sb);
formatMissingOrNullColumn(peerRow, "rack", sb);
formatMissingOrNullColumn(peerRow, "tokens", sb);
}
sb.append("]");
return sb.toString();
}
代码示例来源:origin: com.stratio.cassandra/cassandra-driver-core
private static void updateInfo(Host host, Row row, Cluster.Manager cluster) {
if (!row.isNull("data_center") || !row.isNull("rack"))
updateLocationInfo(host, row.getString("data_center"), row.getString("rack"), cluster);
String version = row.getString("release_version");
// We don't know if it's a 'local' or a 'peers' row, and only 'peers' rows have the 'peer' field.
InetAddress listenAddress = row.getColumnDefinitions().contains("peer")
? row.getInet("peer")
: null;
host.setVersionAndListenAdress(version, listenAddress);
}
内容来源于网络,如有侵权,请联系作者删除!