Managing edge nodes

Cloudera Operational Database (COD) supports creation of an edge node while creating an operational database. You can also modify the number of instances in the edge node type.

You must create an edge node if you plan to use Apache HBase Java API or the Apache Phoenix thick JDBC driver. You can use the edge node either as a gateway node or use it to deploy your applications while working with a COD cluster.

When you create an edge node in the COD cluster, it acts as an edge node type and not as a separate edge node Data Hub cluster.

Creating an edge node

You can create an edge node while creating an operational database in your CDP environment. You can also define the number of nodes to be created.

  1. Launch the CDP CLI tool.
  2. Use the following command to create an edge node.

    cdp opdb create-database --environment-name <CDP_environment_name> --database-name <database_name> --num-edge-nodes <number_of_edge_nodes>

    For example,

    cdp opdb create-database --environment-name cdp1 --database-name test1 --num-edge-nodes 1

Viewing edge nodes

You can view the list of available edge nodes on a COD cluster.

  1. Launch the CDP CLI tool.
  2. Use the following command to list the available edge nodes.

    cdp opdb list-edge-nodes --environment <CDP_environment_name> --database <database_name>

    For example,

    cdp opdb list-edge-nodes --environment odx-i2dr46 --database edge2

    Sample output:

    "database": "edge2",
        "edgeNodes": [
            {
                "instanceId": "cod--1qs4ckni9gwnj112955e22",
                "discoveryFQDN": "cod--1qs4ckni9gwnj-edge1.odx-i2dr.xcu2-8y8x.dev.cldr.work",
                "privateIp": "10.124.64.24",
                "publicIp": "N/A"
            },
            {
                "instanceId": "cod--1qs4ckni9gwnj112955e21",
                "discoveryFQDN": "cod--1qs4ckni9gwnj-edge2.odx-i2dr.xcu2-8y8x.dev.cldr.work",
                "privateIp": "10.124.64.26",
                "publicIp": "N/A"
            },
            {
                "instanceId": "cod--1qs4ckni9gwnj112955e20",
                "discoveryFQDN": "cod--1qs4ckni9gwnj-edge0.odx-i2dr.xcu2-8y8x.dev.cldr.work",
                "privateIp": "10.124.64.23",
                "publicIp": "N/A"
            },
            {
                "instanceId": "cod--1qs4ckni9gwnj112955e23",
                "discoveryFQDN": "cod--1qs4ckni9gwnj-edge3.odx-i2dr.xcu2-8y8x.dev.cldr.work",
                "privateIp": "10.124.64.25",
                "publicIp": "N/A"
            }
        ],
        "environmentName": "odx-i2dr46"
    }

Adding an edge node

You can add additional edge nodes into your existing COD cluster. You can define the number of edge nodes to be added, COD automatically adds the additional nodes into the COD cluster.

  1. Launch the CDP CLI tool.
  2. Use the following command to add edge nodes into the COD cluster.

    cdp opdb update-edge-nodes --environment <CDP_environment_name> --database <database_name> --num-add-edge-nodes <number_of_edge_nodes>

    For example,

    cdp opdb update-edge-nodes --environment cdp1 --database cod-7215 --num-add-edge-nodes 2

Deleting an edge node

You can delete single or multiple existing edge nodes from a COD cluster. You can use the instance ID of an edge node to delete it from the COD cluster.

  1. Launch the CDP CLI tool.
  2. Use the following command to delete an existing node from a COD cluster.

    cdp opdb update-edge-nodes --environment <CDP_environment_name> --database <database_name> --delete-edge-instances <edge_node_instance_ID_1> <edge_node_instance_ID_2>

    For example,

    cdp opdb update-edge-nodes --environment cdp1 --database cod-7215 --delete-edge-instances cod--1msrexj6oumro108509e10 cod--1msrexj6oumro108509e12