Skip to content

Commit d1270de

Browse files
authored
setup (#16752)
1 parent df13612 commit d1270de

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/LoadTsFileAnalyzer.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
import java.io.File;
9898
import java.io.FileNotFoundException;
9999
import java.io.IOException;
100+
import java.nio.BufferUnderflowException;
100101
import java.util.ArrayList;
101102
import java.util.Arrays;
102103
import java.util.Collections;
@@ -306,10 +307,17 @@ private boolean doAnalyzeFileByFile(Analysis analysis) {
306307
// just return false to STOP the analysis process,
307308
// the real result on the conversion will be set in the analysis.
308309
return false;
310+
} catch (BufferUnderflowException e) {
311+
LOGGER.warn(
312+
"The file {} is not a valid tsfile. Please check the input file.", tsFile.getPath(), e);
313+
throw new SemanticException(
314+
String.format(
315+
"The file %s is not a valid tsfile. Please check the input file.",
316+
tsFile.getPath()));
309317
} catch (Exception e) {
310318
final String exceptionMessage =
311319
String.format(
312-
"The file %s is not a valid tsfile. Please check the input file. Detail: %s",
320+
"Loading file %s failed. Detail: %s",
313321
tsFile.getPath(), e.getMessage() == null ? e.getClass().getName() : e.getMessage());
314322
LOGGER.warn(exceptionMessage, e);
315323
analysis.setFinishQueryAfterAnalyze(true);

0 commit comments

Comments
 (0)