@@ -2754,35 +2754,35 @@ private String reconfigureFSNamesystemLockMetricsParameters(final String propert
27542754 String result ;
27552755 try {
27562756 switch (property ) {
2757- case DFS_NAMENODE_LOCK_DETAILED_METRICS_KEY : {
2758- if (newVal != null && !newVal .equalsIgnoreCase ("true" ) &&
2759- !newVal .equalsIgnoreCase ("false" )) {
2760- throw new IllegalArgumentException (newVal + " is not boolean value" );
2761- }
2762- boolean enable = (newVal == null ?
2763- DFS_NAMENODE_LOCK_DETAILED_METRICS_DEFAULT : Boolean .parseBoolean (newVal ));
2764- result = Boolean .toString (enable );
2765- namesystem .setMetricsEnabled (enable );
2766- break ;
2767- }
2768- case DFS_NAMENODE_READ_LOCK_REPORTING_THRESHOLD_MS_KEY : {
2769- long readLockReportingThresholdMs = (newVal == null ?
2770- DFS_NAMENODE_READ_LOCK_REPORTING_THRESHOLD_MS_DEFAULT : Long .parseLong (newVal ));
2771- result = Long .toString (readLockReportingThresholdMs );
2772- namesystem .setReadLockReportingThresholdMs (readLockReportingThresholdMs );
2773- break ;
2774- }
2775- case DFS_NAMENODE_WRITE_LOCK_REPORTING_THRESHOLD_MS_KEY : {
2776- long writeLockReportingThresholdMs = (newVal == null ?
2777- DFS_NAMENODE_WRITE_LOCK_REPORTING_THRESHOLD_MS_DEFAULT : Long .parseLong (newVal ));
2778- result = Long .toString (writeLockReportingThresholdMs );
2779- namesystem .setWriteLockReportingThresholdMs (writeLockReportingThresholdMs );
2780- break ;
2781- }
2782- default : {
2783- throw new IllegalArgumentException ("Unexpected property " + property + " in " +
2784- "reconfigureFSNamesystemLockMetricsParameters" );
2757+ case DFS_NAMENODE_LOCK_DETAILED_METRICS_KEY : {
2758+ if (newVal != null && !newVal .equalsIgnoreCase ("true" ) &&
2759+ !newVal .equalsIgnoreCase ("false" )) {
2760+ throw new IllegalArgumentException (newVal + " is not boolean value" );
27852761 }
2762+ boolean enable = (newVal == null ?
2763+ DFS_NAMENODE_LOCK_DETAILED_METRICS_DEFAULT : Boolean .parseBoolean (newVal ));
2764+ result = Boolean .toString (enable );
2765+ namesystem .setMetricsEnabled (enable );
2766+ break ;
2767+ }
2768+ case DFS_NAMENODE_READ_LOCK_REPORTING_THRESHOLD_MS_KEY : {
2769+ long readLockReportingThresholdMs = (newVal == null ?
2770+ DFS_NAMENODE_READ_LOCK_REPORTING_THRESHOLD_MS_DEFAULT : Long .parseLong (newVal ));
2771+ result = Long .toString (readLockReportingThresholdMs );
2772+ namesystem .setReadLockReportingThresholdMs (readLockReportingThresholdMs );
2773+ break ;
2774+ }
2775+ case DFS_NAMENODE_WRITE_LOCK_REPORTING_THRESHOLD_MS_KEY : {
2776+ long writeLockReportingThresholdMs = (newVal == null ?
2777+ DFS_NAMENODE_WRITE_LOCK_REPORTING_THRESHOLD_MS_DEFAULT : Long .parseLong (newVal ));
2778+ result = Long .toString (writeLockReportingThresholdMs );
2779+ namesystem .setWriteLockReportingThresholdMs (writeLockReportingThresholdMs );
2780+ break ;
2781+ }
2782+ default : {
2783+ throw new IllegalArgumentException ("Unexpected property " + property + " in " +
2784+ "reconfigureFSNamesystemLockMetricsParameters" );
2785+ }
27862786 }
27872787 LOG .info ("RECONFIGURE* changed FSNamesystemLockMetricsParameters {} to {}" , property , result );
27882788 return result ;
0 commit comments