From d4d7d0920c98a2f89882f1c4d9051e1a18fa9dca Mon Sep 17 00:00:00 2001 From: Mike Walch Date: Fri, 2 Dec 2016 13:42:12 -0500 Subject: [PATCH] ACCUMULO-4530 Stop generating docs/config.html * Configuration docs can be found in appendix of user manual * Updated all pointers to config.html to user manual instead * Removed code used to generate HTML file --- assemble/libexec/templates/accumulo-site.xml | 5 +- assemble/src/main/assemblies/component.xml | 9 -- .../core/conf/ConfigurationDocGen.java | 149 +----------------- .../accumulo/core/conf/config-header.html | 88 ----------- .../resources/crypto-off-accumulo-site.xml | 9 -- .../resources/crypto-on-accumulo-site.xml | 13 +- ...pto-on-no-key-encryption-accumulo-site.xml | 9 -- docs/pom.xml | 15 -- docs/src/main/resources/administration.html | 2 +- docs/src/main/resources/index.html | 1 - .../src/main/resources/conf/accumulo-site.xml | 9 -- 11 files changed, 9 insertions(+), 300 deletions(-) delete mode 100644 core/src/main/resources/org/apache/accumulo/core/conf/config-header.html diff --git a/assemble/libexec/templates/accumulo-site.xml b/assemble/libexec/templates/accumulo-site.xml index ff490b15d71..a1f4153cfd7 100644 --- a/assemble/libexec/templates/accumulo-site.xml +++ b/assemble/libexec/templates/accumulo-site.xml @@ -18,9 +18,8 @@ - - + instance.volumes diff --git a/assemble/src/main/assemblies/component.xml b/assemble/src/main/assemblies/component.xml index c384e14a1af..83db9e81adc 100644 --- a/assemble/src/main/assemblies/component.xml +++ b/assemble/src/main/assemblies/component.xml @@ -134,15 +134,6 @@ examples/* - - ../docs/target - docs - 0755 - 0644 - - config.html - - conf 0755 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 1c34b99283f..c128c80d448 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 @@ -86,136 +86,6 @@ void pageHeader() { } - private class HTML extends Format { - private boolean highlight; - - private void beginRow() { - doc.println(startTag("tr", highlight ? "class='highlight'" : null)); - highlight = !highlight; - } - - @Override - void beginSection(String section) { - doc.println(t("h1", section, null)); - highlight = true; - doc.println(""); - } - - private String t(String tag, String cell, String options) { - return startTag(tag, options) + cell + ""; - } - - private void cellData(String cell, String options) { - doc.println(t("td", cell, options)); - } - - private void columnNames(String... names) { - beginRow(); - for (String s : names) - doc.println(t("th", s, null)); - endRow(); - } - - private void endRow() { - doc.println(""); - } - - @Override - void endSection() { - doc.println("
"); - } - - @Override - String getExt() { - return "html"; - } - - @Override - void pageFooter() { - doc.println(""); - doc.println(""); - } - - @Override - void propertyQuickLinks() { - doc.println("

Jump to: "); - String delimiter = ""; - for (Property prefix : prefixes) { - if (!prefix.isExperimental()) { - doc.print(delimiter + "" + prefix.getKey() + "*"); - delimiter = " | "; - } - } - doc.println("

"); - } - - @Override - void prefixSection(Property prefix) { - beginRow(); - doc.println(t("td", t("span", prefix.getKey() + '*', "id='" + prefix.name() + "' class='large'"), "colspan='5'" - + (prefix.isDeprecated() ? " class='deprecated'" : ""))); - endRow(); - beginRow(); - doc.println(t("td", (prefix.isDeprecated() ? t("b", t("i", "Deprecated. ", null), null) : "") + sanitize(prefix.getDescription()), "colspan='5'" - + (prefix.isDeprecated() ? " class='deprecated'" : ""))); - endRow(); - - switch (prefix) { - case TABLE_CONSTRAINT_PREFIX: - break; - case TABLE_ITERATOR_PREFIX: - break; - case TABLE_LOCALITY_GROUP_PREFIX: - break; - case TABLE_COMPACTION_STRATEGY_PREFIX: - break; - default: - columnNames("Property", "Type", "ZooKeeper Mutable", "Default Value", "Description"); - break; - } - } - - @Override - void property(Property prefix, Property prop) { - boolean isDeprecated = prefix.isDeprecated() || prop.isDeprecated(); - if (prop.getKey().startsWith(prefix.getKey())) { - beginRow(); - cellData(prop.getKey(), isDeprecated ? "class='deprecated'" : null); - cellData("" + prop.getType().toString().replaceAll(" ", " ") + "", - isDeprecated ? "class='deprecated'" : null); - cellData(isZooKeeperMutable(prop), isDeprecated ? "class='deprecated'" : null); - cellData("
" + (prop.getRawDefaultValue().isEmpty() ? " " : sanitize(prop.getRawDefaultValue().replaceAll(" ", " "))) + "
", - isDeprecated ? "class='deprecated'" : null); - cellData((isDeprecated ? "Deprecated. " : "") + sanitize(prop.getDescription()), isDeprecated ? "class='deprecated'" : null); - endRow(); - } - - } - - @Override - void propertyTypeDescriptions() { - columnNames("Property Type", "Description"); - for (PropertyType type : PropertyType.values()) { - if (type == PropertyType.PREFIX) - continue; - beginRow(); - cellData("

" + type + "

", null); - cellData(type.getFormatDescription(), null); - endRow(); - } - } - - @Override - String sanitize(String str) { - return str.replace("&", "&").replace("<", "<").replace(">", ">").replaceAll("(?:\r\n|\r|\n)", "
"); - } - - private String startTag(String tag, String options) { - return "<" + tag + (options != null ? " " + options : "") + ">"; - } - - } - private class Asciidoc extends Format { @Override void beginSection(String section) { @@ -303,7 +173,7 @@ String sanitize(String str) { private final TreeMap sortedProps; - ConfigurationDocGen(PrintStream doc) { + private ConfigurationDocGen(PrintStream doc) { this.doc = doc; this.prefixes = new ArrayList<>(); this.sortedProps = new TreeMap<>(); @@ -329,7 +199,6 @@ private void appendResource(String resourceName) { doc.print(new String(buffer, 0, n, UTF_8)); } catch (IOException e) { log.debug("Encountered IOException while reading InputStream in appendResource().", e); - return; } finally { try { data.close(); @@ -348,31 +217,23 @@ private String isZooKeeperMutable(Property prop) { return "yes"; } - void generateHtml() { - new HTML().generate(); - } - - void generateAsciidoc() { + private void generateAsciidoc() { new Asciidoc().generate(); } /** - * Generates documentation for conf/accumulo-site.xml file usage. Arguments are: "--generate-doc", file to write to. + * Generates documentation for conf/accumulo-site.xml file usage. Arguments are: "--generate-asciidoc filename" * * @param args * command-line arguments - * * @throws IllegalArgumentException * if args is invalid */ public static void main(String[] args) throws FileNotFoundException, UnsupportedEncodingException { - if (args.length == 2 && args[0].equals("--generate-html")) { - new ConfigurationDocGen(new PrintStream(args[1], UTF_8.name())).generateHtml(); - } else if (args.length == 2 && args[0].equals("--generate-asciidoc")) { + if (args.length == 2 && args[0].equals("--generate-asciidoc")) { new ConfigurationDocGen(new PrintStream(args[1], UTF_8.name())).generateAsciidoc(); } else { - throw new IllegalArgumentException("Usage: " + ConfigurationDocGen.class.getName() + " --generate-html | --generate-asciidoc "); + throw new IllegalArgumentException("Usage: " + ConfigurationDocGen.class.getName() + " --generate-asciidoc "); } } - } diff --git a/core/src/main/resources/org/apache/accumulo/core/conf/config-header.html b/core/src/main/resources/org/apache/accumulo/core/conf/config-header.html deleted file mode 100644 index 49291fc595a..00000000000 --- a/core/src/main/resources/org/apache/accumulo/core/conf/config-header.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - Accumulo Configuration - - - -

