[ 
https://issues.apache.org/jira/browse/CASSANDRA-16855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17717644#comment-17717644
 ] 

Stefan Miklosovic edited comment on CASSANDRA-16855 at 4/28/23 12:12 PM:
-------------------------------------------------------------------------

There are classes in o.a.c.cql3.Json which are related just to CQL. I left them 
there and I moved everything else to o.a.c.utils.JsonUtils. So the state we 
find ourselves in is:

1) o.a.c.cql3.Json is used just in that package (or subpackages) and nowhere 
else. I can not make that class package protected because it is also used in 
o.a.c.cql3.selection.Selection

2) I moved all other stuff from o.a.c.cql3.Json to o.a.c.utils.JsonUtils

3) I moved all JSON related code in FBUtilities to o.a.c.utils.JsonUtils

4) There is one global instance of Json ObjectMapper.

This means that all other code which needs to interact with JSON goes to 
o.a.c.utils.JsonUtils only, FBUtilities are a lightweight a bit and Json stuff 
in cql3 package is not spilling over.


was (Author: smiklosovic):
There are classes in o.a.c.cql3.Json which are related just to CQL. I left them 
there and I moved everything else to o.a.c.utils.JsonUtils. So the state we 
find ourselves in is:

1) o.a.c.cql3.Json is used just in that package (or subpackages) and nowhere 
else. I can not make that class package protected because it is also used in 
o.a.c.cql3.selection.Selection

2) I moved all other stuff from o.a.c.cql3.Json to o.a.c.utils.JsonUtils

3) I moved all JSON related code in FBUtilities to o.a.c.utils.JsonUtils

This means that all other code which needs to interact with JSON goes to 
o.a.c.utils.JsonUtils only, FBUtilities are a lightweight a bit and Json stuff 
in cql3 package is not spilling over.

> Replace minor use of `json-simple` with Jackson
> -----------------------------------------------
>
>                 Key: CASSANDRA-16855
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16855
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Dependencies, Local/Other, Tool/nodetool
>            Reporter: Tatu Saloranta
>            Assignee: Stefan Miklosovic
>            Priority: Normal
>              Labels: pull-request-available
>             Fix For: 5.x
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Jackson library is used for most JSON reading/writing, but there are couple 
> of places where older "json-simple" library is used, mostly for diagnostics 
> output. Replacing those minor usages would allow removal of a dependency, one 
> for which the last release was made in 2012.
> Places where json-simple is used are:
>  * src/java/org/apache/cassandra/db/ColumnFamilyStore.java
>  * src/java/org/apache/cassandra/db/commitlog/CommitLogDescriptor.java
>  * src/java/org/apache/cassandra/hints/HintsDescriptor.java
>  * src/java/org/apache/cassandra/tools/nodetool/stats/StatsPrinter.java
> (and some matching usage in couple of test classes)
> I can take a stab at replacing these uses; it also looks like test coverage 
> may be spotty for some (StatsPrinter json/yaml part has no tests for example).
> It is probably best to target this for "trunk" (4.1?).
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to