Browse Source

error logging

pull/1397/head
Chris Lu 4 years ago
parent
commit
0e341a2a9a
  1. 3
      other/java/client/src/main/java/seaweedfs/client/SeaweedRead.java

3
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;
}

Loading…
Cancel
Save