Skip to content

Commit

Permalink
Use TachyonStorageType.
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinjia committed Sep 7, 2015
1 parent f5dc3e5 commit bc16d32
Show file tree
Hide file tree
Showing 33 changed files with 209 additions and 191 deletions.
19 changes: 10 additions & 9 deletions clients/unshaded/src/main/java/tachyon/client/ClientOptions.java
Expand Up @@ -30,7 +30,7 @@ public class ClientOptions {
*/ */
public static class Builder { public static class Builder {
private long mBlockSize; private long mBlockSize;
private CacheType mCacheType; private TachyonStorageType mTachyonStorageType;
private UnderStorageType mUnderStorageType; private UnderStorageType mUnderStorageType;
private NetAddress mLocation; private NetAddress mLocation;


Expand All @@ -39,18 +39,19 @@ public static class Builder {
*/ */
public Builder(TachyonConf conf) { public Builder(TachyonConf conf) {
mBlockSize = conf.getBytes(Constants.USER_DEFAULT_BLOCK_SIZE_BYTE); mBlockSize = conf.getBytes(Constants.USER_DEFAULT_BLOCK_SIZE_BYTE);
mCacheType = conf.getEnum(Constants.USER_DEFAULT_CACHE_TYPE, CacheType.CACHE); mTachyonStorageType =
conf.getEnum(Constants.USER_DEFAULT_TACHYON_STORAGE_TYPE, TachyonStorageType.STORE);
mUnderStorageType = mUnderStorageType =
conf.getEnum(Constants.USER_DEFAULT_UNDER_STORAGE_TYPE, UnderStorageType.NO_PERSIST); conf.getEnum(Constants.USER_DEFAULT_UNDER_STORAGE_TYPE, UnderStorageType.NO_PERSIST);
mLocation = null; mLocation = null;
} }


/** /**
* @param cacheType the cache type to use * @param tachyonStorageType the cache type to use
* @return the builder * @return the builder
*/ */
public Builder setCacheType(CacheType cacheType) { public Builder setCacheType(TachyonStorageType tachyonStorageType) {
mCacheType = cacheType; mTachyonStorageType = tachyonStorageType;
return this; return this;
} }


Expand Down Expand Up @@ -91,7 +92,7 @@ public ClientOptions build() {
} }


private final long mBlockSize; private final long mBlockSize;
private final CacheType mCacheType; private final TachyonStorageType mTachyonStorageType;
private final UnderStorageType mUnderStorageType; private final UnderStorageType mUnderStorageType;
private final NetAddress mLocation; private final NetAddress mLocation;


Expand All @@ -104,7 +105,7 @@ public static ClientOptions defaults() {


private ClientOptions(ClientOptions.Builder builder) { private ClientOptions(ClientOptions.Builder builder) {
mBlockSize = builder.mBlockSize; mBlockSize = builder.mBlockSize;
mCacheType = builder.mCacheType; mTachyonStorageType = builder.mTachyonStorageType;
mUnderStorageType = builder.mUnderStorageType; mUnderStorageType = builder.mUnderStorageType;
mLocation = builder.mLocation; mLocation = builder.mLocation;
} }
Expand All @@ -119,8 +120,8 @@ public long getBlockSize() {
/** /**
* @return the cache type * @return the cache type
*/ */
public CacheType getCacheType() { public TachyonStorageType getCacheType() {
return mCacheType; return mTachyonStorageType;
} }


/** /**
Expand Down
4 changes: 2 additions & 2 deletions clients/unshaded/src/main/java/tachyon/client/ReadType.java
Expand Up @@ -53,13 +53,13 @@ public int getValue() {
} }


/** /**
* @return true if the read type is CACHE, false otherwise * @return true if the read type is STORE, false otherwise
* *
* TODO(calvin): Add CACHE_PROMOTE back when it is enabled again. * TODO(calvin): Add CACHE_PROMOTE back when it is enabled again.
*/ */
public boolean isCache() { public boolean isCache() {
return mValue == CACHE.mValue; return mValue == CACHE.mValue;
// return mValue == CACHE.mValue || mValue == CACHE_PROMOTE.mValue; // return mValue == STORE.mValue || mValue == CACHE_PROMOTE.mValue;
} }


/** /**
Expand Down
Expand Up @@ -47,32 +47,34 @@ public static TachyonFile createByteFile(TachyonFileSystem tfs, String fileName,
* *
* @param tfs a TachyonFileSystem handler * @param tfs a TachyonFileSystem handler
* @param fileName the name of the file to be created * @param fileName the name of the file to be created
* @param cacheType CacheType used to create the file * @param tachyonStorageType CacheType used to create the file
* @param underStorageType UnderStorageType used to create the file * @param underStorageType UnderStorageType used to create the file
* @param len file size * @param len file size
* @return the TachyonFile of the created file * @return the TachyonFile of the created file
* @throws IOException if <code>path</code> is invalid (e.g., illegal URI) * @throws IOException if <code>path</code> is invalid (e.g., illegal URI)
*/ */
public static TachyonFile createByteFile(TachyonFileSystem tfs, String fileName, public static TachyonFile createByteFile(TachyonFileSystem tfs, String fileName,
CacheType cacheType, UnderStorageType underStorageType, int len) throws IOException { TachyonStorageType tachyonStorageType, UnderStorageType underStorageType, int len)
return createByteFile(tfs, new TachyonURI(fileName), cacheType, underStorageType, len); throws IOException {
return createByteFile(tfs, new TachyonURI(fileName), tachyonStorageType, underStorageType, len);
} }


/** /**
* Creates a simple file with <code>len</code> bytes. * Creates a simple file with <code>len</code> bytes.
* *
* @param tfs a TachyonFileSystem handler * @param tfs a TachyonFileSystem handler
* @param fileURI URI of the file * @param fileURI URI of the file
* @param cacheType CacheType used to create the file * @param tachyonStorageType CacheType used to create the file
* @param underStorageType UnderStorageType used to create the file * @param underStorageType UnderStorageType used to create the file
* @param len file size * @param len file size
* @return the TachyonFile of the created file * @return the TachyonFile of the created file
* @throws IOException if <code>path</code> is invalid (e.g., illegal URI) * @throws IOException if <code>path</code> is invalid (e.g., illegal URI)
*/ */
public static TachyonFile createByteFile(TachyonFileSystem tfs, TachyonURI fileURI, public static TachyonFile createByteFile(TachyonFileSystem tfs, TachyonURI fileURI,
CacheType cacheType, UnderStorageType underStorageType, int len) throws IOException { TachyonStorageType tachyonStorageType, UnderStorageType underStorageType, int len)
throws IOException {
ClientOptions options = ClientOptions options =
new ClientOptions.Builder(ClientContext.getConf()).setCacheType(cacheType) new ClientOptions.Builder(ClientContext.getConf()).setCacheType(tachyonStorageType)
.setUnderStorageType(underStorageType).build(); .setUnderStorageType(underStorageType).build();
FileOutStream os = tfs.getOutStream(fileURI, options); FileOutStream os = tfs.getOutStream(fileURI, options);


Expand All @@ -88,18 +90,18 @@ public static TachyonFile createByteFile(TachyonFileSystem tfs, TachyonURI fileU
* *
* @param tfs a TachyonFileSystem handler * @param tfs a TachyonFileSystem handler
* @param fileName the name of the file to be created * @param fileName the name of the file to be created
* @param cacheType CacheType used to create the file * @param tachyonStorageType CacheType used to create the file
* @param underStorageType UnderStorageType used to create the file * @param underStorageType UnderStorageType used to create the file
* @param len file size * @param len file size
* @param blockCapacityByte block size of the file * @param blockCapacityByte block size of the file
* @return the TachyonFile of the created file * @return the TachyonFile of the created file
* @throws IOException if <code>path</code> is invalid (e.g., illegal URI) * @throws IOException if <code>path</code> is invalid (e.g., illegal URI)
*/ */
public static TachyonFile createByteFile(TachyonFileSystem tfs, String fileName, public static TachyonFile createByteFile(TachyonFileSystem tfs, String fileName,
CacheType cacheType, UnderStorageType underStorageType, int len, long blockCapacityByte) TachyonStorageType tachyonStorageType, UnderStorageType underStorageType, int len,
throws IOException { long blockCapacityByte) throws IOException {
ClientOptions options = ClientOptions options =
new ClientOptions.Builder(ClientContext.getConf()).setCacheType(cacheType) new ClientOptions.Builder(ClientContext.getConf()).setCacheType(tachyonStorageType)
.setUnderStorageType(underStorageType).setBlockSize(blockCapacityByte).build(); .setUnderStorageType(underStorageType).setBlockSize(blockCapacityByte).build();
FileOutStream os = tfs.getOutStream(new TachyonURI(fileName), options); FileOutStream os = tfs.getOutStream(new TachyonURI(fileName), options);


Expand Down
Expand Up @@ -163,9 +163,9 @@ public FileInStream getInStream(ReadType readType) throws IOException {
ClientOptions.Builder optionsBuilder = new ClientOptions.Builder(mTachyonConf); ClientOptions.Builder optionsBuilder = new ClientOptions.Builder(mTachyonConf);
optionsBuilder.setBlockSize(info.getBlockSizeByte()); optionsBuilder.setBlockSize(info.getBlockSizeByte());
if (readType.isCache()) { if (readType.isCache()) {
optionsBuilder.setCacheType(CacheType.CACHE); optionsBuilder.setCacheType(TachyonStorageType.STORE);
} else { } else {
optionsBuilder.setCacheType(CacheType.NO_CACHE); optionsBuilder.setCacheType(TachyonStorageType.NO_STORE);
} }
return mTFS.getInStream(mTFS.open(uri), optionsBuilder.build()); return mTFS.getInStream(mTFS.open(uri), optionsBuilder.build());
} }
Expand Down Expand Up @@ -243,9 +243,9 @@ public FileOutStream getOutStream(WriteType writeType) throws IOException {
optionsBuilder.setBlockSize(info.getBlockSizeByte()); optionsBuilder.setBlockSize(info.getBlockSizeByte());


if (writeType.isCache()) { if (writeType.isCache()) {
optionsBuilder.setCacheType(CacheType.CACHE); optionsBuilder.setCacheType(TachyonStorageType.STORE);
} else { } else {
optionsBuilder.setCacheType(CacheType.NO_CACHE); optionsBuilder.setCacheType(TachyonStorageType.NO_STORE);
} }
if (writeType.isThrough()) { if (writeType.isThrough()) {
optionsBuilder.setUnderStorageType(UnderStorageType.PERSIST); optionsBuilder.setUnderStorageType(UnderStorageType.PERSIST);
Expand Down
Expand Up @@ -16,22 +16,25 @@
package tachyon.client; package tachyon.client;


/** /**
* Specifies the type of data interaction with Tachyon. Reads may use either cache type. * Specifies the type of data interaction with Tachyon. For a write operation, this determines
* whether the data will be written into Tachyon storage. Metadata will always be updated in Tachyon
* space. For a read operation, this determines whether fully read blocks will be stored in Tachyon
* storage.
*/ */
public enum CacheType { public enum TachyonStorageType {
/** Write to Tachyon */ /** Write to Tachyon */
CACHE(1), STORE(1),


/** Do not write to Tachyon */ /** Do not write to Tachyon */
NO_CACHE(2); NO_STORE(2);


private final int mValue; private final int mValue;


CacheType(int value) { TachyonStorageType(int value) {
mValue = value; mValue = value;
} }


public boolean shouldCache() { public boolean shouldStore() {
return mValue == CACHE.mValue; return mValue == STORE.mValue;
} }
} }
Expand Up @@ -17,7 +17,8 @@


/** /**
* Specifies the type of data interaction with Tachyon's Under Storage. This is not applicable * Specifies the type of data interaction with Tachyon's Under Storage. This is not applicable
* for reads. * for reads. Using the NO_PERSIST type will mean data is only written to Tachyon storage and may
* be permanently lost when evicted. Only temporary data is suggested to be stored this way.
*/ */
public enum UnderStorageType { public enum UnderStorageType {
/** Write to Under Storage synchronously */ /** Write to Under Storage synchronously */
Expand Down
Expand Up @@ -33,7 +33,7 @@
public class BlockWorkerClientPool extends ResourcePool<WorkerClient> { public class BlockWorkerClientPool extends ResourcePool<WorkerClient> {
/** /**
* The capacity for this pool must be large, since each block written will hold a client until * The capacity for this pool must be large, since each block written will hold a client until
* block is committed. For writes, this is at the end of the file completion. * the block is committed at the end of the file completion.
*/ */
private static final int CAPACITY = 10000; private static final int CAPACITY = 10000;
private final ExecutorService mExecutorService; private final ExecutorService mExecutorService;
Expand Down
Expand Up @@ -37,7 +37,7 @@
* returned which will write the data through a Tachyon worker. * returned which will write the data through a Tachyon worker.
*/ */
public abstract class BufferedBlockOutStream extends OutStream { public abstract class BufferedBlockOutStream extends OutStream {
/** The block id of the block being read/written */ /** The block id of the block being written */
protected final long mBlockId; protected final long mBlockId;
/** Size of the block */ /** Size of the block */
protected final long mBlockSize; protected final long mBlockSize;
Expand Down
Expand Up @@ -72,7 +72,7 @@ public FileInStream(FileInfo info, ClientOptions options) {
mBlockIds = info.getBlockIds(); mBlockIds = info.getBlockIds();
mUfsPath = info.getUfsPath(); mUfsPath = info.getUfsPath();
mContext = FSContext.INSTANCE; mContext = FSContext.INSTANCE;
mShouldCache = options.getCacheType().shouldCache(); mShouldCache = options.getCacheType().shouldStore();
mShouldCacheCurrentBlock = mShouldCache; mShouldCacheCurrentBlock = mShouldCache;
mClosed = false; mClosed = false;
} }
Expand Down Expand Up @@ -253,7 +253,6 @@ private void closeCacheStream() throws IOException {


/** /**
* @return the current block id based on mPos * @return the current block id based on mPos
*
*/ */
private long getBlockCurrentBlockId() { private long getBlockCurrentBlockId() {
int index = (int) (mPos / mBlockSize); int index = (int) (mPos / mBlockSize);
Expand Down
Expand Up @@ -23,7 +23,7 @@
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;


import tachyon.annotation.PublicApi; import tachyon.annotation.PublicApi;
import tachyon.client.CacheType; import tachyon.client.TachyonStorageType;
import tachyon.client.ClientContext; import tachyon.client.ClientContext;
import tachyon.client.ClientOptions; import tachyon.client.ClientOptions;
import tachyon.client.FileSystemMasterClient; import tachyon.client.FileSystemMasterClient;
Expand All @@ -46,7 +46,7 @@
public final class FileOutStream extends OutStream { public final class FileOutStream extends OutStream {
private final long mFileId; private final long mFileId;
private final long mBlockSize; private final long mBlockSize;
private final CacheType mCacheType; private final TachyonStorageType mTachyonStorageType;
private final UnderStorageType mUnderStorageType; private final UnderStorageType mUnderStorageType;
private final FSContext mContext; private final FSContext mContext;
private final OutputStream mUnderStorageOutputStream; private final OutputStream mUnderStorageOutputStream;
Expand All @@ -69,7 +69,7 @@ public final class FileOutStream extends OutStream {
public FileOutStream(long fileId, ClientOptions options) throws IOException { public FileOutStream(long fileId, ClientOptions options) throws IOException {
mFileId = fileId; mFileId = fileId;
mBlockSize = options.getBlockSize(); mBlockSize = options.getBlockSize();
mCacheType = options.getCacheType(); mTachyonStorageType = options.getCacheType();
mUnderStorageType = options.getUnderStorageType(); mUnderStorageType = options.getUnderStorageType();
mContext = FSContext.INSTANCE; mContext = FSContext.INSTANCE;
mPreviousBlockOutStreams = new LinkedList<BufferedBlockOutStream>(); mPreviousBlockOutStreams = new LinkedList<BufferedBlockOutStream>();
Expand All @@ -88,7 +88,7 @@ public FileOutStream(long fileId, ClientOptions options) throws IOException {
} }
mClosed = false; mClosed = false;
mCanceled = false; mCanceled = false;
mShouldCacheCurrentBlock = mCacheType.shouldCache(); mShouldCacheCurrentBlock = mTachyonStorageType.shouldStore();
} }


@Override @Override
Expand Down Expand Up @@ -127,7 +127,7 @@ public void close() throws IOException {
} }
} }


if (mCacheType.shouldCache()) { if (mTachyonStorageType.shouldStore()) {
try { try {
if (mCanceled) { if (mCanceled) {
for (BufferedBlockOutStream bos : mPreviousBlockOutStreams) { for (BufferedBlockOutStream bos : mPreviousBlockOutStreams) {
Expand Down Expand Up @@ -227,7 +227,7 @@ private void getNextBlock() throws IOException {
mPreviousBlockOutStreams.add(mCurrentBlockOutStream); mPreviousBlockOutStreams.add(mCurrentBlockOutStream);
} }


if (mCacheType.shouldCache()) { if (mTachyonStorageType.shouldStore()) {
mCurrentBlockOutStream = mCurrentBlockOutStream =
mContext.getTachyonBS().getOutStream(getNextBlockId(), mBlockSize, null); mContext.getTachyonBS().getOutStream(getNextBlockId(), mBlockSize, null);
mShouldCacheCurrentBlock = true; mShouldCacheCurrentBlock = true;
Expand Down
3 changes: 2 additions & 1 deletion common/src/main/java/tachyon/Constants.java
Expand Up @@ -229,7 +229,8 @@ public class Constants {
public static final String USER_REMOTE_READ_BUFFER_SIZE_BYTE = public static final String USER_REMOTE_READ_BUFFER_SIZE_BYTE =
"tachyon.user.remote.read.buffer.size.byte"; "tachyon.user.remote.read.buffer.size.byte";
public static final String USER_DEFAULT_WRITE_TYPE = "tachyon.user.file.writetype.default"; public static final String USER_DEFAULT_WRITE_TYPE = "tachyon.user.file.writetype.default";
public static final String USER_DEFAULT_CACHE_TYPE = "tachyon.user.file.cachetype.default"; public static final String USER_DEFAULT_TACHYON_STORAGE_TYPE =
"tachyon.user.file.tachyonstoragetype.default";
public static final String USER_DEFAULT_UNDER_STORAGE_TYPE = public static final String USER_DEFAULT_UNDER_STORAGE_TYPE =
"tachyon.user.file.understoragetype.default"; "tachyon.user.file.understoragetype.default";
public static final String USER_REMOTE_BLOCK_READER = "tachyon.user.remote.block.reader.class"; public static final String USER_REMOTE_BLOCK_READER = "tachyon.user.remote.block.reader.class";
Expand Down
4 changes: 2 additions & 2 deletions common/src/main/resources/tachyon-default.properties
Expand Up @@ -91,8 +91,8 @@ tachyon.worker.tieredstore.level0.dirs.path=/mnt/ramdisk
tachyon.user.failed.space.request.limits=3 tachyon.user.failed.space.request.limits=3
tachyon.user.heartbeat.interval.ms=1000 tachyon.user.heartbeat.interval.ms=1000
tachyon.user.file.writetype.default=CACHE_THROUGH tachyon.user.file.writetype.default=CACHE_THROUGH
tachyon.user.file.cachetype.default=CACHE tachyon.user.file.tachyonstoragetype.default=STORE
tachyon.user.file.understoragetype.default=NO_PERSIST tachyon.user.file.understoragetype.default=PERSIST
tachyon.user.default.block.size.byte=512MB tachyon.user.default.block.size.byte=512MB
tachyon.user.quota.unit.bytes=8MB tachyon.user.quota.unit.bytes=8MB
tachyon.user.file.buffer.bytes=1MB tachyon.user.file.buffer.bytes=1MB
Expand Down
Expand Up @@ -25,7 +25,6 @@
import org.junit.Test; import org.junit.Test;


import tachyon.Constants; import tachyon.Constants;
import tachyon.client.TachyonFSTestUtils;
import tachyon.client.file.FileInStream; import tachyon.client.file.FileInStream;
import tachyon.client.file.TachyonFile; import tachyon.client.file.TachyonFile;
import tachyon.client.file.TachyonFileSystem; import tachyon.client.file.TachyonFileSystem;
Expand Down Expand Up @@ -63,13 +62,13 @@ public static final void beforeClass() throws Exception {
sTfs = sLocalTachyonCluster.getClient(); sTfs = sLocalTachyonCluster.getClient();
sTachyonConf = sLocalTachyonCluster.getMasterTachyonConf(); sTachyonConf = sLocalTachyonCluster.getMasterTachyonConf();
sWriteBoth = sWriteBoth =
new ClientOptions.Builder(sTachyonConf).setCacheType(CacheType.CACHE) new ClientOptions.Builder(sTachyonConf).setCacheType(TachyonStorageType.STORE)
.setUnderStorageType(UnderStorageType.PERSIST).build(); .setUnderStorageType(UnderStorageType.PERSIST).build();
sWriteTachyon = sWriteTachyon =
new ClientOptions.Builder(sTachyonConf).setCacheType(CacheType.CACHE) new ClientOptions.Builder(sTachyonConf).setCacheType(TachyonStorageType.STORE)
.setUnderStorageType(UnderStorageType.NO_PERSIST).build(); .setUnderStorageType(UnderStorageType.NO_PERSIST).build();
sWriteUnderStore = sWriteUnderStore =
new ClientOptions.Builder(sTachyonConf).setCacheType(CacheType.NO_CACHE) new ClientOptions.Builder(sTachyonConf).setCacheType(TachyonStorageType.NO_STORE)
.setUnderStorageType(UnderStorageType.PERSIST).build(); .setUnderStorageType(UnderStorageType.PERSIST).build();
} }


Expand Down
Expand Up @@ -27,7 +27,6 @@
import org.junit.rules.ExpectedException; import org.junit.rules.ExpectedException;


import tachyon.Constants; import tachyon.Constants;
import tachyon.client.TachyonFSTestUtils;
import tachyon.client.file.FileInStream; import tachyon.client.file.FileInStream;
import tachyon.client.file.TachyonFile; import tachyon.client.file.TachyonFile;
import tachyon.client.file.TachyonFileSystem; import tachyon.client.file.TachyonFileSystem;
Expand Down Expand Up @@ -68,13 +67,13 @@ public static final void beforeClass() throws Exception {
sTfs = sLocalTachyonCluster.getClient(); sTfs = sLocalTachyonCluster.getClient();
sTachyonConf = sLocalTachyonCluster.getMasterTachyonConf(); sTachyonConf = sLocalTachyonCluster.getMasterTachyonConf();
sWriteBoth = sWriteBoth =
new ClientOptions.Builder(sTachyonConf).setCacheType(CacheType.CACHE) new ClientOptions.Builder(sTachyonConf).setCacheType(TachyonStorageType.STORE)
.setUnderStorageType(UnderStorageType.PERSIST).build(); .setUnderStorageType(UnderStorageType.PERSIST).build();
sWriteTachyon = sWriteTachyon =
new ClientOptions.Builder(sTachyonConf).setCacheType(CacheType.CACHE) new ClientOptions.Builder(sTachyonConf).setCacheType(TachyonStorageType.STORE)
.setUnderStorageType(UnderStorageType.NO_PERSIST).build(); .setUnderStorageType(UnderStorageType.NO_PERSIST).build();
sWriteUnderStore = sWriteUnderStore =
new ClientOptions.Builder(sTachyonConf).setCacheType(CacheType.NO_CACHE) new ClientOptions.Builder(sTachyonConf).setCacheType(TachyonStorageType.NO_STORE)
.setUnderStorageType(UnderStorageType.PERSIST).build(); .setUnderStorageType(UnderStorageType.PERSIST).build();
} }


Expand Down
Expand Up @@ -32,8 +32,6 @@
import tachyon.Constants; import tachyon.Constants;
import tachyon.IntegrationTestConstants; import tachyon.IntegrationTestConstants;
import tachyon.TachyonURI; import tachyon.TachyonURI;
import tachyon.client.InStream;
import tachyon.client.OutStream;
import tachyon.client.file.TachyonFile; import tachyon.client.file.TachyonFile;
import tachyon.client.file.TachyonFileSystem; import tachyon.client.file.TachyonFileSystem;
import tachyon.conf.TachyonConf; import tachyon.conf.TachyonConf;
Expand Down Expand Up @@ -97,14 +95,14 @@ public final void before() throws Exception {
mTfs = sLocalTachyonCluster.getClient(); mTfs = sLocalTachyonCluster.getClient();
mMasterTachyonConf = sLocalTachyonCluster.getMasterTachyonConf(); mMasterTachyonConf = sLocalTachyonCluster.getMasterTachyonConf();
sWriteBoth = sWriteBoth =
new ClientOptions.Builder(mMasterTachyonConf).setCacheType(CacheType.CACHE) new ClientOptions.Builder(mMasterTachyonConf).setCacheType(TachyonStorageType.STORE)
.setUnderStorageType(UnderStorageType.PERSIST).setBlockSize(BLOCK_SIZE_BYTES).build(); .setUnderStorageType(UnderStorageType.PERSIST).setBlockSize(BLOCK_SIZE_BYTES).build();
sWriteTachyon = sWriteTachyon =
new ClientOptions.Builder(mMasterTachyonConf).setCacheType(CacheType.CACHE) new ClientOptions.Builder(mMasterTachyonConf).setCacheType(TachyonStorageType.STORE)
.setUnderStorageType(UnderStorageType.NO_PERSIST).setBlockSize(BLOCK_SIZE_BYTES) .setUnderStorageType(UnderStorageType.NO_PERSIST).setBlockSize(BLOCK_SIZE_BYTES)
.build(); .build();
sWriteUnderStore = sWriteUnderStore =
new ClientOptions.Builder(mMasterTachyonConf).setCacheType(CacheType.NO_CACHE) new ClientOptions.Builder(mMasterTachyonConf).setCacheType(TachyonStorageType.NO_STORE)
.setUnderStorageType(UnderStorageType.PERSIST).setBlockSize(BLOCK_SIZE_BYTES).build(); .setUnderStorageType(UnderStorageType.PERSIST).setBlockSize(BLOCK_SIZE_BYTES).build();
} }


Expand Down

0 comments on commit bc16d32

Please sign in to comment.