Skip to content

Commit

Permalink
Better logging for S3DataSegmentPuller getVersion (apache#4657)
Browse files Browse the repository at this point in the history
* Eventual consistency of S3 means a `404` can be thrown. It helps to know the URI that was attempted.
  • Loading branch information
drcrallen authored and leventov committed Aug 8, 2017
1 parent 59a2507 commit bbe7fb8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import io.druid.java.util.common.IAE;
import io.druid.java.util.common.IOE;
import io.druid.java.util.common.MapUtils;
import io.druid.java.util.common.RE;
import io.druid.java.util.common.StringUtils;
import io.druid.java.util.common.UOE;
import io.druid.java.util.common.logger.Logger;
Expand Down Expand Up @@ -300,7 +301,7 @@ public String getVersion(URI uri) throws IOException
// The recoverable logic is always true for IOException, so we want to only pass IOException if it is recoverable
throw new IOE(e, "Could not fetch last modified timestamp from URI [%s]", uri);
} else {
throw Throwables.propagate(e);
throw new RE(e, "Error fetching last modified timestamp from URI [%s]", uri);
}
}
}
Expand Down

0 comments on commit bbe7fb8

Please sign in to comment.