{"action":"created","comment":{"url":"https://api.github.com/repos/pingcap/go-hbase/pulls/comments/47508771","id":47508771,"diff_hunk":"@@ -273,3 +274,61 @@ func (c *client) TableExists(tbl string) (bool, error) {\n \n \treturn found, nil\n }\n+\n+// Split split region\n+// tblOrRegion table name or region(<tbl>,<endKey>,<timestamp>.<md5>)\n+// splitPoint split point which is a key, leave \"\" if want to split automatically\n+func (c *client) Split(tblOrRegion, splitPoint string) error {\n+\t// extract table name from supposing regionName\n+\ttbls := strings.SplitN(tblOrRegion, \",\", 2)\n+\ttbl := tbls[0]\n+\tfound := false\n+\tvar foundRegion *RegionInfo\n+\tc.metaScan(tbl, func(region *RegionInfo) (bool, error) {\n+\t\tif region != nil && region.Name == tblOrRegion {\n+\t\t\tfound = true\n+\t\t\tfoundRegion = region\n+\t\t\treturn false, nil\n+\t\t}\n+\t\treturn true, nil\n+\t})\n+\t// this is a region name, split it directly\n+\tif found {\n+\t\treturn c.split(foundRegion, []byte(splitPoint))\n+\t}\n+\t// this may be a table name\n+\ttbl = tblOrRegion\n+\tregions, err := c.GetRegions([]byte(tbl), false)\n+\tif err != nil {\n+\t\treturn errors.Trace(err)\n+\t}\n+\t// split all region\n+\tfor _, region := range regions {\n+\t\terr := c.split(region, []byte(splitPoint))\n+\t\tif err != nil {\n+\t\t\treturn err","path":"admin.go","position":53,"original_position":53,"commit_id":"5d32423acfef1d8fbefcdc02d076fb60c6ee04b9","original_commit_id":"5d32423acfef1d8fbefcdc02d076fb60c6ee04b9","user":{"login":"qiuyesuifeng","id":1953644,"avatar_url":"https://avatars.githubusercontent.com/u/1953644?v=3","gravatar_id":"","url":"https://api.github.com/users/qiuyesuifeng","html_url":"https://github.com/qiuyesuifeng","followers_url":"https://api.github.com/users/qiuyesuifeng/followers","following_url":"https://api.github.com/users/qiuyesuifeng/following{/other_user}","gists_url":"https://api.github.com/users/qiuyesuifeng/gists{/gist_id}","starred_url":"https://api.github.com/users/qiuyesuifeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qiuyesuifeng/subscriptions","organizations_url":"https://api.github.com/users/qiuyesuifeng/orgs","repos_url":"https://api.github.com/users/qiuyesuifeng/repos","events_url":"https://api.github.com/users/qiuyesuifeng/events{/privacy}","received_events_url":"https://api.github.com/users/qiuyesuifeng/received_events","type":"User","site_admin":false},"body":"errors.Trace(err)","created_at":"2015-12-14T15:18:08Z","updated_at":"2015-12-14T15:18:08Z","html_url":"https://github.com/pingcap/go-hbase/pull/7#discussion_r47508771","pull_request_url":"https://api.github.com/repos/pingcap/go-hbase/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/pingcap/go-hbase/pulls/comments/47508771"},"html":{"href":"https://github.com/pingcap/go-hbase/pull/7#discussion_r47508771"},"pull_request":{"href":"https://api.github.com/repos/pingcap/go-hbase/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/pingcap/go-hbase/pulls/7","id":53527658,"html_url":"https://github.com/pingcap/go-hbase/pull/7","diff_url":"https://github.com/pingcap/go-hbase/pull/7.diff","patch_url":"https://github.com/pingcap/go-hbase/pull/7.patch","issue_url":"https://api.github.com/repos/pingcap/go-hbase/issues/7","number":7,"state":"open","locked":false,"title":"add region split","user":{"login":"morefreeze","id":1477233,"avatar_url":"https://avatars.githubusercontent.com/u/1477233?v=3","gravatar_id":"","url":"https://api.github.com/users/morefreeze","html_url":"https://github.com/morefreeze","followers_url":"https://api.github.com/users/morefreeze/followers","following_url":"https://api.github.com/users/morefreeze/following{/other_user}","gists_url":"https://api.github.com/users/morefreeze/gists{/gist_id}","starred_url":"https://api.github.com/users/morefreeze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morefreeze/subscriptions","organizations_url":"https://api.github.com/users/morefreeze/orgs","repos_url":"https://api.github.com/users/morefreeze/repos","events_url":"https://api.github.com/users/morefreeze/events{/privacy}","received_events_url":"https://api.github.com/users/morefreeze/received_events","type":"User","site_admin":false},"body":"Add region Split function.\r\nAdd ServiceType, because connection need divide into some type.\r\n@c4pt0r @qiuyesuifeng PTAL","created_at":"2015-12-14T06:05:22Z","updated_at":"2015-12-14T15:18:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3e3e93f617c58c974949861d54ff94d9dd4121cf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pingcap/go-hbase/pulls/7/commits","review_comments_url":"https://api.github.com/repos/pingcap/go-hbase/pulls/7/comments","review_comment_url":"https://api.github.com/repos/pingcap/go-hbase/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pingcap/go-hbase/issues/7/comments","statuses_url":"https://api.github.com/repos/pingcap/go-hbase/statuses/5d32423acfef1d8fbefcdc02d076fb60c6ee04b9","head":{"label":"pingcap:morefreeze/add_split","ref":"morefreeze/add_split","sha":"5d32423acfef1d8fbefcdc02d076fb60c6ee04b9","user":{"login":"pingcap","id":11855343,"avatar_url":"https://avatars.githubusercontent.com/u/11855343?v=3","gravatar_id":"","url":"https://api.github.com/users/pingcap","html_url":"https://github.com/pingcap","followers_url":"https://api.github.com/users/pingcap/followers","following_url":"https://api.github.com/users/pingcap/following{/other_user}","gists_url":"https://api.github.com/users/pingcap/gists{/gist_id}","starred_url":"https://api.github.com/users/pingcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingcap/subscriptions","organizations_url":"https://api.github.com/users/pingcap/orgs","repos_url":"https://api.github.com/users/pingcap/repos","events_url":"https://api.github.com/users/pingcap/events{/privacy}","received_events_url":"https://api.github.com/users/pingcap/received_events","type":"Organization","site_admin":false},"repo":{"id":45165325,"name":"go-hbase","full_name":"pingcap/go-hbase","owner":{"login":"pingcap","id":11855343,"avatar_url":"https://avatars.githubusercontent.com/u/11855343?v=3","gravatar_id":"","url":"https://api.github.com/users/pingcap","html_url":"https://github.com/pingcap","followers_url":"https://api.github.com/users/pingcap/followers","following_url":"https://api.github.com/users/pingcap/following{/other_user}","gists_url":"https://api.github.com/users/pingcap/gists{/gist_id}","starred_url":"https://api.github.com/users/pingcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingcap/subscriptions","organizations_url":"https://api.github.com/users/pingcap/orgs","repos_url":"https://api.github.com/users/pingcap/repos","events_url":"https://api.github.com/users/pingcap/events{/privacy}","received_events_url":"https://api.github.com/users/pingcap/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pingcap/go-hbase","description":"Native Go client for HBase","fork":true,"url":"https://api.github.com/repos/pingcap/go-hbase","forks_url":"https://api.github.com/repos/pingcap/go-hbase/forks","keys_url":"https://api.github.com/repos/pingcap/go-hbase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pingcap/go-hbase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pingcap/go-hbase/teams","hooks_url":"https://api.github.com/repos/pingcap/go-hbase/hooks","issue_events_url":"https://api.github.com/repos/pingcap/go-hbase/issues/events{/number}","events_url":"https://api.github.com/repos/pingcap/go-hbase/events","assignees_url":"https://api.github.com/repos/pingcap/go-hbase/assignees{/user}","branches_url":"https://api.github.com/repos/pingcap/go-hbase/branches{/branch}","tags_url":"https://api.github.com/repos/pingcap/go-hbase/tags","blobs_url":"https://api.github.com/repos/pingcap/go-hbase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pingcap/go-hbase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pingcap/go-hbase/git/refs{/sha}","trees_url":"https://api.github.com/repos/pingcap/go-hbase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pingcap/go-hbase/statuses/{sha}","languages_url":"https://api.github.com/repos/pingcap/go-hbase/languages","stargazers_url":"https://api.github.com/repos/pingcap/go-hbase/stargazers","contributors_url":"https://api.github.com/repos/pingcap/go-hbase/contributors","subscribers_url":"https://api.github.com/repos/pingcap/go-hbase/subscribers","subscription_url":"https://api.github.com/repos/pingcap/go-hbase/subscription","commits_url":"https://api.github.com/repos/pingcap/go-hbase/commits{/sha}","git_commits_url":"https://api.github.com/repos/pingcap/go-hbase/git/commits{/sha}","comments_url":"https://api.github.com/repos/pingcap/go-hbase/comments{/number}","issue_comment_url":"https://api.github.com/repos/pingcap/go-hbase/issues/comments{/number}","contents_url":"https://api.github.com/repos/pingcap/go-hbase/contents/{+path}","compare_url":"https://api.github.com/repos/pingcap/go-hbase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pingcap/go-hbase/merges","archive_url":"https://api.github.com/repos/pingcap/go-hbase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pingcap/go-hbase/downloads","issues_url":"https://api.github.com/repos/pingcap/go-hbase/issues{/number}","pulls_url":"https://api.github.com/repos/pingcap/go-hbase/pulls{/number}","milestones_url":"https://api.github.com/repos/pingcap/go-hbase/milestones{/number}","notifications_url":"https://api.github.com/repos/pingcap/go-hbase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pingcap/go-hbase/labels{/name}","releases_url":"https://api.github.com/repos/pingcap/go-hbase/releases{/id}","created_at":"2015-10-29T06:44:59Z","updated_at":"2015-12-08T02:13:34Z","pushed_at":"2015-12-14T07:06:54Z","git_url":"git://github.com/pingcap/go-hbase.git","ssh_url":"git@github.com:pingcap/go-hbase.git","clone_url":"https://github.com/pingcap/go-hbase.git","svn_url":"https://github.com/pingcap/go-hbase","homepage":"","size":218,"stargazers_count":1,"watchers_count":1,"language":"Protocol Buffer","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"pingcap:master","ref":"master","sha":"77bded8653e2ce1a41faa4b71deeff7b47b06931","user":{"login":"pingcap","id":11855343,"avatar_url":"https://avatars.githubusercontent.com/u/11855343?v=3","gravatar_id":"","url":"https://api.github.com/users/pingcap","html_url":"https://github.com/pingcap","followers_url":"https://api.github.com/users/pingcap/followers","following_url":"https://api.github.com/users/pingcap/following{/other_user}","gists_url":"https://api.github.com/users/pingcap/gists{/gist_id}","starred_url":"https://api.github.com/users/pingcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingcap/subscriptions","organizations_url":"https://api.github.com/users/pingcap/orgs","repos_url":"https://api.github.com/users/pingcap/repos","events_url":"https://api.github.com/users/pingcap/events{/privacy}","received_events_url":"https://api.github.com/users/pingcap/received_events","type":"Organization","site_admin":false},"repo":{"id":45165325,"name":"go-hbase","full_name":"pingcap/go-hbase","owner":{"login":"pingcap","id":11855343,"avatar_url":"https://avatars.githubusercontent.com/u/11855343?v=3","gravatar_id":"","url":"https://api.github.com/users/pingcap","html_url":"https://github.com/pingcap","followers_url":"https://api.github.com/users/pingcap/followers","following_url":"https://api.github.com/users/pingcap/following{/other_user}","gists_url":"https://api.github.com/users/pingcap/gists{/gist_id}","starred_url":"https://api.github.com/users/pingcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingcap/subscriptions","organizations_url":"https://api.github.com/users/pingcap/orgs","repos_url":"https://api.github.com/users/pingcap/repos","events_url":"https://api.github.com/users/pingcap/events{/privacy}","received_events_url":"https://api.github.com/users/pingcap/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pingcap/go-hbase","description":"Native Go client for HBase","fork":true,"url":"https://api.github.com/repos/pingcap/go-hbase","forks_url":"https://api.github.com/repos/pingcap/go-hbase/forks","keys_url":"https://api.github.com/repos/pingcap/go-hbase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pingcap/go-hbase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pingcap/go-hbase/teams","hooks_url":"https://api.github.com/repos/pingcap/go-hbase/hooks","issue_events_url":"https://api.github.com/repos/pingcap/go-hbase/issues/events{/number}","events_url":"https://api.github.com/repos/pingcap/go-hbase/events","assignees_url":"https://api.github.com/repos/pingcap/go-hbase/assignees{/user}","branches_url":"https://api.github.com/repos/pingcap/go-hbase/branches{/branch}","tags_url":"https://api.github.com/repos/pingcap/go-hbase/tags","blobs_url":"https://api.github.com/repos/pingcap/go-hbase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pingcap/go-hbase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pingcap/go-hbase/git/refs{/sha}","trees_url":"https://api.github.com/repos/pingcap/go-hbase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pingcap/go-hbase/statuses/{sha}","languages_url":"https://api.github.com/repos/pingcap/go-hbase/languages","stargazers_url":"https://api.github.com/repos/pingcap/go-hbase/stargazers","contributors_url":"https://api.github.com/repos/pingcap/go-hbase/contributors","subscribers_url":"https://api.github.com/repos/pingcap/go-hbase/subscribers","subscription_url":"https://api.github.com/repos/pingcap/go-hbase/subscription","commits_url":"https://api.github.com/repos/pingcap/go-hbase/commits{/sha}","git_commits_url":"https://api.github.com/repos/pingcap/go-hbase/git/commits{/sha}","comments_url":"https://api.github.com/repos/pingcap/go-hbase/comments{/number}","issue_comment_url":"https://api.github.com/repos/pingcap/go-hbase/issues/comments{/number}","contents_url":"https://api.github.com/repos/pingcap/go-hbase/contents/{+path}","compare_url":"https://api.github.com/repos/pingcap/go-hbase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pingcap/go-hbase/merges","archive_url":"https://api.github.com/repos/pingcap/go-hbase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pingcap/go-hbase/downloads","issues_url":"https://api.github.com/repos/pingcap/go-hbase/issues{/number}","pulls_url":"https://api.github.com/repos/pingcap/go-hbase/pulls{/number}","milestones_url":"https://api.github.com/repos/pingcap/go-hbase/milestones{/number}","notifications_url":"https://api.github.com/repos/pingcap/go-hbase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pingcap/go-hbase/labels{/name}","releases_url":"https://api.github.com/repos/pingcap/go-hbase/releases{/id}","created_at":"2015-10-29T06:44:59Z","updated_at":"2015-12-08T02:13:34Z","pushed_at":"2015-12-14T07:06:54Z","git_url":"git://github.com/pingcap/go-hbase.git","ssh_url":"git@github.com:pingcap/go-hbase.git","clone_url":"https://github.com/pingcap/go-hbase.git","svn_url":"https://github.com/pingcap/go-hbase","homepage":"","size":218,"stargazers_count":1,"watchers_count":1,"language":"Protocol Buffer","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pingcap/go-hbase/pulls/7"},"html":{"href":"https://github.com/pingcap/go-hbase/pull/7"},"issue":{"href":"https://api.github.com/repos/pingcap/go-hbase/issues/7"},"comments":{"href":"https://api.github.com/repos/pingcap/go-hbase/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/pingcap/go-hbase/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/pingcap/go-hbase/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pingcap/go-hbase/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/pingcap/go-hbase/statuses/5d32423acfef1d8fbefcdc02d076fb60c6ee04b9"}}}}