name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
morf_RecordHelper_convertToComparableType | /**
* Convert a string record value to a type which is safe for comparisons.
*
* @param column The column source of the data
* @param stringValue The value
* @return A type-converted value.
* @deprecated Use {@link #convertToComparableType(Column, DataValueLookup)}
*/
@Deprecated
public static Comparable<?> conv... | 3.68 |
hbase_MemorySizeUtil_getGlobalMemStoreHeapPercent | /**
* Retrieve global memstore configured size as percentage of total heap.
*/
public static float getGlobalMemStoreHeapPercent(final Configuration c,
final boolean logInvalid) {
float limit =
c.getFloat(MEMSTORE_SIZE_KEY, c.getFloat(MEMSTORE_SIZE_OLD_KEY, DEFAULT_MEMSTORE_SIZE));
if (limit > 0.8f || limit ... | 3.68 |
morf_Cast_getExpression | /**
* @return The {@link AliasedField} being casted
*/
public AliasedField getExpression() {
return expression;
} | 3.68 |
flink_Tuple21_setFields | /**
* 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 value for field 6
* @param f7 The valu... | 3.68 |
flink_TaskEventDispatcher_unregisterPartition | /**
* Removes the given partition from listening to incoming task events, thus forbidding calls to
* {@link #subscribeToEvent(ResultPartitionID, EventListener, Class)}.
*
* @param partitionId the partition ID
*/
public void unregisterPartition(ResultPartitionID partitionId) {
checkNotNull(partitionId);
sy... | 3.68 |
hbase_AccessControlUtil_toPermissionActions | /**
* Converts a list of Permission.Action proto to an array of client Permission.Action objects.
* @param protoActions the list of protobuf Actions
* @return the converted array of Actions
*/
public static Permission.Action[]
toPermissionActions(List<AccessControlProtos.Permission.Action> protoActions) {
Permi... | 3.68 |
hibernate-validator_ValidationProviderHelper_isHibernateValidator | /**
* Whether the given provider is Hibernate Validator or not.
*/
public boolean isHibernateValidator() {
return isHibernateValidator;
} | 3.68 |
pulsar_LoadSimulationController_makeTopic | // Makes a topic string from a tenant name, namespace name, and topic
// name.
private String makeTopic(final String tenant, final String namespace, final String topic) {
return String.format("persistent://%s/%s/%s/%s", tenant, cluster, namespace, topic);
} | 3.68 |
hudi_CompletionTimeQueryView_isSlicedAfterOrOn | /**
* Returns whether the give instant time {@code instantTime} is sliced after or on the base instant {@code baseInstant}.
*/
public boolean isSlicedAfterOrOn(String baseInstant, String instantTime) {
Option<String> completionTimeOpt = getCompletionTime(baseInstant, instantTime);
if (completionTimeOpt.isPresent(... | 3.68 |
flink_Router_targetToString | /**
* Helper for toString.
*
* <p>For example, returns "io.netty.example.http.router.HttpRouterServerHandler" instead of
* "class io.netty.example.http.router.HttpRouterServerHandler"
*/
private static String targetToString(Object target) {
if (target instanceof Class) {
return ((Class<?>) target).getN... | 3.68 |
flink_SinkTestSuiteBase_generateTestData | /**
* Generate a set of test records.
*
* @param testingSinkSettings sink settings
* @param externalContext External context
* @return Collection of generated test records
*/
protected List<T> generateTestData(
TestingSinkSettings testingSinkSettings,
DataStreamSinkExternalContext<T> externalConte... | 3.68 |
flink_DecimalData_zero | /**
* Creates an instance of {@link DecimalData} for a zero value with the given precision and
* scale.
*
* <p>The precision will be checked. If the precision overflows, null will be returned.
*/
public static @Nullable DecimalData zero(int precision, int scale) {
if (precision <= MAX_COMPACT_PRECISION) {
... | 3.68 |
flink_CrossOperator_projectTuple15 | /**
* Projects a pair of crossed elements to a {@link Tuple} with the previously selected
* fields.
*
* @return The projected data set.
* @see Tuple
* @see DataSet
*/
public <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>
ProjectCross<
I1,
... | 3.68 |
hudi_SchemaEvolutionContext_doEvolutionForParquetFormat | /**
* Do schema evolution for ParquetFormat.
*/
public void doEvolutionForParquetFormat() {
if (internalSchemaOption.isPresent()) {
// reading hoodie schema evolution table
job.setBoolean(HIVE_EVOLUTION_ENABLE, true);
Path finalPath = ((FileSplit)split).getPath();
InternalSchema prunedSchema;
Li... | 3.68 |
hbase_ByteBufferArray_next | /**
* The returned ByteBuffer is an sliced one, it won't affect the position or limit of the
* original one.
*/
@Override
public ByteBuffer next() {
ByteBuffer bb = buffers[curIndex].duplicate();
if (curIndex == startBuffer) {
bb.position(startOffset).limit(Math.min(bufferSize, startOffset + len));
} else ... | 3.68 |
flink_Tuple23_setFields | /**
* 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 value for field 6
* @param f7 The valu... | 3.68 |
framework_VDebugWindow_addHandles | /**
* Adds dummy handle elements to the bottom corners that might have
* scrollbars that interfere with resizing on some platforms.
*
* @since 7.1
*/
private void addHandles() {
Element el = DOM.createDiv();
el.setClassName(VDebugWindow.STYLENAME + "-handle "
+ VDebugWindow.STYLENAME + "-handle... | 3.68 |
hudi_BitCaskDiskMap_getRandomAccessFile | /**
* RandomAccessFile is not thread-safe. This API opens a new file handle per thread and returns.
*
* @return
*/
private BufferedRandomAccessFile getRandomAccessFile() {
try {
BufferedRandomAccessFile readHandle = randomAccessFile.get();
if (readHandle == null) {
readHandle = new BufferedRandomAcc... | 3.68 |
flink_KubernetesStateHandleStore_getAllHandles | /**
* Return a list of all valid keys for state handles.
*
* @return List of valid state handle keys in Kubernetes ConfigMap
* @throws Exception if get state handle names from ConfigMap failed.
*/
@Override
public Collection<String> getAllHandles() throws Exception {
return kubeClient
.getConfigMa... | 3.68 |
framework_VTree_doSiblingSelection | /**
* Selects a range of items which have the same parent.
*
* @param startNode
* The start node
* @param endNode
* The end node
*/
private void doSiblingSelection(TreeNode startNode, TreeNode endNode) {
TreeNode parent = startNode.getParentNode();
List<TreeNode> children;
if (... | 3.68 |
flink_ResourceUri_getUri | /** Get resource unique path info. */
public String getUri() {
return uri;
} | 3.68 |
hbase_Increment_addColumn | /**
* Increment the column from the specific family with the specified qualifier by the specified
* amount.
* <p>
* Overrides previous calls to addColumn for this family and qualifier.
* @param family family name
* @param qualifier column qualifier
* @param amount amount to increment by
* @return the Incr... | 3.68 |
morf_WhenCondition_toString | /**
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return "WHEN [" + criterion + "] THEN [" + value + "]";
} | 3.68 |
hbase_SplitLogWorker_start | /**
* start the SplitLogWorker thread
*/
public void start() {
worker = new Thread(null, this, "SplitLogWorker-" + server.getServerName().toShortString());
worker.start();
} | 3.68 |
hadoop_VirtualRecordReader_nextKeyValue | // The map function per split should be invoked only once.
@Override
public boolean nextKeyValue() throws IOException, InterruptedException {
if (numRows > 0) {
numRows--;
return true;
} else {
return false;
}
} | 3.68 |
flink_KubernetesUtils_getConfigMapLabels | /**
* Get ConfigMap labels for the current Flink cluster. They could be used to filter and clean-up
* the resources.
*
* @param clusterId cluster id
* @param type the config map use case. It could only be {@link
* Constants#LABEL_CONFIGMAP_TYPE_HIGH_AVAILABILITY} now.
* @return Return ConfigMap labels.
*/
p... | 3.68 |
flink_RestClusterClient_getClusterOverview | /**
* Get an overview of the Flink cluster.
*
* @return Future with the {@link ClusterOverviewWithVersion cluster overview}.
*/
public CompletableFuture<ClusterOverviewWithVersion> getClusterOverview() {
return sendRequest(
ClusterOverviewHeaders.getInstance(),
EmptyMessageParameters.get... | 3.68 |
streampipes_AbstractProcessingElementBuilder_requiredStream | /**
* Set a new stream requirement by adding restrictions on this stream. Use
* {@link StreamRequirementsBuilder} to create requirements for a single stream.
*
* @param streamRequirements A bundle of collected {@link CollectedStreamRequirements}
* @return this
*/
public K requiredStream(CollectedStreamRequirement... | 3.68 |
framework_Tree_getItemIdAfter | /**
* If drop is targeted into "folder node" (see {@link #getItemIdInto()}
* ), this method returns the item id of the node after the drag was
* targeted. This method is useful when implementing drop into specific
* location (between specific nodes) in tree.
*
* @return the id of the item after the user targets t... | 3.68 |
framework_UIInitHandler_getSecurityKeyUIDL | /**
* Gets the security key (and generates one if needed) as UIDL.
*
* @param session
* the vaadin session to which the security key belongs
* @return the security key UIDL or "" if the feature is turned off
*/
private static String getSecurityKeyUIDL(VaadinSession session) {
String seckey = sessio... | 3.68 |
flink_Execution_getInitializingOrRunningFuture | /**
* Gets a future that completes once the task execution reaches one of the states {@link
* ExecutionState#INITIALIZING} or {@link ExecutionState#RUNNING}. If this task never reaches
* these states (for example because the task is cancelled before it was properly deployed and
* restored), then this future will ne... | 3.68 |
flink_Transformation_getUserProvidedNodeHash | /**
* Gets the user provided hash.
*
* @return The user provided hash.
*/
public String getUserProvidedNodeHash() {
return userProvidedNodeHash;
} | 3.68 |
hbase_LockStatus_getExclusiveLockProcIdOwner | /**
* Return the id of the procedure which holds the exclusive lock, if exists. Or a negative value
* which means no one holds the exclusive lock.
* <p/>
* Notice that, in HBase, we assume that the procedure id is positive, or at least non-negative.
*/
default long getExclusiveLockProcIdOwner() {
Procedure<?> pr... | 3.68 |
flink_DataSet_partitionCustom | /**
* Partitions a DataSet on the key returned by the selector, using a custom partitioner. This
* method takes the key selector to get the key to partition on, and a partitioner that accepts
* the key type.
*
* <p>Note: This method works only on single field keys, i.e. the selector cannot return tuples
* of fiel... | 3.68 |
graphhopper_GraphHopperWeb_setCalcPoints | /**
* Enable or disable calculating points for the way. The default is true.
*/
public GraphHopperWeb setCalcPoints(boolean calcPoints) {
this.calcPoints = calcPoints;
return this;
} | 3.68 |
framework_ColorPickerGrid_setColorGrid | /**
* Sets the color grid.
*
* @param colors
* the new color grid
*/
public void setColorGrid(Color[][] colors) {
setRowCount(colors.length);
setColumnCount(colors[0].length);
colorGrid = colors;
for (int row = 0; row < getRows(); row++) {
for (int col = 0; col < getColumns(); c... | 3.68 |
framework_GridLayout_getDefaultComponentAlignment | /*
* (non-Javadoc)
*
* @see com.vaadin.ui.Layout.AlignmentHandler#getDefaultComponentAlignment()
*/
@Override
public Alignment getDefaultComponentAlignment() {
return defaultComponentAlignment;
} | 3.68 |
hbase_MetricsREST_incrementSucessfulPutRequests | /**
* @param inc How much to add to sucessfulPutCount.
*/
public void incrementSucessfulPutRequests(final int inc) {
source.incrementSucessfulPutRequests(inc);
} | 3.68 |
framework_PropertyFormatter_isReadOnly | /** Reflects the read-only status of the datasource. */
@Override
public boolean isReadOnly() {
return dataSource == null ? false : dataSource.isReadOnly();
} | 3.68 |
framework_Slot_hasRelativeWidth | /**
* Returns whether the slot's width is relative.
*
* @return {@code true} if the slot uses relative width, {@code false} if
* the slot has a static width
*/
public boolean hasRelativeWidth() {
return relativeWidth;
} | 3.68 |
hadoop_DatanodeVolumeInfo_getPath | /**
* get volume path.
*/
public String getPath() {
return path;
} | 3.68 |
shardingsphere-elasticjob_ListenerNotifierManager_removeJobNotifyExecutor | /**
* Remove and shutdown the listener notify executor from listenerNotifyExecutors.
* @param jobName The job's name.
*/
public void removeJobNotifyExecutor(final String jobName) {
Optional.ofNullable(listenerNotifyExecutors.remove(jobName)).ifPresent(ExecutorService::shutdown);
} | 3.68 |
hadoop_SecureableZone_addRecord | /**
* Adds a Record to the Zone.
* @param r The record to be added
* @see Record
*/
@Override public void addRecord(Record r) {
if (records == null) {
records = new ArrayList<Record>();
}
super.addRecord(r);
records.add(r);
} | 3.68 |
framework_VaadinSession_getGlobalResourceHandler | /**
* Gets this session's global resource handler that takes care of serving
* connector resources that are not served by any single connector because
* e.g. because they are served with strong caching or because of legacy
* reasons.
*
* @param createOnDemand
* <code>true</code> if a resource handler ... | 3.68 |
hbase_RecoverableZooKeeper_delete | /**
* delete is an idempotent operation. Retry before throwing exception. This function will not
* throw NoNodeException if the path does not exist.
*/
public void delete(String path, int version) throws InterruptedException, KeeperException {
final Span span = TraceUtil.createSpan("RecoverableZookeeper.delete");
... | 3.68 |
hbase_DeadServer_copyDeadServersSince | /**
* Extract all the servers dead since a given time, and sort them.
* @param ts the time, 0 for all
* @return a sorted array list, by death time, lowest values first.
*/
synchronized List<Pair<ServerName, Long>> copyDeadServersSince(long ts) {
List<Pair<ServerName, Long>> res = new ArrayList<>(size());
for (... | 3.68 |
hmily_CollectionUtils_createMap | /**
* Create map map.
*
* @param <K> the type parameter
* @param <V> the type parameter
* @param mapType the map type
* @param keyType the key type
* @param size the size
* @return the map
*/
@SuppressWarnings({"unchecked", "rawtypes"})
<K, V> Map<K, V> createMap(final Class<?> mapType, final Class<... | 3.68 |
flink_RegisteredOperatorStateBackendMetaInfo_deepCopy | /** Creates a deep copy of the itself. */
@Nonnull
public RegisteredOperatorStateBackendMetaInfo<S> deepCopy() {
return new RegisteredOperatorStateBackendMetaInfo<>(this);
} | 3.68 |
framework_VDateFieldCalendar_updateValueFromPanel | /**
* TODO refactor: almost same method as in VPopupCalendar.updateValue
* <p>
* For internal use only. May be removed or replaced in the future.
*/
@Override
public void updateValueFromPanel() {
updateBufferedValues();
if (bufferedResolutions != null) {
sendBufferedValues();
}
} | 3.68 |
hbase_SyncTable_syncRange | /**
* Rescan the given range directly from the source and target tables. Count and log differences,
* and if this is not a dry run, output Puts and Deletes to make the target table match the
* source table for this range
*/
private void syncRange(Context context, ImmutableBytesWritable startRow,
ImmutableBytesWri... | 3.68 |
hbase_RegionPlacementMaintainer_genAssignmentPlan | /**
* Generate the assignment plan for the existing table
* @param munkresForSecondaryAndTertiary if set on true the assignment plan for the tertiary and
* secondary will be generated with Munkres algorithm,
* otherwise will be generated us... | 3.68 |
Activiti_BpmnDeploymentHelper_getPersistedInstanceOfProcessDefinition | /**
* Gets the persisted version of the already-deployed process definition. Note that this is
* different from {@link #getMostRecentVersionOfProcessDefinition} as it looks specifically for
* a process definition that is already persisted and attached to a particular deployment,
* rather than the latest version ac... | 3.68 |
framework_LegacyWindow_replaceComponent | /**
* This implementation replaces a component in the content container (
* {@link #getContent()}) instead of in the actual UI.
*
* This method should only be called when the content is a
* {@link ComponentContainer} (default {@link VerticalLayout} or explicitly
* set).
*/
public void replaceComponent(Component ... | 3.68 |
framework_Component_removeStyleNames | /**
* Removes one or more style names from component. Multiple styles can be
* specified by using multiple parameters.
*
* @param styles
* the style name or style names to be removed
* @see #removeStyleName(String)
* @see #setStyleName(String)
* @see #addStyleName(String)
* @since 8.1
*/
public def... | 3.68 |
druid_SQLUtils_clearLimit | /**
* @param query
* @param dbType
* @return 0:sql.toString, 1:
*/
public static Object[] clearLimit(String query, DbType dbType) {
List stmtList = SQLUtils.parseStatements(query, dbType);
SQLLimit limit = null;
SQLStatement statement = (SQLStatement) stmtList.get(0);
if (statement instanceof SQL... | 3.68 |
hadoop_FSDataOutputStreamBuilder_permission | /**
* Set permission for the file.
*
* @param perm permission.
* @return B Generics Type.
*/
public B permission(@Nonnull final FsPermission perm) {
checkNotNull(perm);
permission = perm;
return getThisBuilder();
} | 3.68 |
hbase_CleanerChore_deleteFiles | /**
* Delete the given files
* @param filesToDelete files to delete
* @return number of deleted files
*/
protected int deleteFiles(Iterable<FileStatus> filesToDelete) {
int deletedFileCount = 0;
for (FileStatus file : filesToDelete) {
Path filePath = file.getPath();
LOG.trace("Removing {} from archive",... | 3.68 |
morf_AliasedField_asDate | /**
* @return this field cast from a YYYYMMDD string to a SQL date.
*/
public AliasedField asDate() {
return Function.yyyymmddToDate(this);
} | 3.68 |
flink_PrioritizedDeque_prioritize | /**
* Prioritizes an already existing element. Note that this method assumes identity.
*
* <p>{@implNote Since this method removes the element and reinserts it in a priority position
* in general, some optimizations for special cases are used.}
*
* @param element the element to prioritize.
*/
public void priorit... | 3.68 |
flink_HsFullSpillingStrategy_checkRelease | /**
* Release subpartition's spilled buffer from head. Each subpartition fairly retains a fixed
* number of buffers, and all the remaining buffers are released. If this subpartition does not
* have so many qualified buffers, all of them will be retained.
*/
private void checkRelease(
HsSpillingInfoProvider ... | 3.68 |
hbase_QuotaSettingsFactory_throttle | /* Throttle helper */
private static QuotaSettings throttle(final String userName, final TableName tableName,
final String namespace, final String regionServer, final ThrottleType type, final long limit,
final TimeUnit timeUnit, QuotaScope scope) {
QuotaProtos.ThrottleRequest.Builder builder = QuotaProtos.Throttl... | 3.68 |
Activiti_ProcessEngines_getProcessEngines | /**
* provides access to process engine to application clients in a managed server environment.
*/
public static Map<String, ProcessEngine> getProcessEngines() {
return processEngines;
} | 3.68 |
open-banking-gateway_AuthorizeService_loginWithPassword | /**
* @param loginRequest
* @return empty, if user not found or password not valid. otherwise optional of userprofile
*/
@Transactional
public Optional<UserEntity> loginWithPassword(LoginRequest loginRequest) {
generateUserIfUserDoesNotExistYet(loginRequest);
// find user by id
Optional<UserEntity> opti... | 3.68 |
hadoop_HdfsFileStatus_path | /**
* Set path bytes for this entity (default = {@link #EMPTY_NAME}).
* @param path Path bytes (see {@link #makeQualified(URI, Path)}).
* @return This Builder instance
*/
public Builder path(byte[] path) {
this.path = null == path
? null
: Arrays.copyOf(path, path.length);
return this;
} | 3.68 |
hadoop_Result_negate | /**
* Negate this result.
* @return Result.
*/
public Result negate() {
return new Result(!this.isPass(), this.isDescend());
} | 3.68 |
flink_FunctionTemplate_fromAnnotation | /**
* Creates an instance using the given {@link ProcedureHint}. It resolves explicitly defined
* data types.
*/
static FunctionTemplate fromAnnotation(DataTypeFactory typeFactory, ProcedureHint hint) {
return new FunctionTemplate(
createSignatureTemplate(
typeFactory,
... | 3.68 |
morf_CaseInsensitiveString_unsafeClearCache | /**
* Do not under any circumstances use this outside a strictly single-threaded test.
* Clearing the cache will cause new instances to be created for previous strings.
* If that occurs, the shortcut equals logic we use will no longer hold true.
*
* <p>If it becomes necessary to flush the cache at runtime to avoid... | 3.68 |
hudi_BaseRestoreActionExecutor_writeToMetadata | /**
* Update metadata table if available. Any update to metadata table happens within data table lock.
*
* @param restoreMetadata instance of {@link HoodieRestoreMetadata} to be applied to metadata.
*/
private void writeToMetadata(HoodieRestoreMetadata restoreMetadata, HoodieInstant restoreInflightInstant) {
try ... | 3.68 |
hbase_ZKUtil_waitForBaseZNode | /**
* Waits for HBase installation's base (parent) znode to become available.
* @throws IOException on ZK errors
*/
public static void waitForBaseZNode(Configuration conf) throws IOException {
LOG.info("Waiting until the base znode is available");
String parentZNode =
conf.get(HConstants.ZOOKEEPER_ZNODE_PARE... | 3.68 |
framework_TwinColSelect_setRightColumnCaption | /**
* Sets the text shown above the right column.
*
* @param rightColumnCaption
* The text to show
*/
public void setRightColumnCaption(String rightColumnCaption) {
this.rightColumnCaption = rightColumnCaption;
markAsDirty();
} | 3.68 |
framework_VColorPickerArea_setWidth | /**
* Sets the color area's width. This width does not include caption or
* decorations such as border, margin, and padding.
*/
@Override
public void setWidth(String width) {
area.setWidth(width);
} | 3.68 |
querydsl_AbstractMySQLQuery_useIndex | /**
* By specifying USE INDEX (index_list), you can tell MySQL to use only one of the named indexes
* to find rows in the table.
*
* @param indexes index names
* @return the current object
*/
public C useIndex(String... indexes) {
return addJoinFlag(" use index (" + String.join(", ", indexes) + ")", JoinFlag.... | 3.68 |
framework_DownloadStream_tryToCloseStream | /**
* Helper method that tries to close an input stream and ignores any
* exceptions.
*
* @param in
* the input stream to close, <code>null</code> is also supported
*/
static void tryToCloseStream(InputStream in) {
try {
// try to close output stream (e.g. file handle)
if (in != nul... | 3.68 |
hadoop_AbfsHttpOperation_getConnRequestMethod | /**
* Gets the connection request method.
* @return request method.
*/
String getConnRequestMethod() {
return connection.getRequestMethod();
} | 3.68 |
framework_WindowConnector_updateWindowPosition | /**
* Initializes or updates position from state.
*/
protected void updateWindowPosition() {
VWindow window = getWidget();
WindowState state = getState();
if (state.windowMode == WindowMode.NORMAL) {
// if centered, position handled in postLayout()
if (!state.centered
&& (s... | 3.68 |
hudi_AvroSchemaUtils_appendFieldsToSchema | /**
* Appends provided new fields at the end of the given schema
*
* NOTE: No deduplication is made, this method simply appends fields at the end of the list
* of the source schema as is
*/
public static Schema appendFieldsToSchema(Schema schema, List<Schema.Field> newFields) {
List<Schema.Field> fields = ... | 3.68 |
framework_LayoutManager_removeElementResizeListener | /**
* Removes an element resize listener from the provided element. This might
* cause this LayoutManager to stop tracking the size of the element if no
* other sources are interested in the size.
*
* @param element
* the element to which the element resize listener was
* previously added
... | 3.68 |
shardingsphere-elasticjob_FailoverNode_getItemByExecutionFailoverPath | /**
* Get sharding item by execution failover path.
*
* @param path failover path
* @return sharding item, return null if not from failover path
*/
public Integer getItemByExecutionFailoverPath(final String path) {
if (!isFailoverPath(path)) {
return null;
}
return Integer.parseInt(path.substri... | 3.68 |
framework_FocusableGrid_setFocus | /**
* Sets/Removes the keyboard focus to the panel.
*
* @param focus
* If set to true then the focus is moved to the panel, if set to
* false the focus is removed
*/
public void setFocus(boolean focus) {
if (focus) {
FocusImpl.getFocusImplForPanel().focus(getElement());
} els... | 3.68 |
zxing_BitMatrix_rotate180 | /**
* Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees
*/
public void rotate180() {
BitArray topRow = new BitArray(width);
BitArray bottomRow = new BitArray(width);
int maxHeight = (height + 1) / 2;
for (int i = 0; i < maxHeight; i++) {
topRow = getRow(i, topRow);
int bott... | 3.68 |
querydsl_BeanMap_getWriteMethod | /**
* Returns the mutator for the property with the given name.
*
* @param name the name of the property
* @return the mutator method for the property, or null
*/
public Method getWriteMethod(String name) {
return writeMethods.get(name);
} | 3.68 |
flink_ViewUpdater_notifyOfRemovedView | /**
* Notifies this ViewUpdater of a metric that should no longer be regularly updated.
*
* @param view metric that should no longer be regularly updated
*/
public void notifyOfRemovedView(View view) {
synchronized (lock) {
toRemove.add(view);
}
} | 3.68 |
hudi_HoodieCommitMetadata_getFileSliceForFileGroupFromDeltaCommit | /**
* parse the bytes of deltacommit, and get the base file and the log files belonging to this
* provided file group.
*/
// TODO: refactor this method to avoid doing the json tree walking (HUDI-4822).
public static Option<Pair<String, List<String>>> getFileSliceForFileGroupFromDeltaCommit(byte[] bytes, HoodieFileGr... | 3.68 |
morf_MergeStatementBuilder_getTableUniqueKey | /**
* Gets a list of the fields used as the key upon which to match.
*
* @return the table unique key.
*/
List<AliasedField> getTableUniqueKey() {
return tableUniqueKey;
} | 3.68 |
flink_CompactingHashTable_getSize | /**
* Size of all memory segments owned by this hash table
*
* @return size in bytes
*/
private long getSize() {
long numSegments = 0;
numSegments += this.availableMemory.size();
numSegments += this.buckets.length;
for (InMemoryPartition<T> p : this.partitions) {
numSegments += p.getBlockCou... | 3.68 |
pulsar_LoadManagerShared_filterAntiAffinityGroupOwnedBrokers | /**
* It tries to filter out brokers which own namespace with same anti-affinity-group as given namespace. If all the
* domains own namespace with same anti-affinity group then it will try to keep brokers with domain that has least
* number of namespaces. It also tries to keep brokers which has least number of names... | 3.68 |
framework_VLayoutSlot_getAlignment | /**
* Returns the alignment data for this slot.
*
* @return the alignment data, can be {@code null}
*/
public AlignmentInfo getAlignment() {
return alignment;
} | 3.68 |
hudi_HoodieBloomIndex_explodeRecordsWithFileComparisons | /**
* For each incoming record, produce N output records, 1 each for each file against which the record's key needs to be
* checked. For tables, where the keys have a definite insert order (e.g: timestamp as prefix), the number of files
* to be compared gets cut down a lot from range pruning.
* <p>
* Sub-partition... | 3.68 |
hadoop_DistributedCache_addLocalFiles | /**
* Add a file that has been localized to the conf.. Used
* by internal DistributedCache code.
* @param conf The conf to modify to contain the localized caches
* @param str a comma separated list of local files
*/
@Deprecated
public static void addLocalFiles(Configuration conf, String str) {
String files = co... | 3.68 |
incubator-hugegraph-toolchain_JDBCVendor_buildGteClauseInFlattened | /**
* For database which unsupported to select by where (a, b, c) >= (va, vb, vc)
* (a, b, c) >= (va, vb, vc) will be convert as follows:
* ("a" = va AND "b" = vb AND "c" >= vc)
* OR
* ("a" = va AND "b" > vb)
* OR
* ("a" > va)
*/
public String buildGteClauseInFlattened(Line nextStartRow) {
E.checkNotNull(ne... | 3.68 |
framework_VDragAndDropManager_setCurrentDropHandler | /**
* If drag and drop operation is not handled by {@link VDragAndDropManager}s
* internal handler, this can be used to update current {@link VDropHandler}
* .
*
* @param currentDropHandler
* the current drop handler
*/
public void setCurrentDropHandler(VDropHandler currentDropHandler) {
this.curr... | 3.68 |
framework_GridKeyDownEvent_isArrow | /**
* Does the key code represent an arrow key?
*
* @param keyCode
* the key code
* @return if it is an arrow key code
*/
public static boolean isArrow(int keyCode) {
switch (keyCode) {
case KeyCodes.KEY_DOWN:
case KeyCodes.KEY_RIGHT:
case KeyCodes.KEY_UP:
case KeyCodes.KEY_LEFT:
... | 3.68 |
flink_AbstractCsvInputFormat_findNextLineStartOffset | /**
* Find next legal line separator to return next offset (first byte offset of next line).
*
* <p>NOTE: Because of the particularity of UTF-8 encoding, we can determine the number of bytes
* of this character only by comparing the first byte, so we do not need to traverse M*N in
* comparison.
*/
private long fi... | 3.68 |
hudi_UpsertPartitioner_getSmallFiles | /**
* Returns a list of small files in the given partition path.
*/
protected List<SmallFile> getSmallFiles(String partitionPath) {
// smallFiles only for partitionPath
List<SmallFile> smallFileLocations = new ArrayList<>();
HoodieTimeline commitTimeline = table.getMetaClient().getCommitsTimeline().filterComp... | 3.68 |
framework_VComboBox_getTotalSuggestions | /**
* Gets the total number of suggestions, excluding the null selection item.
*
* @since 8.0
* @return total number of suggestions
*/
public int getTotalSuggestions() {
return totalSuggestions;
} | 3.68 |
hadoop_TFile_checkKey | /**
* check whether we have already successfully obtained the key. It also
* initializes the valueInputStream.
*/
void checkKey() throws IOException {
if (klen >= 0) return;
if (atEnd()) {
throw new EOFException("No key-value to read");
}
klen = -1;
vlen = -1;
valueChecked = false;
klen = Utils.re... | 3.68 |
dubbo_PermissionLevel_from | // find the permission level by the level value, if not found, return default PUBLIC level
public static PermissionLevel from(String permissionLevel) {
if (StringUtils.isNumber(permissionLevel)) {
return Arrays.stream(values())
.filter(p -> String.valueOf(p.getLevel()).equals(permissionLevel... | 3.68 |
dubbo_StringUtils_split | /**
* split.
*
* @param ch char.
* @return string array.
*/
public static String[] split(String str, char ch) {
if (isEmpty(str)) {
return EMPTY_STRING_ARRAY;
}
return splitToList0(str, ch).toArray(EMPTY_STRING_ARRAY);
} | 3.68 |
flink_HsSubpartitionFileReaderImpl_compareTo | /** Provides priority calculation logic for io scheduler. */
@Override
public int compareTo(HsSubpartitionFileReader that) {
checkArgument(that instanceof HsSubpartitionFileReaderImpl);
return Long.compare(
getNextOffsetToLoad(), ((HsSubpartitionFileReaderImpl) that).getNextOffsetToLoad());
} | 3.68 |
hadoop_ConverterUtils_toContainerId | /*
* This method is deprecated, use {@link ContainerId#fromString(String)}
* instead.
*/
@Public
@Deprecated
public static ContainerId toContainerId(String containerIdStr) {
return ContainerId.fromString(containerIdStr);
} | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.