aboutsummaryrefslogtreecommitdiff
path: root/other/java
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-07-20 18:26:59 -0700
committerChris Lu <chris.lu@gmail.com>2020-07-20 18:26:59 -0700
commit0e341a2a9a43d7556e27ef3739123a378dde3a53 (patch)
treead87a93b85519ebb59c78948f4fe087383395538 /other/java
parentcacc601cc8dd8c6cae8a5d03921a5966306b909e (diff)
downloadseaweedfs-0e341a2a9a43d7556e27ef3739123a378dde3a53.tar.xz
seaweedfs-0e341a2a9a43d7556e27ef3739123a378dde3a53.zip
error logging
Diffstat (limited to 'other/java')
-rw-r--r--other/java/client/src/main/java/seaweedfs/client/SeaweedRead.java3
1 files changed, 2 insertions, 1 deletions
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;
}