Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -177,21 +177,6 @@
<level>INFO</level>
</filter>
</appender>
<appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="QUERY_FREQUENCY">
<file>${IOTDB_HOME}/logs/log_datanode_query_frequency.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${IOTDB_HOME}/logs/log-datanode-query-frequency-%d{yyyyMMdd}.log.gz</fileNamePattern>
<maxHistory>30</maxHistory>
</rollingPolicy>
<append>true</append>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%d [%t] %-5p %C{25}:%L - %m %n</pattern>
<charset>utf-8</charset>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>INFO</level>
</filter>
</appender>
<appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="COMPACTION">
<file>${IOTDB_HOME}/logs/log_datanode_compaction.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,19 @@

import org.apache.iotdb.commons.exception.MetadataException;
import org.apache.iotdb.commons.path.MeasurementPath;
import org.apache.iotdb.commons.path.PartialPath;

import java.util.List;

public class BrokenViewException extends MetadataException {

public BrokenViewException(String sourcePath) {
super(String.format("The source path [%s] is deleted", sourcePath));
}

public BrokenViewException(String sourcePath, List<MeasurementPath> matchedPaths) {
super(
String.format(
"View is broken! The source path [%s] maps to unmatched %s path(s): %s.",
sourcePath, matchedPaths.size(), matchedPaths));
}

public BrokenViewException(String viewPath, String sourcePath, List<PartialPath> matchedPaths) {
super(
String.format(
"View [%s] is broken! The source path [%s] maps to unmatched %s path(s): %s.",
viewPath, sourcePath, matchedPaths.size(), matchedPaths));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public RegionExecutionResult execute(ConsensusGroupId groupId, PlanNode planNode
new WritePlanNodeExecutionContext(groupId, regionManager.getRegionLock(groupId));
return planNode.accept(executionVisitor, context);
} catch (Throwable e) {
LOGGER.error(e.getMessage(), e);
LOGGER.warn(e.getMessage(), e);
RegionExecutionResult result = new RegionExecutionResult();
result.setAccepted(false);
result.setMessage(e.getMessage());
Expand Down Expand Up @@ -178,7 +178,7 @@ public RegionExecutionResult visitPlan(PlanNode node, WritePlanNodeExecutionCont
response.setMessage(status.getMessage());
response.setStatus(status);
} catch (ConsensusException e) {
LOGGER.error("Failed in the write API executing the consensus layer due to: ", e);
LOGGER.warn("Failed in the write API executing the consensus layer due to: ", e);
response.setAccepted(false);
response.setMessage(e.toString());
response.setStatus(
Expand Down Expand Up @@ -346,7 +346,7 @@ private RegionExecutionResult executeCreateTimeSeries(
: super.visitCreateTimeSeries(node, context);
} else {
MetadataException metadataException = failingMeasurementMap.get(0);
LOGGER.error(METADATA_ERROR_MSG, metadataException);
LOGGER.warn(METADATA_ERROR_MSG, metadataException);
result = new RegionExecutionResult();
result.setAccepted(false);
result.setMessage(metadataException.getMessage());
Expand Down Expand Up @@ -395,7 +395,7 @@ private RegionExecutionResult executeCreateAlignedTimeSeries(
: super.visitCreateAlignedTimeSeries(node, context);
} else {
MetadataException metadataException = failingMeasurementMap.values().iterator().next();
LOGGER.error(METADATA_ERROR_MSG, metadataException);
LOGGER.warn(METADATA_ERROR_MSG, metadataException);
result = new RegionExecutionResult();
result.setAccepted(false);
result.setMessage(metadataException.getMessage());
Expand Down Expand Up @@ -491,7 +491,7 @@ private void checkMeasurementExistence(

for (Map.Entry<Integer, MetadataException> failingMeasurement :
failingMeasurementMap.entrySet()) {
LOGGER.error(METADATA_ERROR_MSG, failingMeasurement.getValue());
LOGGER.warn(METADATA_ERROR_MSG, failingMeasurement.getValue());
failingStatus.add(
RpcUtils.getStatus(
failingMeasurement.getValue().getErrorCode(),
Expand Down Expand Up @@ -962,7 +962,7 @@ private RegionExecutionResult executeCreateLogicalView(
// if there are some exceptions, handle each exception and return first of them.
if (!failingMetadataException.isEmpty()) {
MetadataException metadataException = failingMetadataException.get(0);
LOGGER.error(METADATA_ERROR_MSG, metadataException);
LOGGER.warn(METADATA_ERROR_MSG, metadataException);
RegionExecutionResult result = new RegionExecutionResult();
result.setAccepted(false);
result.setMessage(metadataException.getMessage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ public Expression visitTimeSeriesOperand(
} catch (Exception notAMeasurementPath) {
List<MeasurementPath> actualPaths = schemaTree.searchMeasurementPaths(path).left;
if (actualPaths.size() != 1) {
throw new SemanticException(new BrokenViewException(path.getFullPath(), actualPaths));
if (actualPaths.isEmpty()) {
throw new SemanticException(new BrokenViewException(path.getFullPath()));
} else {
throw new SemanticException(new BrokenViewException(path.getFullPath(), actualPaths));
}
}
return new TimeSeriesOperand(actualPaths.get(0));
}
Expand Down