name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hudi_OverwriteNonDefaultsWithLatestAvroPayload_mergeRecords
/** * Merges the given records into one. * The fields in {@code baseRecord} has higher priority: * it is set up into the merged record if it is not null or equals to the default. * * @param schema The record schema * @param baseRecord The base record to merge with * @param mergedRecord The record to be m...
3.68
druid_SQLExprParser_parseQueryPlanHint
//for ads public void parseQueryPlanHint(SQLExpr expr) { if (lexer.token == Token.HINT && (expr instanceof SQLInListExpr || expr instanceof SQLBinaryOpExpr || expr instanceof SQLInSubQueryExpr || expr instanceof SQLExistsExpr || expr instanceof SQLNotExpr ...
3.68
hbase_ArrayBackedTag_getType
/** Returns the tag type */ @Override public byte getType() { return this.type; }
3.68
framework_DefaultDeploymentConfiguration_getResourceCacheTime
/** * {@inheritDoc} * <p> * The default interval is 3600 seconds (1 hour). */ @Override public int getResourceCacheTime() { return resourceCacheTime; }
3.68
querydsl_MetaDataExporter_setTypeMappings
/** * Set the type mappings to use * * @param typeMappings */ public void setTypeMappings(TypeMappings typeMappings) { module.bind(TypeMappings.class, typeMappings); }
3.68
rocketmq-connect_ServiceProviderUtil_getClusterManagementService
/** * Get custer management service by class name * * @param clusterManagementServiceClazz * @return */ @NotNull public static ClusterManagementService getClusterManagementService(String clusterManagementServiceClazz) { if (StringUtils.isEmpty(clusterManagementServiceClazz)) { clusterManagementServiceC...
3.68
framework_VaadinPortletRequest_getPortalProperty
/** * Reads a portal property from the portal context of the Vaadin request. * * @param name * a string with the name of the portal property to get * @return a string with the value of the property, or <code>null</code> if * the property is not defined */ public String getPortalProperty(String...
3.68
hbase_HelloHBase_createNamespaceAndTable
/** * Invokes Admin#createNamespace and Admin#createTable to create a namespace with a table that has * one column-family. * @param admin Standard Admin object * @throws IOException If IO problem encountered */ static void createNamespaceAndTable(final Admin admin) throws IOException { if (!namespaceExists(admi...
3.68
hudi_AbstractTableFileSystemView_fetchHoodieFileGroup
/** * Default implementation for fetching file-group. */ Option<HoodieFileGroup> fetchHoodieFileGroup(String partitionPath, String fileId) { return Option.fromJavaOptional(fetchAllStoredFileGroups(partitionPath) .filter(fileGroup -> fileGroup.getFileGroupId().getFileId().equals(fileId)).findFirst()); }
3.68
hbase_DeleteTableProcedure_cleanRegionsInMeta
/** * There may be items for this table still up in hbase:meta in the case where the info:regioninfo * column was empty because of some write error. Remove ALL rows from hbase:meta that have to do * with this table. * <p/> * See HBASE-12980. */ private static void cleanRegionsInMeta(final MasterProcedureEnv env, ...
3.68
flink_LongMinimum_add
/** Consider using {@link #add(long)} instead for primitive long values */ @Override public void add(Long value) { this.min = Math.min(this.min, value); }
3.68
morf_IndexBean_columnNames
/** * @see org.alfasoftware.morf.metadata.Index#columnNames() */ @Override public List<String> columnNames() { return columnNames; }
3.68
hmily_HmilyTacRollbackExecutor_getInstance
/** * Gets instance. * * @return the instance */ public static HmilyTacRollbackExecutor getInstance() { if (instance == null) { synchronized (HmilyTacRollbackExecutor.class) { if (instance == null) { instance = new HmilyTacRollbackExecutor(); } } } ...
3.68
framework_AbstractSelect_getNewItemHandler
/** * Returns the new item handler, which is called when user adds new item in * {@code newItemAllowed} mode. * * @return NewItemHandler */ public NewItemHandler getNewItemHandler() { if (newItemHandler == null) { newItemHandler = new DefaultNewItemHandler(); } return newItemHandler; }
3.68
framework_UIDL_hasAttribute
/** * Indicates whether or not the named attribute is available. * * @param name * the name of the attribute to check * @return true if the attribute is available, false otherwise */ public boolean hasAttribute(final String name) { return attr().containsKey(name); }
3.68
framework_FileUploadHandler_sendUploadResponse
/** * Sends the upload response. * * @param request * @param response * @throws IOException */ protected void sendUploadResponse(VaadinRequest request, VaadinResponse response) throws IOException { response.setContentType( ApplicationConstants.CONTENT_TYPE_TEXT_HTML_UTF_8); try (Output...
3.68
pulsar_ProducerConfiguration_getCryptoKeyReader
/** * @return the CryptoKeyReader */ public CryptoKeyReader getCryptoKeyReader() { return conf.getCryptoKeyReader(); }
3.68
hbase_MemStore_startReplayingFromWAL
/** * This message intends to inform the MemStore that next coming updates are going to be part of * the replaying edits from WAL */ default void startReplayingFromWAL() { return; }
3.68
flink_FlinkConnection_setTransactionIsolation
// TODO We currently do not support this, but we can't throw a SQLException here because we want // to support jdbc tools such as beeline and sqlline. @Override public void setTransactionIsolation(int level) throws SQLException {}
3.68
flink_TypeExtractionUtils_extractTypeFromLambda
/** * Extracts type from given index from lambda. It supports nested types. * * @param baseClass SAM function that the lambda implements * @param exec lambda function to extract the type from * @param lambdaTypeArgumentIndices position of type to extract in type hierarchy * @param paramLen count of total paramete...
3.68
framework_Payload_parse
/** * Parses a payload string and returns a payload object represented by that * string. * * @param payloadString * string that represents a payload object * @return a payload object represented by the given string */ public static Payload parse(String payloadString) { String[] parts = payloadStri...
3.68
hadoop_AbstractMultipartUploader_checkPath
/** * Validate a path. * @param path path to check. */ protected void checkPath(Path path) { Objects.requireNonNull(path, "null path"); checkArgument(path.toString().startsWith(basePath.toString()), "Path %s is not under %s", path, basePath); }
3.68
flink_StatsSummary_getMinimum
/** * Returns the minimum seen value. * * @return The current minimum value. */ public long getMinimum() { return min; }
3.68
flink_RemoteInputChannel_setup
/** * Setup includes assigning exclusive buffers to this input channel, and this method should be * called only once after this input channel is created. */ @Override void setup() throws IOException { checkState( bufferManager.unsynchronizedGetAvailableExclusiveBuffers() == 0, "Bug in inp...
3.68
zxing_AlignmentPatternFinder_find
/** * <p>This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since * it's pretty performance-critical and so is written to be fast foremost.</p> * * @return {@link AlignmentPattern} if found * @throws NotFoundException if not found */ AlignmentPattern find() throws NotF...
3.68
hbase_CommonFSUtils_setStoragePolicy
/** * Sets storage policy for given path. If the passed path is a directory, we'll set the storage * policy for all files created in the future in said directory. Note that this change in storage * policy takes place at the FileSystem level; it will persist beyond this RS's lifecycle. If * we're running on a versio...
3.68
pulsar_TripleLongPriorityQueue_bytesCapacity
/** * The amount of memory used to back the priority queue. */ public long bytesCapacity() { return array.bytesCapacity(); }
3.68
flink_BlobServer_createTemporaryFilename
/** * Returns a temporary file inside the BLOB server's incoming directory. * * @return a temporary file inside the BLOB server's incoming directory * @throws IOException if creating the directory fails */ File createTemporaryFilename() throws IOException { return new File( BlobUtils.getIncomingDir...
3.68
framework_DefaultConnectionStateHandler_handleRecoverableError
/** * Called whenever an error occurs in communication which should be handled * by showing the reconnect dialog and retrying communication until * successful again. * * @param type * The type of failure detected * @param payload * The message which did not reach the server, or null if no ...
3.68
hadoop_TaskInfo_getInputBytes
/** * @return Raw bytes read from the FileSystem into the task. Note that this * may not always match the input bytes to the task. */ public long getInputBytes() { return bytesIn; }
3.68
flink_PojoSerializer_createRegisteredSubclassSerializers
/** * Creates an array of serializers for provided list of registered subclasses. Order of returned * serializers will correspond to order of provided subclasses. */ private static TypeSerializer<?>[] createRegisteredSubclassSerializers( LinkedHashSet<Class<?>> registeredSubclasses, ExecutionConfig execution...
3.68
framework_ListSorter_sort
/** * Apply sorting to the current ListDataSource. * * @param order * the sort order list provided by the grid sort event */ @SuppressWarnings({ "rawtypes", "unchecked" }) private void sort(final List<SortOrder> order) { DataSource<T> ds = grid.getDataSource(); if (!(ds instanceof ListDataSource...
3.68
hudi_AvroInternalSchemaConverter_isOptional
/** Check whether current avro schema is optional?. */ public static boolean isOptional(Schema schema) { if (schema.getType() == UNION && schema.getTypes().size() == 2) { return schema.getTypes().get(0).getType() == Schema.Type.NULL || schema.getTypes().get(1).getType() == Schema.Type.NULL; } return false; }
3.68
flink_DataSet_union
/** * Creates a union of this DataSet with an other DataSet. The other DataSet must be of the same * data type. * * @param other The other DataSet which is unioned with the current DataSet. * @return The resulting DataSet. */ public UnionOperator<T> union(DataSet<T> other) { return new UnionOperator<>(this, o...
3.68
flink_RestartPipelinedRegionFailoverStrategy_getFailoverRegion
/** * Returns the failover region that contains the given execution vertex. * * @return the failover region that contains the given execution vertex */ @VisibleForTesting public SchedulingPipelinedRegion getFailoverRegion(ExecutionVertexID vertexID) { return topology.getPipelinedRegionOfVertex(vertexID); }
3.68
hadoop_PerGpuTemperature_getMaxGpuTemp
/** * Get max possible celsius GPU temperature * @return temperature */ @XmlJavaTypeAdapter(PerGpuDeviceInformation.StrToFloatBeforeSpaceAdapter.class) @XmlElement(name = "gpu_temp_max_threshold") public Float getMaxGpuTemp() { return maxGpuTemp; }
3.68
framework_AbstractStringToNumberConverter_convertToPresentation
/* * (non-Javadoc) * * @see * com.vaadin.data.util.converter.Converter#convertToPresentation(java.lang * .Object, java.util.Locale) */ @Override public String convertToPresentation(T value, Class<? extends String> targetType, Locale locale) throws ConversionException { if (value == null) { ...
3.68
pulsar_MultiTopicsConsumerImpl_messageReceived
// Must be called from the internalPinnedExecutor thread private void messageReceived(ConsumerImpl<T> consumer, Message<T> message) { checkArgument(message instanceof MessageImpl); TopicMessageImpl<T> topicMessage = new TopicMessageImpl<>(consumer.getTopic(), message, consumer); if (log.isDebugEnabled()) {...
3.68
hbase_QuotaCache_getQuotaState
/** * Returns the QuotaState requested. If the quota info is not in cache an empty one will be * returned and the quota request will be enqueued for the next cache refresh. */ private <K> QuotaState getQuotaState(final ConcurrentMap<K, QuotaState> quotasMap, final K key) { return computeIfAbsent(quotasMap, key, Qu...
3.68
flink_TwoInputTransformation_getInput2
/** Returns the second input {@code Transformation} of this {@code TwoInputTransformation}. */ public Transformation<IN2> getInput2() { return input2; }
3.68
hbase_PageFilter_parseFrom
/** * Parse a serialized representation of {@link PageFilter} * @param pbBytes A pb serialized {@link PageFilter} instance * @return An instance of {@link PageFilter} made from <code>bytes</code> * @throws DeserializationException if an error occurred * @see #toByteArray */ public static PageFilter parseFrom(fina...
3.68
hadoop_TopologyBuilder_process
/** * Process a collection of JobConf {@link Properties}. We do not restrict it * to be called once. * * @param conf * The job conf properties to be added. */ public void process(Properties conf) { // no code }
3.68
hadoop_BlockStorageMovementNeeded_get
/** * Gets the satisfier files for which block storage movements check necessary * and make the movement if required. * * @return satisfier files */ public synchronized ItemInfo get() { return storageMovementNeeded.poll(); }
3.68
rocketmq-connect_WorkerTask_recordMultiple
/** * batch record * * @param size */ protected void recordMultiple(int size) { taskMetricsGroup.recordMultiple(size); }
3.68
flink_HiveParserSemanticAnalyzer_getExprNodeDescCached
// Find ExprNodeDesc for the expression cached in the HiveParserRowResolver. Returns null if not // exists. private ExprNodeDesc getExprNodeDescCached(HiveParserASTNode expr, HiveParserRowResolver input) throws SemanticException { ColumnInfo colInfo = input.getExpression(expr); if (colInfo != null) { ...
3.68
hadoop_BlockBlobAppendStream_setMaxBlockSize
/** * Set payload size of the stream. * It is intended to be used for unit testing purposes only. */ @VisibleForTesting synchronized void setMaxBlockSize(int size) { maxBlockSize.set(size); // it is for testing only so we can abandon the previously allocated // payload this.outBuffer = ByteBuffer.allocate(m...
3.68
flink_EnvironmentSettings_inStreamingMode
/** Sets that the components should work in a streaming mode. Enabled by default. */ public Builder inStreamingMode() { configuration.set(RUNTIME_MODE, STREAMING); return this; }
3.68
hudi_HoodieBackedTableMetadata_lookupKeysFromFileSlice
/** * Lookup list of keys from a single file slice. * * @param partitionName Name of the partition * @param keys The list of keys to lookup * @param fileSlice The file slice to read * @return A {@code Map} of key name to {@code HoodieRecord} for the keys which were found in the file slice */ private...
3.68
framework_Panel_setScrollTop
/* * (non-Javadoc) * * @see com.vaadin.server.Scrollable#setScrollTop(int) */ @Override public void setScrollTop(int scrollTop) { if (scrollTop < 0) { throw new IllegalArgumentException( "Scroll offset must be at least 0"); } getState().scrollTop = scrollTop; }
3.68
hudi_HoodieInputFormatUtils_getTableMetaClientByPartitionPath
/** * Extract HoodieTableMetaClient by partition path. * * @param conf The hadoop conf * @param partitions The partitions * @return partition path to table meta client mapping */ public static Map<Path, HoodieTableMetaClient> getTableMetaClientByPartitionPath(Configuration conf, Set<Path> partitions) { Ma...
3.68
dubbo_AbstractAnnotationBeanPostProcessor_getInjectedObject
/** * Get injected-object from specified {@link AnnotationAttributes annotation attributes} and Bean Class * * @param attributes {@link AnnotationAttributes the annotation attributes} * @param bean Current bean that will be injected * @param beanName Current bean name that will be injected ...
3.68
hadoop_Platform_registerKey
/** * associate a key class with its serializer and platform * * @param keyClassName map out key class name * @param key key serializer class */ protected void registerKey(String keyClassName, Class<?> key) throws IOException { serialization.register(keyClassName, key); keyClassNames.add(keyClassName)...
3.68
morf_SchemaValidator_validateColumnNames
/** * Validates a {@link Table} or {@link View}'s {@link Column}s meet the rules. * * @param tableOrViewName The Table or View on which to validate columns. */ private void validateColumnNames(Collection<String> columnNames, String tableOrViewName) { for (String columnName : columnNames) { if (!isEntityNameLe...
3.68
hadoop_XMLParser_valuesFromXMLString
/** * @param xml An XML string * @param field The field whose value(s) should be extracted * @return List of the field's values. */ private static List<String> valuesFromXMLString(String xml, String field) { Matcher m = Pattern.compile("<" + field + ">(.+?)</" + field + ">") .matcher(xml); List<String> fo...
3.68
framework_VisibilityChangeEvent_getType
/** * Returns the {@link Type} used to register this event. * * @return the type */ public static Type<VisibilityChangeHandler> getType() { if (type == null) { type = new Type<>(); } return type; }
3.68
hbase_ReportMakingVisitor_getReport
/** * Do not call until after {@link #close()}. Will throw a {@link RuntimeException} if you do. */ CatalogJanitorReport getReport() { if (!this.closed) { throw new RuntimeException("Report not ready until after close()"); } return this.report; }
3.68
dubbo_AccessLogData_getServiceName
/** * Return gthe service of access log entry * * @return */ public String getServiceName() { return get(SERVICE).toString(); }
3.68
hadoop_STSClientFactory_createClientConnection
/** * Create an STS Client instance. * @param stsClient STS instance * @param invoker invoker to use * @return an STS client bonded to that interface. */ public static STSClient createClientConnection( final StsClient stsClient, final Invoker invoker) { return new STSClient(stsClient, invoker); }
3.68
hadoop_RMNode_getAllocatedContainerResource
/** * The total allocated resources to containers. * This will include the sum of Guaranteed and Opportunistic * containers queued + running + paused on the node. * @return the total allocated resources, including all Guaranteed and * Opportunistic containers in queued, running and paused states. */ default Resou...
3.68
framework_AbstractJavaScriptComponent_addFunction
/** * Register a {@link JavaScriptFunction} that can be called from the * JavaScript using the provided name. A JavaScript function with the * provided name will be added to the connector wrapper object (initially * available as <code>this</code>). Calling that JavaScript function will * cause the call method in t...
3.68
morf_ChangePrimaryKeyColumns_assertExistingPrimaryKey
/** * Verify that the "from" position actually matches the schema we have been given * @param from The from position * @param table The target table */ protected void assertExistingPrimaryKey(List<String> from, Table table) { List<String> fromUpperCase = toUpperCase(from); List<String> existingUpperCase = upper...
3.68
morf_RecreateOracleSequences_getDescription
/** * @see org.alfasoftware.morf.upgrade.UpgradeStep#getDescription() */ @Override public String getDescription() { return "Triggers recreation of Oracle table sequences."; }
3.68
hbase_Segment_tailSet
/** * Returns a subset of the segment cell set, which starts with the given cell * @param firstCell a cell in the segment * @return a subset of the segment cell set, which starts with the given cell */ protected SortedSet<Cell> tailSet(Cell firstCell) { return getCellSet().tailSet(firstCell); }
3.68
zxing_AddressBookResultHandler_getDisplayContents
// Overriden so we can hyphenate phone numbers, format birthdays, and bold the name. @Override public CharSequence getDisplayContents() { AddressBookParsedResult result = (AddressBookParsedResult) getResult(); StringBuilder contents = new StringBuilder(100); ParsedResult.maybeAppend(result.getNames(), contents); ...
3.68
flink_AbstractMapTypeInfo_getKeyTypeInfo
/** * Returns the type information for the keys in the map. * * @return The type information for the keys in the map. */ public TypeInformation<K> getKeyTypeInfo() { return keyTypeInfo; }
3.68
querydsl_AbstractSQLQuery_setStatementOptions
/** * Set the options to be applied to the JDBC statements of this query * * @param statementOptions options to be applied to statements */ public void setStatementOptions(StatementOptions statementOptions) { this.statementOptions = statementOptions; }
3.68
flink_Tuple3_toString
/** * Creates a string representation of the tuple in the form (f0, f1, f2), where the individual * fields are the value returned by calling {@link Object#toString} on that field. * * @return The string representation of the tuple. */ @Override public String toString() { return "(" + StringUtils.ar...
3.68
framework_ApplicationConnection_getConnectionStateHandler
/** * Gets the communication error handler for this application. * * @since 7.6 * @return the server RPC queue */ public ConnectionStateHandler getConnectionStateHandler() { return connectionStateHandler; }
3.68
flink_FileMergingSnapshotManagerBase_generatePhysicalFilePath
/** * Generate a file path for a physical file. * * @param dirPath the parent directory path for the physical file. * @return the generated file path for a physical file. */ protected Path generatePhysicalFilePath(Path dirPath) { // this must be called after initFileSystem() is called // so the checkpoint ...
3.68
flink_DefaultExecutionGraph_attachJobVertices
/** Attach job vertices without initializing them. */ private void attachJobVertices(List<JobVertex> topologicallySorted) throws JobException { for (JobVertex jobVertex : topologicallySorted) { if (jobVertex.isInputVertex() && !jobVertex.isStoppable()) { this.isStoppable = false; } ...
3.68
hbase_HBaseTestingUtility_shutdownMiniCluster
/** * Stops mini hbase, zk, and hdfs clusters. * @see #startMiniCluster(int) */ public void shutdownMiniCluster() throws IOException { LOG.info("Shutting down minicluster"); shutdownMiniHBaseCluster(); shutdownMiniDFSCluster(); shutdownMiniZKCluster(); cleanupTestDir(); miniClusterRunning = false; LOG...
3.68
hudi_HoodieHiveUtils_getDateWriteable
/** * Get date writeable object from int value. * Hive3 use DateWritableV2 to build date objects and Hive2 use DateWritable. * So that we need to initialize date according to the version of Hive. */ public static Writable getDateWriteable(int value) { return HIVE_SHIM.getDateWriteable(value); }
3.68
hbase_MasterFeature_bindFactory
/** * Helper method for smoothing over use of {@link SupplierFactoryAdapter}. Inspired by internal * implementation details of jersey itself. */ private <T> ServiceBindingBuilder<T> bindFactory(Supplier<T> supplier) { return bindFactory(new SupplierFactoryAdapter<>(supplier)); }
3.68
framework_InfoSection_getContent
/* * (non-Javadoc) * * @see com.vaadin.client.debug.internal.Section#getContent() */ @Override public Widget getContent() { return content; }
3.68
hadoop_SubApplicationRowKey_decode
/* * (non-Javadoc) * * Decodes a sub application row key of the form * subAppUserId!clusterId!entityType!entityPrefix!entityId!userId * * subAppUserId is usually the doAsUser. * userId is the yarn user that the AM runs as. * * represented in byte format * and converts it into an SubApplicationRowKey object. ...
3.68
querydsl_GroupBy_sortedMap
/** * Create a new aggregating map expression using a backing TreeMap using the given comparator * * @param key key for the map entries * @param value value for the map entries * @param comparator comparator for the created TreeMap instances * @return wrapper expression */ public static <K, V, T, U> AbstractGrou...
3.68
flink_SplittableIterator_getSplit
/** * Splits this iterator into <i>n</i> partitions and returns the <i>i-th</i> partition out of * those. * * @param num The partition to return (<i>i</i>). * @param numPartitions The number of partitions to split into (<i>n</i>). * @return The iterator for the partition. */ public Iterator<T> getSplit(int num, ...
3.68
morf_AbstractSqlDialectTest_verifyBlobColumnCallPrepareStatementParameter
/** * Expected outcome for calling {@link #callPrepareStatementParameter} with a blob data type in {@link #testPrepareStatementParameter()} * @param blobColumn the parameter to verify * @throws SQLException exception */ protected void verifyBlobColumnCallPrepareStatementParameter(SqlParameter blobColumn) throws SQL...
3.68
AreaShop_FriendsFeature_clearFriends
/** * Remove all friends that are added to this region. */ public void clearFriends() { getRegion().setSetting("general.friends", null); }
3.68
hadoop_IOStatisticsSnapshot_readObject
/** * Deserialize by loading each TreeMap, and building concurrent * hash maps from them. * * @param s ObjectInputStream. * @throws IOException raised on errors performing I/O. * @throws ClassNotFoundException class not found exception */ private void readObject(final ObjectInputStream s) throws IOException,...
3.68
hadoop_FlowRunRowKey_toString
/** * returns the Flow Key as a verbose String output. * @return String */ @Override public String toString() { StringBuilder flowKeyStr = new StringBuilder(); flowKeyStr.append("{clusterId=" + clusterId) .append(" userId=" + userId) .append(" flowName=" + flowName) .append(" flowRunId=") ...
3.68
hbase_SimpleRpcScheduler_onConfigurationChange
/** * Resize call queues; * @param conf new configuration */ @Override public void onConfigurationChange(Configuration conf) { callExecutor.resizeQueues(conf); if (priorityExecutor != null) { priorityExecutor.resizeQueues(conf); } if (replicationExecutor != null) { replicationExecutor.resizeQueues(co...
3.68
framework_VerticalLayoutConnector_getWidget
/* * (non-Javadoc) * * @see com.vaadin.client.ui.orderedlayout.AbstractOrderedLayoutConnector# * getWidget () */ @Override public VVerticalLayout getWidget() { return (VVerticalLayout) super.getWidget(); }
3.68
framework_VCalendar_getDropHandler
/* * (non-Javadoc) * * @see com.vaadin.client.ui.dd.VHasDropHandler#getDropHandler() */ @Override public CalendarDropHandler getDropHandler() { return dropHandler; }
3.68
shardingsphere-elasticjob_JobNodeStorage_updateJobNode
/** * Update job node. * * @param node node * @param value data of job node */ public void updateJobNode(final String node, final Object value) { regCenter.update(jobNodePath.getFullPath(node), value.toString()); }
3.68
flink_ConnectedStreams_process
/** * Applies the given {@link KeyedCoProcessFunction} on the connected input streams, thereby * creating a transformed output stream. * * <p>The function will be called for every element in the input streams and can produce zero or * more output elements. Contrary to the {@link #flatMap(CoFlatMapFunction)} functi...
3.68
zxing_BitArray_setRange
/** * Sets a range of bits. * * @param start start of range, inclusive. * @param end end of range, exclusive */ public void setRange(int start, int end) { if (end < start || start < 0 || end > size) { throw new IllegalArgumentException(); } if (end == start) { return; } end--; // will be easier t...
3.68
flink_CliFrontend_savepoint
/** * Executes the SAVEPOINT action. * * @param args Command line arguments for the savepoint action. */ protected void savepoint(String[] args) throws Exception { LOG.info("Running 'savepoint' command."); final Options commandOptions = CliFrontendParser.getSavepointCommandOptions(); final CommandLine...
3.68
hudi_HoodieIngestionService_startService
/** * The main loop for running ingestion in continuous mode. */ @Override protected Pair<CompletableFuture, ExecutorService> startService() { ExecutorService executor = Executors.newFixedThreadPool(1); return Pair.of(CompletableFuture.supplyAsync(() -> { try { while (!isShutdownRequested()) { l...
3.68
pulsar_PositionAckSetUtil_andAckSet
//This method is do `and` operation for ack set public static long[] andAckSet(long[] firstAckSet, long[] secondAckSet) { BitSetRecyclable thisAckSet = BitSetRecyclable.valueOf(firstAckSet); BitSetRecyclable otherAckSet = BitSetRecyclable.valueOf(secondAckSet); thisAckSet.and(otherAckSet); long[] ackSet...
3.68
rocketmq-connect_WorkerSinkTask_initializeAndStart
/** * initinalize and start */ @Override protected void initializeAndStart() { Set<String> topics = new SinkConnectorConfig(taskConfig).parseTopicList(); if (org.apache.commons.collections4.CollectionUtils.isEmpty(topics)) { throw new ConnectException("Sink connector topics config can be null, please ...
3.68
flink_TypeInference_accumulatorTypeStrategy
/** * Sets the strategy for inferring the intermediate accumulator data type of a function * call. */ public Builder accumulatorTypeStrategy(TypeStrategy accumulatorTypeStrategy) { this.accumulatorTypeStrategy = Preconditions.checkNotNull( accumulatorTypeStrategy, "Accumulator typ...
3.68
flink_ClusterEntrypointUtils_createTaskManagerWorkingDirectory
/** * Creates the working directory for the TaskManager process. This method ensures that the * working directory exists. * * @param configuration to extract the required settings from * @param envelopedResourceId identifying the TaskManager process * @return working directory * @throws IOException if the workin...
3.68
hadoop_DatanodeAdminProperties_getUpgradeDomain
/** * Get the upgrade domain of the datanode. * @return the upgrade domain of the datanode. */ public String getUpgradeDomain() { return upgradeDomain; }
3.68
hadoop_BlockBlobInputStream_available
/** * Gets the number of bytes that can be read (or skipped over) without * performing a network operation. * @throws IOException IO failure */ @Override public synchronized int available() throws IOException { checkState(); if (blobInputStream != null) { return blobInputStream.available(); } else { r...
3.68
hbase_Pair_newPair
/** * Constructs a new pair, inferring the type via the passed arguments * @param <T1> type for first * @param <T2> type for second * @param a first element * @param b second element * @return a new pair containing the passed arguments */ public static <T1, T2> Pair<T1, T2> newPair(T1 a, T2 b) { return n...
3.68
hadoop_StoreContext_makeQualified
/** * Qualify a path. * * @param path path to qualify/normalize * @return possibly new path. */ public Path makeQualified(Path path) { return contextAccessors.makeQualified(path); }
3.68
hudi_SanitizationUtils_sanitizeStructTypeForAvro
// TODO(HUDI-5256): Refactor this to use InternalSchema when it is ready. private static StructType sanitizeStructTypeForAvro(StructType structType, String invalidCharMask) { StructType sanitizedStructType = new StructType(); StructField[] structFields = structType.fields(); for (StructField s : structFields) { ...
3.68
hadoop_AzureNativeFileSystemStore_safeDelete
/** * Deletes the given blob, taking special care that if we get a * blob-not-found exception upon retrying the operation, we just * swallow the error since what most probably happened is that * the first operation succeeded on the server. * @param blob The blob to delete. * @param lease Azure blob lease, or null...
3.68
hudi_BaseHoodieWriteClient_startCommit
/** * Provides a new commit time for a write operation (insert/update/delete/insert_overwrite/insert_overwrite_table) with specified action. */ public String startCommit(String actionType, HoodieTableMetaClient metaClient) { CleanerUtils.rollbackFailedWrites(config.getFailedWritesCleanPolicy(), HoodieTimeline...
3.68