Skip to content

Commit

Permalink
Fix compilation errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinjia committed Sep 29, 2015
1 parent 3986121 commit 072f0df
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
Expand Up @@ -30,7 +30,7 @@
import tachyon.client.ClientContext;
import tachyon.client.Seekable;
import tachyon.client.TachyonStorageType;
import tachyon.client.block.BufferedBlockInStream;
import tachyon.client.block.BlockInStream;
import tachyon.client.block.BufferedBlockOutStream;
import tachyon.client.block.LocalBlockInStream;
import tachyon.client.file.options.InStreamOptions;
Expand Down Expand Up @@ -73,7 +73,7 @@ public final class FileInStream extends InputStream implements BoundedStream, Se
/** Current position of the stream */
private long mPos;
/** Current BlockInStream backing this stream */
private BufferedBlockInStream mCurrentBlockInStream;
private BlockInStream mCurrentBlockInStream;
/** Current BlockOutStream writing the data into Tachyon, this may be null */
private BufferedBlockOutStream mCurrentCacheStream;

Expand Down
Expand Up @@ -16,6 +16,7 @@
package tachyon.client;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
Expand Down Expand Up @@ -44,6 +45,7 @@
import tachyon.exception.TachyonException;
import tachyon.master.LocalTachyonCluster;
import tachyon.thrift.BlockInfo;
import tachyon.thrift.NetAddress;
import tachyon.util.io.BufferUtils;
import tachyon.util.io.PathUtils;
import tachyon.worker.WorkerContext;
Expand Down Expand Up @@ -278,9 +280,10 @@ public void readTest4() throws IOException, TachyonException {

long blockId = mTfs.getInfo(f).getBlockIds().get(0);
BlockInfo info = TachyonBlockStore.get().getInfo(blockId);
NetAddress workerAddr = info.getLocations().get(0).getWorkerAddress();
RemoteBlockInStream is =
new RemoteBlockInStream(info.getBlockId(), info.getLength(), info.getLocations().get(0)
.getWorkerAddress());
new RemoteBlockInStream(info.getBlockId(), info.getLength(), new InetSocketAddress(
workerAddr.getHost(), workerAddr.getDataPort()));
byte[] ret = new byte[k];
int value = is.read();
int cnt = 0;
Expand Down Expand Up @@ -309,9 +312,10 @@ public void readTest5() throws IOException, TachyonException {

long blockId = mTfs.getInfo(f).getBlockIds().get(0);
BlockInfo info = TachyonBlockStore.get().getInfo(blockId);
NetAddress workerAddr = info.getLocations().get(0).getWorkerAddress();
RemoteBlockInStream is =
new RemoteBlockInStream(info.getBlockId(), info.getLength(), info.getLocations().get(0)
.getWorkerAddress());
new RemoteBlockInStream(info.getBlockId(), info.getLength(), new InetSocketAddress(
workerAddr.getHost(), workerAddr.getDataPort()));
byte[] ret = new byte[k];
int start = 0;
while (start < k) {
Expand All @@ -336,9 +340,10 @@ public void readTest6() throws IOException, TachyonException {

long blockId = mTfs.getInfo(f).getBlockIds().get(0);
BlockInfo info = TachyonBlockStore.get().getInfo(blockId);
NetAddress workerAddr = info.getLocations().get(0).getWorkerAddress();
RemoteBlockInStream is =
new RemoteBlockInStream(info.getBlockId(), info.getLength(), info.getLocations().get(0)
.getWorkerAddress());
new RemoteBlockInStream(info.getBlockId(), info.getLength(), new InetSocketAddress(
workerAddr.getHost(), workerAddr.getDataPort()));
byte[] ret = new byte[k / 2];
int start = 0;
while (start < k / 2) {
Expand Down

0 comments on commit 072f0df

Please sign in to comment.