name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
flink_ProjectOperator_projectTuple12_rdh | /**
* Projects a {@link Tuple} {@link DataSet} to the previously selected fields.
*
* @return The projected DataSet.
* @see Tuple
* @see DataSet
*/
public <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> ProjectOperator<T, Tuple12<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>> projectTuple12() {
TypeInf... | 3.26 |
flink_ProjectOperator_extractFieldTypes_rdh | // END_OF_TUPLE_DEPENDENT_CODE
// -----------------------------------------------------------------------------------------
private TypeInformation<?>[] extractFieldTypes(int[] fields, TypeInformation<?> inType) {
TupleTypeInfo<?> inTupleType = ((TupleTypeInfo<?>) (inType));
TypeInformation<?>[] fieldTypes ... | 3.26 |
flink_ProjectOperator_projectTuple8_rdh | /**
* Projects a {@link Tuple} {@link DataSet} to the previously selected fields.
*
* @return The projected DataSet.
* @see Tuple
* @see DataSet
*/
public <T0, T1, T2, T3, T4, T5, T6, T7> ProjectOperator<T, Tuple8<T0, T1, T2,
T3, T4, T5, T6, T7>> projectTuple8() {
TypeInformation<?>[] fTypes = extractFieldTy... | 3.26 |
flink_Path_fromLocalFile_rdh | // Utilities
// ------------------------------------------------------------------------
/**
* Creates a path for the given local file.
*
* <p>This method is useful to make sure the path creation for local files works seamlessly
* across different operating systems. Especially Windows has slightly different rules f... | 3.26 |
flink_Path_getName_rdh | /**
* Returns the final component of this path, i.e., everything that follows the last separator.
*
* @return the final component of the path
*/
public String getName() {
final String path = uri.getPath();
final int slash = path.lastIndexOf(SEPARATOR);
return path.substring(slash + 1);
} | 3.26 |
flink_Path_serializeToDataOutputView_rdh | /**
* Serialize the path to {@link DataInputView}.
*
* @param path
* the file path.
* @param out
* the data out put view.
* @throws IOException
* if an error happened.
*/
public static void serializeToDataOutputView(Path path, DataOutputView out) throws IOException
{
URI uri = path.toUri();
if (... | 3.26 |
flink_Path_checkPathArg_rdh | /**
* Checks if the provided path string is either null or has zero length and throws a {@link IllegalArgumentException} if any of the two conditions apply.
*
* @param path
* the path string to be checked
* @return The checked path.
*/
private String checkPathArg(String path) {
// disallow construction of a... | 3.26 |
flink_Path_hasWindowsDrive_rdh | /**
* Checks if the provided path string contains a windows drive letter.
*
* @param path
* the path to check
* @param slashed
* true to indicate the first character of the string is a slash, false otherwise
* @return <code>true</code> if the path string contains a windows drive letter, false otherwise
*/
p... | 3.26 |
flink_Path_getFileSystem_rdh | /**
* Returns the FileSystem that owns this Path.
*
* @return the FileSystem that owns this Path
* @throws IOException
* thrown if the file system could not be retrieved
*/
public FileSystem getFileSystem() throws IOException {
return FileSystem.get(this.toUri());} | 3.26 |
flink_Path_initialize_rdh | /**
* Initializes a path object given the scheme, authority and path string.
*
* @param scheme
* the scheme string.
* @param authority
* the authority string.
* @param path
* the path string.
*/ private void initialize(String scheme, String authority, String path) {
try {
this.uri = new URI(s... | 3.26 |
flink_Path_depth_rdh | /**
* Returns the number of elements in this path.
*
* @return the number of elements in this path
*/
public int depth() {
String path = uri.getPath();
int depth = 0;
int
slash = ((path.length() == 1) && (path.charAt(0) == '/')) ? -1 : 0;
while (slash
!= (-1)) {
depth++;
slas... | 3.26 |
flink_Path_suffix_rdh | /**
* Adds a suffix to the final name in the path.
*
* @param suffix
* The suffix to be added
* @return the new path including the suffix
*/
public Path suffix(String suffix) {return new Path(getParent(), getName() + suffix);
} | 3.26 |
flink_Path_getParent_rdh | /**
* Returns the parent of a path, i.e., everything that precedes the last separator or <code>null
* </code> if at root.
*
* @return the parent of a path or <code>null</code> if at root.
*/
public Path getParent() {
final String path = uri.getPath();
final int v15 = path.lastIndexOf('/');
final int st... | 3.26 |
flink_Path_normalizePath_rdh | /**
* Normalizes a path string.
*
* @param path
* the path string to normalize
* @return the normalized path string
*/
private String normalizePath(String path) {
// remove consecutive slashes & backslashes
path = path.replace("\\", "/");
path = path.replaceAll("/+", "/");
// remove tailing sepa... | 3.26 |
flink_Path_makeQualified_rdh | /**
* Returns a qualified path object.
*
* @param fs
* the FileSystem that should be used to obtain the current working directory
* @return the qualified path object
*/
public Path makeQualified(FileSystem fs) {
Path path = this;
if (!isAbsolute()) {
path = new Path(fs.getWorkingDirectory(), thi... | 3.26 |
flink_JobStatus_isTerminalState_rdh | /**
* Checks whether this state is <i>locally terminal</i>. Locally terminal refers to the state of
* a job's execution graph within an executing JobManager. If the execution graph is locally
* terminal, the JobManager will not continue executing or recovering the job.
*
* <p>The only state that is locally termina... | 3.26 |
flink_JoinInputSideSpec_withoutUniqueKey_rdh | /**
* Creates a {@link JoinInputSideSpec} that input hasn't any unique keys.
*/
public static JoinInputSideSpec withoutUniqueKey() {
return new JoinInputSideSpec(false, null, null);
} | 3.26 |
flink_JoinInputSideSpec_joinKeyContainsUniqueKey_rdh | /**
* Returns true if the join key contains the unique key of the input.
*/public boolean joinKeyContainsUniqueKey() {
return joinKeyContainsUniqueKey;
} | 3.26 |
flink_JoinInputSideSpec_hasUniqueKey_rdh | /**
* Returns true if the input has unique key, otherwise false.
*/
public boolean hasUniqueKey() {
return inputSideHasUniqueKey;} | 3.26 |
flink_JoinInputSideSpec_withUniqueKeyContainedByJoinKey_rdh | /**
* Creates a {@link JoinInputSideSpec} that input has an unique key and the unique key is
* contained by the join key.
*
* @param uniqueKeyType
* type information of the unique key
* @param uniqueKeySelector
* key selector to extract unique key from the input row
*/
public static JoinInputSideSpec withUn... | 3.26 |
flink_JoinInputSideSpec_getUniqueKeyType_rdh | /**
* Returns the {@link TypeInformation} of the unique key. Returns null if the input hasn't
* unique key.
*/
@Nullable
public InternalTypeInfo<RowData> getUniqueKeyType() {
return uniqueKeyType;
}
/**
* Returns the {@link KeySelector} | 3.26 |
flink_JoinInputSideSpec_m0_rdh | /**
* Creates a {@link JoinInputSideSpec} that the input has an unique key.
*
* @param uniqueKeyType
* type information of the unique key
* @param uniqueKeySelector
* key selector to extract unique key from the input row
*/
public static JoinInputSideSpec m0(InternalTypeInfo<RowData> uniqueKeyType, KeySelect... | 3.26 |
flink_ResourceProfile_merge_rdh | /**
* Calculates the sum of two resource profiles.
*
* @param other
* The other resource profile to add.
* @return The merged resource profile.
*/
@Nonnull
public ResourceProfile merge(final ResourceProfile other) {
checkNotNull(other, "Cannot merge with null resources");
if (equals(ANY) || other.equals... | 3.26 |
flink_ResourceProfile_readResolve_rdh | // ------------------------------------------------------------------------
// serialization
// ------------------------------------------------------------------------
private Object readResolve() {
// try to preserve the singleton property for UNKNOWN and ANY
if (this.equals(UNKNOWN)) {
return UNKNOWN... | 3.26 |
flink_ResourceProfile_getManagedMemory_rdh | /**
* Get the managed memory needed.
*
* @return The managed memory
*/
public MemorySize getManagedMemory() {
throwUnsupportedOperationExceptionIfUnknown();
return f1;
} | 3.26 |
flink_ResourceProfile_hashCode_rdh | // ------------------------------------------------------------------------
@Override
public int hashCode() {
int v1 = Objects.hashCode(cpuCores);
v1 = (31 * v1) + Objects.hashCode(taskHeapMemory);
v1 = (31 * v1) + Objects.hashCode(taskOffHeapMemory);
v1 = (31 * v1) + Objects.hashCode(f1);
v1 = (31... | 3.26 |
flink_ResourceProfile_getOperatorsMemory_rdh | /**
* Get the memory the operators needed.
*
* @return The operator memory
*/
public MemorySize getOperatorsMemory() {
throwUnsupportedOperationExceptionIfUnknown();return taskHeapMemory.add(taskOffHeapMemory).add(f1);
} | 3.26 |
flink_ResourceProfile_setExtendedResource_rdh | /**
* Add the given extended resource. The old value with the same resource name will be
* replaced if present.
*/
public Builder setExtendedResource(ExternalResource extendedResource) {this.extendedResources.put(extendedResource.getName(), extendedResource);
return this;
} | 3.26 |
flink_ResourceProfile_getCpuCores_rdh | // ------------------------------------------------------------------------
/**
* Get the cpu cores needed.
*
* @return The cpu cores, 1.0 means a full cpu thread
*/
public CPUResource getCpuCores() {
throwUnsupportedOperationExceptionIfUnknown();
return cpuCores;
} | 3.26 |
flink_ResourceProfile_getTotalMemory_rdh | /**
* Get the total memory needed.
*
* @return The total memory
*/
public MemorySize getTotalMemory() {
throwUnsupportedOperationExceptionIfUnknown();
return getOperatorsMemory().add(networkMemory);
} | 3.26 |
flink_ResourceProfile_getTaskOffHeapMemory_rdh | /**
* Get the task off-heap memory needed.
*
* @return The task off-heap memory
*/
public MemorySize getTaskOffHeapMemory() {
throwUnsupportedOperationExceptionIfUnknown();
return taskOffHeapMemory;
} | 3.26 |
flink_ResourceProfile_getExtendedResources_rdh | /**
* Get the extended resources.
*
* @return The extended resources
*/
public Map<String, ExternalResource> getExtendedResources() {
throwUnsupportedOperationExceptionIfUnknown();
return Collections.unmodifiableMap(extendedResources);
} | 3.26 |
flink_ResourceProfile_getNetworkMemory_rdh | /**
* Get the network memory needed.
*
* @return The network memory
*/
public MemorySize getNetworkMemory() {
throwUnsupportedOperationExceptionIfUnknown();
return networkMemory;
} | 3.26 |
flink_ResourceProfile_fromResourceSpec_rdh | // ------------------------------------------------------------------------
// factories
// ------------------------------------------------------------------------
@VisibleForTesting
static ResourceProfile fromResourceSpec(ResourceSpec resourceSpec) {
return fromResourceSpec(resourceSpec, MemorySize.ZERO);
} | 3.26 |
flink_ResourceProfile_setExtendedResources_rdh | /**
* Add the given extended resources. This will discard all the previous added extended
* resources.
*/
public Builder setExtendedResources(Collection<ExternalResource> extendedResources) {
this.extendedResources = extendedResources.stream().collect(Collectors.toMap(ExternalResource::getName, Function.identity()))... | 3.26 |
flink_ResourceProfile_allFieldsNoLessThan_rdh | /**
* Check whether all fields of this resource profile are no less than the given resource
* profile.
*
* <p>It is not same with the total resource comparison. It return true iff each resource
* field(cpu, task heap memory, managed memory, etc.) is no less than the respective field of
* the given profile.
*
* ... | 3.26 |
flink_ResourceProfile_isMatching_rdh | /**
* Check whether required resource profile can be matched.
*
* @param required
* the required resource profile
* @return true if the requirement is matched, otherwise false
*/
public boolean isMatching(final ResourceProfile required) {
checkNotNull(required, "Cannot check matching with null resources");
thr... | 3.26 |
flink_ResourceProfile_getTaskHeapMemory_rdh | /**
* Get the task heap memory needed.
*
* @return The task heap memory
*/
public MemorySize getTaskHeapMemory() {
throwUnsupportedOperationExceptionIfUnknown();
return taskHeapMemory;
} | 3.26 |
flink_RecordsBySplits_addFinishedSplits_rdh | /**
* Mark multiple splits with the given IDs as finished.
*
* @param splitIds
* the IDs of the finished splits.
*/
public void addFinishedSplits(Collection<String> splitIds) {
finishedSplits.addAll(splitIds);
} | 3.26 |
flink_RecordsBySplits_addFinishedSplit_rdh | /**
* Mark the split with the given ID as finished.
*
* @param splitId
* the ID of the finished split.
*/public void addFinishedSplit(String splitId) {finishedSplits.add(splitId);
} | 3.26 |
flink_RecordsBySplits_add_rdh | /**
* Add the record from the given source split.
*
* @param split
* the source split the record was from.
* @param record
* the record to add.
*/
public void add(SourceSplit split, E record) {
add(split.splitId(), record);
} | 3.26 |
flink_RecordsBySplits_addAll_rdh | /**
* Add multiple records from the given source split.
*
* @param split
* the source split the records were from.
* @param records
* the records to add.
*/
public void
addAll(SourceSplit split, Collection<E> records) {
addAll(split.splitId(), records);
} | 3.26 |
flink_EnumTriangles_main_rdh | // *************************************************************************
// PROGRAM
// *************************************************************************
public static void main(String[] args) throws Exception {
LOGGER.warn(DATASET_DEPRECATION_INFO);
// Checking input parameters
final ParameterTo... | 3.26 |
flink_FsCheckpointStorageLocation_createMetadataOutputStream_rdh | // ------------------------------------------------------------------------
// checkpoint metadata
// ------------------------------------------------------------------------
@Override
public CheckpointMetadataOutputStream createMetadataOutputStream() throws
IOException {
return new FsCheckpointMetadataOutputStream... | 3.26 |
flink_FsCheckpointStorageLocation_toString_rdh | // ------------------------------------------------------------------------
@Override
public String toString() {
return (((((((((((((((("FsCheckpointStorageLocation {" + "fileSystem=") + fileSystem) + ", checkpointDirectory=") + checkpointDirectory) + ", sharedStateDirectory=") + sharedStateDirectory)
+ ", task... | 3.26 |
flink_FsCheckpointStorageLocation_getCheckpointDirectory_rdh | // ------------------------------------------------------------------------
// Properties
// ------------------------------------------------------------------------
public Path getCheckpointDirectory() {
return checkpointDirectory;
} | 3.26 |
flink_GenericArrayData_anyNull_rdh | // ------------------------------------------------------------------------------------------
// Conversion Utilities
// ------------------------------------------------------------------------------------------
private boolean anyNull() {for (Object element : ((Object[]) (array)))
{
if (element == null) {
return ... | 3.26 |
flink_GenericArrayData_getBoolean_rdh | // ------------------------------------------------------------------------------------------
// Read-only accessor methods
// ------------------------------------------------------------------------------------------
@Override
public boolean getBoolean(int pos) {
return isPrimitiveArray ? ((boolean[]) (array))[p... | 3.26 |
flink_GenericArrayData_toObjectArray_rdh | /**
* Converts this {@link GenericArrayData} into an array of Java {@link Object}.
*
* <p>The method will convert a primitive array into an object array. But it will not convert
* internal data structures into external data structures (e.g. {@link StringData} to {@link String... | 3.26 |
flink_PojoSerializerSnapshotData_createFrom_rdh | /**
* Creates a {@link PojoSerializerSnapshotData} from existing snapshotted configuration of a
* {@link PojoSerializer}.
*/
static <T> PojoSerializerSnapshotData<T> createFrom(Class<T> pojoClass, Field[] fields, TypeSerializerSnapshot<?>[] existingFieldSerializerSnapshots, LinkedHashMap<Class<?>, TypeSerializerS... | 3.26 |
flink_PojoSerializerSnapshotData_writeSnapshotData_rdh | // ---------------------------------------------------------------------------------------------
// Snapshot data read / write methods
// ---------------------------------------------------------------------------------------------
void writeSnapshotData(DataOutputView out) throws IOException {
out.writeUTF(pojoCla... | 3.26 |
flink_PojoSerializerSnapshotData_getPojoClass_rdh | // ---------------------------------------------------------------------------------------------
// Snapshot data accessors
// ---------------------------------------------------------------------------------------------
Class<T> getPojoClass() {
return pojoClass;
} | 3.26 |
flink_PojoSerializerSnapshotData_getDummyNameForMissingField_rdh | // ---------------------------------------------------------------------------------------------
// Utilities
// ---------------------------------------------------------------------------------------------
private static String getDummyNameForMissingField(int fieldIndex) {
return String.format("missing-field-at-%d... | 3.26 |
flink_FlinkFilterJoinRule_perform_rdh | // ~ Methods ----------------------------------------------------------------
protected void perform(RelOptRuleCall call, Filter filter, Join join) {
final List<RexNode> joinFilters = RelOptUtil.conjunctions(join.getCondition());
final List<RexNode> origJoinFilters = ImmutableList.copyOf(joinFil... | 3.26 |
flink_FlinkFilterJoinRule_getConjunctions_rdh | /**
* Get conjunctions of filter's condition but with collapsed {@code IS NOT DISTINCT FROM}
* expressions if needed.
*
* @param filter
* filter containing condition
* @return condition conjunctions with collapsed {@code IS NOT DISTINCT FROM} expressions if any
* @see RelOptUtil#conjunctions(RexNode)
*/
priva... | 3.26 |
flink_FlinkFilterJoinRule_isSmart_rdh | /**
* Whether to try to strengthen join-type, default false.
*/
@Value.Default
default boolean isSmart() {
return false;
} | 3.26 |
flink_FlinkFilterJoinRule_validateJoinFilters_rdh | /**
* Validates that target execution framework can satisfy join filters.
*
* <p>If the join filter cannot be satisfied (for example, if it is {@code l.c1 > r.c2} and the
* join only supports equi-join), removes the filter from {@code joinFilters} and adds it to
* {@code aboveFilters}.
*
* <p>The default implem... | 3.26 |
flink_LogicalSnapshot_create_rdh | /**
* Creates a LogicalSnapshot.
*/
public static LogicalSnapshot create(RelNode input, RexNode period) {
final RelOptCluster cluster = input.getCluster();
final RelMetadataQuery mq = cluster.getMetadataQuery();
final RelTraitSet traitSet = cluster.traitSet().replace(Convention.NONE).replaceIfs(RelCollationTraitDe... | 3.26 |
flink_TableEnvironment_fromValues_rdh | /**
* Creates a Table from given collection of objects with a given row type.
*
* <p>The difference between this method and {@link #fromValues(Object...)} is that the schema
* can be manually adjusted. It might be helpful for assigning more generic types like e.g.
* DECIMAL or naming the columns.
*
* <p>Examples... | 3.26 |
flink_TableEnvironment_create_rdh | /**
* Creates a table environment that is the entry point and central context for creating Table
* and SQL API programs.
*
* <p>It is unified both on a language level for all JVM-based languages (i.e. there is no
* distinction between Scala and Java API) and for bounded and unbounded data processing.
*
* <p>A ta... | 3.26 |
flink_TableEnvironment_explainSql_rdh | /**
* Returns the AST of the specified statement and the execution plan to compute the result of
* the given statement.
*
* @param statement
* The statement for which the AST and execution plan will be returned.
* @param extraDetails
* The extra explain details which the explain result should include, e.g.
... | 3.26 |
flink_TableEnvironment_executePlan_rdh | /**
* Shorthand for {@code tEnv.loadPlan(planReference).execute()}.
*
* @see #loadPlan(PlanReference)
* @see CompiledPlan#execute()
*/
@Experimental
default TableResult executePlan(PlanReference planReference) throws TableException {
return loadPlan(planReference).execute();
} | 3.26 |
flink_DynamicSourceUtils_createMetadataKeysToMetadataColumnsMap_rdh | /**
* Returns a map record the mapping relation between metadataKeys to metadataColumns in input
* schema.
*/
public static Map<String, MetadataColumn> createMetadataKeysToMetadataColumnsMap(ResolvedSchema schema) {
final List<MetadataColumn> metadataColumns = extractMetadataColumns(schema);
Map<String, Meta... | 3.26 |
flink_DynamicSourceUtils_m0_rdh | /**
* Creates a projection that adds computed columns and finalizes the table schema.
*/
private static void m0(FlinkRelBuilder relBuilder, ResolvedSchema schema) {
final ExpressionConverter converter = new ExpressionConverter(relBuilder);
final List<RexNode> projection = schema.getColumns().stream().map(c ... | 3.26 |
flink_DynamicSourceUtils_prepareDynamicSource_rdh | /**
* Prepares the given {@link DynamicTableSource}. It check whether the source is compatible with
* the given schema and applies initial parameters.
*/
public static void prepareDynamicSource(String tableDebugName, ResolvedCatalogTable table, DynamicTableSource source, boolean isBatchMode, ReadableConfig config, L... | 3.26 |
flink_DynamicSourceUtils_pushWatermarkAssigner_rdh | // --------------------------------------------------------------------------------------------
/**
* Creates a specialized node for assigning watermarks.
*/
private static void
pushWatermarkAssigner(FlinkRelBuilder relBuilder, ResolvedSchema schema) {
final ExpressionConverter converter = new ExpressionConvert... | 3.26 |
flink_DynamicSourceUtils_createRequiredMetadataColumns_rdh | // TODO: isUpsertSource(), isSourceChangeEventsDuplicate()
/**
* Returns a list of required metadata columns. Ordered by the iteration order of {@link SupportsReadingMetadata#listReadableMetadata()}.
*
* <p>This method assumes that source and schema have been validated via {@link #prepareDynamicSource(String, Resolv... | 3.26 |
flink_DynamicSourceUtils_convertSourceToRel_rdh | /**
* Converts a given {@link DynamicTableSource} to a {@link RelNode}. It adds helper projections
* if necessary.
*/
public static RelNode convertSourceToRel(boolean isBatchMode, ReadableConfig config, FlinkRelBuilder relBuilder, ContextResolvedTable contextResolvedTable, FlinkStatistic statistic, List<RelHint> hin... | 3.26 |
flink_DynamicSourceUtils_isSourceChangeEventsDuplicate_rdh | /**
* Returns true if the table source produces duplicate change events.
*/public static boolean isSourceChangeEventsDuplicate(ResolvedSchema resolvedSchema,
DynamicTableSource tableSource, TableConfig tableConfig) {
if (!(tableSource instanceof ScanTableSource)) {
return false;
}
ChangelogMode ... | 3.26 |
flink_DynamicSourceUtils_pushMetadataProjection_rdh | /**
* Creates a projection that reorders physical and metadata columns according to the given
* schema. It casts metadata columns into the expected data type to be accessed by computed
* columns in the next step. Computed columns are ignored here.
*
* @see SupportsReadingMetadata
*/
private static void pushMetad... | 3.26 |
flink_DynamicSourceUtils_convertDataStreamToRel_rdh | /**
* Converts a given {@link DataStream} to a {@link RelNode}. It adds helper projections if
* necessary.
*/
public static RelNode convertDataStreamToRel(boolean isBatchMode, ReadableConfig config, FlinkRelBuilder relBuilder, ContextResolvedTable contextResolvedTable, DataStream<?> dataStream, DataType physicalDat... | 3.26 |
flink_DynamicSourceUtils_isUpsertSource_rdh | /**
* Returns true if the table is an upsert source.
*/
public static boolean isUpsertSource(ResolvedSchema resolvedSchema, DynamicTableSource tableSource) {
if (!(tableSource instanceof ScanTableSource)) {
return false;
}
ChangelogMode mode = ((ScanTableSource) (tableSource)).getChangelogMode();... | 3.26 |
flink_DynamicSourceUtils_createProducedType_rdh | /**
* Returns the {@link DataType} that a source should produce as the input into the runtime.
*
* <p>The format looks as follows: {@code PHYSICAL COLUMNS + METADATA COLUMNS}
*
* <p>Physical columns use the table schema's name. Metadata column use the metadata key as
* name.
*/
public static RowType createProduc... | 3.26 |
flink_JobMaster_onStart_rdh | // ----------------------------------------------------------------------------------------------
// Lifecycle management
// ----------------------------------------------------------------------------------------------
@Override
protected void onStart() throws JobMasterException {
try {
... | 3.26 |
flink_JobMaster_startJobExecution_rdh | // Internal methods
// ----------------------------------------------------------------------------------------------
// -- job starting and stopping
// -----------------------------------------------------------------
private void startJobExecution() throws Exception {
validateRunsInMainThread();
JobShuffleCon... | 3.26 |
flink_JobMaster_onStop_rdh | /**
* Suspend the job and shutdown all other services including rpc.
*/
@Override
public CompletableFuture<Void> onStop() {
log.info("Stopping the JobMaster for job '{}' ({}).", jobGraph.getName(), jobGraph.getJobID());
// make sure there is a graceful exit
return stopJobExecution(new FlinkException(St... | 3.26 |
flink_JobMaster_handleJobMasterError_rdh | // ----------------------------------------------------------------------------------------------
private void handleJobMasterError(final Throwable cause) {
if (ExceptionUtils.isJvmFatalError(cause)) {
log.error("Fatal error occurred on JobManager.", cause);
// The fatal error handler implementation should mak... | 3.26 |
flink_JobMaster_acknowledgeCheckpoint_rdh | // TODO: This method needs a leader session ID
@Override
public void acknowledgeCheckpoint(final JobID jobID, final ExecutionAttemptID executionAttemptID, final long checkpointId, final CheckpointMetrics checkpointMetrics, @Nullable
final SerializedValue<TaskStateSnapshot> checkpointState) {
schedulerNG.acknowle... | 3.26 |
flink_JobMaster_getGateway_rdh | // ----------------------------------------------------------------------------------------------
// Service methods
// ----------------------------------------------------------------------------------------------
@Override
public JobMasterGateway getGateway() {
return getSelfGateway(JobMasterGateway.class);
} | 3.26 |
flink_JobMaster_m0_rdh | /**
* Updates the task execution state for a given task.
*
* @param taskExecutionState
* New task execution state for a given task
* @return Acknowledge the task execution state update
*/
@Overridepublic CompletableFuture<Acknowledge> m0(final TaskExecutionState taskExecutionState) {
FlinkException taskExec... | 3.26 |
flink_JobMaster_cancel_rdh | // ----------------------------------------------------------------------------------------------
// RPC methods
// ----------------------------------------------------------------------------------------------
@Override
public CompletableFuture<Acknowledge> cancel(Time timeout) {
schedulerNG.cancel();return Com... | 3.26 |
flink_JobMaster_m1_rdh | // TODO: This method needs a leader session ID
@Overridepublic void m1(DeclineCheckpoint decline) {
schedulerNG.declineCheckpoint(decline);
} | 3.26 |
flink_DefaultExecutionTopology_containsIntraRegionAllToAllEdge_rdh | /**
* Check if the {@link DefaultLogicalPipelinedRegion} contains intra-region all-to-all edges or
* not.
*/
private static boolean containsIntraRegionAllToAllEdge(DefaultLogicalPipelinedRegion logicalPipelinedRegion) {
for (LogicalVertex vertex : logicalPipelinedRegion.getVertices()) {
for (LogicalEdge ... | 3.26 |
flink_DefaultExecutionTopology_ensureCoLocatedVerticesInSameRegion_rdh | /**
* Co-location constraints are only used for iteration head and tail. A paired head and tail
* needs to be in the same pipelined region so that they can be restarted together.
*/
private static void ensureCoLocatedVerticesInSameRegion(List<DefaultSchedulingPipelinedRegion> pipelinedRegions, ExecutionGraph executi... | 3.26 |
flink_UserFacingMapState_get_rdh | // ------------------------------------------------------------------------
@Override
public V get(K key) throws Exception
{
return originalState.get(key);
} | 3.26 |
flink_RichFunction_open_rdh | /**
* Initialization method for the function. It is called before the actual working methods (like
* <i>map</i> or <i>join</i>) and thus suitable for one time setup work. For functions that are
* part of an iteration, this method will be invoked at the beginning of each iteration
* superstep.
*
* <p>The openConte... | 3.26 |
flink_NettyClient_connect_rdh | // Client connections
// ------------------------------------------------------------------------
ChannelFuture connect(final InetSocketAddress serverSocketAddress) {
checkState(bootstrap != null, "Client has not been initialized yet.");
// -------------------------------------------------... | 3.26 |
flink_AsyncLookupFunctionProvider_of_rdh | /**
* Helper function for creating a static provider.
*/
static AsyncLookupFunctionProvider of(AsyncLookupFunction asyncLookupFunction) {
return () -> asyncLookupFunction;
} | 3.26 |
flink_GenericTypeComparator_supportsSerializationWithKeyNormalization_rdh | // ------------------------------------------------------------------------
@Override
public boolean supportsSerializationWithKeyNormalization() {
return false;
} | 3.26 |
flink_TestEnvironmentSettings_getSavepointRestorePath_rdh | /**
* Path of savepoint that the job should recover from.
*/
@Nullable
public String getSavepointRestorePath() {
return savepointRestorePath;
} | 3.26 |
flink_TestEnvironmentSettings_getConnectorJarPaths_rdh | /**
* List of connector JARs paths.
*/
public List<URL> getConnectorJarPaths() {
return connectorJarPaths;
} | 3.26 |
flink_TimestampedFileInputSplit_setSplitState_rdh | /**
* Sets the state of the split. This information is used when restoring from a checkpoint and
* allows to resume reading the underlying file from the point we left off.
*
* <p>* This is applicable to {@link org.apache.flink.api.common.io.FileInputFormat
* FileInputFormats} that implement the {@link org.apache.f... | 3.26 |
flink_TimestampedFileInputSplit_getSplitState_rdh | /**
*
* @return the state of the split.
*/
public Serializable getSplitState() {return this.splitState;
} | 3.26 |
flink_TimestampedFileInputSplit_getModificationTime_rdh | /**
*
* @return The modification time of the file this split belongs to.
*/
public long getModificationTime() {
return this.modificationTime;
} | 3.26 |
flink_FlinkAggregateJoinTransposeRule_registry_rdh | /**
* Creates a {@link org.apache.calcite.sql.SqlSplittableAggFunction.Registry} that is a view of
* a list.
*/
private static <E> SqlSplittableAggFunction.Registry<E> registry(final List<E> list) {
return new SqlSplittableAggFunction.Registry<E>() {
public int register(E e) {int i = list.indexOf(e);
... | 3.26 |
flink_FlinkAggregateJoinTransposeRule_keyColumns_rdh | /**
* Computes the closure of a set of columns according to a given list of constraints. Each 'x =
* y' constraint causes bit y to be set if bit x is set, and vice versa.
*/
private static ImmutableBitSet keyColumns(ImmutableBitSet aggregateColumns, ImmutableList<RexNode> predicates) {
SortedMap<Integer, BitSet>... | 3.26 |
flink_FlinkAggregateJoinTransposeRule_m1_rdh | /**
* Convert aggregate with AUXILIARY_GROUP to regular aggregate. Return original aggregate and
* null project if the given aggregate does not contain AUXILIARY_GROUP, else new aggregate
* without AUXILIARY_GROUP and a project to permute output columns if needed.
*/
private Pair<Aggregate, List<RexNode>> m1(Aggre... | 3.26 |
flink_ResolvedSchema_getPrimaryKeyIndexes_rdh | /**
* Returns the primary key indexes, if any, otherwise returns an empty array.
*/
public int[] getPrimaryKeyIndexes() {
final List<String> columns = getColumnNames();
return getPrimaryKey().map(UniqueConstraint::getColumns).map(pkColumns -> pkColumns.stream().mapToInt(columns::indexOf).toArray()).orElseGet(... | 3.26 |
flink_ResolvedSchema_physical_rdh | /**
* Shortcut for a resolved schema of only physical columns.
*/public static ResolvedSchema physical(String[] columnNames, DataType[] columnDataTypes) {
return m0(Arrays.asList(columnNames), Arrays.asList(columnDataTypes));
} | 3.26 |
flink_ResolvedSchema_getColumnCount_rdh | /**
* Returns the number of {@link Column}s of this schema.
*/
public int getColumnCount() {
return columns.size();
} | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.