Skip to content

Commit

Permalink
Drop scheme and authority in key-value master client
Browse files Browse the repository at this point in the history
  • Loading branch information
cc committed Jan 26, 2016
1 parent d8f5e92 commit 8ca4864
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public synchronized void completePartition(final TachyonURI path, final Partitio
retryRPC(new RpcCallableThrowsTachyonTException<Void>() {
@Override
public Void call() throws TachyonTException, TException {
mClient.completePartition(path.toString(), info);
mClient.completePartition(path.getPath(), info);
return null;
}
});
Expand All @@ -102,7 +102,7 @@ public synchronized void completeStore(final TachyonURI path)
retryRPC(new RpcCallableThrowsTachyonTException<Void>() {
@Override
public Void call() throws TachyonTException, TException {
mClient.completeStore(path.toString());
mClient.completeStore(path.getPath());
return null;
}
});
Expand All @@ -119,7 +119,7 @@ public synchronized void createStore(final TachyonURI path) throws IOException,
retryRPC(new RpcCallableThrowsTachyonTException<Void>() {
@Override
public Void call() throws TachyonTException, TException {
mClient.createStore(path.toString());
mClient.createStore(path.getPath());
return null;
}
});
Expand All @@ -138,7 +138,7 @@ public synchronized List<PartitionInfo> getPartitionInfo(final TachyonURI path)
return retryRPC(new RpcCallableThrowsTachyonTException<List<PartitionInfo>>() {
@Override
public List<PartitionInfo> call() throws TachyonTException, TException {
return mClient.getPartitionInfo(path.toString());
return mClient.getPartitionInfo(path.getPath());
}
});
}
Expand All @@ -154,7 +154,7 @@ public synchronized void deleteStore(final TachyonURI path) throws IOException,
retryRPC(new RpcCallableThrowsTachyonTException<Void>() {
@Override
public Void call() throws TachyonTException, TException {
mClient.deleteStore(path.toString());
mClient.deleteStore(path.getPath());
return null;
}
});
Expand All @@ -171,7 +171,7 @@ void mergeStore(final TachyonURI fromPath, final TachyonURI toPath)
retryRPC(new RpcCallableThrowsTachyonTException<Void>() {
@Override
public Void call() throws TachyonTException, TException {
mClient.mergeStore(fromPath.toString(), toPath.toString());
mClient.mergeStore(fromPath.getPath(), toPath.getPath());
return null;
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@ public InputSplit[] getSplits(JobConf conf, int numSplits) throws IOException {
List<InputSplit> splits = Lists.newArrayList();
try {
for (Path path : paths) {
TachyonURI tachyonURI = new TachyonURI(path.toString());
List<PartitionInfo> partitionInfos = mKeyValueMasterClient.getPartitionInfo(
new TachyonURI(tachyonURI.getPath()));
List<PartitionInfo> partitionInfos = mKeyValueMasterClient.getPartitionInfo(new TachyonURI(
path.toString()));
for (PartitionInfo partitionInfo : partitionInfos) {
splits.add(new KeyValueInputSplit(partitionInfo));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ public static TachyonURI getTaskOutputURI(JobConf conf) {
* @return the job's output path
*/
public static TachyonURI getJobOutputURI(JobConf conf) {
return new TachyonURI(new TachyonURI(FileOutputFormat.getOutputPath(conf).toString())
.getPath());
return new TachyonURI(FileOutputFormat.getOutputPath(conf).toString());
}

@Override
Expand Down

0 comments on commit 8ca4864

Please sign in to comment.