Skip to content

Commit

Permalink
WARCSpout: add metadata field "fetch.statusCode" (holds HTTP status c…
Browse files Browse the repository at this point in the history
…ode) (apache#823)
  • Loading branch information
sebastian-nagel authored Sep 24, 2020
1 parent 1c4f08b commit 3dcacfa
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,9 @@ public void nextTuple() {

Metadata metadata = new Metadata();

// add HTTP status code expected by schedulers
metadata.addValue("fetch.statusCode", Integer.toString(http.status()));

// Add HTTP response headers to metadata
for (Map.Entry<String, List<String>> e : http.headers().map()
.entrySet()) {
Expand Down

0 comments on commit 3dcacfa

Please sign in to comment.