lucaspeng12138 commented on code in PR #4238:
URL: https://github.com/apache/incubator-inlong/pull/4238#discussion_r875555405


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/es/ElasticsearchApi.java:
##########
@@ -76,7 +93,157 @@ public boolean indexExists(String indexName) throws 
IOException {
         return getEsClient().indices().exists(getIndexRequest, 
RequestOptions.DEFAULT);
     }
 
+    /**
+     * Create index
+     *
+     * @param indexName The index name of elasticsearch
+     * @return void
+     * @throws IOException The exception may throws
+     */
+    public void createIndex(String indexName) throws IOException {
+        CreateIndexRequest createIndexRequest = new 
CreateIndexRequest(indexName);
+
+        CreateIndexResponse createIndexResponse = getEsClient().indices()
+                .create(createIndexRequest, RequestOptions.DEFAULT);
+        LOG.info("create es index: {}", createIndexResponse.isAcknowledged());

Review Comment:
   Add indexName to locate problem



##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/es/ElasticsearchApi.java:
##########
@@ -76,7 +93,157 @@ public boolean indexExists(String indexName) throws 
IOException {
         return getEsClient().indices().exists(getIndexRequest, 
RequestOptions.DEFAULT);
     }
 
+    /**
+     * Create index
+     *
+     * @param indexName The index name of elasticsearch
+     * @return void

Review Comment:
   OK, deleted



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to