id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
123,900 | apache/flink | flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/client/state/serialization/KvStateSerializer.java | KvStateSerializer.deserializeList | public static <T> List<T> deserializeList(byte[] serializedValue, TypeSerializer<T> serializer) throws IOException {
if (serializedValue != null) {
final DataInputDeserializer in = new DataInputDeserializer(
serializedValue, 0, serializedValue.length);
try {
final List<T> result = new ArrayList<>();
... | java | public static <T> List<T> deserializeList(byte[] serializedValue, TypeSerializer<T> serializer) throws IOException {
if (serializedValue != null) {
final DataInputDeserializer in = new DataInputDeserializer(
serializedValue, 0, serializedValue.length);
try {
final List<T> result = new ArrayList<>();
... | [
"public",
"static",
"<",
"T",
">",
"List",
"<",
"T",
">",
"deserializeList",
"(",
"byte",
"[",
"]",
"serializedValue",
",",
"TypeSerializer",
"<",
"T",
">",
"serializer",
")",
"throws",
"IOException",
"{",
"if",
"(",
"serializedValue",
"!=",
"null",
")",
... | Deserializes all values with the given serializer.
@param serializedValue Serialized value of type List<T>
@param serializer Serializer for T
@param <T> Type of the value
@return Deserialized list or <code>null</code> if the serialized value
is <code>null</code>
@throws IOException On failure du... | [
"Deserializes",
"all",
"values",
"with",
"the",
"given",
"serializer",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/client/state/serialization/KvStateSerializer.java#L172-L203 |
123,901 | apache/flink | flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/client/state/serialization/KvStateSerializer.java | KvStateSerializer.serializeMap | public static <UK, UV> byte[] serializeMap(Iterable<Map.Entry<UK, UV>> entries, TypeSerializer<UK> keySerializer, TypeSerializer<UV> valueSerializer) throws IOException {
if (entries != null) {
// Serialize
DataOutputSerializer dos = new DataOutputSerializer(32);
for (Map.Entry<UK, UV> entry : entries) {
... | java | public static <UK, UV> byte[] serializeMap(Iterable<Map.Entry<UK, UV>> entries, TypeSerializer<UK> keySerializer, TypeSerializer<UV> valueSerializer) throws IOException {
if (entries != null) {
// Serialize
DataOutputSerializer dos = new DataOutputSerializer(32);
for (Map.Entry<UK, UV> entry : entries) {
... | [
"public",
"static",
"<",
"UK",
",",
"UV",
">",
"byte",
"[",
"]",
"serializeMap",
"(",
"Iterable",
"<",
"Map",
".",
"Entry",
"<",
"UK",
",",
"UV",
">",
">",
"entries",
",",
"TypeSerializer",
"<",
"UK",
">",
"keySerializer",
",",
"TypeSerializer",
"<",
... | Serializes all values of the Iterable with the given serializer.
@param entries Key-value pairs to serialize
@param keySerializer Serializer for UK
@param valueSerializer Serializer for UV
@param <UK> Type of the keys
@param <UV> Type of the values
@return Serialized values or <code>nul... | [
"Serializes",
"all",
"values",
"of",
"the",
"Iterable",
"with",
"the",
"given",
"serializer",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/client/state/serialization/KvStateSerializer.java#L216-L236 |
123,902 | apache/flink | flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/client/state/serialization/KvStateSerializer.java | KvStateSerializer.deserializeMap | public static <UK, UV> Map<UK, UV> deserializeMap(byte[] serializedValue, TypeSerializer<UK> keySerializer, TypeSerializer<UV> valueSerializer) throws IOException {
if (serializedValue != null) {
DataInputDeserializer in = new DataInputDeserializer(serializedValue, 0, serializedValue.length);
Map<UK, UV> resul... | java | public static <UK, UV> Map<UK, UV> deserializeMap(byte[] serializedValue, TypeSerializer<UK> keySerializer, TypeSerializer<UV> valueSerializer) throws IOException {
if (serializedValue != null) {
DataInputDeserializer in = new DataInputDeserializer(serializedValue, 0, serializedValue.length);
Map<UK, UV> resul... | [
"public",
"static",
"<",
"UK",
",",
"UV",
">",
"Map",
"<",
"UK",
",",
"UV",
">",
"deserializeMap",
"(",
"byte",
"[",
"]",
"serializedValue",
",",
"TypeSerializer",
"<",
"UK",
">",
"keySerializer",
",",
"TypeSerializer",
"<",
"UV",
">",
"valueSerializer",
... | Deserializes all kv pairs with the given serializer.
@param serializedValue Serialized value of type Map<UK, UV>
@param keySerializer Serializer for UK
@param valueSerializer Serializer for UV
@param <UK> Type of the key
@param <UV> Type of the value.
@return Deserialized map or <code>nul... | [
"Deserializes",
"all",
"kv",
"pairs",
"with",
"the",
"given",
"serializer",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/client/state/serialization/KvStateSerializer.java#L250-L268 |
123,903 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/memory/AbstractPagedInputView.java | AbstractPagedInputView.seekInput | protected void seekInput(MemorySegment segment, int positionInSegment, int limitInSegment) {
this.currentSegment = segment;
this.positionInSegment = positionInSegment;
this.limitInSegment = limitInSegment;
} | java | protected void seekInput(MemorySegment segment, int positionInSegment, int limitInSegment) {
this.currentSegment = segment;
this.positionInSegment = positionInSegment;
this.limitInSegment = limitInSegment;
} | [
"protected",
"void",
"seekInput",
"(",
"MemorySegment",
"segment",
",",
"int",
"positionInSegment",
",",
"int",
"limitInSegment",
")",
"{",
"this",
".",
"currentSegment",
"=",
"segment",
";",
"this",
".",
"positionInSegment",
"=",
"positionInSegment",
";",
"this",... | Sets the internal state of the view such that the next bytes will be read from the given memory segment,
starting at the given position. The memory segment will provide bytes up to the given limit position.
@param segment The segment to read the next bytes from.
@param positionInSegment The position in the segment to ... | [
"Sets",
"the",
"internal",
"state",
"of",
"the",
"view",
"such",
"that",
"the",
"next",
"bytes",
"will",
"be",
"read",
"from",
"the",
"given",
"memory",
"segment",
"starting",
"at",
"the",
"given",
"position",
".",
"The",
"memory",
"segment",
"will",
"prov... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/memory/AbstractPagedInputView.java#L183-L187 |
123,904 | apache/flink | flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/FlinkKinesisConsumer.java | FlinkKinesisConsumer.setShardAssigner | public void setShardAssigner(KinesisShardAssigner shardAssigner) {
this.shardAssigner = checkNotNull(shardAssigner, "function can not be null");
ClosureCleaner.clean(shardAssigner, true);
} | java | public void setShardAssigner(KinesisShardAssigner shardAssigner) {
this.shardAssigner = checkNotNull(shardAssigner, "function can not be null");
ClosureCleaner.clean(shardAssigner, true);
} | [
"public",
"void",
"setShardAssigner",
"(",
"KinesisShardAssigner",
"shardAssigner",
")",
"{",
"this",
".",
"shardAssigner",
"=",
"checkNotNull",
"(",
"shardAssigner",
",",
"\"function can not be null\"",
")",
";",
"ClosureCleaner",
".",
"clean",
"(",
"shardAssigner",
... | Provide a custom assigner to influence how shards are distributed over subtasks.
@param shardAssigner shard assigner | [
"Provide",
"a",
"custom",
"assigner",
"to",
"influence",
"how",
"shards",
"are",
"distributed",
"over",
"subtasks",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/FlinkKinesisConsumer.java#L237-L240 |
123,905 | apache/flink | flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/FlinkKinesisConsumer.java | FlinkKinesisConsumer.createFetcher | protected KinesisDataFetcher<T> createFetcher(
List<String> streams,
SourceFunction.SourceContext<T> sourceContext,
RuntimeContext runtimeContext,
Properties configProps,
KinesisDeserializationSchema<T> deserializationSchema) {
return new KinesisDataFetcher<>(streams, sourceContext, runtimeContext, co... | java | protected KinesisDataFetcher<T> createFetcher(
List<String> streams,
SourceFunction.SourceContext<T> sourceContext,
RuntimeContext runtimeContext,
Properties configProps,
KinesisDeserializationSchema<T> deserializationSchema) {
return new KinesisDataFetcher<>(streams, sourceContext, runtimeContext, co... | [
"protected",
"KinesisDataFetcher",
"<",
"T",
">",
"createFetcher",
"(",
"List",
"<",
"String",
">",
"streams",
",",
"SourceFunction",
".",
"SourceContext",
"<",
"T",
">",
"sourceContext",
",",
"RuntimeContext",
"runtimeContext",
",",
"Properties",
"configProps",
"... | This method is exposed for tests that need to mock the KinesisDataFetcher in the consumer. | [
"This",
"method",
"is",
"exposed",
"for",
"tests",
"that",
"need",
"to",
"mock",
"the",
"KinesisDataFetcher",
"in",
"the",
"consumer",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/FlinkKinesisConsumer.java#L444-L452 |
123,906 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/operators/BatchTask.java | BatchTask.openChainedTasks | public static void openChainedTasks(List<ChainedDriver<?, ?>> tasks, AbstractInvokable parent) throws Exception {
// start all chained tasks
for (int i = 0; i < tasks.size(); i++) {
final ChainedDriver<?, ?> task = tasks.get(i);
if (LOG.isDebugEnabled()) {
LOG.debug(constructLogString("Start task code", t... | java | public static void openChainedTasks(List<ChainedDriver<?, ?>> tasks, AbstractInvokable parent) throws Exception {
// start all chained tasks
for (int i = 0; i < tasks.size(); i++) {
final ChainedDriver<?, ?> task = tasks.get(i);
if (LOG.isDebugEnabled()) {
LOG.debug(constructLogString("Start task code", t... | [
"public",
"static",
"void",
"openChainedTasks",
"(",
"List",
"<",
"ChainedDriver",
"<",
"?",
",",
"?",
">",
">",
"tasks",
",",
"AbstractInvokable",
"parent",
")",
"throws",
"Exception",
"{",
"// start all chained tasks",
"for",
"(",
"int",
"i",
"=",
"0",
";"... | Opens all chained tasks, in the order as they are stored in the array. The opening process
creates a standardized log info message.
@param tasks The tasks to be opened.
@param parent The parent task, used to obtain parameters to include in the log message.
@throws Exception Thrown, if the opening encounters an excepti... | [
"Opens",
"all",
"chained",
"tasks",
"in",
"the",
"order",
"as",
"they",
"are",
"stored",
"in",
"the",
"array",
".",
"The",
"opening",
"process",
"creates",
"a",
"standardized",
"log",
"info",
"message",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/BatchTask.java#L1384-L1393 |
123,907 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/operators/BatchTask.java | BatchTask.closeChainedTasks | public static void closeChainedTasks(List<ChainedDriver<?, ?>> tasks, AbstractInvokable parent) throws Exception {
for (int i = 0; i < tasks.size(); i++) {
final ChainedDriver<?, ?> task = tasks.get(i);
task.closeTask();
if (LOG.isDebugEnabled()) {
LOG.debug(constructLogString("Finished task code", t... | java | public static void closeChainedTasks(List<ChainedDriver<?, ?>> tasks, AbstractInvokable parent) throws Exception {
for (int i = 0; i < tasks.size(); i++) {
final ChainedDriver<?, ?> task = tasks.get(i);
task.closeTask();
if (LOG.isDebugEnabled()) {
LOG.debug(constructLogString("Finished task code", t... | [
"public",
"static",
"void",
"closeChainedTasks",
"(",
"List",
"<",
"ChainedDriver",
"<",
"?",
",",
"?",
">",
">",
"tasks",
",",
"AbstractInvokable",
"parent",
")",
"throws",
"Exception",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"tasks",
".... | Closes all chained tasks, in the order as they are stored in the array. The closing process
creates a standardized log info message.
@param tasks The tasks to be closed.
@param parent The parent task, used to obtain parameters to include in the log message.
@throws Exception Thrown, if the closing encounters an except... | [
"Closes",
"all",
"chained",
"tasks",
"in",
"the",
"order",
"as",
"they",
"are",
"stored",
"in",
"the",
"array",
".",
"The",
"closing",
"process",
"creates",
"a",
"standardized",
"log",
"info",
"message",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/BatchTask.java#L1403-L1412 |
123,908 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/operators/BatchTask.java | BatchTask.instantiateUserCode | public static <T> T instantiateUserCode(TaskConfig config, ClassLoader cl, Class<? super T> superClass) {
try {
T stub = config.<T>getStubWrapper(cl).getUserCodeObject(superClass, cl);
// check if the class is a subclass, if the check is required
if (superClass != null && !superClass.isAssignableFrom(stub.ge... | java | public static <T> T instantiateUserCode(TaskConfig config, ClassLoader cl, Class<? super T> superClass) {
try {
T stub = config.<T>getStubWrapper(cl).getUserCodeObject(superClass, cl);
// check if the class is a subclass, if the check is required
if (superClass != null && !superClass.isAssignableFrom(stub.ge... | [
"public",
"static",
"<",
"T",
">",
"T",
"instantiateUserCode",
"(",
"TaskConfig",
"config",
",",
"ClassLoader",
"cl",
",",
"Class",
"<",
"?",
"super",
"T",
">",
"superClass",
")",
"{",
"try",
"{",
"T",
"stub",
"=",
"config",
".",
"<",
"T",
">",
"getS... | Instantiates a user code class from is definition in the task configuration.
The class is instantiated without arguments using the null-ary constructor. Instantiation
will fail if this constructor does not exist or is not public.
@param <T> The generic type of the user code class.
@param config The task configuration ... | [
"Instantiates",
"a",
"user",
"code",
"class",
"from",
"is",
"definition",
"in",
"the",
"task",
"configuration",
".",
"The",
"class",
"is",
"instantiated",
"without",
"arguments",
"using",
"the",
"null",
"-",
"ary",
"constructor",
".",
"Instantiation",
"will",
... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/BatchTask.java#L1446-L1459 |
123,909 | apache/flink | flink-core/src/main/java/org/apache/flink/api/common/operators/Operator.java | Operator.setResources | @PublicEvolving
public void setResources(ResourceSpec minResources, ResourceSpec preferredResources) {
this.minResources = minResources;
this.preferredResources = preferredResources;
} | java | @PublicEvolving
public void setResources(ResourceSpec minResources, ResourceSpec preferredResources) {
this.minResources = minResources;
this.preferredResources = preferredResources;
} | [
"@",
"PublicEvolving",
"public",
"void",
"setResources",
"(",
"ResourceSpec",
"minResources",
",",
"ResourceSpec",
"preferredResources",
")",
"{",
"this",
".",
"minResources",
"=",
"minResources",
";",
"this",
".",
"preferredResources",
"=",
"preferredResources",
";",... | Sets the minimum and preferred resources for this contract instance. The resource denotes
how many memories and cpu cores of the user function will be consumed during the execution.
@param minResources The minimum resource of this operator.
@param preferredResources The preferred resource of this operator. | [
"Sets",
"the",
"minimum",
"and",
"preferred",
"resources",
"for",
"this",
"contract",
"instance",
".",
"The",
"resource",
"denotes",
"how",
"many",
"memories",
"and",
"cpu",
"cores",
"of",
"the",
"user",
"function",
"will",
"be",
"consumed",
"during",
"the",
... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/operators/Operator.java#L221-L225 |
123,910 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/rpc/FencedRpcEndpoint.java | FencedRpcEndpoint.runAsyncWithoutFencing | protected void runAsyncWithoutFencing(Runnable runnable) {
if (rpcServer instanceof FencedMainThreadExecutable) {
((FencedMainThreadExecutable) rpcServer).runAsyncWithoutFencing(runnable);
} else {
throw new RuntimeException("FencedRpcEndpoint has not been started with a FencedMainThreadExecutable RpcServer."... | java | protected void runAsyncWithoutFencing(Runnable runnable) {
if (rpcServer instanceof FencedMainThreadExecutable) {
((FencedMainThreadExecutable) rpcServer).runAsyncWithoutFencing(runnable);
} else {
throw new RuntimeException("FencedRpcEndpoint has not been started with a FencedMainThreadExecutable RpcServer."... | [
"protected",
"void",
"runAsyncWithoutFencing",
"(",
"Runnable",
"runnable",
")",
"{",
"if",
"(",
"rpcServer",
"instanceof",
"FencedMainThreadExecutable",
")",
"{",
"(",
"(",
"FencedMainThreadExecutable",
")",
"rpcServer",
")",
".",
"runAsyncWithoutFencing",
"(",
"runn... | Run the given runnable in the main thread of the RpcEndpoint without checking the fencing
token. This allows to run operations outside of the fencing token scope.
@param runnable to execute in the main thread of the rpc endpoint without checking the fencing token. | [
"Run",
"the",
"given",
"runnable",
"in",
"the",
"main",
"thread",
"of",
"the",
"RpcEndpoint",
"without",
"checking",
"the",
"fencing",
"token",
".",
"This",
"allows",
"to",
"run",
"operations",
"outside",
"of",
"the",
"fencing",
"token",
"scope",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rpc/FencedRpcEndpoint.java#L117-L123 |
123,911 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/rpc/FencedRpcEndpoint.java | FencedRpcEndpoint.callAsyncWithoutFencing | protected <V> CompletableFuture<V> callAsyncWithoutFencing(Callable<V> callable, Time timeout) {
if (rpcServer instanceof FencedMainThreadExecutable) {
return ((FencedMainThreadExecutable) rpcServer).callAsyncWithoutFencing(callable, timeout);
} else {
throw new RuntimeException("FencedRpcEndpoint has not bee... | java | protected <V> CompletableFuture<V> callAsyncWithoutFencing(Callable<V> callable, Time timeout) {
if (rpcServer instanceof FencedMainThreadExecutable) {
return ((FencedMainThreadExecutable) rpcServer).callAsyncWithoutFencing(callable, timeout);
} else {
throw new RuntimeException("FencedRpcEndpoint has not bee... | [
"protected",
"<",
"V",
">",
"CompletableFuture",
"<",
"V",
">",
"callAsyncWithoutFencing",
"(",
"Callable",
"<",
"V",
">",
"callable",
",",
"Time",
"timeout",
")",
"{",
"if",
"(",
"rpcServer",
"instanceof",
"FencedMainThreadExecutable",
")",
"{",
"return",
"("... | Run the given callable in the main thread of the RpcEndpoint without checking the fencing
token. This allows to run operations outside of the fencing token scope.
@param callable to run in the main thread of the rpc endpoint without checkint the fencing token.
@param timeout for the operation.
@return Future containin... | [
"Run",
"the",
"given",
"callable",
"in",
"the",
"main",
"thread",
"of",
"the",
"RpcEndpoint",
"without",
"checking",
"the",
"fencing",
"token",
".",
"This",
"allows",
"to",
"run",
"operations",
"outside",
"of",
"the",
"fencing",
"token",
"scope",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rpc/FencedRpcEndpoint.java#L133-L139 |
123,912 | apache/flink | flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/fs/hdfs/HadoopFileSystem.java | HadoopFileSystem.getKindForScheme | static FileSystemKind getKindForScheme(String scheme) {
scheme = scheme.toLowerCase(Locale.US);
if (scheme.startsWith("s3") || scheme.startsWith("emr") || scheme.startsWith("oss")) {
// the Amazon S3 storage or Aliyun OSS storage
return FileSystemKind.OBJECT_STORE;
}
else if (scheme.startsWith("http") ||... | java | static FileSystemKind getKindForScheme(String scheme) {
scheme = scheme.toLowerCase(Locale.US);
if (scheme.startsWith("s3") || scheme.startsWith("emr") || scheme.startsWith("oss")) {
// the Amazon S3 storage or Aliyun OSS storage
return FileSystemKind.OBJECT_STORE;
}
else if (scheme.startsWith("http") ||... | [
"static",
"FileSystemKind",
"getKindForScheme",
"(",
"String",
"scheme",
")",
"{",
"scheme",
"=",
"scheme",
".",
"toLowerCase",
"(",
"Locale",
".",
"US",
")",
";",
"if",
"(",
"scheme",
".",
"startsWith",
"(",
"\"s3\"",
")",
"||",
"scheme",
".",
"startsWith... | Gets the kind of the file system from its scheme.
<p>Implementation note: Initially, especially within the Flink 1.3.x line
(in order to not break backwards compatibility), we must only label file systems
as 'inconsistent' or as 'not proper filesystems' if we are sure about it.
Otherwise, we cause regression for examp... | [
"Gets",
"the",
"kind",
"of",
"the",
"file",
"system",
"from",
"its",
"scheme",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/fs/hdfs/HadoopFileSystem.java#L224-L242 |
123,913 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CompletedCheckpointStatsSummary.java | CompletedCheckpointStatsSummary.updateSummary | void updateSummary(CompletedCheckpointStats completed) {
stateSize.add(completed.getStateSize());
duration.add(completed.getEndToEndDuration());
alignmentBuffered.add(completed.getAlignmentBuffered());
} | java | void updateSummary(CompletedCheckpointStats completed) {
stateSize.add(completed.getStateSize());
duration.add(completed.getEndToEndDuration());
alignmentBuffered.add(completed.getAlignmentBuffered());
} | [
"void",
"updateSummary",
"(",
"CompletedCheckpointStats",
"completed",
")",
"{",
"stateSize",
".",
"add",
"(",
"completed",
".",
"getStateSize",
"(",
")",
")",
";",
"duration",
".",
"add",
"(",
"completed",
".",
"getEndToEndDuration",
"(",
")",
")",
";",
"al... | Updates the summary with the given completed checkpoint.
@param completed Completed checkpoint to update the summary with. | [
"Updates",
"the",
"summary",
"with",
"the",
"given",
"completed",
"checkpoint",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CompletedCheckpointStatsSummary.java#L60-L64 |
123,914 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BaseHybridHashTable.java | BaseHybridHashTable.getPartitioningFanOutNoEstimates | private int getPartitioningFanOutNoEstimates() {
return Math.max(11, findSmallerPrime((int) Math.min(buildRowCount * avgRecordLen / (10 * segmentSize),
MAX_NUM_PARTITIONS)));
} | java | private int getPartitioningFanOutNoEstimates() {
return Math.max(11, findSmallerPrime((int) Math.min(buildRowCount * avgRecordLen / (10 * segmentSize),
MAX_NUM_PARTITIONS)));
} | [
"private",
"int",
"getPartitioningFanOutNoEstimates",
"(",
")",
"{",
"return",
"Math",
".",
"max",
"(",
"11",
",",
"findSmallerPrime",
"(",
"(",
"int",
")",
"Math",
".",
"min",
"(",
"buildRowCount",
"*",
"avgRecordLen",
"/",
"(",
"10",
"*",
"segmentSize",
... | Gets the number of partitions to be used for an initial hash-table. | [
"Gets",
"the",
"number",
"of",
"partitions",
"to",
"be",
"used",
"for",
"an",
"initial",
"hash",
"-",
"table",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BaseHybridHashTable.java#L248-L251 |
123,915 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BaseHybridHashTable.java | BaseHybridHashTable.freeCurrent | public void freeCurrent() {
int beforeReleaseNum = availableMemory.size();
memManager.release(availableMemory);
allocatedFloatingNum -= (beforeReleaseNum - availableMemory.size());
} | java | public void freeCurrent() {
int beforeReleaseNum = availableMemory.size();
memManager.release(availableMemory);
allocatedFloatingNum -= (beforeReleaseNum - availableMemory.size());
} | [
"public",
"void",
"freeCurrent",
"(",
")",
"{",
"int",
"beforeReleaseNum",
"=",
"availableMemory",
".",
"size",
"(",
")",
";",
"memManager",
".",
"release",
"(",
"availableMemory",
")",
";",
"allocatedFloatingNum",
"-=",
"(",
"beforeReleaseNum",
"-",
"availableM... | Free the memory not used. | [
"Free",
"the",
"memory",
"not",
"used",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BaseHybridHashTable.java#L484-L488 |
123,916 | apache/flink | flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java | Configuration.addDeprecations | public static void addDeprecations(DeprecationDelta[] deltas) {
DeprecationContext prev, next;
do {
prev = deprecationContext.get();
next = new DeprecationContext(prev, deltas);
} while (!deprecationContext.compareAndSet(prev, next));
} | java | public static void addDeprecations(DeprecationDelta[] deltas) {
DeprecationContext prev, next;
do {
prev = deprecationContext.get();
next = new DeprecationContext(prev, deltas);
} while (!deprecationContext.compareAndSet(prev, next));
} | [
"public",
"static",
"void",
"addDeprecations",
"(",
"DeprecationDelta",
"[",
"]",
"deltas",
")",
"{",
"DeprecationContext",
"prev",
",",
"next",
";",
"do",
"{",
"prev",
"=",
"deprecationContext",
".",
"get",
"(",
")",
";",
"next",
"=",
"new",
"DeprecationCon... | Adds a set of deprecated keys to the global deprecations.
This method is lockless. It works by means of creating a new
DeprecationContext based on the old one, and then atomically swapping in
the new context. If someone else updated the context in between us reading
the old context and swapping in the new one, we tr... | [
"Adds",
"a",
"set",
"of",
"deprecated",
"keys",
"to",
"the",
"global",
"deprecations",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java#L456-L462 |
123,917 | apache/flink | flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java | Configuration.setDeprecatedProperties | public void setDeprecatedProperties() {
DeprecationContext deprecations = deprecationContext.get();
Properties props = getProps();
Properties overlay = getOverlay();
for (Map.Entry<String, DeprecatedKeyInfo> entry :
deprecations.getDeprecatedKeyMap().entrySet()) {
String depKey = entry.getKey();
if (!... | java | public void setDeprecatedProperties() {
DeprecationContext deprecations = deprecationContext.get();
Properties props = getProps();
Properties overlay = getOverlay();
for (Map.Entry<String, DeprecatedKeyInfo> entry :
deprecations.getDeprecatedKeyMap().entrySet()) {
String depKey = entry.getKey();
if (!... | [
"public",
"void",
"setDeprecatedProperties",
"(",
")",
"{",
"DeprecationContext",
"deprecations",
"=",
"deprecationContext",
".",
"get",
"(",
")",
";",
"Properties",
"props",
"=",
"getProps",
"(",
")",
";",
"Properties",
"overlay",
"=",
"getOverlay",
"(",
")",
... | Sets all deprecated properties that are not currently set but have a
corresponding new property that is set. Useful for iterating the
properties when all deprecated properties for currently set properties
need to be present. | [
"Sets",
"all",
"deprecated",
"properties",
"that",
"are",
"not",
"currently",
"set",
"but",
"have",
"a",
"corresponding",
"new",
"property",
"that",
"is",
"set",
".",
"Useful",
"for",
"iterating",
"the",
"properties",
"when",
"all",
"deprecated",
"properties",
... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java#L578-L596 |
123,918 | apache/flink | flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java | Configuration.reloadExistingConfigurations | public static synchronized void reloadExistingConfigurations() {
if (LOG.isDebugEnabled()) {
LOG.debug("Reloading " + REGISTRY.keySet().size()
+ " existing configurations");
}
for (Configuration conf : REGISTRY.keySet()) {
conf.reloadConfiguration();
}
} | java | public static synchronized void reloadExistingConfigurations() {
if (LOG.isDebugEnabled()) {
LOG.debug("Reloading " + REGISTRY.keySet().size()
+ " existing configurations");
}
for (Configuration conf : REGISTRY.keySet()) {
conf.reloadConfiguration();
}
} | [
"public",
"static",
"synchronized",
"void",
"reloadExistingConfigurations",
"(",
")",
"{",
"if",
"(",
"LOG",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"LOG",
".",
"debug",
"(",
"\"Reloading \"",
"+",
"REGISTRY",
".",
"keySet",
"(",
")",
".",
"size",
"(",
... | Reload existing configuration instances. | [
"Reload",
"existing",
"configuration",
"instances",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java#L730-L738 |
123,919 | apache/flink | flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java | Configuration.getStorageSize | public double getStorageSize(String name, String defaultValue,
StorageUnit targetUnit) {
Preconditions.checkState(isNotBlank(name), "Key cannot be blank.");
String vString = get(name);
if (isBlank(vString)) {
vString = defaultValue;
}
// Please note: There is a bit of subtlet... | java | public double getStorageSize(String name, String defaultValue,
StorageUnit targetUnit) {
Preconditions.checkState(isNotBlank(name), "Key cannot be blank.");
String vString = get(name);
if (isBlank(vString)) {
vString = defaultValue;
}
// Please note: There is a bit of subtlet... | [
"public",
"double",
"getStorageSize",
"(",
"String",
"name",
",",
"String",
"defaultValue",
",",
"StorageUnit",
"targetUnit",
")",
"{",
"Preconditions",
".",
"checkState",
"(",
"isNotBlank",
"(",
"name",
")",
",",
"\"Key cannot be blank.\"",
")",
";",
"String",
... | Gets the Storage Size from the config, or returns the defaultValue. The
unit of return value is specified in target unit.
@param name - Key Name
@param defaultValue - Default Value -- e.g. 100MB
@param targetUnit - The units that we want result to be in.
@return double -- formatted in target Units | [
"Gets",
"the",
"Storage",
"Size",
"from",
"the",
"config",
"or",
"returns",
"the",
"defaultValue",
".",
"The",
"unit",
"of",
"return",
"value",
"is",
"specified",
"in",
"target",
"unit",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java#L1725-L1742 |
123,920 | apache/flink | flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java | Configuration.setStorageSize | public void setStorageSize(String name, double value, StorageUnit unit) {
set(name, value + unit.getShortName());
} | java | public void setStorageSize(String name, double value, StorageUnit unit) {
set(name, value + unit.getShortName());
} | [
"public",
"void",
"setStorageSize",
"(",
"String",
"name",
",",
"double",
"value",
",",
"StorageUnit",
"unit",
")",
"{",
"set",
"(",
"name",
",",
"value",
"+",
"unit",
".",
"getShortName",
"(",
")",
")",
";",
"}"
] | Sets Storage Size for the specified key.
@param name - Key to set.
@param value - The numeric value to set.
@param unit - Storage Unit to be used. | [
"Sets",
"Storage",
"Size",
"for",
"the",
"specified",
"key",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java#L1776-L1778 |
123,921 | apache/flink | flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java | Configuration.convertStorageUnit | private double convertStorageUnit(double value, StorageUnit sourceUnit,
StorageUnit targetUnit) {
double byteValue = sourceUnit.toBytes(value);
return targetUnit.fromBytes(byteValue);
} | java | private double convertStorageUnit(double value, StorageUnit sourceUnit,
StorageUnit targetUnit) {
double byteValue = sourceUnit.toBytes(value);
return targetUnit.fromBytes(byteValue);
} | [
"private",
"double",
"convertStorageUnit",
"(",
"double",
"value",
",",
"StorageUnit",
"sourceUnit",
",",
"StorageUnit",
"targetUnit",
")",
"{",
"double",
"byteValue",
"=",
"sourceUnit",
".",
"toBytes",
"(",
"value",
")",
";",
"return",
"targetUnit",
".",
"fromB... | convert the value from one storage unit to another.
@param value - value
@param sourceUnit - Source unit to convert from
@param targetUnit - target unit.
@return double. | [
"convert",
"the",
"value",
"from",
"one",
"storage",
"unit",
"to",
"another",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java#L1788-L1792 |
123,922 | apache/flink | flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java | Configuration.getRange | public IntegerRanges getRange(String name, String defaultValue) {
return new IntegerRanges(get(name, defaultValue));
} | java | public IntegerRanges getRange(String name, String defaultValue) {
return new IntegerRanges(get(name, defaultValue));
} | [
"public",
"IntegerRanges",
"getRange",
"(",
"String",
"name",
",",
"String",
"defaultValue",
")",
"{",
"return",
"new",
"IntegerRanges",
"(",
"get",
"(",
"name",
",",
"defaultValue",
")",
")",
";",
"}"
] | Parse the given attribute as a set of integer ranges
@param name the attribute name
@param defaultValue the default value if it is not set
@return a new set of ranges from the configured value | [
"Parse",
"the",
"given",
"attribute",
"as",
"a",
"set",
"of",
"integer",
"ranges"
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java#L2033-L2035 |
123,923 | apache/flink | flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java | Configuration.getPassword | public char[] getPassword(String name) throws IOException {
char[] pass = null;
pass = getPasswordFromCredentialProviders(name);
if (pass == null) {
pass = getPasswordFromConfig(name);
}
return pass;
} | java | public char[] getPassword(String name) throws IOException {
char[] pass = null;
pass = getPasswordFromCredentialProviders(name);
if (pass == null) {
pass = getPasswordFromConfig(name);
}
return pass;
} | [
"public",
"char",
"[",
"]",
"getPassword",
"(",
"String",
"name",
")",
"throws",
"IOException",
"{",
"char",
"[",
"]",
"pass",
"=",
"null",
";",
"pass",
"=",
"getPasswordFromCredentialProviders",
"(",
"name",
")",
";",
"if",
"(",
"pass",
"==",
"null",
")... | Get the value for a known password configuration element.
In order to enable the elimination of clear text passwords in config,
this method attempts to resolve the property name as an alias through
the CredentialProvider API and conditionally fallsback to config.
@param name property name
@return password | [
"Get",
"the",
"value",
"for",
"a",
"known",
"password",
"configuration",
"element",
".",
"In",
"order",
"to",
"enable",
"the",
"elimination",
"of",
"clear",
"text",
"passwords",
"in",
"config",
"this",
"method",
"attempts",
"to",
"resolve",
"the",
"property",
... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java#L2154-L2164 |
123,924 | apache/flink | flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java | Configuration.getCredentialEntry | private CredentialEntry getCredentialEntry(CredentialProvider provider,
String name) throws IOException {
CredentialEntry entry = provider.getCredentialEntry(name);
if (entry != null) {
return entry;
}
// The old name is stored in the credential provider.
String... | java | private CredentialEntry getCredentialEntry(CredentialProvider provider,
String name) throws IOException {
CredentialEntry entry = provider.getCredentialEntry(name);
if (entry != null) {
return entry;
}
// The old name is stored in the credential provider.
String... | [
"private",
"CredentialEntry",
"getCredentialEntry",
"(",
"CredentialProvider",
"provider",
",",
"String",
"name",
")",
"throws",
"IOException",
"{",
"CredentialEntry",
"entry",
"=",
"provider",
".",
"getCredentialEntry",
"(",
"name",
")",
";",
"if",
"(",
"entry",
... | Get the credential entry by name from a credential provider.
Handle key deprecation.
@param provider a credential provider
@param name alias of the credential
@return the credential entry or null if not found | [
"Get",
"the",
"credential",
"entry",
"by",
"name",
"from",
"a",
"credential",
"provider",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java#L2175-L2205 |
123,925 | apache/flink | flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java | Configuration.getClassByNameOrNull | public Class<?> getClassByNameOrNull(String name) {
Map<String, WeakReference<Class<?>>> map;
synchronized (CACHE_CLASSES) {
map = CACHE_CLASSES.get(classLoader);
if (map == null) {
map = Collections.synchronizedMap(
new WeakHashMap<String, WeakReference<Class<?>>>());
CACHE_CLASSES.put(classLo... | java | public Class<?> getClassByNameOrNull(String name) {
Map<String, WeakReference<Class<?>>> map;
synchronized (CACHE_CLASSES) {
map = CACHE_CLASSES.get(classLoader);
if (map == null) {
map = Collections.synchronizedMap(
new WeakHashMap<String, WeakReference<Class<?>>>());
CACHE_CLASSES.put(classLo... | [
"public",
"Class",
"<",
"?",
">",
"getClassByNameOrNull",
"(",
"String",
"name",
")",
"{",
"Map",
"<",
"String",
",",
"WeakReference",
"<",
"Class",
"<",
"?",
">",
">",
">",
"map",
";",
"synchronized",
"(",
"CACHE_CLASSES",
")",
"{",
"map",
"=",
"CACHE... | Load a class by name, returning null rather than throwing an exception
if it couldn't be loaded. This is to avoid the overhead of creating
an exception.
@param name the class name
@return the class object, or null if it could not be found. | [
"Load",
"a",
"class",
"by",
"name",
"returning",
"null",
"rather",
"than",
"throwing",
"an",
"exception",
"if",
"it",
"couldn",
"t",
"be",
"loaded",
".",
"This",
"is",
"to",
"avoid",
"the",
"overhead",
"of",
"creating",
"an",
"exception",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java#L2388-L2423 |
123,926 | apache/flink | flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java | Configuration.getFinalParameters | public Set<String> getFinalParameters() {
Set<String> setFinalParams = Collections.newSetFromMap(
new ConcurrentHashMap<String, Boolean>());
setFinalParams.addAll(finalParameters);
return setFinalParams;
} | java | public Set<String> getFinalParameters() {
Set<String> setFinalParams = Collections.newSetFromMap(
new ConcurrentHashMap<String, Boolean>());
setFinalParams.addAll(finalParameters);
return setFinalParams;
} | [
"public",
"Set",
"<",
"String",
">",
"getFinalParameters",
"(",
")",
"{",
"Set",
"<",
"String",
">",
"setFinalParams",
"=",
"Collections",
".",
"newSetFromMap",
"(",
"new",
"ConcurrentHashMap",
"<",
"String",
",",
"Boolean",
">",
"(",
")",
")",
";",
"setFi... | Get the set of parameters marked final.
@return final parameter set. | [
"Get",
"the",
"set",
"of",
"parameters",
"marked",
"final",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java#L2669-L2674 |
123,927 | apache/flink | flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java | Configuration.checkForOverride | private void checkForOverride(Properties properties, String name, String attr, String value) {
String propertyValue = properties.getProperty(attr);
if (propertyValue != null && !propertyValue.equals(value)) {
LOG.warn(name + ":an attempt to override final parameter: " + attr
+ "; Ignoring.");
}
} | java | private void checkForOverride(Properties properties, String name, String attr, String value) {
String propertyValue = properties.getProperty(attr);
if (propertyValue != null && !propertyValue.equals(value)) {
LOG.warn(name + ":an attempt to override final parameter: " + attr
+ "; Ignoring.");
}
} | [
"private",
"void",
"checkForOverride",
"(",
"Properties",
"properties",
",",
"String",
"name",
",",
"String",
"attr",
",",
"String",
"value",
")",
"{",
"String",
"propertyValue",
"=",
"properties",
".",
"getProperty",
"(",
"attr",
")",
";",
"if",
"(",
"prope... | Print a warning if a property with a given name already exists with a
different value | [
"Print",
"a",
"warning",
"if",
"a",
"property",
"with",
"a",
"given",
"name",
"already",
"exists",
"with",
"a",
"different",
"value"
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java#L3078-L3084 |
123,928 | apache/flink | flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java | Configuration.hasWarnedDeprecation | public static boolean hasWarnedDeprecation(String name) {
DeprecationContext deprecations = deprecationContext.get();
if(deprecations.getDeprecatedKeyMap().containsKey(name)) {
if(deprecations.getDeprecatedKeyMap().get(name).accessed.get()) {
return true;
}
}
return false;
} | java | public static boolean hasWarnedDeprecation(String name) {
DeprecationContext deprecations = deprecationContext.get();
if(deprecations.getDeprecatedKeyMap().containsKey(name)) {
if(deprecations.getDeprecatedKeyMap().get(name).accessed.get()) {
return true;
}
}
return false;
} | [
"public",
"static",
"boolean",
"hasWarnedDeprecation",
"(",
"String",
"name",
")",
"{",
"DeprecationContext",
"deprecations",
"=",
"deprecationContext",
".",
"get",
"(",
")",
";",
"if",
"(",
"deprecations",
".",
"getDeprecatedKeyMap",
"(",
")",
".",
"containsKey",... | Returns whether or not a deprecated name has been warned. If the name is not
deprecated then always return false | [
"Returns",
"whether",
"or",
"not",
"a",
"deprecated",
"name",
"has",
"been",
"warned",
".",
"If",
"the",
"name",
"is",
"not",
"deprecated",
"then",
"always",
"return",
"false"
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java#L3512-L3520 |
123,929 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BinaryHashTable.java | BinaryHashTable.putBuildRow | public void putBuildRow(BaseRow row) throws IOException {
final int hashCode = hash(this.buildSideProjection.apply(row).hashCode(), 0);
// TODO: combine key projection and build side conversion to code gen.
insertIntoTable(originBuildSideSerializer.baseRowToBinary(row), hashCode);
} | java | public void putBuildRow(BaseRow row) throws IOException {
final int hashCode = hash(this.buildSideProjection.apply(row).hashCode(), 0);
// TODO: combine key projection and build side conversion to code gen.
insertIntoTable(originBuildSideSerializer.baseRowToBinary(row), hashCode);
} | [
"public",
"void",
"putBuildRow",
"(",
"BaseRow",
"row",
")",
"throws",
"IOException",
"{",
"final",
"int",
"hashCode",
"=",
"hash",
"(",
"this",
".",
"buildSideProjection",
".",
"apply",
"(",
"row",
")",
".",
"hashCode",
"(",
")",
",",
"0",
")",
";",
"... | Put a build side row to hash table. | [
"Put",
"a",
"build",
"side",
"row",
"to",
"hash",
"table",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BinaryHashTable.java#L243-L247 |
123,930 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BinaryHashTable.java | BinaryHashTable.endBuild | public void endBuild() throws IOException {
// finalize the partitions
int buildWriteBuffers = 0;
for (BinaryHashPartition p : this.partitionsBeingBuilt) {
buildWriteBuffers += p.finalizeBuildPhase(this.ioManager, this.currentEnumerator);
}
buildSpillRetBufferNumbers += buildWriteBuffers;
// the first p... | java | public void endBuild() throws IOException {
// finalize the partitions
int buildWriteBuffers = 0;
for (BinaryHashPartition p : this.partitionsBeingBuilt) {
buildWriteBuffers += p.finalizeBuildPhase(this.ioManager, this.currentEnumerator);
}
buildSpillRetBufferNumbers += buildWriteBuffers;
// the first p... | [
"public",
"void",
"endBuild",
"(",
")",
"throws",
"IOException",
"{",
"// finalize the partitions",
"int",
"buildWriteBuffers",
"=",
"0",
";",
"for",
"(",
"BinaryHashPartition",
"p",
":",
"this",
".",
"partitionsBeingBuilt",
")",
"{",
"buildWriteBuffers",
"+=",
"p... | End build phase. | [
"End",
"build",
"phase",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BinaryHashTable.java#L252-L265 |
123,931 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BinaryHashTable.java | BinaryHashTable.tryProbe | public boolean tryProbe(BaseRow record) throws IOException {
if (!this.probeIterator.hasSource()) {
// set the current probe value when probeIterator is null at the begging.
this.probeIterator.setInstance(record);
}
// calculate the hash
BinaryRow probeKey = probeSideProjection.apply(record);
final int ... | java | public boolean tryProbe(BaseRow record) throws IOException {
if (!this.probeIterator.hasSource()) {
// set the current probe value when probeIterator is null at the begging.
this.probeIterator.setInstance(record);
}
// calculate the hash
BinaryRow probeKey = probeSideProjection.apply(record);
final int ... | [
"public",
"boolean",
"tryProbe",
"(",
"BaseRow",
"record",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"this",
".",
"probeIterator",
".",
"hasSource",
"(",
")",
")",
"{",
"// set the current probe value when probeIterator is null at the begging.",
"this",
".",
... | Find matched build side rows for a probe row.
@return return false if the target partition has spilled, we will spill this probe row too.
The row will be re-match in rebuild phase. | [
"Find",
"matched",
"build",
"side",
"rows",
"for",
"a",
"probe",
"row",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BinaryHashTable.java#L274-L298 |
123,932 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/io/disk/iomanager/IOManager.java | IOManager.isProperlyShutDown | public boolean isProperlyShutDown() {
for (File path : paths) {
if (path != null && path.exists()) {
return false;
}
}
return true;
} | java | public boolean isProperlyShutDown() {
for (File path : paths) {
if (path != null && path.exists()) {
return false;
}
}
return true;
} | [
"public",
"boolean",
"isProperlyShutDown",
"(",
")",
"{",
"for",
"(",
"File",
"path",
":",
"paths",
")",
"{",
"if",
"(",
"path",
"!=",
"null",
"&&",
"path",
".",
"exists",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"}",
"return",
"true",
";",... | Utility method to check whether the IO manager has been properly shut down.
For this base implementation, this means that all files have been removed.
@return True, if the IO manager has properly shut down, false otherwise. | [
"Utility",
"method",
"to",
"check",
"whether",
"the",
"IO",
"manager",
"has",
"been",
"properly",
"shut",
"down",
".",
"For",
"this",
"base",
"implementation",
"this",
"means",
"that",
"all",
"files",
"have",
"been",
"removed",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/disk/iomanager/IOManager.java#L109-L116 |
123,933 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/io/disk/iomanager/IOManager.java | IOManager.deleteChannel | public void deleteChannel(FileIOChannel.ID channel) throws IOException {
if (channel != null) {
if (channel.getPathFile().exists() && !channel.getPathFile().delete()) {
LOG.warn("IOManager failed to delete temporary file {}", channel.getPath());
}
}
} | java | public void deleteChannel(FileIOChannel.ID channel) throws IOException {
if (channel != null) {
if (channel.getPathFile().exists() && !channel.getPathFile().delete()) {
LOG.warn("IOManager failed to delete temporary file {}", channel.getPath());
}
}
} | [
"public",
"void",
"deleteChannel",
"(",
"FileIOChannel",
".",
"ID",
"channel",
")",
"throws",
"IOException",
"{",
"if",
"(",
"channel",
"!=",
"null",
")",
"{",
"if",
"(",
"channel",
".",
"getPathFile",
"(",
")",
".",
"exists",
"(",
")",
"&&",
"!",
"cha... | Deletes the file underlying the given channel. If the channel is still open, this
call may fail.
@param channel The channel to be deleted.
@throws IOException Thrown if the deletion fails. | [
"Deletes",
"the",
"file",
"underlying",
"the",
"given",
"channel",
".",
"If",
"the",
"channel",
"is",
"still",
"open",
"this",
"call",
"may",
"fail",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/disk/iomanager/IOManager.java#L150-L156 |
123,934 | apache/flink | flink-core/src/main/java/org/apache/flink/util/StringUtils.java | StringUtils.byteToHexString | public static String byteToHexString(final byte[] bytes, final int start, final int end) {
if (bytes == null) {
throw new IllegalArgumentException("bytes == null");
}
int length = end - start;
char[] out = new char[length * 2];
for (int i = start, j = 0; i < end; i++) {
out[j++] = HEX_CHARS[(0xF0 & by... | java | public static String byteToHexString(final byte[] bytes, final int start, final int end) {
if (bytes == null) {
throw new IllegalArgumentException("bytes == null");
}
int length = end - start;
char[] out = new char[length * 2];
for (int i = start, j = 0; i < end; i++) {
out[j++] = HEX_CHARS[(0xF0 & by... | [
"public",
"static",
"String",
"byteToHexString",
"(",
"final",
"byte",
"[",
"]",
"bytes",
",",
"final",
"int",
"start",
",",
"final",
"int",
"end",
")",
"{",
"if",
"(",
"bytes",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"... | Given an array of bytes it will convert the bytes to a hex string
representation of the bytes.
@param bytes
the bytes to convert in a hex string
@param start
start index, inclusively
@param end
end index, exclusively
@return hex string representation of the byte array | [
"Given",
"an",
"array",
"of",
"bytes",
"it",
"will",
"convert",
"the",
"bytes",
"to",
"a",
"hex",
"string",
"representation",
"of",
"the",
"bytes",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/StringUtils.java#L58-L72 |
123,935 | apache/flink | flink-core/src/main/java/org/apache/flink/util/StringUtils.java | StringUtils.generateRandomAlphanumericString | public static String generateRandomAlphanumericString(Random rnd, int length) {
checkNotNull(rnd);
checkArgument(length >= 0);
StringBuilder buffer = new StringBuilder(length);
for (int i = 0; i < length; i++) {
buffer.append(nextAlphanumericChar(rnd));
}
return buffer.toString();
} | java | public static String generateRandomAlphanumericString(Random rnd, int length) {
checkNotNull(rnd);
checkArgument(length >= 0);
StringBuilder buffer = new StringBuilder(length);
for (int i = 0; i < length; i++) {
buffer.append(nextAlphanumericChar(rnd));
}
return buffer.toString();
} | [
"public",
"static",
"String",
"generateRandomAlphanumericString",
"(",
"Random",
"rnd",
",",
"int",
"length",
")",
"{",
"checkNotNull",
"(",
"rnd",
")",
";",
"checkArgument",
"(",
"length",
">=",
"0",
")",
";",
"StringBuilder",
"buffer",
"=",
"new",
"StringBui... | Creates a random alphanumeric string of given length.
@param rnd The random number generator to use.
@param length The number of alphanumeric characters to append. | [
"Creates",
"a",
"random",
"alphanumeric",
"string",
"of",
"given",
"length",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/StringUtils.java#L258-L267 |
123,936 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/sort/BinaryExternalSorter.java | BinaryExternalSorter.startThreads | public void startThreads() {
if (this.sortThread != null) {
this.sortThread.start();
}
if (this.spillThread != null) {
this.spillThread.start();
}
if (this.mergeThread != null) {
this.mergeThread.start();
}
} | java | public void startThreads() {
if (this.sortThread != null) {
this.sortThread.start();
}
if (this.spillThread != null) {
this.spillThread.start();
}
if (this.mergeThread != null) {
this.mergeThread.start();
}
} | [
"public",
"void",
"startThreads",
"(",
")",
"{",
"if",
"(",
"this",
".",
"sortThread",
"!=",
"null",
")",
"{",
"this",
".",
"sortThread",
".",
"start",
"(",
")",
";",
"}",
"if",
"(",
"this",
".",
"spillThread",
"!=",
"null",
")",
"{",
"this",
".",
... | Starts all the threads that are used by this sorter. | [
"Starts",
"all",
"the",
"threads",
"that",
"are",
"used",
"by",
"this",
"sorter",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/sort/BinaryExternalSorter.java#L347-L357 |
123,937 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/state/AbstractKeyedStateBackend.java | AbstractKeyedStateBackend.dispose | @Override
public void dispose() {
IOUtils.closeQuietly(cancelStreamRegistry);
if (kvStateRegistry != null) {
kvStateRegistry.unregisterAll();
}
lastName = null;
lastState = null;
keyValueStatesByName.clear();
} | java | @Override
public void dispose() {
IOUtils.closeQuietly(cancelStreamRegistry);
if (kvStateRegistry != null) {
kvStateRegistry.unregisterAll();
}
lastName = null;
lastState = null;
keyValueStatesByName.clear();
} | [
"@",
"Override",
"public",
"void",
"dispose",
"(",
")",
"{",
"IOUtils",
".",
"closeQuietly",
"(",
"cancelStreamRegistry",
")",
";",
"if",
"(",
"kvStateRegistry",
"!=",
"null",
")",
"{",
"kvStateRegistry",
".",
"unregisterAll",
"(",
")",
";",
"}",
"lastName",... | Closes the state backend, releasing all internal resources, but does not delete any persistent
checkpoint data. | [
"Closes",
"the",
"state",
"backend",
"releasing",
"all",
"internal",
"resources",
"but",
"does",
"not",
"delete",
"any",
"persistent",
"checkpoint",
"data",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/state/AbstractKeyedStateBackend.java#L154-L166 |
123,938 | apache/flink | flink-core/src/main/java/org/apache/flink/util/WrappingProxyUtil.java | WrappingProxyUtil.stripProxy | @SuppressWarnings("unchecked")
public static <T> T stripProxy(@Nullable final WrappingProxy<T> wrappingProxy) {
if (wrappingProxy == null) {
return null;
}
T delegate = wrappingProxy.getWrappedDelegate();
int numProxiesStripped = 0;
while (delegate instanceof WrappingProxy) {
throwIfSafetyNetExceeded... | java | @SuppressWarnings("unchecked")
public static <T> T stripProxy(@Nullable final WrappingProxy<T> wrappingProxy) {
if (wrappingProxy == null) {
return null;
}
T delegate = wrappingProxy.getWrappedDelegate();
int numProxiesStripped = 0;
while (delegate instanceof WrappingProxy) {
throwIfSafetyNetExceeded... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"T",
">",
"T",
"stripProxy",
"(",
"@",
"Nullable",
"final",
"WrappingProxy",
"<",
"T",
">",
"wrappingProxy",
")",
"{",
"if",
"(",
"wrappingProxy",
"==",
"null",
")",
"{",
"return"... | Expects a proxy, and returns the unproxied delegate.
@param wrappingProxy The initial proxy.
@param <T> The type of the delegate. Note that all proxies in the chain must be assignable to T.
@return The unproxied delegate. | [
"Expects",
"a",
"proxy",
"and",
"returns",
"the",
"unproxied",
"delegate",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/WrappingProxyUtil.java#L48-L63 |
123,939 | apache/flink | flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/restore/AbstractRocksDBRestoreOperation.java | AbstractRocksDBRestoreOperation.close | @Override
public void close() {
IOUtils.closeQuietly(defaultColumnFamilyHandle);
IOUtils.closeQuietly(nativeMetricMonitor);
IOUtils.closeQuietly(db);
// Making sure the already created column family options will be closed
columnFamilyDescriptors.forEach((cfd) -> IOUtils.closeQuietly(cfd.getOptions()));
} | java | @Override
public void close() {
IOUtils.closeQuietly(defaultColumnFamilyHandle);
IOUtils.closeQuietly(nativeMetricMonitor);
IOUtils.closeQuietly(db);
// Making sure the already created column family options will be closed
columnFamilyDescriptors.forEach((cfd) -> IOUtils.closeQuietly(cfd.getOptions()));
} | [
"@",
"Override",
"public",
"void",
"close",
"(",
")",
"{",
"IOUtils",
".",
"closeQuietly",
"(",
"defaultColumnFamilyHandle",
")",
";",
"IOUtils",
".",
"closeQuietly",
"(",
"nativeMetricMonitor",
")",
";",
"IOUtils",
".",
"closeQuietly",
"(",
"db",
")",
";",
... | Necessary clean up iff restore operation failed. | [
"Necessary",
"clean",
"up",
"iff",
"restore",
"operation",
"failed",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/restore/AbstractRocksDBRestoreOperation.java#L206-L213 |
123,940 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/net/SSLUtils.java | SSLUtils.isRestSSLEnabled | public static boolean isRestSSLEnabled(Configuration sslConfig) {
@SuppressWarnings("deprecation")
final boolean fallbackFlag = sslConfig.getBoolean(SecurityOptions.SSL_ENABLED);
return sslConfig.getBoolean(SecurityOptions.SSL_REST_ENABLED, fallbackFlag);
} | java | public static boolean isRestSSLEnabled(Configuration sslConfig) {
@SuppressWarnings("deprecation")
final boolean fallbackFlag = sslConfig.getBoolean(SecurityOptions.SSL_ENABLED);
return sslConfig.getBoolean(SecurityOptions.SSL_REST_ENABLED, fallbackFlag);
} | [
"public",
"static",
"boolean",
"isRestSSLEnabled",
"(",
"Configuration",
"sslConfig",
")",
"{",
"@",
"SuppressWarnings",
"(",
"\"deprecation\"",
")",
"final",
"boolean",
"fallbackFlag",
"=",
"sslConfig",
".",
"getBoolean",
"(",
"SecurityOptions",
".",
"SSL_ENABLED",
... | Checks whether SSL for the external REST endpoint is enabled. | [
"Checks",
"whether",
"SSL",
"for",
"the",
"external",
"REST",
"endpoint",
"is",
"enabled",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/net/SSLUtils.java#L65-L69 |
123,941 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/net/SSLUtils.java | SSLUtils.isRestSSLAuthenticationEnabled | public static boolean isRestSSLAuthenticationEnabled(Configuration sslConfig) {
checkNotNull(sslConfig, "sslConfig");
return isRestSSLEnabled(sslConfig) &&
sslConfig.getBoolean(SecurityOptions.SSL_REST_AUTHENTICATION_ENABLED);
} | java | public static boolean isRestSSLAuthenticationEnabled(Configuration sslConfig) {
checkNotNull(sslConfig, "sslConfig");
return isRestSSLEnabled(sslConfig) &&
sslConfig.getBoolean(SecurityOptions.SSL_REST_AUTHENTICATION_ENABLED);
} | [
"public",
"static",
"boolean",
"isRestSSLAuthenticationEnabled",
"(",
"Configuration",
"sslConfig",
")",
"{",
"checkNotNull",
"(",
"sslConfig",
",",
"\"sslConfig\"",
")",
";",
"return",
"isRestSSLEnabled",
"(",
"sslConfig",
")",
"&&",
"sslConfig",
".",
"getBoolean",
... | Checks whether mutual SSL authentication for the external REST endpoint is enabled. | [
"Checks",
"whether",
"mutual",
"SSL",
"authentication",
"for",
"the",
"external",
"REST",
"endpoint",
"is",
"enabled",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/net/SSLUtils.java#L74-L78 |
123,942 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/net/SSLUtils.java | SSLUtils.createSSLServerSocketFactory | public static ServerSocketFactory createSSLServerSocketFactory(Configuration config) throws Exception {
SSLContext sslContext = createInternalSSLContext(config);
if (sslContext == null) {
throw new IllegalConfigurationException("SSL is not enabled");
}
String[] protocols = getEnabledProtocols(config);
Str... | java | public static ServerSocketFactory createSSLServerSocketFactory(Configuration config) throws Exception {
SSLContext sslContext = createInternalSSLContext(config);
if (sslContext == null) {
throw new IllegalConfigurationException("SSL is not enabled");
}
String[] protocols = getEnabledProtocols(config);
Str... | [
"public",
"static",
"ServerSocketFactory",
"createSSLServerSocketFactory",
"(",
"Configuration",
"config",
")",
"throws",
"Exception",
"{",
"SSLContext",
"sslContext",
"=",
"createInternalSSLContext",
"(",
"config",
")",
";",
"if",
"(",
"sslContext",
"==",
"null",
")"... | Creates a factory for SSL Server Sockets from the given configuration.
SSL Server Sockets are always part of internal communication. | [
"Creates",
"a",
"factory",
"for",
"SSL",
"Server",
"Sockets",
"from",
"the",
"given",
"configuration",
".",
"SSL",
"Server",
"Sockets",
"are",
"always",
"part",
"of",
"internal",
"communication",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/net/SSLUtils.java#L84-L95 |
123,943 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/net/SSLUtils.java | SSLUtils.createSSLClientSocketFactory | public static SocketFactory createSSLClientSocketFactory(Configuration config) throws Exception {
SSLContext sslContext = createInternalSSLContext(config);
if (sslContext == null) {
throw new IllegalConfigurationException("SSL is not enabled");
}
return sslContext.getSocketFactory();
} | java | public static SocketFactory createSSLClientSocketFactory(Configuration config) throws Exception {
SSLContext sslContext = createInternalSSLContext(config);
if (sslContext == null) {
throw new IllegalConfigurationException("SSL is not enabled");
}
return sslContext.getSocketFactory();
} | [
"public",
"static",
"SocketFactory",
"createSSLClientSocketFactory",
"(",
"Configuration",
"config",
")",
"throws",
"Exception",
"{",
"SSLContext",
"sslContext",
"=",
"createInternalSSLContext",
"(",
"config",
")",
";",
"if",
"(",
"sslContext",
"==",
"null",
")",
"{... | Creates a factory for SSL Client Sockets from the given configuration.
SSL Client Sockets are always part of internal communication. | [
"Creates",
"a",
"factory",
"for",
"SSL",
"Client",
"Sockets",
"from",
"the",
"given",
"configuration",
".",
"SSL",
"Client",
"Sockets",
"are",
"always",
"part",
"of",
"internal",
"communication",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/net/SSLUtils.java#L101-L108 |
123,944 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/net/SSLUtils.java | SSLUtils.createInternalServerSSLEngineFactory | public static SSLHandlerFactory createInternalServerSSLEngineFactory(final Configuration config) throws Exception {
SSLContext sslContext = createInternalSSLContext(config);
if (sslContext == null) {
throw new IllegalConfigurationException("SSL is not enabled for internal communication.");
}
return new SSLH... | java | public static SSLHandlerFactory createInternalServerSSLEngineFactory(final Configuration config) throws Exception {
SSLContext sslContext = createInternalSSLContext(config);
if (sslContext == null) {
throw new IllegalConfigurationException("SSL is not enabled for internal communication.");
}
return new SSLH... | [
"public",
"static",
"SSLHandlerFactory",
"createInternalServerSSLEngineFactory",
"(",
"final",
"Configuration",
"config",
")",
"throws",
"Exception",
"{",
"SSLContext",
"sslContext",
"=",
"createInternalSSLContext",
"(",
"config",
")",
";",
"if",
"(",
"sslContext",
"=="... | Creates a SSLEngineFactory to be used by internal communication server endpoints. | [
"Creates",
"a",
"SSLEngineFactory",
"to",
"be",
"used",
"by",
"internal",
"communication",
"server",
"endpoints",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/net/SSLUtils.java#L113-L127 |
123,945 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/net/SSLUtils.java | SSLUtils.createInternalSSLContext | @Nullable
private static SSLContext createInternalSSLContext(Configuration config) throws Exception {
checkNotNull(config, "config");
if (!isInternalSSLEnabled(config)) {
return null;
}
String keystoreFilePath = getAndCheckOption(
config, SecurityOptions.SSL_INTERNAL_KEYSTORE, SecurityOptions.SSL_KEYST... | java | @Nullable
private static SSLContext createInternalSSLContext(Configuration config) throws Exception {
checkNotNull(config, "config");
if (!isInternalSSLEnabled(config)) {
return null;
}
String keystoreFilePath = getAndCheckOption(
config, SecurityOptions.SSL_INTERNAL_KEYSTORE, SecurityOptions.SSL_KEYST... | [
"@",
"Nullable",
"private",
"static",
"SSLContext",
"createInternalSSLContext",
"(",
"Configuration",
"config",
")",
"throws",
"Exception",
"{",
"checkNotNull",
"(",
"config",
",",
"\"config\"",
")",
";",
"if",
"(",
"!",
"isInternalSSLEnabled",
"(",
"config",
")",... | Creates the SSL Context for internal SSL, if internal SSL is configured.
For internal SSL, the client and server side configuration are identical, because
of mutual authentication. | [
"Creates",
"the",
"SSL",
"Context",
"for",
"internal",
"SSL",
"if",
"internal",
"SSL",
"is",
"configured",
".",
"For",
"internal",
"SSL",
"the",
"client",
"and",
"server",
"side",
"configuration",
"are",
"identical",
"because",
"of",
"mutual",
"authentication",
... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/net/SSLUtils.java#L205-L257 |
123,946 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/net/SSLUtils.java | SSLUtils.createRestSSLContext | @Nullable
private static SSLContext createRestSSLContext(Configuration config, RestSSLContextConfigMode configMode) throws Exception {
checkNotNull(config, "config");
if (!isRestSSLEnabled(config)) {
return null;
}
KeyManager[] keyManagers = null;
if (configMode == RestSSLContextConfigMode.SERVER || con... | java | @Nullable
private static SSLContext createRestSSLContext(Configuration config, RestSSLContextConfigMode configMode) throws Exception {
checkNotNull(config, "config");
if (!isRestSSLEnabled(config)) {
return null;
}
KeyManager[] keyManagers = null;
if (configMode == RestSSLContextConfigMode.SERVER || con... | [
"@",
"Nullable",
"private",
"static",
"SSLContext",
"createRestSSLContext",
"(",
"Configuration",
"config",
",",
"RestSSLContextConfigMode",
"configMode",
")",
"throws",
"Exception",
"{",
"checkNotNull",
"(",
"config",
",",
"\"config\"",
")",
";",
"if",
"(",
"!",
... | Creates an SSL context for the external REST SSL.
If mutual authentication is configured the client and the server side configuration are identical. | [
"Creates",
"an",
"SSL",
"context",
"for",
"the",
"external",
"REST",
"SSL",
".",
"If",
"mutual",
"authentication",
"is",
"configured",
"the",
"client",
"and",
"the",
"server",
"side",
"configuration",
"are",
"identical",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/net/SSLUtils.java#L269-L323 |
123,947 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/net/SSLUtils.java | SSLUtils.createRestServerSSLContext | @Nullable
public static SSLContext createRestServerSSLContext(Configuration config) throws Exception {
final RestSSLContextConfigMode configMode;
if (isRestSSLAuthenticationEnabled(config)) {
configMode = RestSSLContextConfigMode.MUTUAL;
} else {
configMode = RestSSLContextConfigMode.SERVER;
}
return ... | java | @Nullable
public static SSLContext createRestServerSSLContext(Configuration config) throws Exception {
final RestSSLContextConfigMode configMode;
if (isRestSSLAuthenticationEnabled(config)) {
configMode = RestSSLContextConfigMode.MUTUAL;
} else {
configMode = RestSSLContextConfigMode.SERVER;
}
return ... | [
"@",
"Nullable",
"public",
"static",
"SSLContext",
"createRestServerSSLContext",
"(",
"Configuration",
"config",
")",
"throws",
"Exception",
"{",
"final",
"RestSSLContextConfigMode",
"configMode",
";",
"if",
"(",
"isRestSSLAuthenticationEnabled",
"(",
"config",
")",
")"... | Creates an SSL context for the external REST endpoint server. | [
"Creates",
"an",
"SSL",
"context",
"for",
"the",
"external",
"REST",
"endpoint",
"server",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/net/SSLUtils.java#L328-L338 |
123,948 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/net/SSLUtils.java | SSLUtils.createRestClientSSLContext | @Nullable
public static SSLContext createRestClientSSLContext(Configuration config) throws Exception {
final RestSSLContextConfigMode configMode;
if (isRestSSLAuthenticationEnabled(config)) {
configMode = RestSSLContextConfigMode.MUTUAL;
} else {
configMode = RestSSLContextConfigMode.CLIENT;
}
return ... | java | @Nullable
public static SSLContext createRestClientSSLContext(Configuration config) throws Exception {
final RestSSLContextConfigMode configMode;
if (isRestSSLAuthenticationEnabled(config)) {
configMode = RestSSLContextConfigMode.MUTUAL;
} else {
configMode = RestSSLContextConfigMode.CLIENT;
}
return ... | [
"@",
"Nullable",
"public",
"static",
"SSLContext",
"createRestClientSSLContext",
"(",
"Configuration",
"config",
")",
"throws",
"Exception",
"{",
"final",
"RestSSLContextConfigMode",
"configMode",
";",
"if",
"(",
"isRestSSLAuthenticationEnabled",
"(",
"config",
")",
")"... | Creates an SSL context for clients against the external REST endpoint. | [
"Creates",
"an",
"SSL",
"context",
"for",
"clients",
"against",
"the",
"external",
"REST",
"endpoint",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/net/SSLUtils.java#L343-L353 |
123,949 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/state/StateSerializerProvider.java | StateSerializerProvider.currentSchemaSerializer | @Nonnull
public final TypeSerializer<T> currentSchemaSerializer() {
if (registeredSerializer != null) {
checkState(
!isRegisteredWithIncompatibleSerializer,
"Unable to provide a serializer with the current schema, because the restored state was " +
"registered with a new serializer that has incompati... | java | @Nonnull
public final TypeSerializer<T> currentSchemaSerializer() {
if (registeredSerializer != null) {
checkState(
!isRegisteredWithIncompatibleSerializer,
"Unable to provide a serializer with the current schema, because the restored state was " +
"registered with a new serializer that has incompati... | [
"@",
"Nonnull",
"public",
"final",
"TypeSerializer",
"<",
"T",
">",
"currentSchemaSerializer",
"(",
")",
"{",
"if",
"(",
"registeredSerializer",
"!=",
"null",
")",
"{",
"checkState",
"(",
"!",
"isRegisteredWithIncompatibleSerializer",
",",
"\"Unable to provide a seria... | Gets the serializer that recognizes the current serialization schema of the state.
This is the serializer that should be used for regular state serialization and
deserialization after state has been restored.
<p>If this provider was created from a restored state's serializer snapshot, while a
new serializer (with a ne... | [
"Gets",
"the",
"serializer",
"that",
"recognizes",
"the",
"current",
"serialization",
"schema",
"of",
"the",
"state",
".",
"This",
"is",
"the",
"serializer",
"that",
"should",
"be",
"used",
"for",
"regular",
"state",
"serialization",
"and",
"deserialization",
"a... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/state/StateSerializerProvider.java#L151-L165 |
123,950 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/state/StateSerializerProvider.java | StateSerializerProvider.previousSchemaSerializer | @Nonnull
public final TypeSerializer<T> previousSchemaSerializer() {
if (cachedRestoredSerializer != null) {
return cachedRestoredSerializer;
}
if (previousSerializerSnapshot == null) {
throw new UnsupportedOperationException(
"This provider does not contain the state's previous serializer's snapshot.... | java | @Nonnull
public final TypeSerializer<T> previousSchemaSerializer() {
if (cachedRestoredSerializer != null) {
return cachedRestoredSerializer;
}
if (previousSerializerSnapshot == null) {
throw new UnsupportedOperationException(
"This provider does not contain the state's previous serializer's snapshot.... | [
"@",
"Nonnull",
"public",
"final",
"TypeSerializer",
"<",
"T",
">",
"previousSchemaSerializer",
"(",
")",
"{",
"if",
"(",
"cachedRestoredSerializer",
"!=",
"null",
")",
"{",
"return",
"cachedRestoredSerializer",
";",
"}",
"if",
"(",
"previousSerializerSnapshot",
"... | Gets the serializer that recognizes the previous serialization schema of the state.
This is the serializer that should be used for restoring the state, i.e. when the state
is still in the previous serialization schema.
<p>This method only returns a serializer if this provider has the previous serializer's
snapshot. Ot... | [
"Gets",
"the",
"serializer",
"that",
"recognizes",
"the",
"previous",
"serialization",
"schema",
"of",
"the",
"state",
".",
"This",
"is",
"the",
"serializer",
"that",
"should",
"be",
"used",
"for",
"restoring",
"the",
"state",
"i",
".",
"e",
".",
"when",
"... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/state/StateSerializerProvider.java#L178-L191 |
123,951 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java | ResourceManager.deregisterApplication | @Override
public CompletableFuture<Acknowledge> deregisterApplication(
final ApplicationStatus finalStatus,
@Nullable final String diagnostics) {
log.info("Shut down cluster because application is in {}, diagnostics {}.", finalStatus, diagnostics);
try {
internalDeregisterApplication(finalStatus, diagnos... | java | @Override
public CompletableFuture<Acknowledge> deregisterApplication(
final ApplicationStatus finalStatus,
@Nullable final String diagnostics) {
log.info("Shut down cluster because application is in {}, diagnostics {}.", finalStatus, diagnostics);
try {
internalDeregisterApplication(finalStatus, diagnos... | [
"@",
"Override",
"public",
"CompletableFuture",
"<",
"Acknowledge",
">",
"deregisterApplication",
"(",
"final",
"ApplicationStatus",
"finalStatus",
",",
"@",
"Nullable",
"final",
"String",
"diagnostics",
")",
"{",
"log",
".",
"info",
"(",
"\"Shut down cluster because ... | Cleanup application and shut down cluster.
@param finalStatus of the Flink application
@param diagnostics diagnostics message for the Flink application or {@code null} | [
"Cleanup",
"application",
"and",
"shut",
"down",
"cluster",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java#L492-L505 |
123,952 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java | ResourceManager.registerJobMasterInternal | private RegistrationResponse registerJobMasterInternal(
final JobMasterGateway jobMasterGateway,
JobID jobId,
String jobManagerAddress,
ResourceID jobManagerResourceId) {
if (jobManagerRegistrations.containsKey(jobId)) {
JobManagerRegistration oldJobManagerRegistration = jobManagerRegistrations.get(jobId);... | java | private RegistrationResponse registerJobMasterInternal(
final JobMasterGateway jobMasterGateway,
JobID jobId,
String jobManagerAddress,
ResourceID jobManagerResourceId) {
if (jobManagerRegistrations.containsKey(jobId)) {
JobManagerRegistration oldJobManagerRegistration = jobManagerRegistrations.get(jobId);... | [
"private",
"RegistrationResponse",
"registerJobMasterInternal",
"(",
"final",
"JobMasterGateway",
"jobMasterGateway",
",",
"JobID",
"jobId",
",",
"String",
"jobManagerAddress",
",",
"ResourceID",
"jobManagerResourceId",
")",
"{",
"if",
"(",
"jobManagerRegistrations",
".",
... | Registers a new JobMaster.
@param jobMasterGateway to communicate with the registering JobMaster
@param jobId of the job for which the JobMaster is responsible
@param jobManagerAddress address of the JobMaster
@param jobManagerResourceId ResourceID of the JobMaster
@return RegistrationResponse | [
"Registers",
"a",
"new",
"JobMaster",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java#L620-L671 |
123,953 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java | ResourceManager.registerTaskExecutorInternal | private RegistrationResponse registerTaskExecutorInternal(
TaskExecutorGateway taskExecutorGateway,
String taskExecutorAddress,
ResourceID taskExecutorResourceId,
int dataPort,
HardwareDescription hardwareDescription) {
WorkerRegistration<WorkerType> oldRegistration = taskExecutors.remove(taskExecutorR... | java | private RegistrationResponse registerTaskExecutorInternal(
TaskExecutorGateway taskExecutorGateway,
String taskExecutorAddress,
ResourceID taskExecutorResourceId,
int dataPort,
HardwareDescription hardwareDescription) {
WorkerRegistration<WorkerType> oldRegistration = taskExecutors.remove(taskExecutorR... | [
"private",
"RegistrationResponse",
"registerTaskExecutorInternal",
"(",
"TaskExecutorGateway",
"taskExecutorGateway",
",",
"String",
"taskExecutorAddress",
",",
"ResourceID",
"taskExecutorResourceId",
",",
"int",
"dataPort",
",",
"HardwareDescription",
"hardwareDescription",
")",... | Registers a new TaskExecutor.
@param taskExecutorGateway to communicate with the registering TaskExecutor
@param taskExecutorAddress address of the TaskExecutor
@param taskExecutorResourceId ResourceID of the TaskExecutor
@param dataPort port used for data transfer
@param hardwareDescription of the registering TaskExe... | [
"Registers",
"a",
"new",
"TaskExecutor",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java#L683-L729 |
123,954 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java | ResourceManager.closeJobManagerConnection | protected void closeJobManagerConnection(JobID jobId, Exception cause) {
JobManagerRegistration jobManagerRegistration = jobManagerRegistrations.remove(jobId);
if (jobManagerRegistration != null) {
final ResourceID jobManagerResourceId = jobManagerRegistration.getJobManagerResourceID();
final JobMasterGatewa... | java | protected void closeJobManagerConnection(JobID jobId, Exception cause) {
JobManagerRegistration jobManagerRegistration = jobManagerRegistrations.remove(jobId);
if (jobManagerRegistration != null) {
final ResourceID jobManagerResourceId = jobManagerRegistration.getJobManagerResourceID();
final JobMasterGatewa... | [
"protected",
"void",
"closeJobManagerConnection",
"(",
"JobID",
"jobId",
",",
"Exception",
"cause",
")",
"{",
"JobManagerRegistration",
"jobManagerRegistration",
"=",
"jobManagerRegistrations",
".",
"remove",
"(",
"jobId",
")",
";",
"if",
"(",
"jobManagerRegistration",
... | This method should be called by the framework once it detects that a currently registered
job manager has failed.
@param jobId identifying the job whose leader shall be disconnected.
@param cause The exception which cause the JobManager failed. | [
"This",
"method",
"should",
"be",
"called",
"by",
"the",
"framework",
"once",
"it",
"detects",
"that",
"a",
"currently",
"registered",
"job",
"manager",
"has",
"failed",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java#L763-L785 |
123,955 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java | ResourceManager.closeTaskManagerConnection | protected void closeTaskManagerConnection(final ResourceID resourceID, final Exception cause) {
taskManagerHeartbeatManager.unmonitorTarget(resourceID);
WorkerRegistration<WorkerType> workerRegistration = taskExecutors.remove(resourceID);
if (workerRegistration != null) {
log.info("Closing TaskExecutor conne... | java | protected void closeTaskManagerConnection(final ResourceID resourceID, final Exception cause) {
taskManagerHeartbeatManager.unmonitorTarget(resourceID);
WorkerRegistration<WorkerType> workerRegistration = taskExecutors.remove(resourceID);
if (workerRegistration != null) {
log.info("Closing TaskExecutor conne... | [
"protected",
"void",
"closeTaskManagerConnection",
"(",
"final",
"ResourceID",
"resourceID",
",",
"final",
"Exception",
"cause",
")",
"{",
"taskManagerHeartbeatManager",
".",
"unmonitorTarget",
"(",
"resourceID",
")",
";",
"WorkerRegistration",
"<",
"WorkerType",
">",
... | This method should be called by the framework once it detects that a currently registered
task executor has failed.
@param resourceID Id of the TaskManager that has failed.
@param cause The exception which cause the TaskManager failed. | [
"This",
"method",
"should",
"be",
"called",
"by",
"the",
"framework",
"once",
"it",
"detects",
"that",
"a",
"currently",
"registered",
"task",
"executor",
"has",
"failed",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java#L794-L812 |
123,956 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java | ResourceManager.onFatalError | protected void onFatalError(Throwable t) {
try {
log.error("Fatal error occurred in ResourceManager.", t);
} catch (Throwable ignored) {}
// The fatal error handler implementation should make sure that this call is non-blocking
fatalErrorHandler.onFatalError(t);
} | java | protected void onFatalError(Throwable t) {
try {
log.error("Fatal error occurred in ResourceManager.", t);
} catch (Throwable ignored) {}
// The fatal error handler implementation should make sure that this call is non-blocking
fatalErrorHandler.onFatalError(t);
} | [
"protected",
"void",
"onFatalError",
"(",
"Throwable",
"t",
")",
"{",
"try",
"{",
"log",
".",
"error",
"(",
"\"Fatal error occurred in ResourceManager.\"",
",",
"t",
")",
";",
"}",
"catch",
"(",
"Throwable",
"ignored",
")",
"{",
"}",
"// The fatal error handler ... | Notifies the ResourceManager that a fatal error has occurred and it cannot proceed.
@param t The exception describing the fatal error | [
"Notifies",
"the",
"ResourceManager",
"that",
"a",
"fatal",
"error",
"has",
"occurred",
"and",
"it",
"cannot",
"proceed",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java#L872-L879 |
123,957 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/query/KvStateLocationRegistry.java | KvStateLocationRegistry.notifyKvStateRegistered | public void notifyKvStateRegistered(
JobVertexID jobVertexId,
KeyGroupRange keyGroupRange,
String registrationName,
KvStateID kvStateId,
InetSocketAddress kvStateServerAddress) {
KvStateLocation location = lookupTable.get(registrationName);
if (location == null) {
// First registration for this ... | java | public void notifyKvStateRegistered(
JobVertexID jobVertexId,
KeyGroupRange keyGroupRange,
String registrationName,
KvStateID kvStateId,
InetSocketAddress kvStateServerAddress) {
KvStateLocation location = lookupTable.get(registrationName);
if (location == null) {
// First registration for this ... | [
"public",
"void",
"notifyKvStateRegistered",
"(",
"JobVertexID",
"jobVertexId",
",",
"KeyGroupRange",
"keyGroupRange",
",",
"String",
"registrationName",
",",
"KvStateID",
"kvStateId",
",",
"InetSocketAddress",
"kvStateServerAddress",
")",
"{",
"KvStateLocation",
"location"... | Notifies the registry about a registered KvState instance.
@param jobVertexId JobVertexID the KvState instance belongs to
@param keyGroupRange Key group range the KvState instance belongs to
@param registrationName Name under which the KvState has been registered
@param kvStateId ID of the registered KvState instance
... | [
"Notifies",
"the",
"registry",
"about",
"a",
"registered",
"KvState",
"instance",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/query/KvStateLocationRegistry.java#L89-L126 |
123,958 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/query/KvStateLocationRegistry.java | KvStateLocationRegistry.notifyKvStateUnregistered | public void notifyKvStateUnregistered(
JobVertexID jobVertexId,
KeyGroupRange keyGroupRange,
String registrationName) {
KvStateLocation location = lookupTable.get(registrationName);
if (location != null) {
// Duplicate name if vertex IDs don't match
if (!location.getJobVertexId().equals(jobVertexId... | java | public void notifyKvStateUnregistered(
JobVertexID jobVertexId,
KeyGroupRange keyGroupRange,
String registrationName) {
KvStateLocation location = lookupTable.get(registrationName);
if (location != null) {
// Duplicate name if vertex IDs don't match
if (!location.getJobVertexId().equals(jobVertexId... | [
"public",
"void",
"notifyKvStateUnregistered",
"(",
"JobVertexID",
"jobVertexId",
",",
"KeyGroupRange",
"keyGroupRange",
",",
"String",
"registrationName",
")",
"{",
"KvStateLocation",
"location",
"=",
"lookupTable",
".",
"get",
"(",
"registrationName",
")",
";",
"if"... | Notifies the registry about an unregistered KvState instance.
@param jobVertexId JobVertexID the KvState instance belongs to
@param keyGroupRange Key group index the KvState instance belongs to
@param registrationName Name under which the KvState has been registered
@throws IllegalArgumentException If another operator... | [
"Notifies",
"the",
"registry",
"about",
"an",
"unregistered",
"KvState",
"instance",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/query/KvStateLocationRegistry.java#L137-L161 |
123,959 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StateAssignmentOperation.java | StateAssignmentOperation.extractIntersectingState | private static void extractIntersectingState(
Collection<KeyedStateHandle> originalSubtaskStateHandles,
KeyGroupRange rangeToExtract,
List<KeyedStateHandle> extractedStateCollector) {
for (KeyedStateHandle keyedStateHandle : originalSubtaskStateHandles) {
if (keyedStateHandle != null) {
KeyedStateHand... | java | private static void extractIntersectingState(
Collection<KeyedStateHandle> originalSubtaskStateHandles,
KeyGroupRange rangeToExtract,
List<KeyedStateHandle> extractedStateCollector) {
for (KeyedStateHandle keyedStateHandle : originalSubtaskStateHandles) {
if (keyedStateHandle != null) {
KeyedStateHand... | [
"private",
"static",
"void",
"extractIntersectingState",
"(",
"Collection",
"<",
"KeyedStateHandle",
">",
"originalSubtaskStateHandles",
",",
"KeyGroupRange",
"rangeToExtract",
",",
"List",
"<",
"KeyedStateHandle",
">",
"extractedStateCollector",
")",
"{",
"for",
"(",
"... | Extracts certain key group ranges from the given state handles and adds them to the collector. | [
"Extracts",
"certain",
"key",
"group",
"ranges",
"from",
"the",
"given",
"state",
"handles",
"and",
"adds",
"them",
"to",
"the",
"collector",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StateAssignmentOperation.java#L464-L480 |
123,960 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StateAssignmentOperation.java | StateAssignmentOperation.checkParallelismPreconditions | private static void checkParallelismPreconditions(OperatorState operatorState, ExecutionJobVertex executionJobVertex) {
//----------------------------------------max parallelism preconditions-------------------------------------
if (operatorState.getMaxParallelism() < executionJobVertex.getParallelism()) {
thro... | java | private static void checkParallelismPreconditions(OperatorState operatorState, ExecutionJobVertex executionJobVertex) {
//----------------------------------------max parallelism preconditions-------------------------------------
if (operatorState.getMaxParallelism() < executionJobVertex.getParallelism()) {
thro... | [
"private",
"static",
"void",
"checkParallelismPreconditions",
"(",
"OperatorState",
"operatorState",
",",
"ExecutionJobVertex",
"executionJobVertex",
")",
"{",
"//----------------------------------------max parallelism preconditions-------------------------------------",
"if",
"(",
"op... | Verifies conditions in regards to parallelism and maxParallelism that must be met when restoring state.
@param operatorState state to restore
@param executionJobVertex task for which the state should be restored | [
"Verifies",
"conditions",
"in",
"regards",
"to",
"parallelism",
"and",
"maxParallelism",
"that",
"must",
"be",
"met",
"when",
"restoring",
"state",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StateAssignmentOperation.java#L510-L541 |
123,961 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StateAssignmentOperation.java | StateAssignmentOperation.checkStateMappingCompleteness | private static void checkStateMappingCompleteness(
boolean allowNonRestoredState,
Map<OperatorID, OperatorState> operatorStates,
Map<JobVertexID, ExecutionJobVertex> tasks) {
Set<OperatorID> allOperatorIDs = new HashSet<>();
for (ExecutionJobVertex executionJobVertex : tasks.values()) {
allOperatorIDs.... | java | private static void checkStateMappingCompleteness(
boolean allowNonRestoredState,
Map<OperatorID, OperatorState> operatorStates,
Map<JobVertexID, ExecutionJobVertex> tasks) {
Set<OperatorID> allOperatorIDs = new HashSet<>();
for (ExecutionJobVertex executionJobVertex : tasks.values()) {
allOperatorIDs.... | [
"private",
"static",
"void",
"checkStateMappingCompleteness",
"(",
"boolean",
"allowNonRestoredState",
",",
"Map",
"<",
"OperatorID",
",",
"OperatorState",
">",
"operatorStates",
",",
"Map",
"<",
"JobVertexID",
",",
"ExecutionJobVertex",
">",
"tasks",
")",
"{",
"Set... | Verifies that all operator states can be mapped to an execution job vertex.
@param allowNonRestoredState if false an exception will be thrown if a state could not be mapped
@param operatorStates operator states to map
@param tasks task to map to | [
"Verifies",
"that",
"all",
"operator",
"states",
"can",
"be",
"mapped",
"to",
"an",
"execution",
"job",
"vertex",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StateAssignmentOperation.java#L550-L571 |
123,962 | apache/flink | flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/client/QueryableStateClient.java | QueryableStateClient.shutdownAndWait | public void shutdownAndWait() {
try {
client.shutdown().get();
LOG.info("The Queryable State Client was shutdown successfully.");
} catch (Exception e) {
LOG.warn("The Queryable State Client shutdown failed: ", e);
}
} | java | public void shutdownAndWait() {
try {
client.shutdown().get();
LOG.info("The Queryable State Client was shutdown successfully.");
} catch (Exception e) {
LOG.warn("The Queryable State Client shutdown failed: ", e);
}
} | [
"public",
"void",
"shutdownAndWait",
"(",
")",
"{",
"try",
"{",
"client",
".",
"shutdown",
"(",
")",
".",
"get",
"(",
")",
";",
"LOG",
".",
"info",
"(",
"\"The Queryable State Client was shutdown successfully.\"",
")",
";",
"}",
"catch",
"(",
"Exception",
"e... | Shuts down the client and waits until shutdown is completed.
<p>If an exception is thrown, a warning is logged containing
the exception message. | [
"Shuts",
"down",
"the",
"client",
"and",
"waits",
"until",
"shutdown",
"is",
"completed",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/client/QueryableStateClient.java#L160-L167 |
123,963 | apache/flink | flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/client/QueryableStateClient.java | QueryableStateClient.getKvState | private CompletableFuture<KvStateResponse> getKvState(
final JobID jobId,
final String queryableStateName,
final int keyHashCode,
final byte[] serializedKeyAndNamespace) {
LOG.debug("Sending State Request to {}.", remoteAddress);
try {
KvStateRequest request = new KvStateRequest(jobId, queryableState... | java | private CompletableFuture<KvStateResponse> getKvState(
final JobID jobId,
final String queryableStateName,
final int keyHashCode,
final byte[] serializedKeyAndNamespace) {
LOG.debug("Sending State Request to {}.", remoteAddress);
try {
KvStateRequest request = new KvStateRequest(jobId, queryableState... | [
"private",
"CompletableFuture",
"<",
"KvStateResponse",
">",
"getKvState",
"(",
"final",
"JobID",
"jobId",
",",
"final",
"String",
"queryableStateName",
",",
"final",
"int",
"keyHashCode",
",",
"final",
"byte",
"[",
"]",
"serializedKeyAndNamespace",
")",
"{",
"LOG... | Returns a future holding the serialized request result.
@param jobId JobID of the job the queryable state
belongs to
@param queryableStateName Name under which the state is queryable
@param keyHashCode Integer hash code of the key (result of
a call to {@link Object#hashCode()}
... | [
"Returns",
"a",
"future",
"holding",
"the",
"serialized",
"request",
"result",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/client/QueryableStateClient.java#L305-L318 |
123,964 | apache/flink | flink-core/src/main/java/org/apache/flink/api/common/state/ListStateDescriptor.java | ListStateDescriptor.getElementSerializer | public TypeSerializer<T> getElementSerializer() {
// call getSerializer() here to get the initialization check and proper error message
final TypeSerializer<List<T>> rawSerializer = getSerializer();
if (!(rawSerializer instanceof ListSerializer)) {
throw new IllegalStateException();
}
return ((ListSeriali... | java | public TypeSerializer<T> getElementSerializer() {
// call getSerializer() here to get the initialization check and proper error message
final TypeSerializer<List<T>> rawSerializer = getSerializer();
if (!(rawSerializer instanceof ListSerializer)) {
throw new IllegalStateException();
}
return ((ListSeriali... | [
"public",
"TypeSerializer",
"<",
"T",
">",
"getElementSerializer",
"(",
")",
"{",
"// call getSerializer() here to get the initialization check and proper error message",
"final",
"TypeSerializer",
"<",
"List",
"<",
"T",
">",
">",
"rawSerializer",
"=",
"getSerializer",
"(",... | Gets the serializer for the elements contained in the list.
@return The serializer for the elements in the list. | [
"Gets",
"the",
"serializer",
"for",
"the",
"elements",
"contained",
"in",
"the",
"list",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/state/ListStateDescriptor.java#L84-L92 |
123,965 | apache/flink | flink-yarn/src/main/java/org/apache/flink/yarn/YarnTaskExecutorRunner.java | YarnTaskExecutorRunner.main | public static void main(String[] args) {
EnvironmentInformation.logEnvironmentInfo(LOG, "YARN TaskExecutor runner", args);
SignalHandler.register(LOG);
JvmShutdownSafeguard.installAsShutdownHook(LOG);
run(args);
} | java | public static void main(String[] args) {
EnvironmentInformation.logEnvironmentInfo(LOG, "YARN TaskExecutor runner", args);
SignalHandler.register(LOG);
JvmShutdownSafeguard.installAsShutdownHook(LOG);
run(args);
} | [
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"EnvironmentInformation",
".",
"logEnvironmentInfo",
"(",
"LOG",
",",
"\"YARN TaskExecutor runner\"",
",",
"args",
")",
";",
"SignalHandler",
".",
"register",
"(",
"LOG",
")",
";",
... | The entry point for the YARN task executor runner.
@param args The command line arguments. | [
"The",
"entry",
"point",
"for",
"the",
"YARN",
"task",
"executor",
"runner",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-yarn/src/main/java/org/apache/flink/yarn/YarnTaskExecutorRunner.java#L74-L80 |
123,966 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/instance/Instance.java | Instance.returnLogicalSlot | @Override
public void returnLogicalSlot(LogicalSlot logicalSlot) {
checkNotNull(logicalSlot);
checkArgument(logicalSlot instanceof Slot);
final Slot slot = ((Slot) logicalSlot);
checkArgument(!slot.isAlive(), "slot is still alive");
checkArgument(slot.getOwner() == this, "slot belongs to the wrong TaskManag... | java | @Override
public void returnLogicalSlot(LogicalSlot logicalSlot) {
checkNotNull(logicalSlot);
checkArgument(logicalSlot instanceof Slot);
final Slot slot = ((Slot) logicalSlot);
checkArgument(!slot.isAlive(), "slot is still alive");
checkArgument(slot.getOwner() == this, "slot belongs to the wrong TaskManag... | [
"@",
"Override",
"public",
"void",
"returnLogicalSlot",
"(",
"LogicalSlot",
"logicalSlot",
")",
"{",
"checkNotNull",
"(",
"logicalSlot",
")",
";",
"checkArgument",
"(",
"logicalSlot",
"instanceof",
"Slot",
")",
";",
"final",
"Slot",
"slot",
"=",
"(",
"(",
"Slo... | Returns a slot that has been allocated from this instance. The slot needs have been canceled
prior to calling this method.
<p>The method will transition the slot to the "released" state. If the slot is already in state
"released", this method will do nothing.</p>
@param logicalSlot The slot to return.
@return Future ... | [
"Returns",
"a",
"slot",
"that",
"has",
"been",
"allocated",
"from",
"this",
"instance",
".",
"The",
"slot",
"needs",
"have",
"been",
"canceled",
"prior",
"to",
"calling",
"this",
"method",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/instance/Instance.java#L284-L313 |
123,967 | apache/flink | flink-libraries/flink-python/src/main/java/org/apache/flink/python/api/streaming/data/PythonStreamer.java | PythonStreamer.close | public void close() throws IOException {
Throwable throwable = null;
try {
socket.close();
sender.close();
receiver.close();
} catch (Throwable t) {
throwable = t;
}
try {
destroyProcess(process);
} catch (Throwable t) {
throwable = ExceptionUtils.firstOrSuppressed(t, throwable);
}
... | java | public void close() throws IOException {
Throwable throwable = null;
try {
socket.close();
sender.close();
receiver.close();
} catch (Throwable t) {
throwable = t;
}
try {
destroyProcess(process);
} catch (Throwable t) {
throwable = ExceptionUtils.firstOrSuppressed(t, throwable);
}
... | [
"public",
"void",
"close",
"(",
")",
"throws",
"IOException",
"{",
"Throwable",
"throwable",
"=",
"null",
";",
"try",
"{",
"socket",
".",
"close",
"(",
")",
";",
"sender",
".",
"close",
"(",
")",
";",
"receiver",
".",
"close",
"(",
")",
";",
"}",
"... | Closes this streamer.
@throws IOException | [
"Closes",
"this",
"streamer",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-python/src/main/java/org/apache/flink/python/api/streaming/data/PythonStreamer.java#L186-L206 |
123,968 | apache/flink | flink-libraries/flink-python/src/main/java/org/apache/flink/python/api/streaming/data/PythonStreamer.java | PythonStreamer.sendBroadCastVariables | public final void sendBroadCastVariables(Configuration config) throws IOException {
try {
int broadcastCount = config.getInteger(PLANBINDER_CONFIG_BCVAR_COUNT, 0);
String[] names = new String[broadcastCount];
for (int x = 0; x < names.length; x++) {
names[x] = config.getString(PLANBINDER_CONFIG_BCVAR_N... | java | public final void sendBroadCastVariables(Configuration config) throws IOException {
try {
int broadcastCount = config.getInteger(PLANBINDER_CONFIG_BCVAR_COUNT, 0);
String[] names = new String[broadcastCount];
for (int x = 0; x < names.length; x++) {
names[x] = config.getString(PLANBINDER_CONFIG_BCVAR_N... | [
"public",
"final",
"void",
"sendBroadCastVariables",
"(",
"Configuration",
"config",
")",
"throws",
"IOException",
"{",
"try",
"{",
"int",
"broadcastCount",
"=",
"config",
".",
"getInteger",
"(",
"PLANBINDER_CONFIG_BCVAR_COUNT",
",",
"0",
")",
";",
"String",
"[",
... | Sends all broadcast-variables encoded in the configuration to the external process.
@param config configuration object containing broadcast-variable count and names
@throws IOException | [
"Sends",
"all",
"broadcast",
"-",
"variables",
"encoded",
"in",
"the",
"configuration",
"to",
"the",
"external",
"process",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-python/src/main/java/org/apache/flink/python/api/streaming/data/PythonStreamer.java#L247-L274 |
123,969 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/AbstractFsCheckpointStorage.java | AbstractFsCheckpointStorage.getCheckpointDirectoryForJob | protected static Path getCheckpointDirectoryForJob(Path baseCheckpointPath, JobID jobId) {
return new Path(baseCheckpointPath, jobId.toString());
} | java | protected static Path getCheckpointDirectoryForJob(Path baseCheckpointPath, JobID jobId) {
return new Path(baseCheckpointPath, jobId.toString());
} | [
"protected",
"static",
"Path",
"getCheckpointDirectoryForJob",
"(",
"Path",
"baseCheckpointPath",
",",
"JobID",
"jobId",
")",
"{",
"return",
"new",
"Path",
"(",
"baseCheckpointPath",
",",
"jobId",
".",
"toString",
"(",
")",
")",
";",
"}"
] | Builds directory into which a specific job checkpoints, meaning the directory inside which
it creates the checkpoint-specific subdirectories.
<p>This method only succeeds if a base checkpoint directory has been set; otherwise
the method fails with an exception.
@param jobId The ID of the job
@return The job's checkpo... | [
"Builds",
"directory",
"into",
"which",
"a",
"specific",
"job",
"checkpoints",
"meaning",
"the",
"directory",
"inside",
"which",
"it",
"creates",
"the",
"checkpoint",
"-",
"specific",
"subdirectories",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/AbstractFsCheckpointStorage.java#L187-L189 |
123,970 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/AbstractFsCheckpointStorage.java | AbstractFsCheckpointStorage.encodePathAsReference | public static CheckpointStorageLocationReference encodePathAsReference(Path path) {
byte[] refBytes = path.toString().getBytes(StandardCharsets.UTF_8);
byte[] bytes = new byte[REFERENCE_MAGIC_NUMBER.length + refBytes.length];
System.arraycopy(REFERENCE_MAGIC_NUMBER, 0, bytes, 0, REFERENCE_MAGIC_NUMBER.length);
... | java | public static CheckpointStorageLocationReference encodePathAsReference(Path path) {
byte[] refBytes = path.toString().getBytes(StandardCharsets.UTF_8);
byte[] bytes = new byte[REFERENCE_MAGIC_NUMBER.length + refBytes.length];
System.arraycopy(REFERENCE_MAGIC_NUMBER, 0, bytes, 0, REFERENCE_MAGIC_NUMBER.length);
... | [
"public",
"static",
"CheckpointStorageLocationReference",
"encodePathAsReference",
"(",
"Path",
"path",
")",
"{",
"byte",
"[",
"]",
"refBytes",
"=",
"path",
".",
"toString",
"(",
")",
".",
"getBytes",
"(",
"StandardCharsets",
".",
"UTF_8",
")",
";",
"byte",
"[... | Encodes the given path as a reference in bytes. The path is encoded as a UTF-8 string
and prepended as a magic number.
@param path The path to encode.
@return The location reference. | [
"Encodes",
"the",
"given",
"path",
"as",
"a",
"reference",
"in",
"bytes",
".",
"The",
"path",
"is",
"encoded",
"as",
"a",
"UTF",
"-",
"8",
"string",
"and",
"prepended",
"as",
"a",
"magic",
"number",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/AbstractFsCheckpointStorage.java#L291-L299 |
123,971 | apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/generated/GeneratedClass.java | GeneratedClass.newInstance | @SuppressWarnings("unchecked")
public T newInstance(ClassLoader classLoader) {
try {
return (T) compile(classLoader).getConstructor(Object[].class)
// Because Constructor.newInstance(Object... initargs), we need to load
// references into a new Object[], otherwise it cannot be compiled.
.newInstanc... | java | @SuppressWarnings("unchecked")
public T newInstance(ClassLoader classLoader) {
try {
return (T) compile(classLoader).getConstructor(Object[].class)
// Because Constructor.newInstance(Object... initargs), we need to load
// references into a new Object[], otherwise it cannot be compiled.
.newInstanc... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"T",
"newInstance",
"(",
"ClassLoader",
"classLoader",
")",
"{",
"try",
"{",
"return",
"(",
"T",
")",
"compile",
"(",
"classLoader",
")",
".",
"getConstructor",
"(",
"Object",
"[",
"]",
".",
"cl... | Create a new instance of this generated class. | [
"Create",
"a",
"new",
"instance",
"of",
"this",
"generated",
"class",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/generated/GeneratedClass.java#L49-L60 |
123,972 | apache/flink | flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/restore/RocksDBIncrementalRestoreOperation.java | RocksDBIncrementalRestoreOperation.restoreWithoutRescaling | private void restoreWithoutRescaling(KeyedStateHandle keyedStateHandle) throws Exception {
if (keyedStateHandle instanceof IncrementalRemoteKeyedStateHandle) {
IncrementalRemoteKeyedStateHandle incrementalRemoteKeyedStateHandle =
(IncrementalRemoteKeyedStateHandle) keyedStateHandle;
restorePreviousIncrement... | java | private void restoreWithoutRescaling(KeyedStateHandle keyedStateHandle) throws Exception {
if (keyedStateHandle instanceof IncrementalRemoteKeyedStateHandle) {
IncrementalRemoteKeyedStateHandle incrementalRemoteKeyedStateHandle =
(IncrementalRemoteKeyedStateHandle) keyedStateHandle;
restorePreviousIncrement... | [
"private",
"void",
"restoreWithoutRescaling",
"(",
"KeyedStateHandle",
"keyedStateHandle",
")",
"throws",
"Exception",
"{",
"if",
"(",
"keyedStateHandle",
"instanceof",
"IncrementalRemoteKeyedStateHandle",
")",
"{",
"IncrementalRemoteKeyedStateHandle",
"incrementalRemoteKeyedStat... | Recovery from a single remote incremental state without rescaling. | [
"Recovery",
"from",
"a",
"single",
"remote",
"incremental",
"state",
"without",
"rescaling",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/restore/RocksDBIncrementalRestoreOperation.java#L157-L173 |
123,973 | apache/flink | flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/restore/RocksDBIncrementalRestoreOperation.java | RocksDBIncrementalRestoreOperation.restoreWithRescaling | private void restoreWithRescaling(Collection<KeyedStateHandle> restoreStateHandles) throws Exception {
// Prepare for restore with rescaling
KeyedStateHandle initialHandle = RocksDBIncrementalCheckpointUtils.chooseTheBestStateHandleForInitial(
restoreStateHandles, keyGroupRange);
// Init base DB instance
i... | java | private void restoreWithRescaling(Collection<KeyedStateHandle> restoreStateHandles) throws Exception {
// Prepare for restore with rescaling
KeyedStateHandle initialHandle = RocksDBIncrementalCheckpointUtils.chooseTheBestStateHandleForInitial(
restoreStateHandles, keyGroupRange);
// Init base DB instance
i... | [
"private",
"void",
"restoreWithRescaling",
"(",
"Collection",
"<",
"KeyedStateHandle",
">",
"restoreStateHandles",
")",
"throws",
"Exception",
"{",
"// Prepare for restore with rescaling",
"KeyedStateHandle",
"initialHandle",
"=",
"RocksDBIncrementalCheckpointUtils",
".",
"choo... | Recovery from multi incremental states with rescaling. For rescaling, this method creates a temporary
RocksDB instance for a key-groups shard. All contents from the temporary instance are copied into the
real restore instance and then the temporary instance is discarded. | [
"Recovery",
"from",
"multi",
"incremental",
"states",
"with",
"rescaling",
".",
"For",
"rescaling",
"this",
"method",
"creates",
"a",
"temporary",
"RocksDB",
"instance",
"for",
"a",
"key",
"-",
"groups",
"shard",
".",
"All",
"contents",
"from",
"the",
"tempora... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/restore/RocksDBIncrementalRestoreOperation.java#L264-L332 |
123,974 | apache/flink | flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/restore/RocksDBIncrementalRestoreOperation.java | RocksDBIncrementalRestoreOperation.readMetaData | private KeyedBackendSerializationProxy<K> readMetaData(StreamStateHandle metaStateHandle) throws Exception {
FSDataInputStream inputStream = null;
try {
inputStream = metaStateHandle.openInputStream();
cancelStreamRegistry.registerCloseable(inputStream);
DataInputView in = new DataInputViewStreamWrapper(... | java | private KeyedBackendSerializationProxy<K> readMetaData(StreamStateHandle metaStateHandle) throws Exception {
FSDataInputStream inputStream = null;
try {
inputStream = metaStateHandle.openInputStream();
cancelStreamRegistry.registerCloseable(inputStream);
DataInputView in = new DataInputViewStreamWrapper(... | [
"private",
"KeyedBackendSerializationProxy",
"<",
"K",
">",
"readMetaData",
"(",
"StreamStateHandle",
"metaStateHandle",
")",
"throws",
"Exception",
"{",
"FSDataInputStream",
"inputStream",
"=",
"null",
";",
"try",
"{",
"inputStream",
"=",
"metaStateHandle",
".",
"ope... | Reads Flink's state meta data file from the state handle. | [
"Reads",
"Flink",
"s",
"state",
"meta",
"data",
"file",
"from",
"the",
"state",
"handle",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/restore/RocksDBIncrementalRestoreOperation.java#L484-L498 |
123,975 | apache/flink | flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBIncrementalCheckpointUtils.java | RocksDBIncrementalCheckpointUtils.deleteRange | private static void deleteRange(
RocksDB db,
List<ColumnFamilyHandle> columnFamilyHandles,
byte[] beginKeyBytes,
byte[] endKeyBytes) throws RocksDBException {
for (ColumnFamilyHandle columnFamilyHandle : columnFamilyHandles) {
try (RocksIteratorWrapper iteratorWrapper = RocksDBOperationUtils.getRocksItera... | java | private static void deleteRange(
RocksDB db,
List<ColumnFamilyHandle> columnFamilyHandles,
byte[] beginKeyBytes,
byte[] endKeyBytes) throws RocksDBException {
for (ColumnFamilyHandle columnFamilyHandle : columnFamilyHandles) {
try (RocksIteratorWrapper iteratorWrapper = RocksDBOperationUtils.getRocksItera... | [
"private",
"static",
"void",
"deleteRange",
"(",
"RocksDB",
"db",
",",
"List",
"<",
"ColumnFamilyHandle",
">",
"columnFamilyHandles",
",",
"byte",
"[",
"]",
"beginKeyBytes",
",",
"byte",
"[",
"]",
"endKeyBytes",
")",
"throws",
"RocksDBException",
"{",
"for",
"... | Delete the record falls into [beginKeyBytes, endKeyBytes) of the db.
@param db the target need to be clipped.
@param columnFamilyHandles the column family need to be clipped.
@param beginKeyBytes the begin key bytes
@param endKeyBytes the end key bytes | [
"Delete",
"the",
"record",
"falls",
"into",
"[",
"beginKeyBytes",
"endKeyBytes",
")",
"of",
"the",
"db",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBIncrementalCheckpointUtils.java#L110-L133 |
123,976 | apache/flink | flink-libraries/flink-gelly-examples/src/main/java/org/apache/flink/graph/drivers/parameter/DoubleParameter.java | DoubleParameter.setDefaultValue | public DoubleParameter setDefaultValue(double defaultValue) {
super.setDefaultValue(defaultValue);
if (hasMinimumValue) {
if (minimumValueInclusive) {
Util.checkParameter(defaultValue >= minimumValue,
"Default value (" + defaultValue + ") must be greater than or equal to minimum (" + minimumValue + ")"... | java | public DoubleParameter setDefaultValue(double defaultValue) {
super.setDefaultValue(defaultValue);
if (hasMinimumValue) {
if (minimumValueInclusive) {
Util.checkParameter(defaultValue >= minimumValue,
"Default value (" + defaultValue + ") must be greater than or equal to minimum (" + minimumValue + ")"... | [
"public",
"DoubleParameter",
"setDefaultValue",
"(",
"double",
"defaultValue",
")",
"{",
"super",
".",
"setDefaultValue",
"(",
"defaultValue",
")",
";",
"if",
"(",
"hasMinimumValue",
")",
"{",
"if",
"(",
"minimumValueInclusive",
")",
"{",
"Util",
".",
"checkPara... | Set the default value.
@param defaultValue the default value
@return this | [
"Set",
"the",
"default",
"value",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly-examples/src/main/java/org/apache/flink/graph/drivers/parameter/DoubleParameter.java#L54-L78 |
123,977 | apache/flink | flink-libraries/flink-gelly-examples/src/main/java/org/apache/flink/graph/drivers/parameter/DoubleParameter.java | DoubleParameter.setMinimumValue | public DoubleParameter setMinimumValue(double minimumValue, boolean inclusive) {
if (hasDefaultValue) {
if (inclusive) {
Util.checkParameter(minimumValue <= defaultValue,
"Minimum value (" + minimumValue + ") must be less than or equal to default (" + defaultValue + ")");
} else {
Util.checkParamet... | java | public DoubleParameter setMinimumValue(double minimumValue, boolean inclusive) {
if (hasDefaultValue) {
if (inclusive) {
Util.checkParameter(minimumValue <= defaultValue,
"Minimum value (" + minimumValue + ") must be less than or equal to default (" + defaultValue + ")");
} else {
Util.checkParamet... | [
"public",
"DoubleParameter",
"setMinimumValue",
"(",
"double",
"minimumValue",
",",
"boolean",
"inclusive",
")",
"{",
"if",
"(",
"hasDefaultValue",
")",
"{",
"if",
"(",
"inclusive",
")",
"{",
"Util",
".",
"checkParameter",
"(",
"minimumValue",
"<=",
"defaultValu... | Set the minimum value. The minimum value is an acceptable value if and
only if inclusive is set to true.
@param minimumValue the minimum value
@param inclusive whether the minimum value is a valid value
@return this | [
"Set",
"the",
"minimum",
"value",
".",
"The",
"minimum",
"value",
"is",
"an",
"acceptable",
"value",
"if",
"and",
"only",
"if",
"inclusive",
"is",
"set",
"to",
"true",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly-examples/src/main/java/org/apache/flink/graph/drivers/parameter/DoubleParameter.java#L88-L112 |
123,978 | apache/flink | flink-libraries/flink-gelly-examples/src/main/java/org/apache/flink/graph/drivers/parameter/DoubleParameter.java | DoubleParameter.setMaximumValue | public DoubleParameter setMaximumValue(double maximumValue, boolean inclusive) {
if (hasDefaultValue) {
if (inclusive) {
Util.checkParameter(maximumValue >= defaultValue,
"Maximum value (" + maximumValue + ") must be greater than or equal to default (" + defaultValue + ")");
} else {
Util.checkPara... | java | public DoubleParameter setMaximumValue(double maximumValue, boolean inclusive) {
if (hasDefaultValue) {
if (inclusive) {
Util.checkParameter(maximumValue >= defaultValue,
"Maximum value (" + maximumValue + ") must be greater than or equal to default (" + defaultValue + ")");
} else {
Util.checkPara... | [
"public",
"DoubleParameter",
"setMaximumValue",
"(",
"double",
"maximumValue",
",",
"boolean",
"inclusive",
")",
"{",
"if",
"(",
"hasDefaultValue",
")",
"{",
"if",
"(",
"inclusive",
")",
"{",
"Util",
".",
"checkParameter",
"(",
"maximumValue",
">=",
"defaultValu... | Set the maximum value. The maximum value is an acceptable value if and
only if inclusive is set to true.
@param maximumValue the maximum value
@param inclusive whether the maximum value is a valid value
@return this | [
"Set",
"the",
"maximum",
"value",
".",
"The",
"maximum",
"value",
"is",
"an",
"acceptable",
"value",
"if",
"and",
"only",
"if",
"inclusive",
"is",
"set",
"to",
"true",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly-examples/src/main/java/org/apache/flink/graph/drivers/parameter/DoubleParameter.java#L122-L146 |
123,979 | apache/flink | flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/gsa/GSAConfiguration.java | GSAConfiguration.addBroadcastSetForSumFunction | public void addBroadcastSetForSumFunction(String name, DataSet<?> data) {
this.bcVarsSum.add(new Tuple2<>(name, data));
} | java | public void addBroadcastSetForSumFunction(String name, DataSet<?> data) {
this.bcVarsSum.add(new Tuple2<>(name, data));
} | [
"public",
"void",
"addBroadcastSetForSumFunction",
"(",
"String",
"name",
",",
"DataSet",
"<",
"?",
">",
"data",
")",
"{",
"this",
".",
"bcVarsSum",
".",
"add",
"(",
"new",
"Tuple2",
"<>",
"(",
"name",
",",
"data",
")",
")",
";",
"}"
] | Adds a data set as a broadcast set to the sum function.
@param name The name under which the broadcast data is available in the sum function.
@param data The data set to be broadcast. | [
"Adds",
"a",
"data",
"set",
"as",
"a",
"broadcast",
"set",
"to",
"the",
"sum",
"function",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/gsa/GSAConfiguration.java#L70-L72 |
123,980 | apache/flink | flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/gsa/GSAConfiguration.java | GSAConfiguration.addBroadcastSetForApplyFunction | public void addBroadcastSetForApplyFunction(String name, DataSet<?> data) {
this.bcVarsApply.add(new Tuple2<>(name, data));
} | java | public void addBroadcastSetForApplyFunction(String name, DataSet<?> data) {
this.bcVarsApply.add(new Tuple2<>(name, data));
} | [
"public",
"void",
"addBroadcastSetForApplyFunction",
"(",
"String",
"name",
",",
"DataSet",
"<",
"?",
">",
"data",
")",
"{",
"this",
".",
"bcVarsApply",
".",
"add",
"(",
"new",
"Tuple2",
"<>",
"(",
"name",
",",
"data",
")",
")",
";",
"}"
] | Adds a data set as a broadcast set to the apply function.
@param name The name under which the broadcast data is available in the apply function.
@param data The data set to be broadcast. | [
"Adds",
"a",
"data",
"set",
"as",
"a",
"broadcast",
"set",
"to",
"the",
"apply",
"function",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/gsa/GSAConfiguration.java#L80-L82 |
123,981 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamRecord.java | StreamRecord.replace | @SuppressWarnings("unchecked")
public <X> StreamRecord<X> replace(X element) {
this.value = (T) element;
return (StreamRecord<X>) this;
} | java | @SuppressWarnings("unchecked")
public <X> StreamRecord<X> replace(X element) {
this.value = (T) element;
return (StreamRecord<X>) this;
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"<",
"X",
">",
"StreamRecord",
"<",
"X",
">",
"replace",
"(",
"X",
"element",
")",
"{",
"this",
".",
"value",
"=",
"(",
"T",
")",
"element",
";",
"return",
"(",
"StreamRecord",
"<",
"X",
"... | Replace the currently stored value by the given new value. This returns a StreamElement
with the generic type parameter that matches the new value while keeping the old
timestamp.
@param element Element to set in this stream value
@return Returns the StreamElement with replaced value | [
"Replace",
"the",
"currently",
"stored",
"value",
"by",
"the",
"given",
"new",
"value",
".",
"This",
"returns",
"a",
"StreamElement",
"with",
"the",
"generic",
"type",
"parameter",
"that",
"matches",
"the",
"new",
"value",
"while",
"keeping",
"the",
"old",
"... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamRecord.java#L104-L108 |
123,982 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamRecord.java | StreamRecord.replace | @SuppressWarnings("unchecked")
public <X> StreamRecord<X> replace(X value, long timestamp) {
this.timestamp = timestamp;
this.value = (T) value;
this.hasTimestamp = true;
return (StreamRecord<X>) this;
} | java | @SuppressWarnings("unchecked")
public <X> StreamRecord<X> replace(X value, long timestamp) {
this.timestamp = timestamp;
this.value = (T) value;
this.hasTimestamp = true;
return (StreamRecord<X>) this;
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"<",
"X",
">",
"StreamRecord",
"<",
"X",
">",
"replace",
"(",
"X",
"value",
",",
"long",
"timestamp",
")",
"{",
"this",
".",
"timestamp",
"=",
"timestamp",
";",
"this",
".",
"value",
"=",
"(... | Replace the currently stored value by the given new value and the currently stored
timestamp with the new timestamp. This returns a StreamElement with the generic type
parameter that matches the new value.
@param value The new value to wrap in this StreamRecord
@param timestamp The new timestamp in milliseconds
@retur... | [
"Replace",
"the",
"currently",
"stored",
"value",
"by",
"the",
"given",
"new",
"value",
"and",
"the",
"currently",
"stored",
"timestamp",
"with",
"the",
"new",
"timestamp",
".",
"This",
"returns",
"a",
"StreamElement",
"with",
"the",
"generic",
"type",
"parame... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamRecord.java#L119-L126 |
123,983 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamRecord.java | StreamRecord.copy | public StreamRecord<T> copy(T valueCopy) {
StreamRecord<T> copy = new StreamRecord<>(valueCopy);
copy.timestamp = this.timestamp;
copy.hasTimestamp = this.hasTimestamp;
return copy;
} | java | public StreamRecord<T> copy(T valueCopy) {
StreamRecord<T> copy = new StreamRecord<>(valueCopy);
copy.timestamp = this.timestamp;
copy.hasTimestamp = this.hasTimestamp;
return copy;
} | [
"public",
"StreamRecord",
"<",
"T",
">",
"copy",
"(",
"T",
"valueCopy",
")",
"{",
"StreamRecord",
"<",
"T",
">",
"copy",
"=",
"new",
"StreamRecord",
"<>",
"(",
"valueCopy",
")",
";",
"copy",
".",
"timestamp",
"=",
"this",
".",
"timestamp",
";",
"copy",... | Creates a copy of this stream record. Uses the copied value as the value for the new
record, i.e., only copies timestamp fields. | [
"Creates",
"a",
"copy",
"of",
"this",
"stream",
"record",
".",
"Uses",
"the",
"copied",
"value",
"as",
"the",
"value",
"for",
"the",
"new",
"record",
"i",
".",
"e",
".",
"only",
"copies",
"timestamp",
"fields",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamRecord.java#L145-L150 |
123,984 | apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamRecord.java | StreamRecord.copyTo | public void copyTo(T valueCopy, StreamRecord<T> target) {
target.value = valueCopy;
target.timestamp = this.timestamp;
target.hasTimestamp = this.hasTimestamp;
} | java | public void copyTo(T valueCopy, StreamRecord<T> target) {
target.value = valueCopy;
target.timestamp = this.timestamp;
target.hasTimestamp = this.hasTimestamp;
} | [
"public",
"void",
"copyTo",
"(",
"T",
"valueCopy",
",",
"StreamRecord",
"<",
"T",
">",
"target",
")",
"{",
"target",
".",
"value",
"=",
"valueCopy",
";",
"target",
".",
"timestamp",
"=",
"this",
".",
"timestamp",
";",
"target",
".",
"hasTimestamp",
"=",
... | Copies this record into the new stream record. Uses the copied value as the value for the new
record, i.e., only copies timestamp fields. | [
"Copies",
"this",
"record",
"into",
"the",
"new",
"stream",
"record",
".",
"Uses",
"the",
"copied",
"value",
"as",
"the",
"value",
"for",
"the",
"new",
"record",
"i",
".",
"e",
".",
"only",
"copies",
"timestamp",
"fields",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/streamrecord/StreamRecord.java#L156-L160 |
123,985 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/iterative/concurrent/SuperstepBarrier.java | SuperstepBarrier.onEvent | @Override
public void onEvent(TaskEvent event) {
if (event instanceof TerminationEvent) {
terminationSignaled = true;
}
else if (event instanceof AllWorkersDoneEvent) {
AllWorkersDoneEvent wde = (AllWorkersDoneEvent) event;
aggregatorNames = wde.getAggregatorNames();
aggregates = wde.getAggregates(us... | java | @Override
public void onEvent(TaskEvent event) {
if (event instanceof TerminationEvent) {
terminationSignaled = true;
}
else if (event instanceof AllWorkersDoneEvent) {
AllWorkersDoneEvent wde = (AllWorkersDoneEvent) event;
aggregatorNames = wde.getAggregatorNames();
aggregates = wde.getAggregates(us... | [
"@",
"Override",
"public",
"void",
"onEvent",
"(",
"TaskEvent",
"event",
")",
"{",
"if",
"(",
"event",
"instanceof",
"TerminationEvent",
")",
"{",
"terminationSignaled",
"=",
"true",
";",
"}",
"else",
"if",
"(",
"event",
"instanceof",
"AllWorkersDoneEvent",
")... | Barrier will release the waiting thread if an event occurs. | [
"Barrier",
"will",
"release",
"the",
"waiting",
"thread",
"if",
"an",
"event",
"occurs",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/iterative/concurrent/SuperstepBarrier.java#L66-L81 |
123,986 | apache/flink | flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/MesosTaskManagerParameters.java | MesosTaskManagerParameters.create | public static MesosTaskManagerParameters create(Configuration flinkConfig) {
List<ConstraintEvaluator> constraints = parseConstraints(flinkConfig.getString(MESOS_CONSTRAINTS_HARD_HOSTATTR));
// parse the common parameters
ContaineredTaskManagerParameters containeredParameters = ContaineredTaskManagerParameters.c... | java | public static MesosTaskManagerParameters create(Configuration flinkConfig) {
List<ConstraintEvaluator> constraints = parseConstraints(flinkConfig.getString(MESOS_CONSTRAINTS_HARD_HOSTATTR));
// parse the common parameters
ContaineredTaskManagerParameters containeredParameters = ContaineredTaskManagerParameters.c... | [
"public",
"static",
"MesosTaskManagerParameters",
"create",
"(",
"Configuration",
"flinkConfig",
")",
"{",
"List",
"<",
"ConstraintEvaluator",
">",
"constraints",
"=",
"parseConstraints",
"(",
"flinkConfig",
".",
"getString",
"(",
"MESOS_CONSTRAINTS_HARD_HOSTATTR",
")",
... | Create the Mesos TaskManager parameters.
@param flinkConfig the TM configuration. | [
"Create",
"the",
"Mesos",
"TaskManager",
"parameters",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/MesosTaskManagerParameters.java#L333-L412 |
123,987 | apache/flink | flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/MesosTaskManagerParameters.java | MesosTaskManagerParameters.buildVolumes | public static List<Protos.Volume> buildVolumes(Option<String> containerVolumes) {
if (containerVolumes.isEmpty()) {
return Collections.emptyList();
} else {
String[] volumeSpecifications = containerVolumes.get().split(",");
List<Protos.Volume> volumes = new ArrayList<>(volumeSpecifications.length);
fo... | java | public static List<Protos.Volume> buildVolumes(Option<String> containerVolumes) {
if (containerVolumes.isEmpty()) {
return Collections.emptyList();
} else {
String[] volumeSpecifications = containerVolumes.get().split(",");
List<Protos.Volume> volumes = new ArrayList<>(volumeSpecifications.length);
fo... | [
"public",
"static",
"List",
"<",
"Protos",
".",
"Volume",
">",
"buildVolumes",
"(",
"Option",
"<",
"String",
">",
"containerVolumes",
")",
"{",
"if",
"(",
"containerVolumes",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"Collections",
".",
"emptyList",
"(... | Used to build volume specs for mesos. This allows for mounting additional volumes into a container
@param containerVolumes a comma delimited optional string of [host_path:]container_path[:RO|RW] that
defines mount points for a container volume. If None or empty string, returns
an empty iterator | [
"Used",
"to",
"build",
"volume",
"specs",
"for",
"mesos",
".",
"This",
"allows",
"for",
"mounting",
"additional",
"volumes",
"into",
"a",
"container"
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/MesosTaskManagerParameters.java#L452-L496 |
123,988 | apache/flink | flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/MesosTaskManagerParameters.java | MesosTaskManagerParameters.buildUris | public static List<String> buildUris(Option<String> uris) {
if (uris.isEmpty()) {
return Collections.emptyList();
} else {
List<String> urisList = new ArrayList<>();
for (String uri : uris.get().split(",")) {
urisList.add(uri.trim());
}
return urisList;
}
} | java | public static List<String> buildUris(Option<String> uris) {
if (uris.isEmpty()) {
return Collections.emptyList();
} else {
List<String> urisList = new ArrayList<>();
for (String uri : uris.get().split(",")) {
urisList.add(uri.trim());
}
return urisList;
}
} | [
"public",
"static",
"List",
"<",
"String",
">",
"buildUris",
"(",
"Option",
"<",
"String",
">",
"uris",
")",
"{",
"if",
"(",
"uris",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"Collections",
".",
"emptyList",
"(",
")",
";",
"}",
"else",
"{",
"Li... | Build a list of URIs for providing custom artifacts to Mesos tasks.
@param uris a comma delimited optional string listing artifact URIs | [
"Build",
"a",
"list",
"of",
"URIs",
"for",
"providing",
"custom",
"artifacts",
"to",
"Mesos",
"tasks",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/MesosTaskManagerParameters.java#L528-L538 |
123,989 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/webmonitor/WebMonitorUtils.java | WebMonitorUtils.tryLoadWebContent | public static <T extends RestfulGateway> Optional<StaticFileServerHandler<T>> tryLoadWebContent(
GatewayRetriever<? extends T> leaderRetriever,
Time timeout,
File tmpDir) throws IOException {
if (isFlinkRuntimeWebInClassPath()) {
return Optional.of(new StaticFileServerHandler<>(
leaderRetriever,
... | java | public static <T extends RestfulGateway> Optional<StaticFileServerHandler<T>> tryLoadWebContent(
GatewayRetriever<? extends T> leaderRetriever,
Time timeout,
File tmpDir) throws IOException {
if (isFlinkRuntimeWebInClassPath()) {
return Optional.of(new StaticFileServerHandler<>(
leaderRetriever,
... | [
"public",
"static",
"<",
"T",
"extends",
"RestfulGateway",
">",
"Optional",
"<",
"StaticFileServerHandler",
"<",
"T",
">",
">",
"tryLoadWebContent",
"(",
"GatewayRetriever",
"<",
"?",
"extends",
"T",
">",
"leaderRetriever",
",",
"Time",
"timeout",
",",
"File",
... | Checks whether the flink-runtime-web dependency is available and if so returns a
StaticFileServerHandler which can serve the static file contents.
@param leaderRetriever to be used by the StaticFileServerHandler
@param timeout for lookup requests
@param tmpDir to be used by the StaticFileServerHandler to store tempora... | [
"Checks",
"whether",
"the",
"flink",
"-",
"runtime",
"-",
"web",
"dependency",
"is",
"available",
"and",
"if",
"so",
"returns",
"a",
"StaticFileServerHandler",
"which",
"can",
"serve",
"the",
"static",
"file",
"contents",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/webmonitor/WebMonitorUtils.java#L130-L143 |
123,990 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/sampling/PoissonSampler.java | PoissonSampler.sample | @Override
public Iterator<T> sample(final Iterator<T> input) {
if (fraction == 0) {
return emptyIterable;
}
return new SampledIterator<T>() {
T currentElement;
int currentCount = 0;
@Override
public boolean hasNext() {
if (currentCount > 0) {
return true;
} else {
samplingProce... | java | @Override
public Iterator<T> sample(final Iterator<T> input) {
if (fraction == 0) {
return emptyIterable;
}
return new SampledIterator<T>() {
T currentElement;
int currentCount = 0;
@Override
public boolean hasNext() {
if (currentCount > 0) {
return true;
} else {
samplingProce... | [
"@",
"Override",
"public",
"Iterator",
"<",
"T",
">",
"sample",
"(",
"final",
"Iterator",
"<",
"T",
">",
"input",
")",
"{",
"if",
"(",
"fraction",
"==",
"0",
")",
"{",
"return",
"emptyIterable",
";",
"}",
"return",
"new",
"SampledIterator",
"<",
"T",
... | Sample the input elements, for each input element, generate its count following a poisson
distribution.
@param input Elements to be sampled.
@return The sampled result which is lazy computed upon input elements. | [
"Sample",
"the",
"input",
"elements",
"for",
"each",
"input",
"element",
"generate",
"its",
"count",
"following",
"a",
"poisson",
"distribution",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/sampling/PoissonSampler.java#L85-L162 |
123,991 | apache/flink | flink-table/flink-table-planner-blink/src/main/java/org/apache/calcite/avatica/util/DateTimeUtils.java | DateTimeUtils.newDateFormat | public static SimpleDateFormat newDateFormat(String format) {
SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.ROOT);
sdf.setLenient(false);
return sdf;
} | java | public static SimpleDateFormat newDateFormat(String format) {
SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.ROOT);
sdf.setLenient(false);
return sdf;
} | [
"public",
"static",
"SimpleDateFormat",
"newDateFormat",
"(",
"String",
"format",
")",
"{",
"SimpleDateFormat",
"sdf",
"=",
"new",
"SimpleDateFormat",
"(",
"format",
",",
"Locale",
".",
"ROOT",
")",
";",
"sdf",
".",
"setLenient",
"(",
"false",
")",
";",
"ret... | Creates a new date formatter with Farrago specific options. Farrago
parsing is strict and does not allow values such as day 0, month 13, etc.
@param format {@link SimpleDateFormat} pattern | [
"Creates",
"a",
"new",
"date",
"formatter",
"with",
"Farrago",
"specific",
"options",
".",
"Farrago",
"parsing",
"is",
"strict",
"and",
"does",
"not",
"allow",
"values",
"such",
"as",
"day",
"0",
"month",
"13",
"etc",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner-blink/src/main/java/org/apache/calcite/avatica/util/DateTimeUtils.java#L306-L310 |
123,992 | apache/flink | flink-table/flink-table-planner-blink/src/main/java/org/apache/calcite/avatica/util/DateTimeUtils.java | DateTimeUtils.firstMondayOfFirstWeek | private static long firstMondayOfFirstWeek(int year) {
final long janFirst = ymdToJulian(year, 1, 1);
final long janFirstDow = floorMod(janFirst + 1, 7); // sun=0, sat=6
return janFirst + (11 - janFirstDow) % 7 - 3;
} | java | private static long firstMondayOfFirstWeek(int year) {
final long janFirst = ymdToJulian(year, 1, 1);
final long janFirstDow = floorMod(janFirst + 1, 7); // sun=0, sat=6
return janFirst + (11 - janFirstDow) % 7 - 3;
} | [
"private",
"static",
"long",
"firstMondayOfFirstWeek",
"(",
"int",
"year",
")",
"{",
"final",
"long",
"janFirst",
"=",
"ymdToJulian",
"(",
"year",
",",
"1",
",",
"1",
")",
";",
"final",
"long",
"janFirstDow",
"=",
"floorMod",
"(",
"janFirst",
"+",
"1",
"... | Returns the first day of the first week of a year.
Per ISO-8601 it is the Monday of the week that contains Jan 4,
or equivalently, it is a Monday between Dec 29 and Jan 4.
Sometimes it is in the year before the given year. | [
"Returns",
"the",
"first",
"day",
"of",
"the",
"first",
"week",
"of",
"a",
"year",
".",
"Per",
"ISO",
"-",
"8601",
"it",
"is",
"the",
"Monday",
"of",
"the",
"week",
"that",
"contains",
"Jan",
"4",
"or",
"equivalently",
"it",
"is",
"a",
"Monday",
"bet... | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner-blink/src/main/java/org/apache/calcite/avatica/util/DateTimeUtils.java#L931-L935 |
123,993 | apache/flink | flink-table/flink-table-planner-blink/src/main/java/org/apache/calcite/avatica/util/DateTimeUtils.java | DateTimeUtils.addMonths | public static long addMonths(long timestamp, int m) {
final long millis =
DateTimeUtils.floorMod(timestamp, DateTimeUtils.MILLIS_PER_DAY);
timestamp -= millis;
final long x =
addMonths((int) (timestamp / DateTimeUtils.MILLIS_PER_DAY), m);
return x * DateTimeUtils.MILLIS_PER_DAY + millis;
} | java | public static long addMonths(long timestamp, int m) {
final long millis =
DateTimeUtils.floorMod(timestamp, DateTimeUtils.MILLIS_PER_DAY);
timestamp -= millis;
final long x =
addMonths((int) (timestamp / DateTimeUtils.MILLIS_PER_DAY), m);
return x * DateTimeUtils.MILLIS_PER_DAY + millis;
} | [
"public",
"static",
"long",
"addMonths",
"(",
"long",
"timestamp",
",",
"int",
"m",
")",
"{",
"final",
"long",
"millis",
"=",
"DateTimeUtils",
".",
"floorMod",
"(",
"timestamp",
",",
"DateTimeUtils",
".",
"MILLIS_PER_DAY",
")",
";",
"timestamp",
"-=",
"milli... | Adds a given number of months to a timestamp, represented as the number
of milliseconds since the epoch. | [
"Adds",
"a",
"given",
"number",
"of",
"months",
"to",
"a",
"timestamp",
"represented",
"as",
"the",
"number",
"of",
"milliseconds",
"since",
"the",
"epoch",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner-blink/src/main/java/org/apache/calcite/avatica/util/DateTimeUtils.java#L1059-L1066 |
123,994 | apache/flink | flink-table/flink-table-planner-blink/src/main/java/org/apache/calcite/avatica/util/DateTimeUtils.java | DateTimeUtils.addMonths | public static int addMonths(int date, int m) {
int y0 = (int) DateTimeUtils.unixDateExtract(TimeUnitRange.YEAR, date);
int m0 = (int) DateTimeUtils.unixDateExtract(TimeUnitRange.MONTH, date);
int d0 = (int) DateTimeUtils.unixDateExtract(TimeUnitRange.DAY, date);
int y = m / 12;
y0 += y;
m0 += m - y * 12;
... | java | public static int addMonths(int date, int m) {
int y0 = (int) DateTimeUtils.unixDateExtract(TimeUnitRange.YEAR, date);
int m0 = (int) DateTimeUtils.unixDateExtract(TimeUnitRange.MONTH, date);
int d0 = (int) DateTimeUtils.unixDateExtract(TimeUnitRange.DAY, date);
int y = m / 12;
y0 += y;
m0 += m - y * 12;
... | [
"public",
"static",
"int",
"addMonths",
"(",
"int",
"date",
",",
"int",
"m",
")",
"{",
"int",
"y0",
"=",
"(",
"int",
")",
"DateTimeUtils",
".",
"unixDateExtract",
"(",
"TimeUnitRange",
".",
"YEAR",
",",
"date",
")",
";",
"int",
"m0",
"=",
"(",
"int",... | Adds a given number of months to a date, represented as the number of
days since the epoch. | [
"Adds",
"a",
"given",
"number",
"of",
"months",
"to",
"a",
"date",
"represented",
"as",
"the",
"number",
"of",
"days",
"since",
"the",
"epoch",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner-blink/src/main/java/org/apache/calcite/avatica/util/DateTimeUtils.java#L1070-L1086 |
123,995 | apache/flink | flink-table/flink-table-planner-blink/src/main/java/org/apache/calcite/avatica/util/DateTimeUtils.java | DateTimeUtils.subtractMonths | public static int subtractMonths(int date0, int date1) {
if (date0 < date1) {
return -subtractMonths(date1, date0);
}
// Start with an estimate.
// Since no month has more than 31 days, the estimate is <= the true value.
int m = (date0 - date1) / 31;
for (;;) {
int date2 = addMonths(date1, m);
if (... | java | public static int subtractMonths(int date0, int date1) {
if (date0 < date1) {
return -subtractMonths(date1, date0);
}
// Start with an estimate.
// Since no month has more than 31 days, the estimate is <= the true value.
int m = (date0 - date1) / 31;
for (;;) {
int date2 = addMonths(date1, m);
if (... | [
"public",
"static",
"int",
"subtractMonths",
"(",
"int",
"date0",
",",
"int",
"date1",
")",
"{",
"if",
"(",
"date0",
"<",
"date1",
")",
"{",
"return",
"-",
"subtractMonths",
"(",
"date1",
",",
"date0",
")",
";",
"}",
"// Start with an estimate.",
"// Since... | Finds the number of months between two dates, each represented as the
number of days since the epoch. | [
"Finds",
"the",
"number",
"of",
"months",
"between",
"two",
"dates",
"each",
"represented",
"as",
"the",
"number",
"of",
"days",
"since",
"the",
"epoch",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner-blink/src/main/java/org/apache/calcite/avatica/util/DateTimeUtils.java#L1107-L1125 |
123,996 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/functions/SemanticPropUtil.java | SemanticPropUtil.addSourceFieldOffset | public static SingleInputSemanticProperties addSourceFieldOffset(SingleInputSemanticProperties props,
int numInputFields, int offset) {
SingleInputSemanticProperties offsetProps = new SingleInputSemanticProperties();
if (props.getReadFields(0) != null) {
FieldSet offsetReadFields = new FieldSe... | java | public static SingleInputSemanticProperties addSourceFieldOffset(SingleInputSemanticProperties props,
int numInputFields, int offset) {
SingleInputSemanticProperties offsetProps = new SingleInputSemanticProperties();
if (props.getReadFields(0) != null) {
FieldSet offsetReadFields = new FieldSe... | [
"public",
"static",
"SingleInputSemanticProperties",
"addSourceFieldOffset",
"(",
"SingleInputSemanticProperties",
"props",
",",
"int",
"numInputFields",
",",
"int",
"offset",
")",
"{",
"SingleInputSemanticProperties",
"offsetProps",
"=",
"new",
"SingleInputSemanticProperties",... | Creates SemanticProperties by adding an offset to each input field index of the given SemanticProperties.
@param props The SemanticProperties to which the offset is added.
@param numInputFields The original number of fields of the input.
@param offset The offset that is added to each input field index.
@return New Sem... | [
"Creates",
"SemanticProperties",
"by",
"adding",
"an",
"offset",
"to",
"each",
"input",
"field",
"index",
"of",
"the",
"given",
"SemanticProperties",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/functions/SemanticPropUtil.java#L166-L184 |
123,997 | apache/flink | flink-java/src/main/java/org/apache/flink/api/java/functions/SemanticPropUtil.java | SemanticPropUtil.addSourceFieldOffsets | public static DualInputSemanticProperties addSourceFieldOffsets(DualInputSemanticProperties props,
int numInputFields1, int numInputFields2,
int offset1, int offset2) {
DualInputSemanticProperties offsetProps = new DualInputSemanticProperties();
// add offset to read fields on fi... | java | public static DualInputSemanticProperties addSourceFieldOffsets(DualInputSemanticProperties props,
int numInputFields1, int numInputFields2,
int offset1, int offset2) {
DualInputSemanticProperties offsetProps = new DualInputSemanticProperties();
// add offset to read fields on fi... | [
"public",
"static",
"DualInputSemanticProperties",
"addSourceFieldOffsets",
"(",
"DualInputSemanticProperties",
"props",
",",
"int",
"numInputFields1",
",",
"int",
"numInputFields2",
",",
"int",
"offset1",
",",
"int",
"offset2",
")",
"{",
"DualInputSemanticProperties",
"o... | Creates SemanticProperties by adding offsets to each input field index of the given SemanticProperties.
@param props The SemanticProperties to which the offset is added.
@param numInputFields1 The original number of fields of the first input.
@param numInputFields2 The original number of fields of the second input.
@p... | [
"Creates",
"SemanticProperties",
"by",
"adding",
"offsets",
"to",
"each",
"input",
"field",
"index",
"of",
"the",
"given",
"SemanticProperties",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/functions/SemanticPropUtil.java#L196-L235 |
123,998 | apache/flink | flink-core/src/main/java/org/apache/flink/configuration/MemorySize.java | MemorySize.parse | public static MemorySize parse(String text, MemoryUnit defaultUnit) throws IllegalArgumentException {
if (!hasUnit(text)) {
return parse(text + defaultUnit.getUnits()[0]);
}
return parse(text);
} | java | public static MemorySize parse(String text, MemoryUnit defaultUnit) throws IllegalArgumentException {
if (!hasUnit(text)) {
return parse(text + defaultUnit.getUnits()[0]);
}
return parse(text);
} | [
"public",
"static",
"MemorySize",
"parse",
"(",
"String",
"text",
",",
"MemoryUnit",
"defaultUnit",
")",
"throws",
"IllegalArgumentException",
"{",
"if",
"(",
"!",
"hasUnit",
"(",
"text",
")",
")",
"{",
"return",
"parse",
"(",
"text",
"+",
"defaultUnit",
"."... | Parses the given string with a default unit.
@param text The string to parse.
@param defaultUnit specify the default unit.
@return The parsed MemorySize.
@throws IllegalArgumentException Thrown, if the expression cannot be parsed. | [
"Parses",
"the",
"given",
"string",
"with",
"a",
"default",
"unit",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/MemorySize.java#L143-L149 |
123,999 | apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/operators/hash/MutableHashTable.java | MutableHashTable.buildInitialTable | protected void buildInitialTable(final MutableObjectIterator<BT> input) throws IOException {
// create the partitions
final int partitionFanOut = getPartitioningFanOutNoEstimates(this.availableMemory.size());
if (partitionFanOut > MAX_NUM_PARTITIONS) {
throw new RuntimeException("Hash join partitions estimate ... | java | protected void buildInitialTable(final MutableObjectIterator<BT> input) throws IOException {
// create the partitions
final int partitionFanOut = getPartitioningFanOutNoEstimates(this.availableMemory.size());
if (partitionFanOut > MAX_NUM_PARTITIONS) {
throw new RuntimeException("Hash join partitions estimate ... | [
"protected",
"void",
"buildInitialTable",
"(",
"final",
"MutableObjectIterator",
"<",
"BT",
">",
"input",
")",
"throws",
"IOException",
"{",
"// create the partitions",
"final",
"int",
"partitionFanOut",
"=",
"getPartitioningFanOutNoEstimates",
"(",
"this",
".",
"availa... | Creates the initial hash table. This method sets up partitions, hash index, and inserts
the data from the given iterator.
@param input The iterator with the build side data.
@throws IOException Thrown, if an element could not be fetched and deserialized from
the iterator, or if serialization fails. | [
"Creates",
"the",
"initial",
"hash",
"table",
".",
"This",
"method",
"sets",
"up",
"partitions",
"hash",
"index",
"and",
"inserts",
"the",
"data",
"from",
"the",
"given",
"iterator",
"."
] | b62db93bf63cb3bb34dd03d611a779d9e3fc61ac | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/hash/MutableHashTable.java#L785-L816 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.