You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2020/04/20 01:26:29 UTC
[GitHub] [incubator-iotdb] qiaojialin commented on a change in pull request #1034: [IOTDB-588] Add tags and attributes management
qiaojialin commented on a change in pull request #1034:
URL: https://github.com/apache/incubator-iotdb/pull/1034#discussion_r411038791
##########
File path: server/src/main/java/org/apache/iotdb/db/exception/metadata/AliasAlreadyExistException.java
##########
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.iotdb.db.exception.metadata;
+
+import org.apache.iotdb.rpc.TSStatusCode;
+
+public class AliasAlreadyExistException extends MetadataException {
+
+ private static final long serialVersionUID = 7299770003548114589L;
+
+ public AliasAlreadyExistException(String path, String alias) {
+ super(String.format("Alias [%s] for Path [%s] already exist", alias, path),
+ TSStatusCode.PATH_ALREADY_EXIST_ERROR.getStatusCode());
Review comment:
added a ALIAS_ALREADY_EXIST_ERROR
##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/MManager.java
##########
@@ -310,58 +337,36 @@ public void createTimeseries(String path, TSDataType dataType, TSEncoding encodi
maxSeriesNumberAmongStorageGroup = size + 1;
}
}
+ } catch (IOException | ConfigAdjusterException e) {
+ throw new MetadataException(e.getMessage());
} finally {
lock.writeLock().unlock();
}
}
- @TestOnly
- public void createTimeseries(String path, String dataType, String encoding)
- throws MetadataException {
- lock.writeLock().lock();
- try {
- TSDataType tsDataType = TSDataType.valueOf(dataType);
- TSEncoding tsEncoding = TSEncoding.valueOf(encoding);
- CompressionType type = TSFileDescriptor.getInstance().getConfig().getCompressor();
- createTimeseriesWithMemoryCheckAndLog(path, tsDataType, tsEncoding, type,
- Collections.emptyMap());
- } finally {
- lock.writeLock().unlock();
- }
+ public Set<LeafMNode> queryTimeseriesByTag(String tagKey, String tagValue) {
Review comment:
removed
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org