apache/shardingsphere · warning · RuntimeException

HiveServer2 in embedded mode has been deprecated by Apache H

Error message

HiveServer2 in embedded mode has been deprecated by Apache Hive, See https://issues.apache.org/jira/browse/HIVE-28418 . Users should start local HiveServer2 through Docker Image https://hub.docker.com/r/apache/hive .

What it means

Thrown by MySQLUnsupportedCommandExecutor when the proxy receives a MySQL command packet type that has no dedicated executor implemented. The proxy deliberately registers this executor for command types it recognizes at the protocol level but does not support, so the client gets a deterministic UnsupportedCommandException naming the command instead of undefined behavior.

Source

Thrown at database/connector/dialect/hive/src/main/java/org/apache/shardingsphere/database/connector/hive/jdbcurl/HiveConnectionPropertiesParser.java:41

import org.apache.hive.jdbc.Utils.JdbcConnectionParams;
import org.apache.hive.jdbc.ZooKeeperHiveClientException;
import org.apache.shardingsphere.database.connector.core.jdbcurl.parser.ConnectionProperties;
import org.apache.shardingsphere.database.connector.core.jdbcurl.parser.ConnectionPropertiesParser;

import java.sql.SQLException;
import java.util.Properties;

/**
 * Connection properties parser of Hive.
 */
public final class HiveConnectionPropertiesParser implements ConnectionPropertiesParser {
    
    @SneakyThrows({ZooKeeperHiveClientException.class, JdbcUriParseException.class, SQLException.class})
    @Override
    public ConnectionProperties parse(final String url, final String username, final String catalog) {
        JdbcConnectionParams params = Utils.parseURL(url, new Properties());
        if (null == params.getHost() && 0 == params.getPort()) {
            throw new RuntimeException("HiveServer2 in embedded mode has been deprecated by Apache Hive, "
                    + "See https://issues.apache.org/jira/browse/HIVE-28418 . "
                    + "Users should start local HiveServer2 through Docker Image https://hub.docker.com/r/apache/hive .");
        }
        Properties queryProps = new Properties();
        queryProps.putAll(params.getSessionVars());
        queryProps.putAll(params.getHiveConfs());
        queryProps.putAll(params.getHiveVars());
        return new ConnectionProperties(params.getHost(), params.getPort(), params.getDbName(), null, queryProps);
    }
    
    @Override
    public String getDatabaseType() {
        return "Hive";
    }
}

View on GitHub (pinned to e952770a21)

Solutions

  1. Identify the unsupported command from the message text ('Unsupported command: %s' names the MySQLCommandPacketType) and stop issuing it through the proxy.
  2. Point administration/monitoring tooling directly at the backend MySQL servers rather than through ShardingSphere proxy.
  3. Configure the client/ORM to disable server-side management commands or feature probes that trigger the command.
  4. If the command is essential, check for a newer ShardingSphere version that implements it, or open a feature request with the exact command type.
Defensive patterns

Strategy: fallback

Validate before calling

// Client-side: avoid issuing admin commands through the proxy
private static final Set<String> PROXY_UNSUPPORTED = Set.of("COM_REFRESH", "COM_DEBUG", "COM_PROCESS_INFO");
if (PROXY_UNSUPPORTED.contains(command.name())) {
    adminConnection.directToBackend(command); // bypass proxy
} else {
    proxyConnection.execute(command);
}

Try / catch

// Detect and degrade gracefully (message names the command type)
try {
    executor.execute();
} catch (UnsupportedCommandException e) {
    if (e.getMessage().contains("COM_PROCESS_INFO")) {
        return fetchProcessListFromBackendDirectly(); // fallback path
    }
    throw e;
}

Prevention

When it happens

Trigger: Sending any COM_* command the proxy has not implemented (for example COM_REFRESH, COM_DEBUG, COM_PROCESS_INFO, or other admin/debug commands) from a client or management tool; the message embeds the MySQLCommandPacketType name.

Common situations: Running MySQL admin/monitoring tools (process list, refresh, debug commands) against the proxy instead of a real mysqld; ORM or connectors that opportunistically issue server-management commands; newer client versions that emit a recently added command type the proxy build does not handle.

Related errors


AI-assisted analysis of apache/shardingsphere@e952770a21 (2026-08-14). Data as JSON: /api/errors/0481c8f843f11d70. Report an issue: GitHub.