Skip to content

Commit

Permalink
[FLINK-20651] Format code with Spotless/google-java-format
Browse files Browse the repository at this point in the history
  • Loading branch information
Rufus Refactor authored and zentol committed Dec 28, 2020
1 parent 2f78a2a commit c6997c9
Show file tree
Hide file tree
Showing 11,013 changed files with 1,441,565 additions and 1,355,306 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,13 @@
/**
* Annotation to mark classes for experimental use.
*
* <p>Classes with this annotation are neither battle-tested nor stable, and may be changed or removed
* in future versions.
*
* <p>This annotation also excludes classes with evolving interfaces / signatures
* annotated with {@link Public} and {@link PublicEvolving}.
* <p>Classes with this annotation are neither battle-tested nor stable, and may be changed or
* removed in future versions.
*
* <p>This annotation also excludes classes with evolving interfaces / signatures annotated with
* {@link Public} and {@link PublicEvolving}.
*/
@Documented
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR })
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR})
@Public
public @interface Experimental {
}
public @interface Experimental {}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
* <p>Developer APIs are stable but internal to Flink and might change across releases.
*/
@Documented
@Target({ ElementType.TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR })
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR})
@Public
public @interface Internal {
}
public @interface Internal {}
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
/**
* Annotation for marking classes as public, stable interfaces.
*
* <p>Classes, methods and fields with this annotation are stable across minor releases (1.0, 1.1, 1.2). In other words,
* applications using @Public annotated classes will compile against newer versions of the same major release.
* <p>Classes, methods and fields with this annotation are stable across minor releases (1.0, 1.1,
* 1.2). In other words, applications using @Public annotated classes will compile against newer
* versions of the same major release.
*
* <p>Only major releases (1.0, 2.0, 3.0) can break interfaces with this annotation.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@
* However, their interfaces and signatures are not considered to be stable and might be changed
* across versions.
*
* <p>This annotation also excludes methods and classes with evolving interfaces / signatures
* within classes annotated with {@link Public}.
*
* <p>This annotation also excludes methods and classes with evolving interfaces / signatures within
* classes annotated with {@link Public}.
*/
@Documented
@Target({ ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR })
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR})
@Public
public @interface PublicEvolving {
}
public @interface PublicEvolving {}
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
import java.lang.annotation.Target;

/**
* This annotations declares that a function, field, constructor, or entire type, is only visible for
* testing purposes.
* This annotations declares that a function, field, constructor, or entire type, is only visible
* for testing purposes.
*
* <p>This annotation is typically attached when for example a method should be {@code private}
* (because it is not intended to be called externally), but cannot be declared private, because
* some tests need to have access to it.
*/
@Documented
@Target({ ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR })
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR})
@Internal
public @interface VisibleForTesting {}
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@
import java.lang.annotation.Target;

