jojochuang commented on a change in pull request #710: HADOOP-16237. Fix new 
findbugs issues after update guava to 27.0-jre …
URL: https://github.com/apache/hadoop/pull/710#discussion_r274091292
 
 

 ##########
 File path: 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-documentstore/src/main/java/org/apache/hadoop/yarn/server/timelineservice/documentstore/reader/cosmosdb/CosmosDBDocumentStoreReader.java
 ##########
 @@ -49,7 +49,7 @@
       .getLogger(CosmosDBDocumentStoreReader.class);
   private static final int DEFAULT_DOCUMENTS_SIZE = 1;
 
-  private static DocumentClient client;
+  private static volatile DocumentClient client;
 
 Review comment:
   The volatile keyword is used to address double-checked-locking issue. Neat.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to