Details
-
Improvement
-
Status: Resolved
-
Trivial
-
Resolution: Duplicate
-
2.4.0, 3.0.0
-
None
-
None
-
Patch
Description
Currently Hive is using this ThreadLocal/SimpleDateFormat setup to work around the thread-safety limitations of SimpleDateFormat.
Let us simply drink the Apache Commons champagne and use thread-safe org.apache.commons.lang.time.FastDateFormat instead.
org.apache.hadoop.hive.serde2.io.TimestampWritable
private static final ThreadLocal<DateFormat> threadLocalDateFormat = new ThreadLocal<DateFormat>() { @Override protected DateFormat initialValue() { return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); } };
Attachments
Attachments
Issue Links
- duplicates
-
HIVE-17417 LazySimple Timestamp is very expensive
- Closed