Merge branch 'ignite-218' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-218
Conflicts:
modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v1/IgniteHadoopFileSystem.java
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/65132a6c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/65132a6c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/65132a6c
Branch: refs/heads/ignite-218
Commit: 65132a6cb4f130e8112f16e41d674c2b681c99a3
Parents: de2f5fd 2278c29
Author: iveselovskiy <[email protected]>
Authored: Thu Apr 16 17:16:36 2015 +0300
Committer: iveselovskiy <[email protected]>
Committed: Thu Apr 16 17:16:36 2015 +0300
----------------------------------------------------------------------
.../hadoop/fs/v1/IgniteHadoopFileSystem.java | 21 ++++++--------------
parent/pom.xml | 2 +-
2 files changed, 7 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/65132a6c/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v1/IgniteHadoopFileSystem.java
----------------------------------------------------------------------
diff --cc
modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v1/IgniteHadoopFileSystem.java
index 0a02d88,f512d28..132a2ee
---
a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v1/IgniteHadoopFileSystem.java
+++
b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v1/IgniteHadoopFileSystem.java
@@@ -98,21 -98,21 +98,7 @@@ public class IgniteHadoopFileSystem ext
/** Grid remote client. */
private HadoopIgfsWrapper rmtClient;
--// /** User name for each thread. */
--// private final ThreadLocal<String> userName = new ThreadLocal<String>(){
--// /** {@inheritDoc} */
--// @Override protected String initialValue() {
--// return DFLT_USER_NAME;
--// }
--// };
--
--// /** Working directory for each thread. */
--// private final ThreadLocal<Path> workingDir = new ThreadLocal<Path>(){
--// /** {@inheritDoc} */
--// @Override protected Path initialValue() {
--// return getHomeDirectory();
--// }
--// };
++ /** working directory. */
private Path workingDir;
/** Default replication factor. */
@@@ -194,13 -194,26 +180,18 @@@
public static String getHadoopUser(@Nullable Configuration cfg) throws
IOException {
String user = null;
+ // TODO: Create ticket to remove these lines.
- // First, try to get the user from MR Job configuration:
- if (cfg != null)
- user = cfg.get(MRJobConfig.USER_NAME);
-
- // 2nd, try to get it from UserGroupInformation (may return any
result if we're
- // inside UserGroupInformation.doAs(...) closure):
- if (user == null) {
- UserGroupInformation currentUgi =
UserGroupInformation.getCurrentUser();
- if (currentUgi != null)
- user = currentUgi.getShortUserName();
- }
++// // First, try to get the user from MR Job configuration:
++// if (cfg != null)
++// user = cfg.get(MRJobConfig.USER_NAME);
+
- // 3rd, get the default system (process owner) user name (defaults to
"anonymous" in case of null):
- if (user == null)
- user = DFLT_USER_NAME;
+ UserGroupInformation currentUgi =
UserGroupInformation.getCurrentUser();
+ if (currentUgi != null)
+ user = currentUgi.getShortUserName();
- assert user != null;
+ user = IgfsUserContext.fixUserName(user);
- user = U.fixUserName(user);
+ assert user != null;
return user;
}