[
https://issues.apache.org/jira/browse/PIG-3067?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bill Graham updated PIG-3067:
-----------------------------
Status: Open (was: Patch Available)
Canceling this patch since it no longer applies cleanly. Cristoph would you
please regenerate it?
Overall I like the direction you're going. I'll review more once I can apply
and dig deeper but some initial thoughts based on skimming the diff...
Instead of initializing the load/store delegates directly in the
{{HBaseStorage}} constructor we should create overridable methods like
{{protected newHBaseLoadFunc(Settings settings)}} that just return a new
instance. This would allow others to subclass {{HBaseStorage}} to override that
method with one that initializes a custom load/store func subclass. Same for
the settings class. That way if someone wants to create a new setting and a new
bit of load or store func functionality they have extension points.
The {{HBaseLoadFunc}} and {{HBaseStoreFunc}} classes should be able to be used
individually if people want to. This would mean a string constructor like
{{HBaseStorage}}. {{HBaseStorage}} becomes just a facade then to the two
delegates.
Thanks for taking a pass at this refactor! This will help make this code base
more manageable.
> HBaseStorage should be split up to become more managable
> --------------------------------------------------------
>
> Key: PIG-3067
> URL: https://issues.apache.org/jira/browse/PIG-3067
> Project: Pig
> Issue Type: Improvement
> Reporter: Christoph Bauer
> Assignee: Christoph Bauer
> Attachments: hbasestorage-split.patch
>
>
> HBaseStorage has become quite big (>1100 lines).
> I propose to split it up into more managable parts. I believe it will become
> a lot easier to maintain.
> I split it up like this:
> HBaseStorage
> * settings:LoadStoreFuncSettings
> ** options
> ** caster
> ** udfProperties
> ** contextSignature
> ** columns:ColumnInfo - moved to its own class-file
> * loadFuncDelegate:HBaseLoadFunc - LoadFunc implementation
> ** settings:LoadStoreFuncSettings (s.a.)
> ** scanner:HBaseLoadFuncScanner - everything scan-specific
> ** tupleIterator:HBaseTupleIterator - interface for _public Tuple getNext()_
> * storeFuncDelegate:HBaseStorFunc - StorFunc implementation
> ** settings:LoadStoreFuncSettings (s.a.)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira