Skip to content

Commit

Permalink
Add missing config
Browse files Browse the repository at this point in the history
  • Loading branch information
zhicwu committed Jul 15, 2022
1 parent 823b32a commit a95ea43
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
public class ClickHouseConfig implements Serializable {
static final class ClientOptions {
private static final ClientOptions instance = new ClientOptions();
private static final ClientOptions INSTANCE = new ClientOptions();

private final Map<String, ClickHouseOption> customOptions;

Expand Down Expand Up @@ -138,7 +138,7 @@ protected static final Object mergeMetricRegistry(List<ClickHouseConfig> list) {
public static Map<ClickHouseOption, Serializable> toClientOptions(Map<?, ?> props) {
Map<ClickHouseOption, Serializable> options = new HashMap<>();
if (props != null && !props.isEmpty()) {
Map<String, ClickHouseOption> customOptions = ClientOptions.instance.customOptions;
Map<String, ClickHouseOption> customOptions = ClientOptions.INSTANCE.customOptions;
for (Entry<?, ?> e : props.entrySet()) {
if (e.getKey() == null || e.getValue() == null) {
continue;
Expand Down Expand Up @@ -202,6 +202,7 @@ public static Map<ClickHouseOption, Serializable> toClientOptions(Map<?, ?> prop
private final String sslKey;
private final boolean useBlockingQueue;
private final boolean useObjectsInArray;
private final boolean useNoProxy;
private final boolean useServerTimeZone;
private final boolean useServerTimeZoneForDates;
private final TimeZone timeZoneForDate;
Expand Down Expand Up @@ -297,6 +298,7 @@ public ClickHouseConfig(Map<ClickHouseOption, Serializable> options, ClickHouseC
this.sslKey = (String) getOption(ClickHouseClientOption.SSL_KEY);
this.useBlockingQueue = (boolean) getOption(ClickHouseClientOption.USE_BLOCKING_QUEUE);
this.useObjectsInArray = (boolean) getOption(ClickHouseClientOption.USE_OBJECTS_IN_ARRAYS);
this.useNoProxy = (boolean) getOption(ClickHouseClientOption.USE_NO_PROXY);
this.useServerTimeZone = (boolean) getOption(ClickHouseClientOption.USE_SERVER_TIME_ZONE);
this.useServerTimeZoneForDates = (boolean) getOption(ClickHouseClientOption.USE_SERVER_TIME_ZONE_FOR_DATES);

Expand Down Expand Up @@ -649,6 +651,10 @@ public boolean isUseObjectsInArray() {
return useObjectsInArray;
}

public boolean isUseNoProxy() {
return useNoProxy;
}

public boolean isUseServerTimeZone() {
return useServerTimeZone;
}
Expand Down

0 comments on commit a95ea43

Please sign in to comment.