@@ -452,7 +452,7 @@ public static void configureIndexAndTypes(String ds, List<Map<String, String>> e
452452 * @param filters the filters
453453 * @return the existing info
454454 */
455- public static Map <String , Map <String , String >> getExistingInfo (String indexName , String type , List <String > filters ) {
455+ public static Map <String , Map <String , String >> getExistingInfo (String indexName , String type , List <String > filters ) throws Exception {
456456 int count = getTypeCount (indexName , type );
457457 int _count = count ;
458458 boolean scroll = false ;
@@ -499,7 +499,7 @@ public static Map<String, Map<String, String>> getExistingInfo(String indexName,
499499 * @return the string
500500 */
501501 private static String fetchDataAndScrollId (String endPoint , Map <String , Map <String , String >> _data , String keyField ,
502- String payLoad ) {
502+ String payLoad ) throws Exception {
503503 try {
504504 ObjectMapper objMapper = new ObjectMapper ();
505505 Response response = invokeAPI ("GET" , endPoint , payLoad );
@@ -519,8 +519,9 @@ private static String fetchDataAndScrollId(String endPoint, Map<String, Map<Stri
519519 return scrollId ;
520520 } catch (ParseException | IOException e ) {
521521 LOGGER .error ("Error in fetchDataAndScrollId" , e );
522+ throw new Exception ("Error in Fetching existing data from ES " +e );
523+
522524 }
523- return "" ;
524525 }
525526
526527 /**
0 commit comments