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

com.instaclustr.cassandra.sidecar.operations.cleanup.CleanupOperationRequest Maven / Gradle / Ivy

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

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 cleanup
 * NAME
 *         nodetool cleanup - Triggers the immediate cleanup of keys no longer
 *         belonging to a node. By default, clean all keyspaces
 *
 * SYNOPSIS
 *         nodetool [(-h  | --host )] [(-p  | --port )]
 *                 [(-pw  | --password )]
 *                 [(-pwf  | --password-file )]
 *                 [(-u  | --username )] cleanup
 *                 [(-j  | --jobs )] [--] [ ...]
 *
 * OPTIONS
 *         -h , --host 
 *             Node hostname or ip address
 *
 *         -j , --jobs 
 *             Number of sstables to cleanup 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 CleanupOperationRequest extends OperationRequest { @NotEmpty public final String keyspace; public final Set tables; @Min(0) public final int jobs; public CleanupOperationRequest(@NotEmpty final String keyspace, final Set tables, @Min(0) final int jobs) { this("cleanup", keyspace, tables, jobs); } @JsonCreator public CleanupOperationRequest(@JsonProperty("type") final String type, @JsonProperty("keyspace") final String keyspace, @JsonProperty("tables") final Set tables, @JsonProperty("jobs") final int jobs) { this.jobs = jobs; this.keyspace = keyspace; this.tables = tables; this.type = type; } @Override public String toString() { return MoreObjects.toStringHelper(this) .add("tables", tables) .add("keyspace", keyspace) .add("jobs", jobs) .toString(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy