Skip to content

Commit

Permalink
add exception handler
Browse files Browse the repository at this point in the history
  • Loading branch information
YC27 committed Sep 27, 2024
1 parent 6f48594 commit 068fa8b
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@ private void handleLoadFailure(final Pair<String, Boolean> filePair, final TSSta
"Rejecting auto load tsfile {} (isGeneratedByPipe = {}) due to memory constraints, will retry later.",
filePair.getLeft(),
filePair.getRight());
} else if (status.getMessage() != null && status.getMessage().contains("read only")) {
LOGGER.info(
"Error occurred when loading tsfile {} (isGeneratedByPipe = {}) due to the system is read only",
filePair.getLeft(),
filePair.getRight());
} else {
LOGGER.warn(
"Failed to auto load tsfile {} (isGeneratedByPipe = {}), status: {}. File will be moved to fail directory.",
Expand All @@ -236,6 +241,11 @@ private void handleOtherException(final Pair<String, Boolean> filePair, final Ex
"Rejecting auto load tsfile {} (isGeneratedByPipe = {}) due to memory constraints, will retry later.",
filePair.getLeft(),
filePair.getRight());
} else if (e.getMessage() != null && e.getMessage().contains("read only")) {
LOGGER.info(
"Error occurred when loading tsfile {} (isGeneratedByPipe = {}) due to the system is read only",
filePair.getLeft(),
filePair.getRight());
} else {
LOGGER.warn(
"Failed to auto load tsfile {} (isGeneratedByPipe = {}) because of an unexpected exception. File will be moved to fail directory.",
Expand Down

0 comments on commit 068fa8b

Please sign in to comment.