Commit d52b0f9
HADOOP-8865. Log warning message when loading deprecated properties
The goal is to emit the warning message when deprecated properties are loaded from XML configuration files to inform users that obsolete properties are in use. Before this patch we only inform users when a set/get operation is performed on a deprecated property but this is not sufficient cause if the users/apps are using the new key to obtain the value they will never see the warning. As a result when the property is finally removed or stops taking effect the application will fail or showcase different behavior.
With this patch deprecated properties may be logged twice:
* when a deprecated prop is loaded from a resource
* when a deprecated prop is accessed via get/set; if the deprecated key is not accessed no additional log is generated
Closes #7737
Signed-off-by: Chris Nauroth <[email protected]>1 parent c8ea305 commit d52b0f9
File tree
2 files changed
+31
-3
lines changed- hadoop-common-project/hadoop-common/src
- main/java/org/apache/hadoop/conf
- test/java/org/apache/hadoop/conf
2 files changed
+31
-3
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3433 | 3433 | | |
3434 | 3434 | | |
3435 | 3435 | | |
| 3436 | + | |
3436 | 3437 | | |
3437 | 3438 | | |
3438 | 3439 | | |
| |||
Lines changed: 30 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
| |||
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
123 | | - | |
| 124 | + | |
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
| |||
356 | 357 | | |
357 | 358 | | |
358 | 359 | | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
359 | 387 | | |
360 | 388 | | |
361 | 389 | | |
| |||
845 | 873 | | |
846 | 874 | | |
847 | 875 | | |
848 | | - | |
849 | | - | |
| 876 | + | |
850 | 877 | | |
851 | 878 | | |
852 | 879 | | |
| |||
0 commit comments