You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2019/06/07 17:59:01 UTC
[GitHub] [accumulo] ctubbsii commented on a change in pull request #1112:
Fixes #1052 - Review DistributedCache usage - Changed how token files and
property files get cached
ctubbsii commented on a change in pull request #1112: Fixes #1052 - Review DistributedCache usage - Changed how token files and property files get cached
URL: https://github.com/apache/accumulo/pull/1112#discussion_r291686682
##########
File path: core/src/main/java/org/apache/accumulo/core/clientImpl/mapreduce/lib/ConfiguratorBase.java
##########
@@ -284,16 +287,17 @@ public static AuthenticationToken getTokenFromFile(Configuration conf, String pr
String tokenFile) {
FSDataInputStream in = null;
try {
- URI[] uris = DistributedCacheHelper.getCacheFiles(conf);
- Path path = null;
- for (URI u : uris) {
- if (u.toString().equals(tokenFile)) {
- path = new Path(u);
- }
+ Path path;
+ // See if the "tokenfile" symlink was created and try to open the file it points to by it.
+ File tempFile = new File(ConfiguratorBase.cachedFileName);
+ if (tempFile.exists()) {
+ path = new Path(ConfiguratorBase.cachedFileName);
Review comment:
Another conversion of local File to HDFS Path, which I'm not sure will work correctly.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services