Configuration Management

-

All accumulo properties have a default value in the source code. Properties can also be set - in accumulo-site.xml and in zookeeper on per-table or system-wide basis. If properties are set in more than one location, - accumulo will choose the property with the highest precedence. This order of precedence is described - below (from highest to lowest):

- - - - - - - - - - - - - - -
LocationDescription
Zookeeper
table properties
Table properties are applied to the entire cluster when set in zookeeper using the accumulo API or shell. While table properties take precedent over system properties, both will override properties set in accumulo-site.xml

- Table properties consist of all properties with the table.* prefix. Table properties are configured on a per-table basis using the following shell commmand: -
config -t TABLE -s PROPERTY=VALUE
Zookeeper
system properties
System properties are applied to the entire cluster when set in zookeeper using the accumulo API or shell. System properties consist of all properties with a 'yes' in the 'Zookeeper Mutable' column in the table below. They are set with the following shell command: -
config -s PROPERTY=VALUE
- If a table.* property is set using this method, the value will apply to all tables except those configured on per-table basis (which have higher precedence).

- While most system properties take effect immediately, some require a restart of the process which is indicated in 'Zookeeper Mutable'.
accumulo-site.xmlAccumulo processes (master, tserver, etc) read their local accumulo-site.xml on start up. Therefore, changes made to accumulo-site.xml must rsynced across the cluster and processes must be restarted to apply changes.

- Certain properties (indicated by a 'no' in 'Zookeeper Mutable') cannot be set in zookeeper and only set in this file. The accumulo-site.xml also allows you to configure tablet servers with different settings.
DefaultAll properties have a default value in the source code. This value has the lowest precedence and is overriden if set in accumulo-site.xml or zookeeper.

