name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
framework_TabSheet_isTabCaptionsAsHtml | /**
* Checks whether HTML is allowed in the tab captions.
* <p>
* The default is false, i.e. render tab captions as plain text
*
* @return true if the tab captions are rendered as HTML, false if rendered
* as plain text
* @since 7.4
*/
public boolean isTabCaptionsAsHtml() {
return getState(false).ta... | 3.68 |
morf_UnsupportedDatabaseTestRule_apply | /**
* @see org.junit.rules.TestRule#apply(org.junit.runners.model.Statement,
* org.junit.runner.Description)
*/
@Override
public Statement apply(Statement base, Description description) {
return unsupportedTests.contains(description.getMethodName()) ? new UnsupportedDatabaseTestStatement(description) : base;
... | 3.68 |
morf_DeleteStatement_getTable | /**
* Gets the table being deleted from.
*
* @return the table being inserted into
*/
public TableReference getTable() {
return table;
} | 3.68 |
flink_OperatorIDGenerator_fromUid | /**
* Generate {@link OperatorID}'s from {@code uid}'s.
*
* <p>{@link
* org.apache.flink.streaming.api.graph.StreamGraphHasherV2#traverseStreamGraphAndGenerateHashes(StreamGraph)}
*
* @param uid {@code DataStream} operator uid.
* @return corresponding {@link OperatorID}
*/
public static OperatorID fromUid(Strin... | 3.68 |
flink_RocksDBNativeMetricOptions_enableBlockCachePinnedUsage | /** Returns the memory size for the entries being pinned in block cache. */
public void enableBlockCachePinnedUsage() {
this.properties.add(RocksDBProperty.BlockCachePinnedUsage.getRocksDBProperty());
} | 3.68 |
flink_MailboxProcessor_suspendDefaultAction | /**
* Calling this method signals that the mailbox-thread should (temporarily) stop invoking the
* default action, e.g. because there is currently no input available.
*/
private MailboxDefaultAction.Suspension suspendDefaultAction(
@Nullable PeriodTimer suspensionTimer) {
checkState(
mailbox... | 3.68 |
MagicPlugin_Base64Coder_decodeString | /**
* Decodes a string from Base64 format.
* No blanks or line breaks are allowed within the Base64 encoded input data.
*
* @param s A Base64 String to be decoded.
* @return A String containing the decoded data.
* @throws IllegalArgumentException If the input is not valid Base64 encoded data.
*/
public static St... | 3.68 |
framework_ContainerOrderedWrapper_removeContainerProperty | /**
* Removes the specified Property from the underlying container and from the
* ordering.
* <p>
* Note : The Property will be removed from all the Items in the Container.
* </p>
*
* @param propertyId
* the ID of the Property to remove.
* @return <code>true</code> if the operation succeeded, <code>... | 3.68 |
hadoop_BlockBlobAppendStream_hflush | /**
* Force all data in the output stream to be written to Azure storage.
* Wait to return until this is complete.
*/
@Override
public void hflush() throws IOException {
// when block compaction is disabled, hflush is empty function
if (compactionEnabled) {
flush();
}
} | 3.68 |
flink_PushCalcPastChangelogNormalizeRule_transformWithRemainingPredicates | /**
* Transforms the {@link RelOptRuleCall} to use {@param changelogNormalize} as the new input to
* a {@link StreamPhysicalCalc} which uses {@param predicates} for the condition.
*/
private void transformWithRemainingPredicates(
RelOptRuleCall call,
StreamPhysicalChangelogNormalize changelogNormaliz... | 3.68 |
framework_HierarchicalContainer_isRoot | /*
* Is the Item corresponding to the given ID a root node? Don't add a
* JavaDoc comment here, we use the default documentation from implemented
* interface.
*/
@Override
public boolean isRoot(Object itemId) {
// If the container is filtered the itemId must be among filteredRoots
// to be a root.
if (f... | 3.68 |
framework_VCalendarPanel_focusNextYear | /**
* Selects the next year
*/
private void focusNextYear(int years) {
if (focusedDate == null) {
return;
}
Date nextYearDate = (Date) focusedDate.clone();
nextYearDate.setYear(nextYearDate.getYear() + years);
// Do not focus if not inside range
if (!isDateInsideRange(nextYearDate, Re... | 3.68 |
hadoop_Service_toString | /**
* Get the name of a state
* @return the state's name
*/
@Override
public String toString() {
return statename;
}
}
/**
* Initialize the service.
*
* The transition MUST be from {@link STATE#NOTINITED} to {@link STATE#INITED}
* unless the operation failed and an ... | 3.68 |
AreaShop_FileManager_checkForInactiveRegions | /**
* Check all regions and unrent/sell them if the player is inactive for too long.
*/
public void checkForInactiveRegions() {
Do.forAll(
plugin.getConfig().getInt("inactive.regionsPerTick"),
getRegions(),
GeneralRegion::checkInactive
);
} | 3.68 |
hbase_ByteBufferUtils_hashCode | /**
* ByteBuffer to hash offset to start from length to hash
*/
public static int hashCode(ByteBuffer buf, int offset, int length) {
int hash = 1;
for (int i = offset; i < offset + length; i++) {
hash = (31 * hash) + (int) toByte(buf, i);
}
return hash;
} | 3.68 |
framework_HasStyleNames_setStyleName | /**
* Adds or removes a style name. Multiple styles can be specified as a
* space-separated list of style names.
*
* If the {@code add} parameter is true, the style name is added to the
* component. If the {@code add} parameter is false, the style name is
* removed from the component.
* <p>
* Functionally this ... | 3.68 |
morf_AbstractSqlDialectTest_shouldGenerateCorrectSqlForMathOperations14 | /**
* Test for proper SQL mathematics operation generation from DSL expressions.
* <p>
* Bracket should be generated for subexpression "b+c". Even without explicit
* {@link org.alfasoftware.morf.sql.SqlUtils#bracket(MathsField)} call.
* </p>
*/
@Test
public void shouldGenerateCorrectSqlForMathOperations14() {
S... | 3.68 |
flink_GroupCombineOperatorBase_setGroupOrder | /**
* Sets the order of the elements within a reduce group.
*
* @param order The order for the elements in a reduce group.
*/
public void setGroupOrder(Ordering order) {
this.groupOrder = order;
} | 3.68 |
framework_VCalendar_isEventInDay | /*
* Check if the given event occurs at the given date.
*/
private boolean isEventInDay(Date eventWhen, Date eventTo, Date gridDate) {
if (eventWhen.compareTo(gridDate) <= 0
&& eventTo.compareTo(gridDate) >= 0) {
return true;
}
return false;
} | 3.68 |
flink_ColumnStats_getMin | /**
* Returns null if this instance is constructed by {@link ColumnStats#ColumnStats(Long, Long,
* Double, Integer, Number, Number)}.
*/
public Comparable<?> getMin() {
return min;
} | 3.68 |
hadoop_OBSCommonUtils_newAppendFileRequest | /**
* Create a appendFile request. Adds the ACL and metadata
*
* @param owner the owner OBSFileSystem instance
* @param key key of object
* @param inputStream temp file or input stream
* @param recordPosition client record next append position
* @return the request
* @throws IOException a... | 3.68 |
hadoop_AzureBlobFileSystem_getDelegationToken | /**
* Get a delegation token from remote service endpoint if
* 'fs.azure.enable.kerberos.support' is set to 'true', and
* 'fs.azure.enable.delegation.token' is set to 'true'.
* @param renewer the account name that is allowed to renew the token.
* @return delegation token
* @throws IOException thrown when getting ... | 3.68 |
rocketmq-connect_ClusterManagementService_configure | /**
* Configure class with the given key-value pairs
*
* @param config can be DistributedConfig or StandaloneConfig
*/
default void configure(WorkerConfig config) {
} | 3.68 |
hadoop_SharedKeyCredentials_safeDecode | /**
* Performs safe decoding of the specified string, taking care to preserve each <code>+</code> character, rather
* than replacing it with a space character.
*
* @param stringToDecode A <code>String</code> that represents the string to decode.
* @return A <code>String</code> that represents the decoded string.
... | 3.68 |
hbase_Constraints_serializeConstraintClass | /**
* Just write the class to a String representation of the class as a key for the
* {@link TableDescriptor}
* @param clazz Constraint class to convert to a {@link TableDescriptor} key
* @return key to store in the {@link TableDescriptor}
*/
private static String serializeConstraintClass(Class<? extends Constrain... | 3.68 |
zxing_QRCodeWriter_renderResult | // Note that the input matrix uses 0 == white, 1 == black, while the output matrix uses
// 0 == black, 255 == white (i.e. an 8 bit greyscale bitmap).
private static BitMatrix renderResult(QRCode code, int width, int height, int quietZone) {
ByteMatrix input = code.getMatrix();
if (input == null) {
throw new Ill... | 3.68 |
MagicPlugin_PreLoadEvent_registerPlayerWarpManager | /**
* Register a PlayerWarpManager, for providing warps to be used in the Recall menu.
* The name of the manager as registered corresponds with the "allow_player_warps" map in the recall
* spell configuration.
*
* @param key The name of the manager
* @param manager The manager to add
*/
public void registerPlaye... | 3.68 |
hadoop_StageConfig_withJobAttemptTaskSubDir | /**
* Set builder value.
* @param value new value
* @return the builder
*/
public StageConfig withJobAttemptTaskSubDir(Path value) {
jobAttemptTaskSubDir = value;
return this;
} | 3.68 |
framework_ResourceLoader_getResourceUrl | /**
* Gets the absolute url of the loaded resource.
*
* @return the absolute url of the loaded resource
*/
public String getResourceUrl() {
return resourceUrl;
} | 3.68 |
graphhopper_ArrayUtil_invert | /**
* Creates a new array where each element represents the index position of this element in the given array
* or is set to -1 if this element does not appear in the input array. None of the elements of the input array may
* be equal or larger than the arrays length.
*/
public static int[] invert(int[] arr) {
... | 3.68 |
pulsar_ManagedLedgerConfig_getMetadataOperationsTimeoutSeconds | /**
*
* Ledger-Op (Create/Delete) timeout.
*
* @return
*/
public long getMetadataOperationsTimeoutSeconds() {
return metadataOperationsTimeoutSeconds;
} | 3.68 |
hbase_TableDescriptorBuilder_getFlushPolicyClassName | /**
* This gets the class associated with the flush policy which determines the stores need to be
* flushed when flushing a region. The class used by default is defined in
* org.apache.hadoop.hbase.regionserver.FlushPolicy.
* @return the class name of the flush policy for this table. If this returns null, the defau... | 3.68 |
morf_SqlDialect_getCoalesceFunctionName | /**
* @return The name of the coalesce function
*/
protected String getCoalesceFunctionName() {
return "COALESCE";
} | 3.68 |
flink_ApplicationStatus_fromJobStatus | /**
* Derives the ApplicationStatus that should be used for a job that resulted in the given job
* status. If the job is not yet in a globally terminal state, this method returns {@link
* #UNKNOWN}.
*/
public static ApplicationStatus fromJobStatus(JobStatus jobStatus) {
return JOB_STATUS_APPLICATION_STATUS_BI_M... | 3.68 |
hadoop_CommitterEventHandler_touchz | // If job commit is repeatable, then we should allow
// startCommitFile/endCommitSuccessFile/endCommitFailureFile to be written
// by other AM before.
private void touchz(Path p, boolean overwrite) throws IOException {
fs.create(p, overwrite).close();
} | 3.68 |
rocketmq-connect_AbstractKafkaSourceConnector_taskConfigs | /**
* Returns a set of configurations for Tasks based on the current configuration,
* producing at most count configurations.
*
* @param maxTasks maximum number of configurations to generate
* @return configurations for Tasks
*/
@Override
public List<KeyValue> taskConfigs(int maxTasks) {
List<Map<String, Stri... | 3.68 |
flink_DateTimeUtils_toSQLTime | /**
* Converts the internal representation of a SQL TIME (int) to the Java type used for UDF
* parameters ({@link java.sql.Time}).
*/
public static java.sql.Time toSQLTime(int v) {
// note that, in this case, can't handle Daylight Saving Time
return new java.sql.Time(v - LOCAL_TZ.getOffset(v));
} | 3.68 |
dubbo_RpcStatus_getFailedAverageElapsed | /**
* get failed average elapsed.
*
* @return failed average elapsed
*/
public long getFailedAverageElapsed() {
long failed = getFailed();
if (failed == 0) {
return 0;
}
return getFailedElapsed() / failed;
} | 3.68 |
hbase_AccessController_updateACL | /**
* Writes all table ACLs for the tables in the given Map up into ZooKeeper znodes. This is called
* to synchronize ACL changes following {@code _acl_} table updates.
*/
private void updateACL(RegionCoprocessorEnvironment e, final Map<byte[], List<Cell>> familyMap) {
Set<byte[]> entries = new TreeSet<>(Bytes.BYT... | 3.68 |
hbase_CompactionTool_compact | /**
* Execute the compaction on the specified path.
* @param path Directory path on which to run compaction.
* @param compactOnce Execute just a single step of compaction.
* @param major Request major compaction.
*/
public void compact(final Path path, final boolean compactOnce, final boolean major)
... | 3.68 |
framework_VScrollTable_getNaturalColumnWidth | /**
* Detects the natural minimum width for the column of this header cell.
* If column is resized by user or the width is defined by server the
* actual width is returned. Else the natural min width is returned.
*
* @param columnIndex
* column index hint, if -1 (unknown) it will be detected
*
* @ret... | 3.68 |
flink_ConfigOptions_defaultValue | /**
* Creates a ConfigOption with the given default value.
*
* @param value The default value for the config option
* @return The config option with the default value.
*/
public ConfigOption<T> defaultValue(T value) {
return new ConfigOption<>(key, clazz, ConfigOption.EMPTY_DESCRIPTION, value, false);
} | 3.68 |
hbase_RequestConverter_buildUpdateFavoredNodesRequest | /**
* Create a protocol buffer UpdateFavoredNodesRequest to update a list of favorednode mappings
* @param updateRegionInfos a list of favored node mappings
* @return a protocol buffer UpdateFavoredNodesRequest
*/
public static UpdateFavoredNodesRequest buildUpdateFavoredNodesRequest(
final List<Pair<RegionInfo, ... | 3.68 |
rocketmq-connect_JsonSchemaDeserializer_deserialize | /**
* deserialize
*
* @param topic
* @param isKey
* @param payload
* @return
*/
@Override
public JsonSchemaAndValue deserialize(String topic, boolean isKey, byte[] payload) {
if (payload == null) {
return null;
}
ByteBuffer buffer = ByteBuffer.wrap(payload);
long recordId = buffer.getLon... | 3.68 |
hadoop_IdentifierResolver_setOutputKeyClass | /**
* Sets the output key class class.
*/
protected void setOutputKeyClass(Class outputKeyClass) {
this.outputKeyClass = outputKeyClass;
} | 3.68 |
morf_AbstractSqlDialectTest_expectedSelectModSQL | /**
* @return The expected SQL for the MOD operator.
*/
protected String expectedSelectModSQL() {
return "SELECT MOD(intField, 5) FROM " + tableName(TEST_TABLE);
} | 3.68 |
framework_AbsoluteLayout_setTopUnits | /**
* Sets the unit for the 'top' attribute.
*
* @param topUnits
* See {@link Sizeable} UNIT_SYMBOLS for a description of the
* available units.
*/
public void setTopUnits(Unit topUnits) {
this.topUnits = topUnits;
markAsDirty();
} | 3.68 |
hbase_HMaster_getBackupMasterInfoPort | /**
* @param sn is ServerName of the backup master
* @return info port of backup master or 0 if any exception occurs.
*/
public int getBackupMasterInfoPort(final ServerName sn) {
return activeMasterManager.getBackupMasterInfoPort(sn);
} | 3.68 |
hbase_IdLock_getLockEntry | /**
* Blocks until the lock corresponding to the given id is acquired.
* @param id an arbitrary number to lock on
* @return an "entry" to pass to {@link #releaseLockEntry(Entry)} to release the lock
* @throws IOException if interrupted
*/
public Entry getLockEntry(long id) throws IOException {
Thread currentThre... | 3.68 |
framework_AbstractClientConnector_requestRepaintAll | /**
* @deprecated As of 7.0, use {@link #markAsDirtyRecursive()} instead
*/
@Override
@Deprecated
public void requestRepaintAll() {
markAsDirtyRecursive();
} | 3.68 |
pulsar_FunctionRuntimeManager_getCurrentAssignments | /**
* Get current assignments.
*
* @return a map of current assignments in the following format
* {workerId : {FullyQualifiedInstanceId : Assignment}}
*/
public synchronized Map<String, Map<String, Assignment>> getCurrentAssignments() {
Map<String, Map<String, Assignment>> copy = new HashMap<>();
for (Map.... | 3.68 |
flink_DynamicSinkUtils_convertSinkToRel | /**
* Converts a given {@link DynamicTableSink} to a {@link RelNode}. It adds helper projections if
* necessary.
*/
public static RelNode convertSinkToRel(
FlinkRelBuilder relBuilder,
RelNode input,
SinkModifyOperation sinkModifyOperation,
DynamicTableSink sink) {
return convertSi... | 3.68 |
rocketmq-connect_DebeziumSqlServerConnector_taskClass | /**
* Return the current connector class
* @return task implement class
*/
@Override
public Class<? extends Task> taskClass() {
return DebeziumSqlServerSource.class;
} | 3.68 |
hbase_MetricsConnection_incrHedgedReadWin | /** Increment the number of hedged read returned faster than the original read. */
public void incrHedgedReadWin() {
hedgedReadWin.inc();
} | 3.68 |
hbase_CloneSnapshotProcedure_preCloneSnapshot | /**
* Action before cloning from snapshot.
* @param env MasterProcedureEnv
*/
private void preCloneSnapshot(final MasterProcedureEnv env)
throws IOException, InterruptedException {
if (!getTableName().isSystemTable()) {
// Check and update namespace quota
final MasterFileSystem mfs = env.getMasterService... | 3.68 |
flink_JobResult_toJobExecutionResult | /**
* Converts the {@link JobResult} to a {@link JobExecutionResult}.
*
* @param classLoader to use for deserialization
* @return JobExecutionResult
* @throws JobCancellationException if the job was cancelled
* @throws JobExecutionException if the job execution did not succeed
* @throws IOException if the accumu... | 3.68 |
hmily_SchemaCache_get | /**
* acquire Schema with class.
*
* @param clazz Class
* @return Schema schema
*/
public Schema<?> get(final Class<?> clazz) {
return get(clazz, cache);
} | 3.68 |
hudi_AppendWriteFunction_getWriterHelper | // -------------------------------------------------------------------------
// GetterSetter
// -------------------------------------------------------------------------
@VisibleForTesting
public BulkInsertWriterHelper getWriterHelper() {
return this.writerHelper;
} | 3.68 |
hbase_Export_main | /**
* Main entry point.
* @param args The command line parameters.
* @throws Exception When running the job fails.
*/
public static void main(String[] args) throws Exception {
int errCode = ToolRunner.run(HBaseConfiguration.create(), new Export(), args);
System.exit(errCode);
} | 3.68 |
framework_Result_error | /**
* Returns a failure result wrapping the given error message.
*
* @param <R>
* the result value type
* @param message
* the error message
* @return a failure result
*/
public static <R> Result<R> error(String message) {
Objects.requireNonNull(message, "message cannot be null");
... | 3.68 |
hbase_MasterObserver_postMove | /**
* Called after the region move has been requested.
* @param ctx the environment to interact with the framework and master
* @param region the RegionInfo
* @param srcServer the source ServerName
* @param destServer the destination ServerName
*/
default void postMove(final ObserverContext<MasterCopr... | 3.68 |
hadoop_NativeAzureFileSystemHelper_validateReadArgs | /**
* Validation code, based on
* {@code FSInputStream.validatePositionedReadArgs()}.
* @param buffer destination buffer
* @param offset offset within the buffer
* @param length length of bytes to read
* @throws EOFException if the position is negative
* @throws IndexOutOfBoundsException if there isn't space for... | 3.68 |
pulsar_BrokerService_forEachTopic | /**
* Iterates over all loaded topics in the broker.
*/
public void forEachTopic(Consumer<Topic> consumer) {
topics.forEach((n, t) -> {
Optional<Topic> topic = extractTopic(t);
topic.ifPresent(consumer::accept);
});
} | 3.68 |
pulsar_ReaderConfiguration_getReaderListener | /**
* @return the configured {@link ReaderListener} for the reader
*/
public ReaderListener<byte[]> getReaderListener() {
return readerListener;
} | 3.68 |
flink_AbstractAggregatingMetricsHandler_getAvailableMetrics | /**
* Returns a JSON string containing a list of all available metrics in the given stores.
* Effectively this method maps the union of all key-sets to JSON.
*
* @param stores metrics
* @return JSON string containing a list of all available metrics
*/
private static Collection<String> getAvailableMetrics(
... | 3.68 |
flink_ProducerMergedPartitionFileIndex_addBuffers | /**
* Add buffers to the index.
*
* @param buffers to be added. Note, the provided buffers are required to be physically
* consecutive and in the same order as in the file.
*/
void addBuffers(List<FlushedBuffer> buffers) {
if (buffers.isEmpty()) {
return;
}
Map<Integer, List<FixedSizeRegio... | 3.68 |
flink_InPlaceMutableHashTable_open | /** Initialize the hash table */
@Override
public void open() {
open(calcInitialNumBucketSegments());
} | 3.68 |
flink_LeaderInformationRegister_hasNoLeaderInformation | /**
* Checks that no non-empty {@link LeaderInformation} is stored.
*
* @return {@code true}, if there is no entry that refers to a non-empty {@code
* LeaderInformation}; otherwise {@code false} (i.e. either no information is stored under
* any {@code componentId} or there are entries for certain {@code co... | 3.68 |
morf_OracleDialect_getSubstringFunctionName | /**
* {@inheritDoc}
* @see org.alfasoftware.morf.jdbc.SqlDialect#getSubstringFunctionName()
*/
@Override
protected String getSubstringFunctionName() {
return "SUBSTR";
} | 3.68 |
hadoop_NMContainerStatus_getAllocationTags | /**
* Get and set the Allocation tags associated with the container.
* @return Allocation tags.
*/
public Set<String> getAllocationTags() {
return Collections.emptySet();
} | 3.68 |
hbase_HRegion_getLoadStatistics | /** Returns statistics about the current load of the region */
public ClientProtos.RegionLoadStats getLoadStatistics() {
if (!regionStatsEnabled) {
return null;
}
ClientProtos.RegionLoadStats.Builder stats = ClientProtos.RegionLoadStats.newBuilder();
stats.setMemStoreLoad((int) (Math.min(100,
(this.memS... | 3.68 |
shardingsphere-elasticjob_JobScheduleController_scheduleJob | /**
* Schedule job.
*
* @param cron CRON expression
* @param timeZone the time zone
*/
public void scheduleJob(final String cron, final String timeZone) {
try {
if (!scheduler.checkExists(jobDetail.getKey())) {
scheduler.scheduleJob(jobDetail, createCronTrigger(cron, timeZone));
}
... | 3.68 |
flink_FlinkPreparingTableBase_isKey | /**
* Returns whether the given columns are a key or a superset of a unique key of this table.
*
* <p>Note: Return true means TRUE. However return false means FALSE or NOT KNOWN. It's better
* to use {@link org.apache.calcite.rel.metadata.RelMetadataQuery#areRowsUnique} to distinguish
* FALSE with NOT KNOWN.
*
*... | 3.68 |
pulsar_LoadSimulationController_handleGroupChange | // Handle the command line arguments associated with the group change command.
private void handleGroupChange(final ShellArguments arguments) throws Exception {
final List<String> commandArguments = arguments.commandArguments;
// Group change expects two application arguments: tenant name and group
// name.... | 3.68 |
hbase_BackupManager_readLogTimestampMap | /**
* Read the timestamp for each region server log after the last successful backup. Each table has
* its own set of the timestamps.
* @return the timestamp for each region server. key: tableName value:
* RegionServer,PreviousTimeStamp
* @throws IOException exception
*/
public Map<TableName, Map<String, ... | 3.68 |
hbase_StorageClusterStatusModel_setHeapSizeMB | /**
* @param heapSizeMB the current heap size, in MB
*/
public void setHeapSizeMB(int heapSizeMB) {
this.heapSizeMB = heapSizeMB;
} | 3.68 |
hbase_HttpServer_getServerName | /**
* Quote the server name so that users specifying the HOST HTTP header can't inject attacks.
*/
@Override
public String getServerName() {
return HtmlQuoting.quoteHtmlChars(rawRequest.getServerName());
} | 3.68 |
flink_CliClient_close | /** Closes the CLI instance. */
public void close() {
if (terminal != null) {
closeTerminal();
}
} | 3.68 |
hudi_AvroSchemaConverter_nullableSchema | /**
* Returns schema with nullable true.
*/
private static Schema nullableSchema(Schema schema) {
return schema.isNullable()
? schema
: Schema.createUnion(SchemaBuilder.builder().nullType(), schema);
} | 3.68 |
morf_ConnectionResourcesBean_hashCode | /**
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + (databaseName == null ? 0 : databaseName.hashCode());
result = prime * result + (databaseType == null ? 0 : databaseType.hashCode());
result = prime * result + (hostNam... | 3.68 |
framework_VScrollTable_removeCell | /**
* Remove a cell by using the columnId.
*
* @param colKey
* The columnId to remove
*/
public void removeCell(String colKey) {
final FooterCell c = getFooterCell(colKey);
remove(c);
} | 3.68 |
hbase_JvmPauseMonitor_main | /**
* Simple 'main' to facilitate manual testing of the pause monitor. This main function just leaks
* memory into a list. Running this class with a 1GB heap will very quickly go into "GC hell" and
* result in log messages about the GC pauses.
*/
public static void main(String[] args) throws Exception {
new JvmPa... | 3.68 |
flink_FlinkCompletableFutureAssert_eventuallySucceeds | /**
* An equivalent of {@link #succeedsWithin(Duration)}, that doesn't rely on timeouts.
*
* @return a new assertion object on the future's result
*/
public ObjectAssert<T> eventuallySucceeds() {
final T object = assertEventuallySucceeds(info, actual);
return new ObjectAssert<>(object);
} | 3.68 |
morf_ResultSetIterator_getTable | /**
* @return the table
*/
public Table getTable() {
return table;
} | 3.68 |
hbase_Bytes_putFloat | /**
* Put a float value out to the specified byte array position.
* @param bytes byte array
* @param offset offset to write to
* @param f float value
* @return New offset in <code>bytes</code>
*/
public static int putFloat(byte[] bytes, int offset, float f) {
return putInt(bytes, offset, Float.floatToRawI... | 3.68 |
shardingsphere-elasticjob_FailoverService_setCrashedFailoverFlag | /**
* set crashed failover flag.
*
* @param item crashed job item
*/
public void setCrashedFailoverFlag(final int item) {
if (!isFailoverAssigned(item)) {
jobNodeStorage.createJobNodeIfNeeded(FailoverNode.getItemsNode(item));
jobNodeStorage.removeJobNodeIfExisted(ShardingNode.getRunningNode(ite... | 3.68 |
framework_CellReference_getColumn | /**
* Gets the column objects.
*
* @return the column object
*/
public Grid.Column<?, T> getColumn() {
return column;
} | 3.68 |
hibernate-validator_AbstractMessageInterpolator_interpolateMessage | /**
* Runs the message interpolation according to algorithm specified in the Bean Validation specification.
* <p>
* Note:
* <p>
* Look-ups in user bundles is recursive whereas look-ups in default bundle are not!
*
* @param message the message to interpolate
* @param context the context for this interpolation
*... | 3.68 |
morf_HumanReadableStatementHelper_generateColumnCountString | /**
* Generates a string which represents the number of columns specified.
*
* @param columnCount the number of columns
* @return a string representation of the number of columns
*/
private static String generateColumnCountString(final int columnCount) {
if (columnCount == 0) {
return "no columns";
}
if... | 3.68 |
pulsar_AdditionalServletUtils_load | /**
* Load the additional servlets according to the additional servlet definition.
*
* @param metadata the additional servlet definition.
*/
public AdditionalServletWithClassLoader load(
AdditionalServletMetadata metadata, String narExtractionDirectory) throws IOException {
final File narFile = metadat... | 3.68 |
hbase_Procedure_waitInitialized | /**
* The {@link #doAcquireLock(Object, ProcedureStore)} will be split into two steps, first, it will
* call us to determine whether we need to wait for initialization, second, it will call
* {@link #acquireLock(Object)} to actually handle the lock for this procedure.
* <p/>
* This is because that when master rest... | 3.68 |
hadoop_MountTableProcedure_setMountReadOnly | /**
* Enable or disable readonly of the mount point.
*
* @param mount the mount point.
* @param readOnly enable or disable readonly.
* @param conf the configuration of the router.
*/
private static void setMountReadOnly(String mount, boolean readOnly,
Configuration conf) throws IOException {
String a... | 3.68 |
hadoop_OBSFileSystem_setWorkingDirectory | /**
* Set the current working directory for the file system. All relative paths
* will be resolved relative to it.
*
* @param newDir the new working directory
*/
@Override
public void setWorkingDirectory(final Path newDir) {
workingDir = newDir;
} | 3.68 |
dubbo_InmemoryConfiguration_addProperties | /**
* Add a set of properties into the store
*/
public void addProperties(Map<String, String> properties) {
if (properties != null) {
this.store.putAll(properties);
}
} | 3.68 |
hadoop_MutableQuantiles_getQuantiles | /**
* Returns the array of Quantiles declared in MutableQuantiles.
*
* @return array of Quantiles
*/
public synchronized Quantile[] getQuantiles() {
return QUANTILES;
} | 3.68 |
hbase_WhileMatchFilter_areSerializedFieldsEqual | /**
* Return true if and only if the fields of the filter that are serialized are equal to the
* corresponding fields in other. Used for testing.
*/
@Override
boolean areSerializedFieldsEqual(Filter o) {
if (o == this) {
return true;
}
if (!(o instanceof WhileMatchFilter)) {
return false;
}
WhileMa... | 3.68 |
hbase_FlushPolicy_configureForRegion | /**
* Upon construction, this method will be called with the region to be governed. It will be called
* once and only once.
*/
protected void configureForRegion(HRegion region) {
this.region = region;
} | 3.68 |
hudi_HoodieAsyncService_start | /**
* Start the service. Runs the service in a different thread and returns. Also starts a monitor thread to
* run-callbacks in case of shutdown
*
* @param onShutdownCallback
*/
public void start(Function<Boolean, Boolean> onShutdownCallback) {
if (started) {
LOG.warn("The async service already started.");
... | 3.68 |
flink_CopyOnWriteSkipListStateMapSnapshot_writeKeyAndNamespace | /** Write key and namespace from bytes. */
private void writeKeyAndNamespace(long nodeId, DataOutputView outputView) throws IOException {
// tuple of byte arrays for key and namespace
Tuple2<byte[], byte[]> tuple = owningStateMap.helpGetBytesForKeyAndNamespace(nodeId);
// write namespace first
outputVie... | 3.68 |
zilla_HpackContext_staticIndex5 | // Index in static table for the given name of length 5
private static int staticIndex5(DirectBuffer name)
{
switch (name.getByte(4))
{
case 'e':
if (STATIC_TABLE[50].name.equals(name)) // range
{
return 50;
}
break;
case 'h':
if (STATIC_TAB... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.