"Detect cassandra version : " + FBUtilities.getReleaseVersionString()); if (FBUtilities.getReleaseVersionString().compareTo(REPLACED_ADDRESS_MIN_VER) < 0) { System.setProperty("cassandra.replace_token", token); } else {
public String getReleaseVersion() { return FBUtilities.getReleaseVersionString(); }
public String getReleaseVersion() { return FBUtilities.getReleaseVersionString(); }
public String getReleaseVersion() { return FBUtilities.getReleaseVersionString(); }
public String getReleaseVersion() { return FBUtilities.getReleaseVersionString(); }
public static void main(String[] args) { System.out.println(getReleaseVersionString()); } }
public static void main(String[] args) { System.out.println(getReleaseVersionString()); } }
public static void main(String[] args) { System.out.println(getReleaseVersionString()); } }
public static void main(String[] args) { System.out.println(getReleaseVersionString()); } }
public void printBanner() { sessionState.out.println("Welcome to Cassandra CLI version " + FBUtilities.getReleaseVersionString() + "\n"); sessionState.out.println("The CLI is deprecated and will be removed in Cassandra 2.2. Consider migrating to cqlsh."); sessionState.out.println("CQL is fully backwards compatible with Thrift data; see http://www.datastax.com/dev/blog/thrift-to-cql3\n"); sessionState.out.println(getHelp().banner); }
public VersionedValue releaseVersion() { return new VersionedValue(FBUtilities.getReleaseVersionString()); }
public VersionedValue releaseVersion() { return releaseVersion(FBUtilities.getReleaseVersionString()); }
public VersionedValue releaseVersion() { return releaseVersion(FBUtilities.getReleaseVersionString()); }
public VersionedValue releaseVersion() { return releaseVersion(FBUtilities.getReleaseVersionString()); }
/** * Compare the release version in the system.local table with the one included in the distro. * If they don't match, snapshot all tables in the system keyspace. This is intended to be * called at startup to create a backup of the system tables during an upgrade * * @throws IOException */ public static boolean snapshotOnVersionChange() throws IOException { String previous = getPreviousVersionString(); String next = FBUtilities.getReleaseVersionString(); // if we're restarting after an upgrade, snapshot the system keyspace if (!previous.equals(NULL_VERSION.toString()) && !previous.equals(next)) { logger.info("Detected version upgrade from {} to {}, snapshotting system keyspace", previous, next); String snapshotName = Keyspace.getTimestampedSnapshotName(String.format("upgrade-%s-%s", previous, next)); Keyspace systemKs = Keyspace.open(SchemaConstants.SYSTEM_KEYSPACE_NAME); systemKs.snapshot(snapshotName, null); return true; } return false; }
/** * Compare the release version in the system.local table with the one included in the distro. * If they don't match, snapshot all tables in the system keyspace. This is intended to be * called at startup to create a backup of the system tables during an upgrade * * @throws IOException */ public static boolean snapshotOnVersionChange() throws IOException { String previous = getPreviousVersionString(); String next = FBUtilities.getReleaseVersionString(); // if we're restarting after an upgrade, snapshot the system keyspace if (!previous.equals(NULL_VERSION.toString()) && !previous.equals(next)) { logger.info("Detected version upgrade from {} to {}, snapshotting system keyspace", previous, next); String snapshotName = Keyspace.getTimestampedSnapshotName(String.format("upgrade-%s-%s", previous, next)); Keyspace systemKs = Keyspace.open(SchemaConstants.SYSTEM_KEYSPACE_NAME); systemKs.snapshot(snapshotName, null); return true; } return false; }
/** * Compare the release version in the system.local table with the one included in the distro. * If they don't match, snapshot all tables in the system keyspace. This is intended to be * called at startup to create a backup of the system tables during an upgrade * * @throws IOException */ public static boolean snapshotOnVersionChange() throws IOException { String previous = getPreviousVersionString(); String next = FBUtilities.getReleaseVersionString(); // if we're restarting after an upgrade, snapshot the system keyspace if (!previous.equals(NULL_VERSION.toString()) && !previous.equals(next)) { logger.info("Detected version upgrade from {} to {}, snapshotting system keyspace", previous, next); String snapshotName = Keyspace.getTimestampedSnapshotName(String.format("upgrade-%s-%s", previous, next)); Keyspace systemKs = Keyspace.open(SchemaConstants.SYSTEM_KEYSPACE_NAME); systemKs.snapshot(snapshotName, null); return true; } return false; }
private static void setupVersion() { String req = "INSERT INTO system.%s (key, release_version, cql_version, thrift_version, native_protocol_version, data_center, rack, partitioner, rpc_address, broadcast_address, listen_address) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; IEndpointSnitch snitch = DatabaseDescriptor.getEndpointSnitch(); executeOnceInternal(String.format(req, LOCAL_CF), LOCAL_KEY, FBUtilities.getReleaseVersionString(), QueryProcessor.CQL_VERSION.toString(), cassandraConstants.VERSION, String.valueOf(Server.CURRENT_VERSION), snitch.getDatacenter(FBUtilities.getBroadcastAddress()), snitch.getRack(FBUtilities.getBroadcastAddress()), DatabaseDescriptor.getPartitioner().getClass().getName(), DatabaseDescriptor.getRpcAddress(), FBUtilities.getBroadcastAddress(), FBUtilities.getLocalAddress()); }
/** * Get release version for given endpoint. * If release version is unknown, then this returns null. * * @param ep endpoint address to check * @return Release version or null if version is unknown. */ public static CassandraVersion getReleaseVersion(InetAddress ep) { try { if (FBUtilities.getBroadcastAddress().equals(ep)) { return new CassandraVersion(FBUtilities.getReleaseVersionString()); } String req = "SELECT release_version FROM system.%s WHERE peer=?"; UntypedResultSet result = executeInternal(String.format(req, PEERS), ep); if (result != null && result.one().has("release_version")) { return new CassandraVersion(result.one().getString("release_version")); } // version is unknown return null; } catch (IllegalArgumentException e) { // version string cannot be parsed return null; } }
/** * Get release version for given endpoint. * If release version is unknown, then this returns null. * * @param ep endpoint address to check * @return Release version or null if version is unknown. */ public static CassandraVersion getReleaseVersion(InetAddress ep) { try { if (FBUtilities.getBroadcastAddress().equals(ep)) { return new CassandraVersion(FBUtilities.getReleaseVersionString()); } String req = "SELECT release_version FROM system.%s WHERE peer=?"; UntypedResultSet result = executeInternal(String.format(req, PEERS), ep); if (result != null && result.one().has("release_version")) { return new CassandraVersion(result.one().getString("release_version")); } // version is unknown return null; } catch (IllegalArgumentException e) { // version string cannot be parsed return null; } }