GitHub PullRequestReviewCommentEvent at 2014-07-09 09:39:37
Repository: nexus-oss
Actor: cwilper
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/sonatype/nexus-oss/pulls/comments/14700891","id":14700891,"diff_hunk":"@@ -0,0 +1,274 @@\n+/*\n+ * Sonatype Nexus (TM) Open Source Version\n+ * Copyright (c) 2007-2014 Sonatype, Inc.\n+ * All rights reserved. Includes the third-party code listed at http://links.sonatype.com/products/nexus/oss/attributions.\n+ *\n+ * This program and the accompanying materials are made available under the terms of the Eclipse Public License Version 1.0,\n+ * which accompanies this distribution and is available at http://www.eclipse.org/legal/epl-v10.html.\n+ *\n+ * Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc. \"Sonatype\" and \"Sonatype Nexus\" are trademarks\n+ * of Sonatype, Inc. Apache Maven is a trademark of the Apache Software Foundation. M2eclipse is a trademark of the\n+ * Eclipse Foundation. All other trademarks are the property of their respective owners.\n+ */\n+\n+package org.sonatype.nexus.internal.orient;\n+\n+import java.io.BufferedInputStream;\n+import java.io.File;\n+import java.io.FileInputStream;\n+import java.io.IOException;\n+import java.io.InputStream;\n+import java.io.OutputStream;\n+import java.util.Map;\n+import java.util.zip.GZIPInputStream;\n+\n+import javax.inject.Inject;\n+import javax.inject.Named;\n+import javax.inject.Singleton;\n+\n+import org.sonatype.nexus.configuration.application.ApplicationDirectories;\n+import org.sonatype.nexus.orient.DatabaseManager;\n+import org.sonatype.nexus.util.file.DirSupport;\n+import org.sonatype.sisu.goodies.common.ComponentSupport;\n+\n+import com.google.common.base.Throwables;\n+import com.google.common.collect.Maps;\n+import com.orientechnologies.orient.core.command.OCommandOutputListener;\n+import com.orientechnologies.orient.core.db.document.ODatabaseDocumentPool;\n+import com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx;\n+import com.orientechnologies.orient.core.db.tool.ODatabaseExport;\n+import com.orientechnologies.orient.core.db.tool.ODatabaseImport;\n+\n+import static com.google.common.base.Preconditions.checkNotNull;\n+import static com.google.common.base.Preconditions.checkState;\n+\n+/**\n+ * Default {@link DatabaseManager} implementation.\n+ *\n+ * @since 3.0\n+ */\n+@Named\n+@Singleton\n+public class DatabaseManagerImpl\n+    extends ComponentSupport\n+    implements DatabaseManager\n+{\n+  public static final String WORK_PATH = \"db\";\n+\n+  public static final String SYSTEM_USER = \"admin\";\n+\n+  public static final String SYSTEM_PASSWORD = \"admin\";\n+\n+  public static final int BACKUP_BUFFER_SIZE = 16 * 1024;\n+\n+  public static final int IMPORT_BUFFER_SIZE = 16 * 1024;\n+\n+  public static final int BACKUP_COMPRESSION_LEVEL = 9;\n+\n+  private final File databasesDirectory;\n+\n+  @Inject\n+  public DatabaseManagerImpl(final ApplicationDirectories applicationDirectories) {\n+    checkNotNull(applicationDirectories);\n+    this.databasesDirectory = applicationDirectories.getWorkDirectory(WORK_PATH);\n+    log.debug(\"Databases directory: {}\", databasesDirectory);\n+  }\n+\n+  /**\n+   * Returns the directory for the given named database.  Directory many or many not exist.","path":"components/nexus-core/src/main/java/org/sonatype/nexus/internal/orient/DatabaseManagerImpl.java","position":78,"original_position":78,"commit_id":"de97a3aa5069b1835f531625776053dbbc766bb1","original_commit_id":"de97a3aa5069b1835f531625776053dbbc766bb1","user":{"login":"cwilper","id":118935,"avatar_url":"https://avatars.githubusercontent.com/u/118935?","gravatar_id":"f53ee0691ccb59ede3ec232c18af4e16","url":"https://api.github.com/users/cwilper","html_url":"https://github.com/cwilper","followers_url":"https://api.github.com/users/cwilper/followers","following_url":"https://api.github.com/users/cwilper/following{/other_user}","gists_url":"https://api.github.com/users/cwilper/gists{/gist_id}","starred_url":"https://api.github.com/users/cwilper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwilper/subscriptions","organizations_url":"https://api.github.com/users/cwilper/orgs","repos_url":"https://api.github.com/users/cwilper/repos","events_url":"https://api.github.com/users/cwilper/events{/privacy}","received_events_url":"https://api.github.com/users/cwilper/received_events","type":"User","site_admin":false},"body":"may or may not","created_at":"2014-07-09T09:39:37Z","updated_at":"2014-07-09T09:39:37Z","html_url":"https://github.com/sonatype/nexus-oss/pull/611#discussion_r14700891","pull_request_url":"https://api.github.com/repos/sonatype/nexus-oss/pulls/611","_links":{"self":{"href":"https://api.github.com/repos/sonatype/nexus-oss/pulls/comments/14700891"},"html":{"href":"https://github.com/sonatype/nexus-oss/pull/611#discussion_r14700891"},"pull_request":{"href":"https://api.github.com/repos/sonatype/nexus-oss/pulls/611"}}},"pull_request":{"url":"https://api.github.com/repos/sonatype/nexus-oss/pulls/611","id":18003729,"html_url":"https://github.com/sonatype/nexus-oss/pull/611","diff_url":"https://github.com/sonatype/nexus-oss/pull/611.diff","patch_url":"https://github.com/sonatype/nexus-oss/pull/611.patch","issue_url":"https://api.github.com/repos/sonatype/nexus-oss/issues/611","number":611,"state":"open","title":"REIVEW: [NX-518] Orient database manager","user":{"login":"jdillon","id":20114,"avatar_url":"https://avatars.githubusercontent.com/u/20114?","gravatar_id":"5f8fecf073c59b12605ed2a364cf1406","url":"https://api.github.com/users/jdillon","html_url":"https://github.com/jdillon","followers_url":"https://api.github.com/users/jdillon/followers","following_url":"https://api.github.com/users/jdillon/following{/other_user}","gists_url":"https://api.github.com/users/jdillon/gists{/gist_id}","starred_url":"https://api.github.com/users/jdillon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdillon/subscriptions","organizations_url":"https://api.github.com/users/jdillon/orgs","repos_url":"https://api.github.com/users/jdillon/repos","events_url":"https://api.github.com/users/jdillon/events{/privacy}","received_events_url":"https://api.github.com/users/jdillon/received_events","type":"User","site_admin":false},"body":"This PR addresses the following issues:\r\n\r\nhttps://issues.sonatype.org/browse/NX-518\r\nhttps://issues.sonatype.org/browse/NX-519\r\nhttps://issues.sonatype.org/browse/NX-542","created_at":"2014-07-04T19:36:59Z","updated_at":"2014-07-09T09:39:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4b42a660de83db1f49f19ca91e3655c4a3272d88","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sonatype/nexus-oss/pulls/611/commits","review_comments_url":"https://api.github.com/repos/sonatype/nexus-oss/pulls/611/comments","review_comment_url":"https://api.github.com/repos/sonatype/nexus-oss/pulls/comments/{number}","comments_url":"https://api.github.com/repos/sonatype/nexus-oss/issues/611/comments","statuses_url":"https://api.github.com/repos/sonatype/nexus-oss/statuses/de97a3aa5069b1835f531625776053dbbc766bb1","head":{"label":"sonatype:orient-database-manager","ref":"orient-database-manager","sha":"de97a3aa5069b1835f531625776053dbbc766bb1","user":{"login":"sonatype","id":44938,"avatar_url":"https://avatars.githubusercontent.com/u/44938?","gravatar_id":"614e0f6491dbb293e540190b02b3024e","url":"https://api.github.com/users/sonatype","html_url":"https://github.com/sonatype","followers_url":"https://api.github.com/users/sonatype/followers","following_url":"https://api.github.com/users/sonatype/following{/other_user}","gists_url":"https://api.github.com/users/sonatype/gists{/gist_id}","starred_url":"https://api.github.com/users/sonatype/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonatype/subscriptions","organizations_url":"https://api.github.com/users/sonatype/orgs","repos_url":"https://api.github.com/users/sonatype/repos","events_url":"https://api.github.com/users/sonatype/events{/privacy}","received_events_url":"https://api.github.com/users/sonatype/received_events","type":"Organization","site_admin":false},"repo":{"id":10146961,"name":"nexus-oss","full_name":"sonatype/nexus-oss","owner":{"login":"sonatype","id":44938,"avatar_url":"https://avatars.githubusercontent.com/u/44938?","gravatar_id":"614e0f6491dbb293e540190b02b3024e","url":"https://api.github.com/users/sonatype","html_url":"https://github.com/sonatype","followers_url":"https://api.github.com/users/sonatype/followers","following_url":"https://api.github.com/users/sonatype/following{/other_user}","gists_url":"https://api.github.com/users/sonatype/gists{/gist_id}","starred_url":"https://api.github.com/users/sonatype/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonatype/subscriptions","organizations_url":"https://api.github.com/users/sonatype/orgs","repos_url":"https://api.github.com/users/sonatype/repos","events_url":"https://api.github.com/users/sonatype/events{/privacy}","received_events_url":"https://api.github.com/users/sonatype/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sonatype/nexus-oss","description":"Sonatype Nexus OSS","fork":false,"url":"https://api.github.com/repos/sonatype/nexus-oss","forks_url":"https://api.github.com/repos/sonatype/nexus-oss/forks","keys_url":"https://api.github.com/repos/sonatype/nexus-oss/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sonatype/nexus-oss/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sonatype/nexus-oss/teams","hooks_url":"https://api.github.com/repos/sonatype/nexus-oss/hooks","issue_events_url":"https://api.github.com/repos/sonatype/nexus-oss/issues/events{/number}","events_url":"https://api.github.com/repos/sonatype/nexus-oss/events","assignees_url":"https://api.github.com/repos/sonatype/nexus-oss/assignees{/user}","branches_url":"https://api.github.com/repos/sonatype/nexus-oss/branches{/branch}","tags_url":"https://api.github.com/repos/sonatype/nexus-oss/tags","blobs_url":"https://api.github.com/repos/sonatype/nexus-oss/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sonatype/nexus-oss/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sonatype/nexus-oss/git/refs{/sha}","trees_url":"https://api.github.com/repos/sonatype/nexus-oss/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sonatype/nexus-oss/statuses/{sha}","languages_url":"https://api.github.com/repos/sonatype/nexus-oss/languages","stargazers_url":"https://api.github.com/repos/sonatype/nexus-oss/stargazers","contributors_url":"https://api.github.com/repos/sonatype/nexus-oss/contributors","subscribers_url":"https://api.github.com/repos/sonatype/nexus-oss/subscribers","subscription_url":"https://api.github.com/repos/sonatype/nexus-oss/subscription","commits_url":"https://api.github.com/repos/sonatype/nexus-oss/commits{/sha}","git_commits_url":"https://api.github.com/repos/sonatype/nexus-oss/git/commits{/sha}","comments_url":"https://api.github.com/repos/sonatype/nexus-oss/comments{/number}","issue_comment_url":"https://api.github.com/repos/sonatype/nexus-oss/issues/comments/{number}","contents_url":"https://api.github.com/repos/sonatype/nexus-oss/contents/{+path}","compare_url":"https://api.github.com/repos/sonatype/nexus-oss/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sonatype/nexus-oss/merges","archive_url":"https://api.github.com/repos/sonatype/nexus-oss/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sonatype/nexus-oss/downloads","issues_url":"https://api.github.com/repos/sonatype/nexus-oss/issues{/number}","pulls_url":"https://api.github.com/repos/sonatype/nexus-oss/pulls{/number}","milestones_url":"https://api.github.com/repos/sonatype/nexus-oss/milestones{/number}","notifications_url":"https://api.github.com/repos/sonatype/nexus-oss/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sonatype/nexus-oss/labels{/name}","releases_url":"https://api.github.com/repos/sonatype/nexus-oss/releases{/id}","created_at":"2013-05-18T20:48:57Z","updated_at":"2014-07-05T19:03:42Z","pushed_at":"2014-07-08T23:19:49Z","git_url":"git://github.com/sonatype/nexus-oss.git","ssh_url":"git@github.com:sonatype/nexus-oss.git","clone_url":"https://github.com/sonatype/nexus-oss.git","svn_url":"https://github.com/sonatype/nexus-oss","homepage":"http://links.sonatype.com/products/nexus/oss/home","size":674786,"stargazers_count":81,"watchers_count":81,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":52,"mirror_url":null,"open_issues_count":17,"forks":52,"open_issues":17,"watchers":81,"default_branch":"master"}},"base":{"label":"sonatype:master","ref":"master","sha":"a481cff2a1135d34432d699e2316aea9970a9a2c","user":{"login":"sonatype","id":44938,"avatar_url":"https://avatars.githubusercontent.com/u/44938?","gravatar_id":"614e0f6491dbb293e540190b02b3024e","url":"https://api.github.com/users/sonatype","html_url":"https://github.com/sonatype","followers_url":"https://api.github.com/users/sonatype/followers","following_url":"https://api.github.com/users/sonatype/following{/other_user}","gists_url":"https://api.github.com/users/sonatype/gists{/gist_id}","starred_url":"https://api.github.com/users/sonatype/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonatype/subscriptions","organizations_url":"https://api.github.com/users/sonatype/orgs","repos_url":"https://api.github.com/users/sonatype/repos","events_url":"https://api.github.com/users/sonatype/events{/privacy}","received_events_url":"https://api.github.com/users/sonatype/received_events","type":"Organization","site_admin":false},"repo":{"id":10146961,"name":"nexus-oss","full_name":"sonatype/nexus-oss","owner":{"login":"sonatype","id":44938,"avatar_url":"https://avatars.githubusercontent.com/u/44938?","gravatar_id":"614e0f6491dbb293e540190b02b3024e","url":"https://api.github.com/users/sonatype","html_url":"https://github.com/sonatype","followers_url":"https://api.github.com/users/sonatype/followers","following_url":"https://api.github.com/users/sonatype/following{/other_user}","gists_url":"https://api.github.com/users/sonatype/gists{/gist_id}","starred_url":"https://api.github.com/users/sonatype/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonatype/subscriptions","organizations_url":"https://api.github.com/users/sonatype/orgs","repos_url":"https://api.github.com/users/sonatype/repos","events_url":"https://api.github.com/users/sonatype/events{/privacy}","received_events_url":"https://api.github.com/users/sonatype/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sonatype/nexus-oss","description":"Sonatype Nexus OSS","fork":false,"url":"https://api.github.com/repos/sonatype/nexus-oss","forks_url":"https://api.github.com/repos/sonatype/nexus-oss/forks","keys_url":"https://api.github.com/repos/sonatype/nexus-oss/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sonatype/nexus-oss/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sonatype/nexus-oss/teams","hooks_url":"https://api.github.com/repos/sonatype/nexus-oss/hooks","issue_events_url":"https://api.github.com/repos/sonatype/nexus-oss/issues/events{/number}","events_url":"https://api.github.com/repos/sonatype/nexus-oss/events","assignees_url":"https://api.github.com/repos/sonatype/nexus-oss/assignees{/user}","branches_url":"https://api.github.com/repos/sonatype/nexus-oss/branches{/branch}","tags_url":"https://api.github.com/repos/sonatype/nexus-oss/tags","blobs_url":"https://api.github.com/repos/sonatype/nexus-oss/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sonatype/nexus-oss/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sonatype/nexus-oss/git/refs{/sha}","trees_url":"https://api.github.com/repos/sonatype/nexus-oss/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sonatype/nexus-oss/statuses/{sha}","languages_url":"https://api.github.com/repos/sonatype/nexus-oss/languages","stargazers_url":"https://api.github.com/repos/sonatype/nexus-oss/stargazers","contributors_url":"https://api.github.com/repos/sonatype/nexus-oss/contributors","subscribers_url":"https://api.github.com/repos/sonatype/nexus-oss/subscribers","subscription_url":"https://api.github.com/repos/sonatype/nexus-oss/subscription","commits_url":"https://api.github.com/repos/sonatype/nexus-oss/commits{/sha}","git_commits_url":"https://api.github.com/repos/sonatype/nexus-oss/git/commits{/sha}","comments_url":"https://api.github.com/repos/sonatype/nexus-oss/comments{/number}","issue_comment_url":"https://api.github.com/repos/sonatype/nexus-oss/issues/comments/{number}","contents_url":"https://api.github.com/repos/sonatype/nexus-oss/contents/{+path}","compare_url":"https://api.github.com/repos/sonatype/nexus-oss/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sonatype/nexus-oss/merges","archive_url":"https://api.github.com/repos/sonatype/nexus-oss/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sonatype/nexus-oss/downloads","issues_url":"https://api.github.com/repos/sonatype/nexus-oss/issues{/number}","pulls_url":"https://api.github.com/repos/sonatype/nexus-oss/pulls{/number}","milestones_url":"https://api.github.com/repos/sonatype/nexus-oss/milestones{/number}","notifications_url":"https://api.github.com/repos/sonatype/nexus-oss/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sonatype/nexus-oss/labels{/name}","releases_url":"https://api.github.com/repos/sonatype/nexus-oss/releases{/id}","created_at":"2013-05-18T20:48:57Z","updated_at":"2014-07-05T19:03:42Z","pushed_at":"2014-07-08T23:19:49Z","git_url":"git://github.com/sonatype/nexus-oss.git","ssh_url":"git@github.com:sonatype/nexus-oss.git","clone_url":"https://github.com/sonatype/nexus-oss.git","svn_url":"https://github.com/sonatype/nexus-oss","homepage":"http://links.sonatype.com/products/nexus/oss/home","size":674786,"stargazers_count":81,"watchers_count":81,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":52,"mirror_url":null,"open_issues_count":17,"forks":52,"open_issues":17,"watchers":81,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sonatype/nexus-oss/pulls/611"},"html":{"href":"https://github.com/sonatype/nexus-oss/pull/611"},"issue":{"href":"https://api.github.com/repos/sonatype/nexus-oss/issues/611"},"comments":{"href":"https://api.github.com/repos/sonatype/nexus-oss/issues/611/comments"},"review_comments":{"href":"https://api.github.com/repos/sonatype/nexus-oss/pulls/611/comments"},"review_comment":{"href":"https://api.github.com/repos/sonatype/nexus-oss/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/sonatype/nexus-oss/pulls/611/commits"},"statuses":{"href":"https://api.github.com/repos/sonatype/nexus-oss/statuses/de97a3aa5069b1835f531625776053dbbc766bb1"}}}}