{"action":"created","comment":{"url":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls/comments/85602256","pull_request_review_id":6307235,"id":85602256,"diff_hunk":"@@ -0,0 +1,170 @@\n+/*\n+ * Copyright © 2016 Cask Data, Inc.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n+ * use this file except in compliance with the License. You may obtain a copy of\n+ * 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, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n+ * License for the specific language governing permissions and limitations under\n+ * the License.\n+ */\n+\n+package co.cask.hydrator.plugin.batch.action;\n+\n+import co.cask.cdap.etl.mock.action.MockActionContext;\n+import co.cask.hydrator.plugin.batch.ETLBatchTestBase;\n+import co.cask.hydrator.plugin.common.EchoCommandFactory;\n+import org.apache.hadoop.conf.Configuration;\n+import org.apache.hadoop.fs.FileSystem;\n+import org.apache.hadoop.fs.Path;\n+import org.apache.hadoop.hdfs.MiniDFSCluster;\n+import org.apache.sshd.common.config.keys.KeyUtils;\n+import org.apache.sshd.server.SshServer;\n+import org.apache.sshd.server.auth.password.PasswordAuthenticator;\n+import org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider;\n+import org.apache.sshd.server.session.ServerSession;\n+import org.apache.sshd.server.shell.ProcessShellFactory;\n+import org.junit.After;\n+import org.junit.AfterClass;\n+import org.junit.Assert;\n+import org.junit.Before;\n+import org.junit.BeforeClass;\n+import org.junit.ClassRule;\n+import org.junit.Test;\n+import org.junit.rules.TemporaryFolder;\n+\n+import java.io.File;\n+import java.io.IOException;\n+\n+/**\n+ * Test for {@link OracleExportAction}\n+ */\n+public class OracleExportActionTest extends ETLBatchTestBase {\n+  // Test keypair config\n+  @ClassRule\n+  public static TemporaryFolder folder = new TemporaryFolder();\n+  private static final String PASSPHRASE = \"password\";\n+  private static final String[] SHELL_ARGS = {\"/bin/sh\", \"-i\", \"-l\"};\n+  private static final String USER = \"test\";\n+  // Test members\n+  private SshServer sshServer;\n+  private static MiniDFSCluster dfsCluster;\n+  private static FileSystem fileSystem;\n+\n+  @BeforeClass\n+  public static void buildMiniDFS() throws Exception {\n+    // Setup MiniDFSCluster\n+    File baseDir = folder.newFolder();\n+    Configuration conf = new Configuration();\n+    conf.set(MiniDFSCluster.HDFS_MINIDFS_BASEDIR, baseDir.getAbsolutePath());\n+    MiniDFSCluster.Builder builder = new MiniDFSCluster.Builder(conf);\n+    dfsCluster = builder.build();\n+    dfsCluster.waitActive();\n+    fileSystem = FileSystem.newInstance(conf);\n+  }\n+\n+  @AfterClass\n+  public static void cleanupMiniDFS() throws Exception {\n+    // Shutdown MiniDFSCluster\n+    dfsCluster.shutdown();\n+    folder.delete();\n+  }\n+\n+  @Before\n+  public void setup() throws Exception {\n+    sshServer = setupSSHDaemon();","path":"core-plugins/src/test/java/co/cask/hydrator/plugin/batch/action/OracleExportActionTest.java","position":80,"original_position":80,"commit_id":"2e9411819b8f48a1779d48f7af751d8935f72e25","original_commit_id":"2e9411819b8f48a1779d48f7af751d8935f72e25","user":{"login":"bdmogal","id":3895099,"avatar_url":"https://avatars.githubusercontent.com/u/3895099?v=3","gravatar_id":"","url":"https://api.github.com/users/bdmogal","html_url":"https://github.com/bdmogal","followers_url":"https://api.github.com/users/bdmogal/followers","following_url":"https://api.github.com/users/bdmogal/following{/other_user}","gists_url":"https://api.github.com/users/bdmogal/gists{/gist_id}","starred_url":"https://api.github.com/users/bdmogal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdmogal/subscriptions","organizations_url":"https://api.github.com/users/bdmogal/orgs","repos_url":"https://api.github.com/users/bdmogal/repos","events_url":"https://api.github.com/users/bdmogal/events{/privacy}","received_events_url":"https://api.github.com/users/bdmogal/received_events","type":"User","site_admin":false},"body":"why does this have to run before every test? Can it be done in the ``@BeforeClass`` method?","created_at":"2016-10-28T20:13:46Z","updated_at":"2016-10-28T20:22:08Z","html_url":"https://github.com/caskdata/hydrator-plugins/pull/498#discussion_r85602256","pull_request_url":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls/498","_links":{"self":{"href":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls/comments/85602256"},"html":{"href":"https://github.com/caskdata/hydrator-plugins/pull/498#discussion_r85602256"},"pull_request":{"href":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls/498"}}},"pull_request":{"url":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls/498","id":91175670,"html_url":"https://github.com/caskdata/hydrator-plugins/pull/498","diff_url":"https://github.com/caskdata/hydrator-plugins/pull/498.diff","patch_url":"https://github.com/caskdata/hydrator-plugins/pull/498.patch","issue_url":"https://api.github.com/repos/caskdata/hydrator-plugins/issues/498","number":498,"state":"open","locked":false,"title":"HYDRATOR-1029 Oracle Export Action Implementation","user":{"login":"shashankmoghe","id":20435815,"avatar_url":"https://avatars.githubusercontent.com/u/20435815?v=3","gravatar_id":"","url":"https://api.github.com/users/shashankmoghe","html_url":"https://github.com/shashankmoghe","followers_url":"https://api.github.com/users/shashankmoghe/followers","following_url":"https://api.github.com/users/shashankmoghe/following{/other_user}","gists_url":"https://api.github.com/users/shashankmoghe/gists{/gist_id}","starred_url":"https://api.github.com/users/shashankmoghe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shashankmoghe/subscriptions","organizations_url":"https://api.github.com/users/shashankmoghe/orgs","repos_url":"https://api.github.com/users/shashankmoghe/repos","events_url":"https://api.github.com/users/shashankmoghe/events{/privacy}","received_events_url":"https://api.github.com/users/shashankmoghe/received_events","type":"User","site_admin":false},"body":"ITN will be created once Oracle instance is available.Tested locally using CDAP SDK 4","created_at":"2016-10-27T10:45:50Z","updated_at":"2016-10-28T20:22:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"726ca530cd1c7d5550d1684cb69638def29051c2","assignee":{"login":"bdmogal","id":3895099,"avatar_url":"https://avatars.githubusercontent.com/u/3895099?v=3","gravatar_id":"","url":"https://api.github.com/users/bdmogal","html_url":"https://github.com/bdmogal","followers_url":"https://api.github.com/users/bdmogal/followers","following_url":"https://api.github.com/users/bdmogal/following{/other_user}","gists_url":"https://api.github.com/users/bdmogal/gists{/gist_id}","starred_url":"https://api.github.com/users/bdmogal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdmogal/subscriptions","organizations_url":"https://api.github.com/users/bdmogal/orgs","repos_url":"https://api.github.com/users/bdmogal/repos","events_url":"https://api.github.com/users/bdmogal/events{/privacy}","received_events_url":"https://api.github.com/users/bdmogal/received_events","type":"User","site_admin":false},"assignees":[{"login":"bdmogal","id":3895099,"avatar_url":"https://avatars.githubusercontent.com/u/3895099?v=3","gravatar_id":"","url":"https://api.github.com/users/bdmogal","html_url":"https://github.com/bdmogal","followers_url":"https://api.github.com/users/bdmogal/followers","following_url":"https://api.github.com/users/bdmogal/following{/other_user}","gists_url":"https://api.github.com/users/bdmogal/gists{/gist_id}","starred_url":"https://api.github.com/users/bdmogal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdmogal/subscriptions","organizations_url":"https://api.github.com/users/bdmogal/orgs","repos_url":"https://api.github.com/users/bdmogal/repos","events_url":"https://api.github.com/users/bdmogal/events{/privacy}","received_events_url":"https://api.github.com/users/bdmogal/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls/498/commits","review_comments_url":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls/498/comments","review_comment_url":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls/comments{/number}","comments_url":"https://api.github.com/repos/caskdata/hydrator-plugins/issues/498/comments","statuses_url":"https://api.github.com/repos/caskdata/hydrator-plugins/statuses/2e9411819b8f48a1779d48f7af751d8935f72e25","head":{"label":"shashankmoghe:feature/OracleExport","ref":"feature/OracleExport","sha":"2e9411819b8f48a1779d48f7af751d8935f72e25","user":{"login":"shashankmoghe","id":20435815,"avatar_url":"https://avatars.githubusercontent.com/u/20435815?v=3","gravatar_id":"","url":"https://api.github.com/users/shashankmoghe","html_url":"https://github.com/shashankmoghe","followers_url":"https://api.github.com/users/shashankmoghe/followers","following_url":"https://api.github.com/users/shashankmoghe/following{/other_user}","gists_url":"https://api.github.com/users/shashankmoghe/gists{/gist_id}","starred_url":"https://api.github.com/users/shashankmoghe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shashankmoghe/subscriptions","organizations_url":"https://api.github.com/users/shashankmoghe/orgs","repos_url":"https://api.github.com/users/shashankmoghe/repos","events_url":"https://api.github.com/users/shashankmoghe/events{/privacy}","received_events_url":"https://api.github.com/users/shashankmoghe/received_events","type":"User","site_admin":false},"repo":{"id":65281984,"name":"hydrator-plugins","full_name":"shashankmoghe/hydrator-plugins","owner":{"login":"shashankmoghe","id":20435815,"avatar_url":"https://avatars.githubusercontent.com/u/20435815?v=3","gravatar_id":"","url":"https://api.github.com/users/shashankmoghe","html_url":"https://github.com/shashankmoghe","followers_url":"https://api.github.com/users/shashankmoghe/followers","following_url":"https://api.github.com/users/shashankmoghe/following{/other_user}","gists_url":"https://api.github.com/users/shashankmoghe/gists{/gist_id}","starred_url":"https://api.github.com/users/shashankmoghe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shashankmoghe/subscriptions","organizations_url":"https://api.github.com/users/shashankmoghe/orgs","repos_url":"https://api.github.com/users/shashankmoghe/repos","events_url":"https://api.github.com/users/shashankmoghe/events{/privacy}","received_events_url":"https://api.github.com/users/shashankmoghe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shashankmoghe/hydrator-plugins","description":"Cask Hydrator Plugins Repository","fork":true,"url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins","forks_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/forks","keys_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/teams","hooks_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/hooks","issue_events_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/issues/events{/number}","events_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/events","assignees_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/assignees{/user}","branches_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/branches{/branch}","tags_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/tags","blobs_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/git/refs{/sha}","trees_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/statuses/{sha}","languages_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/languages","stargazers_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/stargazers","contributors_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/contributors","subscribers_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/subscribers","subscription_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/subscription","commits_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/commits{/sha}","git_commits_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/git/commits{/sha}","comments_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/comments{/number}","issue_comment_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/issues/comments{/number}","contents_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/contents/{+path}","compare_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/merges","archive_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/downloads","issues_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/issues{/number}","pulls_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/pulls{/number}","milestones_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/milestones{/number}","notifications_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/labels{/name}","releases_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/releases{/id}","deployments_url":"https://api.github.com/repos/shashankmoghe/hydrator-plugins/deployments","created_at":"2016-08-09T09:26:22Z","updated_at":"2016-08-09T09:26:24Z","pushed_at":"2016-10-28T12:03:30Z","git_url":"git://github.com/shashankmoghe/hydrator-plugins.git","ssh_url":"git@github.com:shashankmoghe/hydrator-plugins.git","clone_url":"https://github.com/shashankmoghe/hydrator-plugins.git","svn_url":"https://github.com/shashankmoghe/hydrator-plugins","homepage":"","size":3840,"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":"release/1.4"}},"base":{"label":"caskdata:develop","ref":"develop","sha":"170a66bf71c8d9c9967ac81833b7a2ab06f6858c","user":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"repo":{"id":39922362,"name":"hydrator-plugins","full_name":"caskdata/hydrator-plugins","owner":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/caskdata/hydrator-plugins","description":"Cask Hydrator Plugins Repository","fork":false,"url":"https://api.github.com/repos/caskdata/hydrator-plugins","forks_url":"https://api.github.com/repos/caskdata/hydrator-plugins/forks","keys_url":"https://api.github.com/repos/caskdata/hydrator-plugins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caskdata/hydrator-plugins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caskdata/hydrator-plugins/teams","hooks_url":"https://api.github.com/repos/caskdata/hydrator-plugins/hooks","issue_events_url":"https://api.github.com/repos/caskdata/hydrator-plugins/issues/events{/number}","events_url":"https://api.github.com/repos/caskdata/hydrator-plugins/events","assignees_url":"https://api.github.com/repos/caskdata/hydrator-plugins/assignees{/user}","branches_url":"https://api.github.com/repos/caskdata/hydrator-plugins/branches{/branch}","tags_url":"https://api.github.com/repos/caskdata/hydrator-plugins/tags","blobs_url":"https://api.github.com/repos/caskdata/hydrator-plugins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caskdata/hydrator-plugins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caskdata/hydrator-plugins/git/refs{/sha}","trees_url":"https://api.github.com/repos/caskdata/hydrator-plugins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caskdata/hydrator-plugins/statuses/{sha}","languages_url":"https://api.github.com/repos/caskdata/hydrator-plugins/languages","stargazers_url":"https://api.github.com/repos/caskdata/hydrator-plugins/stargazers","contributors_url":"https://api.github.com/repos/caskdata/hydrator-plugins/contributors","subscribers_url":"https://api.github.com/repos/caskdata/hydrator-plugins/subscribers","subscription_url":"https://api.github.com/repos/caskdata/hydrator-plugins/subscription","commits_url":"https://api.github.com/repos/caskdata/hydrator-plugins/commits{/sha}","git_commits_url":"https://api.github.com/repos/caskdata/hydrator-plugins/git/commits{/sha}","comments_url":"https://api.github.com/repos/caskdata/hydrator-plugins/comments{/number}","issue_comment_url":"https://api.github.com/repos/caskdata/hydrator-plugins/issues/comments{/number}","contents_url":"https://api.github.com/repos/caskdata/hydrator-plugins/contents/{+path}","compare_url":"https://api.github.com/repos/caskdata/hydrator-plugins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caskdata/hydrator-plugins/merges","archive_url":"https://api.github.com/repos/caskdata/hydrator-plugins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caskdata/hydrator-plugins/downloads","issues_url":"https://api.github.com/repos/caskdata/hydrator-plugins/issues{/number}","pulls_url":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls{/number}","milestones_url":"https://api.github.com/repos/caskdata/hydrator-plugins/milestones{/number}","notifications_url":"https://api.github.com/repos/caskdata/hydrator-plugins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caskdata/hydrator-plugins/labels{/name}","releases_url":"https://api.github.com/repos/caskdata/hydrator-plugins/releases{/id}","deployments_url":"https://api.github.com/repos/caskdata/hydrator-plugins/deployments","created_at":"2015-07-30T00:14:48Z","updated_at":"2016-10-24T18:54:39Z","pushed_at":"2016-10-28T18:00:44Z","git_url":"git://github.com/caskdata/hydrator-plugins.git","ssh_url":"git@github.com:caskdata/hydrator-plugins.git","clone_url":"https://github.com/caskdata/hydrator-plugins.git","svn_url":"https://github.com/caskdata/hydrator-plugins","homepage":"","size":4527,"stargazers_count":23,"watchers_count":23,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":21,"forks":19,"open_issues":21,"watchers":23,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls/498"},"html":{"href":"https://github.com/caskdata/hydrator-plugins/pull/498"},"issue":{"href":"https://api.github.com/repos/caskdata/hydrator-plugins/issues/498"},"comments":{"href":"https://api.github.com/repos/caskdata/hydrator-plugins/issues/498/comments"},"review_comments":{"href":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls/498/comments"},"review_comment":{"href":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls/498/commits"},"statuses":{"href":"https://api.github.com/repos/caskdata/hydrator-plugins/statuses/2e9411819b8f48a1779d48f7af751d8935f72e25"}}}}
{"actor":{"display_login":"bdmogal"}}