Browse Source

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

Jenkins 5 years ago
parent
commit
9349aefefc

+ 13
- 0
hadoop-swiftfs/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeFileSystemStore.java View File

@@ -276,6 +276,9 @@ public class SwiftNativeFileSystemStore {
276 276
     List<String> locations = getDataLocalEndpoints(path);
277 277
 
278 278
     for (String url : locations) {
279
+      if (LOG.isDebugEnabled()) {
280
+        LOG.debug("Reading " + path + " from location: " + url);
281
+      }
279 282
       try {
280 283
         return swiftRestClient.getData(new URI(url),
281 284
             SwiftRestClient.NEWEST);
@@ -285,6 +288,9 @@ public class SwiftNativeFileSystemStore {
285 288
       }
286 289
     }
287 290
 
291
+    if (LOG.isDebugEnabled()) {
292
+      LOG.debug("Reading " + path + " from proxy node");
293
+    }
288 294
     return swiftRestClient.getData(toObjectPath(path),
289 295
                                  SwiftRestClient.NEWEST);
290 296
   }
@@ -368,6 +374,9 @@ public class SwiftNativeFileSystemStore {
368 374
     List<String> locations = getDataLocalEndpoints(path);
369 375
 
370 376
     for (String url : locations) {
377
+      if (LOG.isDebugEnabled()) {
378
+        LOG.debug("Reading " + path + " from location: " + url);
379
+      }
371 380
       try {
372 381
         return swiftRestClient.getData(new URI(url), byteRangeStart, length);
373 382
       } catch (Exception e) {
@@ -375,6 +384,10 @@ public class SwiftNativeFileSystemStore {
375 384
       }
376 385
     }
377 386
 
387
+    if (LOG.isDebugEnabled()) {
388
+      LOG.debug("Reading " + path + " from proxy node");
389
+    }
390
+
378 391
     return swiftRestClient.getData(
379 392
       toObjectPath(path), byteRangeStart, length);
380 393
   }

Loading…
Cancel
Save