diff --git a/presto-client/src/main/java/com/facebook/presto/client/ExecutionType.java b/presto-client/src/main/java/com/facebook/presto/client/ExecutionType.java new file mode 100644 index 0000000000000..487b6eedc8260 --- /dev/null +++ b/presto-client/src/main/java/com/facebook/presto/client/ExecutionType.java @@ -0,0 +1,57 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.facebook.presto.client; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +import static java.util.Objects.requireNonNull; + +public enum ExecutionType +{ + JAVA("java"), + NATIVE("native"), + NATIVE_GPU("native-gpu"); + + private final String value; + + ExecutionType(String value) + { + this.value = requireNonNull(value, "value is null"); + } + + @JsonValue + public String getValue() + { + return value; + } + + @JsonCreator + public static ExecutionType fromValue(String value) + { + requireNonNull(value, "value is null"); + for (ExecutionType executionType : ExecutionType.values()) { + if (executionType.getValue().equals(value)) { + return executionType; + } + } + throw new IllegalArgumentException("Unknown execution type: " + value); + } + + @Override + public String toString() + { + return value; + } +} diff --git a/presto-client/src/main/java/com/facebook/presto/client/ServerInfo.java b/presto-client/src/main/java/com/facebook/presto/client/ServerInfo.java index 6de636a82404e..7e498f5fbb08c 100644 --- a/presto-client/src/main/java/com/facebook/presto/client/ServerInfo.java +++ b/presto-client/src/main/java/com/facebook/presto/client/ServerInfo.java @@ -38,6 +38,25 @@ public class ServerInfo // optional to maintain compatibility with older servers private final Optional uptime; + private final Optional executionType; + + @ThriftConstructor + @JsonCreator + public ServerInfo( + @JsonProperty("nodeVersion") NodeVersion nodeVersion, + @JsonProperty("environment") String environment, + @JsonProperty("coordinator") boolean coordinator, + @JsonProperty("starting") boolean starting, + @JsonProperty("uptime") Optional uptime, + @JsonProperty("executionType") Optional executionType) + { + this.nodeVersion = requireNonNull(nodeVersion, "nodeVersion is null"); + this.environment = requireNonNull(environment, "environment is null"); + this.coordinator = coordinator; + this.starting = starting; + this.uptime = requireNonNull(uptime, "uptime is null"); + this.executionType = requireNonNull(executionType, "executionType is null"); + } @ThriftConstructor @JsonCreator @@ -53,6 +72,7 @@ public ServerInfo( this.coordinator = coordinator; this.starting = starting; this.uptime = requireNonNull(uptime, "uptime is null"); + this.executionType = Optional.empty(); } @ThriftField(1) @@ -90,6 +110,13 @@ public Optional getUptime() return uptime; } + @ThriftField(6) + @JsonProperty + public Optional getExecutionType() + { + return executionType; + } + @Override public boolean equals(Object o) { @@ -118,6 +145,7 @@ public String toString() .add("nodeVersion", nodeVersion) .add("environment", environment) .add("coordinator", coordinator) + .add("executionType", executionType.map(ExecutionType::toString).orElse(null)) .add("uptime", uptime.orElse(null)) .omitNullValues() .toString(); diff --git a/presto-client/src/test/java/com/facebook/presto/client/TestServerInfo.java b/presto-client/src/test/java/com/facebook/presto/client/TestServerInfo.java index ba9ab0df881e1..aa14995445b1e 100644 --- a/presto-client/src/test/java/com/facebook/presto/client/TestServerInfo.java +++ b/presto-client/src/test/java/com/facebook/presto/client/TestServerInfo.java @@ -67,14 +67,14 @@ public Object[][] codecCombinations() @Test public void testJsonRoundTrip() { - assertJsonRoundTrip(new ServerInfo(UNKNOWN, "test", true, false, Optional.of(Duration.valueOf("2m")))); - assertJsonRoundTrip(new ServerInfo(UNKNOWN, "test", true, false, Optional.empty())); + assertJsonRoundTrip(new ServerInfo(UNKNOWN, "test", true, false, Optional.of(Duration.valueOf("2m")), Optional.of(ExecutionType.JAVA))); + assertJsonRoundTrip(new ServerInfo(UNKNOWN, "test", true, false, Optional.empty(), Optional.empty())); } @Test public void testBackwardsCompatible() { - ServerInfo newServerInfo = new ServerInfo(UNKNOWN, "test", true, false, Optional.empty()); + ServerInfo newServerInfo = new ServerInfo(UNKNOWN, "test", true, false, Optional.empty(), Optional.empty()); ServerInfo legacyServerInfo = SERVER_INFO_CODEC.fromJson("{\"nodeVersion\":{\"version\":\"\"},\"environment\":\"test\",\"coordinator\":true}"); assertEquals(newServerInfo, legacyServerInfo); } @@ -108,7 +108,7 @@ public void testRoundTripSerializeFacebookCompactProtocol(ThriftCodec readCodec, ThriftCodec writeCodec, diff --git a/presto-jdbc/src/test/java/com/facebook/presto/jdbc/TestQueryExecutor.java b/presto-jdbc/src/test/java/com/facebook/presto/jdbc/TestQueryExecutor.java index c3b37334781a7..2dc7c4a6365e8 100644 --- a/presto-jdbc/src/test/java/com/facebook/presto/jdbc/TestQueryExecutor.java +++ b/presto-jdbc/src/test/java/com/facebook/presto/jdbc/TestQueryExecutor.java @@ -15,6 +15,7 @@ import com.facebook.airlift.json.JsonCodec; import com.facebook.airlift.units.Duration; +import com.facebook.presto.client.ExecutionType; import com.facebook.presto.client.ServerInfo; import okhttp3.OkHttpClient; import okhttp3.mockwebserver.MockResponse; @@ -57,7 +58,7 @@ public void teardown() public void testGetServerInfo() throws Exception { - ServerInfo expected = new ServerInfo(UNKNOWN, "test", true, false, Optional.of(Duration.valueOf("2m"))); + ServerInfo expected = new ServerInfo(UNKNOWN, "test", true, false, Optional.of(Duration.valueOf("2m")), Optional.of(ExecutionType.JAVA)); server.enqueue(new MockResponse() .addHeader(CONTENT_TYPE, "application/json") diff --git a/presto-main/src/main/java/com/facebook/presto/server/ServerInfoResource.java b/presto-main/src/main/java/com/facebook/presto/server/ServerInfoResource.java index 8c686288caef8..e4016134a5d97 100644 --- a/presto-main/src/main/java/com/facebook/presto/server/ServerInfoResource.java +++ b/presto-main/src/main/java/com/facebook/presto/server/ServerInfoResource.java @@ -14,6 +14,7 @@ package com.facebook.presto.server; import com.facebook.airlift.node.NodeInfo; +import com.facebook.presto.client.ExecutionType; import com.facebook.presto.client.NodeVersion; import com.facebook.presto.client.ServerInfo; import com.facebook.presto.execution.resourceGroups.ResourceGroupManager; @@ -78,7 +79,8 @@ public ServerInfoResource(NodeVersion nodeVersion, NodeInfo nodeInfo, ServerConf public ServerInfo getInfo() { boolean starting = resourceManager ? true : !catalogStore.areCatalogsLoaded(); - return new ServerInfo(version, environment, coordinator, starting, Optional.of(nanosSince(startTime))); + Optional executionType = Optional.of(ExecutionType.JAVA); + return new ServerInfo(version, environment, coordinator, starting, Optional.of(nanosSince(startTime)), executionType); } @PUT diff --git a/presto-native-execution/presto_cpp/main/PrestoServer.cpp b/presto-native-execution/presto_cpp/main/PrestoServer.cpp index 8b195c6c833e7..d6911e743854e 100644 --- a/presto-native-execution/presto_cpp/main/PrestoServer.cpp +++ b/presto-native-execution/presto_cpp/main/PrestoServer.cpp @@ -1637,12 +1637,21 @@ void PrestoServer::reportMemoryInfo(proxygen::ResponseHandler* downstream) { } void PrestoServer::reportServerInfo(proxygen::ResponseHandler* downstream) { + + // Determine execution type based on GPU support +#ifdef PRESTO_ENABLE_CUDF + auto executionType = std::make_shared(protocol::ExecutionType::NATIVE_GPU); +#else + auto executionType = std::make_shared(protocol::ExecutionType::NATIVE); +#endif + const protocol::ServerInfo serverInfo{ {nodeVersion_}, environment_, false, false, - std::make_shared(getUptime(start_))}; + std::make_shared(getUptime(start_)), + executionType}; http::sendOkResponse(downstream, json(serverInfo)); } diff --git a/presto-native-execution/presto_cpp/presto_protocol/connector/arrow_flight/presto_protocol_arrow_flight.json b/presto-native-execution/presto_cpp/presto_protocol/connector/arrow_flight/presto_protocol_arrow_flight.json new file mode 100644 index 0000000000000..7a1974ee648a3 --- /dev/null +++ b/presto-native-execution/presto_cpp/presto_protocol/connector/arrow_flight/presto_protocol_arrow_flight.json @@ -0,0 +1,129 @@ +[ + { + "comment": "// This file is generated DO NOT EDIT @generated" + }, + { + "class_name": "ArrowColumnHandle", + "hinc": "// ArrowColumnHandle is special since it needs an implementation of\n// operator<().\n\nnamespace facebook::presto::protocol::arrow_flight {\nstruct ArrowColumnHandle : public ColumnHandle {\n String columnName = {};\n Type columnType = {};\n\n ArrowColumnHandle() noexcept;\n\n bool operator<(const ColumnHandle& o) const override {\n return columnName < dynamic_cast(o).columnName;\n }\n};\n\nvoid to_json(json& j, const ArrowColumnHandle& p);\nvoid from_json(const json& j, ArrowColumnHandle& p);\n\n} // namespace facebook::presto::protocol::arrow_flight", + "struct": true, + "fields": [ + { + "field_type": "String", + "field_name": "columnName", + "field_text": "String", + "_N": 1, + "field_local": true + }, + { + "field_type": "Type", + "field_name": "columnType", + "field_text": "Type", + "_N": 2, + "field_local": true + } + ], + "subclass": true, + "super_class": "ColumnHandle", + "json_key": "arrow-flight" + }, + { + "class_name": "ArrowSplit", + "struct": true, + "fields": [ + { + "field_type": "String", + "field_name": "schemaName", + "field_text": "String", + "_N": 1, + "field_local": true + }, + { + "field_type": "String", + "field_name": "tableName", + "field_text": "String", + "_N": 2, + "field_local": true + }, + { + "field_type": "byte[]", + "field_name": "flightEndpointBytes", + "field_text": "String", + "_N": 3, + "field_local": true + } + ], + "subclass": true, + "super_class": "ConnectorSplit", + "json_key": "arrow-flight" + }, + { + "class_name": "ArrowTableHandle", + "struct": true, + "fields": [ + { + "field_type": "String", + "field_name": "schema", + "field_text": "String", + "_N": 1, + "field_local": true + }, + { + "field_type": "String", + "field_name": "table", + "field_text": "String", + "_N": 2, + "field_local": true + } + ], + "subclass": true, + "super_class": "ConnectorTableHandle", + "json_key": "arrow-flight" + }, + { + "class_name": "ColumnHandle", + "field_name": "columnHandle", + "abstract": true, + "super_class": "JsonEncodedSubclass", + "comparable": true, + "subclasses": [ + { + "type": "ArrowColumnHandle", + "name": "arrowColumnHandle", + "key": "arrow-flight", + "_N": 1, + "_last": true + } + ], + "fields": [] + }, + { + "class_name": "ArrowTableLayoutHandle", + "struct": true, + "fields": [ + { + "field_type": "ArrowTableHandle", + "field_name": "table", + "field_text": "ArrowTableHandle", + "_N": 1, + "field_local": true + }, + { + "field_type": "List", + "field_name": "columnHandles", + "field_text": "List", + "_N": 2, + "field_local": true + }, + { + "field_type": "TupleDomain", + "field_name": "tupleDomain", + "field_text": "TupleDomain>", + "_N": 3, + "field_local": true + } + ], + "subclass": true, + "super_class": "ConnectorTableLayoutHandle", + "json_key": "arrow-flight" + } +] diff --git a/presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.cpp b/presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.cpp index efb585849ef31..e5f21ed07559a 100644 --- a/presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.cpp +++ b/presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.cpp @@ -9393,6 +9393,45 @@ void from_json(const json& j, SemiJoinNode& p) { } // namespace facebook::presto::protocol namespace facebook::presto::protocol { +static const std::pair ExecutionType_enum_table[] = + { // NOLINT: cert-err58-cpp + {ExecutionType::JAVA, "java"}, + {ExecutionType::NATIVE, "native"}, + {ExecutionType::NATIVE_GPU, "native-gpu"}}; + +void to_json(json& j, const ExecutionType& e) { + static_assert( + std::is_enum::value, "ExecutionType must be an enum!"); + const auto* it = std::find_if( + std::begin(ExecutionType_enum_table), + std::end(ExecutionType_enum_table), + [e](const std::pair& ej_pair) -> bool { + return ej_pair.first == e; + }); + j = ((it != std::end(ExecutionType_enum_table)) + ? it + : std::begin(ExecutionType_enum_table)) + ->second; +} + +void from_json(const json& j, ExecutionType& e) { + static_assert( + std::is_enum::value, "ExecutionType must be an enum!"); + const auto* it = std::find_if( + std::begin(ExecutionType_enum_table), + std::end(ExecutionType_enum_table), + [&j](const std::pair& ej_pair) -> bool { + return ej_pair.second == j; + }); + e = ((it != std::end(ExecutionType_enum_table)) + ? it + : std::begin(ExecutionType_enum_table)) + ->first; +} + +} // namespace facebook::presto::protocol +namespace facebook::presto::protocol { + void to_json(json& j, const ServerInfo& p) { j = json::object(); to_json_key( @@ -9408,6 +9447,13 @@ void to_json(json& j, const ServerInfo& p) { j, "coordinator", p.coordinator, "ServerInfo", "bool", "coordinator"); to_json_key(j, "starting", p.starting, "ServerInfo", "bool", "starting"); to_json_key(j, "uptime", p.uptime, "ServerInfo", "Duration", "uptime"); + to_json_key( + j, + "executionType", + p.executionType, + "ServerInfo", + "ExecutionType", + "executionType"); } void from_json(const json& j, ServerInfo& p) { @@ -9424,6 +9470,13 @@ void from_json(const json& j, ServerInfo& p) { j, "coordinator", p.coordinator, "ServerInfo", "bool", "coordinator"); from_json_key(j, "starting", p.starting, "ServerInfo", "bool", "starting"); from_json_key(j, "uptime", p.uptime, "ServerInfo", "Duration", "uptime"); + from_json_key( + j, + "executionType", + p.executionType, + "ServerInfo", + "ExecutionType", + "executionType"); } } // namespace facebook::presto::protocol namespace facebook::presto::protocol { diff --git a/presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.h b/presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.h index 2b1e4eb66c14e..54d0c1ed5aa77 100644 --- a/presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.h +++ b/presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.h @@ -69,21 +69,21 @@ extern const char* const PRESTO_ABORT_TASK_URL_PARAM; class Exception : public std::runtime_error { public: explicit Exception(const std::string& message) - : std::runtime_error(message) {}; + : std::runtime_error(message){}; }; class TypeError : public Exception { public: - explicit TypeError(const std::string& message) : Exception(message) {}; + explicit TypeError(const std::string& message) : Exception(message){}; }; class OutOfRange : public Exception { public: - explicit OutOfRange(const std::string& message) : Exception(message) {}; + explicit OutOfRange(const std::string& message) : Exception(message){}; }; class ParseError : public Exception { public: - explicit ParseError(const std::string& message) : Exception(message) {}; + explicit ParseError(const std::string& message) : Exception(message){}; }; using String = std::string; @@ -2155,12 +2155,18 @@ void to_json(json& j, const SemiJoinNode& p); void from_json(const json& j, SemiJoinNode& p); } // namespace facebook::presto::protocol namespace facebook::presto::protocol { +enum class ExecutionType { JAVA, NATIVE, NATIVE_GPU }; +extern void to_json(json& j, const ExecutionType& e); +extern void from_json(const json& j, ExecutionType& e); +} // namespace facebook::presto::protocol +namespace facebook::presto::protocol { struct ServerInfo { NodeVersion nodeVersion = {}; String environment = {}; bool coordinator = {}; bool starting = {}; std::shared_ptr uptime = {}; + std::shared_ptr executionType = {}; }; void to_json(json& j, const ServerInfo& p); void from_json(const json& j, ServerInfo& p); diff --git a/presto-native-execution/presto_cpp/presto_protocol/core/special/ExecutionType.cpp.inc b/presto-native-execution/presto_cpp/presto_protocol/core/special/ExecutionType.cpp.inc new file mode 100644 index 0000000000000..a51ff0ceb2463 --- /dev/null +++ b/presto-native-execution/presto_cpp/presto_protocol/core/special/ExecutionType.cpp.inc @@ -0,0 +1,55 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +namespace facebook::presto::protocol { + +static const std::pair + ExecutionType_enum_table[] = { // NOLINT: cert-err58-cpp + {ExecutionType::JAVA, "java"}, + {ExecutionType::NATIVE, "native"}, + {ExecutionType::NATIVE_GPU, "native-gpu"}}; + +void to_json(json& j, const ExecutionType& e) { + static_assert( + std::is_enum::value, + "ExecutionType must be an enum!"); + const auto* it = std::find_if( + std::begin(ExecutionType_enum_table), + std::end(ExecutionType_enum_table), + [e](const std::pair& ej_pair) -> bool { + return ej_pair.first == e; + }); + j = ((it != std::end(ExecutionType_enum_table)) + ? it + : std::begin(ExecutionType_enum_table)) + ->second; +} + +void from_json(const json& j, ExecutionType& e) { + static_assert( + std::is_enum::value, + "ExecutionType must be an enum!"); + const auto* it = std::find_if( + std::begin(ExecutionType_enum_table), + std::end(ExecutionType_enum_table), + [&j](const std::pair& ej_pair) -> bool { + return ej_pair.second == j; + }); + e = ((it != std::end(ExecutionType_enum_table)) + ? it + : std::begin(ExecutionType_enum_table)) + ->first; +} + +} // namespace facebook::presto::protocol diff --git a/presto-native-execution/presto_cpp/presto_protocol/core/special/ExecutionType.hpp.inc b/presto-native-execution/presto_cpp/presto_protocol/core/special/ExecutionType.hpp.inc new file mode 100644 index 0000000000000..b76a0b400a40a --- /dev/null +++ b/presto-native-execution/presto_cpp/presto_protocol/core/special/ExecutionType.hpp.inc @@ -0,0 +1,19 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +namespace facebook::presto::protocol { +enum class ExecutionType { JAVA, NATIVE, NATIVE_GPU }; +extern void to_json(json& j, const ExecutionType& e); +extern void from_json(const json& j, ExecutionType& e); +} // namespace facebook::presto::protocol diff --git a/presto-router/src/main/java/com/facebook/presto/router/cluster/ClusterStatusResource.java b/presto-router/src/main/java/com/facebook/presto/router/cluster/ClusterStatusResource.java index 2a44d1d75cac0..0527ef917c1b0 100755 --- a/presto-router/src/main/java/com/facebook/presto/router/cluster/ClusterStatusResource.java +++ b/presto-router/src/main/java/com/facebook/presto/router/cluster/ClusterStatusResource.java @@ -14,6 +14,7 @@ package com.facebook.presto.router.cluster; import com.facebook.airlift.node.NodeInfo; +import com.facebook.presto.client.ExecutionType; import com.facebook.presto.client.ServerInfo; import com.facebook.presto.router.cluster.ClusterManager.ClusterStatusTracker; import com.fasterxml.jackson.annotation.JsonCreator; @@ -55,7 +56,7 @@ public ClusterStatusResource(NodeInfo nodeInfo, ClusterStatusTracker clusterStat @Produces(APPLICATION_JSON) public ServerInfo getInfo() { - return new ServerInfo(UNKNOWN, environment, true, false, Optional.empty()); + return new ServerInfo(UNKNOWN, environment, true, false, Optional.empty(), Optional.of(ExecutionType.JAVA)); } @GET diff --git a/presto-spark-base/src/test/java/com/facebook/presto/spark/execution/http/TestPrestoSparkHttpClient.java b/presto-spark-base/src/test/java/com/facebook/presto/spark/execution/http/TestPrestoSparkHttpClient.java index 012af7ed13418..57670b9cc1cde 100644 --- a/presto-spark-base/src/test/java/com/facebook/presto/spark/execution/http/TestPrestoSparkHttpClient.java +++ b/presto-spark-base/src/test/java/com/facebook/presto/spark/execution/http/TestPrestoSparkHttpClient.java @@ -16,6 +16,7 @@ import com.facebook.airlift.json.JsonCodec; import com.facebook.airlift.units.DataSize; import com.facebook.airlift.units.Duration; +import com.facebook.presto.client.ExecutionType; import com.facebook.presto.client.ServerInfo; import com.facebook.presto.execution.QueryManagerConfig; import com.facebook.presto.execution.TaskId; @@ -304,7 +305,7 @@ public void testUpdateTaskWithRetries() public void testGetServerInfo() { TaskId taskId = new TaskId("testid", 0, 0, 0, 0); - ServerInfo expected = new ServerInfo(UNKNOWN, "test", true, false, Optional.of(Duration.valueOf("2m"))); + ServerInfo expected = new ServerInfo(UNKNOWN, "test", true, false, Optional.of(Duration.valueOf("2m")), Optional.of(ExecutionType.JAVA)); PrestoSparkHttpServerClient workerClient = new PrestoSparkHttpServerClient( new TestingOkHttpClient(scheduledExecutorService, new TestingResponseManager(taskId.toString())), @@ -325,7 +326,7 @@ public void testGetServerInfo() public void testGetServerInfoWithRetry() { TaskId taskId = new TaskId("testid", 0, 0, 0, 0); - ServerInfo expected = new ServerInfo(UNKNOWN, "test", true, false, Optional.of(Duration.valueOf("2m"))); + ServerInfo expected = new ServerInfo(UNKNOWN, "test", true, false, Optional.of(Duration.valueOf("2m")), Optional.of(ExecutionType.JAVA)); Duration maxTimeout = new Duration(1, TimeUnit.MINUTES); NativeExecutionProcess process = createNativeExecutionProcess( maxTimeout, @@ -1171,7 +1172,7 @@ public static class TestingServerResponseManager public Response createServerInfoResponse(Request request) throws PrestoException { - ServerInfo serverInfo = new ServerInfo(UNKNOWN, "test", true, false, Optional.of(Duration.valueOf("2m"))); + ServerInfo serverInfo = new ServerInfo(UNKNOWN, "test", true, false, Optional.of(Duration.valueOf("2m")), Optional.of(ExecutionType.JAVA)); byte[] responseBody = serverInfoCodec.toBytes(serverInfo); return new Response.Builder()