While the default value is usually optimal, there are cases where a change can increase query and ingest performance.
- -

The 'config' command in the shell allows you to view the current system configuration. You can also use the '-t' option to view a table's configuration as below: - -

-    $ ./bin/accumulo shell -u root
-    Enter current password for 'root'@'ac14': ******
-
-    Shell - Apache Accumulo Interactive Shell
-    -
-    - version: 1.5.0
-    - instance name: ac14
-    - instance id: 4f48fa03-f692-43ce-ae03-94c9ea8b7181
-    -
-    - type 'help' for a list of available commands
-    -
-    root@ac13> config -t foo
-    ---------+---------------------------------------------+------------------------------------------------------
-    SCOPE    | NAME                                        | VALUE
-    ---------+---------------------------------------------+------------------------------------------------------
-    default  | table.balancer ............................ | org.apache.accumulo.server.master.balancer.DefaultLoadBalancer
-    default  | table.bloom.enabled ....................... | false
-    default  | table.bloom.error.rate .................... | 0.5%
-    default  | table.bloom.hash.type ..................... | murmur
-    default  | table.bloom.key.functor ................... | org.apache.accumulo.core.file.keyfunctor.RowFunctor
-    default  | table.bloom.load.threshold ................ | 1
-    default  | table.bloom.size .......................... | 1048576
-    default  | table.cache.block.enable .................. | false
-    default  | table.cache.index.enable .................. | false
-    default  | table.compaction.major.everything.at ...... | 19700101000000GMT
-    default  | table.compaction.major.everything.idle .... | 1h
-    default  | table.compaction.major.ratio .............. | 1.3
-    site     |    @override .............................. | 1.4
-    system   |    @override .............................. | 1.5
-    table    |    @override .............................. | 1.6
-    default  | table.compaction.minor.idle ............... | 5m
-    default  | table.compaction.minor.logs.threshold ..... | 3
-    default  | table.failures.ignore ..................... | false
-  
- diff --git a/core/src/test/resources/crypto-off-accumulo-site.xml b/core/src/test/resources/crypto-off-accumulo-site.xml index 90efd686411..78965440664 100644 --- a/core/src/test/resources/crypto-off-accumulo-site.xml +++ b/core/src/test/resources/crypto-off-accumulo-site.xml @@ -18,15 +18,6 @@ - instance.zookeeper.host diff --git a/core/src/test/resources/crypto-on-accumulo-site.xml b/core/src/test/resources/crypto-on-accumulo-site.xml index 60258247de4..ebfc9ae4c05 100644 --- a/core/src/test/resources/crypto-on-accumulo-site.xml +++ b/core/src/test/resources/crypto-on-accumulo-site.xml @@ -18,16 +18,7 @@ - - + instance.zookeeper.host localhost:2181 @@ -131,6 +122,4 @@ AES/ECB/NoPadding - - diff --git a/core/src/test/resources/crypto-on-no-key-encryption-accumulo-site.xml b/core/src/test/resources/crypto-on-no-key-encryption-accumulo-site.xml index 888aa1d5302..d9807839006 100644 --- a/core/src/test/resources/crypto-on-no-key-encryption-accumulo-site.xml +++ b/core/src/test/resources/crypto-on-no-key-encryption-accumulo-site.xml @@ -18,15 +18,6 @@ - instance.zookeeper.host diff --git a/docs/pom.xml b/docs/pom.xml index 0ef4b5fcf83..d6a5aaac2ae 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -101,21 +101,6 @@ - - config-html - - java - - compile - - org.apache.accumulo.core.conf.ConfigurationDocGen - compile - - --generate-html - ${project.build.directory}/config.html - - - config-appendix diff --git a/docs/src/main/resources/administration.html b/docs/src/main/resources/administration.html index 39a46ff8f5e..17821711303 100644 --- a/docs/src/main/resources/administration.html +++ b/docs/src/main/resources/administration.html @@ -110,7 +110,7 @@

Configuration

Per-table configuration settings override system settings. -

See the possible configuration options and their default values here +

See the possible configuration options and their default values in the user manual.

Managing system resources

diff --git a/docs/src/main/resources/index.html b/docs/src/main/resources/index.html index cc4ecb73aab..aca3bb22ab0 100644 --- a/docs/src/main/resources/index.html +++ b/docs/src/main/resources/index.html @@ -28,7 +28,6 @@

Apache Accumulo Documentation

  • Combiners
  • Constraints
  • Bulk Ingest
  • -
  • Configuration
  • Isolation
  • Locality Groups
  • Timestamps
  • diff --git a/test/src/main/resources/conf/accumulo-site.xml b/test/src/main/resources/conf/accumulo-site.xml index 23b47bf1358..a9d1416ec73 100644 --- a/test/src/main/resources/conf/accumulo-site.xml +++ b/test/src/main/resources/conf/accumulo-site.xml @@ -18,15 +18,6 @@ - instance.zookeeper.host