yihua commented on code in PR #11790:
URL: https://github.com/apache/hudi/pull/11790#discussion_r1759786270
##########
hudi-io/src/main/java/org/apache/hudi/common/util/StringUtils.java:
##########
@@ -329,34 +329,34 @@ public static String stripEnd(final String str, final
String stripChars) {
}
/**
- * Concatenates two strings such that the total byte length does not exceed
the threshold.
- * If the total byte length exceeds the threshold, the function will find
the maximum length of the first string
- * that fits within the threshold and concatenate that with the second
string.
+ * Concatenates two strings such that the total byte length does not exceed
the byteLengthThreshold.
+ * If the total byte length exceeds the byteLengthThreshold, the function
will find the maximum length of the first string
+ * that fits within the byteLengthThreshold and concatenate that with the
second string.
*
* @param a The first string
* @param b The second string
- * @param threshold The maximum byte length
+ * @param byteLengthThreshold The maximum byte length
*/
- public static String concatenateWithThreshold(String a, String b, int
threshold) {
+ public static String concatenateWithThreshold(String a, String b, int
byteLengthThreshold) {
// Convert both strings to byte arrays in UTF-8 encoding
byte[] bytesA = getUTF8Bytes(a);
byte[] bytesB = getUTF8Bytes(b);
- if (bytesB.length > threshold) {
+ if (bytesB.length > byteLengthThreshold) {
throw new IllegalArgumentException(String.format(
- "Length of the Second string to concatenate exceeds the threshold
(%d > %d)",
- bytesB.length, threshold));
+ "Length of the Second string to concatenate exceeds the
byteLengthThreshold (%d > %d)",
Review Comment:
For error message clarify, should this be kept the same, i.e., "threshold"
instead of "byteLengthThreshold"?
--
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]