File tree 1 file changed +0
-19
lines changed
heron/metricsmgr/src/java/org/apache/heron/metricsmgr/sink
1 file changed +0
-19
lines changed Original file line number Diff line number Diff line change @@ -305,25 +305,6 @@ byte[] generateResponse() throws IOException {
305
305
return sb .toString ().getBytes ();
306
306
}
307
307
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
-
327
308
@ Override
328
309
public void processRecord (MetricsRecord record ) {
329
310
final String [] sources = MetricsUtil .splitRecordSource (record );
You can’t perform that action at this time.
0 commit comments