|
@@ -133,6 +133,7 @@ public class FsVolumeImpl implements FsVolumeSpi {
|
|
protected volatile long configuredCapacity;
|
|
protected volatile long configuredCapacity;
|
|
private final FileIoProvider fileIoProvider;
|
|
private final FileIoProvider fileIoProvider;
|
|
private final DataNodeVolumeMetrics metrics;
|
|
private final DataNodeVolumeMetrics metrics;
|
|
|
|
+ private URI baseURI;
|
|
|
|
|
|
/**
|
|
/**
|
|
* Per-volume worker pool that processes new blocks to cache.
|
|
* Per-volume worker pool that processes new blocks to cache.
|
|
@@ -182,6 +183,7 @@ public class FsVolumeImpl implements FsVolumeSpi {
|
|
File parent = currentDir.getParentFile();
|
|
File parent = currentDir.getParentFile();
|
|
cacheExecutor = initializeCacheExecutor(parent);
|
|
cacheExecutor = initializeCacheExecutor(parent);
|
|
this.metrics = DataNodeVolumeMetrics.create(conf, parent.getPath());
|
|
this.metrics = DataNodeVolumeMetrics.create(conf, parent.getPath());
|
|
|
|
+ this.baseURI = new File(currentDir.getParent()).toURI();
|
|
} else {
|
|
} else {
|
|
cacheExecutor = null;
|
|
cacheExecutor = null;
|
|
this.metrics = null;
|
|
this.metrics = null;
|
|
@@ -506,7 +508,7 @@ public class FsVolumeImpl implements FsVolumeSpi {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public URI getBaseURI() {
|
|
public URI getBaseURI() {
|
|
- return new File(currentDir.getParent()).toURI();
|
|
|
|
|
|
+ return baseURI;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|