Skip to content

Commit 0350bf1

Browse files
Rufus Refactorzentol
Rufus Refactor
authored andcommitted
[FLINK-20651] Format code with Spotless/google-java-format
1 parent 5ca0379 commit 0350bf1

File tree

10,963 files changed

+1437536
-1351854
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

10,963 files changed

+1437536
-1351854
lines changed

flink-annotations/src/main/java/org/apache/flink/annotation/Experimental.java

+6-8
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,13 @@
2626
/**
2727
* Annotation to mark classes for experimental use.
2828
*
29-
* <p>Classes with this annotation are neither battle-tested nor stable, and may be changed or removed
30-
* in future versions.
31-
*
32-
* <p>This annotation also excludes classes with evolving interfaces / signatures
33-
* annotated with {@link Public} and {@link PublicEvolving}.
29+
* <p>Classes with this annotation are neither battle-tested nor stable, and may be changed or
30+
* removed in future versions.
3431
*
32+
* <p>This annotation also excludes classes with evolving interfaces / signatures annotated with
33+
* {@link Public} and {@link PublicEvolving}.
3534
*/
3635
@Documented
37-
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR })
36+
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR})
3837
@Public
39-
public @interface Experimental {
40-
}
38+
public @interface Experimental {}

flink-annotations/src/main/java/org/apache/flink/annotation/Internal.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
* <p>Developer APIs are stable but internal to Flink and might change across releases.
3030
*/
3131
@Documented
32-
@Target({ ElementType.TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR })
32+
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR})
3333
@Public
34-
public @interface Internal {
35-
}
34+
public @interface Internal {}

flink-annotations/src/main/java/org/apache/flink/annotation/Public.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626
/**
2727
* Annotation for marking classes as public, stable interfaces.
2828
*
29-
* <p>Classes, methods and fields with this annotation are stable across minor releases (1.0, 1.1, 1.2). In other words,
30-
* applications using @Public annotated classes will compile against newer versions of the same major release.
29+
* <p>Classes, methods and fields with this annotation are stable across minor releases (1.0, 1.1,
30+
* 1.2). In other words, applications using @Public annotated classes will compile against newer
31+
* versions of the same major release.
3132
*
3233
* <p>Only major releases (1.0, 2.0, 3.0) can break interfaces with this annotation.
3334
*/

flink-annotations/src/main/java/org/apache/flink/annotation/PublicEvolving.java

+4-6
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,10 @@
3030
* However, their interfaces and signatures are not considered to be stable and might be changed
3131
* across versions.
3232
*
33-
* <p>This annotation also excludes methods and classes with evolving interfaces / signatures
34-
* within classes annotated with {@link Public}.
35-
*
33+
* <p>This annotation also excludes methods and classes with evolving interfaces / signatures within
34+
* classes annotated with {@link Public}.
3635
*/
3736
@Documented
38-
@Target({ ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR })
37+
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR})
3938
@Public
40-
public @interface PublicEvolving {
41-
}
39+
public @interface PublicEvolving {}

flink-annotations/src/main/java/org/apache/flink/annotation/VisibleForTesting.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
import java.lang.annotation.Target;
2525

2626
/**
27-
* This annotations declares that a function, field, constructor, or entire type, is only visible for
28-
* testing purposes.
27+
* This annotations declares that a function, field, constructor, or entire type, is only visible
28+
* for testing purposes.
2929
*
3030
* <p>This annotation is typically attached when for example a method should be {@code private}
3131
* (because it is not intended to be called externally), but cannot be declared private, because
3232
* some tests need to have access to it.
3333
*/
3434
@Documented
35-
@Target({ ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR })
35+
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR})
3636
@Internal
3737
public @interface VisibleForTesting {}

flink-annotations/src/main/java/org/apache/flink/annotation/docs/ConfigGroup.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@
2323
import java.lang.annotation.Target;
2424

2525
/**
26-
* A class that specifies a group of config options. The name of the group will be used as the basis for the
27-
* filename of the generated html file, as defined in {@link ConfigOptionsDocGenerator}.
26+
* A class that specifies a group of config options. The name of the group will be used as the basis
27+
* for the filename of the generated html file, as defined in {@link ConfigOptionsDocGenerator}.
2828
*
2929
* @see ConfigGroups
3030
*/
3131
@Target({})
3232
@Internal
3333
public @interface ConfigGroup {
34-
String name();
35-
String keyPrefix();
34+
String name();
35+
36+
String keyPrefix();
3637
}

