name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
pulsar_ProducerConfiguration_getCompressionType | /**
* @return the configured compression type for this producer
*/
public CompressionType getCompressionType() {
return conf.getCompressionType();
} | 3.68 |
flink_FactoryUtil_discoverDecodingFormat | /**
* Discovers a {@link DecodingFormat} of the given type using the given option as factory
* identifier.
*/
public <I, F extends DecodingFormatFactory<I>> DecodingFormat<I> discoverDecodingFormat(
Class<F> formatFactoryClass, ConfigOption<String> formatOption) {
return discoverOptionalDecodingFormat(fo... | 3.68 |
hbase_Import_usage | /*
* @param errorMsg Error message. Can be null.
*/
private static void usage(final String errorMsg) {
if (errorMsg != null && errorMsg.length() > 0) {
System.err.println("ERROR: " + errorMsg);
}
System.err.println("Usage: Import [options] <tablename> <inputdir>");
System.err.println("By default Import wi... | 3.68 |
framework_DateField_getRangeEnd | /**
* Returns the precise rangeEnd used.
*
* @param startDate
*/
public Date getRangeEnd() {
return getState(false).rangeEnd;
} | 3.68 |
hbase_StorageClusterStatusModel_addRegion | /**
* Add a region name to the list
* @param name the region name
*/
public void addRegion(byte[] name, int stores, int storefiles, int storefileSizeMB,
int memstoreSizeMB, long storefileIndexSizeKB, long readRequestsCount, long cpRequestsCount,
long writeRequestsCount, int rootIndexSizeKB, int totalStaticIndexS... | 3.68 |
flink_HivePartitionUtils_getPartitionNames | /**
* Get the partitions' name by partitions' spec.
*
* @param partitionsSpec a list contains the spec of the partitions, one of which is for one
* partition. The map for the spec of partition can be unordered.
* @param partitionColNames the partition column's name
* @param defaultStr the default value used t... | 3.68 |
open-banking-gateway_ServiceContextProviderForFintech_validateRedirectCode | /**
* Validates redirect code (Xsrf protection) for current request
* @param request Request to validate for
* @param session Service session that has expected redirect code value
* @param <REQUEST> Request class
*/
protected <REQUEST extends FacadeServiceableGetter> void validateRedirectCode(REQUEST request, Auth... | 3.68 |
hbase_BinaryComponentComparator_toByteArray | /** Returns The comparator serialized using pb */
@Override
public byte[] toByteArray() {
ComparatorProtos.BinaryComponentComparator.Builder builder =
ComparatorProtos.BinaryComponentComparator.newBuilder();
builder.setValue(ByteString.copyFrom(this.value));
builder.setOffset(this.offset);
return builder.bu... | 3.68 |
dubbo_AbstractMetadataReport_getMetadataReportRetry | /**
* @deprecated only for unit test
*/
@Deprecated
protected MetadataReportRetry getMetadataReportRetry() {
return metadataReportRetry;
} | 3.68 |
hadoop_SubApplicationRowKey_encode | /*
* (non-Javadoc)
*
* Encodes SubApplicationRowKey object into a byte array with each
* component/field in SubApplicationRowKey separated by
* Separator#QUALIFIERS.
* This leads to an sub app table row key of the form
* subAppUserId!clusterId!entityType!entityPrefix!entityId!userId
*
* subAppUserId is usually... | 3.68 |
hadoop_BufferData_setPrefetch | /**
* Indicates that a prefetch operation is in progress.
*
* @param actionFuture the {@code Future} of a prefetch action.
*
* @throws IllegalArgumentException if actionFuture is null.
*/
public synchronized void setPrefetch(Future<Void> actionFuture) {
Validate.checkNotNull(actionFuture, "actionFuture");
th... | 3.68 |
aws-saas-boost_UpdateWorkflow_findChangedPaths | // TODO git functionality should be extracted to a "gitToolbox" object for easier mock/testing
protected List<Path> findChangedPaths(Map<String, String> cloudFormationParamMap) {
// list all staged and committed changes against the last updated commit
String versionParameter = cloudFormationParamMap.get("Versio... | 3.68 |
graphhopper_ResponsePath_getDescription | /**
* @return the description of this route alternative to make it meaningful for the user e.g. it
* displays one or two main roads of the route.
*/
public List<String> getDescription() {
if (description == null)
return Collections.emptyList();
return description;
} | 3.68 |
flink_ExecutionEnvironment_registerJobListener | /**
* Register a {@link JobListener} in this environment. The {@link JobListener} will be notified
* on specific job status changed.
*/
@PublicEvolving
public void registerJobListener(JobListener jobListener) {
checkNotNull(jobListener, "JobListener cannot be null");
jobListeners.add(jobListener);
} | 3.68 |
hadoop_ResourceVector_increment | /**
* Increments the given resource by the specified value.
* @param resourceName name of the resource
* @param value value to be added to the resource's current value
*/
public void increment(String resourceName, double value) {
setValue(resourceName, getValue(resourceName) + value);
} | 3.68 |
hibernate-validator_ValueExtractorResolver_getRuntimeCompliantValueExtractors | /**
* @return a set of runtime compliant value extractors based on a runtime type. If there are no available value extractors
* an empty set will be returned which means the type is not a container.
*/
private Set<ValueExtractorDescriptor> getRuntimeCompliantValueExtractors(Class<?> runtimeType, Set<ValueExtractorDe... | 3.68 |
framework_VGridLayout_getColumnWidths | /**
* Returns the column widths measured in pixels.
*
* @return
*/
protected int[] getColumnWidths() {
return columnWidths;
} | 3.68 |
zilla_ManyToOneRingBuffer_capacity | /**
* {@inheritDoc}
*/
public int capacity()
{
return capacity;
} | 3.68 |
hbase_JobUtil_getQualifiedStagingDir | /**
* Initializes the staging directory and returns the qualified path.
* @param conf conf system configuration
* @return qualified staging directory path
* @throws IOException if the ownership on the staging directory is not as expected
* @throws InterruptedException if the thread getting the staging dir... | 3.68 |
hadoop_CopyCommandWithMultiThread_isMultiThreadNecessary | // if thread count is 1 or the source is only one single file,
// don't init executor to avoid threading overhead.
@VisibleForTesting
protected boolean isMultiThreadNecessary(LinkedList<PathData> args)
throws IOException {
return this.threadCount > 1 && hasMoreThanOneSourcePaths(args);
} | 3.68 |
flink_HiveParserUtils_toRelDataType | // converts a hive TypeInfo to RelDataType
public static RelDataType toRelDataType(TypeInfo typeInfo, RelDataTypeFactory relTypeFactory)
throws SemanticException {
RelDataType res;
switch (typeInfo.getCategory()) {
case PRIMITIVE:
// hive sets NULLABLE for all primitive types, revert... | 3.68 |
AreaShop_FileManager_addGroup | /**
* Add a RegionGroup.
* @param group The RegionGroup to add
*/
public void addGroup(RegionGroup group) {
groups.put(group.getName().toLowerCase(), group);
String lowGroup = group.getName().toLowerCase();
groupsConfig.set(lowGroup + ".name", group.getName());
groupsConfig.set(lowGroup + ".priority", 0);
saveG... | 3.68 |
flink_FlinkMatchers_futureFailedWith | /**
* Checks whether {@link CompletableFuture} completed already exceptionally with a specific
* exception type.
*/
public static <T, E extends Throwable> FutureFailedMatcher<T> futureFailedWith(
Class<E> exceptionType) {
Objects.requireNonNull(exceptionType, "exceptionType should not be null");
retu... | 3.68 |
hbase_PreemptiveFastFailException_wasOperationAttemptedByServer | /** Returns true if operation was attempted by server, false otherwise. */
public boolean wasOperationAttemptedByServer() {
return false;
} | 3.68 |
hadoop_KMSAudit_initializeAuditLoggers | /**
* Create a collection of KMSAuditLoggers from configuration, and initialize
* them. If any logger failed to be created or initialized, a RunTimeException
* is thrown.
*/
private void initializeAuditLoggers(Configuration conf) {
Set<Class<? extends KMSAuditLogger>> classes = getAuditLoggerClasses(conf);
Prec... | 3.68 |
hbase_FavoredStochasticBalancer_retainAssignment | /**
* Reuse BaseLoadBalancer's retainAssignment, but generate favored nodes when its missing.
*/
@Override
@NonNull
public Map<ServerName, List<RegionInfo>> retainAssignment(Map<RegionInfo, ServerName> regions,
List<ServerName> servers) throws HBaseIOException {
Map<ServerName, List<RegionInfo>> assignmentMap = M... | 3.68 |
framework_Calendar_getTimeFormat | /**
* Gets currently active time format. Value is either TimeFormat.Format12H
* or TimeFormat.Format24H.
*
* @return TimeFormat Format for the time.
*/
public TimeFormat getTimeFormat() {
if (currentTimeFormat == null) {
SimpleDateFormat f;
if (getLocale() == null) {
f = (SimpleDate... | 3.68 |
flink_Plan_registerCachedFile | /**
* Register cache files at program level.
*
* @param entry contains all relevant information
* @param name user defined name of that file
* @throws java.io.IOException
*/
public void registerCachedFile(String name, DistributedCacheEntry entry) throws IOException {
if (!this.cacheFile.containsKey(name)) {
... | 3.68 |
framework_TreeGridConnector_updateHierarchyColumn | /**
* This method has been scheduled finally to avoid possible race conditions
* between state change handling for the Grid and its columns. The renderer
* of the column is set in a state change handler, and might not be
* available when this method is executed.
*/
@SuppressWarnings("unchecked")
@OnStateChange("hi... | 3.68 |
framework_VTabsheet_scrollIntoView | /**
* Scrolls the given tab into view. If the tab is hidden on the server,
* nothing is done.
*
* @param tab
* the tab to scroll to
*/
private void scrollIntoView(Tab tab) {
if (!tab.isHiddenOnServer()) {
// Check for visibility first as clipped tabs to the right are
// always vis... | 3.68 |
hbase_OperationWithAttributes_getId | /**
* This method allows you to retrieve the identifier for the operation if one was set.
* @return the id or null if not set
*/
public String getId() {
byte[] attr = getAttribute(ID_ATRIBUTE);
return attr == null ? null : Bytes.toString(attr);
} | 3.68 |
hbase_SimpleServerRpcConnection_decRpcCount | /* Decrement the outstanding RPC count */
protected void decRpcCount() {
rpcCount.decrement();
} | 3.68 |
hbase_HBaseSaslRpcClient_getOutputStream | /**
* Get a SASL wrapped OutputStream. Can be called only after saslConnect() has been called.
* @return a SASL wrapped OutputStream
*/
public OutputStream getOutputStream() throws IOException {
if (!saslClient.isComplete()) {
throw new IOException("Sasl authentication exchange hasn't completed yet");
}
//... | 3.68 |
morf_OracleDialect_changePrimaryKeyColumns | /**
* @see org.alfasoftware.morf.jdbc.SqlDialect#changePrimaryKeyColumns(Table, java.util.List, java.util.List)
*/
@Override
public Collection<String> changePrimaryKeyColumns(Table table, List<String> oldPrimaryKeyColumns, List<String> newPrimaryKeyColumns) {
List<String> result = new ArrayList<>();
String tableN... | 3.68 |
pulsar_BytesSchemaVersion_toString | /**
* Write a printable representation of a byte array. Non-printable
* characters are hex escaped in the format \\x%02X, eg:
* \x00 \x05 etc.
*
* <p>This function is brought from org.apache.hadoop.hbase.util.Bytes
*
* @param b array to write out
* @param off offset to start at
* @param len length to write
* ... | 3.68 |
hadoop_JsonSerDeser_fromResource | /**
* Convert from a JSON file
* @param resource input file
* @return the parsed JSON
* @throws IOException IO problems
* @throws JsonMappingException failure to map from the JSON to this class
*/
public T fromResource(String resource)
throws IOException, JsonParseException, JsonMappingExceptio... | 3.68 |
flink_SkipListValueSerializer_deserializeState | /**
* Deserialize the state from the byte buffer which stores skip list value.
*
* @param memorySegment the memory segment which stores the skip list value.
* @param offset the start position of the skip list value in the byte buffer.
* @param len length of the skip list value.
*/
S deserializeState(MemorySegment... | 3.68 |
hadoop_RpcProgram_register | /**
* Register the program with Portmap or Rpcbind.
* @param mapEntry port map entries
* @param set specifies registration or not
*/
protected void register(PortmapMapping mapEntry, boolean set) {
XDR mappingRequest = PortmapRequest.create(mapEntry, set);
SimpleUdpClient registrationClient = new SimpleUdpClient... | 3.68 |
hbase_SingleColumnValueFilter_getComparator | /** Returns the comparator */
public org.apache.hadoop.hbase.filter.ByteArrayComparable getComparator() {
return comparator;
} | 3.68 |
flink_BinaryExternalSorter_setResultIterator | /**
* Sets the result iterator. By setting the result iterator, all threads that are waiting for
* the result iterator are notified and will obtain it.
*
* @param iterator The result iterator to set.
*/
private void setResultIterator(MutableObjectIterator<BinaryRowData> iterator) {
synchronized (this.iteratorL... | 3.68 |
hadoop_AbfsManifestStoreOperations_storeSupportsResilientCommit | /**
* Resilient commits available on hierarchical stores.
* @return true if the FS can use etags on renames.
*/
@Override
public boolean storeSupportsResilientCommit() {
return resilientCommitByRename != null;
} | 3.68 |
flink_InterestingProperties_getLocalProperties | /**
* Gets the interesting local properties.
*
* @return The interesting local properties.
*/
public Set<RequestedLocalProperties> getLocalProperties() {
return this.localProps;
} | 3.68 |
hbase_CacheConfig_getBlockCache | /**
* Returns the block cache.
* @return the block cache, or null if caching is completely disabled
*/
public Optional<BlockCache> getBlockCache() {
return Optional.ofNullable(this.blockCache);
} | 3.68 |
dubbo_ValidationFilter_setValidation | /**
* Sets the validation instance for ValidationFilter
*
* @param validation Validation instance injected by dubbo framework based on "validation" attribute value.
*/
public void setValidation(Validation validation) {
this.validation = validation;
} | 3.68 |
open-banking-gateway_ProtocolResultHandler_handleResult | /**
* Handles the result from protocol for the {@code FacadeService} to pass it to API.
* This class must ensure that it is separate transaction - so it won't join any other as is used with
* CompletableFuture.
*/
@Transactional(propagation = Propagation.REQUIRES_NEW)
public <RESULT, REQUEST extends FacadeServiceab... | 3.68 |
hudi_BufferedRandomAccessFile_alignDiskPositionToBufferStartIfNeeded | /**
* If the diskPosition differs from the startPosition, flush the data in the buffer
* and realign/fill the buffer at startPosition.
* @throws IOException
*/
private void alignDiskPositionToBufferStartIfNeeded() throws IOException {
if (this.diskPosition != this.startPosition) {
super.seek(this.startPositio... | 3.68 |
flink_RouteResult_queryParams | /** Returns all params in the query part of the request URI. */
public Map<String, List<String>> queryParams() {
return queryParams;
} | 3.68 |
dubbo_TriHttp2RemoteFlowController_incrementWindowSize | /**
* Increment the window size for a particular stream.
* @param state the state associated with the stream whose window is being incremented.
* @param delta The amount to increment by.
* @throws Http2Exception If this operation overflows the window for {@code state}.
*/
void incrementWindowSize(FlowState state, ... | 3.68 |
shardingsphere-elasticjob_JobScheduleController_triggerJob | /**
* Trigger job.
*/
public synchronized void triggerJob() {
try {
if (scheduler.isShutdown()) {
return;
}
if (!scheduler.checkExists(jobDetail.getKey())) {
scheduler.scheduleJob(jobDetail, createOneOffTrigger());
} else {
scheduler.triggerJob(j... | 3.68 |
graphhopper_AlternativeRoute_getWorstSortBy | /**
* Return the current worst weight for all alternatives
*/
double getWorstSortBy() {
if (alternatives.isEmpty())
throw new IllegalStateException("Empty alternative list cannot happen");
return alternatives.get(alternatives.size() - 1).sortBy;
} | 3.68 |
framework_Table_setFooterVisible | /**
* Sets the footer visible in the bottom of the table.
* <p>
* The footer can be used to add column related data like sums to the bottom
* of the Table using setColumnFooter(Object propertyId, String footer).
* </p>
*
* @param visible
* Should the footer be visible
*/
public void setFooterVisible... | 3.68 |
hmily_HmilyRepositoryFacade_findHmilyLockById | /**
* Find hmily lock by id.
*
* @param lockId lock id
* @return hmily lock
*/
public Optional<HmilyLock> findHmilyLockById(final String lockId) {
return hmilyRepository.findHmilyLockById(lockId);
} | 3.68 |
hadoop_TaskContainerDefinition_withDurationLegacy | /**
* Also support "duration.ms" for backward compatibility.
* @param jsonTask the json representation of the task.
* @param key The json key.
* @return the builder
*/
public Builder withDurationLegacy(Map<String, String> jsonTask, String key) {
if (jsonTask.containsKey(key)) {
this.durationLegacy = Integer.... | 3.68 |
hbase_HBaseTestingUtility_deleteTableData | /**
* Provide an existing table name to truncate. Scans the table and issues a delete for each row
* read.
* @param tableName existing table
* @return HTable to that new table
*/
public Table deleteTableData(TableName tableName) throws IOException {
Table table = getConnection().getTable(tableName);
Scan scan ... | 3.68 |
zxing_UPCEANReader_decodeDigit | /**
* Attempts to decode a single UPC/EAN-encoded digit.
*
* @param row row of black/white values to decode
* @param counters the counts of runs of observed black/white/black/... values
* @param rowOffset horizontal offset to start decoding from
* @param patterns the set of patterns to use to decode -- sometimes ... | 3.68 |
morf_UpgradeStatusTableServiceImpl_create | /**
* @see UpgradeStatusTableService.Factory#create(ConnectionResources)
*/
public UpgradeStatusTableService create(final ConnectionResources connectionResources) {
return new UpgradeStatusTableServiceImpl(connectionResources);
} | 3.68 |
hadoop_CapacitySchedulerPreemptionUtils_tryPreemptContainerAndDeductResToObtain | /**
* Invoke this method to preempt container based on resToObtain.
*
* @param rc
* resource calculator
* @param context
* preemption context
* @param resourceToObtainByPartitions
* map to hold resource to obtain per partition
* @param rmContainer
* container
* @param clus... | 3.68 |
hadoop_CachingGetSpaceUsed_getJitter | /**
* Randomize the refresh interval timing by this amount, the actual interval will be chosen
* uniformly between {@code interval-jitter} and {@code interval+jitter}.
*
* @return between interval-jitter and interval+jitter.
*/
@VisibleForTesting
public long getJitter() {
return jitter;
} | 3.68 |
graphhopper_GraphHopper_setStoreOnFlush | /**
* Only valid option for in-memory graph and if you e.g. want to disable store on flush for unit
* tests. Specify storeOnFlush to true if you want that existing data will be loaded FROM disc
* and all in-memory data will be flushed TO disc after flush is called e.g. while OSM import.
*
* @param storeOnFlush tru... | 3.68 |
flink_JobClient_triggerSavepoint | /**
* Triggers a savepoint for the associated job. The savepoint will be written to the given
* savepoint directory, or {@link
* org.apache.flink.configuration.CheckpointingOptions#SAVEPOINT_DIRECTORY} if it is null.
*
* @param savepointDirectory directory the savepoint should be written to
* @return a {@link Com... | 3.68 |
flink_MailboxProcessor_getMailboxExecutor | /**
* Returns an executor service facade to submit actions to the mailbox.
*
* @param priority the priority of the {@link MailboxExecutor}.
*/
public MailboxExecutor getMailboxExecutor(int priority) {
return new MailboxExecutorImpl(mailbox, priority, actionExecutor, this);
} | 3.68 |
graphhopper_VectorTile_getValuesBuilder | /**
* <pre>
* Dictionary encoding for values
* </pre>
*
* <code>repeated .vector_tile.Tile.Value values = 4;</code>
*/
public vector_tile.VectorTile.Tile.Value.Builder getValuesBuilder(
int index) {
return getValuesFieldBuilder().getBuilder(index);
} | 3.68 |
hudi_BufferedRandomAccessFile_flushBuffer | /**
* Flush any dirty bytes in the buffer to disk.
* @throws IOException
*/
private void flushBuffer() throws IOException {
if (this.isDirty) {
alignDiskPositionToBufferStartIfNeeded();
int len = (int) (this.currentPosition - this.startPosition);
super.write(this.dataBuffer.array(), 0, len);
this.d... | 3.68 |
graphhopper_GraphHopper_getCHGraphs | /**
* @return a mapping between profile names and according CH preparations. The map will be empty before loading
* or import.
*/
public Map<String, RoutingCHGraph> getCHGraphs() {
return chGraphs;
} | 3.68 |
hbase_ResponseConverter_buildGetOnlineRegionResponse | /**
* A utility to build a GetOnlineRegionResponse.
* @return the response
*/
public static GetOnlineRegionResponse
buildGetOnlineRegionResponse(final List<RegionInfo> regions) {
GetOnlineRegionResponse.Builder builder = GetOnlineRegionResponse.newBuilder();
for (RegionInfo region : regions) {
builder.addR... | 3.68 |
hudi_HoodieTableConfig_getBootstrapIndexClass | /**
* Read the payload class for HoodieRecords from the table properties.
*/
public String getBootstrapIndexClass() {
if (!props.getBoolean(BOOTSTRAP_INDEX_ENABLE.key(), BOOTSTRAP_INDEX_ENABLE.defaultValue())) {
return BootstrapIndexType.NO_OP.getClassName();
}
String bootstrapIndexClassName;
if (contains... | 3.68 |
flink_Types_EITHER | /**
* Returns type information for Flink's {@link org.apache.flink.types.Either} type. Null values
* are not supported.
*
* <p>Either type can be used for a value of two possible types.
*
* <p>Example use: <code>Types.EITHER(Types.VOID, Types.INT)</code>
*
* @param leftType type information of left side / {@lin... | 3.68 |
morf_AbstractSqlDialectTest_expectedJoinOnEverything | /**
* @return The expected SQL for a join with no ON criteria
*/
protected String expectedJoinOnEverything() {
return "SELECT * FROM " + tableName("TableOne") + " INNER JOIN " + tableName("TableTwo") + " ON 1=1";
} | 3.68 |
hbase_TableDescriptorBuilder_setSplitEnabled | /**
* Setting the table region split enable flag.
* @param isEnable True if enable region split.
* @return the modifyable TD
*/
public ModifyableTableDescriptor setSplitEnabled(final boolean isEnable) {
return setValue(SPLIT_ENABLED_KEY, Boolean.toString(isEnable));
} | 3.68 |
hadoop_ApplicationServiceRecordProcessor_getRecordTypes | /**
* Returns the record types associated with a container service record.
*
* @return the record type array
*/
@Override public int[] getRecordTypes() {
return new int[] {Type.A, Type.AAAA, Type.CNAME, Type.SRV, Type.TXT};
} | 3.68 |
flink_SkipListKeySerializer_serialize | /**
* Serialize the key and namespace to bytes. The format is - int: length of serialized namespace
* - byte[]: serialized namespace - int: length of serialized key - byte[]: serialized key
*/
byte[] serialize(K key, N namespace) {
// we know that the segment contains a byte[], because it is created
// in th... | 3.68 |
morf_AbstractSqlDialectTest_testSelectSumWithExpression | /**
* Tests select statement with SUM function using more than a simple field.
*/
@Test
public void testSelectSumWithExpression() {
SelectStatement stmt = select(sum(field(INT_FIELD).multiplyBy(literal(2)).divideBy(literal(3)))).from(tableRef(TEST_TABLE));
assertEquals("Select scripts are not the same", expectedS... | 3.68 |
flink_TSetClientInfoResp_findByThriftId | /** Find the _Fields constant that matches fieldId, or null if its not found. */
public static _Fields findByThriftId(int fieldId) {
switch (fieldId) {
case 1: // STATUS
return STATUS;
default:
return null;
}
} | 3.68 |
hadoop_MutableInverseQuantiles_setQuantiles | /**
* Sets quantileInfo.
*
* @param ucName capitalized name of the metric
* @param uvName capitalized type of the values
* @param desc uncapitalized long-form textual description of the metric
* @param lvName uncapitalized type of the values
* @param df Number formatter for inverse percentile value
*/
void setQ... | 3.68 |
hbase_CellChunkMap_createSubCellFlatMap | /*
* To be used by base (CellFlatMap) class only to create a sub-CellFlatMap Should be used only to
* create only CellChunkMap from CellChunkMap
*/
@Override
protected CellFlatMap createSubCellFlatMap(int min, int max, boolean descending) {
return new CellChunkMap(this.comparator(), this.chunks, min, max, descendi... | 3.68 |
hmily_HmilyInsertStatement_getColumns | /**
* Get columns.
*
* @return columns
*/
public Collection<HmilyColumnSegment> getColumns() {
return null == insertColumns ? Collections.emptyList() : insertColumns.getColumns();
} | 3.68 |
hudi_OverwriteWithLatestAvroPayload_overwriteField | /**
* Return true if value equals defaultValue otherwise false.
*/
public Boolean overwriteField(Object value, Object defaultValue) {
if (JsonProperties.NULL_VALUE.equals(defaultValue)) {
return value == null;
}
return Objects.equals(value, defaultValue);
} | 3.68 |
morf_AbstractSqlDialectTest_testParameterisedInsert | /**
* Tests that an unparameterised insert where field values have been supplied
* via a list of {@link FieldLiteral}s results in the field literals' values
* being used as the inserted values.
*
* <p>By way of a regression test, this test omits some {@linkplain FieldLiteral}s
* from its 'fields' array (namely 'c... | 3.68 |
hadoop_ClientGSIContext_updateResponseState | /**
* Client side implementation only receives state alignment info.
* It does not provide state alignment info therefore this does nothing.
*/
@Override
public void updateResponseState(RpcResponseHeaderProto.Builder header) {
// Do nothing.
} | 3.68 |
hbase_MurmurHash3_hash | /** Returns the MurmurHash3_x86_32 hash. */
@edu.umd.cs.findbugs.annotations.SuppressWarnings("SF")
@Override
public <T> int hash(HashKey<T> hashKey, int initval) {
final int c1 = 0xcc9e2d51;
final int c2 = 0x1b873593;
int length = hashKey.length();
int h1 = initval;
int roundedEnd = (length & 0xfffffffc); //... | 3.68 |
hadoop_AbstractS3ACommitter_getUUIDSource | /**
* Source of the UUID.
* @return how the job UUID was retrieved/generated.
*/
@VisibleForTesting
public final JobUUIDSource getUUIDSource() {
return uuidSource;
} | 3.68 |
flink_TaskManagerSlotInformation_isMatchingRequirement | /**
* Returns true if the required {@link ResourceProfile} can be fulfilled by this slot.
*
* @param required resources
* @return true if the this slot can fulfill the resource requirements
*/
default boolean isMatchingRequirement(ResourceProfile required) {
return getResourceProfile().isMatching(required);
} | 3.68 |
framework_ApplicationConnection_isLoadingIndicatorVisible | /**
* Determines whether or not the loading indicator is showing.
*
* @return true if the loading indicator is visible
* @deprecated As of 7.1. Use {@link #getLoadingIndicator()} and
* {@link VLoadingIndicator#isVisible()}.isVisible() instead.
*/
@Deprecated
public boolean isLoadingIndicatorVisible() ... | 3.68 |
flink_CheckpointConfig_getTolerableCheckpointFailureNumber | /**
* Get the defined number of consecutive checkpoint failures that will be tolerated, before the
* whole job is failed over.
*
* <p>If the {@link ExecutionCheckpointingOptions#TOLERABLE_FAILURE_NUMBER} has not been
* configured, this method would return 0 which means the checkpoint failure manager would not
* t... | 3.68 |
flink_TransformationMetadata_fill | /** Fill a transformation with this meta. */
public <T extends Transformation<?>> T fill(T transformation) {
transformation.setName(getName());
transformation.setDescription(getDescription());
if (getUid() != null) {
transformation.setUid(getUid());
}
return transformation;
} | 3.68 |
hbase_FavoredStochasticBalancer_getServerFromFavoredNode | /**
* Get the ServerName for the FavoredNode. Since FN's startcode is -1, we could want to get the
* ServerName with the correct start code from the list of provided servers.
*/
private ServerName getServerFromFavoredNode(List<ServerName> servers, ServerName fn) {
for (ServerName server : servers) {
if (Server... | 3.68 |
hibernate-validator_SizeValidatorForCharSequence_isValid | /**
* Checks the length of the specified character sequence (e.g. string).
*
* @param charSequence The character sequence to validate.
* @param constraintValidatorContext context in which the constraint is evaluated.
*
* @return Returns {@code true} if the string is {@code null} or the length of {@code charSequen... | 3.68 |
pulsar_ConfigValidationUtils_mapFv | /**
* Returns a new NestableFieldValidator for a Map.
*
* @param key a validator for the keys in the map
* @param val a validator for the values in the map
* @param notNull whether or not a value of null is valid
* @return a NestableFieldValidator for a Map
*/
public static NestableFieldValidator mapFv(f... | 3.68 |
querydsl_PathBuilder_getTime | /**
* Create a new Time typed path
*
* @param <A>
* @param property property name
* @param type property type
* @return property path
*/
@SuppressWarnings("unchecked")
public <A extends Comparable<?>> TimePath<A> getTime(String property, Class<A> type) {
Class<? extends A> vtype = validate(property, type);
... | 3.68 |
framework_JsonPaintTarget_escapeJSON | /**
* Escapes the given string so it can safely be used as a JSON string.
*
* @param s
* The string to escape
* @return Escaped version of the string
*/
public static String escapeJSON(String s) {
// FIXME: Move this method to another class as other classes use it
// also.
if (s == null) {
... | 3.68 |
hbase_WALProcedureStore_initTrackerFromOldLogs | /**
* If last log's tracker is not null, use it as {@link #storeTracker}. Otherwise, set storeTracker
* as partial, and let {@link ProcedureWALFormatReader} rebuild it using entries in the log.
*/
private void initTrackerFromOldLogs() {
if (logs.isEmpty() || !isRunning()) {
return;
}
ProcedureWALFile log =... | 3.68 |
hudi_BaseTableMetadata_fetchAllPartitionPaths | /**
* Returns a list of all partitions.
*/
protected List<String> fetchAllPartitionPaths() {
HoodieTimer timer = HoodieTimer.start();
Option<HoodieRecord<HoodieMetadataPayload>> recordOpt = getRecordByKey(RECORDKEY_PARTITION_LIST,
MetadataPartitionType.FILES.getPartitionPath());
metrics.ifPresent(m -> m.u... | 3.68 |
flink_FlinkCalciteSqlValidator_getSnapShotNode | /**
* Get the {@link SqlSnapshot} node in a {@link SqlValidatorNamespace}.
*
* <p>In general, if there is a snapshot expression, the enclosing node of IdentifierNamespace
* is usually SqlSnapshot. However, if we encounter a situation with an "as" operator, we need
* to identify whether the enclosingNode is an "as"... | 3.68 |
hbase_EncryptionUtil_unwrapWALKey | /**
* Unwrap a wal key by decrypting it with the secret key of the given subject. The configuration
* must be set up correctly for key alias resolution.
* @param conf configuration
* @param subject subject key alias
* @param value the encrypted key bytes
* @return the raw key bytes
* @throws IOException if... | 3.68 |
morf_TableOutputter_outputHelp | /**
* @param workSheet to add the help to
* @param table to fetch metadata from
* @param startRow to start adding rows at
* @param helpTextRowNumbers - map to insert row numbers for each help field into
* @return the index of the next row to use
* @throws WriteException if any of the writes to workSheet failed
*... | 3.68 |
open-banking-gateway_EncryptionWithInitVectorOper_generateKey | /**
* Generate random symmetric key with initialization vector (IV)
* @return Secret key with IV
*/
@SneakyThrows
public SecretKeyWithIv generateKey() {
byte[] iv = new byte[encSpec.getIvSize()];
SecureRandom random = new SecureRandom();
random.nextBytes(iv);
KeyGenerator keyGen = KeyGenerator.getIn... | 3.68 |
flink_TwoInputTransformation_getInputType1 | /** Returns the {@code TypeInformation} for the elements from the first input. */
public TypeInformation<IN1> getInputType1() {
return input1.getOutputType();
} | 3.68 |
flink_LinkedListSerializer_getElementSerializer | /**
* Gets the serializer for the elements of the list.
*
* @return The serializer for the elements of the list
*/
public TypeSerializer<T> getElementSerializer() {
return elementSerializer;
} | 3.68 |
hadoop_HsAboutPage_content | /**
* The content of this page is the attempts block
* @return AttemptsBlock.class
*/
@Override protected Class<? extends SubView> content() {
HistoryInfo info = new HistoryInfo();
info("History Server").
__("BuildVersion", info.getHadoopBuildVersion()
+ " on " + info.getHadoopVersionBuiltOn()).
... | 3.68 |
hbase_KeyValueCodecWithTags_getDecoder | /**
* Implementation depends on {@link InputStream#available()}
*/
@Override
public Decoder getDecoder(final InputStream is) {
return new KeyValueDecoder(is);
} | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.