name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
flink_DefaultConfigurableOptionsFactory_setLogFileNum_rdh
/** * The maximum number of files RocksDB should keep for logging. * * @param logFileNum * number of files to keep * @return this options factory */ public DefaultConfigurableOptionsFactory setLogFileNum(int logFileNum) { Preconditions.checkArgument(logFileNum > 0, "Invalid configuration: Must keep at least...
3.26
flink_DefaultConfigurableOptionsFactory_getLogLevel_rdh
// -------------------------------------------------------------------------- // Configuring RocksDB's info log. // -------------------------------------------------------------------------- private InfoLogLevel getLogLevel() { return InfoLogLevel.valueOf(getInternal(LOG_LEVEL.key()).toUpperCase()); }
3.26
flink_DefaultConfigurableOptionsFactory_getMaxWriteBufferNumber_rdh
// -------------------------------------------------------------------------- // The maximum number of write buffers that are built up in memory. // -------------------------------------------------------------------------- private int getMaxWriteBufferNum...
3.26
flink_DefaultConfigurableOptionsFactory_getMaxSizeLevelBase_rdh
// -------------------------------------------------------------------------- // Maximum total data size for a level, i.e., the max total size for level-1 // -------------------------------------------------------------------------- private long getMaxSizeLevelBase() { return MemorySize.parseBytes(getInternal(MAX_S...
3.26
flink_DefaultConfigurableOptionsFactory_getBlockCacheSize_rdh
// -------------------------------------------------------------------------- // The amount of the cache for data blocks in RocksDB // -------------------------------------------------------------------------- private long getBlockCacheSize() { return MemorySize.parseBytes(getInternal(BLOCK_CACHE_SIZE.key())); }
3.26
flink_DefaultConfigurableOptionsFactory_configure_rdh
/** * Creates a {@link DefaultConfigurableOptionsFactory} instance from a {@link ReadableConfig}. * * <p>If no options within {@link RocksDBConfigurableOptions} has ever been configured, the * created RocksDBOptionsFactory would not override anything defined in {@link PredefinedOptions}. * * @param configuration ...
3.26
flink_DefaultConfigurableOptionsFactory_getInternal_rdh
/** * Returns the value in string format with the given key. * * @param key * The configuration-key to query in string format. */ private String getInternal(String key) { Preconditions.checkArgument(configuredOptions.containsKey(key), ("The configuration " + key) + " has not been configured."); return co...
3.26
flink_DefaultConfigurableOptionsFactory_getMaxBackgroundThreads_rdh
// -------------------------------------------------------------------------- // Maximum number of concurrent background flush and compaction threads // -------------------------------------------------------------------------- private int getMaxBackgroundThreads() { return Integer.parseInt(getInternal(MAX_BACKGROU...
3.26
flink_ResourceManagerRuntimeServicesConfiguration_fromConfiguration_rdh
// ---------------------------- Static methods ---------------------------------- public static ResourceManagerRuntimeServicesConfiguration fromConfiguration(Configuration configuration, WorkerResourceSpecFactory defaultWorkerResourceSpecFactory) throws ConfigurationException { final String strJ...
3.26
flink_PermanentBlobCache_m0_rdh
/** * Delete the blob file with the given key. * * @param jobId * ID of the job this blob belongs to (or <tt>null</tt> if job-unrelated) * @param blobKey * The key of the desired BLOB. */ private boolean m0(JobID jobId, BlobKey blobKey) { final File localFile = n...
3.26
flink_PermanentBlobCache_run_rdh
/** * Cleans up BLOBs which are not referenced anymore. */ @Override public void run() { synchronized(jobRefCounters) { Iterator<Map.Entry<JobID, RefCount>> entryIter = jobRefCounters.entrySet().iterator(); final long currentTimeMillis = System.currentTimeMillis(); while (entryIter.hasNe...
3.26
flink_PermanentBlobCache_getStorageLocation_rdh
/** * Returns a file handle to the file associated with the given blob key on the blob server. * * @param jobId * ID of the job this blob belongs to (or <tt>null</tt> if job-unrelated) * @param key * identifying the file * @return file handle to the file * @throws IOException * if creating the directory ...
3.26
flink_PermanentBlobCache_readFile_rdh
/** * Returns the content of the file for the BLOB with the provided job ID the blob key. * * <p>The method will first attempt to serve the BLOB from the local cache. If the BLOB is not * in the cache, the method will try to download it from the HA store, or directly from the * {@link BlobServer}. * * <p>Compare...
3.26
flink_PermanentBlobCache_releaseJob_rdh
/** * Unregisters use of job-related BLOBs and allow them to be released. * * @param jobId * ID of the job this blob belongs to * @see #registerJob(JobID) */ @Override public void releaseJob(JobID jobId) { checkNotNull(jobId); synchronized(jobRefCounters) { RefCount ref = jobRefCounters.get(job...
3.26
flink_PermanentBlobCache_registerJob_rdh
/** * Registers use of job-related BLOBs. * * <p>Using any other method to access BLOBs, e.g. {@link #getFile}, is only valid within calls * to <tt>registerJob(JobID)</tt> and {@link #releaseJob(JobID)}. * * @param jobId * ID of the job this blob belongs to * @see #releaseJob(JobID) */ @Override public void ...
3.26
flink_PermanentBlobCache_getFile_rdh
/** * Returns the path to a local copy of the file associated with the provided job ID and blob * key. * * <p>We will first attempt to serve the BLOB from the local storage. If the BLOB is not in * there, we will try to download it from the HA store, or directly from the {@link BlobServer}. * * @param jobId * ...
3.26
flink_OverWindowPartitionedOrderedPreceding_following_rdh
/** * Set the following offset (based on time or row-count intervals) for over window. * * @param following * following offset that relative to the current row. * @return an over window with defined following */ public OverWindowPartitionedOrderedPreceding following(Expression following) { optionalFollowing...
3.26
flink_OverWindowPartitionedOrderedPreceding_as_rdh
/** * Assigns an alias for this window that the following {@code select()} clause can refer to. * * @param alias * alias for this over window * @return the fully defined over window */ public OverWindow as(Expression alias) { return new OverWindow(alias, partitionBy, orderBy, preceding, optionalFollowing); ...
3.26
flink_LogUrlUtil_getValidLogUrlPattern_rdh
/** * Validate and normalize log url pattern. */ public static Optional<String> getValidLogUrlPattern(final Configuration config, final ConfigOption<String> option) { String pattern = config.getString(option); if (StringUtils.isNullOrWhitespaceOnly(pattern)) { return Optio...
3.26
flink_DateTimeUtils_fromTimestamp_rdh
// UNIX TIME // -------------------------------------------------------------------------------------------- public static long fromTimestamp(long ts) { return ts; }
3.26
flink_DateTimeUtils_toSQLDate_rdh
// -------------------------------------------------------------------------------------------- // java.sql Date/Time/Timestamp --> internal data types // -------------------------------------------------------------------------------------------- /** * Converts the internal representation of a SQL DATE (int) to the J...
3.26
flink_DateTimeUtils_timestampToTimestampWithLocalZone_rdh
// -------------------------------------------------------------------------------------------- // TIMESTAMP to TIMESTAMP_LTZ conversions // -------------------------------------------------------------------------------------------- public static TimestampData timestampToTimestampWithLocalZone(TimestampData ts, TimeZo...
3.26
flink_DateTimeUtils_monthly_rdh
/** * Whether this is in the YEAR-TO-MONTH family of intervals. */ public boolean monthly() { return ordinal() <= MONTH.ordinal(); }
3.26
flink_DateTimeUtils_parseDate_rdh
/** * Returns the epoch days since 1970-01-01. */ public static int parseDate(String dateStr, String fromFormat) { // It is OK to use UTC, we just want get the epoch days // TODO use offset, better performance long ts = internalParseTimestampMillis(dateStr, fromFormat, TimeZone.getTimeZone("UTC")); ...
3.26
flink_DateTimeUtils_toInternal_rdh
/** * Converts the Java type used for UDF parameters of SQL TIMESTAMP type ({@link java.sql.Timestamp}) to internal representation (long). * * <p>Converse of {@link #toSQLTimestamp(long)}. */ public static long toInternal(Timestamp ts) { long time = ts.getTime(); return time + LOCAL_TZ.getOf...
3.26
flink_DateTimeUtils_getValue_rdh
/** * Returns the TimeUnit associated with an ordinal. The value returned is null if the * ordinal is not a member of the TimeUnit enumeration. */ public static TimeUnit getValue(int ordinal) { return (ordinal < 0) || (ordinal >= CACHED_VALUES.length) ? null : CACHED_VALUES[ordinal]; }
3.26
flink_DateTimeUtils_ymdhms_rdh
/** * Appends year-month-day and hour:minute:second to a buffer; assumes they are valid. */ private static StringBuilder ymdhms(StringBuilder b, int year, int month, int day, int h, int m, int s) { ymd(b, year, month, day); b.append(' '); hms(b, h, m, s);return b; }
3.26
flink_DateTimeUtils_addMonths_rdh
/** * Adds a given number of months to a date, represented as the number of days since the epoch. */ public static int addMonths(int date, int m) { int y0 = ((int) (extractFromDate(TimeUnitRange.YEAR, date))); int m0 = ((int) (extractFromDate(TimeUnitRange.MONTH, date))); int d0 = ((int) (extractFromDa...
3.26
flink_DateTimeUtils_isValidValue_rdh
/** * Returns whether a given value is valid for a field of this time unit. * * @param field * Field value * @return Whether value */ public boolean isValidValue(BigDecimal field) { return (field.compareTo(BigDecimal.ZERO) >= 0) && ((limit == null) || (field.compareTo(limit) < 0)); }
3.26
flink_DateTimeUtils_toTimestampData_rdh
// -------------------------------------------------------------------------------------------- // Numeric -> Timestamp conversion // -------------------------------------------------------------------------------------------- public static TimestampData toTimestampData(long v, int precision) { switch (precision) ...
3.26
flink_DateTimeUtils_parseTimestampTz_rdh
/** * Parse date time string to timestamp based on the given time zone string and format. Returns * null if parsing failed. * * @param dateStr * the date time string * @param tzStr * the time zone id string */ private static long parseTimestampTz(String dateStr, String tzStr) throws ParseException { ...
3.26
flink_DateTimeUtils_fromTemporalAccessor_rdh
/** * This is similar to {@link LocalDateTime#from(TemporalAccessor)}, but it's less strict and * introduces default values. */ private static LocalDateTime fromTemporalAccessor(TemporalAccessor accessor, int precision) {// complement year with 1970 int year = (accessor.isSupported(YEAR)) ? accessor.get(YEAR) :...
3.26
flink_DateTimeUtils_timestampCeil_rdh
/** * Keep the algorithm consistent with Calcite DateTimeUtils.julianDateFloor, but here we take * time zone into account. */ public static long timestampCeil(TimeUnitRange range, long ts, TimeZone tz) { // assume that we are at UTC timezone, just for algorithm performance long offset = tz.getOffset(ts); ...
3.26
flink_DateTimeUtils_ymd_rdh
/** * Appends year-month-day to a buffer; assumes they are valid. */ private static StringBuilder ymd(StringBuilder b, int year, int month, int day) {int4(b, year); b.append('-'); int2(b, month); b.append('-'); int2(b, day); return b; }
3.26
flink_DateTimeUtils_subtractMonths_rdh
/** * Finds the number of months between two dates, each represented as the number of days since * the epoch. */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,...
3.26
flink_DateTimeUtils_timestampMillisToDate_rdh
// -------------------------------------------------------------------------------------------- // TIMESTAMP to DATE/TIME utils // -------------------------------------------------------------------------------------------- /** * Get date from a timestamp. * * @param ts * the timestamp in milliseconds. * @retur...
3.26
flink_DateTimeUtils_unixTimestamp_rdh
/** * Returns the value of the argument as an unsigned integer in seconds since '1970-01-01 * 00:00:00' UTC. */ public static long unixTimestamp(String dateStr, String format, TimeZone tz) { long ts = internalParseTimestampMillis(dateStr, format, tz); if (ts == Long.MIN_VALUE) { return Long.MIN_...
3.26
flink_DateTimeUtils_of_rdh
/** * Returns a {@code TimeUnitRange} with a given start and end unit. * * @param startUnit * Start unit * @param endUnit * End unit * @return Time unit range, or null if not valid */ public static TimeUnitRange of(TimeUnit startUnit, TimeUnit endUnit) { return MAP.get(new Pair<>(startUnit, endUnit)); }
3.26
flink_DateTimeUtils_m0_rdh
/** * Get time from a timestamp. * * @param ts * the timestamp in milliseconds. * @return the time in milliseconds. */ public static int m0(long ts) { return ((int) (ts % MILLIS_PER_DAY)); }
3.26
flink_DateTimeUtils_toLocalDate_rdh
// -------------------------------------------------------------------------------------------- // Java 8 time conversion // -------------------------------------------------------------------------------------------- public static LocalDate toLocalDate(int date) {return julianToLocalDate(date + EPOCH_JULIAN);}
3.26
flink_DateTimeUtils_toSQLTime_rdh
/** * Converts the internal representation of a SQL TIME (int) to the Java type used for UDF * parameters ({@link java.sql.Time}). */ public static Time toSQLTime(int v) {// note that, in this case, can't handle Daylight Saving Time return new Time(v - LOCAL_TZ.getOffset(v)); }
3.26
flink_DateTimeUtils_formatDate_rdh
/** * Helper for CAST({date} AS VARCHAR(n)). */ public static String formatDate(int date) { final StringBuilder buf = new StringBuilder(10); formatDate(buf, date);return buf.toString(); }
3.26
flink_DateTimeUtils_timestampFloor_rdh
// -------------------------------------------------------------------------------------------- // Floor/Ceil/Convert tz // -------------------------------------------------------------------------------------------- public static long timestampFloor(TimeUnitRange range, long ts, TimeZone tz) { // assume that we a...
3.26
flink_DateTimeUtils_parseTimestampData_rdh
// -------------------------------------------------------------------------------------------- // Parsing functions // -------------------------------------------------------------------------------------------- public static TimestampData parseTimestampData(String dateStr) throws DateTimeException { // Precision...
3.26
flink_DateTimeUtils_toSQLTimestamp_rdh
/** * Converts the internal representation of a SQL TIMESTAMP (long) to the Java type used for UDF * parameters ({@link java.sql.Timestamp}). */ public static Timestamp toSQLTimestamp(long v) {return new Timestamp(v - LOCAL_TZ.getOffset(v)); }
3.26
flink_DateTimeUtils_hms_rdh
/** * Appends hour:minute:second to a buffer; assumes they are valid. */ private static String...
3.26
flink_DateTimeUtils_parseTimestampMillis_rdh
/** * Parse date time string to timestamp based on the given time zone and format. Returns null if * parsing failed. * * @param dateStr * the date time string * @param format * date time string format * @param tz * the time zone */ private static long parseTimestampMillis(String dateStr, String format, ...
3.26
flink_LargeRecordHandler_createSerializer_rdh
// -------------------------------------------------------------------------------------------- private TypeSerializer<Object> createSerializer(Object key, int pos) { if (key == null) { throw new NullKeyFieldException(pos); } try { TypeInformation<Object> info = TypeExtractor.getForObjec...
3.26
flink_LargeRecordHandler_hasData_rdh
// -------------------------------------------------------------------------------------------- public boolean hasData() { return recordCounter > 0; }
3.26
flink_LargeRecordHandler_addRecord_rdh
// -------------------------------------------------------------------------------------------- @SuppressWarnings("unchecked") public long addRecord(T record) throws IOException { if (recordsOutFile == null) { if (closed) { throw new IllegalStateException("The large record handler has been close...
3.26
flink_RuntimeSerializerFactory_hashCode_rdh
// -------------------------------------------------------------------------------------------- @Override public int hashCode() { return clazz.hashCode() ^ serializer.hashCode();}
3.26
flink_ResolveCallByArgumentsRule_adaptArguments_rdh
/** * Adapts the arguments according to the properties of the {@link Result}. */ private List<ResolvedExpression> adaptArguments(Result inferenceResult, List<ResolvedExpression> resolvedArgs) { return IntStream.range(0, resolvedArgs.size()).mapToObj(pos -> { final ResolvedExpression argument = resolvedAr...
3.26
flink_ResolveCallByArgumentsRule_getOptionalTypeInference_rdh
/** * Temporary method until all calls define a type inference. */ private Optional<TypeInference> getOptionalTypeInference(FunctionDefinition definition) { if ((((definition instanceof ScalarFunctionDefinition) || (definition instanceof TableFunctionDefinition)) || (defi...
3.26
flink_ResolveCallByArgumentsRule_prepareInlineUserDefinedFunction_rdh
/** * Validates and cleans an inline, unregistered {@link UserDefinedFunction}. */ private FunctionDefinition prepareInlineUserDefinedFunction(FunctionDefinition definition) { if (definition instanceof ScalarFunctionDefinition) { final ScalarFunctionDefinition sf = ((ScalarFunctionDefinition) (definition)...
3.26
flink_FlinkRelBuilder_watermark_rdh
/** * Build watermark assigner relational node. */ public RelBuilder watermark(int rowtimeFieldIndex, RexNode watermarkExpr) { final RelNode input = build(); final RelNode relNode = LogicalWatermarkAssigner.create(cluster, input, rowtimeFieldIndex, watermarkExpr); return push(relNode); }
3.26
flink_FlinkRelBuilder_windowAggregate_rdh
/** * Build window aggregate for either aggregate or table aggregate. */ public RelBuilder windowAggregate(LogicalWindow window, GroupKey groupKey, List<NamedWindowProperty> namedProperties, Iterable<AggCall> aggCalls) { // build logical aggregate // Because of: // [CALCITE-3763] RelBuilder.aggregate shou...
3.26
flink_FlinkRelBuilder_aggregate_rdh
/** * Build non-window aggregate for either aggregate or table aggregate. */ @Override public RelBuilder aggregate(RelBuilder.GroupKey groupKey, Iterable<RelBuilder.AggCall> aggCalls) { // build a relNode, the build() may also return a project RelNode relNode = super.aggregate(groupKey, aggCalls).build(); ...
3.26
flink_FlinkRelBuilder_pushFunctionScan_rdh
/** * {@link RelBuilder#functionScan(SqlOperator, int, Iterable)} cannot work smoothly with aliases * which is why we implement a custom one. The method is static because some {@link RelOptRule}s * don't use {@link FlinkRelBuilder}. */ public static RelBuilder pushFunctionScan(RelBuilder relBuilder, SqlOperator ope...
3.26
flink_SplitEnumeratorContext_registeredReadersOfAttempts_rdh
/** * Get the currently registered readers of all the subtask attempts. The mapping is from subtask * id to a map which maps an attempt to its reader info. * * @return the currently registered readers. */ default Map<Integer, Map<Integer, ReaderInfo>> registeredReadersOfAttempts() { throw new UnsupportedOpera...
3.26
flink_SplitEnumeratorContext_assignSplit_rdh
/** * Assigns a single split. * * <p>When assigning multiple splits, it is more efficient to assign all of them in a single * call to the {@link #assignSplits(SplitsAssignment)} method. * * @param split * The new split * @param subtask * The index of the operator's parallel subtask that shall receive the s...
3.26
flink_SplitEnumeratorContext_sendEventToSourceReader_rdh
/** * Send a source event to a source reader. The source reader is identified by its subtask id and * attempt number. It is similar to {@link #sendEventToSourceReader(int, SourceEvent)} but it is * aware of the subtask execution attempt to send this event to. * * <p>The {@link SplitEnumerator} must invoke this met...
3.26
flink_ArrayData_createElementGetter_rdh
// ------------------------------------------------------------------------------------------ // Access Utilities // ------------------------------------------------------------------------------------------ /** * Creates an accessor for getting elements in an internal array dat...
3.26
flink_CalciteSchemaBuilder_asRootSchema_rdh
/** * Creates a {@link CalciteSchema} with a given {@link Schema} as the root. * * @param root * schema to use as a root schema * @return calcite schema with given schema as the root */ public static CalciteSchema asRootSchema(Schema root) { return new SimpleCalciteSchema(null, root, ""); }
3.26
flink_WebLogAnalysis_getDocumentsDataSet_rdh
// ************************************************************************* // UTIL METHODS // ************************************************************************* private static DataSet<Tuple2<String, String>> getDocumentsDataSet(ExecutionEnvironment env, ParameterTool params) { // Create DataSet for docume...
3.26
flink_WebLogAnalysis_coGroup_rdh
/** * If the visit iterator is empty, all pairs of the rank iterator are emitted. Otherwise, no * pair is emitted. * * <p>Output Format: 0: RANK 1: URL 2: AVG_DURATION */ @Override public void coGroup(Iterable<Tuple3<Integer, String, Integer>> ranks, Iterable<Tuple1<String>> visits, Collector<Tuple3<Integer, Strin...
3.26
flink_WebLogAnalysis_main_rdh
// ************************************************************************* // PROGRAM // ************************************************************************* public static void main(String[] args) throws Exception { LOGGER.warn(DATASET_DEPRECATION_INFO); final ParameterTool params = ParameterTool.fromArgs(a...
3.26
flink_WebLogAnalysis_filter_rdh
/** * Filters for records of the visits relation where the year of visit is equal to a * specified value. The URL of all visit records passing the filter is emitted. * * <p>Output Format: 0: URL 1: DATE */ @Override public boolean filter(Tuple2<String, String> value) throws Exception { // Parse date string wit...
3.26
flink_BigIntComparator_putNormalizedKey_rdh
/** * Adds a normalized key containing the normalized number of bits and MSBs of the given record. * 1 bit determines the sign (negative, zero/positive), 31 bit the bit length of the record. * Remaining bytes contain the most significant bits of the record. */ @Override public void putNormalizedKey(BigInteger recor...
3.26
flink_TypeInformationSerializationSchema_deserialize_rdh
// ------------------------------------------------------------------------ @Override public T deserialize(byte[] message) { if (dis != null) { dis.setBuffer(message); } else { dis = new DataInputDeserializer(message); } try { return serializer.deserialize(dis); } catch (IOE...
3.26
flink_TypeInformationSerializationSchema_isEndOfStream_rdh
/** * This schema never considers an element to signal end-of-stream, so this method returns always * false. * * @param nextElement * The element to test for the end-of-stream signal. * @return Returns false. */ @Override public boolean isEndOfStream(T nextElement) { return false;}
3.26
flink_MultipleJobsDetails_getJobs_rdh
// ------------------------------------------------------------------------ public Collection<JobDetails> getJobs() { return jobs; }
3.26
flink_CompositeTypeSerializerUtil_m1_rdh
/** * Overrides the existing nested serializer's snapshots with the provided {@code nestedSnapshots}. * * @param compositeSnapshot * the composite snapshot to overwrite its nested serializers. * @param nestedSnapshots * the nested snapshots to overwrite with. */ public static void m1(CompositeTypeSerializerS...
3.26
flink_CompositeTypeSerializerUtil_constructIntermediateCompatibilityResult_rdh
/** * Constructs an {@link IntermediateCompatibilityResult} with the given array of nested * serializers and their corresponding serializer snapshots. * * <p>This result is considered "intermediate", because the actual final result is not yet built * if it isn't defined. This is the case if...
3.26
flink_CompositeTypeSerializerUtil_m0_rdh
/** * Delegates compatibility checks to a {@link CompositeTypeSerializerSnapshot} instance. This * can be used by legacy snapshot classes, which have a newer implementation implemented as a * {@link CompositeTypeSerializerSnapshot}. * * @param newSerializer * the new serializer to check for compatibility. * @p...
3.26
flink_ProgressiveTimestampsAndWatermarks_createMainOutput_rdh
// ------------------------------------------------------------------------ @Override public ReaderOutput<T> createMainOutput(PushingAsyncDataInput.DataOutput<T> output, WatermarkUpdateListener watermarkUpdateListener) { // At the moment, we assume only one output is ever created! // This assumption is strict,...
3.26
flink_ResourceUri_getUri_rdh
/** * Get resource unique path info. */ public String getUri() { return uri; }
3.26
flink_ResourceUri_m0_rdh
/** * Get resource type info. */ public ResourceType m0() { return resourceType; }
3.26
flink_EitherSerializer_getRightSerializer_rdh
// ------------------------------------------------------------------------ // Accessors // ------------------------------------------------------------------------ public TypeSerializer<R> getRightSerializer() {return rightSerializer; }
3.26
flink_EitherSerializer_isImmutableType_rdh
// ------------------------------------------------------------------------ // TypeSerializer methods // ------------------------------------------------------------------------ @Override public boolean isImmutableType() { return false; }
3.26
flink_EitherSerializer_snapshotConfiguration_rdh
// ------------------------------------------------------------------------ // Serializer configuration snapshotting & compatibility // ------------------------------------------------------------------------ @Override public JavaEitherSerializerSnapshot<L, R> snapshotConfiguration() { return new JavaEitherSerializerSn...
3.26
flink_IterateExample_main_rdh
// ************************************************************************* // PROGRAM // ************************************************************************* public static void main(String[] args) throws Exception { // Checking input parameters final ParameterTool params = ParameterTool.fromArgs(args...
3.26
flink_DeployParser_parseDeployOutput_rdh
/** * Parses the output of a Maven build where {@code deploy:deploy} was used, and returns a set of * deployed modules. */ public static Set<String> parseDeployOutput(File buildResult) throws IOException { try (Stream<String> linesStream = Files.lines(buildResult.toPath())) { return parseDeployOutput(li...
3.26
flink_StandaloneHaServices_getResourceManagerLeaderRetriever_rdh
// ------------------------------------------------------------------------ // Services // ------------------------------------------------------------------------ @Override public LeaderRetrievalService getResourceManagerLeaderRetriever() { synchronized(lock) { checkNotShutdown(); ...
3.26
flink_ParquetRowDataBuilder_createWriterFactory_rdh
/** * Create a parquet {@link BulkWriter.Factory}. * * @param rowType * row type of parquet table. * @param conf * hadoop configuration. * @param utcTimestamp * Use UTC timezone or local timezone to the conversion between epoch time * and LocalDateTime. Hive 0.x/1.x/2.x use local timezone. But Hive 3.x...
3.26
flink_TaskManagerConfiguration_fromConfiguration_rdh
// -------------------------------------------------------------------------------------------- // Static factory methods // -------------------------------------------------------------------------------------------- public static TaskManagerConfiguration fromConfiguration(Configuration configuration, TaskExecutorReso...
3.26
flink_RefCountedTmpFileCreator_apply_rdh
/** * Gets the next temp file and stream to temp file. This creates the temp file atomically, * making sure no previous file is overwritten. * * <p>This method is safe against concurrent use. * * @return A pair of temp file and output stream to that temp file. * @throws IOExceptio...
3.26
flink_WindowKeySerializer_equals_rdh
// ------------------------------------------------------------------------------------------ @Override public boolean equals(Object obj) { return (obj instanceof WindowKeySerializer) && keySerializer.equals(((WindowKeySerializer) (obj)).keySerializer); }
3.26
flink_WindowKeySerializer_serializeToPages_rdh
/** * Actually, the return value is just for saving checkSkipReadForFixLengthPart in the * mapFromPages, the cost is very small. * * <p>TODO so, we can remove this return value for simplifying interface. */ @Overridepublic int serializeToPages(WindowKey record, AbstractPagedOutputView target) throws IOException ...
3.26
flink_ProtobufInternalUtils_underScoreToCamelCase_rdh
/** * convert underscore name to camel name. */ public static String underScoreToCamelCase(String name, boolean capNext) { return SchemaUtil.toCamelCase(name, capNext); }
3.26
flink_SplitDataProperties_splitsPartitionedBy_rdh
/** * Defines that data is partitioned using an identifiable method across input splits on the * fields defined by field expressions. Multiple field expressions must be separated by the * semicolon ';' character. All records sharing the same key (combination) must be contained in * a single input split. * * <p><b...
3.26
flink_SplitDataProperties_splitsGroupedBy_rdh
/** * Defines that the data within an input split is grouped on the fields defined by the field * expressions. Multiple field expressions must be separated by the semicolon ';' character. All * records sharing the same key (combination) must be subsequently emitted by ...
3.26
flink_SplitDataProperties_getAllFlatKeys_rdh
// ///////////////////// FLAT FIELD EXTRACTION METHODS private int[] getAllFlatKeys(String[] fieldExpressions) { int[] allKeys = null; for (String keyExp : fieldExpressions) { Keys.ExpressionKeys<T> ek = new Keys.ExpressionKeys<>(keyExp, this.type); int[] flatKeys = ek.computeLogicalKeyPositio...
3.26
flink_SplitDataProperties_splitsOrderedBy_rdh
/** * Defines that the data within an input split is sorted on the fields defined by the field * expressions in the specified orders. Multiple field expressions must be separated by the * semicolon ';' character. All records of an input split must be emitted by the input format in * the defined order. * * <p><b> ...
3.26
flink_SplitDataProperties_m0_rdh
/** * Defines that data is partitioned across input splits on the fields defined by field * positions. All records sharing the same key (combination) must be contained in a single input * split. * * <p><b> IMPORTANT: Providing wrong information with SplitDataProperties can cause wrong * results! </b> * * @param...
3.26
flink_ListViewSerializer_transformLegacySerializerSnapshot_rdh
/** * We need to override this as a {@link LegacySerializerSnapshotTransformer} because in Flink * 1.6.x and below, this serializer was incorrectly returning directly the snapshot of the * nested list serializer as its own snapshot. * * <p>This method transforms the incorrect list serializer snapshot to be a prope...
3.26
flink_RocksDBNativeMetricOptions_m3_rdh
/** * {{@link RocksDBNativeMetricMonitor}} Whether to expose the column family as a variable.. * * @return true is column family to expose variable, false otherwise. */ public boolean m3() { return this.columnFamilyAsVariable; }
3.26
flink_RocksDBNativeMetricOptions_enableBackgroundErrors_rdh
/** * Returns accumulated number of background errors. */ public void enableBackgroundErrors() {this.properties.add(RocksDBProperty.BackgroundErrors.getRocksDBProperty()); }
3.26
flink_RocksDBNativeMetricOptions_enableEstimateNumKeys_rdh
/** * Returns estimated number of total keys in the active and unflushed immutable memtables and * storage. */ public void enableEstimateNumKeys() {this.properties.add(RocksDBProperty.EstimateNumKeys.getRocksDBProperty()); }
3.26
flink_RocksDBNativeMetricOptions_enableEstimateLiveDataSize_rdh
/** * Returns an estimate of the amount of live data in bytes. */ public void enableEstimateLiveDataSize() { this.properties.add(RocksDBProperty.EstimateLiveDataSize.getRocksDBProperty()); }
3.26
flink_RocksDBNativeMetricOptions_enableCompactionPending_rdh
/** * Returns 1 if at least one compaction is pending; otherwise, returns 0. */ public void enableCompactionPending() { this.properties.add(RocksDBProperty.CompactionPending.getRocksDBProperty()); }
3.26