Is the Trino REST API available on Dataproc?
As described here it would be expected at /v1/statement on the base trino server URL.
On the Dataproc Trino Component Gateway this giving a 404 error.
Am following the example of accessing a Component Gateway api for Knox and adapting for Trino.
I have a Dataproc cluster running with the Trino optional component.
Obtained the Component Gateway base url for Trino as https://xxxxxxxxxxx-dot-us-east1.dataproc.googleusercontent.com/trino/
Posting to https://xxxxxxxxxxx-dot-us-east1.dataproc.googleusercontent.com/trino/v1/statement
I am passing a Proxy-authorization header as in the example.
Response is
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" />
<title>Error 404 Not Found</title>
</head>
<body>
<h2>HTTP ERROR 404 Not Found</h2>
<table>
<tr>
<th>URI:</th>
<td>/ui/v1/statement</td>
</tr>
<tr>
<th>STATUS:</th>
<td>404</td>
</tr>
<tr>
<th>MESSAGE:</th>
<td>Not Found</td>
</tr>
<tr>
<th>SERVLET:</th>
<td>org.glassfish.jersey.servlet.ServletContainer-2c70a1de</td>
</tr>
</table>
</body>
</html>
This suggests the Component Gateway maybe set up to access the trino UI.
Does anyone have any experience with this, or know if the Trino REST API is available at some other endpoint?
Hi harryotway,
Welcome to the Google Cloud Community!
The reason you're seeing the 404 is that the Component Gateway is set up to route requests to the Trino UI, not the full Trino API.
Here are some approaches that might help in accessing the Trino Rest API:
Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.