Skip to content

Commit 4d2de5b

Browse files
committed
SQL: Refactor package names of sql-proto and sql-shared-proto projects (#31622)
- renames project `sql-proto` to `sql-action`, - renames package `sql.plugin` to `sql.action` - renames project `sql-shared-client` to `sql-client` - renames package `sql.shard.client` to `sql.client` - renames project `sql-shared-proto` to `sql-proto` Closes #31593
1 parent d81ff67 commit 4d2de5b

File tree

127 files changed

+302
-296
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+302
-296
lines changed

x-pack/plugin/security/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dependencies {
1616
compileOnly project(path: ':modules:transport-netty4', configuration: 'runtime')
1717

1818
testCompile project(path: xpackModule('monitoring'))
19-
testCompile project(path: xpackModule('sql:sql-proto'))
19+
testCompile project(path: xpackModule('sql:sql-action'))
2020

2121
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
2222

x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@
122122
import org.elasticsearch.xpack.security.audit.AuditTrailService;
123123
import org.elasticsearch.xpack.security.authc.esnative.ReservedRealm;
124124
import org.elasticsearch.xpack.security.authz.store.CompositeRolesStore;
125-
import org.elasticsearch.xpack.sql.plugin.SqlQueryAction;
126-
import org.elasticsearch.xpack.sql.plugin.SqlQueryRequest;
125+
import org.elasticsearch.xpack.sql.action.SqlQueryAction;
126+
import org.elasticsearch.xpack.sql.action.SqlQueryRequest;
127127
import org.junit.Before;
128128
import org.mockito.Mockito;
129129

x-pack/plugin/sql/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dependencies {
2424
// exclude ASM to not affect featureAware task on Java 10+
2525
exclude group: "org.ow2.asm"
2626
}
27-
compile project('sql-proto')
27+
compile project('sql-action')
2828
compile "org.elasticsearch.plugin:aggs-matrix-stats-client:${version}"
2929
compile "org.antlr:antlr4-runtime:4.5.3"
3030
testCompile "org.elasticsearch.test:framework:${version}"

x-pack/plugin/sql/jdbc/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ forbiddenApisMain {
2424
}
2525

2626
dependencies {
27-
compile (xpackProject('plugin:sql:sql-shared-client')) {
27+
compile (xpackProject('plugin:sql:sql-client')) {
2828
transitive = false
2929
}
30-
compile (xpackProject('plugin:sql:sql-shared-proto')) {
30+
compile (xpackProject('plugin:sql:sql-proto')) {
3131
transitive = false
3232
}
3333
compile (project(':libs:x-content')) {
@@ -39,12 +39,12 @@ dependencies {
3939
}
4040

4141
dependencyLicenses {
42-
mapping from: /sql-shared-proto.*/, to: 'elasticsearch'
43-
mapping from: /sql-shared-client.*/, to: 'elasticsearch'
42+
mapping from: /sql-proto.*/, to: 'elasticsearch'
43+
mapping from: /sql-client.*/, to: 'elasticsearch'
4444
mapping from: /jackson-.*/, to: 'jackson'
4545
mapping from: /elasticsearch-core.*/, to: 'elasticsearch'
46-
ignoreSha 'sql-shared-proto'
47-
ignoreSha 'sql-shared-client'
46+
ignoreSha 'sql-proto'
47+
ignoreSha 'sql-client'
4848
ignoreSha 'elasticsearch'
4949
}
5050

x-pack/plugin/sql/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/debug/Debug.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
package org.elasticsearch.xpack.sql.jdbc.debug;
77

8-
import org.elasticsearch.xpack.sql.client.shared.SuppressForbidden;
8+
import org.elasticsearch.xpack.sql.client.SuppressForbidden;
99
import org.elasticsearch.xpack.sql.jdbc.JdbcException;
1010
import org.elasticsearch.xpack.sql.jdbc.jdbc.JdbcConfiguration;
1111

@@ -39,10 +39,10 @@
3939
* being global and not working well with encoding (hence why {@link DriverManager#getLogWriter()} was introduced)
4040
* and was changed again through {@link DataSource#getLogWriter()}.
4141
* However by then the damage was done and most drivers don't use either and have their own logging implementation.
42-
*
42+
*
4343
* This class tries to cater to both audiences - use the legacy, Writer way if needed though strive to use the
4444
* proper typical approach, that of specifying intention and output (file) in the URL.
45-
*
45+
*
4646
* For this reason the {@link System#out} and {@link System#err} are being refered in this class though are used only
4747
* when needed.
4848
*/
@@ -65,7 +65,7 @@ public final class Debug {
6565
* {@link DriverManager#setLogWriter(PrintWriter)} and {@link DataSource#setLogWriter(PrintWriter)}.
6666
* The former is the 'legacy' way, having a global impact on all drivers while the latter allows per
6767
* instance configuration.
68-
*
68+
*
6969
* As both approaches are not widely used, Debug will take the principle of least surprise and pick its
7070
* own configuration first; if that does not exist it will fallback to the managed approaches (assuming they
7171
* are specified, otherwise logging is simply disabled).
@@ -235,4 +235,4 @@ private static PrintStream stdout() {
235235
private static PrintStream stderr() {
236236
return System.err;
237237
}
238-
}
238+
}

x-pack/plugin/sql/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/debug/DebugLog.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
package org.elasticsearch.xpack.sql.jdbc.debug;
77

8-
import org.elasticsearch.xpack.sql.client.shared.StringUtils;
8+
import org.elasticsearch.xpack.sql.client.StringUtils;
99

1010
import java.io.PrintWriter;
1111
import java.lang.reflect.Array;
@@ -56,16 +56,16 @@ void logException(Method m, Object[] args, Throwable t) {
5656
t.printStackTrace(print);
5757
print.flush();
5858
}
59-
59+
6060

6161
private static String array(Object[] a) {
6262
if (a == null || a.length == 0) {
63-
return StringUtils.EMPTY;
63+
return StringUtils.EMPTY;
6464
}
6565
if (a.length == 1) {
6666
return handleArray(a[0]);
6767
}
68-
68+
6969
StringBuilder b = new StringBuilder();
7070
int iMax = a.length - 1;
7171
for (int i = 0; ; i++) {
@@ -97,4 +97,4 @@ private static String handleArray(Object o) {
9797
}
9898
return String.valueOf(o);
9999
}
100-
}
100+
}

x-pack/plugin/sql/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/jdbc/JdbcConfiguration.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
*/
66
package org.elasticsearch.xpack.sql.jdbc.jdbc;
77

8-
import org.elasticsearch.xpack.sql.client.shared.ConnectionConfiguration;
9-
import org.elasticsearch.xpack.sql.client.shared.StringUtils;
10-
import org.elasticsearch.xpack.sql.client.shared.Version;
8+
import org.elasticsearch.xpack.sql.client.ConnectionConfiguration;
9+
import org.elasticsearch.xpack.sql.client.StringUtils;
10+
import org.elasticsearch.xpack.sql.client.Version;
1111
import org.elasticsearch.xpack.sql.jdbc.JdbcSQLException;
1212

1313
import java.net.URI;
@@ -22,8 +22,8 @@
2222
import java.util.TimeZone;
2323
import java.util.concurrent.TimeUnit;
2424

25-
import static org.elasticsearch.xpack.sql.client.shared.UriUtils.parseURI;
26-
import static org.elasticsearch.xpack.sql.client.shared.UriUtils.removeQuery;
25+
import static org.elasticsearch.xpack.sql.client.UriUtils.parseURI;
26+
import static org.elasticsearch.xpack.sql.client.UriUtils.removeQuery;
2727

2828
/**
2929
/ Supports the following syntax

x-pack/plugin/sql/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/jdbc/JdbcDatabaseMetaData.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
*/
66
package org.elasticsearch.xpack.sql.jdbc.jdbc;
77

8-
import org.elasticsearch.xpack.sql.client.shared.ObjectUtils;
9-
import org.elasticsearch.xpack.sql.client.shared.Version;
8+
import org.elasticsearch.xpack.sql.client.ObjectUtils;
9+
import org.elasticsearch.xpack.sql.client.Version;
1010
import org.elasticsearch.xpack.sql.jdbc.JdbcSQLException;
1111
import org.elasticsearch.xpack.sql.jdbc.net.client.Cursor;
1212
import org.elasticsearch.xpack.sql.jdbc.net.protocol.ColumnInfo;

x-pack/plugin/sql/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/jdbc/JdbcDriver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
package org.elasticsearch.xpack.sql.jdbc.jdbc;
77

8-
import org.elasticsearch.xpack.sql.client.shared.Version;
8+
import org.elasticsearch.xpack.sql.client.Version;
99
import org.elasticsearch.xpack.sql.jdbc.JdbcSQLException;
1010
import org.elasticsearch.xpack.sql.jdbc.debug.Debug;
1111

@@ -127,4 +127,4 @@ public Logger getParentLogger() throws SQLFeatureNotSupportedException {
127127
private void close() {
128128
Debug.close();
129129
}
130-
}
130+
}

x-pack/plugin/sql/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/jdbcx/JdbcDataSource.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
*/
66
package org.elasticsearch.xpack.sql.jdbc.jdbcx;
77

8-
import org.elasticsearch.xpack.sql.client.shared.ConnectionConfiguration;
8+
import org.elasticsearch.xpack.sql.client.ConnectionConfiguration;
99
import org.elasticsearch.xpack.sql.jdbc.debug.Debug;
1010
import org.elasticsearch.xpack.sql.jdbc.jdbc.JdbcConfiguration;
1111
import org.elasticsearch.xpack.sql.jdbc.jdbc.JdbcConnection;
12-
import org.elasticsearch.xpack.sql.client.shared.Version;
12+
import org.elasticsearch.xpack.sql.client.Version;
1313

1414
import java.io.PrintWriter;
1515
import java.sql.Connection;
@@ -117,4 +117,4 @@ public <T> T unwrap(Class<T> iface) throws SQLException {
117117
}
118118
throw new SQLException();
119119
}
120-
}
120+
}

0 commit comments

Comments
 (0)