name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hmily_ExtensionLoader_loadAll | /**
* Load all list.
*
* @param loader the loader
* @return the list
*/
public List<T> loadAll(final ClassLoader loader) {
return loadAll(null, null, loader);
} | 3.68 |
hadoop_ResourceRequestSet_addAndOverrideRR | /**
* Add a {@link ResourceRequest} into the requestSet. If there's already an RR
* with the same resource name, override it and update accordingly.
*
* @param ask the new {@link ResourceRequest}
* @throws YarnException indicates exceptions from yarn servers.
*/
public void addAndOverrideRR(ResourceRequest ask) t... | 3.68 |
hudi_HoodieBackedTableMetadataWriter_deletePendingIndexingInstant | /**
* Deletes any pending indexing instant, if it exists.
* It reads the plan from indexing.requested file and deletes both requested and inflight instants,
* if the partition path in the plan matches with the given partition path.
*/
private static void deletePendingIndexingInstant(HoodieTableMetaClient metaClient... | 3.68 |
flink_HiveParserIntervalDayTime_getTotalSeconds | /**
* Returns days/hours/minutes all converted into seconds. Nanos still need to be retrieved using
* getNanos()
*/
public long getTotalSeconds() {
return totalSeconds;
} | 3.68 |
hadoop_PlacementConstraint_targetTags | /**
* The name of the components that this component's placement policy is
* depending upon are added as target tags. So for affinity say, this
* component's containers are requesting to be placed on hosts where
* containers of the target tag component(s) are running on. Target tags can
* also contain the name of ... | 3.68 |
flink_RemoteInputChannel_notifyCreditAvailable | /**
* Enqueue this input channel in the pipeline for notifying the producer of unannounced credit.
*/
private void notifyCreditAvailable() throws IOException {
checkPartitionRequestQueueInitialized();
partitionRequestClient.notifyCreditAvailable(this);
} | 3.68 |
framework_AriaHelper_handleInputRequired | /**
* Handles the required actions depending of the input element being
* required or not.
*
* @param element
* Element, typically from an input Widget like TextField
* @param required
* boolean, true when the element is required
*/
public static void handleInputRequired(Element element, b... | 3.68 |
shardingsphere-elasticjob_SnapshotService_listen | /**
* Start to listen.
*/
public void listen() {
try {
log.info("ElasticJob: Snapshot service is running on port '{}'", openSocket(port));
} catch (final IOException ex) {
log.error("ElasticJob: Snapshot service listen failure, error is: ", ex);
}
} | 3.68 |
morf_SqlDialect_literalValue | /**
* Infers the value of the field in a format suitable for direct substitution
* into an sql statement.
* <p>
* If the supplied field is not a {@link FieldLiteral}, {@code null} will be
* returned. If it is, the type will be taken directly from the
* {@linkplain FieldLiteral} itself and single quotes (') added ... | 3.68 |
druid_DruidAbstractDataSource_getSocketTimeout | /**
* @since 1.2.12
*/
public int getSocketTimeout() {
return socketTimeout;
} | 3.68 |
hadoop_CounterGroupFactory_addFrameworkGroup | // Initialize the framework counter group mapping
private synchronized <T extends Enum<T>>
void addFrameworkGroup(final Class<T> cls) {
updateFrameworkGroupMapping(cls);
fmap.put(cls.getName(), newFrameworkGroupFactory(cls));
} | 3.68 |
dubbo_ReactorServerCalls_oneToOne | /**
* Implements a unary -> unary call as Mono -> Mono
*
* @param request request
* @param responseObserver response StreamObserver
* @param func service implementation
*/
public static <T, R> void oneToOne(T request, StreamObserver<R> responseObserver, Function<Mono<T>, Mono<R>> func) {
func.apply(Mono.just(... | 3.68 |
hbase_CloneSnapshotProcedure_createFsLayout | /**
* Create region layout in file system.
* @param env MasterProcedureEnv
*/
private List<RegionInfo> createFsLayout(final MasterProcedureEnv env,
final TableDescriptor tableDescriptor, List<RegionInfo> newRegions,
final CreateHdfsRegions hdfsRegionHandler) throws IOException {
final MasterFileSystem mfs = en... | 3.68 |
flink_JobResourceRequirements_readFromJobGraph | /**
* Read {@link JobResourceRequirements resource requirements} from the configuration of a given
* {@link JobGraph}.
*
* @param jobGraph job graph to read requirements from
* @throws IOException in case we're not able to deserialize requirements from the configuration
*/
public static Optional<JobResourceRequir... | 3.68 |
flink_JobGraph_setSnapshotSettings | /**
* Sets the settings for asynchronous snapshots. A value of {@code null} means that snapshotting
* is not enabled.
*
* @param settings The snapshot settings
*/
public void setSnapshotSettings(JobCheckpointingSettings settings) {
this.snapshotSettings = settings;
} | 3.68 |
hbase_HRegionServer_stopServiceThreads | /**
* Wait on all threads to finish. Presumption is that all closes and stops have already been
* called.
*/
protected void stopServiceThreads() {
// clean up the scheduled chores
stopChoreService();
if (bootstrapNodeManager != null) {
bootstrapNodeManager.stop();
}
if (this.cacheFlusher != null) {
... | 3.68 |
framework_TreeTable_removeCollapseListener | /**
* Removes a collapse listener.
*
* @param listener
* the Listener to be removed.
*/
public void removeCollapseListener(CollapseListener listener) {
removeListener(CollapseEvent.class, listener,
CollapseListener.COLLAPSE_METHOD);
} | 3.68 |
hbase_SplitTableRegionProcedure_preSplitRegion | /**
* Action before splitting region in a table.
* @param env MasterProcedureEnv
*/
private void preSplitRegion(final MasterProcedureEnv env)
throws IOException, InterruptedException {
final MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost();
if (cpHost != null) {
cpHost.preSplitRegionAction(get... | 3.68 |
zxing_GenericGF_addOrSubtract | /**
* Implements both addition and subtraction -- they are the same in GF(size).
*
* @return sum/difference of a and b
*/
static int addOrSubtract(int a, int b) {
return a ^ b;
} | 3.68 |
flink_RocksDBConfigurableOptions_checkArgumentValid | /**
* Helper method to check whether the (key,value) is valid through given configuration and
* returns the formatted value.
*
* @param option The configuration key which is configurable in {@link
* RocksDBConfigurableOptions}.
* @param value The value within given configuration.
*/
static void checkArgument... | 3.68 |
flink_UserDefinedFunctionHelper_cleanFunction | /**
* Modifies a function instance by removing any reference to outer classes. This enables
* non-static inner function classes.
*/
private static void cleanFunction(ReadableConfig config, UserDefinedFunction function) {
final ClosureCleanerLevel level = config.get(PipelineOptions.CLOSURE_CLEANER_LEVEL);
try... | 3.68 |
rocketmq-connect_Serde_configure | /**
* configs in key/value pairs
* @param configs
*/
default void configure(Map<String, ?> configs) {
// intentionally left blank
} | 3.68 |
hbase_AbstractStateMachineTableProcedure_checkOnline | /**
* Check region is online.
*/
protected static void checkOnline(MasterProcedureEnv env, RegionInfo ri)
throws DoNotRetryRegionException {
RegionStateNode regionNode =
env.getAssignmentManager().getRegionStates().getRegionStateNode(ri);
if (regionNode == null) {
throw new UnknownRegionException("No Re... | 3.68 |
hbase_ReplicationSource_checkError | // log the error, check if the error is OOME, or whether we should abort the server
private void checkError(Thread t, Throwable error) {
OOMEChecker.exitIfOOME(error, getClass().getSimpleName());
LOG.error("Unexpected exception in {} currentPath={}", t.getName(), getCurrentPath(), error);
if (abortOnError) {
... | 3.68 |
flink_CatalogFactory_requiredContext | /** @deprecated Implement the {@link Factory} based stack instead. */
@Deprecated
default Map<String, String> requiredContext() {
// Default implementation for catalogs implementing the new {@link Factory} stack instead.
return null;
} | 3.68 |
hbase_MemStoreFlusher_isAboveHighWaterMark | /**
* Return the FlushType if global memory usage is above the high watermark
*/
private FlushType isAboveHighWaterMark() {
return server.getRegionServerAccounting().isAboveHighWaterMark();
} | 3.68 |
hbase_GroupingTableMapper_getConf | /**
* Returns the current configuration.
* @return The current configuration.
* @see org.apache.hadoop.conf.Configurable#getConf()
*/
@Override
public Configuration getConf() {
return conf;
} | 3.68 |
framework_VaadinSession_refreshTransients | /**
* Refreshes the transient fields of the session to ensure they are up to
* date.
* <p>
* Called internally by the framework.
*
* @since 7.6
* @param wrappedSession
* the session this VaadinSession is stored in
* @param vaadinService
* the service associated with this VaadinSession
*... | 3.68 |
hbase_ChunkCreator_createChunkForPool | // Chunks from pool are created covered with strong references anyway.
private Chunk createChunkForPool(ChunkType chunkType, int chunkSize) {
if (chunkSize != dataChunksPool.getChunkSize() && chunkSize != indexChunksPool.getChunkSize()) {
return null;
}
return createChunk(true, chunkType, chunkSize);
} | 3.68 |
hadoop_WrappedIOStatistics_toString | /**
* Return the statistics dump of the wrapped statistics.
* @return the statistics for logging.
*/
@Override
public String toString() {
return ioStatisticsToString(wrapped);
} | 3.68 |
flink_BaseTwoInputStreamOperatorWithStateRetention_onProcessingTime | /** The users of this class are not allowed to use processing time timers. See class javadoc. */
@Override
public final void onProcessingTime(InternalTimer<Object, VoidNamespace> timer)
throws Exception {
if (stateCleaningEnabled) {
long timerTime = timer.getTimestamp();
Long cleanupTime = l... | 3.68 |
framework_GridLayout_getComponentAlignment | /*
* (non-Javadoc)
*
* @see com.vaadin.ui.Layout.AlignmentHandler#getComponentAlignment(com
* .vaadin.ui.Component)
*/
@Override
public Alignment getComponentAlignment(Component childComponent) {
ChildComponentData childComponentData = getState(false).childData
.get(childComponent);
if (childCo... | 3.68 |
hadoop_TrashPolicy_initialize | /**
* Used to setup the trash policy. Must be implemented by all TrashPolicy
* implementations. Different from initialize(conf, fs, home), this one does
* not assume trash always under /user/$USER due to HDFS encryption zone.
* @param conf the configuration to be used
* @param fs the filesystem to be used
*/
publ... | 3.68 |
flink_HiveParserUtils_isValuesTempTable | /**
* Check if the table is the temporary table created by VALUES() syntax.
*
* @param tableName table name
*/
public static boolean isValuesTempTable(String tableName) {
return tableName
.toLowerCase()
.startsWith(HiveParserSemanticAnalyzer.VALUES_TMP_TABLE_NAME_PREFIX.toLowerCase());
} | 3.68 |
hadoop_S3ARemoteObject_size | /**
* Gets the size of this file.
* Its value is cached once obtained from AWS.
*
* @return the size of this file.
*/
public long size() {
return s3Attributes.getLen();
} | 3.68 |
querydsl_Expressions_allOf | /**
* Get the intersection of the given Boolean expressions
*
* @param exprs predicates
* @return intersection of predicates
*/
public static BooleanExpression allOf(BooleanExpression... exprs) {
BooleanExpression rv = null;
for (BooleanExpression b : exprs) {
rv = rv == null ? b : rv.and(b);
}... | 3.68 |
pulsar_ResourceAvailabilityRanker_getRank | /*
* Every resource's percentage availability is calculated and then added up to denote the total availability of a
* Resource Unit, if any available resource on a Resource unit is less than 5% we take it out, if only 20% of total
* resources are available then the rank would be halved for every resource that's less... | 3.68 |
hadoop_ReconfigurationException_getProperty | /**
* Get property that cannot be changed.
* @return property info.
*/
public String getProperty() {
return property;
} | 3.68 |
flink_FactoryUtil_createTableSource | /**
* Creates a {@link DynamicTableSource} from a {@link CatalogTable}.
*
* <p>It considers {@link Catalog#getFactory()} if provided.
*
* @deprecated Use {@link #createDynamicTableSource(DynamicTableSourceFactory, ObjectIdentifier,
* ResolvedCatalogTable, Map, ReadableConfig, ClassLoader, boolean)} instead.
... | 3.68 |
hadoop_ResourceSkyline_getContainerSpec | /**
* Get the resource spec of the job's allocated {@code container}s.
* <p> Key assumption: during job's lifespan, its allocated {@code container}s
* have the same {@link Resource} spec.
*
* @return the {@link Resource} spec of the job's allocated
* {@code container}s.
*/
public final Resource getContainerSpec(... | 3.68 |
hudi_HoodieCombineHiveInputFormat_sampleSplits | /**
* This function is used to sample inputs for clauses like "TABLESAMPLE(1 PERCENT)"
* <p>
* First, splits are grouped by alias they are for. If one split serves more than one alias or not for any sampled
* alias, we just directly add it to returned list. Then we find a list of exclusive splits for every alias to... | 3.68 |
flink_PythonFunctionFactory_getPythonFunction | /**
* Returns PythonFunction according to the fully qualified name of the Python UDF i.e
* ${moduleName}.${functionName} or ${moduleName}.${className}.
*
* @param fullyQualifiedName The fully qualified name of the Python UDF.
* @param config The configuration of python dependencies.
* @param classLoader The class... | 3.68 |
hbase_ParseFilter_checkForOr | /**
* Checks if the current index of filter string we are on is the beginning of the keyword 'OR'
* <p>
* @param filterStringAsByteArray filter string given by the user
* @param indexOfOr index at which an 'O' was read
* @return true if the keyword 'OR' is at the current index
*/
public static boole... | 3.68 |
hbase_MobFileName_getDate | /**
* Gets the date string. Its format is yyyymmdd.
* @return The date string.
*/
public String getDate() {
return this.date;
} | 3.68 |
hudi_AbstractColumnReader_readToVector | /**
* Reads `total` values from this columnReader into column.
*/
@Override
public final void readToVector(int readNumber, V vector) throws IOException {
int rowId = 0;
WritableIntVector dictionaryIds = null;
if (dictionary != null) {
dictionaryIds = vector.reserveDictionaryIds(readNumber);
}
while (rea... | 3.68 |
hibernate-validator_AnnotationMetaDataProvider_findExecutableMetaData | /**
* Finds all constraint annotations defined for the given method or constructor.
*
* @param executable The executable element to check for constraints annotations.
*
* @return A meta data object describing the constraints specified for the
* given element.
*/
private ConstrainedExecutable findExecutableMetaDa... | 3.68 |
hudi_HoodieDataBlock_getEngineRecordIterator | /**
* Batch get of keys of interest. Implementation can choose to either do full scan and return matched entries or
* do a seek based parsing and return matched entries.
*
* @param readerContext {@link HoodieReaderContext} instance with type T.
* @param keys Keys of interest.
* @param fullKey Wheth... | 3.68 |
hudi_CleanPlanner_getLatestVersionBeforeCommit | /**
* Gets the latest version < instantTime. This version file could still be used by queries.
*/
private String getLatestVersionBeforeCommit(List<FileSlice> fileSliceList, HoodieInstant instantTime) {
for (FileSlice file : fileSliceList) {
String fileCommitTime = file.getBaseInstantTime();
if (HoodieTimeli... | 3.68 |
hadoop_FederationStateStoreFacade_getActiveSubClustersCount | /**
* Get the number of active cluster nodes.
*
* @return number of active cluster nodes.
* @throws YarnException if the call to the state store is unsuccessful.
*/
public int getActiveSubClustersCount() throws YarnException {
Map<SubClusterId, SubClusterInfo> activeSubClusters = getSubClusters(true);
if (acti... | 3.68 |
hbase_ConfigurationUtil_getKeyValues | /**
* Retrieve a list of key value pairs from configuration, stored under the provided key
* @param conf configuration to retrieve kvps from
* @param key key under which the key values are stored
* @param delimiter character used to separate each kvp
* @return the list of kvps stored under key in conf, ... | 3.68 |
hbase_MetricsConnection_updateRpc | /** Report RPC context to metrics system. */
public void updateRpc(MethodDescriptor method, TableName tableName, Message param,
CallStats stats, Throwable e) {
int callsPerServer = stats.getConcurrentCallsPerServer();
if (callsPerServer > 0) {
concurrentCallsPerServerHist.update(callsPerServer);
}
// Upda... | 3.68 |
hbase_ThrottledInputStream_read | /**
* Read bytes starting from the specified position. This requires rawStream is an instance of
* {@link PositionedReadable}.
* @return the number of bytes read
*/
public int read(long position, byte[] buffer, int offset, int length) throws IOException {
if (!(rawStream instanceof PositionedReadable)) {
thro... | 3.68 |
shardingsphere-elasticjob_JobExecutionEvent_executionSuccess | /**
* Execution success.
*
* @return job execution event
*/
public JobExecutionEvent executionSuccess() {
JobExecutionEvent result = new JobExecutionEvent(id, hostname, ip, taskId, jobName, source, shardingItem, startTime, completeTime, success, failureCause);
result.setCompleteTime(new Date());
result... | 3.68 |
framework_VSlider_propertyNotNullOrEmpty | // Style has non empty property
private boolean propertyNotNullOrEmpty(
final String styleAttribute, final Element p) {
return p.getStyle().getProperty(styleAttribute) != null
&& !p.getStyle().getProperty(styleAttribute)
.isEmpty();
} | 3.68 |
hbase_RawLong_encodeLong | /**
* Write instance {@code val} into buffer {@code buff}.
*/
public int encodeLong(byte[] buff, int offset, long val) {
return Bytes.putLong(buff, offset, val);
} | 3.68 |
flink_NettyShuffleEnvironment_close | /** Tries to shut down all network I/O components. */
@Override
public void close() {
synchronized (lock) {
if (isClosed) {
return;
}
LOG.info("Shutting down the network environment and its components.");
// terminate all network connections
try {
LO... | 3.68 |
flink_HighAvailabilityServicesUtils_getJobManagerAddress | /**
* Returns the JobManager's hostname and port extracted from the given {@link Configuration}.
*
* @param configuration Configuration to extract the JobManager's address from
* @return The JobManager's hostname and port
* @throws ConfigurationException if the JobManager's address cannot be extracted from the
* ... | 3.68 |
flink_InputTypeStrategies_repeatingSequence | /** Arbitrarily often repeating sequence of argument type strategies. */
public static InputTypeStrategy repeatingSequence(ArgumentTypeStrategy... strategies) {
return new RepeatingSequenceInputTypeStrategy(Arrays.asList(strategies));
} | 3.68 |
hadoop_ContainerReInitEvent_getReInitLaunchContext | /**
* Get the Launch Context to be used for upgrade.
* @return ContainerLaunchContext
*/
public ContainerLaunchContext getReInitLaunchContext() {
return reInitLaunchContext;
} | 3.68 |
dubbo_ReferenceConfig_parseUrl | /**
* Parse the directly configured url.
*/
private void parseUrl(Map<String, String> referenceParameters) {
String[] us = SEMICOLON_SPLIT_PATTERN.split(url);
if (ArrayUtils.isNotEmpty(us)) {
for (String u : us) {
URL url = URL.valueOf(u);
if (StringUtils.isEmpty(url.getPath())... | 3.68 |
AreaShop_Utils_yawToFacing | /**
* Get the facing direction based on the yaw.
* @param yaw The horizontal angle that for example the player is looking
* @return The Block Face of the angle
*/
public static BlockFace yawToFacing(float yaw) {
return facings[Math.round(yaw / 45f) & 0x7];
} | 3.68 |
hudi_StreamSync_refreshTimeline | /**
* Refresh Timeline.
*
* @throws IOException in case of any IOException
*/
public void refreshTimeline() throws IOException {
if (fs.exists(new Path(cfg.targetBasePath))) {
try {
HoodieTableMetaClient meta = HoodieTableMetaClient.builder()
.setConf(new Configuration(fs.getConf()))
... | 3.68 |
flink_DeclarativeSlotPoolBridge_setIsJobRestarting | /**
* To set whether the underlying is currently restarting or not. In the former case the slot
* pool bridge will accept all incoming slot offers.
*
* @param isJobRestarting whether this is restarting or not
*/
@Override
public void setIsJobRestarting(boolean isJobRestarting) {
this.isJobRestarting = isJobRes... | 3.68 |
framework_GridLayout_getRowExpandRatio | /**
* Returns the expand ratio of given row.
*
* @see #setRowExpandRatio(int, float)
*
* @param rowIndex
* The row index, starting from 0 for the topmost row.
* @return the expand ratio, 0.0f by default
*/
public float getRowExpandRatio(int rowIndex) {
Float r = rowExpandRatio.get(rowIndex);
... | 3.68 |
hadoop_AzureBlobFileSystemStore_getVersion | /**
* Returns the version of this FileStatus
*
* @return a string value for the FileStatus version
*/
public String getVersion() {
return this.version;
} | 3.68 |
flink_TimestampedInputSplit_resetSplitState | /** Sets the state of the split to {@code null}. */
default void resetSplitState() {
this.setSplitState(null);
} | 3.68 |
hbase_HMaster_isInMaintenanceMode | /**
* Report whether this master is in maintenance mode.
* @return true if master is in maintenanceMode
*/
@Override
public boolean isInMaintenanceMode() {
return maintenanceMode;
} | 3.68 |
dubbo_ClassHelper_isSetter | /**
* @see org.apache.dubbo.common.utils.MethodUtils#isSetter(Method)
* @deprecated Replace to <code>MethodUtils#isSetter(Method)</code>
*/
public static boolean isSetter(Method method) {
return MethodUtils.isSetter(method);
} | 3.68 |
zxing_QRCodeEncoder_encodeContentsFromShareIntent | // Handles send intents from multitude of Android applications
private void encodeContentsFromShareIntent(Intent intent) throws WriterException {
// Check if this is a plain text encoding, or contact
if (intent.hasExtra(Intent.EXTRA_STREAM)) {
encodeFromStreamExtra(intent);
} else {
encodeFromTextExtras(i... | 3.68 |
hbase_ProcedureStoreTracker_isAllModified | /**
* @return true if all procedure was modified or deleted since last call to
* {@link #resetModified()}.
*/
public boolean isAllModified() {
for (Map.Entry<Long, BitSetNode> entry : map.entrySet()) {
if (!entry.getValue().isAllModified()) {
return false;
}
}
return true;
} | 3.68 |
hbase_SnapshotDescriptionUtils_writeSnapshotInfo | /**
* Write the snapshot description into the working directory of a snapshot
* @param snapshot description of the snapshot being taken
* @param workingDir working directory of the snapshot
* @param fs {@link FileSystem} on which the snapshot should be taken
* @throws IOException if we can't reach the fi... | 3.68 |
hadoop_AbfsConfiguration_getAccountAgnosticEnum | /**
* Returns the account-agnostic enum value if it exists, else
* return default.
* @param name Account-agnostic configuration key
* @param defaultValue Value returned if none is configured
* @param <T> Enum type
* @return enum value if one exists, else null
*/
public <T extends Enum<T>> T getAccountAgnosticEnu... | 3.68 |
hbase_CompressionUtil_roundInt2 | /**
* Round up to the next power of two, unless the value would become negative (ints are signed), in
* which case just return Integer.MAX_VALUE.
*/
public static int roundInt2(int v) {
v = Integer.highestOneBit(v) << 1;
if (v < 0) {
return Integer.MAX_VALUE;
}
return v;
} | 3.68 |
hbase_HStoreFile_getMetadataValue | /**
* @param key to look up
* @return value associated with the metadata key
*/
public byte[] getMetadataValue(byte[] key) {
return metadataMap.get(key);
} | 3.68 |
flink_HashPartition_getRecursionLevel | /**
* Gets this partition's recursion level.
*
* @return The partition's recursion level.
*/
public int getRecursionLevel() {
return this.recursionLevel;
} | 3.68 |
flink_TimeWindow_maxTimestamp | /**
* Gets the largest timestamp that still belongs to this window.
*
* <p>This timestamp is identical to {@code getEnd() - 1}.
*
* @return The largest timestamp that still belongs to this window.
* @see #getEnd()
*/
@Override
public long maxTimestamp() {
return end - 1;
} | 3.68 |
hudi_HoodieStreamerUtils_isDropPartitionColumns | /**
* Set based on hoodie.datasource.write.drop.partition.columns config.
* When set to true, will not write the partition columns into the table.
*/
static Boolean isDropPartitionColumns(TypedProperties props) {
return props.getBoolean(DROP_PARTITION_COLUMNS.key(), DROP_PARTITION_COLUMNS.defaultValue());
} | 3.68 |
hadoop_Preconditions_checkArgument | /**
* Preconditions that the expression involving one or more parameters to the calling method.
*
* <p>The message of the exception is {@code msgSupplier.get()}.</p>
*
* @param expression a boolean expression
* @param msgSupplier the {@link Supplier#get()} set the
* exception message if valid. O... | 3.68 |
hadoop_FilePosition_isValid | /**
* Determines if the current position is valid.
*
* @return true if the current position is valid, false otherwise.
*/
public boolean isValid() {
return buffer != null;
} | 3.68 |
flink_HsSubpartitionFileReaderImpl_getNumSkipAndFileOffset | /**
* Maps the given buffer index to the offset in file.
*
* @return a tuple of {@code <numSkip,offset>}. The offset of the given buffer index can be
* derived by starting from the {@code offset} and skipping {@code numSkip} buffers.
*/
private Tuple2<Integer, Long> getNumSkipAndFileOffset(int bufferIndex) {
... | 3.68 |
shardingsphere-elasticjob_AopTargetUtils_getTarget | /**
* Get target object.
*
* @param proxy proxy object
* @return target object
*/
public static Object getTarget(final Object proxy) {
if (!AopUtils.isAopProxy(proxy)) {
return proxy;
}
if (AopUtils.isJdkDynamicProxy(proxy)) {
return getProxyTargetObject(proxy, "h");
} else {
... | 3.68 |
hbase_AsyncNonMetaRegionLocator_getRegionLocationsInternal | // locateToPrevious is true means we will use the start key of a region to locate the region
// placed before it. Used for reverse scan. See the comment of
// AsyncRegionLocator.getPreviousRegionLocation.
private CompletableFuture<RegionLocations> getRegionLocationsInternal(TableName tableName,
byte[] row, int replic... | 3.68 |
flink_FlinkJoinToMultiJoinRule_canCombine | /**
* Returns whether an input can be merged into a given relational expression without changing
* semantics.
*
* @param input input into a join
* @param nullGenerating true if the input is null generating
* @return true if the input can be combined into a parent MultiJoin
*/
private boolean canCombine(
... | 3.68 |
morf_RemoveColumn_apply | /**
* @see org.alfasoftware.morf.upgrade.SchemaChange#apply(org.alfasoftware.morf.metadata.Schema)
*/
@Override
public Schema apply(Schema schema) {
Table original = schema.getTable(tableName);
boolean foundColumn = false;
List<String> columns = new ArrayList<>();
for (Column column : original.columns()) {
... | 3.68 |
open-banking-gateway_FlowableConfig_mapper | /**
* Dedicated ObjectMapper to be used in XS2A protocol.
*/
@Bean
FlowableObjectMapper mapper(List<? extends JacksonMixin> mixins) {
ObjectMapper mapper = new ObjectMapper();
mapper.findAndRegisterModules();
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
mapper.configure(Deserializat... | 3.68 |
graphhopper_ArrayUtil_shuffle | /**
* Shuffles the elements of the given list in place and returns it
*/
public static IntArrayList shuffle(IntArrayList list, Random random) {
int maxHalf = list.size() / 2;
for (int x1 = 0; x1 < maxHalf; x1++) {
int x2 = random.nextInt(maxHalf) + maxHalf;
int tmp = list.buffer[x1];
l... | 3.68 |
hmily_YamlProcessor_setResources | /**
* Sets resources.
*
* @param resources the resources
*/
public void setResources(final InputStream... resources) {
this.resources = resources;
} | 3.68 |
dubbo_AbstractHttpServer_canHandleIdle | /**
* Following methods are extended from RemotingServer, useless for http servers
*/
@Override
public boolean canHandleIdle() {
return false;
} | 3.68 |
framework_VMenuBar_removeItem | /**
* Remove the given item from this menu.
*
* @param item
*/
public void removeItem(CustomMenuItem item) {
if (items.contains(item)) {
int index = items.indexOf(item);
remove(item);
items.remove(index);
}
} | 3.68 |
hudi_ViewStorageProperties_loadFromProperties | /**
* Read the {@link FileSystemViewStorageConfig} with given table base path.
*/
public static FileSystemViewStorageConfig loadFromProperties(String basePath, Configuration conf) {
Path propertyPath = getPropertiesFilePath(basePath, conf.getString(FlinkOptions.WRITE_CLIENT_ID));
LOG.info("Loading filesystem view... | 3.68 |
pulsar_AbstractSchema_decode | /**
* Decode a byteBuf into an object using a given version.
*
* @param byteBuf
* the byte array to decode
* @param schemaVersion
* the schema version to decode the object. null indicates using latest version.
* @return the deserialized object
*/
public T decode(ByteBuf byteBuf, byte[] sch... | 3.68 |
hadoop_ErasureCoderOptions_getNumDataUnits | /**
* The number of data input units for the coding. A unit can be a byte,
* chunk or buffer or even a block.
* @return count of data input units
*/
public int getNumDataUnits() {
return numDataUnits;
} | 3.68 |
flink_AbstractBytesMultiMap_append | /** Append an value into the hash map's record area. */
public void append(LookupInfo<K, Iterator<RowData>> lookupInfo, BinaryRowData value)
throws IOException {
try {
if (lookupInfo.found) {
// append value only if there exits key-value pair.
int newPointer = ((RecordArea) r... | 3.68 |
flink_PrioritizedDeque_add | /**
* Convenience method for adding an element with optional priority and prior removal.
*
* @param element the element to add
* @param priority flag indicating if it's a priority or non-priority element
* @param prioritize flag that hints that the element is already in this deque, potentially as
* non-priori... | 3.68 |
framework_InMemoryDataProviderHelpers_filteringByIgnoreNull | /**
* Wraps a given data provider so that its filter ignores null items
* returned by the given value provider.
*
* @param dataProvider
* the data provider to wrap
* @param valueProvider
* the value provider for providing values to filter
* @param predicate
* the predicate to c... | 3.68 |
flink_ResultPartitionManager_checkRequestPartitionListeners | /** Check whether the partition request listener is timeout. */
private void checkRequestPartitionListeners() {
List<PartitionRequestListener> timeoutPartitionRequestListeners = new LinkedList<>();
synchronized (registeredPartitions) {
if (isShutdown) {
return;
}
long now = S... | 3.68 |
hbase_User_login | /**
* Login through configured keytab and pricipal.
* @param keytabLocation location of keytab
* @param principalName principal in keytab
* @throws IOException exception from UserGroupInformation.loginUserFromKeytab
*/
public static void login(String keytabLocation, String principalName) throws IOException {
if... | 3.68 |
hadoop_ByteArrayEncodingState_checkBuffers | /**
* Check and ensure the buffers are of the desired length.
* @param buffers the buffers to check
*/
void checkBuffers(byte[][] buffers) {
for (byte[] buffer : buffers) {
if (buffer == null) {
throw new HadoopIllegalArgumentException(
"Invalid buffer found, not allowing null");
}
if ... | 3.68 |
hbase_StoreFileReader_getScanner | /**
* @deprecated since 2.0.0 and will be removed in 3.0.0. Do not write further code which depends
* on this call. Instead use getStoreFileScanner() which uses the StoreFileScanner
* class/interface which is the preferred way to scan a store with higher level
* concepts. should ... | 3.68 |
framework_AbstractHasComponentsConnector_setChildComponents | /*
* (non-Javadoc)
*
* @see com.vaadin.client.HasComponentsConnector#setChildren
* (java.util.Collection)
*/
@Override
public void setChildComponents(List<ComponentConnector> childComponents) {
this.childComponents = childComponents;
} | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.