Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "(2nd round) fix under fs and glusterfs configuration issues" #634

Merged
merged 1 commit into from
Jan 27, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions core/src/main/java/tachyon/UnderFileSystemHdfs.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,17 @@ private UnderFileSystemHdfs(String fsDefaultName, Object conf) {
mUfsPrefix = fsDefaultName;
Configuration tConf;
if (conf != null) {
tConf = new Configuration((Configuration) conf);
tConf = (Configuration) conf;
} else {
tConf = new Configuration();
}
String glusterfsPrefix = "glusterfs:///";
tConf.set("fs.defaultFS", fsDefaultName);
if (fsDefaultName.startsWith(glusterfsPrefix)) {
if (tConf.get("fs.glusterfs.impl") == null) {
tConf.set("fs.glusterfs.impl", CommonConf.get().UNDERFS_GLUSTERFS_IMPL);
}
if (tConf.get("mapred.system.dir") == null) {
tConf.set("mapred.system.dir", CommonConf.get().UNDERFS_GLUSTERFS_MR_DIR);
}
if (tConf.get("fs.glusterfs.volumes") == null) {
tConf.set("fs.glusterfs.volumes", CommonConf.get().UNDERFS_GLUSTERFS_VOLUMES);
tConf.set("fs.glusterfs.volume.fuse." + CommonConf.get().UNDERFS_GLUSTERFS_VOLUMES,
CommonConf.get().UNDERFS_GLUSTERFS_MOUNTS);
}
tConf.set("fs.glusterfs.impl", CommonConf.get().UNDERFS_GLUSTERFS_IMPL);
tConf.set("mapred.system.dir", CommonConf.get().UNDERFS_GLUSTERFS_MR_DIR);
tConf.set("fs.glusterfs.volumes", CommonConf.get().UNDERFS_GLUSTERFS_VOLUMES);
tConf.set("fs.glusterfs.volume.fuse." + CommonConf.get().UNDERFS_GLUSTERFS_VOLUMES,
CommonConf.get().UNDERFS_GLUSTERFS_MOUNTS);
} else {
tConf.set("fs.hdfs.impl", CommonConf.get().UNDERFS_HDFS_IMPL);

Expand Down
6 changes: 1 addition & 5 deletions core/src/main/java/tachyon/hadoop/AbstractTFS.java
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,7 @@ public boolean delete(Path cPath, boolean recursive) throws IOException {
private void fromHdfsToTachyon(TachyonURI path) throws IOException {
if (!mTFS.exist(path)) {
Path hdfsPath = Utils.getHDFSPath(path, mUnderFSAddress);
Configuration conf = new Configuration(getConf());
if (conf.get("fs.defaultFS") == null) {
conf.set("fs.defaultFS", mUnderFSAddress);
}
FileSystem fs = hdfsPath.getFileSystem(conf);
FileSystem fs = hdfsPath.getFileSystem(getConf());
if (fs.exists(hdfsPath)) {
TachyonURI ufsUri = new TachyonURI(mUnderFSAddress);
TachyonURI ufsAddrPath = new TachyonURI(ufsUri.getScheme(), ufsUri.getAuthority(),
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.6</java.version>
<hadoop.version>1.0.4</hadoop.version>
<glusterfs-hadoop.version>2.3.13</glusterfs-hadoop.version>
<glusterfs-hadoop.version>2.3.5</glusterfs-hadoop.version>
<libthrift.version>0.9.1</libthrift.version>
<cxf.version>2.7.0</cxf.version>
<jetty.version>7.6.15.v20140411</jetty.version>
Expand Down