name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
flink_HiveDDLUtils_disableConstraint_rdh
// returns a constraint trait that doesn't require ENABLE public static byte disableConstraint(byte trait) { return ((byte) (trait & (~HIVE_CONSTRAINT_ENABLE))); }
3.26
flink_HiveDDLUtils_enableConstraint_rdh
// returns a constraint trait that requires ENABLE public static byte enableConstraint(byte trait) { return ((byte) (trait | HIVE_CONSTRAINT_ENABLE)); }
3.26
flink_HiveDDLUtils_defaultTrait_rdh
// a constraint is by default ENABLE NOVALIDATE RELY public static byte defaultTrait() { byte res = enableConstraint(((byte) (0))); res = relyConstraint(res); return res; }
3.26
flink_CheckpointStatsHistory_createSnapshot_rdh
/** * Creates a snapshot of the current state. * * @return Snapshot of the current state. */ CheckpointStatsHistory createSnapshot() { if (readOnly) { throw new UnsupportedOperationException("Can't create a snapshot of a read-only history."); } List<Abstra...
3.26
flink_CheckpointStatsHistory_addInProgressCheckpoint_rdh
/** * Adds an in progress checkpoint to the checkpoint history. * * @param pending * In progress checkpoint to add. */ void addInProgressCheckpoint(PendingCheckpointStats pending) { if (readOnly) { throw new UnsupportedOperationException("Can't create a snapshot of a read-only history."); } i...
3.26
flink_CheckpointStatsHistory_replacePendingCheckpointById_rdh
/** * Searches for the in progress checkpoint with the given ID and replaces it with the given * completed or failed checkpoint. * * <p>This is bounded by the maximum number of concurrent in progress checkpointsArray, which * means that the runtime of this is constant. * * @param completedOrFailed * The compl...
3.26
flink_FileSystemJobResultStore_constructDirtyPath_rdh
/** * Given a job ID, construct the path for a dirty entry corresponding to it in the job result * store. * * @param jobId * The job ID to construct a dirty entry path from. * @return A path for a dirty entry for the given the Job ID. */ private Path constructDirtyPath(JobID jobId) { return constructEntr...
3.26
flink_FileSystemJobResultStore_constructCleanPath_rdh
/** * Given a job ID, construct the path for a clean entry corresponding to it in the job result * store. * * @param jobId * The job ID to construct a clean entry path from. * @return A path for a clean entry for the given the Job ID. */ private Path constructCleanPath(JobID jobId) { return constructEntryP...
3.26
flink_RichOrCondition_getLeft_rdh
/** * * @return One of the {@link IterativeCondition conditions} combined in this condition. */ public IterativeCondition<T> getLeft() { return getNestedConditions()[0]; }
3.26
flink_RichOrCondition_getRight_rdh
/** * * @return One of the {@link IterativeCondition conditions} combined in this condition. */ public IterativeCondition<T> getRight() { return getNestedConditions()[1]; }
3.26
flink_SinkV2Provider_of_rdh
/** * Helper method for creating a Sink provider with a provided sink parallelism. */ static SinkV2Provider of(Sink<RowData> sink, @Nullable Integer sinkParallelism) { return new SinkV2Provider() { @Override public Sink<RowData> createSink() { return sink; } @Override ...
3.26
flink_LogicalTypeMerging_findModuloDecimalType_rdh
/** * Finds the result type of a decimal modulo operation. */ public static DecimalType findModuloDecimalType(int precision1, int scale1, int precision2, int scale2) { final int scale = Math.max(scale1, scale2); int precision = Math.min(precision1 - scale1, precision2 - scale2) + scale; return m1(precisi...
3.26
flink_LogicalTypeMerging_m1_rdh
// -------------------------------------------------------------------------------------------- /** * Scale adjustment implementation is inspired to SQLServer's one. In particular, when a result * precision is greater than MAX_PRECISION, the corresponding scale is reduced to prevent the * integral part of a result f...
3.26
flink_LogicalTypeMerging_findMultiplicationDecimalType_rdh
/** * Finds the result type of a decimal multiplication operation. */ public static DecimalType findMultiplicationDecimalType(int precision1, int scale1, int precision2, int scale2) { int scale = scale1 + scale2; int precision = (precision1 + precision2) + 1; return m1(precision, scale); }
3.26
flink_LogicalTypeMerging_m0_rdh
/** * Finds the result type of a decimal sum aggregation. */ public static LogicalType m0(LogicalType argType) { // adopted from // https://docs.microsoft.com/en-us/sql/t-sql/functions/sum-transact-sql final LogicalType resultType; if (argType.is(DECIMAL)) { // a hack to make legacy types poss...
3.26
flink_LogicalTypeMerging_findCommonType_rdh
/** * Returns the most common, more general {@link LogicalType} for a given set of types. If such a * type exists, all given types can be casted to this more general type. * * <p>For example: {@code [INT, BIGINT, DECIMAL(2, 2)]} would lead to {@code DECIMAL(21, 2)}. * * <p>This class aims to be compatible with th...
3.26
flink_LogicalTypeMerging_findAvgAggType_rdh
/** * Finds the result type of a decimal average aggregation. */public static LogicalType findAvgAggType(LogicalType argType) { final LogicalType resultType; if (argType.is(DECIMAL)) { // a hack to make legacy types possible until we drop them if (argType instanceof LegacyTypeInformationType) ...
3.26
flink_LogicalTypeMerging_findAdditionDecimalType_rdh
/** * Finds the result type of a decimal addition operation. */ public static DecimalType findAdditionDecimalType(int precision1, int scale1, int precision2, int scale2) { final int scale = Math.max(scale1, scale2); int precision = (Math.max(precision1 - scale1, precision2 - scale2) + scale) + 1; return m...
3.26
flink_LogicalTypeMerging_findDivisionDecimalType_rdh
// e1 - e2 max(s1, s2) + max(p1-s1, p2-s2) + 1 max(s1, s2) // e1 * e2 p1 + p2 + 1 s1 + s2 // e1 / e2 p1 - s1 + s2 + max(6, s1 + p2 + 1) max(6, s1 + p2 + 1) // e1 % e2 min(p1-s1, p2-s2) + max(s1, s2) max(s1, s2) // // Also, if the precision / scale are ou...
3.26
flink_LogicalTypeMerging_findRoundDecimalType_rdh
/** * Finds the result type of a decimal rounding operation. */ public static DecimalType findRoundDecimalType(int precision, int scale, int round) { if (round >= scale) { return new DecimalType(false, precision, scale); } if (round < 0) { return new DecimalType(false, Math.min(Decimal...
3.26
flink_TransformationMetadata_fill_rdh
/** * Fill a transformation with this meta. */ public <T extends Transformation<?>> T fill(T transformation) { transformation.setName(getName()); transformation.setDescription(getDescription()); if (getUid() != null) { transformation.setUid(getUid()); } return transformation; }
3.26
flink_DualInputPlanNode_getTwoInputNode_rdh
// -------------------------------------------------------------------------------------------- public TwoInputNode getTwoInputNode() { if (this.template instanceof TwoInputNode) { return ((TwoInputNode) (this.template)); } else { throw new RuntimeException(); } }
3.26
flink_DualInputPlanNode_getInput1_rdh
/** * Gets the first input channel to this node. * * @return The first input channel to this node. */ public Channel getInput1() { return this.input1; }
3.26
flink_DualInputPlanNode_accept_rdh
// -------------------------------------------------------------------------------------------- @Override public void accept(Visitor<PlanNode> visitor) {if (visitor.preVisit(this)) { this.input1.getSource().accept(visitor); this.input2.getSource().accept(visitor); for (Channel broadcastInput : ...
3.26
flink_DeltaIteration_getName_rdh
/** * Gets the name from this iteration. * * @return The name of the iteration. */ public String getName() { return name; }
3.26
flink_DeltaIteration_name_rdh
/** * Sets the name for the iteration. The name is displayed in logs and messages. * * @param name * The name for the iteration. * @return The iteration object, for function call chaining. */ public DeltaIteration<ST, WT> name(String name) { this.name = name; return this; }
3.26
flink_DeltaIteration_setSolutionSetUnManaged_rdh
/** * Sets whether to keep the solution set in managed memory (safe against heap exhaustion) or * unmanaged memory (objects on heap). * * @param solutionSetUnManaged * True to keep the solution set in unmanaged memory, false to keep * it in managed memory. * @see #isSolutionSetUnManaged() */ public void s...
3.26
flink_DeltaIteration_getInitialWorkset_rdh
/** * Gets the initial workset. This is the data set passed to the method that starts the delta * iteration. * * <p>Consider the following example: * * <pre>{@code DataSet<MyType> solutionSetData = ...; * DataSet<AnotherType> worksetData = ...; * * DeltaIteration<MyType, AnotherType> iteration = solutionSetDat...
3.26
flink_DeltaIteration_registerAggregator_rdh
/** * Registers an {@link Aggregator} for the iteration. Aggregators can be used to maintain simple * statistics during the iteration, such as number of elements processed. The aggregators * compute global aggregates: After each iteration step, the values are globally aggregated to * produce one aggregate that repr...
3.26
flink_DeltaIteration_setResources_rdh
/** * Sets the resources for the iteration, and the minimum and preferred resources are the same by * default. The lower and upper resource limits will be considered in dynamic resource resize * feature for future plan. * * @param resources * The resources for the iteration. * @return The iteration with set mi...
3.26
flink_DeltaIteration_getInitialSolutionSet_rdh
/** * Gets the initial solution set. This is the data set on which the delta iteration was started. * * <p>Consider the following example: * * <pre>{@code DataSet<MyType> solutionSetData = ...; * DataSet<AnotherType> worksetData = ...; * * DeltaIteration<MyType, AnotherType> iteration = solutionSetData.iterator...
3.26
flink_DeltaIteration_getSolutionSet_rdh
/** * Gets the solution set of the delta iteration. The solution set represents the state that is * kept across iterations. * * @return The solution set of the delta iteration. */public SolutionSetPlaceHolder getSolutionSet() { return solutionSetPlaceholder; }
3.26
flink_DeltaIteration_registerAggregationConvergenceCriterion_rdh
/** * Registers an {@link Aggregator} for the iteration together with a {@link ConvergenceCriterion}. For a general description of aggregators, see {@link #registerAggregator(String, Aggregator)} and {@link Aggregator}. At the end of each * iteration, the convergence criterion takes the aggregator's global aggregate ...
3.26
flink_DeltaIteration_parallelism_rdh
/** * Sets the parallelism for the iteration. * * @param parallelism * The parallelism. * @return The iteration object, for function call chaining. */ public DeltaIteration<ST, WT> parallelism(int parallelism) { OperatorValidationUtils.validateParallelism(parallelism); this.parallelism = parallelism; ...
3.26
flink_PageRank_getPagesDataSet_rdh
// ************************************************************************* // UTIL METHODS // ************************************************************************* private static DataSet<Long> getPagesDataSet(ExecutionEnvironment env, ParameterTool params) { if (params.has("pages")) { return env.readC...
3.26
flink_PageRank_main_rdh
// ************************************************************************* public static void main(String[] args) throws Exception { LOGGER.warn(DATASET_DEPRECATION_INFO); ParameterTool params = ParameterTool.fromArgs(args); final int v1 = params.getInt("numPages", PageRankData.getNumberOfPages()); fi...
3.26
flink_Keys_areCompatible_rdh
/** * Check if two sets of keys are compatible to each other (matching types, key counts) */ public boolean areCompatible(Keys<?> other) throws IncompatibleKeysException { TypeInformation<?>[] thisKeyFieldTypes = this.getKeyFieldTypes(); TypeInformation<?>[] otherKeyFieldTypes = other.getKeyFieldTypes(); ...
3.26
flink_Keys_createIncrIntArray_rdh
// -------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------- // Utilities // -------------------------------------------------------------------------------------------- private static int[...
3.26
flink_Tuple17_copy_rdh
/** * Shallow tuple copy. * * @return A new Tuple with the same fields as this. */ @Override @SuppressWarnings("unchecked") public Tuple17<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> copy() { return new Tuple17<>(this.f0, this.f1, this.f2, this.f3, this.f4, this.f5, this.f6, this.f7,...
3.26
flink_Tuple17_toString_rdh
// ------------------------------------------------------------------------------------------------- // standard utilities // ------------------------------------------------------------------------------------------------- /** * Creates a string representation of the tuple in the form (f0, f1, f2, f3, f4, f5, f6, f7,...
3.26
flink_Tuple17_of_rdh
/** * Creates a new tuple and assigns the given values to the tuple's fields. This is more * convenient than using the constructor, because the compiler can infer the generic type * arguments implicitly. For example: {@code Tuple3.of(n, x, s)} instead of {@code new * Tuple3<Integer, Double, String>(n, x, s)} */ pu...
3.26
flink_Tuple17_equals_rdh
/** * Deep equality for tuples by calling equals() on the tuple members. * * @param o * the object checked for equality * @return true if this is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Tuple17)) { return false; } @SuppressWarnings("rawtypes"...
3.26
flink_Tuple17_setFields_rdh
/** * Sets new values to all fields of the tuple. * * @param f0 * The value for field 0 * @param f1 * The value for field 1 * @param f2 * The value for field 2 * @param f3 * The value for field 3 * @param f4 * The value for field 4 * @param f5 * The value for field 5 * @param f6 * The valu...
3.26
flink_Tuple8_copy_rdh
/** * Shallow tuple copy. * * @return A new Tuple with the same fields as this. */ @Override @SuppressWarnings("unchecked") public Tuple8<T0, T1, T2, T3, T4, T5, T6, T7> copy() { return new Tuple8<>(this.f0, this.f1, this.f2, this.f3, this.f4, this.f5, this.f6, this.f7); }
3.26
flink_Tuple8_of_rdh
/** * Creates a new tuple and assigns the given values to the tuple's fields. This is more * convenient than using the constructor, because the compiler can infer the generic type * arguments implicitly. For example: {@code Tuple3.of(n, x, s)} instead of {@code new * Tuple3<Integer, Double, String>(n, x, s)} */ pu...
3.26
flink_Tuple8_equals_rdh
/** * Deep equality for tuples by calling equals() on the tuple members. * * @param o * the object checked for equality * @return true if this is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o...
3.26
flink_Tuple8_toString_rdh
// ------------------------------------------------------------------------------------------------- // standard utilities // ------------------------------------------------------------------------------------------------- /** * Creates a string representation of the tuple in the form (f0, f1, f2, f3, f4, f5, f6, f7)...
3.26
flink_Tuple8_setFields_rdh
/** * Sets new values to all fields of the tuple. * * @param f0 * The value for field 0 * @param f1 * The value for field 1 * @param f2 * The value for field 2 * @param f3 * The value for field 3 * @param f4 * The value for field 4 * @param f5 * The value for field 5 * @param f6 * The valu...
3.26
flink_ElementTriggers_every_rdh
/** * Creates a new trigger that triggers on receiving of every element. */ public static <W extends Window> EveryElement<W> every() { return new EveryElement<>(); }
3.26
flink_ElementTriggers_count_rdh
/** * Creates a trigger that fires when the pane contains at lease {@code countElems} elements. */ public static <W extends Window> CountElement<W> count(long countElems) {return new CountElement<>(countElems); }
3.26
flink_DistinctOperator_translateSelectorFunctionDistinct_rdh
// -------------------------------------------------------------------------------------------- private static <IN, K> SingleInputOperator<?, IN, ?> translateSelectorFunctionDistinct(SelectorFunctionKeys<IN, ?> rawKeys, ReduceFunction<IN> function, TypeInformation<IN> outputType, String name, Operator<IN> input, int pa...
3.26
flink_DistinctOperator_setCombineHint_rdh
/** * Sets the strategy to use for the combine phase of the reduce. * * <p>If this method is not called, then the default hint will be used. ({@link org.apache.flink.api.common.operators.base.ReduceOperatorBase.CombineHint#OPTIMIZER_CHOOSES}) * * @param strategy * The hint to use. * @return The DistinctOperato...
3.26
flink_GuavaFlinkConnectorRateLimiter_setRate_rdh
/** * Set the global per consumer and per sub-task rates. * * @param globalRate * Value of rate in bytes per second. */ @Override public void setRate(long globalRate) { this.globalRateBytesPerSecond = globalRate; }
3.26
flink_GuavaFlinkConnectorRateLimiter_open_rdh
/** * Creates a rate limiter with the runtime context provided. * * @param runtimeContext */ @Override public void open(RuntimeContext runtimeContext) { this.runtimeContext = runtimeContext; localRateBytesPerSecond = globalRateBytesPerSecond / runtimeContext.getNumberOfParallelSubtasks(); this.rateLimit...
3.26
flink_ExternalResourceOptions_getExternalResourceDriverFactoryConfigOptionForResource_rdh
/** * Generate the config option key for the factory class name of {@link org.apache.flink.api.common.externalresource.ExternalResourceDriver}. */ public static String getExternalResourceDriverFactoryConfigOptionForResource(String resourceName) { return keyWithResourceNameAndSuffix(resourceName, EXTER...
3.26
flink_ExternalResourceOptions_getAmountConfigOptionForResource_rdh
/** * Generate the config option key for the amount of external resource with resource_name. */ public static String getAmountConfigOptionForResource(String resourceName) { return keyWithResourceNameAndSuffix(resourceName, EXTERNAL_RESOURCE_AMOUNT_SUFFIX); }
3.26
flink_ExternalResourceOptions_keyWithResourceNameAndSuffix_rdh
/** * Generate the config option key with resource_name and suffix. */ private static String keyWithResourceNameAndSuffix(String resourceName, String suffix) { return String.format("%s.%s.%s", EXTERNAL_RESOURCE_PREFIX, Preconditions.checkNotNull(resourceName), Preconditions.checkNotNull(suffix)); }
3.26
flink_ExternalResourceOptions_getExternalResourceParamConfigPrefixForResource_rdh
/** * Generate the suffix option key prefix for the user-defined params for external resources. */ public static String getExternalResourceParamConfigPrefixForResource(String resourceName) { return keyWithResourceNameAndSuffix(resourceName, EXTERNAL_RESOURCE_DRIVER_PARAM_SUFFIX); }
3.26
flink_ExternalResourceOptions_getSystemConfigKeyConfigOptionForResource_rdh
/** * Generate the config option key for the configuration key of external resource in the * deploying system. */ public static String getSystemConfigKeyConfigOptionForResource(String resourceName, String suffix) { return keyWithResourceNameAndSuffix(resourceName, suffix); }
3.26
flink_ApiExpressionDefaultVisitor_visitNonApiExpression_rdh
// -------------------------------------------------------------------------------------------- // other expressions // -------------------------------------------------------------------------------------------- @Override public T visitNonApiExpression(Expression other) { return defaultMethod(other); }
3.26
flink_ApiExpressionDefaultVisitor_visit_rdh
// -------------------------------------------------------------------------------------------- // unresolved API expressions // -------------------------------------------------------------------------------------------- @Override public T visit(UnresolvedReferenceExpression unresolvedReference) { return defaultMe...
3.26
flink_JsonRowDeserializationSchema_ignoreParseErrors_rdh
/** * Configures schema to fail when parsing json failed. * * <p>By default, an exception will be thrown when parsing json fails. */ public Builder ignoreParseErrors() { this.ignoreParseErrors = true; return this; }
3.26
flink_JsonRowDeserializationSchema_setFailOnMissingField_rdh
/** * * @deprecated Use the provided {@link Builder} instead. */ @Deprecated public void setFailOnMissingField(boolean failOnMissingField) { // TODO make this class immutable once we drop this method this.failOnMissingField = failOnMissingField; this.runtimeConverter = createConverter(this.typeInfo); }
3.26
flink_Reference_owned_rdh
/** * Returns the value if it is owned. */public Optional<T> owned() { return isOwned ? Optional.of(value) : Optional.empty(); }
3.26
flink_CheckpointRequestDecider_chooseQueuedRequestToExecute_rdh
/** * Choose one of the queued requests to execute, if any. * * @return request that should be executed */ Optional<CheckpointTriggerRequest> chooseQueuedRequestToExecute(boolean isTriggering, long lastCompletionMs) { Optional<CheckpointTriggerRequest> request = chooseRequestToExecute(isTriggering, lastCompleti...
3.26
flink_CheckpointRequestDecider_chooseRequestToExecute_rdh
/** * Choose the next {@link CheckpointTriggerRequest request} to execute based on the provided * candidate and the current state. Acquires a lock and may update the state. * * @return request that should be executed */ private Optional<CheckpointTriggerRequest> chooseRequestToExecute(boolean isTriggering, long la...
3.26
flink_RuntimeConverter_create_rdh
/** * Creates a new instance of {@link Context}. * * @param classLoader * runtime classloader for loading user-defined classes. */ static Context create(ClassLoader classLoader) { return new Context() { @Override public ClassLoader getClassLoader() { return classLoader; } ...
3.26
flink_PhysicalSlotRequestBulkCheckerImpl_checkPhysicalSlotRequestBulkTimeout_rdh
/** * Check the slot request bulk and timeout its requests if it has been unfulfillable for too * long. * * @param slotRequestBulk * bulk of slot requests * @param slotRequestTimeout * indicates how long a pending request can be unfulfillable * @return result of the check, indicating the bulk is fulfilled, ...
3.26
flink_PhysicalSlotRequestBulkCheckerImpl_areRequestsFulfillableWithSlots_rdh
/** * Tries to match pending requests to all registered slots (available or allocated). * * <p>NOTE: The complexity of the method is currently quadratic (number of pending requests x * number of all slots). */ private static boolean areRequestsFulfillableWithSlots(final Collection<ResourceProfile> requestResourc...
3.26
flink_AvroOutputFormat_setCodec_rdh
/** * Set avro codec for compression. * * @param codec * avro codec. */ public void setCodec(final Codec codec) { this.codec = checkNotNull(codec, "codec can not be null"); }
3.26
flink_HiveParserBaseSemanticAnalyzer_unescapeIdentifier_rdh
/** * Remove the encapsulating "`" pair from the identifier. We allow users to use "`" to escape * identifier for table names, column names and aliases, in case that coincide with Hive * language keywords. */ public static String unescapeIdentifier(String val) { if (val == null) { return null; } if ((val.charAt(0) ...
3.26
flink_HiveParserBaseSemanticAnalyzer_unparseExprForValuesClause_rdh
// Take an expression in the values clause and turn it back into a string. This is far from // comprehensive. At the moment it only supports: // * literals (all types) // * unary negatives // * true/false static String unparseExprForValuesClause(HiveParserASTNode expr) throws SemanticException { switch (expr.getToken...
3.26
flink_HiveParserBaseSemanticAnalyzer_getGroupByForClause_rdh
// This function is a wrapper of parseInfo.getGroupByForClause which automatically translates // SELECT DISTINCT a,b,c to SELECT a,b,c GROUP BY a,b,c. public static List<HiveParserASTNode> getGroupByForClause(HiveParserQBParseInfo parseInfo, String dest) { if (parseInfo.getSelForClause(dest).getToken().getType() == Hi...
3.26
flink_HiveParserBaseSemanticAnalyzer_validateNoHavingReferenceToAlias_rdh
// We support having referring alias just as in hive's semantic analyzer. This check only prints // a warning now. public static void validateNoHavingReferenceToAlias(HiveParserQB qb, HiveParserASTNode havingExpr, HiveParserRowResolver inputRR, HiveParserSemanticAnalyzer semanticAnalyzer) throws SemanticException { H...
3.26
flink_HiveParserBaseSemanticAnalyzer_getVariablesSetForFilter_rdh
/** * traverse the given node to find all correlated variables, the main logic is from {@link HiveFilter#getVariablesSet()}. */ public static Set<CorrelationId> getVariablesSetForFilter(RexNode rexNode) { Set<CorrelationId> correlationVariables = new HashSet<>(); if (rexNode instanceof RexSubQuery) { RexSubQuery rex...
3.26
flink_HiveParserBaseSemanticAnalyzer_convert_rdh
/* This method returns the flip big-endian representation of value */ public static ImmutableBitSet convert(int value, int length) { BitSet v211 = new BitSet(); for (int index = length - 1; index >= 0; index--) { if ((value % 2) != 0) { v211.set(index); } value = value >>> 1; } // We flip the bits because Calcit...
3.26
flink_HiveParserBaseSemanticAnalyzer_processPositionAlias_rdh
// Process the position alias in GROUPBY and ORDERBY public static void processPositionAlias(HiveParserASTNode ast, HiveConf conf) throws SemanticException { boolean isBothByPos = HiveConf.getBoolVar(conf, ConfVars.HIVE_GROUPBY_ORDERBY_POSITION_ALIAS); boolean isGbyByPos = isBothByPos || Boolean.parseBoolean(conf.get("...
3.26
flink_HiveParserBaseSemanticAnalyzer_readProps_rdh
/** * Converts parsed key/value properties pairs into a map. * * @param prop * HiveParserASTNode parent of the key/value pairs * @param mapProp * property map which receives the mappings */public static void readProps(HiveParserASTNode prop, Map<String, String> mapProp) { for (int propChild = 0; propChild ...
3.26
flink_HiveParserBaseSemanticAnalyzer_getUnescapedOriginTableName_rdh
/** * Get the unescaped origin table name for the table node. This method returns * "catalog.db.table","db.table" or "table" according to what the table node actually specifies * * @param node * the table node * @return "catalog.db.table", "db.table" or "table" */ public static String getUnescapedOriginTable...
3.26
flink_CollectionExecutor_execute_rdh
// -------------------------------------------------------------------------------------------- // General execution methods // -------------------------------------------------------------------------------------------- public JobExecutionResult execute(Plan program) throws Exception { long startTime = System.curr...
3.26
flink_CollectionExecutor_executeDataSink_rdh
// -------------------------------------------------------------------------------------------- // Operator class specific execution methods // -------------------------------------------------------------------------------------------- private <IN> void executeDataSink(GenericDataSinkBase<?> sink, int superStep, JobID...
3.26
flink_UnorderedStreamElementQueue_emitCompleted_rdh
/** * Pops one completed elements into the given output. Because an input element may produce * an arbitrary number of output elements, there is no correlation between the size of the * collection and the popped elements. * * @return the number of popped input elements. */ int emitCompleted(TimestampedCollector<O...
3.26
flink_UnorderedStreamElementQueue_hasCompleted_rdh
/** * True if there is at least one completed elements, such that {@link #emitCompleted(TimestampedCollector)} will actually output an element. */ boolean hasCompleted() { return !completedElements.isEmpty(); }
3.26
flink_UnorderedStreamElementQueue_completed_rdh
/** * Signals that an entry finished computation. */ void completed(StreamElementQueueEntry<OUT> elementQueueEntry) { // adding only to completed queue if not completed before // there may be a real result coming after a timeout result, which is updated in the // queue entry but // the entry is not re...
3.26
flink_UnorderedStreamElementQueue_isEmpty_rdh
/** * True if there are no incomplete elements and all complete elements have been consumed. */ boolean isEmpty() { return incompleteElements.isEmpty() && completedElements.isEmpty(); }
3.26
flink_SimpleTypeSerializerSnapshot_getCurrentVersion_rdh
// ------------------------------------------------------------------------ // Serializer Snapshot Methods // ------------------------------------------------------------------------ @Override public int getCurrentVersion() { return CURRENT_VERSION; }
3.26
flink_SimpleTypeSerializerSnapshot_equals_rdh
// ------------------------------------------------------------------------ // standard utilities // ------------------------------------------------------------------------ @Override public final boolean equals(Object obj) { return (obj != null) && (obj.getClass() == getClass()); }
3.26
flink_DefaultConfigurableOptionsFactory_getUseDynamicLevelSize_rdh
// -------------------------------------------------------------------------- // Whether to configure RocksDB to pick target size of each level dynamically. // -------------------------------------------------------------------------- private boolean getUseDynamicLevelSize() { return getInternal(USE_DYNAMIC_LEVEL_S...
3.26
flink_DefaultConfigurableOptionsFactory_setLogDir_rdh
/** * The directory for RocksDB's logging files. * * @param logDir * If empty, log files will be in the same directory as data files<br> * If non-empty, this directory will be used and the data directory's absolute path will be * used as the prefix of the log file name. * @return this options factory */ p...
3.26
flink_DefaultConfigurableOptionsFactory_getUseBloomFilter_rdh
// -------------------------------------------------------------------------- // Filter policy in RocksDB // -------------------------------------------------------------------------- private boolean getUseBloomFilter() { return Boolean.parseBoolean(getInternal(USE_BLOOM_FILTER.key())); }
3.26
flink_DefaultConfigurableOptionsFactory_getMaxOpenFiles_rdh
// -------------------------------------------------------------------------- private int getMaxOpenFiles() { return Integer.parseInt(getInternal(MAX_OPEN_FILES.key())); }
3.26
flink_DefaultConfigurableOptionsFactory_getMetadataBlockSize_rdh
// -------------------------------------------------------------------------- // Approximate size of partitioned metadata packed per block. // Currently applied to indexes block when partitioned index/filters option is enabled. // -------------------------------------------------------------------------- private long g...
3.26
flink_DefaultConfigurableOptionsFactory_m0_rdh
// -------------------------------------------------------------------------- // The target file size for compaction, i.e., the per-file size for level-1 // -------------------------------------------------------------------------- private long m0() { return MemorySize.parseBytes(getInternal(TARGET_FILE_SIZE_BASE....
3.26
flink_DefaultConfigurableOptionsFactory_getBlockSize_rdh
// -------------------------------------------------------------------------- // Approximate size of user data packed per block. Note that the block size // specified here corresponds to uncompressed data. The actual size of the // unit read from disk may be smaller if compression is enabled // ------------------------...
3.26
flink_DefaultConfigurableOptionsFactory_getCompactionStyle_rdh
// -------------------------------------------------------------------------- // The style of compaction for DB. // -------------------------------------------------------------------------- private CompactionStyle getCompactionStyle() { return CompactionStyle.valueOf(getInternal(COMPACTION_STYLE.key()).toUpperCase...
3.26
flink_DefaultConfigurableOptionsFactory_setInternal_rdh
/** * Sets the configuration with (key, value) if the key is predefined, otherwise throws * IllegalArgumentException. * * @param key * The configuration key, if key is not predefined, throws IllegalArgumentException * out. * @param value * The configuration value. */ private void setInternal(String key, ...
3.26
flink_DefaultConfigurableOptionsFactory_getMinWriteBufferNumberToMerge_rdh
// -------------------------------------------------------------------------- // The minimum number that will be merged together before writing to storage // -------------------------------------------------------------------------- private int getMinWriteBufferNumberToMerge() { return Integer.parseInt(getInternal(...
3.26
flink_DefaultConfigurableOptionsFactory_getWriteBufferSize_rdh
// -------------------------------------------------------------------------- // Amount of data to build up in memory (backed by an unsorted log on disk) // before converting to a sorted on-disk file. Larger values increase // performance, especially during bulk loads. // -----------------------------------------------...
3.26
flink_DefaultConfigurableOptionsFactory_setMaxLogFileSize_rdh
/** * The maximum size of RocksDB's file used for logging. * * <p>If the log files becomes larger than this, a new file will be created. If 0, all logs will * be written to one log file. * * @param maxLogFileSize * max file size limit * @return this options factory */ public DefaultConfigurableOptionsFactory...
3.26
flink_DefaultConfigurableOptionsFactory_checkArgumentValid_rdh
/** * Helper method to check whether the (key,value) is valid through given configuration and * returns the formatted value. * * @param option * The configuration key which is configurable in {@link RocksDBConfigurableOptions}. * @param value * The value within given configuration. */ private static void ch...
3.26