> ## 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.

# repartitionGraph

<div className="kinetica-doxygen">
  <div id="ae8df406ae2ed789bb8763e5a94201b23" />

  <h2 className="memtitle"><span className="permalink"><a href="#ae8df406ae2ed789bb8763e5a94201b23">◆ </a></span>repartitionGraph() <span className="overload">\[1/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1RepartitionGraphResponse">RepartitionGraphResponse</a> gpudb::GPUdb::repartitionGraph </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1RepartitionGraphRequest">RepartitionGraphRequest</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">request\_</span></span></td>
          <td>)</td>
          <td> const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Rebalances an existing partitioned graph. </p>
      <p>IMPORTANT: It's highly recommended that you review the <a href="/content/graph_solver/network_graph_solver/" target="_top">Graphs and Solvers</a> concepts documentation, the <a href="/content/guides/graph_rest_guide/" target="_top">Graph REST Tutorial</a>, and/or some <a href="/content/guides/tags/graph" target="_top">graph examples</a> before using this endpoint.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">request\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1RepartitionGraphRequest">Request</a> object containing the parameters for the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1RepartitionGraphResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="a61ad24358df749999a45542d99b11187" />

  <h2 className="memtitle"><span className="permalink"><a href="#a61ad24358df749999a45542d99b11187">◆ </a></span>repartitionGraph() <span className="overload">\[2/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1RepartitionGraphResponse">RepartitionGraphResponse</a> & gpudb::GPUdb::repartitionGraph </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1RepartitionGraphRequest">RepartitionGraphRequest</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">request\_</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype"><a className="el" href="/content/api/cpp/structgpudb_1_1RepartitionGraphResponse">RepartitionGraphResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Rebalances an existing partitioned graph. </p>
      <p>IMPORTANT: It's highly recommended that you review the <a href="/content/graph_solver/network_graph_solver/" target="_top">Graphs and Solvers</a> concepts documentation, the <a href="/content/guides/graph_rest_guide/" target="_top">Graph REST Tutorial</a>, and/or some <a href="/content/guides/tags/graph" target="_top">graph examples</a> before using this endpoint.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">request\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1RepartitionGraphRequest">Request</a> object containing the parameters for the operation. </td>
            </tr>

            <tr>
              <td className="paramdir">\[out]</td>
              <td className="paramname">response\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1RepartitionGraphResponse">Response</a> object containing the results of the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1RepartitionGraphResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>

  <div id="a441d50b3d621b8fa90607390992ee41b" />

  <h2 className="memtitle"><span className="permalink"><a href="#a441d50b3d621b8fa90607390992ee41b">◆ </a></span>repartitionGraph() <span className="overload">\[3/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1RepartitionGraphResponse">RepartitionGraphResponse</a> gpudb::GPUdb::repartitionGraph </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">graphName</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::map\< std::string, std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">options</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Rebalances an existing partitioned graph. </p>
      <p>IMPORTANT: It's highly recommended that you review the <a href="/content/graph_solver/network_graph_solver/" target="_top">Graphs and Solvers</a> concepts documentation, the <a href="/content/guides/graph_rest_guide/" target="_top">Graph REST Tutorial</a>, and/or some <a href="/content/guides/tags/graph" target="_top">graph examples</a> before using this endpoint.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">graphName</td>
              <td>Name of the graph resource to rebalance. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">options</td>

              <td>
                Optional parameters.

                <ul>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#aeb144e2a37f2993c87c302a1459bd45b">repartition\_graph\_new\_graph\_name</a>: If a non-empty value is specified, the original graph will be kept (non-default behavior) and a new balanced graph will be created under this given name. When the value is empty (default), the generated 'balanced' graph will replace the original 'unbalanced' graph under the same graph name. The default value is ''. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a532030c53b8f7f20faa299e07ee5ea14">repartition\_graph\_source\_node</a>: The distributed shortest path solve is run from this source node to all the nodes in the graph to create balanced partitions using the iso-distance levels of the solution. The source node is selected by the rebalance algorithm automatically (default case when the value is an empty string). Otherwise, the user specified node is used as the source. The default value is ''. </li>
                </ul>

                The default value is an empty map.
              </td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1RepartitionGraphResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="a042f7cdf1d63a33582b06e74b03fbb89" />

  <h2 className="memtitle"><span className="permalink"><a href="#a042f7cdf1d63a33582b06e74b03fbb89">◆ </a></span>repartitionGraph() <span className="overload">\[4/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1RepartitionGraphResponse">RepartitionGraphResponse</a> & gpudb::GPUdb::repartitionGraph </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">graphName</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::map\< std::string, std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">options</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype"><a className="el" href="/content/api/cpp/structgpudb_1_1RepartitionGraphResponse">RepartitionGraphResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Rebalances an existing partitioned graph. </p>
      <p>IMPORTANT: It's highly recommended that you review the <a href="/content/graph_solver/network_graph_solver/" target="_top">Graphs and Solvers</a> concepts documentation, the <a href="/content/guides/graph_rest_guide/" target="_top">Graph REST Tutorial</a>, and/or some <a href="/content/guides/tags/graph" target="_top">graph examples</a> before using this endpoint.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">graphName</td>
              <td>Name of the graph resource to rebalance. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">options</td>

              <td>
                Optional parameters.

                <ul>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#aeb144e2a37f2993c87c302a1459bd45b">repartition\_graph\_new\_graph\_name</a>: If a non-empty value is specified, the original graph will be kept (non-default behavior) and a new balanced graph will be created under this given name. When the value is empty (default), the generated 'balanced' graph will replace the original 'unbalanced' graph under the same graph name. The default value is ''. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a532030c53b8f7f20faa299e07ee5ea14">repartition\_graph\_source\_node</a>: The distributed shortest path solve is run from this source node to all the nodes in the graph to create balanced partitions using the iso-distance levels of the solution. The source node is selected by the rebalance algorithm automatically (default case when the value is an empty string). Otherwise, the user specified node is used as the source. The default value is ''. </li>
                </ul>

                The default value is an empty map.
              </td>
            </tr>

            <tr>
              <td className="paramdir">\[out]</td>
              <td className="paramname">response\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1RepartitionGraphResponse">Response</a> object containing the results of the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1RepartitionGraphResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>
</div>
