samperson1997 commented on issue #417: [IOTDB-234] Refactor TsFile storage on 
HDFS
URL: https://github.com/apache/incubator-iotdb/pull/417#issuecomment-540955410
 
 
   > I think using reflection every time is too heavy and slow when all you 
want to do is to get a new Object. To put it simply, reflections should be used 
as less frequently as possible.
   > 
   > Here is my suggestion: use two factories (the LocalFactory and the 
HDFSFactory) instead of one, and initialize one of them using reflection 
according to the configuration at the system start-up. Thus the occurrence of 
reflections can be reduced to only 1.
   
   Hi, many thanks for your useful suggestion!
   
   In the new commit, I tried to reduce the occurrence of reflections to only 1 
by initializing `private static Class<?> clazz` when constructing 
`TSFileFactory`. I think this also reached your main purpose, so I didn't use 
two factories... Do you think it is acceptable? > <

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to