/** * default class initialization * * @param fsuri path to Swift * @param conf Hadoop configuration * @throws IOException */ @Override public void initialize(URI fsuri, Configuration conf) throws IOException { super.initialize(fsuri, conf); setConf(conf); if (store == null) { store = new SwiftNativeFileSystemStore(); } this.uri = fsuri; this.workingDir = new Path("/user", System.getProperty("user.name")) .makeQualified(uri, new Path(System.getProperty("user.name"))); if (LOG.isDebugEnabled()) { LOG.debug( "Initializing SwiftNativeFileSystem against URI " + uri + " and working dir " + workingDir); } store.initialize(uri, conf); LOG.debug("SwiftFileSystem initialized"); }
/** * default class initialization * * @param fsuri path to Swift * @param conf Hadoop configuration * @throws IOException */ @Override public void initialize(URI fsuri, Configuration conf) throws IOException { super.initialize(fsuri, conf); setConf(conf); if (store == null) { store = new SwiftNativeFileSystemStore(); } this.uri = fsuri; // the URI given maps to the x-ref in the config, that is retained // for visibility/comparison, but behind the scenes it is converted // into the references relative URI.create(String.format("%s://%s:%d/", fsuri.getScheme(), fsuri.getHost(), fsuri.getPort())); this.workingDir = new Path("/user", System.getProperty("user.name")).makeQualified(this); if (LOG.isDebugEnabled()) { LOG.debug( "Initializing SwiftNativeFileSystem against URI " + uri + " and working dir " + workingDir); } store.initialize(uri, conf); LOG.debug("SwiftFileSystem initialized"); }