flink-annotations/src/main/java/org/apache/flink/annotation/docs/ConfigGroups.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@
2626
import java.lang.annotation.Target;
2727

2828
/**
29-
* Annotation used on classes containing config options that enables the separation of options into different
30-
* tables based on key prefixes. A config option is assigned to a {@link ConfigGroup} if the option key matches
31-
* the group prefix. If a key matches multiple prefixes the longest matching prefix takes priority. An option is never
32-
* assigned to multiple groups. Options that don't match any group are implicitly added to a default group.
29+
* Annotation used on classes containing config options that enables the separation of options into
30+
* different tables based on key prefixes. A config option is assigned to a {@link ConfigGroup} if
31+
* the option key matches the group prefix. If a key matches multiple prefixes the longest matching
32+
* prefix takes priority. An option is never assigned to multiple groups. Options that don't match
33+
* any group are implicitly added to a default group.
3334
*/
3435
@Target(ElementType.TYPE)
3536
@Retention(RetentionPolicy.RUNTIME)
3637
@Internal
3738
public @interface ConfigGroups {
38-
ConfigGroup[] groups() default {};
39+
ConfigGroup[] groups() default {};
3940
}

flink-annotations/src/main/java/org/apache/flink/annotation/docs/Documentation.java

+125-133
Original file line numberDiff line numberDiff line change
@@ -25,139 +25,131 @@
2525
import java.lang.annotation.RetentionPolicy;
2626
import java.lang.annotation.Target;
2727

