Skip to content

Commit 08b4db9

Browse files
committed
Remove unused
1 parent f248de6 commit 08b4db9

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

heron/metricsmgr/src/java/org/apache/heron/metricsmgr/sink/PrometheusSink.java

-19
Original file line numberDiff line numberDiff line change
@@ -305,25 +305,6 @@ byte[] generateResponse() throws IOException {
305305
return sb.toString().getBytes();
306306
}
307307

308-
static String toSnakeAndLowerCase(String attrName) {
309-
if (attrName == null || attrName.isEmpty()) {
310-
return attrName;
311-
}
312-
char firstChar = attrName.subSequence(0, 1).charAt(0);
313-
boolean prevCharIsUpperCaseOrUnderscore = Character.isUpperCase(firstChar) || firstChar == '_';
314-
StringBuilder resultBuilder = new StringBuilder(attrName.length())
315-
.append(Character.toLowerCase(firstChar));
316-
for (char attrChar : attrName.substring(1).toCharArray()) {
317-
boolean charIsUpperCase = Character.isUpperCase(attrChar);
318-
if (!prevCharIsUpperCaseOrUnderscore && charIsUpperCase) {
319-
resultBuilder.append("_");
320-
}
321-
resultBuilder.append(Character.toLowerCase(attrChar));
322-
prevCharIsUpperCaseOrUnderscore = charIsUpperCase || attrChar == '_';
323-
}
324-
return resultBuilder.toString();
325-
}
326-
327308
@Override
328309
public void processRecord(MetricsRecord record) {
329310
final String[] sources = MetricsUtil.splitRecordSource(record);

0 commit comments

Comments
 (0)