Merge "[hadoop-openstack] Added debug log on getObject method"

This commit is contained in:
Jenkins 2014-01-16 22:17:28 +00:00 committed by Gerrit Code Review
commit 9349aefefc
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);
}