chaokunyang commented on code in PR #1684:
URL: https://github.com/apache/incubator-fury/pull/1684#discussion_r1635866562
##########
java/fury-core/src/main/java/org/apache/fury/meta/Encoders.java:
##########
@@ -139,4 +134,32 @@ public static MetaString encodeFieldName(String fieldName)
{
return fieldMetaStringCache.computeIfAbsent(
fieldName, k -> FIELD_NAME_ENCODER.encode(fieldName,
fieldNameEncodings));
}
+
+ public static MetaString encodePackage(String pkg) {
+ return pgkMetaStringCache.computeIfAbsent(pkg, k ->
PACKAGE_ENCODER.encode(pkg, pkgEncodings));
+ }
+
+ public static MetaString encodeTypeName(String typeName) {
+ return typeMetaStringCache.computeIfAbsent(
+ typeName, k -> TYPE_NAME_ENCODER.encode(typeName, typeNameEncodings));
+ }
+
+ public static String decodeFieldName(long hashCode, byte[] bytes,
MetaString.Encoding encoding) {
Review Comment:
Hashcode is an internal optimization, maybe we shouldn't make it pubic as an
API for meta string encoder
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]