Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import java.io.IOException;
import java.io.PrintStream;
import java.util.Map;
import java.util.TreeMap;

/**
Expand All @@ -48,6 +49,11 @@ void generate() {
beginTable("Type");
propertyTypeDescriptions();

beginSection("Java System Properties");
doc.println("Below are properties used to modify the runtime behavior.\n");
beginTable("Property");
systemPropertyDescriptions();

doc.close();
}

Expand Down Expand Up @@ -144,6 +150,12 @@ void propertyTypeDescriptions() {
}
}

void systemPropertyDescriptions() {
Map<String,String> systemProps = Property.getSystemProperties();
systemProps.forEach(
(key, value) -> doc.println("| " + sanitize(key) + " | " + sanitize(value) + " |"));
}

String sanitize(String str) {
return str.replace("\n", "<br>");
}
Expand Down
27 changes: 27 additions & 0 deletions core/src/main/java/org/apache/accumulo/core/conf/Property.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.util.EnumSet;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.function.Predicate;
Expand All @@ -38,8 +39,14 @@
import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope;
import org.apache.accumulo.core.iteratorsImpl.system.DeletingIterator;
import org.apache.accumulo.core.metadata.SystemTables;
import org.apache.accumulo.core.rpc.clients.TServerClient;
import org.apache.accumulo.core.spi.compaction.RatioBasedCompactionPlanner;
import org.apache.accumulo.core.spi.compaction.SimpleCompactionDispatcher;
import org.apache.accumulo.core.spi.file.rfile.compression.Bzip2;
import org.apache.accumulo.core.spi.file.rfile.compression.Lz4;
import org.apache.accumulo.core.spi.file.rfile.compression.Lzo;
import org.apache.accumulo.core.spi.file.rfile.compression.Snappy;
import org.apache.accumulo.core.spi.file.rfile.compression.ZStandard;
import org.apache.accumulo.core.spi.fs.RandomVolumeChooser;
import org.apache.accumulo.core.spi.scan.ScanDispatcher;
import org.apache.accumulo.core.spi.scan.ScanPrioritizer;
Expand Down Expand Up @@ -1861,6 +1868,26 @@ public static <T> T createInstanceFromPropertyName(AccumuloConfiguration conf, P
return ConfigurationTypeHelper.getClassInstance(null, clazzName, base, defaultInstance);
}

/**
* A set Map of identified System Properties to be used in ConfigurationDocGen.java
*
* @return A Map of each property's value and description as Strings
*/
public static Map<String,String> getSystemProperties() {
Map<String,String> systemProps = new HashMap<>(Map.of());
systemProps.put(TServerClient.DEBUG_HOST,
"Set to host:port for the client to connect to a specific server.");
systemProps.put(SiteConfiguration.ACCUMULO_PROPERTIES_PROPERTY,
"Path to accumulo.properties file.");
systemProps.put(Bzip2.CODEC_BZIP2, "BZip2 Codec Compression Algorithm.");
systemProps.put(Lz4.CODEC_LZ4, "LZ4 Codec Compression Algorithm.");
systemProps.put(Lzo.CODEC_LZO, "LZO Codec Compression Algorithm.");
systemProps.put(Snappy.CODEC_SNAPPY, "Snappy Codec Compression Algorithm.");
systemProps.put(ZStandard.CODEC_ZSTANDARD, "ZStandard Codec Compression Algorithm.");

return systemProps;
}

static {
// Precomputing information here avoids :
// * Computing it each time a method is called
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

public class Bzip2 implements CompressionAlgorithmConfiguration {

public static final String CODEC_BZIP2 = "io.compression.codec.bzip2.class";

@Override
public String getName() {
return "bzip2";
Expand All @@ -32,7 +34,7 @@ public String getCodecClassName() {

@Override
public String getCodecClassNameProperty() {
return "io.compression.codec.bzip2.class";
return CODEC_BZIP2;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

public class Lz4 implements CompressionAlgorithmConfiguration {

public static final String CODEC_LZ4 = "io.compression.codec.lz4.class";

@Override
public String getName() {
return "lz4";
Expand All @@ -32,7 +34,7 @@ public String getCodecClassName() {

@Override
public String getCodecClassNameProperty() {
return "io.compression.codec.lz4.class";
return CODEC_LZ4;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

public class Lzo implements CompressionAlgorithmConfiguration {

public static final String CODEC_LZO = "io.compression.codec.lzo.class";

@Override
public String getName() {
return "lzo";
Expand All @@ -32,7 +34,7 @@ public String getCodecClassName() {

@Override
public String getCodecClassNameProperty() {
return "io.compression.codec.lzo.class";
return CODEC_LZO;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package org.apache.accumulo.core.spi.file.rfile.compression;

public class Snappy implements CompressionAlgorithmConfiguration {
public static final String CODEC_SNAPPY = "io.compression.codec.snappy.class";

@Override
public String getName() {
Expand All @@ -32,7 +33,7 @@ public String getCodecClassName() {

@Override
public String getCodecClassNameProperty() {
return "io.compression.codec.snappy.class";
return CODEC_SNAPPY;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

public class ZStandard implements CompressionAlgorithmConfiguration {

public static final String CODEC_ZSTANDARD = "io.compression.codec.zstd.class";

@Override
public String getName() {
return "zstd";
Expand All @@ -32,7 +34,7 @@ public String getCodecClassName() {

@Override
public String getCodecClassNameProperty() {
return "io.compression.codec.zstd.class";
return CODEC_ZSTANDARD;
}

@Override
Expand Down