hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gang Tim Liu (JIRA)" <>
Subject [jira] [Commented] (HIVE-3394) Refactor a few classes' constructors with creational patterns
Date Fri, 17 Aug 2012 18:59:38 GMT


Gang Tim Liu commented on HIVE-3394:

Several classes have many parameters in constructor and it doesn't scale well.

After reviewing design patterns (factory method/abstract factory/builder/static factory) in
GOF and builder pattern in Joshua's Effective in JAVA (Item #2), feel builder pattern in effective
in Java is a good fit since it is designed to solve our problem.

Details on each instance
   use builder pattern
   # of parameter is not big yet but the number of references to the constructors is huge:
40+. risk is high to change them all.
   solution is use javabean pattern (setter/getter) for new parameters in hive 3072
   use builder pattern
   use builder pattern
   same as #2
> Refactor a few classes' constructors with creational patterns
> -------------------------------------------------------------
>                 Key: HIVE-3394
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Gang Tim Liu
>            Assignee: Gang Tim Liu
>            Priority: Minor
> It's good to refactor the following classes' constructors with builder/factory pattern.
This should be done before HIVE-3072 so that HIVE-3072 can refresh according and extend it
to skewed use case:
> 1.
> 2.
> 3.
> 4.
> 5.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message