busbey commented on a change in pull request #616: HBASE-23015 : Moving from
Jackson2 to shaded Gson
URL: https://github.com/apache/hbase/pull/616#discussion_r323769088
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCacheUtil.java
##########
@@ -121,31 +135,21 @@ public static String toJSON(final String filename, final
NavigableSet<CachedBloc
counts.sizeData += cb.getSize();
}
}
- return MAPPER.writeValueAsString(counts);
+ return GSON.toJson(counts);
}
/**
- * @param cbsbf
* @return JSON string of <code>cbsf</code> aggregated
- * @throws JsonGenerationException
- * @throws JsonMappingException
- * @throws IOException
*/
- public static String toJSON(final CachedBlocksByFile cbsbf)
- throws JsonGenerationException, JsonMappingException, IOException {
- return MAPPER.writeValueAsString(cbsbf);
+ public static String toJSON(CachedBlocksByFile cbsbf) throws IOException {
Review comment:
can we leave the final modifier in place?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services