[hadoop-openstack] Added debug log on getObject method

Change-Id: Id62eb092788339ee1ce7e0c600d8fd77de48ee6d
This commit is contained in:
Andrew Lazarev 2014-01-16 09:06:37 -08:00
parent 0ea551e556
commit c69e4d8b9f
1 changed files with 13 additions and 0 deletions

View File

@ -276,6 +276,9 @@ public class SwiftNativeFileSystemStore {
List<String> locations = getDataLocalEndpoints(path);
for (String url : locations) {
if (LOG.isDebugEnabled()) {
LOG.debug("Reading " + path + " from location: " + url);
}
try {
return swiftRestClient.getData(new URI(url),
SwiftRestClient.NEWEST);
@ -285,6 +288,9 @@ public class SwiftNativeFileSystemStore {
}
}
if (LOG.isDebugEnabled()) {
LOG.debug("Reading " + path + " from proxy node");
}
return swiftRestClient.getData(toObjectPath(path),
SwiftRestClient.NEWEST);
}
@ -368,6 +374,9 @@ public class SwiftNativeFileSystemStore {
List<String> locations = getDataLocalEndpoints(path);
for (String url : locations) {
if (LOG.isDebugEnabled()) {
LOG.debug("Reading " + path + " from location: " + url);
}
try {
return swiftRestClient.getData(new URI(url), byteRangeStart, length);
} catch (Exception e) {
@ -375,6 +384,10 @@ public class SwiftNativeFileSystemStore {
}
}
if (LOG.isDebugEnabled()) {
LOG.debug("Reading " + path + " from proxy node");
}
return swiftRestClient.getData(
toObjectPath(path), byteRangeStart, length);
}