> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# adminRemoveRanks

<div className="kinetica-javadoc">
  <ul className="member-list">
    <li>
      <div className="section detail" id="adminRemoveRanks(com.gpudb.protocol.AdminRemoveRanksRequest)">
        <h3>adminRemoveRanks</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksResponse" title="class in com.gpudb.protocol">AdminRemoveRanksResponse</a></span> <span className="element-name">adminRemoveRanks</span><wbr /><span className="parameters">(<a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksRequest" title="class in com.gpudb.protocol">AdminRemoveRanksRequest</a> request)</span> throws <span className="exceptions"><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></span></div>

        <div className="block">
          Remove one or more ranks from an existing Kinetica cluster. All data will be rebalanced to other ranks before the rank(s) is removed unless the <a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksRequest.Options#REBALANCE_SHARDED_DATA"><code>REBALANCE\_SHARDED\_DATA</code></a> or <a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksRequest.Options#REBALANCE_UNSHARDED_DATA"><code>REBALANCE\_UNSHARDED\_DATA</code></a> parameters are set to <a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksRequest.Options#FALSE"><code>FALSE</code></a> in the <a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksRequest#getOptions()"><code>options</code></a>, in which case the corresponding <a href="/content/concepts/tables/#sharding" target="_top">sharded data</a> and/or unsharded data (a.k.a. <a href="/content/concepts/tables/#random-sharding" target="_top">randomly-sharded</a>) will be deleted.
          <p> The database must be offline for this operation, see <a href="#adminOffline(com.gpudb.protocol.AdminOfflineRequest)"><code>adminOffline</code></a> </p>
          <p> This endpoint's processing time depends on the amount of data in the system, thus the API call may time out if run directly. It is recommended to run this endpoint asynchronously via <a href="#createJob(com.gpudb.protocol.CreateJobRequest)"><code>createJob</code></a>. </p>
          <p> <span className="b">Note:</span> This method should be used for on-premise deployments only.</p>
        </div>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>request</code> - <a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksRequest" title="class in com.gpudb.protocol"><code>Request</code></a> object containing the parameters for the operation.</div>
          <div className="dt">Returns:</div>
          <div className="dd"><a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksResponse" title="class in com.gpudb.protocol"><code>Response</code></a> object containing the results of the operation.</div>
          <div className="dt">Throws:</div>
          <div className="dd"><code><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></code> - if an error occurs during the operation.</div>
        </div>
      </div>
    </li>

    <li>
      <div className="section detail" id="adminRemoveRanks(java.util.List,java.util.Map)">
        <h3>adminRemoveRanks</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksResponse" title="class in com.gpudb.protocol">AdminRemoveRanksResponse</a></span> <span className="element-name">adminRemoveRanks</span><wbr /><span className="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" className="external-link">List</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>> ranks, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link">Map</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>,<wbr /><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>> options)</span> throws <span className="exceptions"><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></span></div>

        <div className="block">
          Remove one or more ranks from an existing Kinetica cluster. All data will be rebalanced to other ranks before the rank(s) is removed unless the <a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksRequest.Options#REBALANCE_SHARDED_DATA"><code>REBALANCE\_SHARDED\_DATA</code></a> or <a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksRequest.Options#REBALANCE_UNSHARDED_DATA"><code>REBALANCE\_UNSHARDED\_DATA</code></a> parameters are set to <a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksRequest.Options#FALSE"><code>FALSE</code></a> in the <code>options</code>, in which case the corresponding <a href="/content/concepts/tables/#sharding" target="_top">sharded data</a> and/or unsharded data (a.k.a. <a href="/content/concepts/tables/#random-sharding" target="_top">randomly-sharded</a>) will be deleted.
          <p> The database must be offline for this operation, see <a href="#adminOffline(boolean,java.util.Map)"><code>adminOffline</code></a> </p>
          <p> This endpoint's processing time depends on the amount of data in the system, thus the API call may time out if run directly. It is recommended to run this endpoint asynchronously via <a href="#createJob(java.lang.String,java.lang.String,java.nio.ByteBuffer,java.lang.String,java.util.Map)"><code>createJob</code></a>. </p>
          <p> <span className="b">Note:</span> This method should be used for on-premise deployments only.</p>
        </div>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>ranks</code> - Each array value designates one or more ranks to remove from the cluster. Values can be formatted as 'rankN' for a specific rank, 'hostN' (from the gpudb.conf file) to remove all ranks on that host, or the host IP address (hostN.address from the gpub.conf file) which also removes all ranks on that host. Rank 0 (the head rank) cannot be removed (but can be moved to another host using <a href="#adminSwitchover(java.util.List,java.util.List,java.util.Map)"><code>adminSwitchover</code></a>). At least one worker rank must be left in the cluster after the operation.</div>

          <div className="dd">
            <code>options</code> - Optional parameters.

            <ul>
              <li>
                <a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksRequest.Options#REBALANCE_SHARDED_DATA"><code>REBALANCE\_SHARDED\_DATA</code></a>: If <a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksRequest.Options#TRUE"><code>TRUE</code></a>, <a href="/content/concepts/tables/#sharding" target="_top">sharded data</a> will be rebalanced approximately equally across the cluster. Note that for clusters with large amounts of sharded data, this data transfer could be time consuming and result in delayed query responses. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksRequest.Options#TRUE"><code>TRUE</code></a> </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksRequest.Options#FALSE"><code>FALSE</code></a> </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksRequest.Options#TRUE"><code>TRUE</code></a>.
              </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksRequest.Options#REBALANCE_UNSHARDED_DATA"><code>REBALANCE\_UNSHARDED\_DATA</code></a>: If <a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksRequest.Options#TRUE"><code>TRUE</code></a>, unsharded data (a.k.a. <a href="/content/concepts/tables/#random-sharding" target="_top">randomly-sharded</a>) will be rebalanced approximately equally across the cluster. Note that for clusters with large amounts of unsharded data, this data transfer could be time consuming and result in delayed query responses. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksRequest.Options#TRUE"><code>TRUE</code></a> </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksRequest.Options#FALSE"><code>FALSE</code></a> </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksRequest.Options#TRUE"><code>TRUE</code></a>.
              </li>

              <li><a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksRequest.Options#AGGRESSIVENESS"><code>AGGRESSIVENESS</code></a>: Influences how much data is moved at a time during rebalance. A higher <a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksRequest.Options#AGGRESSIVENESS"><code>AGGRESSIVENESS</code></a> will complete the rebalance faster. A lower <a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksRequest.Options#AGGRESSIVENESS"><code>AGGRESSIVENESS</code></a> will take longer but allow for better interleaving between the rebalance and other queries. Valid values are constants from 1 (lowest) to 10 (highest). The default value is '10'. </li>
            </ul>

            The default value is an empty <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link"><code>Map</code></a>.
          </div>

          <div className="dt">Returns:</div>
          <div className="dd"><a href="/content/api/java/com/gpudb/protocol/AdminRemoveRanksResponse" title="class in com.gpudb.protocol"><code>Response</code></a> object containing the results of the operation.</div>
          <div className="dt">Throws:</div>
          <div className="dd"><code><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></code> - if an error occurs during the operation.</div>
        </div>
      </div>
    </li>
  </ul>
</div>
