in flink-connector-influxdb2/src/main/java/org/apache/flink/streaming/connectors/influxdb/sink2/InfluxDBSinkBuilder.java [199:219]
private void sanityCheck() {
// Check required settings.
checkNotNull(this.influxDBUrl, "The InfluxDB URL is required but not provided.");
// check that either username/password or token is provided for authentication
checkArgument(
this.influxDBToken != null
|| (this.influxDBUsername != null && this.influxDBPassword != null),
"Either the InfluxDB username and password or InfluxDB token are required but neither provided"
);
// check that both username/password and token are not both provided for authentication
checkArgument(
! (this.influxDBToken != null
&& (this.influxDBUsername != null || this.influxDBPassword != null)),
"Either the InfluxDB username and password or InfluxDB token are required but both provided"
);
checkNotNull(this.bucketName, "The Bucket name is required but not provided.");
checkNotNull(this.organizationName, "The Organization name is required but not provided.");
checkNotNull(
this.influxDBSchemaSerializer,
"Serialization schema is required but not provided.");
}