{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/48179480","id":48179480,"diff_hunk":"@@ -0,0 +1,74 @@\n+/*\n+ * Licensed to Elasticsearch under one or more contributor\n+ * license agreements. See the NOTICE file distributed with\n+ * this work for additional information regarding copyright\n+ * ownership. Elasticsearch licenses this file to you under\n+ * the Apache License, Version 2.0 (the \"License\"); you may\n+ * not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *    http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing,\n+ * software distributed under the License is distributed on an\n+ * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+ * KIND, either express or implied.  See the License for the\n+ * specific language governing permissions and limitations\n+ * under the License.\n+ */\n+\n+\n+package org.elasticsearch.ingest.processor;\n+\n+import org.elasticsearch.ingest.IngestDocument;\n+\n+import java.util.Collections;\n+import java.util.List;\n+import java.util.Map;\n+\n+/**\n+ * A processor implementation may modify the data belonging to a document.\n+ * Whether changes are made and what exactly is modified is up to the implementation.\n+ */\n+public class HandledProcessor implements Processor {","path":"plugins/ingest/src/main/java/org/elasticsearch/ingest/processor/HandledProcessor.java","position":33,"original_position":33,"commit_id":"64c790cc496efe8dc660a94a675c0bfe722916ee","original_commit_id":"64c790cc496efe8dc660a94a675c0bfe722916ee","user":{"login":"martijnvg","id":580421,"avatar_url":"https://avatars.githubusercontent.com/u/580421?v=3","gravatar_id":"","url":"https://api.github.com/users/martijnvg","html_url":"https://github.com/martijnvg","followers_url":"https://api.github.com/users/martijnvg/followers","following_url":"https://api.github.com/users/martijnvg/following{/other_user}","gists_url":"https://api.github.com/users/martijnvg/gists{/gist_id}","starred_url":"https://api.github.com/users/martijnvg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martijnvg/subscriptions","organizations_url":"https://api.github.com/users/martijnvg/orgs","repos_url":"https://api.github.com/users/martijnvg/repos","events_url":"https://api.github.com/users/martijnvg/events{/privacy}","received_events_url":"https://api.github.com/users/martijnvg/received_events","type":"User","site_admin":false},"body":"I think that is okay for now. I do like to see `Processor#getType()` be replaced that just works for the simulate api.","created_at":"2015-12-21T19:15:21Z","updated_at":"2015-12-21T19:15:21Z","html_url":"https://github.com/elastic/elasticsearch/pull/15565#discussion_r48179480","pull_request_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/15565","_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/48179480"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/15565#discussion_r48179480"},"pull_request":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/15565"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/15565","id":54226524,"html_url":"https://github.com/elastic/elasticsearch/pull/15565","diff_url":"https://github.com/elastic/elasticsearch/pull/15565.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/15565.patch","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/15565","number":15565,"state":"open","locked":false,"title":"[Ingest] ingest on failure","user":{"login":"talevy","id":388837,"avatar_url":"https://avatars.githubusercontent.com/u/388837?v=3","gravatar_id":"","url":"https://api.github.com/users/talevy","html_url":"https://github.com/talevy","followers_url":"https://api.github.com/users/talevy/followers","following_url":"https://api.github.com/users/talevy/following{/other_user}","gists_url":"https://api.github.com/users/talevy/gists{/gist_id}","starred_url":"https://api.github.com/users/talevy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talevy/subscriptions","organizations_url":"https://api.github.com/users/talevy/orgs","repos_url":"https://api.github.com/users/talevy/repos","events_url":"https://api.github.com/users/talevy/events{/privacy}","received_events_url":"https://api.github.com/users/talevy/received_events","type":"User","site_admin":false},"body":"After some discussion, a sort of consensus around an `on_failure` block for all processors to have was decided on, instead of a `continue_on_failure` flag described by this issue.\r\n\r\nAn example of this is as follows:\r\n\r\n```\r\n{\r\n  description: \"my pipeline with on_failure\",\r\n  processors: [\r\n    {\r\n      \"grok\" : {\r\n          ...\r\n          on_failure : [\r\n            { \"set\" : { \"grok.failed\" : true } },\r\n            { \"meta\": { \"_index\" : \"failed-index\" } }\r\n          ]\r\n      }\r\n    },\r\n    {\r\n       \"date\" : {\r\n         ...\r\n       }\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\nan `on_failure` will also be added to a pipeline as a whole:\r\n\r\n```\r\n{\r\n   \"description\" : \"...\",\r\n   \"processors\" : [ ... ],\r\n   \"on_failure\" : [ ... ]\r\n}\r\n```\r\n\r\nprocessors without an `on_failure` parameter defined will throw an exception and exit the pipeline immediately. processors with `on_failure` defined will catch the exception and allow for further processors to run. Exceptions within the `on_failure` block will be treated the same as the top-level.\r\n\r\nIf a user wishes to handle a failure, and still exit the pipeline immediately, a `fail` processor will be introduced. This processor will do nothing but throw an exception so that the pipeline exits.\r\n\r\nCloses: #14548","created_at":"2015-12-21T07:07:49Z","updated_at":"2015-12-21T19:15:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f46fdc644019d8a352424ce434f17014d49efa55","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/15565/commits","review_comments_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/15565/comments","review_comment_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/15565/comments","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/64c790cc496efe8dc660a94a675c0bfe722916ee","head":{"label":"talevy:ingest_on_failure","ref":"ingest_on_failure","sha":"64c790cc496efe8dc660a94a675c0bfe722916ee","user":{"login":"talevy","id":388837,"avatar_url":"https://avatars.githubusercontent.com/u/388837?v=3","gravatar_id":"","url":"https://api.github.com/users/talevy","html_url":"https://github.com/talevy","followers_url":"https://api.github.com/users/talevy/followers","following_url":"https://api.github.com/users/talevy/following{/other_user}","gists_url":"https://api.github.com/users/talevy/gists{/gist_id}","starred_url":"https://api.github.com/users/talevy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talevy/subscriptions","organizations_url":"https://api.github.com/users/talevy/orgs","repos_url":"https://api.github.com/users/talevy/repos","events_url":"https://api.github.com/users/talevy/events{/privacy}","received_events_url":"https://api.github.com/users/talevy/received_events","type":"User","site_admin":false},"repo":{"id":25600001,"name":"elasticsearch","full_name":"talevy/elasticsearch","owner":{"login":"talevy","id":388837,"avatar_url":"https://avatars.githubusercontent.com/u/388837?v=3","gravatar_id":"","url":"https://api.github.com/users/talevy","html_url":"https://github.com/talevy","followers_url":"https://api.github.com/users/talevy/followers","following_url":"https://api.github.com/users/talevy/following{/other_user}","gists_url":"https://api.github.com/users/talevy/gists{/gist_id}","starred_url":"https://api.github.com/users/talevy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talevy/subscriptions","organizations_url":"https://api.github.com/users/talevy/orgs","repos_url":"https://api.github.com/users/talevy/repos","events_url":"https://api.github.com/users/talevy/events{/privacy}","received_events_url":"https://api.github.com/users/talevy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/talevy/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":true,"url":"https://api.github.com/repos/talevy/elasticsearch","forks_url":"https://api.github.com/repos/talevy/elasticsearch/forks","keys_url":"https://api.github.com/repos/talevy/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/talevy/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/talevy/elasticsearch/teams","hooks_url":"https://api.github.com/repos/talevy/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/talevy/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/talevy/elasticsearch/events","assignees_url":"https://api.github.com/repos/talevy/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/talevy/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/talevy/elasticsearch/tags","blobs_url":"https://api.github.com/repos/talevy/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/talevy/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/talevy/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/talevy/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/talevy/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/talevy/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/talevy/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/talevy/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/talevy/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/talevy/elasticsearch/subscription","commits_url":"https://api.github.com/repos/talevy/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/talevy/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/talevy/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/talevy/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/talevy/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/talevy/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/talevy/elasticsearch/merges","archive_url":"https://api.github.com/repos/talevy/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/talevy/elasticsearch/downloads","issues_url":"https://api.github.com/repos/talevy/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/talevy/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/talevy/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/talevy/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/talevy/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/talevy/elasticsearch/releases{/id}","created_at":"2014-10-22T19:25:53Z","updated_at":"2015-04-14T21:19:32Z","pushed_at":"2015-12-21T07:04:27Z","git_url":"git://github.com/talevy/elasticsearch.git","ssh_url":"git@github.com:talevy/elasticsearch.git","clone_url":"https://github.com/talevy/elasticsearch.git","svn_url":"https://github.com/talevy/elasticsearch","homepage":"http://elasticsearch.org","size":165866,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"elastic:feature/ingest","ref":"feature/ingest","sha":"66d8b5342fd41ea8b04888de6205c909397887c8","user":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"repo":{"id":507775,"name":"elasticsearch","full_name":"elastic/elasticsearch","owner":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elastic/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":false,"url":"https://api.github.com/repos/elastic/elasticsearch","forks_url":"https://api.github.com/repos/elastic/elasticsearch/forks","keys_url":"https://api.github.com/repos/elastic/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elastic/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elastic/elasticsearch/teams","hooks_url":"https://api.github.com/repos/elastic/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/elastic/elasticsearch/events","assignees_url":"https://api.github.com/repos/elastic/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/elastic/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/elastic/elasticsearch/tags","blobs_url":"https://api.github.com/repos/elastic/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elastic/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elastic/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/elastic/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/elastic/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/elastic/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/elastic/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/elastic/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/elastic/elasticsearch/subscription","commits_url":"https://api.github.com/repos/elastic/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/elastic/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/elastic/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/elastic/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elastic/elasticsearch/merges","archive_url":"https://api.github.com/repos/elastic/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elastic/elasticsearch/downloads","issues_url":"https://api.github.com/repos/elastic/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/elastic/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/elastic/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/elastic/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elastic/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/elastic/elasticsearch/releases{/id}","created_at":"2010-02-08T13:20:56Z","updated_at":"2015-12-21T16:26:58Z","pushed_at":"2015-12-21T18:16:47Z","git_url":"git://github.com/elastic/elasticsearch.git","ssh_url":"git@github.com:elastic/elasticsearch.git","clone_url":"https://github.com/elastic/elasticsearch.git","svn_url":"https://github.com/elastic/elasticsearch","homepage":"https://www.elastic.co/products/elasticsearch","size":231980,"stargazers_count":14074,"watchers_count":14074,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4691,"mirror_url":null,"open_issues_count":1209,"forks":4691,"open_issues":1209,"watchers":14074,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/15565"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/15565"},"issue":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/15565"},"comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/15565/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/15565/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/15565/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/elasticsearch/statuses/64c790cc496efe8dc660a94a675c0bfe722916ee"}}}}