You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2011/09/08 19:22:08 UTC

[jira] [Created] (HBASE-4353) Create VersionedWritable interface that allows a class version and an instance version

Create VersionedWritable interface that allows a class version and an instance version
--------------------------------------------------------------------------------------

                 Key: HBASE-4353
                 URL: https://issues.apache.org/jira/browse/HBASE-4353
             Project: HBase
          Issue Type: New Feature
            Reporter: Ted Yu


Here is comment from Lars (HBASE-2195):

When we did versioning for a project I used to work on a long time ago, we had maintained a class version *and* an instance version. We might need both.
The class should know which version it is, but also it is useful in many scenarios to ask the instance what specific version it is on.

I.e. we need an interface with two methods: One to get the class version, one to get the instance version.

This would apply to HLogKey which is able to read entries without explicit version.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4353) Create VersionedWritable interface that allows a class version and an instance version

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13102392#comment-13102392 ] 

Lars Hofhansl commented on HBASE-4353:
--------------------------------------

Now that I think about it. The static class version should not need to visible outside of the versioned object. I.e. the class should know internally what version is supports, but outside code only needs to know about the instance version (if at all), unless we deal with loadable jars, where the surrounding code may need to determine the static version the class is at.

That is actually what bothers me about VersionedWritable, that getVersion() needs to be return the class version of it to work correctly.


> Create VersionedWritable interface that allows a class version and an instance version
> --------------------------------------------------------------------------------------
>
>                 Key: HBASE-4353
>                 URL: https://issues.apache.org/jira/browse/HBASE-4353
>             Project: HBase
>          Issue Type: New Feature
>            Reporter: Ted Yu
>
> Here is comment from Lars (HBASE-2195):
> When we did versioning for a project I used to work on a long time ago, we had maintained a class version *and* an instance version. We might need both.
> The class should know which version it is, but also it is useful in many scenarios to ask the instance what specific version it is on.
> I.e. we need an interface with two methods: One to get the class version, one to get the instance version.
> This would apply to HLogKey which is able to read entries without explicit version.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4353) Create VersionedWritable interface that allows a class version and an instance version

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13100532#comment-13100532 ] 

Ted Yu commented on HBASE-4353:
-------------------------------

I think DoubleVersionedWritable may not be a good name.
We can name the interface WritableWithVersions. Since it lives inside org.apache.hadoop.hbase namespace, it is easy to distinguish with VersionedWritable.

If HLogKey only implements this interface, there is no hurry in creating the abstract class.
In fact, I am not sure the abstract class should assume version being a byte.

> Create VersionedWritable interface that allows a class version and an instance version
> --------------------------------------------------------------------------------------
>
>                 Key: HBASE-4353
>                 URL: https://issues.apache.org/jira/browse/HBASE-4353
>             Project: HBase
>          Issue Type: New Feature
>            Reporter: Ted Yu
>
> Here is comment from Lars (HBASE-2195):
> When we did versioning for a project I used to work on a long time ago, we had maintained a class version *and* an instance version. We might need both.
> The class should know which version it is, but also it is useful in many scenarios to ask the instance what specific version it is on.
> I.e. we need an interface with two methods: One to get the class version, one to get the instance version.
> This would apply to HLogKey which is able to read entries without explicit version.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4353) Create VersionedWritable interface that allows a class version and an instance version

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13100513#comment-13100513 ] 

Lars Hofhansl commented on HBASE-4353:
--------------------------------------

I guess we could have interface with getVersion() and getInstanceVersion(). Or maybe getClassVersion() and getInstanceVersion().
Then an abstract implementation (getVersion or getClassVersion would be the abstract method) of that interface pretty close to what VersionedWritable does. That class would also implement Writable.

In the HLogKey case, it would not subclass the abstract class, but just implement the interface.

If that's the route we want to take... Need to come up with good names for the interface and the abstract class.
And should existing versioned things (HRegion, WALEdit, etc, etc) be refactored into this?

(Just brainstorming here :) )

> Create VersionedWritable interface that allows a class version and an instance version
> --------------------------------------------------------------------------------------
>
>                 Key: HBASE-4353
>                 URL: https://issues.apache.org/jira/browse/HBASE-4353
>             Project: HBase
>          Issue Type: New Feature
>            Reporter: Ted Yu
>
> Here is comment from Lars (HBASE-2195):
> When we did versioning for a project I used to work on a long time ago, we had maintained a class version *and* an instance version. We might need both.
> The class should know which version it is, but also it is useful in many scenarios to ask the instance what specific version it is on.
> I.e. we need an interface with two methods: One to get the class version, one to get the instance version.
> This would apply to HLogKey which is able to read entries without explicit version.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4353) Create VersionedWritable interface that allows a class version and an instance version

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13100546#comment-13100546 ] 

Lars Hofhansl commented on HBASE-4353:
--------------------------------------

Version could be a vint.

> Create VersionedWritable interface that allows a class version and an instance version
> --------------------------------------------------------------------------------------
>
>                 Key: HBASE-4353
>                 URL: https://issues.apache.org/jira/browse/HBASE-4353
>             Project: HBase
>          Issue Type: New Feature
>            Reporter: Ted Yu
>
> Here is comment from Lars (HBASE-2195):
> When we did versioning for a project I used to work on a long time ago, we had maintained a class version *and* an instance version. We might need both.
> The class should know which version it is, but also it is useful in many scenarios to ask the instance what specific version it is on.
> I.e. we need an interface with two methods: One to get the class version, one to get the instance version.
> This would apply to HLogKey which is able to read entries without explicit version.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira