{"action":"created","comment":{"url":"https://api.github.com/repos/intel-analytics/analytics-zoo/pulls/comments/242031426","pull_request_review_id":185445768,"id":242031426,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MjAzMTQyNg==","diff_hunk":"@@ -0,0 +1,58 @@\n+/*\n+ * Copyright 2018 Analytics Zoo Authors.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may 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, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package com.intel.analytics.zoo.persistent.memory\n+\n+import com.intel.analytics.zoo.feature.common.persistent.memory.MemoryAllocator\n+\n+sealed trait MemoryType\n+\n+case object OptaneDC extends MemoryType\n+\n+case object DRAM extends MemoryType\n+\n+/**\n+ *\n+ * @param totalBytes\n+ */\n+abstract class NativeArray[T](totalBytes: Long, memoryType: MemoryType) {\n+\n+  val memoryAllocator = MemoryAllocator.getInstance(memoryType)\n+\n+  val startAddr: Long = memoryAllocator.allocate(totalBytes)\n+\n+  assert(startAddr > 0, \"Not enough memory!\")\n+  assert(totalBytes > 0, \"The size of bytes should be larger than 0!\")","path":"zoo/src/main/java/com/intel/analytics/zoo/persistent/memory/NativeArray.scala","position":38,"original_position":38,"commit_id":"09852edc04c2925b77b632ae4b349f8e69e25318","original_commit_id":"09852edc04c2925b77b632ae4b349f8e69e25318","user":{"login":"jason-dai","id":1931082,"node_id":"MDQ6VXNlcjE5MzEwODI=","avatar_url":"https://avatars3.githubusercontent.com/u/1931082?v=4","gravatar_id":"","url":"https://api.github.com/users/jason-dai","html_url":"https://github.com/jason-dai","followers_url":"https://api.github.com/users/jason-dai/followers","following_url":"https://api.github.com/users/jason-dai/following{/other_user}","gists_url":"https://api.github.com/users/jason-dai/gists{/gist_id}","starred_url":"https://api.github.com/users/jason-dai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jason-dai/subscriptions","organizations_url":"https://api.github.com/users/jason-dai/orgs","repos_url":"https://api.github.com/users/jason-dai/repos","events_url":"https://api.github.com/users/jason-dai/events{/privacy}","received_events_url":"https://api.github.com/users/jason-dai/received_events","type":"User","site_admin":false},"body":"we should check this before allocation; and also add more details in the error message.","created_at":"2018-12-17T05:49:00Z","updated_at":"2018-12-17T05:49:00Z","html_url":"https://github.com/intel-analytics/analytics-zoo/pull/979#discussion_r242031426","pull_request_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/pulls/979","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/intel-analytics/analytics-zoo/pulls/comments/242031426"},"html":{"href":"https://github.com/intel-analytics/analytics-zoo/pull/979#discussion_r242031426"},"pull_request":{"href":"https://api.github.com/repos/intel-analytics/analytics-zoo/pulls/979"}}},"pull_request":{"url":"https://api.github.com/repos/intel-analytics/analytics-zoo/pulls/979","id":235360920,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1MzYwOTIw","html_url":"https://github.com/intel-analytics/analytics-zoo/pull/979","diff_url":"https://github.com/intel-analytics/analytics-zoo/pull/979.diff","patch_url":"https://github.com/intel-analytics/analytics-zoo/pull/979.patch","issue_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/issues/979","number":979,"state":"open","locked":false,"title":"DCPMM","user":{"login":"zhichao-li","id":2662017,"node_id":"MDQ6VXNlcjI2NjIwMTc=","avatar_url":"https://avatars3.githubusercontent.com/u/2662017?v=4","gravatar_id":"","url":"https://api.github.com/users/zhichao-li","html_url":"https://github.com/zhichao-li","followers_url":"https://api.github.com/users/zhichao-li/followers","following_url":"https://api.github.com/users/zhichao-li/following{/other_user}","gists_url":"https://api.github.com/users/zhichao-li/gists{/gist_id}","starred_url":"https://api.github.com/users/zhichao-li/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhichao-li/subscriptions","organizations_url":"https://api.github.com/users/zhichao-li/orgs","repos_url":"https://api.github.com/users/zhichao-li/repos","events_url":"https://api.github.com/users/zhichao-li/events{/privacy}","received_events_url":"https://api.github.com/users/zhichao-li/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-12-03T08:21:38Z","updated_at":"2018-12-17T05:49:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0c4da0622d60fe60e7e03b1b1dfd4d29aa08ae30","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/pulls/979/commits","review_comments_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/pulls/979/comments","review_comment_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/issues/979/comments","statuses_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/statuses/09852edc04c2925b77b632ae4b349f8e69e25318","head":{"label":"zhichao-li:dcpmm0","ref":"dcpmm0","sha":"09852edc04c2925b77b632ae4b349f8e69e25318","user":{"login":"zhichao-li","id":2662017,"node_id":"MDQ6VXNlcjI2NjIwMTc=","avatar_url":"https://avatars3.githubusercontent.com/u/2662017?v=4","gravatar_id":"","url":"https://api.github.com/users/zhichao-li","html_url":"https://github.com/zhichao-li","followers_url":"https://api.github.com/users/zhichao-li/followers","following_url":"https://api.github.com/users/zhichao-li/following{/other_user}","gists_url":"https://api.github.com/users/zhichao-li/gists{/gist_id}","starred_url":"https://api.github.com/users/zhichao-li/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhichao-li/subscriptions","organizations_url":"https://api.github.com/users/zhichao-li/orgs","repos_url":"https://api.github.com/users/zhichao-li/repos","events_url":"https://api.github.com/users/zhichao-li/events{/privacy}","received_events_url":"https://api.github.com/users/zhichao-li/received_events","type":"User","site_admin":false},"repo":{"id":132566623,"node_id":"MDEwOlJlcG9zaXRvcnkxMzI1NjY2MjM=","name":"analytics-zoo","full_name":"zhichao-li/analytics-zoo","private":false,"owner":{"login":"zhichao-li","id":2662017,"node_id":"MDQ6VXNlcjI2NjIwMTc=","avatar_url":"https://avatars3.githubusercontent.com/u/2662017?v=4","gravatar_id":"","url":"https://api.github.com/users/zhichao-li","html_url":"https://github.com/zhichao-li","followers_url":"https://api.github.com/users/zhichao-li/followers","following_url":"https://api.github.com/users/zhichao-li/following{/other_user}","gists_url":"https://api.github.com/users/zhichao-li/gists{/gist_id}","starred_url":"https://api.github.com/users/zhichao-li/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhichao-li/subscriptions","organizations_url":"https://api.github.com/users/zhichao-li/orgs","repos_url":"https://api.github.com/users/zhichao-li/repos","events_url":"https://api.github.com/users/zhichao-li/events{/privacy}","received_events_url":"https://api.github.com/users/zhichao-li/received_events","type":"User","site_admin":false},"html_url":"https://github.com/zhichao-li/analytics-zoo","description":"Analytics + AI Platform for Apache Spark and BigDL","fork":true,"url":"https://api.github.com/repos/zhichao-li/analytics-zoo","forks_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/forks","keys_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/teams","hooks_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/hooks","issue_events_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/issues/events{/number}","events_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/events","assignees_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/assignees{/user}","branches_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/branches{/branch}","tags_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/tags","blobs_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/git/refs{/sha}","trees_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/statuses/{sha}","languages_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/languages","stargazers_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/stargazers","contributors_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/contributors","subscribers_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/subscribers","subscription_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/subscription","commits_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/commits{/sha}","git_commits_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/git/commits{/sha}","comments_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/comments{/number}","issue_comment_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/issues/comments{/number}","contents_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/contents/{+path}","compare_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/merges","archive_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/downloads","issues_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/issues{/number}","pulls_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/pulls{/number}","milestones_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/milestones{/number}","notifications_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/labels{/name}","releases_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/releases{/id}","deployments_url":"https://api.github.com/repos/zhichao-li/analytics-zoo/deployments","created_at":"2018-05-08T06:49:34Z","updated_at":"2018-05-08T06:49:37Z","pushed_at":"2018-12-10T08:25:23Z","git_url":"git://github.com/zhichao-li/analytics-zoo.git","ssh_url":"git@github.com:zhichao-li/analytics-zoo.git","clone_url":"https://github.com/zhichao-li/analytics-zoo.git","svn_url":"https://github.com/zhichao-li/analytics-zoo","homepage":"","size":189198,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"intel-analytics:master","ref":"master","sha":"eaeb08346b1ff302a0f080500afae4b416da52c6","user":{"login":"intel-analytics","id":10941215,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwOTQxMjE1","avatar_url":"https://avatars3.githubusercontent.com/u/10941215?v=4","gravatar_id":"","url":"https://api.github.com/users/intel-analytics","html_url":"https://github.com/intel-analytics","followers_url":"https://api.github.com/users/intel-analytics/followers","following_url":"https://api.github.com/users/intel-analytics/following{/other_user}","gists_url":"https://api.github.com/users/intel-analytics/gists{/gist_id}","starred_url":"https://api.github.com/users/intel-analytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intel-analytics/subscriptions","organizations_url":"https://api.github.com/users/intel-analytics/orgs","repos_url":"https://api.github.com/users/intel-analytics/repos","events_url":"https://api.github.com/users/intel-analytics/events{/privacy}","received_events_url":"https://api.github.com/users/intel-analytics/received_events","type":"Organization","site_admin":false},"repo":{"id":90328920,"node_id":"MDEwOlJlcG9zaXRvcnk5MDMyODkyMA==","name":"analytics-zoo","full_name":"intel-analytics/analytics-zoo","private":false,"owner":{"login":"intel-analytics","id":10941215,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwOTQxMjE1","avatar_url":"https://avatars3.githubusercontent.com/u/10941215?v=4","gravatar_id":"","url":"https://api.github.com/users/intel-analytics","html_url":"https://github.com/intel-analytics","followers_url":"https://api.github.com/users/intel-analytics/followers","following_url":"https://api.github.com/users/intel-analytics/following{/other_user}","gists_url":"https://api.github.com/users/intel-analytics/gists{/gist_id}","starred_url":"https://api.github.com/users/intel-analytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intel-analytics/subscriptions","organizations_url":"https://api.github.com/users/intel-analytics/orgs","repos_url":"https://api.github.com/users/intel-analytics/repos","events_url":"https://api.github.com/users/intel-analytics/events{/privacy}","received_events_url":"https://api.github.com/users/intel-analytics/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/intel-analytics/analytics-zoo","description":"Distributed Tensorflow, Keras and BigDL on Apache Spark","fork":false,"url":"https://api.github.com/repos/intel-analytics/analytics-zoo","forks_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/forks","keys_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/teams","hooks_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/hooks","issue_events_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/issues/events{/number}","events_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/events","assignees_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/assignees{/user}","branches_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/branches{/branch}","tags_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/tags","blobs_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/git/refs{/sha}","trees_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/statuses/{sha}","languages_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/languages","stargazers_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/stargazers","contributors_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/contributors","subscribers_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/subscribers","subscription_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/subscription","commits_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/commits{/sha}","git_commits_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/git/commits{/sha}","comments_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/comments{/number}","issue_comment_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/issues/comments{/number}","contents_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/contents/{+path}","compare_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/merges","archive_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/downloads","issues_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/issues{/number}","pulls_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/pulls{/number}","milestones_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/milestones{/number}","notifications_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/labels{/name}","releases_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/releases{/id}","deployments_url":"https://api.github.com/repos/intel-analytics/analytics-zoo/deployments","created_at":"2017-05-05T02:27:30Z","updated_at":"2018-12-17T01:14:05Z","pushed_at":"2018-12-15T22:52:47Z","git_url":"git://github.com/intel-analytics/analytics-zoo.git","ssh_url":"git@github.com:intel-analytics/analytics-zoo.git","clone_url":"https://github.com/intel-analytics/analytics-zoo.git","svn_url":"https://github.com/intel-analytics/analytics-zoo","homepage":"https://analytics-zoo.github.io","size":184708,"stargazers_count":303,"watchers_count":303,"language":"Jupyter Notebook","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":121,"mirror_url":null,"archived":false,"open_issues_count":95,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":121,"open_issues":95,"watchers":303,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/intel-analytics/analytics-zoo/pulls/979"},"html":{"href":"https://github.com/intel-analytics/analytics-zoo/pull/979"},"issue":{"href":"https://api.github.com/repos/intel-analytics/analytics-zoo/issues/979"},"comments":{"href":"https://api.github.com/repos/intel-analytics/analytics-zoo/issues/979/comments"},"review_comments":{"href":"https://api.github.com/repos/intel-analytics/analytics-zoo/pulls/979/comments"},"review_comment":{"href":"https://api.github.com/repos/intel-analytics/analytics-zoo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/intel-analytics/analytics-zoo/pulls/979/commits"},"statuses":{"href":"https://api.github.com/repos/intel-analytics/analytics-zoo/statuses/09852edc04c2925b77b632ae4b349f8e69e25318"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jason-dai"}}