This is an automated email from the ASF dual-hosted git repository.
ctubbsii pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push:
new ff835f2 Add since information to properties (#2190)
ff835f2 is described below
commit ff835f28445d2e0a1221da78e3656ba4c8c1240f
Author: Luke Foster <84727868+foste...@users.noreply.github.com>
AuthorDate: Tue Jul 13 16:42:20 2021 -0400
Add since information to properties (#2190)
* Add since information to properties
* Add links to replaced by properties
* Minor improvement to wording for description of 'experimental'
* Add strikethrough for deprecated properties' keys in addition to their
descriptions
* Add clarifying information to new manager properties 'since'
information, so that it shows the original name with its original
availability, but the new name since 2.1.0
* Replace ternary statements with if-else statements for easier
readability and maintainability.
Co-authored-by: Dom G. <47725857+domgargu...@users.noreply.github.com>
Co-authored-by: Christopher Tubbs
---
.../accumulo/core/conf/ConfigurationDocGen.java| 66 +-
.../org/apache/accumulo/core/conf/Property.java| 846 +
2 files changed, 568 insertions(+), 344 deletions(-)
diff --git
a/core/src/main/java/org/apache/accumulo/core/conf/ConfigurationDocGen.java
b/core/src/main/java/org/apache/accumulo/core/conf/ConfigurationDocGen.java
index ba60da2..13b89e3 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/ConfigurationDocGen.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/ConfigurationDocGen.java
@@ -70,43 +70,63 @@ public class ConfigurationDocGen {
+ " that is copied from Accumulo build (from
core/target/generated-docs)" + " -->\n");
doc.println("Below are properties set in `accumulo.properties` or the"
+ " Accumulo shell that configure Accumulo servers (i.e tablet server,"
-+ " manager, etc). Properties labeled 'Experimental' could be part of
an incomplete"
-+ " feature or have a higher risk of changing in the future.\n");
++ " manager, etc). Properties labeled 'Experimental' should not be
considered stable"
++ " and have a higher risk of changing in the future.\n");
}
void prefixSection(Property prefix) {
boolean depr = prefix.isDeprecated();
-doc.print("| **"
-+ prefix.getKey() + "*** | ");
-doc.print(prefix.isExperimental() ? "**Experimental.** " : "");
-doc.println(
-(depr ? "**Deprecated.** " : "") +
strike(sanitize(prefix.getDescription()), depr) + " |");
+String key = strike(" **" + prefix.getKey() + "***", depr);
+String description = prefix.isExperimental() ? "**Experimental**" : "";
+description += "**Available since:** " + prefix.availableSince() + "";
+if (depr) {
+ description += "*Deprecated since:* " + prefix.deprecatedSince() +
"";
+ if (prefix.isReplaced())
+description +=
+"*Replaced by:* " + "" + prefix.replacedBy() + "";
+}
+description += strike(sanitize(prefix.getDescription()), depr);
+doc.println("| " + key + " | " + description + " |");
}
void property(Property prop) {
boolean depr = prop.isDeprecated();
-doc.print("| "
-+ prop.getKey() + " | ");
-doc.print(prop.isExperimental() ? "**Experimental.** " : "");
-doc.print(
-(depr ? "**Deprecated.** " : "") +
strike(sanitize(prop.getDescription()), depr) + "");
-doc.print(strike("**type:** " + prop.getType().name(), depr) + ", ");
-doc.print(strike("**zk mutable:** " + isZooKeeperMutable(prop), depr) + ",
");
+String key = strike(
+" " + prop.getKey(),
+depr);
+String description = prop.isExperimental() ? "**Experimental**" : "";
+description += "**Available since:** ";
+if (prop.getKey().startsWith("manager.")
+&& (prop.availableSince().startsWith("1.") ||
prop.availableSince().startsWith("2.0"))) {
+ description += "2.1.0 (since " + prop.availableSince() + " as *master."
+ + prop.getKey().substring(8) + "*)" + "";
+} else {
+ description += prop.availableSince() + "";
+}
+if (depr) {
+ description += "*Deprecated since:* " + prop.deprecatedSince() + "";
+ if (prop.isReplaced())
+description += "*Replaced by:* " + "" +
prop.replacedBy() + "";
+}
+description += strike(sanitize(prop.getDescription()), depr) + ""
++ strike("**type:** " + prop.getType().name(), depr) + ", "
++ strike("**zk mutable:** " + isZooKeeperMutable(prop), depr) + ", ";
String defaultValue = sanitize(prop.getDefaultValue()).trim();
if (defaultValue.isEmpty()) {
- defaultValue = strike("**default value:** empty", depr);
+ description += strike("**default value:** empty", depr);
} els