name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
flink_CatalogManager_getCurrentDatabase | /**
* Gets the current database name that will be used when resolving table path.
*
* @return the current database
* @see CatalogManager#qualifyIdentifier(UnresolvedIdentifier)
*/
public String getCurrentDatabase() {
return currentDatabaseName;
} | 3.68 |
morf_InsertStatementDefaulter_addColumnDefaults | /**
* Adds the column defaults for missing columns to the {@code statement}.
*
* @param statement the statement to add to.
* @param columnsWithValues the columns for which we have values.
*/
private InsertStatement addColumnDefaults(InsertStatement statement, Set<String> columnsWithValues) {
Table table = metada... | 3.68 |
framework_TextArea_readDesign | /*
* (non-Javadoc)
*
* @see com.vaadin.ui.AbstractField#readDesign(org.jsoup.nodes.Element ,
* com.vaadin.ui.declarative.DesignContext)
*/
@Override
public void readDesign(Element design, DesignContext designContext) {
super.readDesign(design, designContext);
setValue(DesignFormatter.decodeFromTextNode(des... | 3.68 |
rocketmq-connect_AvroData_avroSchemaForUnderlyingMapEntryType | /**
* MapEntry types in connect Schemas are represented as Arrays of record.
* Return the array type from the union instead of the union itself.
*/
private static org.apache.avro.Schema avroSchemaForUnderlyingMapEntryType(
Schema schema,
org.apache.avro.Schema avroSchema) {
if (schema != null &&... | 3.68 |
framework_VAbsoluteLayout_setStyleName | /*
* (non-Javadoc)
*
* @see
* com.google.gwt.user.client.ui.UIObject#setStyleName(java.lang.String)
*/
@Override
public void setStyleName(String style) {
super.setStyleName(style);
updateStylenames(style);
addStyleName(StyleConstants.UI_LAYOUT);
} | 3.68 |
cron-utils_FieldConstraintsBuilder_withIntValueMapping | /**
* Adds integer to integer mapping. Source should be greater than destination;
*
* @param source - some int
* @param dest - some int
* @return same FieldConstraintsBuilder instance
*/
public FieldConstraintsBuilder withIntValueMapping(final int source, final int dest) {
intMapping.put(source, dest);
... | 3.68 |
hbase_MunkresAssignment_stepThree | /**
* Corresponds to step 3 of the original algorithm.
*/
private void stepThree() {
// Find the minimum uncovered cost.
float min = leastInRow[0];
for (int r = 1; r < rows; r++) {
if (leastInRow[r] < min) {
min = leastInRow[r];
}
}
// Add the minimum cost to each of the costs in a covered ro... | 3.68 |
hbase_BinaryComponentComparator_parseFrom | /**
* Parse a serialized representation of {@link BinaryComponentComparator}
* @param pbBytes A pb serialized {@link BinaryComponentComparator} instance
* @return An instance of {@link BinaryComponentComparator} made from <code>bytes</code>
* @throws DeserializationException if an error occurred
* @see #toByteArra... | 3.68 |
flink_WatermarkStrategy_withWatermarkAlignment | /**
* Creates a new {@link WatermarkStrategy} that configures the maximum watermark drift from
* other sources/tasks/partitions in the same watermark group. The group may contain completely
* independent sources (e.g. File and Kafka).
*
* <p>Once configured Flink will "pause" consuming from a source/task/partition... | 3.68 |
hudi_AvroSchemaUtils_isValidEvolutionOf | /**
* Validate whether the {@code targetSchema} is a valid evolution of {@code sourceSchema}.
* Basically {@link #isCompatibleProjectionOf(Schema, Schema)} but type promotion in the
* opposite direction
*/
public static boolean isValidEvolutionOf(Schema sourceSchema, Schema targetSchema) {
return (sourceSchema.ge... | 3.68 |
flink_DataStream_assignTimestampsAndWatermarks | /**
* Assigns timestamps to the elements in the data stream and creates watermarks based on events,
* to signal event time progress.
*
* <p>This method uses the deprecated watermark generator interfaces. Please switch to {@link
* #assignTimestampsAndWatermarks(WatermarkStrategy)} to use the new interfaces instead.... | 3.68 |
zxing_PDF417ErrorCorrection_generateErrorCorrection | /**
* Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E).
*
* @param dataCodewords the data codewords
* @param errorCorrectionLevel the error correction level (0-8)
* @return the String representing the error correction codewords
*/
static String generateErrorCorrection(Cha... | 3.68 |
querydsl_Alias_var | /**
* Create a new variable path
*
* @param arg alias
* @return expression
*/
public static StringPath var(String arg) {
return Expressions.stringPath(arg.replace(' ', '_'));
} | 3.68 |
framework_AbstractMedia_setAltText | /**
* Sets the alternative text to be displayed if the browser does not support
* HTML5. This text is rendered as HTML if
* {@link #setHtmlContentAllowed(boolean)} is set to true. With HTML
* rendering, this method can also be used to implement fallback to a
* flash-based player, see the <a href=
* "https://devel... | 3.68 |
morf_DatabaseMetaDataProvider_createColumnsFrom | /**
* Creates a list of table columns from given columns and map of primary key columns.
* Also reorders the primary key columns between themselves to reflect the order of columns within the primary key.
*
* @param originalColumns Collection of table columns to work with.
* @param primaryKey Map of respective posi... | 3.68 |
rocketmq-connect_JsonConverter_convertToJsonWithoutEnvelope | /**
* convert to json without envelop
*
* @param schema
* @param value
* @return
*/
private Object convertToJsonWithoutEnvelope(Schema schema, Object value) {
return convertToJson(schema, value);
} | 3.68 |
morf_SelectStatement_union | /**
* Perform an UNION set operation with another {@code selectStatement},
* eliminating any duplicate rows.
*
* <p>It is possible to have more than one union statement by chaining union calls:</p>
* <blockquote><pre>
* SelectStatement stmtA = select(...).from(...);
* SelectStatement stmtB = select(...).from(...... | 3.68 |
flink_FieldAccessorFactory_getAccessor | /**
* Creates a {@link FieldAccessor} for the field that is given by a field expression, which can
* be used to get and set the specified field on instances of this type.
*
* @param field The field expression
* @param config Configuration object
* @param <F> The type of the field to access
* @return The created ... | 3.68 |
flink_StreamExecutionEnvironment_isUnalignedCheckpointsEnabled | /** Returns whether unaligned checkpoints are enabled. */
@PublicEvolving
public boolean isUnalignedCheckpointsEnabled() {
return checkpointCfg.isUnalignedCheckpointsEnabled();
} | 3.68 |
hudi_InternalSchemaCache_searchSchemaAndCache | /**
* Search internalSchema based on versionID.
* first step: try to get internalSchema from hoodie commit files, we no need to add lock.
* if we cannot get internalSchema by first step, then we try to get internalSchema from cache.
*
* @param versionID schema version_id need to search
* @param metaClient current... | 3.68 |
framework_ComboBoxScrollingWithArrows_setup | /*
* (non-Javadoc)
*
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@Override
protected void setup(VaadinRequest request) {
VerticalLayout layout = new VerticalLayout();
addComponent(layout);
addComboBox(layout);
} | 3.68 |
flink_CheckpointConfig_setForceCheckpointing | /**
* Checks whether checkpointing is forced, despite currently non-checkpointable iteration
* feedback.
*
* @param forceCheckpointing The flag to force checkpointing.
* @deprecated This will be removed once iterations properly participate in checkpointing.
*/
@Deprecated
@PublicEvolving
public void setForceCheck... | 3.68 |
morf_Upgrade_getUpgradeAuditRowCount | /**
* Provides a number of already applied upgrade steps.
* @return the number of upgrade steps from the UpgradeAudit table
*/
long getUpgradeAuditRowCount(ResultSetProcessor<Long> processor) {
SelectStatement selectStatement = selectUpgradeAuditTableCount();
long appliedUpgradeStepsCount = -1;
try {
SqlSc... | 3.68 |
dubbo_Parameters_getExtension | /**
* @deprecated will be removed in 3.3.0
*/
@Deprecated
public <T> T getExtension(Class<T> type, String key, String defaultValue) {
String name = getParameter(key, defaultValue);
return ExtensionLoader.getExtensionLoader(type).getExtension(name);
} | 3.68 |
framework_VOverlay_setOverlayContainerLabel | /**
* Set the label of the container element, where tooltip, notification and
* dialogs are added to.
*
* @param applicationConnection
* the application connection for which to change the label
* @param overlayContainerLabel
* label for the container
*/
public static void setOverlayContain... | 3.68 |
hadoop_OBSCommonUtils_uploadPart | /**
* Upload part of a multi-partition file. Increments the write and put
* counters. <i>Important: this call does not close any input stream in the
* request.</i>
*
* @param owner the owner OBSFileSystem instance
* @param request request
* @return the result of the operation.
* @throws ObsException on proble... | 3.68 |
framework_Design_findClassWithAnnotation | /**
* Find the first class with the given annotation, starting the search from
* the given class and moving upwards in the class hierarchy.
*
* @param componentClass
* the class to check
* @param annotationClass
* the annotation to look for
* @return the first class with the given annotati... | 3.68 |
open-banking-gateway_WebDriverBasedAccountInformation_sandbox_anton_brueckner_clicks_redirect_back_to_tpp_button_api_localhost_cookie_only | // Sending cookie with last request as it doesn't exist in browser for API tests
// null for cookieDomain is the valid value for localhost tests. This works correctly for localhost.
public SELF sandbox_anton_brueckner_clicks_redirect_back_to_tpp_button_api_localhost_cookie_only(WebDriver driver, String authSessionCooki... | 3.68 |
framework_TabSheetScrollOnTabClose_setup | /*
* (non-Javadoc)
*
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@Override
protected void setup(VaadinRequest request) {
final TabSheet tabSheet = new TabSheet();
for (int i = 0; i < 10; i++) {
Tab tab = tabSheet.addTab(new CssLayout(), "tab " + i)... | 3.68 |
hudi_AbstractTableFileSystemView_ensurePartitionLoadedCorrectly | /**
* Allows lazily loading the partitions if needed.
*
* @param partition partition to be loaded if not present
*/
private void ensurePartitionLoadedCorrectly(String partition) {
ValidationUtils.checkArgument(!isClosed(), "View is already closed");
// ensure we list files only once even in the face of concur... | 3.68 |
flink_LimitedConnectionsFileSystem_unregisterInputStream | /**
* Atomically removes the given input stream from the set of currently open input streams, and
* signals that new stream can now be opened.
*/
void unregisterInputStream(InStream stream) {
lock.lock();
try {
// only decrement if we actually remove the stream
if (openInputStreams.remove(str... | 3.68 |
hbase_MasterRpcServices_getTableDescriptors | /**
* Get list of TableDescriptors for requested tables.
* @param c Unused (set to null).
* @param req GetTableDescriptorsRequest that contains: - tableNames: requested tables, or if
* empty, all are requested.
*/
@Override
public GetTableDescriptorsResponse getTableDescriptors(RpcController c,
GetT... | 3.68 |
morf_ExceptSetOperator_getSelectStatement | /**
* {@inheritDoc}
*
* @see org.alfasoftware.morf.sql.SetOperator#getSelectStatement()
*/
@Override
public SelectStatement getSelectStatement() {
return selectStatement;
} | 3.68 |
hbase_Bytes_len | /**
* Returns length of the byte array, returning 0 if the array is null. Useful for calculating
* sizes.
* @param b byte array, which can be null
* @return 0 if b is null, otherwise returns length
*/
final public static int len(byte[] b) {
return b == null ? 0 : b.length;
} | 3.68 |
flink_SharedSlot_cancelLogicalSlotRequest | /**
* Cancels a logical slot request.
*
* <p>If the logical slot request is already complete, nothing happens because the logical slot
* is already given to the execution and it the responsibility of the execution to call {@link
* #returnLogicalSlot(LogicalSlot)}.
*
* <p>If the logical slot request is not comple... | 3.68 |
hadoop_HdfsFileStatus_getFullName | /**
* Get the string representation of the full path name.
* @param parent the parent path
* @return the full path in string
*/
default String getFullName(String parent) {
if (isEmptyLocalName()) {
return parent;
}
StringBuilder fullName = new StringBuilder(parent);
if (!parent.endsWith(Path.SEPARATOR)... | 3.68 |
flink_DiskCacheManager_flushBuffers | /**
* Note that the request of flushing buffers may come from the disk check thread or the task
* thread, so the method itself should ensure the thread safety.
*/
private synchronized void flushBuffers(boolean forceFlush) {
if (!forceFlush && !hasFlushCompleted.isDone()) {
return;
}
List<Partitio... | 3.68 |
flink_TableFunctionCollector_setCollector | /** Sets the current collector, which used to emit the final row. */
public void setCollector(Collector<?> collector) {
this.collector = collector;
} | 3.68 |
hadoop_MapReduceJobPropertiesParser_getLatestKeyName | // Finds a corresponding key for the specified key in the current mapreduce
// setup.
// Note that this API uses a cached copy of the Configuration object. This is
// purely for performance reasons.
private String getLatestKeyName(String key) {
// set the specified key
configuration.set(key, key);
try {
// ch... | 3.68 |
hadoop_AuxiliaryService_setRecoveryPath | /**
* Set the path for this auxiliary service to use for storing state
* that will be used during recovery.
*
* @param recoveryPath where recoverable state should be stored
*/
public void setRecoveryPath(Path recoveryPath) {
this.recoveryPath = recoveryPath;
} | 3.68 |
framework_ConnectorEvent_getConnector | /**
* Returns the connector that fired the event.
*
* @return the source connector
*/
public ClientConnector getConnector() {
return (ClientConnector) getSource();
} | 3.68 |
flink_CheckpointConfig_configure | /**
* Sets all relevant options contained in the {@link ReadableConfig} such as e.g. {@link
* ExecutionCheckpointingOptions#CHECKPOINTING_MODE}.
*
* <p>It will change the value of a setting only if a corresponding option was set in the {@code
* configuration}. If a key is not present, the current value of a field ... | 3.68 |
flink_DataStream_getId | /**
* Returns the ID of the {@link DataStream} in the current {@link StreamExecutionEnvironment}.
*
* @return ID of the DataStream
*/
@Internal
public int getId() {
return transformation.getId();
} | 3.68 |
flink_BeamPythonFunctionRunner_getWindowCoderProto | /** Gets the proto representation of the window coder. */
private RunnerApi.Coder getWindowCoderProto() {
return RunnerApi.Coder.newBuilder()
.setSpec(
RunnerApi.FunctionSpec.newBuilder()
.setUrn(ModelCoders.GLOBAL_WINDOW_CODER_URN)
... | 3.68 |
flink_AvailabilityProvider_isAvailable | /**
* In order to best-effort avoid volatile access in {@link CompletableFuture#isDone()}, we check
* the condition of <code>future == AVAILABLE</code> firstly for getting probable performance
* benefits while hot looping.
*
* <p>It is always safe to use this method in performance nonsensitive scenarios to get the... | 3.68 |
hadoop_RouterDistCpProcedure_enableWrite | /**
* Enable write.
*/
@Override
protected void enableWrite() throws IOException {
// do nothing.
} | 3.68 |
hbase_OutputSink_startWriterThreads | /**
* Start the threads that will pump data from the entryBuffers to the output files.
*/
void startWriterThreads() throws IOException {
for (int i = 0; i < numThreads; i++) {
WriterThread t = new WriterThread(controller, entryBuffers, this, i);
t.start();
writerThreads.add(t);
}
} | 3.68 |
dubbo_SlidingWindow_currentPane | /**
* Get the pane at the specified timestamp in milliseconds.
*
* @param timeMillis a timestamp in milliseconds.
* @return the pane at the specified timestamp if the time is valid; null if time is invalid.
*/
public Pane<T> currentPane(long timeMillis) {
if (timeMillis < 0) {
return null;
}
i... | 3.68 |
pulsar_Schema_AUTO_CONSUME | /**
* Create a schema instance that automatically deserialize messages
* based on the current topic schema.
*
* <p>The messages values are deserialized into a {@link GenericRecord} object,
* that extends the {@link GenericObject} interface.
*
* @return the auto schema instance
*/
static Schema<GenericRecord> AU... | 3.68 |
hbase_CatalogFamilyFormat_getSeqNumDuringOpen | /**
* The latest seqnum that the server writing to meta observed when opening the region. E.g. the
* seqNum when the result of {@link getServerName} was written.
* @param r Result to pull the seqNum from
* @return SeqNum, or HConstants.NO_SEQNUM if there's no value written.
*/
private static long getSeqNumDuringOp... | 3.68 |
querydsl_JDOExpressions_select | /**
* Create a new detached {@link JDOQuery} instance with the given projection
*
* @param exprs projection
* @return select(exprs)
*/
public static JDOQuery<Tuple> select(Expression<?>... exprs) {
return new JDOQuery<Void>().select(exprs);
} | 3.68 |
hadoop_AbstractSchedulerPlanFollower_arePlanResourcesLessThanReservations | /**
* Check if plan resources are less than expected reservation resources.
*/
private boolean arePlanResourcesLessThanReservations(
ResourceCalculator rescCalculator, Resource clusterResources,
Resource planResources, Resource reservedResources) {
return Resources.greaterThan(rescCalculator, clusterResourc... | 3.68 |
hbase_SortedCompactionPolicy_skipLargeFiles | /**
* @param candidates pre-filtrate
* @return filtered subset exclude all files above maxCompactSize Also save all references. We
* MUST compact them
*/
protected ArrayList<HStoreFile> skipLargeFiles(ArrayList<HStoreFile> candidates,
boolean mayUseOffpeak) {
int pos = 0;
while (
pos < candidates.... | 3.68 |
pulsar_AuthenticationDataSource_authenticate | /**
* Evaluate and challenge the data that passed in, and return processed data back.
* It is used for mutual authentication like SASL.
* NOTE: this method is not called by the Pulsar authentication framework.
* @deprecated use {@link AuthenticationProvider} or {@link AuthenticationState}.
*/
@Deprecated
default A... | 3.68 |
AreaShop_BuyRegion_getMoneyBackPercentage | /**
* Get the moneyBack percentage.
* @return The % of money the player will get back when selling
*/
public double getMoneyBackPercentage() {
return Utils.evaluateToDouble(getStringSetting("buy.moneyBack"), this);
} | 3.68 |
hadoop_TextSplitter_stringToBigDecimal | /**
* Return a BigDecimal representation of string 'str' suitable for use
* in a numerically-sorting order.
*/
BigDecimal stringToBigDecimal(String str) {
BigDecimal result = BigDecimal.ZERO;
BigDecimal curPlace = ONE_PLACE; // start with 1/65536 to compute the first digit.
int len = Math.min(str.length(), MA... | 3.68 |
hbase_FileLink_getLocations | /** Returns the locations to look for the linked file. */
public Path[] getLocations() {
return locations;
} | 3.68 |
druid_DruidAbstractDataSource_setNumTestsPerEvictionRun | /**
* @param numTestsPerEvictionRun
*/
@Deprecated
public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun) {
this.numTestsPerEvictionRun = numTestsPerEvictionRun;
} | 3.68 |
dubbo_Server_setWelcome | /**
* welcome message
*/
public void setWelcome(String welcome) {
this.welcome = welcome;
} | 3.68 |
morf_SchemaUtils_table | /**
* Build a {@link Table}.
* <p>
* Use {@link TableBuilder#columns(Column...)} to provide columns and
* {@link TableBuilder#indexes(Index...)} to provide indexes.
* </p>
*
* @param name The name of the table.
* @return A new {@link TableBuilder} for the table.
*/
public static TableBuilder table(String name)... | 3.68 |
flink_SkipListKeySerializer_serializeNamespace | /** Serialize the namespace to bytes. */
byte[] serializeNamespace(N namespace) {
outputStream.reset();
try {
namespaceSerializer.serialize(namespace, outputView);
} catch (IOException e) {
throw new RuntimeException("serialize namespace failed", e);
}
return outputStream.toByteArray... | 3.68 |
hadoop_CommitUtils_verifyIsS3AFS | /**
* Verify that an FS is an S3A FS.
* @param fs filesystem
* @param path path to to use in exception
* @return the typecast FS.
* @throws PathCommitException if the FS is not an S3A FS.
*/
public static S3AFileSystem verifyIsS3AFS(FileSystem fs, Path path)
throws PathCommitException {
if (!(fs instanceof ... | 3.68 |
hbase_ProcedureExecutor_executeProcedure | // ==========================================================================
// Executions
// ==========================================================================
private void executeProcedure(Procedure<TEnvironment> proc) {
if (proc.isFinished()) {
LOG.debug("{} is already finished, skipping execution", p... | 3.68 |
dubbo_RegistryDirectory_toRouters | /**
* @param urls
* @return null : no routers ,do nothing
* else :routers list
*/
private Optional<List<Router>> toRouters(List<URL> urls) {
if (urls == null || urls.isEmpty()) {
return Optional.empty();
}
List<Router> routers = new ArrayList<>();
for (URL url : urls) {
if (EMPTY_PR... | 3.68 |
querydsl_DefaultEvaluatorFactory_createEvaluator | /**
* Create an Evaluator for the given sources and the given optional filter
*
* @param metadata query metadata
* @param joins joins
* @param filter where condition
* @return evaluator
*/
public Evaluator<List<Object[]>> createEvaluator(QueryMetadata metadata,
List<JoinExpression> joins, @Nullable Predi... | 3.68 |
hadoop_AutoRefreshNoHARMFailoverProxyProvider_performFailover | /**
* Stop the current proxy when performFailover.
* @param currentProxy currentProxy.
*/
@Override
public synchronized void performFailover(T currentProxy) {
RPC.stopProxy(proxy);
proxy = null;
} | 3.68 |
hbase_BackupRestoreFactory_getBackupCopyJob | /**
* Gets backup copy job
* @param conf configuration
* @return backup copy job instance
*/
public static BackupCopyJob getBackupCopyJob(Configuration conf) {
Class<? extends BackupCopyJob> cls = conf.getClass(HBASE_BACKUP_COPY_IMPL_CLASS,
MapReduceBackupCopyJob.class, BackupCopyJob.class);
BackupCopyJob s... | 3.68 |
pulsar_KubernetesServiceAccountTokenAuthProvider_updateAuthData | /**
* No need to update anything. Kubernetes updates the token used for authentication.
*/
@Override
public Optional<FunctionAuthData> updateAuthData(Function.FunctionDetails funcDetails,
Optional<FunctionAuthData> existingFunctionAuthData,
... | 3.68 |
hbase_MetricsMaster_setNumRegionSizeReports | /**
* Sets the number of region size reports the master currently has in memory.
* @see MetricsMasterQuotaSource#updateNumCurrentSpaceQuotaRegionSizeReports(long)
*/
public void setNumRegionSizeReports(final long numRegionReports) {
masterQuotaSource.updateNumCurrentSpaceQuotaRegionSizeReports(numRegionReports);
} | 3.68 |
hibernate-validator_TypeHelper_parameterizedType | /**
* Creates a parameterized type for the specified raw type and actual type arguments.
*
* @param rawType the raw type
* @param actualTypeArguments the actual type arguments
*
* @return the parameterized type
*
* @throws MalformedParameterizedTypeException if the number of actual type arguments differs from t... | 3.68 |
graphhopper_BitUtil_toSignedInt | /**
* Converts the specified long back into a signed int (reverse method for toUnsignedLong)
*/
public static int toSignedInt(long x) {
return (int) x;
} | 3.68 |
rocketmq-connect_Worker_checkAndTransitionToConnectors | /**
* check and transition to connectors
*
* @param assigns
*/
private void checkAndTransitionToConnectors(Map<String, ConnectKeyValue> assigns) {
if (assigns == null || assigns.isEmpty()) {
return;
}
for (String connectName : assigns.keySet()) {
if (!connectors.containsKey(connectName)... | 3.68 |
flink_AbstractKubernetesStepDecorator_buildAccompanyingKubernetesResources | /**
* Note that the method could have a side effect of modifying the Flink Configuration object,
* such as update the JobManager address.
*/
@Override
public List<HasMetadata> buildAccompanyingKubernetesResources() throws IOException {
return Collections.emptyList();
} | 3.68 |
flink_SchedulerNG_updateJobResourceRequirements | /**
* Update {@link JobResourceRequirements job resource requirements}.
*
* @param jobResourceRequirements new resource requirements
*/
default void updateJobResourceRequirements(JobResourceRequirements jobResourceRequirements) {
throw new UnsupportedOperationException(
String.format(
... | 3.68 |
hbase_DeletionListener_hasException | /**
* Check if an exception has occurred when re-setting the watch.
* @return True if we were unable to re-set a watch on a ZNode due to an exception.
*/
public boolean hasException() {
return exception != null;
} | 3.68 |
framework_Table_isColumnCollapsible | /**
* Checks if the given column is collapsible. Note that even if this method
* returns <code>true</code>, the column can only be actually collapsed (via
* UI or with {@link #setColumnCollapsed(Object, boolean)
* setColumnCollapsed()}) if {@link #isColumnCollapsingAllowed()} is also
* true.
*
* @return true if ... | 3.68 |
graphhopper_AbstractBidirAlgo_finished | // http://www.cs.princeton.edu/courses/archive/spr06/cos423/Handouts/EPP%20shortest%20path%20algorithms.pdf
// a node from overlap may not be on the best path!
// => when scanning an arc (v, w) in the forward search and w is scanned in the reverseOrder
// search, update extractPath = μ if df (v) + (v, w) + dr (w) < ... | 3.68 |
rocketmq-connect_LogReporter_message | /**
* format error message
*
* @param context
* @return
*/
String message(ProcessingContext context) {
return String.format("Error encountered in task %s. %s", id.toString(),
context.toString(deadLetterQueueConfig.includeRecordDetailsInErrorLog()));
} | 3.68 |
dubbo_TriHttp2RemoteFlowController_writeError | /**
* Discards this {@link FlowControlled}, writing an error. If this frame is in the pending queue,
* the unwritten bytes are removed from this branch of the priority tree.
*/
private void writeError(FlowControlled frame, Http2Exception cause) {
assert ctx != null;
decrementPendingBytes(frame.size(), true);... | 3.68 |
hbase_Segment_maybeCloneWithAllocator | /**
* If the segment has a memory allocator the cell is being cloned to this space, and returned;
* otherwise the given cell is returned When a cell's size is too big (bigger than maxAlloc), it
* is not allocated on MSLAB. Since the process of flattening to CellChunkMap assumes that all
* cells are allocated on MSL... | 3.68 |
pulsar_Reflections_createInstance | /**
* Create an instance of <code>userClassName</code> using provided <code>classLoader</code>.
*
* @param userClassName user class name
* @param classLoader class loader to load the class.
* @return the instance
*/
public static Object createInstance(String userClassName,
Clas... | 3.68 |
hbase_CommonFSUtils_validateRootPath | /**
* Verifies root directory path is a valid URI with a scheme
* @param root root directory path
* @return Passed <code>root</code> argument.
* @throws IOException if not a valid URI with a scheme
*/
public static Path validateRootPath(Path root) throws IOException {
try {
URI rootURI = new URI(root.toStrin... | 3.68 |
hadoop_NodePlan_setNodeUUID | /**
* Sets the Node UUID.
*
* @param nodeUUID - UUID of the node.
*/
public void setNodeUUID(String nodeUUID) {
this.nodeUUID = nodeUUID;
} | 3.68 |
hudi_HoodieBackedTableMetadataWriter_listAllPartitionsFromFilesystem | /**
* Function to find hoodie partitions and list files in them in parallel.
*
* @param initializationTime Files which have a timestamp after this are neglected
* @return List consisting of {@code DirectoryInfo} for each partition found.
*/
private List<DirectoryInfo> listAllPartitionsFromFilesystem(String initial... | 3.68 |
framework_StaticSection_setText | /**
* Sets the textual caption of this cell.
*
* @param text
* a plain text caption, not null
*/
public void setText(String text) {
Objects.requireNonNull(text, "text cannot be null");
removeComponentIfPresent();
cellState.text = text;
cellState.type = GridStaticCellType.TEXT;
row.se... | 3.68 |
morf_SqlDialect_getGreatestFunctionName | /**
* @return The name of the GREATEST function
*/
protected String getGreatestFunctionName() {
return "GREATEST";
} | 3.68 |
hadoop_AccessTokenTimer_setExpiresIn | /**
* Set when the access token will expire as reported by the oauth server,
* ie in seconds from now.
* @param expiresIn Access time expiration as reported by OAuth server
*/
public void setExpiresIn(String expiresIn) {
this.nextRefreshMSSinceEpoch = convertExpiresIn(timer, expiresIn);
} | 3.68 |
hbase_ReplicationSink_processReplicationMarkerEntry | /*
* First check if config key hbase.regionserver.replication.sink.tracker.enabled is true or not.
* If false, then ignore this cell. If set to true, de-serialize value into
* ReplicationTrackerDescriptor. Create a Put mutation with regionserver name, walname, offset and
* timestamp from ReplicationMarkerDescriptor... | 3.68 |
hadoop_JobBase_setDoubleValue | /**
* Set the given counter to the given value
*
* @param name
* the counter name
* @param value
* the value for the counter
*/
protected void setDoubleValue(Object name, double value) {
this.doubleCounters.put(name, new Double(value));
} | 3.68 |
flink_FileCatalogStore_contains | /**
* Returns whether the specified catalog exists in the catalog store.
*
* @param catalogName the name of the catalog to check
* @return {@code true} if the catalog exists in the catalog store, {@code false} otherwise
* @throws CatalogException if the catalog store is not open or if there is an error checking
*... | 3.68 |
hadoop_AbfsOutputStreamStatisticsImpl_blockReleased | /**
* Increment the counter to indicate a block has been released.
*/
@Override
public void blockReleased() {
blocksReleased.incrementAndGet();
} | 3.68 |
framework_VScrollTable_calculateMaxIndent | /**
* This method exists for the needs of {@link VTreeTable} only. May be
* removed or replaced in the future.<br>
* <br>
* Calculates the maximum indent of the hierarcyColumn, if applicable.
*/
protected void calculateMaxIndent() {
// NOP
} | 3.68 |
hbase_MetricsConnection_getScope | /**
* Returns the scope for a MetricsConnection based on the configured {@link #METRICS_SCOPE_KEY} or
* by generating a default from the passed clusterId and connectionObj's hashCode.
* @param conf configuration for the connection
* @param clusterId clusterId for the connection
* @param connectionObj ... | 3.68 |
hadoop_AbstractConfigurableFederationPolicy_getPolicyInfo | /**
* Getter method for the configuration weights.
*
* @return the {@link WeightedPolicyInfo} representing the policy
* configuration.
*/
public WeightedPolicyInfo getPolicyInfo() {
return policyInfo;
} | 3.68 |
flink_IOManager_createChannelEnumerator | /**
* Creates a new {@link Enumerator}, spreading the channels in a round-robin fashion across the
* temporary file directories.
*
* @return An enumerator for channels.
*/
public Enumerator createChannelEnumerator() {
return fileChannelManager.createChannelEnumerator();
} | 3.68 |
hbase_HRegion_getStoreFiles | /** Returns Map of StoreFiles by column family */
private NavigableMap<byte[], List<Path>> getStoreFiles() {
NavigableMap<byte[], List<Path>> allStoreFiles = new TreeMap<>(Bytes.BYTES_COMPARATOR);
for (HStore store : stores.values()) {
Collection<HStoreFile> storeFiles = store.getStorefiles();
if (storeFile... | 3.68 |
rocketmq-connect_AbstractConnectController_putConnectorConfig | /**
* add connector
*
* @param connectorName
* @param configs
* @return
* @throws Exception
*/
public String putConnectorConfig(String connectorName, ConnectKeyValue configs) throws Exception {
return configManagementService.putConnectorConfig(connectorName, configs);
} | 3.68 |
hbase_ProcedureUtil_convertToProtoProcedure | /**
* Helper to convert the procedure to protobuf.
* <p/>
* Used by ProcedureStore implementations.
*/
public static ProcedureProtos.Procedure convertToProtoProcedure(Procedure<?> proc)
throws IOException {
Preconditions.checkArgument(proc != null);
validateClass(proc);
final ProcedureProtos.Procedure.Buil... | 3.68 |
hmily_HmilyTacDatasourceConfig_dataSource | /**
* Data source data source.
*
* @return the data source
*/
@Bean
@Primary
public DataSource dataSource() {
HikariDataSource hikariDataSource = new HikariDataSource();
hikariDataSource.setJdbcUrl(dataSourceProperties.getUrl());
hikariDataSource.setDriverClassName(dataSourceProperties.getDriverClassNam... | 3.68 |
hadoop_DockerCommand_preparePrivilegedOperation | /**
* Prepare the privileged operation object that will be used to invoke
* the container-executor.
*
* @param dockerCommand Specific command to be run by docker.
* @param containerName
* @param env
* @param nmContext
* @return Returns the PrivilegedOperation object to be used.
* @throws ContainerExecutionExce... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.