name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
flink_SqlConstraintValidator_validate | /** Check table constraint. */
private static void validate(SqlTableConstraint constraint) throws SqlValidateException {
if (constraint.isUnique()) {
throw new SqlValidateException(
constraint.getParserPosition(), "UNIQUE constraint is not supported yet");
}
if (constraint.isEnforced... | 3.68 |
hadoop_SerialJobFactory_setDistCacheEmulator | // it is need for test
void setDistCacheEmulator(DistributedCacheEmulator e) {
jobCreator.setDistCacheEmulator(e);
} | 3.68 |
pulsar_SchemasImpl_convertGetSchemaResponseToSchemaInfo | // the util function converts `GetSchemaResponse` to `SchemaInfo`
static SchemaInfo convertGetSchemaResponseToSchemaInfo(TopicName tn,
GetSchemaResponse response) {
byte[] schema;
if (response.getType() == SchemaType.KEY_VALUE) {
try {
... | 3.68 |
morf_FieldReference_deepCopyInternal | /**
* {@inheritDoc}
* @see org.alfasoftware.morf.sql.element.AliasedField#deepCopyInternal(DeepCopyTransformation)
*/
@Override
protected FieldReference deepCopyInternal(DeepCopyTransformation transformer) {
return new FieldReference(getAlias(), transformer.deepCopy(table), name, direction, nullValueHandling);
} | 3.68 |
flink_Executors_newDirectExecutorService | /** Creates a more {@link ExecutorService} that runs the passed task in the calling thread. */
public static ExecutorService newDirectExecutorService() {
return new DirectExecutorService(true);
} | 3.68 |
dubbo_AbstractGenerator_methodNameUpperUnderscore | // This method mimics the upper-casing method ogf gRPC to ensure compatibility
// See https://github.com/grpc/grpc-java/blob/v1.8.0/compiler/src/java_plugin/cpp/java_generator.cpp#L58
public String methodNameUpperUnderscore() {
StringBuilder s = new StringBuilder();
for (int i = 0; i < methodName.length(); i++)... | 3.68 |
hbase_CommonFSUtils_delete | /**
* Calls fs.delete() and returns the value returned by the fs.delete()
* @param fs must not be null
* @param path must not be null
* @param recursive delete tree rooted at path
* @return the value returned by the fs.delete()
* @throws IOException from underlying FileSystem
*/
public static boolean... | 3.68 |
flink_WatermarkAssignerOperator_processWatermark | /**
* Override the base implementation to completely ignore watermarks propagated from upstream (we
* rely only on the {@link WatermarkGenerator} to emit watermarks from here).
*/
@Override
public void processWatermark(Watermark mark) throws Exception {
// if we receive a Long.MAX_VALUE watermark we forward it s... | 3.68 |
hadoop_DiskBalancerWorkStatus_getIntResult | /**
* Get int value of result.
*
* @return int
*/
public int getIntResult() {
return result;
} | 3.68 |
hbase_ColumnSchemaModel_toString | /*
* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{ NAME => '");
sb.append(name);
sb.append('\'');
for (Map.Entry<QName, Object> e : attrs.entrySet()) {
sb.append(", ");
sb.append(e.getKey().getLocalPart(... | 3.68 |
pulsar_LoadManagerShared_filterBrokersWithLargeTopicCount | /**
* It filters out brokers which owns topic higher than configured threshold at
* ServiceConfiguration.loadBalancerBrokerMaxTopics. <br/>
* if all the brokers own topic higher than threshold then it resets the list with original broker candidates
*
* @param brokerCandidateCache
* @param loadData
* @param loadB... | 3.68 |
dubbo_DubboProtocol_buildReferenceCountExchangeClient | /**
* Build a single client
*
* @param url
* @return
*/
private ReferenceCountExchangeClient buildReferenceCountExchangeClient(URL url) {
ExchangeClient exchangeClient = initClient(url);
ReferenceCountExchangeClient client = new ReferenceCountExchangeClient(exchangeClient, DubboCodec.NAME);
// read con... | 3.68 |
flink_StateAssignmentOperation_getManagedKeyedStateHandles | /**
* Collect {@link KeyGroupsStateHandle managedKeyedStateHandles} which have intersection with
* given {@link KeyGroupRange} from {@link TaskState operatorState}.
*
* @param operatorState all state handles of a operator
* @param subtaskKeyGroupRange the KeyGroupRange of a subtask
* @return all managedKeyedState... | 3.68 |
morf_MergeStatement_getTable | /**
* Gets the table to merge the data into.
*
* @return the table.
*/
public TableReference getTable() {
return table;
} | 3.68 |
dubbo_RegistryManager_reset | /**
* Reset state of AbstractRegistryFactory
*/
public void reset() {
destroyed.set(false);
registries.clear();
} | 3.68 |
hadoop_AbfsConfiguration_unset | /**
* Unsets parameter in the underlying Configuration object.
* Provided only as a convenience; does not add any account logic.
* @param key Configuration key
*/
public void unset(String key) {
rawConfig.unset(key);
} | 3.68 |
dubbo_ReflectUtils_getDesc | /**
* get constructor desc.
* "()V", "(Ljava/lang/String;I)V"
*
* @param c constructor.
* @return desc
*/
public static String getDesc(final CtConstructor c) throws NotFoundException {
StringBuilder ret = new StringBuilder("(");
CtClass[] parameterTypes = c.getParameterTypes();
for (int i = 0; i < par... | 3.68 |
morf_XmlDataSetConsumer_getValue | /**
* Get the value of the column from the provided record. Can be overridden in subclasses if required.
*
* @param record the record to extract a value from
* @param column the column to extract a value from
* @param table the name of the table being processed
* @return the value of column from record
*/
protec... | 3.68 |
flink_FileDataIndexCache_get | /**
* Get a region contains target bufferIndex and belong to target subpartition.
*
* @param subpartitionId the subpartition that target buffer belong to.
* @param bufferIndex the index of target buffer.
* @return If target region can be founded from memory or disk, return optional contains target
* region. O... | 3.68 |
hudi_HoodieTableMetadataUtil_getFileIdLengthWithoutFileIndex | /**
* Returns the length of the fileID ignoring the fileIndex suffix
* <p>
* 0.10 version MDT code added -0 (0th fileIndex) to the fileID. This was removed later.
* <p>
* Examples:
* 0.11+ version: fileID: files-0000 returns 10
* 0.10 version: fileID: files-0000-0 returns 10
*
* @param fileId The fileID... | 3.68 |
open-banking-gateway_FintechConsentAccessImpl_findByCurrentServiceSessionOrderByModifiedDesc | /**
* Lists all consents that are associated with current service session.
*/
@Override
public List<ProtocolFacingConsent> findByCurrentServiceSessionOrderByModifiedDesc() {
ServiceSession serviceSession = entityManager.find(ServiceSession.class, serviceSessionId);
if (null == serviceSession) {
return... | 3.68 |
flink_BuiltInFunctionDefinition_runtimeProvided | /**
* Specifies that this {@link BuiltInFunctionDefinition} is implemented during code
* generation.
*/
public Builder runtimeProvided() {
this.isRuntimeProvided = true;
return this;
} | 3.68 |
flink_PbSchemaValidationUtils_validateSimpleType | /**
* Only validate type match for simple type like int, long, string, boolean.
*
* @param fd {@link FieldDescriptor} in proto descriptor
* @param logicalTypeRoot {@link LogicalTypeRoot} of row element
*/
private static void validateSimpleType(FieldDescriptor fd, LogicalTypeRoot logicalTypeRoot) {
if (!TYPE_MA... | 3.68 |
flink_Catalog_getFactory | /**
* Returns a factory for creating instances from catalog objects.
*
* <p>This method enables bypassing the discovery process. Implementers can directly pass
* internal catalog-specific objects to their own factory. For example, a custom {@link
* CatalogTable} can be processed by a custom {@link DynamicTableFact... | 3.68 |
dubbo_BitList_add | /**
* If the element to added is appeared in originList even if it is not in rootSet,
* directly set its index in rootSet to true. (This may change the order of elements.)
* <p>
* If the element is not contained in originList, allocate tailList and add to tailList.
* <p>
* Notice: It is not recommended adding dup... | 3.68 |
hbase_ReplicationPeerConfigUtil_getTableCF | /**
* Get TableCF in TableCFs, if not exist, return null.
*/
public static ReplicationProtos.TableCF getTableCF(ReplicationProtos.TableCF[] tableCFs,
String table) {
for (int i = 0, n = tableCFs.length; i < n; i++) {
ReplicationProtos.TableCF tableCF = tableCFs[i];
if (tableCF.getTableName().getQualifier(... | 3.68 |
shardingsphere-elasticjob_TriggerService_removeTriggerFlag | /**
* Remove trigger flag.
*/
public void removeTriggerFlag() {
jobNodeStorage.removeJobNodeIfExisted(triggerNode.getLocalTriggerPath());
} | 3.68 |
framework_FieldGroup_firePreCommitEvent | /**
* Sends a preCommit event to all registered commit handlers
*
* @throws CommitException
* If the commit should be aborted
*/
private void firePreCommitEvent() throws CommitException {
CommitHandler[] handlers = commitHandlers
.toArray(new CommitHandler[commitHandlers.size()]);
... | 3.68 |
framework_SassLinker_createTempDir | /**
* Create folder in temporary space on disk.
*
* @param partialPath
* @return
*/
private File createTempDir(String partialPath) {
String baseTempPath = System.getProperty("java.io.tmpdir");
File tempDir = new File(baseTempPath + File.separator + partialPath);
if (!tempDir.exists()) {
tempDi... | 3.68 |
hbase_MetaRegionLocationCache_isValidMetaPath | /**
* Helper to check if the given 'path' corresponds to a meta znode. This listener is only
* interested in changes to meta znodes.
*/
private boolean isValidMetaPath(String path) {
return watcher.getZNodePaths().isMetaZNodePath(path);
} | 3.68 |
hbase_Mutation_getClusterIds | /** Returns the set of clusterIds that have consumed the mutation */
public List<UUID> getClusterIds() {
List<UUID> clusterIds = new ArrayList<>();
byte[] bytes = getAttribute(CONSUMED_CLUSTER_IDS);
if (bytes != null) {
ByteArrayDataInput in = ByteStreams.newDataInput(bytes);
int numClusters = in.readInt(... | 3.68 |
hadoop_StripedBlockReconstructor_clearBuffers | /**
* Clear all associated buffers.
*/
private void clearBuffers() {
getStripedReader().clearBuffers();
stripedWriter.clearBuffers();
} | 3.68 |
framework_FieldGroup_unbind | /**
* Detaches the field from its property id and removes it from this
* FieldBinder.
* <p>
* Note that the field is not detached from its property data source if it
* is no longer connected to the same property id it was bound to using this
* FieldBinder.
*
* @param field
* The field to detach
* @... | 3.68 |
flink_RocksDBNativeMetricOptions_enableNumDeletesImmMemTables | /** Returns total number of delete entries in the unflushed immutable memtables. */
public void enableNumDeletesImmMemTables() {
this.properties.add(RocksDBProperty.NumDeletesImmMemTables.getRocksDBProperty());
} | 3.68 |
flink_AbstractOrcFileInputFormat_orcVectorizedRowBatch | /** Gets the ORC VectorizedRowBatch structure from this batch. */
public OrcVectorizedBatchWrapper<BatchT> orcVectorizedRowBatch() {
return orcVectorizedRowBatch;
} | 3.68 |
flink_RestClusterClient_getJobDetails | /**
* Requests the job details.
*
* @param jobId The job id
* @return Job details
*/
public CompletableFuture<JobDetailsInfo> getJobDetails(JobID jobId) {
final JobDetailsHeaders detailsHeaders = JobDetailsHeaders.getInstance();
final JobMessageParameters params = new JobMessageParameters();
params.job... | 3.68 |
framework_Page_open | /**
* @deprecated As of 7.0, only retained to maintain compatibility with
* LegacyWindow.open methods. See documentation for
* {@link LegacyWindow#open(Resource, String, boolean)} for
* discussion about replacing API.
*/
@Deprecated
public void open(Resource resource, String win... | 3.68 |
zxing_BitSource_getByteOffset | /**
* @return index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}.
*/
public int getByteOffset() {
return byteOffset;
} | 3.68 |
morf_Oracle_reclassifyException | /**
* @see org.alfasoftware.morf.jdbc.DatabaseType#reclassifyException(java.lang.Exception)
*/
@Override
public Exception reclassifyException(Exception e) {
// Reclassify OracleXA exceptions
Optional<Integer> xaErrorCode = getErrorCodeFromOracleXAException(e);
if (xaErrorCode.isPresent()) {
// ORA-00060: De... | 3.68 |
framework_VTooltip_getCloseTimeout | /**
* Returns the time (in ms) the tooltip should be displayed after an event
* that will cause it to be closed (e.g. mouse click outside the component,
* key down).
*
* @return The close timeout (in ms)
*/
public int getCloseTimeout() {
return closeTimeout;
} | 3.68 |
hbase_BackupManager_createBackupInfo | /**
* Creates a backup info based on input backup request.
* @param backupId backup id
* @param type type
* @param tableList table list
* @param targetRootDir root dir
* @param workers number of parallel workers
* @param bandwidth bandwidth per worker in MB per sec
* @throws BackupEx... | 3.68 |
flink_ShadeParser_parseShadeOutput | /**
* Parses the output of a Maven build where {@code shade:shade} was used, and returns a set of
* bundled dependencies for each module.
*
* <p>The returned dependencies will NEVER contain the scope or optional flag.
*
* <p>This method only considers the {@code shade-flink} and {@code shade-dist} executions,
* ... | 3.68 |
hadoop_StreamUtil_findInClasspath | /** @return a jar file path or a base directory or null if not found.
*/
public static String findInClasspath(String className, ClassLoader loader) {
String relPath = className;
relPath = relPath.replace('.', '/');
relPath += ".class";
java.net.URL classUrl = loader.getResource(relPath);
String codePath;
... | 3.68 |
morf_GraphBasedUpgradeSchemaChangeVisitor_writeStatements | /**
* Write statements to the current node
*/
private void writeStatements(Collection<String> statements) {
currentNode.addAllUpgradeStatements(statements);
} | 3.68 |
hbase_ByteArrayComparable_compareTo | /**
* Special compareTo method for subclasses, to avoid copying bytes unnecessarily.
* @param value bytes to compare within a ByteBuffer
* @param offset offset into value
* @param length number of bytes to compare
* @return a negative integer, zero, or a positive integer as this object is less than, equal to,
* ... | 3.68 |
framework_AbstractDateField_getAssistiveLabel | /**
* Gets the assistive label of a calendar navigation element.
*
* @param element
* the element of which to get the assistive label
* @since 8.4
*/
public void getAssistiveLabel(AccessibleElement element) {
getState(false).assistiveLabels.get(element);
} | 3.68 |
framework_FilesystemContainer_setParent | /**
* Returns <code>false</code> when moving files around in the filesystem is
* not supported.
*
* @param itemId
* the ID of the item.
* @param newParentId
* the ID of the Item that's to be the new parent of the Item
* identified with itemId.
* @return <code>true</code> if the... | 3.68 |
graphhopper_WaySegmentParser_setWorkerThreads | /**
* @param workerThreads the number of threads used for the low level reading of the OSM file
*/
public Builder setWorkerThreads(int workerThreads) {
waySegmentParser.workerThreads = workerThreads;
return this;
} | 3.68 |
hbase_HttpServer_getParameter | /**
* Unquote the name and quote the value.
*/
@Override
public String getParameter(String name) {
return HtmlQuoting
.quoteHtmlChars(rawRequest.getParameter(HtmlQuoting.unquoteHtmlChars(name)));
} | 3.68 |
morf_AbstractSqlDialectTest_testDropTables | /**
* Tests SQL for dropping a tables with optional parameters.
*/
@Test
public void testDropTables() {
Table table1 = metadata.getTable(TEST_TABLE);
Table table2 = metadata.getTable(OTHER_TABLE);
compareStatements(
expectedDropSingleTable(),
testDialect.dropTables(ImmutableList.of(table1), false, ... | 3.68 |
hbase_HFileBlock_getOffset | /**
* Cannot be {@link #UNSET}. Must be a legitimate value. Used re-making the {@link BlockCacheKey}
* when block is returned to the cache.
* @return the offset of this block in the file it was read from
*/
long getOffset() {
if (offset < 0) {
throw new IllegalStateException("HFile block offset not initialize... | 3.68 |
hudi_HoodieRecordMerger_shouldFlush | /**
* In some cases a business logic does some checks before flushing a merged record to the disk.
* This method does the check, and when false is returned, it means the merged record should not
* be flushed.
*
* @param record the merged record.
* @param schema the schema of the merged record.
* @return a boolea... | 3.68 |
dubbo_AbstractProxyProtocol_isBound | /**
* @return
*/
@Override
public boolean isBound() {
return false;
} | 3.68 |
zxing_CharacterSetECI_getCharacterSetECIByName | /**
* @param name character set ECI encoding name
* @return CharacterSetECI representing ECI for character encoding, or null if it is legal
* but unsupported
*/
public static CharacterSetECI getCharacterSetECIByName(String name) {
return NAME_TO_ECI.get(name);
} | 3.68 |
hbase_HBaseTestingUtility_isNewVersionBehaviorEnabled | /**
* Check whether the tests should assume NEW_VERSION_BEHAVIOR when creating new column families.
* Default to false.
*/
public boolean isNewVersionBehaviorEnabled() {
final String propName = "hbase.tests.new.version.behavior";
String v = System.getProperty(propName);
if (v != null) {
return Boolean.pars... | 3.68 |
hudi_HoodieDataTableValidator_readConfigFromFileSystem | /**
* Reads config from the file system.
*
* @param jsc {@link JavaSparkContext} instance.
* @param cfg {@link Config} instance.
* @return the {@link TypedProperties} instance.
*/
private TypedProperties readConfigFromFileSystem(JavaSparkContext jsc, Config cfg) {
return UtilHelpers.readConfig(jsc.hadoopConfigu... | 3.68 |
hudi_FlinkWriteClients_createWriteClientV2 | /**
* Creates the Flink write client.
*
* <p>This expects to be used by the driver, the client can then send requests for files view.
*
* <p>The task context supplier is a constant: the write token is always '0-1-0'.
*
* <p>Note: different with {@link #createWriteClient}, the fs view storage options are set into... | 3.68 |
flink_InputFormatProvider_of | /** Helper method for creating a static provider with a provided source parallelism. */
static InputFormatProvider of(
InputFormat<RowData, ?> inputFormat, @Nullable Integer sourceParallelism) {
return new InputFormatProvider() {
@Override
public InputFormat<RowData, ?> createInputFormat()... | 3.68 |
hadoop_StateStoreSerializableImpl_getPrimaryKey | /**
* Get the primary key for a record. If we don't want to store in folders, we
* need to remove / from the name.
*
* @param record Record to get the primary key for.
* @return Primary key for the record.
*/
protected static String getPrimaryKey(BaseRecord record) {
String primaryKey = record.getPrimaryKey();
... | 3.68 |
hudi_FlinkOptions_optionalOptions | /**
* Returns all the optional config options.
*/
public static Set<ConfigOption<?>> optionalOptions() {
Set<ConfigOption<?>> options = new HashSet<>(allOptions());
options.remove(PATH);
return options;
} | 3.68 |
hbase_HStoreFile_getStreamScanner | /**
* Get a scanner which uses streaming read.
* <p>
* Must be called after initReader.
*/
public StoreFileScanner getStreamScanner(boolean canUseDropBehind, boolean cacheBlocks,
boolean isCompaction, long readPt, long scannerOrder, boolean canOptimizeForNonNullColumn)
throws IOException {
return createStream... | 3.68 |
flink_Execution_getReleaseFuture | /**
* Gets the release future which is completed once the execution reaches a terminal state and
* the assigned resource has been released. This future is always completed from the job
* master's main thread.
*
* @return A future which is completed once the assigned resource has been released
*/
public Completabl... | 3.68 |
morf_NamedParameterPreparedStatement_setDate | /**
* Sets the value of a named date parameter.
*
* @param parameter the parameter metadata.
* @param value the parameter value.
* @return this, for method chaining
* @exception SQLException if an error occurs when setting the parameter
*/
public NamedParameterPreparedStatement setDate(SqlParameter parameter, fi... | 3.68 |
framework_VScrollTable_setIndex | /**
* Sets the index of the row in the whole table. Currently used just
* to set even/odd classname
*
* @param indexInWholeTable
*/
private void setIndex(int indexInWholeTable) {
index = indexInWholeTable;
boolean isOdd = indexInWholeTable % 2 == 0;
// Inverted logic to be backwards compatible with ear... | 3.68 |
querydsl_Alias_resetAlias | /**
* Reset the alias
*/
public static void resetAlias() {
aliasFactory.reset();
} | 3.68 |
framework_DefaultDeploymentConfiguration_isXsrfProtectionEnabled | /**
* {@inheritDoc}
* <p>
* The default is true.
*/
@Override
public boolean isXsrfProtectionEnabled() {
return xsrfProtectionEnabled;
} | 3.68 |
framework_ComponentConnectorLayoutSlot_getLayoutManager | /**
* Returns the layout manager for the managed layout.
*
* @return layout manager
*/
public LayoutManager getLayoutManager() {
return layout.getLayoutManager();
} | 3.68 |
hbase_HFileReaderImpl_getLastRowKey | /**
* TODO left from {@link HFile} version 1: move this to StoreFile after Ryan's patch goes in to
* eliminate {@link KeyValue} here.
* @return the last row key, or null if the file is empty.
*/
@Override
public Optional<byte[]> getLastRowKey() {
// We have to copy the row part to form the row key alone
return ... | 3.68 |
querydsl_SQLExpressions_stddevPop | /**
* returns the population standard deviation and returns the square root of the population variance.
*
* @param expr argument
* @return stddev_pop(expr)
*/
public static <T extends Number> WindowOver<T> stddevPop(Expression<T> expr) {
return new WindowOver<T>(expr.getType(), SQLOps.STDDEVPOP, expr);
} | 3.68 |
flink_Vectorizer_setWriter | /**
* Users are not supposed to use this method since this is intended to be used only by the
* {@link OrcBulkWriter}.
*
* @param writer the underlying ORC Writer.
*/
public void setWriter(Writer writer) {
this.writer = writer;
} | 3.68 |
querydsl_JDOExpressions_selectOne | /**
* Create a new detached {@link JDOQuery} instance with the projection 1
*
* @return select(1)
*/
public static JDOQuery<Integer> selectOne() {
return select(Expressions.ONE);
} | 3.68 |
flink_FlinkRelUtil_initializeArray | /**
* Returns an int array with given length and initial value.
*
* @param length array length
* @param initVal initial value
* @return initialized int array
*/
public static int[] initializeArray(int length, int initVal) {
final int[] array = new int[length];
Arrays.fill(array, initVal);
return array... | 3.68 |
hbase_Threads_threadDumpingIsAlive | /** Waits on the passed thread to die dumping a threaddump every minute while its up. */
public static void threadDumpingIsAlive(final Thread t) throws InterruptedException {
if (t == null) {
return;
}
while (t.isAlive()) {
t.join(60 * 1000);
if (t.isAlive()) {
printThreadInfo(System.out,
... | 3.68 |
framework_Window_getPositionX | /**
* Gets the distance of Window left border in pixels from left border of the
* containing (main window) when the window is in {@link WindowMode#NORMAL}.
*
* @return the Distance of Window left border in pixels from left border of
* the containing (main window).or -1 if unspecified
* @since 4.0.0
*/
pu... | 3.68 |
morf_ConnectionResourcesBean_setPort | /**
* @see org.alfasoftware.morf.jdbc.AbstractConnectionResources#setPort(int)
*/
@Override
public void setPort(int port) {
this.port = port;
} | 3.68 |
flink_PlannerCallProcedureOperation_toExternal | /** Convert the value with internal representation to the value with external representation. */
private Object toExternal(Object internalValue, DataType inputType, ClassLoader classLoader) {
if (!(DataTypeUtils.isInternal(inputType))) {
// if the expected input type of the procedure is not internal type,
... | 3.68 |
flink_RecordWriter_randomEmit | /** This is used to send LatencyMarks to a random target channel. */
public void randomEmit(T record) throws IOException {
checkErroneous();
int targetSubpartition = rng.nextInt(numberOfChannels);
emit(record, targetSubpartition);
} | 3.68 |
framework_WebBrowser_isChromeFrame | /**
* Tests whether the user is using Chrome Frame.
*
* @return true if the user is using Chrome Frame, false if the user is not
* using Chrome or if no information on the browser is present
*/
public boolean isChromeFrame() {
if (browserDetails == null) {
return false;
}
return browse... | 3.68 |
MagicPlugin_MagicController_isMage | // TODO: Remove the if and replace it with a precondition
// once we're sure nothing is calling this with a null value.
@SuppressWarnings({"null", "unused"})
@Override
public boolean isMage(Entity entity) {
if (entity == null) return false;
String id = mageIdentifier.fromEntity(entity);
return mages.contain... | 3.68 |
hbase_FlushSnapshotSubprocedure_acquireBarrier | /**
* do nothing, core of snapshot is executed in {@link #insideBarrier} step.
*/
@Override
public void acquireBarrier() throws ForeignException {
// NO OP
} | 3.68 |
hbase_RegionServerObserver_preExecuteProcedures | /**
* This will be called before executing procedures
* @param ctx the environment to interact with the framework and region server.
*/
default void preExecuteProcedures(ObserverContext<RegionServerCoprocessorEnvironment> ctx)
throws IOException {
} | 3.68 |
zxing_AddressBookParsedResult_getEmailTypes | /**
* @return optional descriptions of the type of each e-mail. It could be like "WORK", but,
* there is no guaranteed or standard format.
*/
public String[] getEmailTypes() {
return emailTypes;
} | 3.68 |
querydsl_GroupBy_list | /**
* Create a new aggregating list expression
*
* @param groupExpression values for this expression will be accumulated into a list
* @param <E>
* @param <F>
* @return wrapper expression
*/
public static <E, F> AbstractGroupExpression<E, List<F>> list(GroupExpression<E, F> groupExpression) {
return new Mixi... | 3.68 |
hudi_HoodieTableMetaClient_getMetaPath | /**
* @return Meta path
*/
public String getMetaPath() {
return metaPath.get().toString(); // this invocation is cached
} | 3.68 |
hbase_ProcedureCoordinator_abortProcedure | /**
* Abort the procedure with the given name
* @param procName name of the procedure to abort
* @param reason serialized information about the abort
*/
public void abortProcedure(String procName, ForeignException reason) {
LOG.debug("abort procedure " + procName, reason);
// if we know about the Procedure, n... | 3.68 |
graphhopper_GraphHopper_init | /**
* Reads the configuration from a {@link GraphHopperConfig} object which can be manually filled, or more typically
* is read from `config.yml`.
* <p>
* Important note: Calling this method overwrites the configuration done in some of the setter methods of this class,
* so generally it is advised to either use th... | 3.68 |
querydsl_MathExpressions_sign | /**
* Create a {@code sign(num)} expression
*
* <p>Returns the positive (+1), zero (0), or negative (-1) sign of num.</p>
*
* @param num numeric expression
* @return sign(num)
*/
public static <A extends Number & Comparable<?>> NumberExpression<Integer> sign(Expression<A> num) {
return Expressions.numberOper... | 3.68 |
AreaShop_SoldRegionEvent_getOldBuyer | /**
* Get the player that the region is sold for.
* @return The UUID of the player that the region is sold for
*/
public UUID getOldBuyer() {
return oldBuyer;
} | 3.68 |
pulsar_Producer_run | /**
* Executed from I/O thread when sending receipt back to client.
*/
@Override
public void run() {
if (log.isDebugEnabled()) {
log.debug("[{}] [{}] [{}] Persisted message. cnx {}, sequenceId {}", producer.topic,
producer.producerName, producer.producerId, producer.cnx, sequenceId);
}... | 3.68 |
shardingsphere-elasticjob_InstanceService_getAvailableJobInstances | /**
* Get available job instances.
*
* @return available job instances
*/
public List<JobInstance> getAvailableJobInstances() {
List<JobInstance> result = new LinkedList<>();
for (String each : jobNodeStorage.getJobNodeChildrenKeys(InstanceNode.ROOT)) {
// TODO It's better to make it atomic
... | 3.68 |
flink_Pattern_followedByAny | /**
* Appends a new group pattern to the existing one. The new pattern enforces non-strict temporal
* contiguity. This means that a matching event of this pattern and the preceding matching event
* might be interleaved with other events which are ignored.
*
* @param group the pattern to append
* @return A new pat... | 3.68 |
hbase_HBaseTestingUtility_setMaxRecoveryErrorCount | /**
* Set maxRecoveryErrorCount in DFSClient. In 0.20 pre-append its hard-coded to 5 and makes tests
* linger. Here is the exception you'll see:
*
* <pre>
* 2010-06-15 11:52:28,511 WARN [DataStreamer for file /hbase/.logs/wal.1276627923013 block
* blk_928005470262850423_1021] hdfs.DFSClient$DFSOutputStream(2657)... | 3.68 |
hudi_SerDeHelper_fromJson | /**
* Convert string to internalSchema.
*
* @param json a json string.
* @return a internalSchema.
*/
public static Option<InternalSchema> fromJson(String json) {
if (json == null || json.isEmpty()) {
return Option.empty();
}
try {
return Option.of(fromJson((new ObjectMapper(new JsonFactory())).readV... | 3.68 |
flink_HiveTableUtil_initiateTableFromProperties | /**
* Extract DDL semantics from properties and use it to initiate the table. The related
* properties will be removed from the map after they're used.
*/
private static void initiateTableFromProperties(
Table hiveTable, Map<String, String> properties, HiveConf hiveConf) {
extractExternal(hiveTable, prop... | 3.68 |
flink_ShutdownHookUtil_addShutdownHook | /** Adds a shutdown hook to the JVM and returns the Thread, which has been registered. */
public static Thread addShutdownHook(
final AutoCloseable service, final String serviceName, final Logger logger) {
checkNotNull(service);
checkNotNull(logger);
final Thread shutdownHook =
new Thr... | 3.68 |
flink_PushCalcPastChangelogNormalizeRule_buildFieldsMapping | /** Build field reference mapping from old field index to new field index after projection. */
private Map<Integer, Integer> buildFieldsMapping(int[] projectedInputRefs) {
final Map<Integer, Integer> fieldsOldToNewIndexMapping = new HashMap<>();
for (int i = 0; i < projectedInputRefs.length; i++) {
fiel... | 3.68 |
flink_HiveParserTypeCheckCtx_setError | /** @param error the error to set */
public void setError(String error, HiveParserASTNode errorSrcNode) {
if (LOG.isDebugEnabled()) {
// Logger the callstack from which the error has been set.
LOG.debug(
"Setting error: ["
+ error
+ "] ... | 3.68 |
morf_SchemaValidator_validate | /**
* Validate a {@link View} meets the rules
*
* @param view The {@link View} to validate
*/
public void validate(View view) {
validateView(view);
checkForValidationErrors();
} | 3.68 |
hbase_PrivateCellUtil_qualifierStartsWith | /**
* Finds if the start of the qualifier part of the Cell matches <code>buf</code>
* @param left the cell with which we need to match the qualifier
* @param startsWith the serialized keyvalue format byte[]
* @return true if the qualifier have same staring characters, false otherwise
*/
public static boolean... | 3.68 |
hadoop_Tristate_getMapping | /**
* Get the boolean mapping, if present.
* @return the boolean value, if present.
*/
public Optional<Boolean> getMapping() {
return mapping;
} | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.