소스 검색

metric log

ehlxr 1 년 전
부모
커밋
ca6ef42701
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      etl-core/src/main/java/com/tzld/crawler/etl/service/impl/EtlServiceImpl.java

+ 1 - 3
etl-core/src/main/java/com/tzld/crawler/etl/service/impl/EtlServiceImpl.java

@@ -422,9 +422,7 @@ public class EtlServiceImpl implements EtlService {
 
         File file = new File(filePath);
         if (!file.exists() || file.length() <= 0) {
-            String msg = String.format("download file from [%s] is empty.", fileUrl);
-            metric(MetricTypeEnum.DOWNLOAD_FAILED, msg);
-            throw new CommonException(ExceptionEnum.DATA_ERROR, msg);
+            throw new CommonException(ExceptionEnum.DATA_ERROR, String.format("download file from [%s] is empty.", fileUrl));
         }
 
         return relFileDir + File.separator + fileName;