[
https://issues.apache.org/jira/browse/GORA-34?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13257442#comment-13257442
]
Ferdy Galema commented on GORA-34:
----------------------------------
This is pretty difficult to implement seeing the whole is now implemented in a
bean/pojo-like manner. I'm not sure if it is the right way to go to implement
lazy loading in a manner that a every key is requested from HBase. (Is this
what you are suggesting?).
If you know what keys to retrieve in advance you can always specify those more
specifically on the input. I.e. instead of "data" you specify "data:key1,
data:key2" etc.
> Lazy loading for maps
> ---------------------
>
> Key: GORA-34
> URL: https://issues.apache.org/jira/browse/GORA-34
> Project: Apache Gora
> Issue Type: Improvement
> Components: storage-hbase
> Reporter: Yves Langisch
> Fix For: 0.3
>
>
> I mainly use a big map for each row in my hbase project. So my avro schema
> looks as follows:
> {
> "type": "record",
> "name": "Request",
> "namespace": "ch.test.generated",
> "fields" : [
> {
> "name": "data",
> "type": {
> "type": "map",
> "values": "long"
> }
> }
> ]
> }
> As far as I could see the whole map is read from hbase whenever I get a row.
> Since I'm adding many map entries over time I would like to see some kind of
> lazy loading when accessing the map. A good place to specify this behavior
> would be the mapping file:
> <gora-orm>
> <class name="ch.test.generated.Request" keyClass="java.lang.Long"
> table="RequestLog">
> <field name="data" family="dimension" lazy="true"/>
> </class>
> </gora-orm>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira