SteveYurongSu commented on a change in pull request #4172:
URL: https://github.com/apache/iotdb/pull/4172#discussion_r733286086
##########
File path:
influxdb-protocol/src/main/java/org/apache/iotdb/influxdb/IoTDBInfluxDB.java
##########
@@ -173,40 +169,71 @@ public void write(
final ConsistencyLevel consistency,
final TimeUnit precision,
final List<String> records) {
- throw new UnsupportedOperationException(METHOD_NOT_SUPPORTED);
+ throw new
UnsupportedOperationException(InfluxDBConstant.METHOD_NOT_SUPPORTED);
}
@Override
public void write(final int udpPort, final String records) {
- throw new UnsupportedOperationException(METHOD_NOT_SUPPORTED);
+ throw new
UnsupportedOperationException(InfluxDBConstant.METHOD_NOT_SUPPORTED);
}
@Override
public void write(final int udpPort, final List<String> records) {
- throw new UnsupportedOperationException(METHOD_NOT_SUPPORTED);
+ throw new
UnsupportedOperationException(InfluxDBConstant.METHOD_NOT_SUPPORTED);
+ }
+
+ @Override
+ public QueryResult query(final Query query) {
+ throw new
UnsupportedOperationException(InfluxDBConstant.METHOD_NOT_SUPPORTED);
+ }
+
+ @Override
+ public void createDatabase(final String name) {
+ IoTDBInfluxDBUtils.checkNonEmptyString(name, "database name");
+ try {
+ session.setStorageGroup("root." + name);
+ } catch (IoTDBConnectionException | StatementExecutionException e) {
+ if (!(e instanceof StatementExecutionException)
Review comment:
catch ... catch ...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]