Enables SQL by default. (#7808)

This commit is contained in:
Eyal Yurman 2019-05-31 20:53:42 -07:00 committed by Fangjin Yang
parent 8032c4add8
commit 69e9b8a464
3 changed files with 3 additions and 6 deletions

View File

@ -1421,7 +1421,7 @@ The Druid SQL server is configured through the following properties on the Broke
|Property|Description|Default| |Property|Description|Default|
|--------|-----------|-------| |--------|-----------|-------|
|`druid.sql.enable`|Whether to enable SQL at all, including background metadata fetching. If false, this overrides all other SQL-related properties and disables SQL metadata, serving, and planning completely.|false| |`druid.sql.enable`|Whether to enable SQL at all, including background metadata fetching. If false, this overrides all other SQL-related properties and disables SQL metadata, serving, and planning completely.|true|
|`druid.sql.avatica.enable`|Whether to enable JDBC querying at `/druid/v2/sql/avatica/`.|true| |`druid.sql.avatica.enable`|Whether to enable JDBC querying at `/druid/v2/sql/avatica/`.|true|
|`druid.sql.avatica.maxConnections`|Maximum number of open connections for the Avatica server. These are not HTTP connections, but are logical client connections that may span multiple HTTP connections.|50| |`druid.sql.avatica.maxConnections`|Maximum number of open connections for the Avatica server. These are not HTTP connections, but are logical client connections that may span multiple HTTP connections.|50|
|`druid.sql.avatica.maxRowsPerFrame`|Maximum number of rows to return in a single JDBC frame. Setting this property to -1 indicates that no row limit should be applied. Clients can optionally specify a row limit in their requests; if a client specifies a row limit, the lesser value of the client-provided limit and `maxRowsPerFrame` will be used.|5,000| |`druid.sql.avatica.maxRowsPerFrame`|Maximum number of rows to return in a single JDBC frame. Setting this property to -1 indicates that no row limit should be applied. Clients can optionally specify a row limit in their requests; if a client specifies a row limit, the lesser value of the client-provided limit and `maxRowsPerFrame` will be used.|5,000|

View File

@ -42,9 +42,6 @@ queries on the query Broker (the first process you query), which are then passed
queries. Other than the (slight) overhead of translating SQL on the Broker, there isn't an additional performance queries. Other than the (slight) overhead of translating SQL on the Broker, there isn't an additional performance
penalty versus native queries. penalty versus native queries.
To enable Druid SQL, make sure you have set `druid.sql.enable = true` either in your common.runtime.properties or your
Broker's runtime.properties.
## Query syntax ## Query syntax
Each Druid datasource appears as a table in the "druid" schema. This is also the default schema, so Druid datasources Each Druid datasource appears as a table in the "druid" schema. This is also the default schema, so Druid datasources
@ -720,7 +717,7 @@ The Druid SQL server is configured through the following properties on the Broke
|Property|Description|Default| |Property|Description|Default|
|--------|-----------|-------| |--------|-----------|-------|
|`druid.sql.enable`|Whether to enable SQL at all, including background metadata fetching. If false, this overrides all other SQL-related properties and disables SQL metadata, serving, and planning completely.|false| |`druid.sql.enable`|Whether to enable SQL at all, including background metadata fetching. If false, this overrides all other SQL-related properties and disables SQL metadata, serving, and planning completely.|true|
|`druid.sql.avatica.enable`|Whether to enable JDBC querying at `/druid/v2/sql/avatica/`.|true| |`druid.sql.avatica.enable`|Whether to enable JDBC querying at `/druid/v2/sql/avatica/`.|true|
|`druid.sql.avatica.maxConnections`|Maximum number of open connections for the Avatica server. These are not HTTP connections, but are logical client connections that may span multiple HTTP connections.|25| |`druid.sql.avatica.maxConnections`|Maximum number of open connections for the Avatica server. These are not HTTP connections, but are logical client connections that may span multiple HTTP connections.|25|
|`druid.sql.avatica.maxRowsPerFrame`|Maximum number of rows to return in a single JDBC frame. Setting this property to -1 indicates that no row limit should be applied. Clients can optionally specify a row limit in their requests; if a client specifies a row limit, the lesser value of the client-provided limit and `maxRowsPerFrame` will be used.|5,000| |`druid.sql.avatica.maxRowsPerFrame`|Maximum number of rows to return in a single JDBC frame. Setting this property to -1 indicates that no row limit should be applied. Clients can optionally specify a row limit in their requests; if a client specifies a row limit, the lesser value of the client-provided limit and `maxRowsPerFrame` will be used.|5,000|

View File

@ -89,7 +89,7 @@ public class SqlModule implements Module
private boolean isEnabled() private boolean isEnabled()
{ {
Preconditions.checkNotNull(props, "props"); Preconditions.checkNotNull(props, "props");
return Boolean.valueOf(props.getProperty(PROPERTY_SQL_ENABLE, "false")); return Boolean.valueOf(props.getProperty(PROPERTY_SQL_ENABLE, "true"));
} }
private boolean isJsonOverHttpEnabled() private boolean isJsonOverHttpEnabled()