From 0e341a2a9a43d7556e27ef3739123a378dde3a53 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Mon, 20 Jul 2020 18:26:59 -0700 Subject: [PATCH] error logging --- .../client/src/main/java/seaweedfs/client/SeaweedRead.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/other/java/client/src/main/java/seaweedfs/client/SeaweedRead.java b/other/java/client/src/main/java/seaweedfs/client/SeaweedRead.java index fbc3296ae..97da29447 100644 --- a/other/java/client/src/main/java/seaweedfs/client/SeaweedRead.java +++ b/other/java/client/src/main/java/seaweedfs/client/SeaweedRead.java @@ -40,7 +40,8 @@ public class SeaweedRead { int startOffset = bufferOffset; for (ChunkView chunkView : chunkViews) { FilerProto.Locations locations = vid2Locations.get(parseVolumeId(chunkView.fileId)); - if (locations.getLocationsCount() == 0) { + if (locations == null || locations.getLocationsCount() == 0) { + LOG.error("failed to locate {}", chunkView.fileId); // log here! return 0; }