>From Michael Blow <[email protected]>:

Michael Blow has submitted this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20294 )

Change subject: [NO ISSUE][*DB][EXT] Avoid serialization of JsonFactory
......................................................................

[NO ISSUE][*DB][EXT] Avoid serialization of JsonFactory

Use a static JsonFactory in JSONDataParserFactory to avoid serialziation
overhead and binary compatibility complications in the future.

Ext-ref: MB-68387
Change-Id: I5b855538fff6530ae3ae6ce45e2b8d68801d1e94
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20294
Integration-Tests: Jenkins <[email protected]>
Reviewed-by: Michael Blow <[email protected]>
Reviewed-by: Ali Alsuliman <[email protected]>
Tested-by: Michael Blow <[email protected]>
---
M 
asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/factory/JSONDataParserFactory.java
1 file changed, 21 insertions(+), 3 deletions(-)

Approvals:
  Michael Blow: Looks good to me, but someone else must approve; Verified
  Ali Alsuliman: Looks good to me, approved
  Jenkins: Verified




diff --git 
a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/factory/JSONDataParserFactory.java
 
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/factory/JSONDataParserFactory.java
index 7eb87fb..152d857 100644
--- 
a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/factory/JSONDataParserFactory.java
+++ 
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/factory/JSONDataParserFactory.java
@@ -34,12 +34,12 @@

 public class JSONDataParserFactory extends 
AbstractGenericDataParserFactory<char[]> {

-    private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 2L;
     private static final List<String> PARSER_FORMAT = 
Collections.unmodifiableList(
             Arrays.asList(ExternalDataConstants.FORMAT_JSON_LOWER_CASE, 
ExternalDataConstants.FORMAT_JSON_UPPER_CASE));
-    private final JsonFactory jsonFactory;
+    private static final JsonFactory jsonFactory;

-    public JSONDataParserFactory() {
+    static {
         jsonFactory = new JsonFactory();
         jsonFactory.configure(JsonParser.Feature.STRICT_DUPLICATE_DETECTION, 
true);
         jsonFactory.configure(JsonFactory.Feature.CANONICALIZE_FIELD_NAMES, 
true);

--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20294
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: ionic
Gerrit-Change-Id: I5b855538fff6530ae3ae6ce45e2b8d68801d1e94
Gerrit-Change-Number: 20294
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Blow <[email protected]>
Gerrit-Reviewer: Ali Alsuliman <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Michael Blow <[email protected]>
Gerrit-Reviewer: Peeyush Gupta <[email protected]>
Gerrit-MessageType: merged

Reply via email to