Skip to content

Commit

Permalink
Merge pull request Alluxio#581 from jxfeng/up
Browse files Browse the repository at this point in the history
configuration fix : conf pass down
  • Loading branch information
haoyuan committed Dec 27, 2014
2 parents 12dfb49 + f51c355 commit a26ee0d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion core/src/main/java/tachyon/client/BlockInStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public abstract class BlockInStream extends InStream {
*/
public static BlockInStream get(TachyonFile tachyonFile, ReadType readType, int blockIndex)
throws IOException {
return get(tachyonFile, readType, blockIndex, null);
return get(tachyonFile, readType, blockIndex, tachyonFile.getUFSConf());
}

/**
Expand Down
3 changes: 2 additions & 1 deletion core/src/main/java/tachyon/client/FileOutStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ public class FileOutStream extends OutStream {
mCachedBytes = 0;

if (mWriteType.isThrough()) {
mUnderFsFile = CommonUtils.concat(mTachyonFS.createAndGetUserUfsTempFolder(), mFile.mFileId);
mUnderFsFile = CommonUtils.concat(mTachyonFS.createAndGetUserUfsTempFolder(ufsConf),
mFile.mFileId);
UnderFileSystem underfsClient = UnderFileSystem.get(mUnderFsFile, ufsConf);
if (mBlockCapacityByte > Integer.MAX_VALUE) {
throw new IOException("BLOCK_CAPCAITY (" + mBlockCapacityByte + ") can not bigger than "
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/java/tachyon/client/TachyonFS.java
Original file line number Diff line number Diff line change
Expand Up @@ -257,18 +257,18 @@ synchronized File createAndGetUserLocalTempFolder() throws IOException {

/**
* Create a user UnderFileSystem temporary folder and return it
*
* @param ufsConf the configuration of UnderFileSystem
* @return the UnderFileSystem temporary folder
* @throws IOException
*/
synchronized String createAndGetUserUfsTempFolder() throws IOException {
synchronized String createAndGetUserUfsTempFolder(Object ufsConf) throws IOException {
String tmpFolder = mWorkerClient.getUserUfsTempFolder();
if (tmpFolder == null) {
return null;
}

if (mUnderFileSystem == null) {
mUnderFileSystem = UnderFileSystem.get(tmpFolder);
mUnderFileSystem = UnderFileSystem.get(tmpFolder, ufsConf);
}

mUnderFileSystem.mkdirs(tmpFolder, true);
Expand Down

0 comments on commit a26ee0d

Please sign in to comment.