{"action":"created","issue":{"url":"https://api.github.com/repos/GiraffaFS/giraffa/issues/209","repository_url":"https://api.github.com/repos/GiraffaFS/giraffa","labels_url":"https://api.github.com/repos/GiraffaFS/giraffa/issues/209/labels{/name}","comments_url":"https://api.github.com/repos/GiraffaFS/giraffa/issues/209/comments","events_url":"https://api.github.com/repos/GiraffaFS/giraffa/issues/209/events","html_url":"https://github.com/GiraffaFS/giraffa/issues/209","id":127898068,"number":209,"title":"Support RowKeyFactory service protocols","user":{"login":"milandesai","id":3289941,"avatar_url":"https://avatars.githubusercontent.com/u/3289941?v=3","gravatar_id":"","url":"https://api.github.com/users/milandesai","html_url":"https://github.com/milandesai","followers_url":"https://api.github.com/users/milandesai/followers","following_url":"https://api.github.com/users/milandesai/following{/other_user}","gists_url":"https://api.github.com/users/milandesai/gists{/gist_id}","starred_url":"https://api.github.com/users/milandesai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milandesai/subscriptions","organizations_url":"https://api.github.com/users/milandesai/orgs","repos_url":"https://api.github.com/users/milandesai/repos","events_url":"https://api.github.com/users/milandesai/events{/privacy}","received_events_url":"https://api.github.com/users/milandesai/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GiraffaFS/giraffa/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"milandesai","id":3289941,"avatar_url":"https://avatars.githubusercontent.com/u/3289941?v=3","gravatar_id":"","url":"https://api.github.com/users/milandesai","html_url":"https://github.com/milandesai","followers_url":"https://api.github.com/users/milandesai/followers","following_url":"https://api.github.com/users/milandesai/following{/other_user}","gists_url":"https://api.github.com/users/milandesai/gists{/gist_id}","starred_url":"https://api.github.com/users/milandesai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milandesai/subscriptions","organizations_url":"https://api.github.com/users/milandesai/orgs","repos_url":"https://api.github.com/users/milandesai/repos","events_url":"https://api.github.com/users/milandesai/events{/privacy}","received_events_url":"https://api.github.com/users/milandesai/received_events","type":"User","site_admin":false},"assignees":[{"login":"milandesai","id":3289941,"avatar_url":"https://avatars.githubusercontent.com/u/3289941?v=3","gravatar_id":"","url":"https://api.github.com/users/milandesai","html_url":"https://github.com/milandesai","followers_url":"https://api.github.com/users/milandesai/followers","following_url":"https://api.github.com/users/milandesai/following{/other_user}","gists_url":"https://api.github.com/users/milandesai/gists{/gist_id}","starred_url":"https://api.github.com/users/milandesai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milandesai/subscriptions","organizations_url":"https://api.github.com/users/milandesai/orgs","repos_url":"https://api.github.com/users/milandesai/repos","events_url":"https://api.github.com/users/milandesai/events{/privacy}","received_events_url":"https://api.github.com/users/milandesai/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/GiraffaFS/giraffa/milestones/3","html_url":"https://github.com/GiraffaFS/giraffa/milestones/0.4.0%20release","labels_url":"https://api.github.com/repos/GiraffaFS/giraffa/milestones/3/labels","id":2061200,"number":3,"title":"0.4.0 release","description":"","creator":{"login":"shvachko","id":11998604,"avatar_url":"https://avatars.githubusercontent.com/u/11998604?v=3","gravatar_id":"","url":"https://api.github.com/users/shvachko","html_url":"https://github.com/shvachko","followers_url":"https://api.github.com/users/shvachko/followers","following_url":"https://api.github.com/users/shvachko/following{/other_user}","gists_url":"https://api.github.com/users/shvachko/gists{/gist_id}","starred_url":"https://api.github.com/users/shvachko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shvachko/subscriptions","organizations_url":"https://api.github.com/users/shvachko/orgs","repos_url":"https://api.github.com/users/shvachko/repos","events_url":"https://api.github.com/users/shvachko/events{/privacy}","received_events_url":"https://api.github.com/users/shvachko/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":2,"state":"open","created_at":"2016-10-11T05:19:11Z","updated_at":"2016-10-17T00:00:37Z","due_on":null,"closed_at":null},"comments":15,"created_at":"2016-01-21T10:54:07Z","updated_at":"2016-10-25T06:28:35Z","closed_at":null,"body":"Part of #34. I was looking into adding a FileIdProtocol which would be used by the FileIdRowKey, and I noticed the RowKeyFactory interface still lacks support of independent RPC protocols that users can implement and configure. Assuming the user creates some RPC protocol using protobuf, we need to register the service with the coprocessor and provide the necessary RPC channel to connect to it.  This means:\r\n\r\n1. The RowKeyFactory needs to provide a com.google.protobuf.Service object that the NamespaceProcessor can register as part of its coprocessor. It can be null in the case of FullPathRowKeyFactory. This is the server-side implementation of the protocol.\r\n\r\n2. The RowKeyFactory needs to be able to generate a RpcChannel connected to the coprocessor based on the row key. That will provide client access to the protocol. For now, I supply the Table reference to the factory. The table reference can also be used on the server side to construct an INodeManager for the protocol implementation.\r\n\r\nTogether, this leads me to introduce 2 fields in RowKeyFactory: com.google.protobuf.Service, which is set by the subclass itself, and Table. Together, those are enough to allow any external RowKey implementation to introduce a protocol. That also means we don't need the \\<S> generic in RowKeyFactory. Currently, it represents the protocol interface, but Giraffa doesn't need this interface; it needs the protobuf.Service reference. Since Giraffa doesn't need to know anything about it, it makes sense to remove it. I am attaching a patch; let me know what you think."},"comment":{"url":"https://api.github.com/repos/GiraffaFS/giraffa/issues/comments/255948208","html_url":"https://github.com/GiraffaFS/giraffa/issues/209#issuecomment-255948208","issue_url":"https://api.github.com/repos/GiraffaFS/giraffa/issues/209","id":255948208,"user":{"login":"milandesai","id":3289941,"avatar_url":"https://avatars.githubusercontent.com/u/3289941?v=3","gravatar_id":"","url":"https://api.github.com/users/milandesai","html_url":"https://github.com/milandesai","followers_url":"https://api.github.com/users/milandesai/followers","following_url":"https://api.github.com/users/milandesai/following{/other_user}","gists_url":"https://api.github.com/users/milandesai/gists{/gist_id}","starred_url":"https://api.github.com/users/milandesai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milandesai/subscriptions","organizations_url":"https://api.github.com/users/milandesai/orgs","repos_url":"https://api.github.com/users/milandesai/repos","events_url":"https://api.github.com/users/milandesai/events{/privacy}","received_events_url":"https://api.github.com/users/milandesai/received_events","type":"User","site_admin":false},"created_at":"2016-10-25T06:28:35Z","updated_at":"2016-10-25T06:28:35Z","body":"Thanks Konstantin, I see what you mean. You mentioned that one possibility is using an interface in lieu of FileIdAgent. That is a good point, as FileIdAgent is already an implementation of the interface FileIdProtocol, which can be moved out of the hbase package as it has no hbase dependencies. So we could replace FileIdAgent with FileIdProtocol in FileIdRowKey.\r\n\r\nOne thing though, where should we construct the actual FileIdAgent? Would it be okay to construct it in FileIdRowKeyFactory, or should that also be free of *.giraffa.hbase dependencies?"}}
{"actor":{"display_login":"milandesai"}}