소스 검색

fix: 优化索引校验

许家凯 4 년 전
부모
커밋
f9cb80e478
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/main/scala/com/winhc/bigdata/spark/ng/utils/SwitchSummaryIndex.scala

+ 1 - 1
src/main/scala/com/winhc/bigdata/spark/ng/utils/SwitchSummaryIndex.scala

@@ -27,7 +27,7 @@ case class SwitchSummaryIndex(s: SparkSession
     val allIndices = es.catIndices()
 
     val size = allIndices.filter(a => a.equals(company_summary) || a.equals(person_summary)).size
-    if (size < 2) {
+    if (size != 2) {
       throw new RuntimeException("target indices is not found !")
     }