Fix SPARK-4471: blockManagerIdFromJson function throws exception while metadata fetch failed