public RepairSession(
     Range<Token> range, String tablename, boolean isSequential, String... cfnames) {
   this(
       UUIDGen.makeType1UUIDFromHost(FBUtilities.getBroadcastAddress()).toString(),
       range,
       tablename,
       isSequential,
       cfnames);
 }
Ejemplo n.º 2
0
 public DropKeyspace(String name, boolean blockOnFileDeletion)
     throws ConfigurationException, IOException {
   super(
       UUIDGen.makeType1UUIDFromHost(FBUtilities.getLocalAddress()),
       DatabaseDescriptor.getDefsVersion());
   this.name = name;
   this.blockOnFileDeletion = blockOnFileDeletion;
   KSMetaData ksm = DatabaseDescriptor.getTableDefinition(name);
   if (ksm == null) throw new ConfigurationException("Keyspace does not exist.");
   rm = makeDefinitionMutation(null, ksm, newVersion);
 }
Ejemplo n.º 3
0
  public DropColumnFamily(String tableName, String cfName)
      throws ConfigurationException, IOException {
    super(
        UUIDGen.makeType1UUIDFromHost(FBUtilities.getLocalAddress()),
        DatabaseDescriptor.getDefsVersion());
    this.tableName = tableName;
    this.cfName = cfName;

    KSMetaData ksm = DatabaseDescriptor.getTableDefinition(tableName);
    if (ksm == null) throw new ConfigurationException("Keyspace does not already exist.");
    else if (!ksm.cfMetaData().containsKey(cfName))
      throw new ConfigurationException("CF is not defined in that keyspace.");

    KSMetaData newKsm = makeNewKeyspaceDefinition(ksm);
    rm = Migration.makeDefinitionMutation(newKsm, null, newVersion);
  }