@@ -329,7 +329,7 @@ static CompletableFuture<ClickHouseResponseSummary> dump(ClickHouseNode server,
329
329
330
330
return submit (() -> {
331
331
try (ClickHouseClient client = newInstance (theServer .getProtocol ())) {
332
- ClickHouseRequest <?> request = client .connect (theServer ).output (stream );
332
+ ClickHouseRequest <?> request = client .read (theServer ).output (stream );
333
333
// FIXME what if the table name is `try me`?
334
334
if (theQuery .indexOf (' ' ) < 0 ) {
335
335
request .table (theQuery );
@@ -415,7 +415,7 @@ static CompletableFuture<ClickHouseResponseSummary> dump(ClickHouseNode server,
415
415
416
416
return submit (() -> {
417
417
try (ClickHouseClient client = newInstance (theServer .getProtocol ())) {
418
- ClickHouseRequest <?> request = client .connect (theServer ).compressServerResponse (compression )
418
+ ClickHouseRequest <?> request = client .read (theServer ).compressServerResponse (compression )
419
419
.format (format ).output (output );
420
420
// FIXME what if the table name is `try me`?
421
421
if (theQuery .indexOf (' ' ) < 0 ) {
@@ -485,7 +485,7 @@ static CompletableFuture<ClickHouseResponseSummary> load(ClickHouseNode server,
485
485
486
486
return submit (() -> {
487
487
try (ClickHouseClient client = newInstance (theServer .getProtocol ());
488
- ClickHouseResponse response = client .connect ( theServer ). write ().table (table ).data (stream )
488
+ ClickHouseResponse response = client .write (theServer ).table (table ).data (stream )
489
489
.executeAndWait ()) {
490
490
return response .getSummary ();
491
491
}
@@ -516,7 +516,7 @@ static CompletableFuture<ClickHouseResponseSummary> load(ClickHouseNode server,
516
516
517
517
return submit (() -> {
518
518
try (ClickHouseClient client = newInstance (theServer .getProtocol ());
519
- ClickHouseResponse response = client .connect ( theServer ). write ().table (table ).data (writer )
519
+ ClickHouseResponse response = client .write (theServer ).table (table ).data (writer )
520
520
.decompressClientRequest (compression ).format (format ).executeAndWait ()) {
521
521
return response .getSummary ();
522
522
}
@@ -611,7 +611,7 @@ static CompletableFuture<ClickHouseResponseSummary> load(ClickHouseNode server,
611
611
612
612
return submit (() -> {
613
613
try (ClickHouseClient client = newInstance (theServer .getProtocol ());
614
- ClickHouseResponse response = client .connect ( theServer ). write ().table (table ).data (input )
614
+ ClickHouseResponse response = client .write (theServer ).table (table ).data (input )
615
615
.decompressClientRequest (compression ).format (format ).executeAndWait ()) {
616
616
return response .getSummary ();
617
617
} finally {
@@ -697,7 +697,7 @@ static CompletableFuture<List<ClickHouseResponseSummary>> send(ClickHouseNode se
697
697
try (ClickHouseClient client = ClickHouseClient .builder ()
698
698
.nodeSelector (ClickHouseNodeSelector .of (theServer .getProtocol ()))
699
699
.option (ClickHouseClientOption .ASYNC , false ).build ()) {
700
- ClickHouseRequest <?> request = client .connect (theServer ).format (ClickHouseFormat .RowBinary );
700
+ ClickHouseRequest <?> request = client .read (theServer ).format (ClickHouseFormat .RowBinary );
701
701
if ((boolean ) ClickHouseDefaults .AUTO_SESSION .getEffectiveDefaultValue () && queries .size () > 1 ) {
702
702
request .session (request .getManager ().createSessionId (), false );
703
703
}
@@ -736,7 +736,7 @@ static CompletableFuture<ClickHouseResponseSummary> send(ClickHouseNode server,
736
736
try (ClickHouseClient client = ClickHouseClient .builder ()
737
737
.nodeSelector (ClickHouseNodeSelector .of (theServer .getProtocol ()))
738
738
.option (ClickHouseClientOption .ASYNC , false ).build ();
739
- ClickHouseResponse resp = client .connect (theServer ).format (ClickHouseFormat .RowBinary ).query (sql )
739
+ ClickHouseResponse resp = client .read (theServer ).format (ClickHouseFormat .RowBinary ).query (sql )
740
740
.params (params ).executeAndWait ()) {
741
741
return resp .getSummary ();
742
742
}
@@ -806,7 +806,7 @@ static CompletableFuture<List<ClickHouseResponseSummary>> send(ClickHouseNode se
806
806
.nodeSelector (ClickHouseNodeSelector .of (theServer .getProtocol ()))
807
807
.option (ClickHouseClientOption .ASYNC , false ).build ()) {
808
808
// format doesn't matter here as we only need a summary
809
- ClickHouseRequest <?> request = client .connect (theServer ).format (ClickHouseFormat .RowBinary ).query (sql );
809
+ ClickHouseRequest <?> request = client .read (theServer ).format (ClickHouseFormat .RowBinary ).query (sql );
810
810
for (int i = 0 ; i < size ; i ++) {
811
811
Object [] o = params [i ];
812
812
String [] arr = new String [len ];
@@ -859,7 +859,7 @@ static CompletableFuture<List<ClickHouseResponseSummary>> send(ClickHouseNode se
859
859
.nodeSelector (ClickHouseNodeSelector .of (theServer .getProtocol ()))
860
860
.option (ClickHouseClientOption .ASYNC , false ).build ()) {
861
861
// format doesn't matter here as we only need a summary
862
- ClickHouseRequest <?> request = client .connect (theServer ).format (ClickHouseFormat .RowBinary );
862
+ ClickHouseRequest <?> request = client .read (theServer ).format (ClickHouseFormat .RowBinary );
863
863
ClickHouseParameterizedQuery query = ClickHouseParameterizedQuery .of (request .getConfig (), sql );
864
864
StringBuilder builder = new StringBuilder ();
865
865
for (String [] p : params ) {
@@ -1093,7 +1093,7 @@ default boolean ping(ClickHouseNode server, int timeout) {
1093
1093
if (server .getProtocol () == ClickHouseProtocol .ANY ) {
1094
1094
server = ClickHouseNode .probe (server .getHost (), server .getPort (), timeout );
1095
1095
}
1096
- try (ClickHouseResponse resp = connect (server ) // create request
1096
+ try (ClickHouseResponse resp = read (server ) // create request
1097
1097
.option (ClickHouseClientOption .ASYNC , false ) // use current thread
1098
1098
.option (ClickHouseClientOption .CONNECTION_TIMEOUT , timeout )
1099
1099
.option (ClickHouseClientOption .SOCKET_TIMEOUT , timeout )
0 commit comments