name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
framework_AbsoluteLayout_getLeftUnits | /**
* Gets the unit for the 'left' attribute.
*
* @return See {@link Sizeable} UNIT_SYMBOLS for a description of the
* available units.
*/
public Unit getLeftUnits() {
return leftUnits;
} | 3.68 |
framework_AbsoluteLayoutResizeComponents_expandButton | /**
* Create size change button for component
*
* @param component
* Component to controll with button
* @return Created Expand Button
*/
private Button expandButton(Component component) {
Button button = new Button("Change Size",
clickEvent -> resizeComponent(component));
button.se... | 3.68 |
querydsl_BeanPath_createMap | /**
* Create a new Map typed path
*
* @param <K>
* @param <V>
* @param <E>
* @param property property name
* @param key key type
* @param value value type
* @param queryType expression type
* @return property path
*/
@SuppressWarnings("unchecked")
protected <K, V, E extends SimpleExpression<? super V>> MapPa... | 3.68 |
hbase_MasterRpcServices_snapshot | /**
* Triggers an asynchronous attempt to take a snapshot. {@inheritDoc}
*/
@Override
public SnapshotResponse snapshot(RpcController controller, SnapshotRequest request)
throws ServiceException {
try {
server.checkInitialized();
server.snapshotManager.checkSnapshotSupport();
LOG.info(server.getClient... | 3.68 |
morf_ChangeIndex_getToIndex | /**
* Gets the index after the change
*
* @return the index after the change
*/
public Index getToIndex() {
return toIndex;
} | 3.68 |
hudi_SerializableSchema_readObjectFrom | // create a public read method for unit test
public void readObjectFrom(ObjectInputStream in) throws IOException {
try {
schema = new Schema.Parser().parse(in.readObject().toString());
} catch (ClassNotFoundException e) {
throw new IOException("unable to parse schema", e);
}
} | 3.68 |
hbase_SnapshotRegionProcedure_complete | // keep retrying until success
private void complete(MasterProcedureEnv env, Throwable error) {
if (isFinished()) {
LOG.info("This procedure {} is already finished, skip the rest processes", this.getProcId());
return;
}
if (event == null) {
LOG.warn("procedure event for {} is null, maybe the procedure... | 3.68 |
hibernate-validator_AnnotationApiHelper_isInterface | /**
* Test if the given {@link TypeMirror} represents an interface or not.
*/
public boolean isInterface(TypeMirror typeMirror) {
return TypeKind.DECLARED.equals( typeMirror.getKind() ) && ( (DeclaredType) typeMirror ).asElement().getKind().isInterface();
} | 3.68 |
hudi_BaseHoodieDateTimeParser_getOutputDateFormat | /**
* Returns the output date format in which the partition paths will be created for the hudi dataset.
*/
public String getOutputDateFormat() {
return getStringWithAltKeys(config, TIMESTAMP_OUTPUT_DATE_FORMAT);
} | 3.68 |
flink_CrossOperator_projectTuple24 | /**
* Projects a pair of crossed elements to a {@link Tuple} with the previously selected
* fields.
*
* @return The projected data set.
* @see Tuple
* @see DataSet
*/
public <
T0,
T1,
T2,
T3,
T4,
T5,
T... | 3.68 |
hbase_MiniZooKeeperCluster_waitForServerUp | // XXX: From o.a.zk.t.ClientBase. Its in the test jar but we don't depend on zk test jar.
// We remove the SSL/secure bit. Not used in here.
private static boolean waitForServerUp(int port, long timeout) throws IOException {
long start = EnvironmentEdgeManager.currentTime();
while (true) {
try {
String re... | 3.68 |
framework_GridSelectionAllowedEvent_isSelectionAllowed | /**
* Gets selection allowed value.
*
* @return {@code true} if selection is allowed, {@code false} otherwise
*/
public boolean isSelectionAllowed() {
return isSelectionAllowed;
} | 3.68 |
morf_ExecuteStatement_apply | /**
* {@inheritDoc}
*
* @see org.alfasoftware.morf.upgrade.SchemaChange#apply(org.alfasoftware.morf.metadata.Schema)
*/
@Override
public Schema apply(Schema schema) {
return schema;
} | 3.68 |
flink_ProjectOperator_projectTuple16 | /**
* Projects a {@link Tuple} {@link DataSet} to the previously selected fields.
*
* @return The projected DataSet.
* @see Tuple
* @see DataSet
*/
public <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>
ProjectOperator<
T,
Tuple16<
... | 3.68 |
hadoop_BCFile_getBlockIndexNear | /**
* Find the smallest Block index whose starting offset is greater than or
* equal to the specified offset.
*
* @param offset
* User-specific offset.
* @return the index to the data Block if such block exists; or -1
* otherwise.
*/
public int getBlockIndexNear(long offset) {
ArrayList<Bloc... | 3.68 |
hadoop_GangliaConf_getUnits | /**
* @return the units
*/
String getUnits() {
return units;
} | 3.68 |
flink_IntParser_parseField | /**
* Static utility to parse a field of type int from a byte sequence that represents text
* characters (such as when read from a file stream).
*
* @param bytes The bytes containing the text data that should be parsed.
* @param startPos The offset to start the parsing.
* @param length The length of the byte sequ... | 3.68 |
hadoop_BaseRecord_like | /**
* Check if this record matches a partial record.
*
* @param other Partial record.
* @return If this record matches.
*/
public boolean like(BaseRecord other) {
if (other == null) {
return false;
}
Map<String, String> thisKeys = this.getPrimaryKeys();
Map<String, String> otherKeys = other.getPrimaryK... | 3.68 |
streampipes_Formats_thriftFormat | /**
* Defines the transport format Apache Thrift used by a data stream at runtime.
*
* @return The {@link org.apache.streampipes.model.grounding.TransportFormat} of type Thrift.
*/
public static TransportFormat thriftFormat() {
return new TransportFormat(MessageFormat.THRIFT);
} | 3.68 |
framework_VAbsoluteLayout_setStylePrimaryName | /*
* (non-Javadoc)
*
* @see
* com.google.gwt.user.client.ui.UIObject#setStylePrimaryName(java.lang.
* String)
*/
@Override
public void setStylePrimaryName(String style) {
updateStylenames(style);
} | 3.68 |
framework_VAbstractCalendarPanel_focusPreviousDay | /**
* Moves the focus backward the given number of days.
*/
private void focusPreviousDay(int days) {
focusNextDay(-days);
} | 3.68 |
querydsl_Expressions_set | /**
* Combine the given expressions into a set expression
*
* @param exprs list elements
* @return list expression
*/
public static Expression<Tuple> set(Expression<?>... exprs) {
return set(Tuple.class, exprs);
} | 3.68 |
hadoop_FilterFileSystem_getWorkingDirectory | /**
* Get the current working directory for the given file system
*
* @return the directory pathname
*/
@Override
public Path getWorkingDirectory() {
return fs.getWorkingDirectory();
} | 3.68 |
rocketmq-connect_ExpressionBuilder_quote | /**
* Get a {@link Transform} that will surround the inputs with quotes.
*
* @return the transform; never null
*/
public static Transform<String> quote() {
return (builder, input) -> builder.appendColumnName(input);
}
/**
* Get a {@link Transform} that will quote just t... | 3.68 |
hadoop_MutableGaugeLong_incr | /**
* Increment by delta
* @param delta of the increment
*/
public void incr(long delta) {
value.addAndGet(delta);
setChanged();
} | 3.68 |
framework_ValueChangeHandler_setValueChangeTimeout | /**
* Sets the value change timeout to use.
*
* @see ValueChangeMode
*
* @param valueChangeTimeout
* the value change timeout
*/
public void setValueChangeTimeout(int valueChangeTimeout) {
this.valueChangeTimeout = valueChangeTimeout;
} | 3.68 |
flink_ExternalResourceUtils_generateExternalResourcesString | /** Generate the string expression of the given external resources. */
public static String generateExternalResourcesString(
Collection<ExternalResource> extendedResources) {
return extendedResources.stream()
.map(resource -> resource.getName() + "=" + resource.getValue())
.collect(C... | 3.68 |
hbase_HMaster_getClusterMetrics | /** Returns cluster status */
public ClusterMetrics getClusterMetrics() throws IOException {
return getClusterMetrics(EnumSet.allOf(Option.class));
} | 3.68 |
flink_FileSystemSafetyNet_initializeSafetyNetForThread | /**
* Activates the safety net for a thread. {@link FileSystem} instances obtained by the thread
* that called this method will be guarded, meaning that their created streams are tracked and
* can be closed via the safety net closing hook.
*
* <p>This method should be called at the beginning of a thread that shoul... | 3.68 |
hbase_PrivateCellUtil_compareKeyIgnoresMvcc | /**
* Compares only the key portion of a cell. It does not include the sequence id/mvcc of the cell
* @return an int greater than 0 if left > than right lesser than 0 if left < than right
* equal to 0 if left is equal to right
*/
public static final int compareKeyIgnoresMvcc(CellComparator comparator,... | 3.68 |
zxing_AddressBookParsedResult_getPhoneTypes | /**
* @return optional descriptions of the type of each phone number. It could be like "HOME", but,
* there is no guaranteed or standard format.
*/
public String[] getPhoneTypes() {
return phoneTypes;
} | 3.68 |
hbase_SyncTable_nextCellInRow | /**
* Returns the next Cell in the current row or null iff none remain.
*/
public Cell nextCellInRow() {
if (currentRowResult == null) {
// nothing left in current row
return null;
}
Cell nextCell = currentRowResult.rawCells()[nextCellInRow];
nextCellInRow++;
if (nextCellInRow == currentRowResult.s... | 3.68 |
framework_HasHierarchicalDataProvider_setItems | /**
* Sets the data items of this listing.
* <p>
* The provided items are wrapped into a {@link TreeDataProvider} backed by
* a flat {@link TreeData} structure. The data provider instance is used as
* a parameter for the {@link #setDataProvider(DataProvider)} method. It
* means that the items collection can be ac... | 3.68 |
hadoop_BlockData_getStateString | // Debug helper.
public String getStateString() {
StringBuilder sb = new StringBuilder();
int blockNumber = 0;
while (blockNumber < numBlocks) {
State tstate = getState(blockNumber);
int endBlockNumber = blockNumber;
while ((endBlockNumber < numBlocks) && (getState(endBlockNumber)
== tstate)) ... | 3.68 |
hbase_FileCleanerDelegate_postClean | /**
* Will be called after cleaner run.
*/
default void postClean() {
} | 3.68 |
hadoop_OSSListRequest_v1 | /**
* Restricted constructors to ensure v1 or v2, not both.
* @param request v1 request
* @return new list request container
*/
public static OSSListRequest v1(ListObjectsRequest request) {
return new OSSListRequest(request, null);
} | 3.68 |
hbase_VersionModel_getServerVersion | /** Returns the servlet container version */
@XmlAttribute(name = "Server")
public String getServerVersion() {
return serverVersion;
} | 3.68 |
hbase_Addressing_inetSocketAddress2String | /**
* Given an InetSocketAddress object returns a String represent of it. This is a util method for
* Java 17. The toString() function of InetSocketAddress will flag the unresolved address with a
* substring in the string, which will result in unexpected problem. We should use this util
* function to get the string... | 3.68 |
hmily_HmilyTimer_addRemovalListener | /**
* 增加一个缓存移除的监听器.
*
* @param listener 监听器;
*/
public void addRemovalListener(final TimerRemovalListener<V> listener) {
this.timerRemovalListener = listener;
} | 3.68 |
flink_HiveParserCalcitePlanner_genLogicalPlan | // Given an AST, generate and return the RelNode plan. Returns null if nothing needs to be done.
public RelNode genLogicalPlan(HiveParserASTNode ast) throws SemanticException {
LOG.info("Starting generating logical plan");
HiveParserPreCboCtx cboCtx = new HiveParserPreCboCtx();
// change the location of pos... | 3.68 |
framework_VCaption_getOwner | /**
* Returns Paintable for which this Caption belongs to.
*
* @return owner Widget
*/
public ComponentConnector getOwner() {
return owner;
} | 3.68 |
flink_ArrowUtils_createRowDataArrowWriter | /** Creates an {@link ArrowWriter} for the specified {@link VectorSchemaRoot}. */
public static ArrowWriter<RowData> createRowDataArrowWriter(
VectorSchemaRoot root, RowType rowType) {
ArrowFieldWriter<RowData>[] fieldWriters =
new ArrowFieldWriter[root.getFieldVectors().size()];
List<FieldV... | 3.68 |
framework_StringToShortConverter_getFormat | /**
* Returns the format used by
* {@link #convertToPresentation(Short, Class, Locale)} and
* {@link #convertToModel(String, Class, Locale)}.
*
* @param locale
* The locale to use
* @return A NumberFormat instance
*/
@Override
protected NumberFormat getFormat(Locale locale) {
if (locale == null) ... | 3.68 |
hbase_MasterWalManager_getFailedServersFromLogFolders | /**
* Inspect the log directory to find dead servers which need recovery work
* @return A set of ServerNames which aren't running but still have WAL files left in file system
* @deprecated With proc-v2, we can record the crash server with procedure store, so do not need
* to scan the wal directory to fi... | 3.68 |
flink_StreamProjection_projectTuple9 | /**
* Projects a {@link Tuple} {@link DataStream} to the previously selected fields.
*
* @return The projected DataStream.
* @see Tuple
* @see DataStream
*/
public <T0, T1, T2, T3, T4, T5, T6, T7, T8>
SingleOutputStreamOperator<Tuple9<T0, T1, T2, T3, T4, T5, T6, T7, T8>> projectTuple9() {
TypeInformat... | 3.68 |
framework_VLoadingIndicator_getElement | /**
* Returns the root element of the loading indicator.
*
* @return The loading indicator DOM element
*/
public com.google.gwt.user.client.Element getElement() {
if (element == null) {
element = DOM.createDiv();
element.getStyle().setPosition(Position.ABSOLUTE);
getConnection().getUICon... | 3.68 |
hadoop_AzureNativeFileSystemStore_trim | /**
* Trims a suffix/prefix from the given string. For example if
* s is given as "/xy" and toTrim is "/", this method returns "xy"
*/
private static String trim(String s, String toTrim) {
return StringUtils.removeEnd(StringUtils.removeStart(s, toTrim),
toTrim);
} | 3.68 |
hbase_BlockType_readAndCheck | /**
* Reads a magic record of the length {@link #MAGIC_LENGTH} from the given byte buffer and expects
* it to match this block type.
*/
public void readAndCheck(ByteBuffer in) throws IOException {
byte[] buf = new byte[MAGIC_LENGTH];
in.get(buf);
if (Bytes.compareTo(buf, magic) != 0) {
throw new IOExceptio... | 3.68 |
pulsar_PulsarLedgerIdGenerator_formatHalfId | /**
* Formats half an ID as 10-character 0-padded string.
* @param i - 32 bits of the ID to format
* @return a 10-character 0-padded string.
*/
private String formatHalfId(int i) {
return String.format("%010d", i);
} | 3.68 |
pulsar_BrokerInterceptor_producerCreated | /**
* Called by the broker when a new connection is created.
*/
default void producerCreated(ServerCnx cnx, Producer producer,
Map<String, String> metadata){
} | 3.68 |
hbase_AccessControlFilter_parseFrom | /**
* @param pbBytes A pb serialized {@link AccessControlFilter} instance
* @return An instance of {@link AccessControlFilter} made from <code>bytes</code>
* @throws org.apache.hadoop.hbase.exceptions.DeserializationException
* @see #toByteArray()
*/
public static AccessControlFilter parseFrom(final byte[] pbBytes... | 3.68 |
mutate-test-kata_CompanyFixed_employeeWithLargestSalary | /**
* find the employee with the largest salary
* @return the employee with the largest salary
* @throws NoSuchElementException if there are no employees at the company
*/
public EmployeeFixed employeeWithLargestSalary()
{
return this.employees
.stream()
.max(Comparator.comparing(Employe... | 3.68 |
flink_MethodlessRouter_route | /** @return {@code null} if no match */
public RouteResult<T> route(
String uri,
String decodedPath,
Map<String, List<String>> queryParameters,
String[] pathTokens) {
// Optimize: reuse requestPathTokens and pathParams in the loop
Map<String, String> pathParams = new HashMap<>();... | 3.68 |
hmily_HmilyRepositoryFacade_removeHmilyTransaction | /**
* Remove hmily transaction.
*
* @param transId the trans id
*/
public void removeHmilyTransaction(final Long transId) {
if (hmilyConfig.isPhyDeleted()) {
checkRows(hmilyRepository.removeHmilyTransaction(transId));
} else {
updateHmilyTransactionStatus(transId, HmilyActionEnum.DELETE.getC... | 3.68 |
flink_EnvironmentInformation_logEnvironmentInfo | /**
* Logs information about the environment, like code revision, current user, Java version, and
* JVM parameters.
*
* @param log The logger to log the information to.
* @param componentName The component name to mention in the log.
* @param commandLineArgs The arguments accompanying the starting the component.
... | 3.68 |
hmily_HmilyRepositoryFacade_removeHmilyParticipant | /**
* Remove hmily participant.
*
* @param participantId the participant id
*/
public void removeHmilyParticipant(final Long participantId) {
if (hmilyConfig.isPhyDeleted()) {
checkRows(hmilyRepository.removeHmilyParticipant(participantId));
} else {
updateHmilyParticipantStatus(participantI... | 3.68 |
morf_SchemaUtils_unique | /**
* @see org.alfasoftware.morf.metadata.SchemaUtils.IndexBuilder#unique()
*/
@Override
public IndexBuilder unique() {
return new IndexBuilderImpl(getName(), true, columnNames());
} | 3.68 |
framework_FileDownloader_getFileDownloadResource | /**
* Gets the resource set for download.
*
* @return the resource that will be downloaded if clicking the extended
* component
*/
public Resource getFileDownloadResource() {
return getResource("dl");
} | 3.68 |
hbase_RegionStates_getAssignmentsForBalancer | /**
* This is an EXPENSIVE clone. Cloning though is the safest thing to do. Can't let out original
* since it can change and at least the load balancer wants to iterate this exported list. We need
* to synchronize on regions since all access to this.servers is under a lock on this.regions.
* @return A clone of curr... | 3.68 |
framework_AbstractOrderedLayoutConnector_getTooltipInfo | /*
* (non-Javadoc)
*
* @see
* com.vaadin.client.ui.AbstractComponentConnector#getTooltipInfo(com.google
* .gwt.dom.client.Element)
*/
@Override
public TooltipInfo getTooltipInfo(
com.google.gwt.dom.client.Element element) {
if (element != getWidget().getElement()) {
Slot slot = WidgetUtil.find... | 3.68 |
Activiti_SimpleContext_setELResolver | /**
* Set our resolver.
*
* @param resolver
*/
public void setELResolver(ELResolver resolver) {
this.resolver = resolver;
} | 3.68 |
hadoop_ProxyUtils_sendRedirect | /**
* Handle redirects with a status code that can in future support verbs other
* than GET, thus supporting full REST functionality.
* <p>
* The target URL is included in the redirect text returned
* <p>
* At the end of this method, the output stream is closed.
*
* @param request request (hence: the verb and ... | 3.68 |
querydsl_SQLExpressions_addMinutes | /**
* Add the given amount of minutes to the date
*
* @param date datetime
* @param minutes minutes to add
* @return converted datetime
*/
public static <D extends Comparable> DateTimeExpression<D> addMinutes(DateTimeExpression<D> date, int minutes) {
return Expressions.dateTimeOperation(date.getType(), Ops.D... | 3.68 |
framework_AbstractInMemoryContainer_getFirstVisibleItem | /**
* Returns the item id of the first visible item after filtering. 'Null' is
* returned if there is no visible items.
* <p>
* For internal use only.
*
* @since 7.4
*
* @return item id of the first visible item
*/
protected ITEMIDTYPE getFirstVisibleItem() {
if (!getVisibleItemIds().isEmpty()) {
r... | 3.68 |
hudi_CompactionUtils_buildHoodieCompactionOperation | /**
* Build Avro generated Compaction operation payload from compaction operation POJO for serialization.
*/
public static HoodieCompactionOperation buildHoodieCompactionOperation(CompactionOperation op) {
return HoodieCompactionOperation.newBuilder().setFileId(op.getFileId()).setBaseInstantTime(op.getBaseInstantTi... | 3.68 |
dubbo_ServiceAnnotationPostProcessor_buildServiceBeanDefinition | /**
* Build the {@link AbstractBeanDefinition Bean Definition}
*
*
* @param serviceAnnotationAttributes
* @param serviceInterface
* @param refServiceBeanName
* @return
* @since 2.7.3
*/
private AbstractBeanDefinition buildServiceBeanDefinition(
Map<String, Object> serviceAnnotationAttributes, String se... | 3.68 |
flink_HandlerRequest_create | /**
* Creates a new {@link HandlerRequest}. The given {@link MessageParameters} are expected to be
* resolved.
*/
@VisibleForTesting
public static <R extends RequestBody, M extends MessageParameters> HandlerRequest<R> create(
R requestBody, M messageParameters, Collection<File> uploadedFiles) {
return ne... | 3.68 |
rocketmq-connect_ColumnDefinition_isAutoIncrement | /**
* Indicates whether the column is automatically numbered.
*
* @return <code>true</code> if so; <code>false</code> otherwise
*/
public boolean isAutoIncrement() {
return autoIncremented;
} | 3.68 |
hadoop_DomainNameResolverFactory_newInstance | /**
* This function gets the instance based on the config.
*
* @param conf Configuration
* @param configKey config key name.
* @return Domain name resolver.
*/
public static DomainNameResolver newInstance(
Configuration conf, String configKey) {
Class<? extends DomainNameResolver> resolverClass = conf.getCl... | 3.68 |
framework_QuerySortOrder_getSorted | /**
* Gets sorting information.
*
* @return sorting entity, usually field id
*/
@Override
public String getSorted() {
return super.getSorted();
} | 3.68 |
framework_IndexedContainer_addItemProperty | /**
* IndexedContainerItem does not support adding new properties. Add
* properties at container level. See
* {@link IndexedContainer#addContainerProperty(Object, Class, Object)}
*
* @see Item#addProperty(Object, Property)
*/
@Override
public boolean addItemProperty(Object id, Property property)
throws Un... | 3.68 |
hadoop_RegistryPathStatus_hashCode | /**
* The hash code is derived from the path.
* @return hash code for storing the path in maps.
*/
@Override
public int hashCode() {
return path != null ? path.hashCode() : 0;
} | 3.68 |
hbase_MetricRegistryInfo_getMetricsJmxContext | /**
* Get the name of the context in JMX that this source will be exposed through. This is in
* ObjectName format. With the default context being Hadoop -> HBase
*/
public String getMetricsJmxContext() {
return metricsJmxContext;
} | 3.68 |
hbase_ProcedureUtil_convertToProcedure | /**
* Helper to convert the protobuf procedure.
* <p/>
* Used by ProcedureStore implementations.
* <p/>
* TODO: OPTIMIZATION: some of the field never change during the execution (e.g. className,
* procId, parentId, ...). We can split in 'data' and 'state', and the store may take advantage of
* it by storing the ... | 3.68 |
hadoop_EntityTypeReader_readEntityTypes | /**
* Reads a set of timeline entity types from the HBase storage for the given
* context.
*
* @param hbaseConf HBase Configuration.
* @param conn HBase Connection.
* @return a set of <cite>TimelineEntity</cite> objects, with only type field
* set.
* @throws IOException if any exception is encountered w... | 3.68 |
hbase_Mutation_getCellList | /**
* Creates an empty list if one doesn't exist for the given column family or else it returns the
* associated list of Cell objects.
* @param family column family
* @return a list of Cell objects, returns an empty list if one doesn't exist.
*/
List<Cell> getCellList(byte[] family) {
List<Cell> list = getFamily... | 3.68 |
hibernate-validator_NodeImpl_includeTypeParameterInformation | // TODO: this is used to reduce the number of differences until we agree on the string representation
// it introduces some inconsistent behavior e.g. you get '<V>' for a Multimap but not for a Map
private static boolean includeTypeParameterInformation(Class<?> containerClass, Integer typeArgumentIndex) {
if ( contain... | 3.68 |
flink_Configuration_keySet | /**
* Returns the keys of all key/value pairs stored inside this configuration object.
*
* @return the keys of all key/value pairs stored inside this configuration object
*/
public Set<String> keySet() {
synchronized (this.confData) {
return new HashSet<>(this.confData.keySet());
}
} | 3.68 |
flink_TypeExtractor_getTypeInfoFactory | /** Returns the type information factory for an annotated field. */
@Internal
@SuppressWarnings("unchecked")
public static <OUT> TypeInfoFactory<OUT> getTypeInfoFactory(Field field) {
if (!isClassType(field.getType()) || !field.isAnnotationPresent(TypeInfo.class)) {
return null;
}
Class<?> factoryC... | 3.68 |
pulsar_ReaderConfiguration_setCryptoFailureAction | /**
* Sets the ConsumerCryptoFailureAction to the value specified.
*
* @param action
* The action to take when the decoding fails
*/
public void setCryptoFailureAction(ConsumerCryptoFailureAction action) {
conf.setCryptoFailureAction(action);
} | 3.68 |
hbase_RegionReplicationFlushRequester_recordFlush | /**
* Record that we have already finished a flush with the given {@code sequenceId}.
* <p/>
* We can cancel the pending flush request if the failed sequence id is less than the given
* {@code sequenceId}.
*/
synchronized void recordFlush(long sequenceId) {
this.lastFlushedSequenceId = sequenceId;
// cancel th... | 3.68 |
flink_KeyGroupRange_getEndKeyGroup | /** @return The last key-group in the range. */
public int getEndKeyGroup() {
return endKeyGroup;
} | 3.68 |
flink_DefaultRollingPolicy_withRolloverInterval | /**
* Sets the max time a part file can stay open before having to roll. The frequency at which
* this is checked is controlled by the {@link
* org.apache.flink.streaming.api.functions.sink.filesystem.StreamingFileSink.RowFormatBuilder#withBucketCheckInterval(long)}
* setting.
*
* @param interval the desired roll... | 3.68 |
hadoop_ZKDelegationTokenSecretManagerImpl_rebuildTokenCache | /**
* This function will rebuild local token cache from zk storage.
* It is first called when the secret manager is initialized and
* then regularly at a configured interval.
*
* @param initial whether this is called during initialization
* @throws IOException
*/
private void rebuildTokenCache(boolean initial) t... | 3.68 |
hbase_MasterCoprocessorHost_preTruncateRegion | /**
* Invoked just before calling the truncate region procedure
* @param regionInfo region being truncated
*/
public void preTruncateRegion(RegionInfo regionInfo) throws IOException {
execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {
@Override
public void call(MasterObserv... | 3.68 |
morf_AbstractSqlDialectTest_expectedSqlForMathOperations1 | /**
* @return expected SQL for math operation 1
*/
protected String expectedSqlForMathOperations1() {
return "a / b + c";
} | 3.68 |
flink_DataStream_keyBy | /**
* Partitions the operator state of a {@link DataStream} using field expressions. A field
* expression is either the name of a public field or a getter method with parentheses of the
* {@link DataStream}'s underlying type. A dot can be used to drill down into objects, as in
* {@code "field1.getInnerField2()" }.
... | 3.68 |
flink_HandlerRequestUtils_fromRequestBodyOrQueryParameter | /**
* Returns {@code requestValue} if it is not null, otherwise returns the query parameter value
* if it is not null, otherwise returns the default value.
*/
public static <T> T fromRequestBodyOrQueryParameter(
T requestValue,
SupplierWithException<T, RestHandlerException> queryParameterExtractor,
... | 3.68 |
hbase_HBackupFileSystem_getLogBackupDir | /**
* Given the backup root dir and the backup id, return the log file location for an incremental
* backup.
* @param backupRootDir backup root directory
* @param backupId backup id
* @return logBackupDir: ".../user/biadmin/backup/WALs/backup_1396650096738"
*/
public static String getLogBackupDir(String back... | 3.68 |
morf_SchemaChangeSequence_addTable | /**
* @see org.alfasoftware.morf.upgrade.SchemaEditor#addTable(org.alfasoftware.morf.metadata.Table)
*/
@Override
public void addTable(Table definition) {
// track added tables...
tableAdditions.add(definition.getName());
AddTable addTable = new AddTable(definition);
visitor.visit(addTable);
schemaAndDataC... | 3.68 |
pulsar_AdminResource_validateBundleOwnership | // This is a stub method for Mockito
@Override
protected void validateBundleOwnership(String property, String cluster, String namespace, boolean authoritative,
boolean readOnly, NamespaceBundle bundle) {
super.validateBundleOwnership(property, cluster, namespace, authoritative, readOnly, bundle);
} | 3.68 |
hbase_RpcServer_call | /**
* This is a server side method, which is invoked over RPC. On success the return response has
* protobuf response payload. On failure, the exception name and the stack trace are returned in
* the protobuf response.
*/
@Override
public Pair<Message, CellScanner> call(RpcCall call, MonitoredRPCHandler status)
t... | 3.68 |
framework_Resolution_getResolutionsHigherOrEqualTo | /**
* Returns the resolutions that are higher or equal to the given resolution,
* starting from the given resolution. In other words passing DAY to this
* methods returns DAY,MONTH,YEAR
*
* @param r
* The resolution to start from
* @return An iterable for the resolutions higher or equal to r
*/
publi... | 3.68 |
flink_MessageParameter_resolveFromString | /**
* Resolves this parameter for the given string value representation.
*
* @param value string representation of value to resolve this parameter with
*/
public final void resolveFromString(String value) throws ConversionException {
resolve(convertFromString(value));
} | 3.68 |
hbase_ScannerContext_hasTimeLimit | /** Returns true if the time limit can be enforced in the checker's scope */
boolean hasTimeLimit(LimitScope checkerScope) {
return limits.canEnforceTimeLimitFromScope(checkerScope)
&& (limits.getTime() > 0 || returnImmediately);
} | 3.68 |
flink_IterableUtils_toStream | /**
* Convert the given {@link Iterable} to a {@link Stream}.
*
* @param iterable to convert to a stream
* @param <E> type of the elements of the iterable
* @return stream converted from the given {@link Iterable}
*/
public static <E> Stream<E> toStream(Iterable<E> iterable) {
checkNotNull(iterable);
ret... | 3.68 |
flink_ResultPartitionType_isBlockingOrBlockingPersistentResultPartition | /**
* {@link #isBlockingOrBlockingPersistentResultPartition()} is used to judge whether it is the
* specified {@link #BLOCKING} or {@link #BLOCKING_PERSISTENT} resultPartitionType.
*
* <p>this method suitable for judgment conditions related to the specific implementation of
* {@link ResultPartitionType}.
*
* <p>... | 3.68 |
flink_ReOpenableMutableHashTable_storeInitialHashTable | /**
* This method stores the initial hash table's contents on disk if hash join needs the memory
* for further partition processing. The initial hash table is rebuild before a new secondary
* input is opened.
*
* <p>For the sake of simplicity we iterate over all in-memory elements and store them in one
* file. Th... | 3.68 |
graphhopper_PbfFieldDecoder_decodeString | /**
* Decodes a raw string into a String.
* <p>
*
* @param rawString The PBF encoding string.
* @return The string as a String.
*/
public String decodeString(int rawString) {
return strings[rawString];
} | 3.68 |
framework_DragSourceExtensionConnector_onDragStart | /**
* Event handler for the {@code dragstart} event. Called when {@code
* dragstart} event occurs.
*
* @param event
* browser event to be handled
*/
protected void onDragStart(Event event) {
// Convert elemental event to have access to dataTransfer
NativeEvent nativeEvent = (NativeEvent) event;... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.