{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-apex-malhar/pulls/comments/63493400","id":63493400,"diff_hunk":"@@ -0,0 +1,177 @@\n+/**\n+ * Licensed to the Apache Software Foundation (ASF) under one\n+ * or more contributor license agreements.  See the NOTICE file\n+ * distributed with this work for additional information\n+ * regarding copyright ownership.  The ASF licenses this file\n+ * to you under the Apache License, Version 2.0 (the\n+ * \"License\"); you may not use this file except in compliance\n+ * with the License.  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+package com.datatorrent.lib.filter;\n+\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+import org.apache.hadoop.classification.InterfaceStability;\n+\n+import com.google.common.annotations.VisibleForTesting;\n+\n+import com.datatorrent.api.AutoMetric;\n+import com.datatorrent.api.Context;\n+import com.datatorrent.api.Context.PortContext;\n+import com.datatorrent.api.DefaultInputPort;\n+import com.datatorrent.api.DefaultOutputPort;\n+\n+import com.datatorrent.api.Operator;\n+import com.datatorrent.api.annotation.InputPortFieldAnnotation;\n+import com.datatorrent.api.annotation.OutputPortFieldAnnotation;\n+\n+import com.datatorrent.common.util.BaseOperator;\n+import com.datatorrent.lib.expression.Expression;\n+import com.datatorrent.lib.util.PojoUtils;\n+\n+/**\n+ * <b>FilterOperator</b>\n+ * Filter Operator filter out tuples based on defined condition\n+ *\n+ * <b>Parameters</b>\n+ * - condition: condition based on expression langugage\n+ *\n+ * <b>Input Port</b> takes POJOs as an input\n+ *\n+ * <b>Output Ports</b>\n+ * - truePort emits POJOs meeting the given condition\n+ * - falsePort emits POJOs not meeting the given condition\n+ * - error port emits any error situation while evaluating expression\n+ * \n+ */\n+@InterfaceStability.Evolving\n+public class FilterOperator extends BaseOperator implements Operator.ActivationListener\n+{\n+  protected String condition;","path":"library/src/main/java/com/datatorrent/lib/filter/FilterOperator.java","position":61,"original_position":61,"commit_id":"5c7a28aa24bdd3ab005779cbe2e28a2a10f6bb1f","original_commit_id":"5c7a28aa24bdd3ab005779cbe2e28a2a10f6bb1f","user":{"login":"pradeepdalvi","id":5187871,"avatar_url":"https://avatars.githubusercontent.com/u/5187871?v=3","gravatar_id":"","url":"https://api.github.com/users/pradeepdalvi","html_url":"https://github.com/pradeepdalvi","followers_url":"https://api.github.com/users/pradeepdalvi/followers","following_url":"https://api.github.com/users/pradeepdalvi/following{/other_user}","gists_url":"https://api.github.com/users/pradeepdalvi/gists{/gist_id}","starred_url":"https://api.github.com/users/pradeepdalvi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pradeepdalvi/subscriptions","organizations_url":"https://api.github.com/users/pradeepdalvi/orgs","repos_url":"https://api.github.com/users/pradeepdalvi/repos","events_url":"https://api.github.com/users/pradeepdalvi/events{/privacy}","received_events_url":"https://api.github.com/users/pradeepdalvi/received_events","type":"User","site_admin":false},"body":"Changed the order.","created_at":"2016-05-17T09:46:21Z","updated_at":"2016-05-17T09:46:21Z","html_url":"https://github.com/apache/incubator-apex-malhar/pull/270#discussion_r63493400","pull_request_url":"https://api.github.com/repos/apache/incubator-apex-malhar/pulls/270","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-apex-malhar/pulls/comments/63493400"},"html":{"href":"https://github.com/apache/incubator-apex-malhar/pull/270#discussion_r63493400"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-apex-malhar/pulls/270"}}},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-apex-malhar/pulls/270","id":69700835,"html_url":"https://github.com/apache/incubator-apex-malhar/pull/270","diff_url":"https://github.com/apache/incubator-apex-malhar/pull/270.diff","patch_url":"https://github.com/apache/incubator-apex-malhar/pull/270.patch","issue_url":"https://api.github.com/repos/apache/incubator-apex-malhar/issues/270","number":270,"state":"open","locked":false,"title":"APEXMALHAR-2082 Data Filter Operator","user":{"login":"pradeepdalvi","id":5187871,"avatar_url":"https://avatars.githubusercontent.com/u/5187871?v=3","gravatar_id":"","url":"https://api.github.com/users/pradeepdalvi","html_url":"https://github.com/pradeepdalvi","followers_url":"https://api.github.com/users/pradeepdalvi/followers","following_url":"https://api.github.com/users/pradeepdalvi/following{/other_user}","gists_url":"https://api.github.com/users/pradeepdalvi/gists{/gist_id}","starred_url":"https://api.github.com/users/pradeepdalvi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pradeepdalvi/subscriptions","organizations_url":"https://api.github.com/users/pradeepdalvi/orgs","repos_url":"https://api.github.com/users/pradeepdalvi/repos","events_url":"https://api.github.com/users/pradeepdalvi/events{/privacy}","received_events_url":"https://api.github.com/users/pradeepdalvi/received_events","type":"User","site_admin":false},"body":" - Added Data Filter Operator\r\n - Marked it as Evolving\r\n - Added test cases around variations","created_at":"2016-05-11T16:19:08Z","updated_at":"2016-05-17T09:46:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a8ff477e0902142e7f0101bffc52ccb261282f48","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-apex-malhar/pulls/270/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-apex-malhar/pulls/270/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-apex-malhar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-apex-malhar/issues/270/comments","statuses_url":"https://api.github.com/repos/apache/incubator-apex-malhar/statuses/5c7a28aa24bdd3ab005779cbe2e28a2a10f6bb1f","head":{"label":"pradeepdalvi:master","ref":"master","sha":"5c7a28aa24bdd3ab005779cbe2e28a2a10f6bb1f","user":{"login":"pradeepdalvi","id":5187871,"avatar_url":"https://avatars.githubusercontent.com/u/5187871?v=3","gravatar_id":"","url":"https://api.github.com/users/pradeepdalvi","html_url":"https://github.com/pradeepdalvi","followers_url":"https://api.github.com/users/pradeepdalvi/followers","following_url":"https://api.github.com/users/pradeepdalvi/following{/other_user}","gists_url":"https://api.github.com/users/pradeepdalvi/gists{/gist_id}","starred_url":"https://api.github.com/users/pradeepdalvi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pradeepdalvi/subscriptions","organizations_url":"https://api.github.com/users/pradeepdalvi/orgs","repos_url":"https://api.github.com/users/pradeepdalvi/repos","events_url":"https://api.github.com/users/pradeepdalvi/events{/privacy}","received_events_url":"https://api.github.com/users/pradeepdalvi/received_events","type":"User","site_admin":false},"repo":{"id":54016047,"name":"incubator-apex-malhar","full_name":"pradeepdalvi/incubator-apex-malhar","owner":{"login":"pradeepdalvi","id":5187871,"avatar_url":"https://avatars.githubusercontent.com/u/5187871?v=3","gravatar_id":"","url":"https://api.github.com/users/pradeepdalvi","html_url":"https://github.com/pradeepdalvi","followers_url":"https://api.github.com/users/pradeepdalvi/followers","following_url":"https://api.github.com/users/pradeepdalvi/following{/other_user}","gists_url":"https://api.github.com/users/pradeepdalvi/gists{/gist_id}","starred_url":"https://api.github.com/users/pradeepdalvi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pradeepdalvi/subscriptions","organizations_url":"https://api.github.com/users/pradeepdalvi/orgs","repos_url":"https://api.github.com/users/pradeepdalvi/repos","events_url":"https://api.github.com/users/pradeepdalvi/events{/privacy}","received_events_url":"https://api.github.com/users/pradeepdalvi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pradeepdalvi/incubator-apex-malhar","description":"Mirror of Apache Apex malhar (Incubating)","fork":true,"url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar","forks_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/forks","keys_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/teams","hooks_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/hooks","issue_events_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/issues/events{/number}","events_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/events","assignees_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/assignees{/user}","branches_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/branches{/branch}","tags_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/tags","blobs_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/git/refs{/sha}","trees_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/statuses/{sha}","languages_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/languages","stargazers_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/stargazers","contributors_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/contributors","subscribers_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/subscribers","subscription_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/subscription","commits_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/commits{/sha}","git_commits_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/git/commits{/sha}","comments_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/comments{/number}","issue_comment_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/issues/comments{/number}","contents_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/contents/{+path}","compare_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/merges","archive_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/downloads","issues_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/issues{/number}","pulls_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/pulls{/number}","milestones_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/milestones{/number}","notifications_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/labels{/name}","releases_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/releases{/id}","deployments_url":"https://api.github.com/repos/pradeepdalvi/incubator-apex-malhar/deployments","created_at":"2016-03-16T08:57:52Z","updated_at":"2016-03-16T08:57:57Z","pushed_at":"2016-05-11T16:17:22Z","git_url":"git://github.com/pradeepdalvi/incubator-apex-malhar.git","ssh_url":"git@github.com:pradeepdalvi/incubator-apex-malhar.git","clone_url":"https://github.com/pradeepdalvi/incubator-apex-malhar.git","svn_url":"https://github.com/pradeepdalvi/incubator-apex-malhar","homepage":null,"size":84788,"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":"apache:master","ref":"master","sha":"e38e144f2b3d25289c1aef128eb0c24b63362647","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":41348334,"name":"incubator-apex-malhar","full_name":"apache/incubator-apex-malhar","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/incubator-apex-malhar","description":"Mirror of Apache Apex malhar (Incubating)","fork":false,"url":"https://api.github.com/repos/apache/incubator-apex-malhar","forks_url":"https://api.github.com/repos/apache/incubator-apex-malhar/forks","keys_url":"https://api.github.com/repos/apache/incubator-apex-malhar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-apex-malhar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-apex-malhar/teams","hooks_url":"https://api.github.com/repos/apache/incubator-apex-malhar/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-apex-malhar/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-apex-malhar/events","assignees_url":"https://api.github.com/repos/apache/incubator-apex-malhar/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-apex-malhar/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-apex-malhar/tags","blobs_url":"https://api.github.com/repos/apache/incubator-apex-malhar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-apex-malhar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-apex-malhar/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-apex-malhar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-apex-malhar/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-apex-malhar/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-apex-malhar/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-apex-malhar/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-apex-malhar/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-apex-malhar/subscription","commits_url":"https://api.github.com/repos/apache/incubator-apex-malhar/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-apex-malhar/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-apex-malhar/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-apex-malhar/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-apex-malhar/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-apex-malhar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-apex-malhar/merges","archive_url":"https://api.github.com/repos/apache/incubator-apex-malhar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-apex-malhar/downloads","issues_url":"https://api.github.com/repos/apache/incubator-apex-malhar/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-apex-malhar/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-apex-malhar/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-apex-malhar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-apex-malhar/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-apex-malhar/releases{/id}","deployments_url":"https://api.github.com/repos/apache/incubator-apex-malhar/deployments","created_at":"2015-08-25T07:00:05Z","updated_at":"2016-04-29T16:13:51Z","pushed_at":"2016-05-17T09:16:58Z","git_url":"git://github.com/apache/incubator-apex-malhar.git","ssh_url":"git@github.com:apache/incubator-apex-malhar.git","clone_url":"https://github.com/apache/incubator-apex-malhar.git","svn_url":"https://github.com/apache/incubator-apex-malhar","homepage":null,"size":95559,"stargazers_count":33,"watchers_count":33,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":70,"mirror_url":"git://git.apache.org/incubator-apex-malhar.git","open_issues_count":22,"forks":70,"open_issues":22,"watchers":33,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-apex-malhar/pulls/270"},"html":{"href":"https://github.com/apache/incubator-apex-malhar/pull/270"},"issue":{"href":"https://api.github.com/repos/apache/incubator-apex-malhar/issues/270"},"comments":{"href":"https://api.github.com/repos/apache/incubator-apex-malhar/issues/270/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-apex-malhar/pulls/270/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-apex-malhar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-apex-malhar/pulls/270/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-apex-malhar/statuses/5c7a28aa24bdd3ab005779cbe2e28a2a10f6bb1f"}}}}