/**
* A class that specifies a group of config options. The name of the group will be used as the basis for the
* filename of the generated html file, as defined in {@link ConfigOptionsDocGenerator}.
* A class that specifies a group of config options. The name of the group will be used as the basis
* for the filename of the generated html file, as defined in {@link ConfigOptionsDocGenerator}.
*
* @see ConfigGroups
*/
@Target({})
@Internal
public @interface ConfigGroup {
String name();
String keyPrefix();
String name();

String keyPrefix();
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@
import java.lang.annotation.Target;

/**
* Annotation used on classes containing config options that enables the separation of options into different
* tables based on key prefixes. A config option is assigned to a {@link ConfigGroup} if the option key matches
* the group prefix. If a key matches multiple prefixes the longest matching prefix takes priority. An option is never
* assigned to multiple groups. Options that don't match any group are implicitly added to a default group.
* Annotation used on classes containing config options that enables the separation of options into
* different tables based on key prefixes. A config option is assigned to a {@link ConfigGroup} if
* the option key matches the group prefix. If a key matches multiple prefixes the longest matching
* prefix takes priority. An option is never assigned to multiple groups. Options that don't match
* any group are implicitly added to a default group.
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Internal
public @interface ConfigGroups {
ConfigGroup[] groups() default {};
ConfigGroup[] groups() default {};
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,139 +25,131 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Collection of annotations to modify the behavior of the documentation generators.
*/
/** Collection of annotations to modify the behavior of the documentation generators. */
public final class Documentation {

/**
* Annotation used on config option fields to override the documented default.
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@Internal
public @interface OverrideDefault {
String value();
}

/**
* Annotation used on config option fields to include them in specific sections. Sections are groups of options
* that are aggregated across option classes, with each group being placed into a dedicated file.
*
* <p>The {@link Section#position()} argument controls the position in the generated table, with lower values
* being placed at the top. Fields with the same position are sorted alphabetically by key.
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@Internal
public @interface Section {

/**
* The sections in the config docs where this option should be included.
*/
String[] value() default {};

/**
* The relative position of the option in its section.
*/
int position() default Integer.MAX_VALUE;
}

/**
* Constants for section names.
*/
public static final class Sections {

public static final String COMMON_HOST_PORT = "common_host_port";
public static final String COMMON_STATE_BACKENDS = "common_state_backends";
public static final String COMMON_HIGH_AVAILABILITY = "common_high_availability";
public static final String COMMON_HIGH_AVAILABILITY_ZOOKEEPER = "common_high_availability_zk";
public static final String COMMON_MEMORY = "common_memory";
public static final String COMMON_MISCELLANEOUS = "common_miscellaneous";

public static final String SECURITY_SSL = "security_ssl";
public static final String SECURITY_AUTH_KERBEROS = "security_auth_kerberos";
public static final String SECURITY_AUTH_ZOOKEEPER = "security_auth_zk";

public static final String STATE_BACKEND_ROCKSDB = "state_backend_rocksdb";

public static final String EXPERT_CLASS_LOADING = "expert_class_loading";
public static final String EXPERT_DEBUGGING_AND_TUNING = "expert_debugging_and_tuning";
public static final String EXPERT_SCHEDULING = "expert_scheduling";
public static final String EXPERT_FAULT_TOLERANCE = "expert_fault_tolerance";
public static final String EXPERT_STATE_BACKENDS = "expert_state_backends";
public static final String EXPERT_REST = "expert_rest";
public static final String EXPERT_HIGH_AVAILABILITY = "expert_high_availability";
public static final String EXPERT_ZOOKEEPER_HIGH_AVAILABILITY = "expert_high_availability_zk";
public static final String EXPERT_KUBERNETES_HIGH_AVAILABILITY = "expert_high_availability_k8s";
public static final String EXPERT_SECURITY_SSL = "expert_security_ssl";
public static final String EXPERT_ROCKSDB = "expert_rocksdb";
public static final String EXPERT_CLUSTER = "expert_cluster";

public static final String ALL_JOB_MANAGER = "all_jobmanager";
public static final String ALL_TASK_MANAGER = "all_taskmanager";
public static final String ALL_TASK_MANAGER_NETWORK = "all_taskmanager_network";

public static final String DEPRECATED_FILE_SINKS = "deprecated_file_sinks";

private Sections() {}
}

/**
* Annotation used on table config options for adding meta data labels.
*
* <p>The {@link TableOption#execMode()} argument indicates the execution mode the config works for
* (batch, streaming or both).
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@Internal
public @interface TableOption {
ExecMode execMode();
}

/**
* The execution mode the config works for.
*/
public enum ExecMode {

BATCH("Batch"), STREAMING("Streaming"), BATCH_STREAMING("Batch and Streaming");

private final String name;

ExecMode(String name) {
this.name = name;
}

@Override
public String toString() {
return name;
}
}

/**
* Annotation used on config option fields or options class to mark them as a suffix-option; i.e., a config option
* where the key is only a suffix, with the prefix being dynamically provided at runtime.
*/
@Target({ElementType.FIELD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Internal
public @interface SuffixOption {
}

/**
* Annotation used on config option fields or REST API message headers to exclude it from documentation.
*/
@Target({ElementType.FIELD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Internal
public @interface ExcludeFromDocumentation {
/**
* The optional reason why it is excluded from documentation.
*/
String value() default "";
}

private Documentation(){
}
/** Annotation used on config option fields to override the documented default. */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@Internal
public @interface OverrideDefault {
String value();
}

/**
* Annotation used on config option fields to include them in specific sections. Sections are
* groups of options that are aggregated across option classes, with each group being placed
* into a dedicated file.
*
* <p>The {@link Section#position()} argument controls the position in the generated table, with
* lower values being placed at the top. Fields with the same position are sorted alphabetically
* by key.
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@Internal
public @interface Section {

/** The sections in the config docs where this option should be included. */
String[] value() default {};

/** The relative position of the option in its section. */
int position() default Integer.MAX_VALUE;
}

/** Constants for section names. */
public static final class Sections {

public static final String COMMON_HOST_PORT = "common_host_port";
public static final String COMMON_STATE_BACKENDS = "common_state_backends";
public static final String COMMON_HIGH_AVAILABILITY = "common_high_availability";
public static final String COMMON_HIGH_AVAILABILITY_ZOOKEEPER =
"common_high_availability_zk";
public static final String COMMON_MEMORY = "common_memory";
public static final String COMMON_MISCELLANEOUS = "common_miscellaneous";

public static final String SECURITY_SSL = "security_ssl";
public static final String SECURITY_AUTH_KERBEROS = "security_auth_kerberos";
public static final String SECURITY_AUTH_ZOOKEEPER = "security_auth_zk";

public static final String STATE_BACKEND_ROCKSDB = "state_backend_rocksdb";

public static final String EXPERT_CLASS_LOADING = "expert_class_loading";
public static final String EXPERT_DEBUGGING_AND_TUNING = "expert_debugging_and_tuning";
public static final String EXPERT_SCHEDULING = "expert_scheduling";
public static final String EXPERT_FAULT_TOLERANCE = "expert_fault_tolerance";
public static final String EXPERT_STATE_BACKENDS = "expert_state_backends";
public static final String EXPERT_REST = "expert_rest";
public static final String EXPERT_HIGH_AVAILABILITY = "expert_high_availability";
public static final String EXPERT_ZOOKEEPER_HIGH_AVAILABILITY =
"expert_high_availability_zk";
public static final String EXPERT_KUBERNETES_HIGH_AVAILABILITY =
"expert_high_availability_k8s";
public static final String EXPERT_SECURITY_SSL = "expert_security_ssl";
public static final String EXPERT_ROCKSDB = "expert_rocksdb";
public static final String EXPERT_CLUSTER = "expert_cluster";

public static final String ALL_JOB_MANAGER = "all_jobmanager";
public static final String ALL_TASK_MANAGER = "all_taskmanager";
public static final String ALL_TASK_MANAGER_NETWORK = "all_taskmanager_network";

public static final String DEPRECATED_FILE_SINKS = "deprecated_file_sinks";

private Sections() {}
}

/**
* Annotation used on table config options for adding meta data labels.
*
* <p>The {@link TableOption#execMode()} argument indicates the execution mode the config works
* for (batch, streaming or both).
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@Internal
public @interface TableOption {
ExecMode execMode();
}

/** The execution mode the config works for. */
public enum ExecMode {
BATCH("Batch"),
STREAMING("Streaming"),
BATCH_STREAMING("Batch and Streaming");

private final String name;

ExecMode(String name) {
this.name = name;
}

@Override
public String toString() {
return name;
}
}

/**
* Annotation used on config option fields or options class to mark them as a suffix-option;
* i.e., a config option where the key is only a suffix, with the prefix being dynamically
* provided at runtime.
*/
@Target({ElementType.FIELD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Internal
public @interface SuffixOption {}

/**
* Annotation used on config option fields or REST API message headers to exclude it from
* documentation.
*/
@Target({ElementType.FIELD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Internal
public @interface ExcludeFromDocumentation {
/** The optional reason why it is excluded from documentation. */
String value() default "";
}

private Documentation() {}
}
Loading

0 comments on commit c6997c9

Please sign in to comment.