IResource r = (IResource) element;
URI locationURI = r.getLocationURI();
if (locationURI != null && HDFSURI.SCHEME.equals(locationURI.getScheme())) {
try {
if (r instanceof IProject) {
final HDFSManager hdfsManager = HDFSManager.INSTANCE;
HDFSServer server = hdfsManager.getServer(locationURI.toString());
if (server != null) {
String serverUrl = server.getUri();
String userId = server.getUserId();
if (userId == null) {
try {
userId = hdfsManager.getClient(serverUrl,server.getVersion()).getDefaultUserAndGroupIds().get(0);
} catch (Throwable e) {
userId = null;
}
}
if (userId == null)