All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.instaclustr.cassandra.sidecar.operations.upgradesstables.UpgradeSSTablesOperationRequest Maven / Gradle / Ivy

There is a newer version: 2.0.0-alpha8
Show newest version
package com.instaclustr.cassandra.sidecar.operations.upgradesstables;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import java.util.Set;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.MoreObjects;
import com.instaclustr.operations.OperationRequest;

/**
 * 
 * {@code
 * $ nodetool help upgradesstables
 * NAME
 *         nodetool upgradesstables - Rewrite sstables (for the requested tables)
 *         that are not on the current version (thus upgrading them to said current
 *         version)
 *
 * SYNOPSIS
 *         nodetool [(-h  | --host )] [(-p  | --port )]
 *                 [(-pw  | --password )]
 *                 [(-pwf  | --password-file )]
 *                 [(-u  | --username )] upgradesstables
 *                 [(-a | --include-all-sstables)] [(-j  | --jobs )] [--]
 *                 [ ...]
 *
 * OPTIONS
 *         -a, --include-all-sstables
 *             Use -a to include all sstables, even those already on the current
 *             version
 *
 *         -h , --host 
 *             Node hostname or ip address
 *
 *         -j , --jobs 
 *             Number of sstables to upgrade simultanously, set to 0 to use all
 *             available compaction threads
 *
 *         -p , --port 
 *             Remote jmx agent port number
 *
 *         -pw , --password 
 *             Remote jmx agent password
 *
 *         -pwf , --password-file 
 *             Path to the JMX password file
 *
 *         -u , --username 
 *             Remote jmx agent username
 *
 *         --
 *             This option can be used to separate command-line options from the
 *             list of argument, (useful when arguments might be mistaken for
 *             command-line options
 *
 *         [ ...]
 *             The keyspace followed by one or many tables
 * }
*/ public class UpgradeSSTablesOperationRequest extends OperationRequest { public final boolean includeAllSStables; @Min(0) public final int jobs; @NotEmpty public final String keyspace; public final Set tables; @JsonCreator public UpgradeSSTablesOperationRequest(@JsonProperty("type") final String type, @JsonProperty("keyspace") final String keyspace, @JsonProperty("tables") final Set tables, @JsonProperty("includeAllSStables") final boolean includeAllSStables, @JsonProperty("jobs") final int jobs) { this.jobs = jobs; this.keyspace = keyspace; this.tables = tables; this.includeAllSStables = includeAllSStables; this.type = type; } @Override public String toString() { return MoreObjects.toStringHelper(this) .add("keyspace", keyspace) .add("tables", tables) .add("jobs", jobs) .add("includeAllSStables", includeAllSStables) .toString(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy