{"action":"created","comment":{"url":"https://api.github.com/repos/sandeepSamudrala/hraven/pulls/comments/32804271","id":32804271,"diff_hunk":"@@ -372,6 +376,62 @@ public void write() throws IOException {\n     socketWriter.write(lines.toString());\n   }\n \n+    private int getTimeStamp() {\n+        int timestamp;\n+\n+//        timestamp = Math.round(recordCollection.getSubmitTime() / 1000);\n+//        return timestamp;\n+\n+\n+        StandardEvaluationContext context = new StandardEvaluationContext();\n+\n+        try {\n+            context.registerFunction(\"dateToEpoch\", GraphiteHistoryWriter.class.getDeclaredMethod(\"dateToEpoch\", String.class));\n+            context.registerFunction(\"submitTime\", GraphiteHistoryWriter.class.getDeclaredMethod(\"submitTime\",JobHistoryRecordCollection.class));\n+        } catch (SecurityException e) {\n+            LOG.error(\"SecurityException while adding methods to SEPL context\", e);\n+            throw new RuntimeException(e);\n+        } catch (NoSuchMethodException e) {\n+            LOG.error(\"NoSuchMethodException while adding methods to SEPL context\", e);\n+            throw new RuntimeException(e);\n+        }\n+        context.setVariable(\"tag\", userTokens);\n+        context.setVariable(\"records\", recordCollection);\n+\n+        Expression filterExp = getParsedExpression(sinkConfig.getTimestampFilter(), false);\n+        LOG.info(\"filterExp: \" + filterExp.getExpressionString() );\n+        LOG.info(\"userTokens: \" + userTokens.toString());\n+        Long timestampLong = filterExp.getValue(context, Long.class);\n+        if(timestampLong != null) {\n+            timestamp = Math.round(timestampLong / 1000);","path":"hraven-etl/src/main/java/com/twitter/hraven/mapreduce/GraphiteHistoryWriter.java","position":74,"original_position":74,"commit_id":"1c96b79cca04993fb1b7f45ee52e0f13b57403d4","original_commit_id":"1c96b79cca04993fb1b7f45ee52e0f13b57403d4","user":{"login":"angadsingh","id":1623026,"avatar_url":"https://avatars.githubusercontent.com/u/1623026?v=3","gravatar_id":"","url":"https://api.github.com/users/angadsingh","html_url":"https://github.com/angadsingh","followers_url":"https://api.github.com/users/angadsingh/followers","following_url":"https://api.github.com/users/angadsingh/following{/other_user}","gists_url":"https://api.github.com/users/angadsingh/gists{/gist_id}","starred_url":"https://api.github.com/users/angadsingh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angadsingh/subscriptions","organizations_url":"https://api.github.com/users/angadsingh/orgs","repos_url":"https://api.github.com/users/angadsingh/repos","events_url":"https://api.github.com/users/angadsingh/events{/privacy}","received_events_url":"https://api.github.com/users/angadsingh/received_events","type":"User","site_admin":false},"body":"don't need this extra variable timestamp.. simply return Math.round (timestamp--Long--/1000) if it is not null else Math.round(submitTime(..)/1000)","created_at":"2015-06-19T06:30:38Z","updated_at":"2015-06-19T06:30:38Z","html_url":"https://github.com/sandeepSamudrala/hraven/pull/5#discussion_r32804271","pull_request_url":"https://api.github.com/repos/sandeepSamudrala/hraven/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/sandeepSamudrala/hraven/pulls/comments/32804271"},"html":{"href":"https://github.com/sandeepSamudrala/hraven/pull/5#discussion_r32804271"},"pull_request":{"href":"https://api.github.com/repos/sandeepSamudrala/hraven/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/sandeepSamudrala/hraven/pulls/5","id":37994130,"html_url":"https://github.com/sandeepSamudrala/hraven/pull/5","diff_url":"https://github.com/sandeepSamudrala/hraven/pull/5.diff","patch_url":"https://github.com/sandeepSamudrala/hraven/pull/5.patch","issue_url":"https://api.github.com/repos/sandeepSamudrala/hraven/issues/5","number":5,"state":"open","locked":false,"title":"USER-3381: support for nominalTime","user":{"login":"avi-ram","id":9190714,"avatar_url":"https://avatars.githubusercontent.com/u/9190714?v=3","gravatar_id":"","url":"https://api.github.com/users/avi-ram","html_url":"https://github.com/avi-ram","followers_url":"https://api.github.com/users/avi-ram/followers","following_url":"https://api.github.com/users/avi-ram/following{/other_user}","gists_url":"https://api.github.com/users/avi-ram/gists{/gist_id}","starred_url":"https://api.github.com/users/avi-ram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avi-ram/subscriptions","organizations_url":"https://api.github.com/users/avi-ram/orgs","repos_url":"https://api.github.com/users/avi-ram/repos","events_url":"https://api.github.com/users/avi-ram/events{/privacy}","received_events_url":"https://api.github.com/users/avi-ram/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-18T10:56:26Z","updated_at":"2015-06-19T06:30:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"37e546972376773d46f522ee8278f523c4a20b57","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sandeepSamudrala/hraven/pulls/5/commits","review_comments_url":"https://api.github.com/repos/sandeepSamudrala/hraven/pulls/5/comments","review_comment_url":"https://api.github.com/repos/sandeepSamudrala/hraven/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sandeepSamudrala/hraven/issues/5/comments","statuses_url":"https://api.github.com/repos/sandeepSamudrala/hraven/statuses/1c96b79cca04993fb1b7f45ee52e0f13b57403d4","head":{"label":"avi-ram:nominalTime","ref":"nominalTime","sha":"1c96b79cca04993fb1b7f45ee52e0f13b57403d4","user":{"login":"avi-ram","id":9190714,"avatar_url":"https://avatars.githubusercontent.com/u/9190714?v=3","gravatar_id":"","url":"https://api.github.com/users/avi-ram","html_url":"https://github.com/avi-ram","followers_url":"https://api.github.com/users/avi-ram/followers","following_url":"https://api.github.com/users/avi-ram/following{/other_user}","gists_url":"https://api.github.com/users/avi-ram/gists{/gist_id}","starred_url":"https://api.github.com/users/avi-ram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avi-ram/subscriptions","organizations_url":"https://api.github.com/users/avi-ram/orgs","repos_url":"https://api.github.com/users/avi-ram/repos","events_url":"https://api.github.com/users/avi-ram/events{/privacy}","received_events_url":"https://api.github.com/users/avi-ram/received_events","type":"User","site_admin":false},"repo":{"id":33124125,"name":"hraven","full_name":"avi-ram/hraven","owner":{"login":"avi-ram","id":9190714,"avatar_url":"https://avatars.githubusercontent.com/u/9190714?v=3","gravatar_id":"","url":"https://api.github.com/users/avi-ram","html_url":"https://github.com/avi-ram","followers_url":"https://api.github.com/users/avi-ram/followers","following_url":"https://api.github.com/users/avi-ram/following{/other_user}","gists_url":"https://api.github.com/users/avi-ram/gists{/gist_id}","starred_url":"https://api.github.com/users/avi-ram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avi-ram/subscriptions","organizations_url":"https://api.github.com/users/avi-ram/orgs","repos_url":"https://api.github.com/users/avi-ram/repos","events_url":"https://api.github.com/users/avi-ram/events{/privacy}","received_events_url":"https://api.github.com/users/avi-ram/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/avi-ram/hraven","description":"hRaven collects run time data and statistics from MapReduce jobs in an easily queryable format","fork":true,"url":"https://api.github.com/repos/avi-ram/hraven","forks_url":"https://api.github.com/repos/avi-ram/hraven/forks","keys_url":"https://api.github.com/repos/avi-ram/hraven/keys{/key_id}","collaborators_url":"https://api.github.com/repos/avi-ram/hraven/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/avi-ram/hraven/teams","hooks_url":"https://api.github.com/repos/avi-ram/hraven/hooks","issue_events_url":"https://api.github.com/repos/avi-ram/hraven/issues/events{/number}","events_url":"https://api.github.com/repos/avi-ram/hraven/events","assignees_url":"https://api.github.com/repos/avi-ram/hraven/assignees{/user}","branches_url":"https://api.github.com/repos/avi-ram/hraven/branches{/branch}","tags_url":"https://api.github.com/repos/avi-ram/hraven/tags","blobs_url":"https://api.github.com/repos/avi-ram/hraven/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/avi-ram/hraven/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/avi-ram/hraven/git/refs{/sha}","trees_url":"https://api.github.com/repos/avi-ram/hraven/git/trees{/sha}","statuses_url":"https://api.github.com/repos/avi-ram/hraven/statuses/{sha}","languages_url":"https://api.github.com/repos/avi-ram/hraven/languages","stargazers_url":"https://api.github.com/repos/avi-ram/hraven/stargazers","contributors_url":"https://api.github.com/repos/avi-ram/hraven/contributors","subscribers_url":"https://api.github.com/repos/avi-ram/hraven/subscribers","subscription_url":"https://api.github.com/repos/avi-ram/hraven/subscription","commits_url":"https://api.github.com/repos/avi-ram/hraven/commits{/sha}","git_commits_url":"https://api.github.com/repos/avi-ram/hraven/git/commits{/sha}","comments_url":"https://api.github.com/repos/avi-ram/hraven/comments{/number}","issue_comment_url":"https://api.github.com/repos/avi-ram/hraven/issues/comments{/number}","contents_url":"https://api.github.com/repos/avi-ram/hraven/contents/{+path}","compare_url":"https://api.github.com/repos/avi-ram/hraven/compare/{base}...{head}","merges_url":"https://api.github.com/repos/avi-ram/hraven/merges","archive_url":"https://api.github.com/repos/avi-ram/hraven/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/avi-ram/hraven/downloads","issues_url":"https://api.github.com/repos/avi-ram/hraven/issues{/number}","pulls_url":"https://api.github.com/repos/avi-ram/hraven/pulls{/number}","milestones_url":"https://api.github.com/repos/avi-ram/hraven/milestones{/number}","notifications_url":"https://api.github.com/repos/avi-ram/hraven/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/avi-ram/hraven/labels{/name}","releases_url":"https://api.github.com/repos/avi-ram/hraven/releases{/id}","created_at":"2015-03-30T13:17:53Z","updated_at":"2015-04-02T13:32:32Z","pushed_at":"2015-06-18T10:55:51Z","git_url":"git://github.com/avi-ram/hraven.git","ssh_url":"git@github.com:avi-ram/hraven.git","clone_url":"https://github.com/avi-ram/hraven.git","svn_url":"https://github.com/avi-ram/hraven","homepage":"https://twitter.com/twitterhadoop","size":1377,"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":"sandeepSamudrala:master","ref":"master","sha":"ca0eeb4b2d24c7d4f843e517cc9c9817b8d175f6","user":{"login":"sandeepSamudrala","id":2361058,"avatar_url":"https://avatars.githubusercontent.com/u/2361058?v=3","gravatar_id":"","url":"https://api.github.com/users/sandeepSamudrala","html_url":"https://github.com/sandeepSamudrala","followers_url":"https://api.github.com/users/sandeepSamudrala/followers","following_url":"https://api.github.com/users/sandeepSamudrala/following{/other_user}","gists_url":"https://api.github.com/users/sandeepSamudrala/gists{/gist_id}","starred_url":"https://api.github.com/users/sandeepSamudrala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandeepSamudrala/subscriptions","organizations_url":"https://api.github.com/users/sandeepSamudrala/orgs","repos_url":"https://api.github.com/users/sandeepSamudrala/repos","events_url":"https://api.github.com/users/sandeepSamudrala/events{/privacy}","received_events_url":"https://api.github.com/users/sandeepSamudrala/received_events","type":"User","site_admin":false},"repo":{"id":29236579,"name":"hraven","full_name":"sandeepSamudrala/hraven","owner":{"login":"sandeepSamudrala","id":2361058,"avatar_url":"https://avatars.githubusercontent.com/u/2361058?v=3","gravatar_id":"","url":"https://api.github.com/users/sandeepSamudrala","html_url":"https://github.com/sandeepSamudrala","followers_url":"https://api.github.com/users/sandeepSamudrala/followers","following_url":"https://api.github.com/users/sandeepSamudrala/following{/other_user}","gists_url":"https://api.github.com/users/sandeepSamudrala/gists{/gist_id}","starred_url":"https://api.github.com/users/sandeepSamudrala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandeepSamudrala/subscriptions","organizations_url":"https://api.github.com/users/sandeepSamudrala/orgs","repos_url":"https://api.github.com/users/sandeepSamudrala/repos","events_url":"https://api.github.com/users/sandeepSamudrala/events{/privacy}","received_events_url":"https://api.github.com/users/sandeepSamudrala/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sandeepSamudrala/hraven","description":"hRaven collects run time data and statistics from MapReduce jobs in an easily queryable format","fork":true,"url":"https://api.github.com/repos/sandeepSamudrala/hraven","forks_url":"https://api.github.com/repos/sandeepSamudrala/hraven/forks","keys_url":"https://api.github.com/repos/sandeepSamudrala/hraven/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sandeepSamudrala/hraven/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sandeepSamudrala/hraven/teams","hooks_url":"https://api.github.com/repos/sandeepSamudrala/hraven/hooks","issue_events_url":"https://api.github.com/repos/sandeepSamudrala/hraven/issues/events{/number}","events_url":"https://api.github.com/repos/sandeepSamudrala/hraven/events","assignees_url":"https://api.github.com/repos/sandeepSamudrala/hraven/assignees{/user}","branches_url":"https://api.github.com/repos/sandeepSamudrala/hraven/branches{/branch}","tags_url":"https://api.github.com/repos/sandeepSamudrala/hraven/tags","blobs_url":"https://api.github.com/repos/sandeepSamudrala/hraven/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sandeepSamudrala/hraven/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sandeepSamudrala/hraven/git/refs{/sha}","trees_url":"https://api.github.com/repos/sandeepSamudrala/hraven/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sandeepSamudrala/hraven/statuses/{sha}","languages_url":"https://api.github.com/repos/sandeepSamudrala/hraven/languages","stargazers_url":"https://api.github.com/repos/sandeepSamudrala/hraven/stargazers","contributors_url":"https://api.github.com/repos/sandeepSamudrala/hraven/contributors","subscribers_url":"https://api.github.com/repos/sandeepSamudrala/hraven/subscribers","subscription_url":"https://api.github.com/repos/sandeepSamudrala/hraven/subscription","commits_url":"https://api.github.com/repos/sandeepSamudrala/hraven/commits{/sha}","git_commits_url":"https://api.github.com/repos/sandeepSamudrala/hraven/git/commits{/sha}","comments_url":"https://api.github.com/repos/sandeepSamudrala/hraven/comments{/number}","issue_comment_url":"https://api.github.com/repos/sandeepSamudrala/hraven/issues/comments{/number}","contents_url":"https://api.github.com/repos/sandeepSamudrala/hraven/contents/{+path}","compare_url":"https://api.github.com/repos/sandeepSamudrala/hraven/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sandeepSamudrala/hraven/merges","archive_url":"https://api.github.com/repos/sandeepSamudrala/hraven/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sandeepSamudrala/hraven/downloads","issues_url":"https://api.github.com/repos/sandeepSamudrala/hraven/issues{/number}","pulls_url":"https://api.github.com/repos/sandeepSamudrala/hraven/pulls{/number}","milestones_url":"https://api.github.com/repos/sandeepSamudrala/hraven/milestones{/number}","notifications_url":"https://api.github.com/repos/sandeepSamudrala/hraven/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sandeepSamudrala/hraven/labels{/name}","releases_url":"https://api.github.com/repos/sandeepSamudrala/hraven/releases{/id}","created_at":"2015-01-14T09:19:47Z","updated_at":"2015-03-13T06:24:26Z","pushed_at":"2015-06-19T06:23:32Z","git_url":"git://github.com/sandeepSamudrala/hraven.git","ssh_url":"git@github.com:sandeepSamudrala/hraven.git","clone_url":"https://github.com/sandeepSamudrala/hraven.git","svn_url":"https://github.com/sandeepSamudrala/hraven","homepage":"https://twitter.com/twitterhadoop","size":1386,"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":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sandeepSamudrala/hraven/pulls/5"},"html":{"href":"https://github.com/sandeepSamudrala/hraven/pull/5"},"issue":{"href":"https://api.github.com/repos/sandeepSamudrala/hraven/issues/5"},"comments":{"href":"https://api.github.com/repos/sandeepSamudrala/hraven/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/sandeepSamudrala/hraven/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/sandeepSamudrala/hraven/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sandeepSamudrala/hraven/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/sandeepSamudrala/hraven/statuses/1c96b79cca04993fb1b7f45ee52e0f13b57403d4"}}}}