28-
/**
29-
* Collection of annotations to modify the behavior of the documentation generators.
30-
*/
28+
/** Collection of annotations to modify the behavior of the documentation generators. */
3129
public final class Documentation {
3230

33-
/**
34-
* Annotation used on config option fields to override the documented default.
35-
*/
36-
@Target(ElementType.FIELD)
37-
@Retention(RetentionPolicy.RUNTIME)
38-
@Internal
39-
public @interface OverrideDefault {
40-
String value();
41-
}
42-
43-
/**
44-
* Annotation used on config option fields to include them in specific sections. Sections are groups of options
45-
* that are aggregated across option classes, with each group being placed into a dedicated file.
46-
*
47-
* <p>The {@link Section#position()} argument controls the position in the generated table, with lower values
48-
* being placed at the top. Fields with the same position are sorted alphabetically by key.
49-
*/
50-
@Target(ElementType.FIELD)
51-
@Retention(RetentionPolicy.RUNTIME)
52-
@Internal
53-
public @interface Section {
54-
55-
/**
56-
* The sections in the config docs where this option should be included.
57-
*/
58-
String[] value() default {};
59-
60-
/**
61-
* The relative position of the option in its section.
62-
*/
63-
int position() default Integer.MAX_VALUE;
64-
}
65-
66-
/**
67-
* Constants for section names.
68-
*/
69-
public static final class Sections {
70-
71-
public static final String COMMON_HOST_PORT = "common_host_port";
72-
public static final String COMMON_STATE_BACKENDS = "common_state_backends";
73-
public static final String COMMON_HIGH_AVAILABILITY = "common_high_availability";
74-
public static final String COMMON_HIGH_AVAILABILITY_ZOOKEEPER = "common_high_availability_zk";
75-
public static final String COMMON_MEMORY = "common_memory";
76-
public static final String COMMON_MISCELLANEOUS = "common_miscellaneous";
77-
78-
public static final String SECURITY_SSL = "security_ssl";
79-
public static final String SECURITY_AUTH_KERBEROS = "security_auth_kerberos";
80-
public static final String SECURITY_AUTH_ZOOKEEPER = "security_auth_zk";
81-
82-
public static final String STATE_BACKEND_ROCKSDB = "state_backend_rocksdb";
83-
84-
public static final String EXPERT_CLASS_LOADING = "expert_class_loading";
85-
public static final String EXPERT_DEBUGGING_AND_TUNING = "expert_debugging_and_tuning";
86-
public static final String EXPERT_SCHEDULING = "expert_scheduling";
87-
public static final String EXPERT_FAULT_TOLERANCE = "expert_fault_tolerance";
88-
public static final String EXPERT_STATE_BACKENDS = "expert_state_backends";
89-
public static final String EXPERT_REST = "expert_rest";
90-
public static final String EXPERT_HIGH_AVAILABILITY = "expert_high_availability";
91-
public static final String EXPERT_ZOOKEEPER_HIGH_AVAILABILITY = "expert_high_availability_zk";
92-
public static final String EXPERT_KUBERNETES_HIGH_AVAILABILITY = "expert_high_availability_k8s";
93-
public static final String EXPERT_SECURITY_SSL = "expert_security_ssl";
94-
public static final String EXPERT_ROCKSDB = "expert_rocksdb";
95-
public static final String EXPERT_CLUSTER = "expert_cluster";
96-
97-
public static final String ALL_JOB_MANAGER = "all_jobmanager";
98-
public static final String ALL_TASK_MANAGER = "all_taskmanager";
99-
public static final String ALL_TASK_MANAGER_NETWORK = "all_taskmanager_network";
100-
101-
public static final String DEPRECATED_FILE_SINKS = "deprecated_file_sinks";
102-
103-
private Sections() {}
104-
}
105-
106-
/**
107-
* Annotation used on table config options for adding meta data labels.
108-
*
109-
* <p>The {@link TableOption#execMode()} argument indicates the execution mode the config works for
110-
* (batch, streaming or both).
111-
*/
112-
@Target(ElementType.FIELD)
113-
@Retention(RetentionPolicy.RUNTIME)
114-
@Internal
115-
public @interface TableOption {
116-
ExecMode execMode();
117-
}
118-
119-
/**
120-
* The execution mode the config works for.
121-
*/
122-
public enum ExecMode {
123-
124-
BATCH("Batch"), STREAMING("Streaming"), BATCH_STREAMING("Batch and Streaming");
125-
126-
private final String name;
127-
128-
ExecMode(String name) {
129-
this.name = name;
130-
}
131-
132-
@Override
133-
public String toString() {
134-
return name;
135-
}
136-
}
137-
138-
/**
139-
* Annotation used on config option fields or options class to mark them as a suffix-option; i.e., a config option
140-
* where the key is only a suffix, with the prefix being dynamically provided at runtime.
141-
*/
142-
@Target({ElementType.FIELD, ElementType.TYPE})
143-
@Retention(RetentionPolicy.RUNTIME)
144-
@Internal
145-
public @interface SuffixOption {
146-
}
147-
148-
/**
149-
* Annotation used on config option fields or REST API message headers to exclude it from documentation.
150-
*/
151-
@Target({ElementType.FIELD, ElementType.TYPE})
152-
@Retention(RetentionPolicy.RUNTIME)
153-
@Internal
154-
public @interface ExcludeFromDocumentation {
155-
/**
156-
* The optional reason why it is excluded from documentation.
157-
*/
158-
String value() default "";
159-
}
160-
161-
private Documentation(){
162-
}
31+
/** Annotation used on config option fields to override the documented default. */
32+
@Target(ElementType.FIELD)
33+
@Retention(RetentionPolicy.RUNTIME)
34+
@Internal
35+
public @interface OverrideDefault {
36+
String value();
37+
}
38+
39+
/**
40+
* Annotation used on config option fields to include them in specific sections. Sections are
41+
* groups of options that are aggregated across option classes, with each group being placed
42+
* into a dedicated file.
43+
*
44+
* <p>The {@link Section#position()} argument controls the position in the generated table, with
45+
* lower values being placed at the top. Fields with the same position are sorted alphabetically
46+
* by key.
47+
*/
48+
@Target(ElementType.FIELD)
49+
@Retention(RetentionPolicy.RUNTIME)
50+
@Internal
51+
public @interface Section {
52+
53+
/** The sections in the config docs where this option should be included. */
54+
String[] value() default {};
55+
56+
/** The relative position of the option in its section. */
57+
int position() default Integer.MAX_VALUE;
58+
}
59+
60+
/** Constants for section names. */
61+
public static final class Sections {
62+
63+
public static final String COMMON_HOST_PORT = "common_host_port";
64+
public static final String COMMON_STATE_BACKENDS = "common_state_backends";
65+
public static final String COMMON_HIGH_AVAILABILITY = "common_high_availability";
66+
public static final String COMMON_HIGH_AVAILABILITY_ZOOKEEPER =
67+
"common_high_availability_zk";
68+
public static final String COMMON_MEMORY = "common_memory";
69+
public static final String COMMON_MISCELLANEOUS = "common_miscellaneous";
70+
71+
public static final String SECURITY_SSL = "security_ssl";
72+
public static final String SECURITY_AUTH_KERBEROS = "security_auth_kerberos";
73+
public static final String SECURITY_AUTH_ZOOKEEPER = "security_auth_zk";
74+
75+
public static final String STATE_BACKEND_ROCKSDB = "state_backend_rocksdb";
76+
77+
public static final String EXPERT_CLASS_LOADING = "expert_class_loading";
78+
public static final String EXPERT_DEBUGGING_AND_TUNING = "expert_debugging_and_tuning";
79+
public static final String EXPERT_SCHEDULING = "expert_scheduling";
80+
public static final String EXPERT_FAULT_TOLERANCE = "expert_fault_tolerance";
81+
public static final String EXPERT_STATE_BACKENDS = "expert_state_backends";
82+
public static final String EXPERT_REST = "expert_rest";
83+
public static final String EXPERT_HIGH_AVAILABILITY = "expert_high_availability";
84+
public static final String EXPERT_ZOOKEEPER_HIGH_AVAILABILITY =
85+
"expert_high_availability_zk";
86+
public static final String EXPERT_KUBERNETES_HIGH_AVAILABILITY =
87+
"expert_high_availability_k8s";
88+
public static final String EXPERT_SECURITY_SSL = "expert_security_ssl";
89+
public static final String EXPERT_ROCKSDB = "expert_rocksdb";
90+
public static final String EXPERT_CLUSTER = "expert_cluster";
91+
92+
public static final String ALL_JOB_MANAGER = "all_jobmanager";
93+
public static final String ALL_TASK_MANAGER = "all_taskmanager";
94+
public static final String ALL_TASK_MANAGER_NETWORK = "all_taskmanager_network";
95+
96+
public static final String DEPRECATED_FILE_SINKS = "deprecated_file_sinks";
97+
98+
private Sections() {}
99+
}
100+
101+
/**
102+
* Annotation used on table config options for adding meta data labels.
103+
*
104+
* <p>The {@link TableOption#execMode()} argument indicates the execution mode the config works
105+
* for (batch, streaming or both).
106+
*/
107+
@Target(ElementType.FIELD)
108+
@Retention(RetentionPolicy.RUNTIME)
109+
@Internal
110+
public @interface TableOption {
111+
ExecMode execMode();
112+
}
113+
114+
/** The execution mode the config works for. */
115+
public enum ExecMode {
116+
BATCH("Batch"),
117+
STREAMING("Streaming"),
118+
BATCH_STREAMING("Batch and Streaming");
119+
120+
private final String name;
121+
122+
ExecMode(String name) {
123+
this.name = name;
124+
}
125+
126+
@Override
127+
public String toString() {
128+
return name;
129+
}
130+
}
131+
132+
/**
133+
* Annotation used on config option fields or options class to mark them as a suffix-option;
134+
* i.e., a config option where the key is only a suffix, with the prefix being dynamically
135+
* provided at runtime.
136+
*/
137+
@Target({ElementType.FIELD, ElementType.TYPE})
138+
@Retention(RetentionPolicy.RUNTIME)
139+
@Internal
140+
public @interface SuffixOption {}
141+
142+
/**
143+
* Annotation used on config option fields or REST API message headers to exclude it from
144+
* documentation.
145+
*/
146+
@Target({ElementType.FIELD, ElementType.TYPE})
147+
@Retention(RetentionPolicy.RUNTIME)
148+
@Internal
149+
public @interface ExcludeFromDocumentation {
150+
/** The optional reason why it is excluded from documentation. */
151+
String value() default "";
152+
}
153+
154+
private Documentation() {}
163155
}

0 commit comments

Comments
 (0)