diff --git a/presto-docs/src/main/sphinx/presto-cpp.rst b/presto-docs/src/main/sphinx/presto-cpp.rst index bd71e95daf6ed..ee468a876c2b9 100644 --- a/presto-docs/src/main/sphinx/presto-cpp.rst +++ b/presto-docs/src/main/sphinx/presto-cpp.rst @@ -7,6 +7,7 @@ Note: Presto C++ is in active development. See :doc:`Limitations `. + +4. Add TPC-H Catalog Configuration +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Configure the worker with the same catalog definitions as the coordinator to execute query stages + +.. code-block:: properties + + # worker-1/etc/catalog/tpch.properties + connector.name=tpch + +.. _create-docker-compose-yml: + +Create ``docker-compose.yml`` +----------------------------- + +Create a ``docker-compose.yml`` file in the ``~/presto-lab`` directory to orchestrate both the Java Coordinator and the C++ Worker containers. + +.. code-block:: yaml + + # docker-compose.yml + services: + coordinator: + image: public.ecr.aws/oss-presto/presto:latest + platform: linux/amd64 + container_name: presto-coordinator + hostname: coordinator + ports: + - "8080:8080" + volumes: + - ./coordinator/etc:/opt/presto-server/etc:ro + restart: unless-stopped + + worker-1: + image: public.ecr.aws/oss-presto/presto-native:latest + platform: linux/amd64 + container_name: prestissimo-worker-1 + hostname: worker-1 + depends_on: + - coordinator + volumes: + - ./worker-1/etc:/opt/presto-server/etc:ro + restart: unless-stopped + + worker-2: + image: public.ecr.aws/oss-presto/presto-native:latest + platform: linux/amd64 + container_name: prestissimo-worker-2 + hostname: worker-2 + depends_on: + - coordinator + volumes: + - ./worker-2/etc:/opt/presto-server/etc:ro + restart: unless-stopped + +* The coordinator service uses the standard Java Presto image (presto:latest). +* The worker-1 and worker-2 services use the Prestissimo (C++ Native) image (presto-native:latest). +* The setting ``platform: linux/amd64`` is essential for users running on Apple Silicon Macs. +* The ``volumes`` section mounts your local configuration directories (``./coordinator/etc``, ``./worker-1/etc``) into the container's expected path (``/opt/presto-server/etc``). + +Start the Cluster and Verify +---------------------------- + +1. Start the Cluster +^^^^^^^^^^^^^^^^^^^^ + +Use Docker Compose to start the cluster in detached mode (``-d``). + +.. code-block:: bash + + docker compose up -d + +2. Verify +^^^^^^^^^ + +1. **Check the Web UI:** Open the Presto Web UI at http://localhost:8080. + + * You should see the UI displaying 3 Active Workers (1 Coordinator and 2 Workers). + +2. **Check Detailed Node Status** : Run the following SQL query to check the detailed status and metadata about every node (Coordinator and Workers). + + .. code-block:: sql + + select * from system.runtime.nodes; + + This confirms the cluster nodes are registered and active. \ No newline at end of file