You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/09/13 11:52:56 UTC

[GitHub] [incubator-seatunnel] EricJoy2048 commented on a diff in pull request #2706: [DEV][Api] Replace SeaTunnelContext with JobContext and remove singleton pattern

EricJoy2048 commented on code in PR #2706:
URL: https://github.com/apache/incubator-seatunnel/pull/2706#discussion_r969499258


##########
seatunnel-api/src/main/java/org/apache/seatunnel/api/common/JobContext.java:
##########
@@ -80,7 +74,7 @@ public String getJobId() {
         return this.jobId;
     }
 
-    private SeaTunnelContext() {
+    public JobContext() {

Review Comment:
   I suggest put the constructor on top. 



##########
seatunnel-connectors-v2/connector-elasticsearch/src/java/org/apache/seatunnel/connectors/seatunnel/elasticsearch/client/EsRestClient.java:
##########
@@ -68,19 +70,19 @@ private static RestClientBuilder getRestClientBuilder(List<String> hosts, String
     }
 
     public static EsRestClient getInstance(List<String> hosts, String username, String password) {
-        if (restClient == null) {
+        if (REST_CLIENT == null) {

Review Comment:
   I think we need `double checked locking` here.



-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org