Source:
public void initialize(URI name, Configuration conf) throws IOException { super.initialize(name, conf); setConf(conf); Objects.requireNonNull(name.getScheme(), "No scheme provided in " + name); Preconditions.checkArgument(getScheme().equals(name.getScheme()), "Invalid scheme provided in " + name); String authority = name.getAuthority(); Matcher matcher = URL_SCHEMA_PATTERN.matcher(authority); if (!matcher.matches()) { throw new IllegalArgumentException(URI_EXCEPTION_TEXT); } String bucketStr = matcher.group(1); String volumeStr = matcher.group(2); String remaining = matcher.groupCount() == 3 ? matcher.group(3) : null; String omHost = null; String omPort = String.valueOf(-1); if (!isEmpty(remaining)) { String[] parts = remaining.split(":"); if (parts.length > 2) { throw new IllegalArgumentException(URI_EXCEPTION_TEXT); } omHost = parts[0]; omPort = parts.length == 2 ? parts[1] : String.valueOf(OZONE_OM_PORT_DEFAULT); if (!isNumber(omPort)) { throw new IllegalArgumentException(URI_EXCEPTION_TEXT); } } try { uri = new URIBuilder().setScheme(OZONE_URI_SCHEME) .setHost(authority) .build(); LOG.trace("Ozone URI for ozfs initialization is " + uri); boolean defaultValue = BasicOzoneFileSystem.class.getClassLoader() .getResource("ozonefs.txt") != null; boolean isolatedClassloader = conf.getBoolean("ozone.fs.isolated-classloader", defaultValue); this.adapter = createAdapter(conf, bucketStr, volumeStr, omHost, omPort, isolatedClassloader); try { this.userName = UserGroupInformation.getCurrentUser().getShortUserName(); } catch (IOException e) { this.userName = OZONE_DEFAULT_USER; } this.workingDir = new Path(OZONE_USER_DIR, this.userName) .makeQualified(this.uri, this.workingDir); } catch (URISyntaxException ue) { final String msg = "Invalid Ozone endpoint " + name; LOG.error(msg, ue); throw new IOException(msg, ue); } }

Target:
public void initialize(URI name, Configuration conf) throws IOException { super.initialize(name, conf); setConf(conf); Objects.requireNonNull(name.getScheme(), "No scheme provided in " + name); Preconditions.checkArgument(getScheme().equals(name.getScheme()), "Invalid scheme provided in " + name); String authority = name.getAuthority(); Matcher matcher = URL_SCHEMA_PATTERN.matcher(authority); if (!matcher.matches()) { throw new IllegalArgumentException(URI_EXCEPTION_TEXT); } String bucketStr = matcher.group(1); String volumeStr = matcher.group(2); String remaining = matcher.groupCount() == 3 ? matcher.group(3) : null; String omHost = null; String omPort = String.valueOf(-1); if (!isEmpty(remaining)) { String[] parts = remaining.split(":"); if (parts.length > 2) { throw new IllegalArgumentException(URI_EXCEPTION_TEXT); } omHost = parts[0]; if (parts.length == 2) { omPort = parts[1]; } else { omPort = String.valueOf(OmUtils.getOmRpcPort(conf)); } if (!isNumber(omPort)) { throw new IllegalArgumentException(URI_EXCEPTION_TEXT); } } try { uri = new URIBuilder().setScheme(OZONE_URI_SCHEME) .setHost(authority) .build(); LOG.trace("Ozone URI for ozfs initialization is " + uri); boolean defaultValue = BasicOzoneFileSystem.class.getClassLoader() .getResource("ozonefs.txt") != null; boolean isolatedClassloader = conf.getBoolean("ozone.fs.isolated-classloader", defaultValue); this.adapter = createAdapter(conf, bucketStr, volumeStr, omHost, omPort, isolatedClassloader); try { this.userName = UserGroupInformation.getCurrentUser().getShortUserName(); } catch (IOException e) { this.userName = OZONE_DEFAULT_USER; } this.workingDir = new Path(OZONE_USER_DIR, this.userName) .makeQualified(this.uri, this.workingDir); } catch (URISyntaxException ue) { final String msg = "Invalid Ozone endpoint " + name; LOG.error(msg, ue); throw new IOException(msg, ue); } }