You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2018/11/27 18:15:11 UTC

[GitHub] leventov commented on a change in pull request #6664: Fix a race in FileSessionCredentialsProvider

leventov commented on a change in pull request #6664: Fix a race in FileSessionCredentialsProvider
URL: https://github.com/apache/incubator-druid/pull/6664#discussion_r236785184
 
 

 ##########
 File path: aws-common/src/main/java/org/apache/druid/common/aws/FileSessionCredentialsProvider.java
 ##########
 @@ -24,27 +24,25 @@
 import com.amazonaws.auth.AWSSessionCredentials;
 import org.apache.druid.java.util.common.concurrent.Execs;
 
-import java.io.File;
-import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.util.Properties;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
 
 public class FileSessionCredentialsProvider implements AWSCredentialsProvider
 {
-  private final String sessionCredentials;
-  private volatile String sessionToken;
-  private volatile String accessKey;
-  private volatile String secretKey;
+  private final String sessionCredentialsFile;
+  private AWSSessionCredentials awsSessionCredentials;
 
 Review comment:
   It doesn't need to be volatile. From JMM point of view, volatile on this field changes anything and doesn't provide any extra guarantees.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org