name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
rocketmq-connect_KafkaSinkValueConverter_convertStructValue | /**
* convert struct value
*
* @param toStruct
* @param originalStruct
*/
private void convertStructValue(Struct toStruct, org.apache.kafka.connect.data.Struct originalStruct) {
for (Field field : toStruct.schema().fields()) {
try {
Schema.Type type = field.schema().type();
Obj... | 3.68 |
framework_PropertysetItem_toString | /**
* Gets the <code>String</code> representation of the contents of the Item.
* The format of the string is a space separated catenation of the
* <code>String</code> representations of the Properties contained by the
* Item.
*
* @return <code>String</code> representation of the Item contents
*/
@Override
public... | 3.68 |
hadoop_DiskBalancerWorkItem_getBandwidth | /**
* Max disk bandwidth to use. MB per second.
*
* @return - long.
*/
public long getBandwidth() {
return bandwidth;
} | 3.68 |
hmily_HmilyXaResource_prepare | /**
* Prepare int.
*
* @return the int
* @throws XAException the xa exception
*/
public int prepare() throws XAException {
return this.prepare(this.xid);
} | 3.68 |
hbase_RegionInfo_isAdjacent | /**
* Returns True if region is adjacent, either just before or just after this one.
* @see #isNext(RegionInfo)
*/
default boolean isAdjacent(RegionInfo other) {
return getTable().equals(other.getTable()) && areAdjacent(this, other);
} | 3.68 |
framework_DeclarativeTestUI_getDesignPath | /**
* Figure out the proper path for the HTML design file
*/
private String getDesignPath() {
Class<?> clazz = getClass();
String designFilePath = null;
if (clazz.getAnnotation(DeclarativeUI.class).absolutePath()) {
designFilePath = "";
} else {
// This is rather nasty.. but it works w... | 3.68 |
framework_AbstractBeanContainer_addValueChangeListener | /**
* Make this container listen to the given property provided it notifies
* when its value changes.
*
* @param item
* The {@link Item} that contains the property
* @param propertyId
* The id of the property
*/
private void addValueChangeListener(Item item, Object propertyId) {
Proper... | 3.68 |
flink_RocksDBNativeMetricOptions_enableNumImmutableMemTable | /** Returns number of immutable memtables that have not yet been flushed. */
public void enableNumImmutableMemTable() {
this.properties.add(RocksDBProperty.NumImmutableMemTable.getRocksDBProperty());
} | 3.68 |
morf_SchemaUtils_primaryKey | /**
* @see org.alfasoftware.morf.metadata.SchemaUtils.ColumnBuilder#primaryKey()
*/
@Override
public ColumnBuilder primaryKey() {
return new ColumnBuilderImpl(this, isNullable(), getDefaultValue(), true, isAutoNumbered(), getAutoNumberStart());
} | 3.68 |
framework_MultiSelect_deselect | /**
* Removes the given items from the set of currently selected items.
* <p>
* If the none of the items were selected, this is a NO-OP.
* <p>
* This is a short-hand for {@link #updateSelection(Set, Set)} with nothing
* to select.
*
* @param items
* to remove from selection, not {@code null}
*/
pub... | 3.68 |
framework_RpcDataProviderExtension_removeDataGenerator | /**
* Removes a {@link DataGenerator} from this
* {@code RpcDataProviderExtension}. If given DataGenerator is not added to
* this data provider, this method does nothing.
*
* @since 7.6
* @param generator
* generator to remove
*/
public void removeDataGenerator(DataGenerator generator) {
dataGene... | 3.68 |
hbase_MasterObserver_preMergeRegionsAction | /**
* Called before the regions merge.
* @param ctx the environment to interact with the framework and master
*/
default void preMergeRegionsAction(final ObserverContext<MasterCoprocessorEnvironment> ctx,
final RegionInfo[] regionsToMerge) throws IOException {
} | 3.68 |
flink_DeltaIteration_closeWith | /**
* Closes the delta iteration. This method defines the end of the delta iteration's function.
*
* @param solutionSetDelta The delta for the solution set. The delta will be merged into the
* solution set at the end of each iteration.
* @param newWorkset The new workset (feedback data set) that will be fed ba... | 3.68 |
hadoop_S3APrefetchingInputStream_read | /**
* Reads up to {@code len} bytes from this stream and copies them into
* the given {@code buffer} starting at the given {@code offset}.
* Returns the number of bytes actually copied in to the given buffer.
*
* @param buffer the buffer to copy data into.
* @param offset data is copied starting at this offset.
... | 3.68 |
framework_JsonCodec_getInternalTransportType | /*
* These methods looks good to inline, but are on a cold path of the
* otherwise hot encode method, which needed to be shorted to allow inlining
* of the hot part.
*/
private static String getInternalTransportType(Type valueType) {
return TYPE_TO_TRANSPORT_TYPE.get(getClassForType(valueType));
} | 3.68 |
flink_RootExceptionHistoryEntry_fromFailureHandlingResultSnapshot | /**
* Creates a {@code RootExceptionHistoryEntry} based on the passed {@link
* FailureHandlingResultSnapshot}.
*
* @param snapshot The reason for the failure.
* @return The {@code RootExceptionHistoryEntry} instance.
* @throws NullPointerException if {@code cause} or {@code failingTaskName} are {@code null}.
* @... | 3.68 |
hbase_ZKSecretWatcher_refreshKeys | /**
* refresh keys
*/
synchronized void refreshKeys() {
try {
List<ZKUtil.NodeAndData> nodes =
ZKUtil.getChildDataAndWatchForNewChildren(watcher, keysParentZNode);
refreshNodes(nodes);
} catch (KeeperException ke) {
LOG.error(HBaseMarkers.FATAL, "Error reading data from zookeeper", ke);
watc... | 3.68 |
hbase_MetricsSource_incrSourceInitializing | /**
* Increment the count for initializing sources
*/
public void incrSourceInitializing() {
singleSourceSource.incrSourceInitializing();
globalSourceSource.incrSourceInitializing();
} | 3.68 |
hbase_MiniHBaseCluster_abortRegionServer | /**
* Cause a region server to exit doing basic clean up only on its way out.
* @param serverNumber Used as index into a list.
*/
public String abortRegionServer(int serverNumber) {
HRegionServer server = getRegionServer(serverNumber);
LOG.info("Aborting " + server.toString());
server.abort("Aborting for tests... | 3.68 |
hudi_HoodieDataSourceHelpers_hasNewCommits | /**
* Checks if the Hoodie table has new data since given timestamp. This can be subsequently fed to an incremental
* view read, to perform incremental processing.
*/
@PublicAPIMethod(maturity = ApiMaturityLevel.STABLE)
public static boolean hasNewCommits(FileSystem fs, String basePath, String commitTimestamp) {
r... | 3.68 |
hadoop_Trilean_getTrilean | /**
* Converts String to Trilean.
*
* @param str the string to convert.
* @return the corresponding Trilean for the passed string str.
*/
public static Trilean getTrilean(String str) {
if (TRUE_STR.equalsIgnoreCase(str)) {
return Trilean.TRUE;
}
if (FALSE_STR.equalsIgnoreCase(str)) {
return Trilean.... | 3.68 |
framework_PointerEvent_isPrimary | /**
* Indicates whether the pointer is the primary pointer of this type.
*
* @return true if the pointer is the primary pointer, otherwise false
*/
public final boolean isPrimary() {
return isPrimary(getNativeEvent());
} | 3.68 |
hbase_MasterObserver_preTableFlush | /**
* Called before the table memstore is flushed to disk.
* @param ctx the environment to interact with the framework and master
* @param tableName the name of the table
*/
default void preTableFlush(final ObserverContext<MasterCoprocessorEnvironment> ctx,
final TableName tableName) throws IOException {
} | 3.68 |
flink_TestingSinkSettings_getCheckpointingMode | /** Checkpointing mode required for the sink. */
public CheckpointingMode getCheckpointingMode() {
return checkpointingMode;
} | 3.68 |
framework_GridDragSourceConnector_addDraggedStyle | /**
* Add {@code v-grid-row-dragged} class name to each row being dragged.
*
* @param event
* The dragstart event.
*/
@Override
protected void addDraggedStyle(NativeEvent event) {
getDraggedRowElementStream().forEach(
rowElement -> rowElement.addClassName(draggedStyleName));
} | 3.68 |
pulsar_ProducerConfiguration_setProperties | /**
* Add all the properties in the provided map.
*
* @param properties
* @return
*/
public ProducerConfiguration setProperties(Map<String, String> properties) {
conf.getProperties().putAll(properties);
return this;
} | 3.68 |
hbase_DeleteNamespaceProcedure_deleteNamespace | /**
* delete the row from the ns family in meta table.
* @param env MasterProcedureEnv
* @param namespaceName name of the namespace in string format
*/
private static void deleteNamespace(MasterProcedureEnv env, String namespaceName)
throws IOException {
getTableNamespaceManager(env).deleteNamespace(n... | 3.68 |
flink_ApplicationStatus_deriveJobStatus | /**
* Derives the {@link JobStatus} from the {@code ApplicationStatus}.
*
* @return The corresponding {@code JobStatus}.
* @throws UnsupportedOperationException for {@link #UNKNOWN}.
*/
public JobStatus deriveJobStatus() {
if (!JOB_STATUS_APPLICATION_STATUS_BI_MAP.inverse().containsKey(this)) {
throw n... | 3.68 |
flink_BlobClient_receiveAndCheckGetResponse | /**
* Reads the response from the input stream and throws in case of errors.
*
* @param is stream to read from
* @throws IOException if the response is an error or reading the response failed
*/
private static void receiveAndCheckGetResponse(InputStream is) throws IOException {
int response = is.read();
if... | 3.68 |
graphhopper_AccessFilter_allEdges | /**
* Accepts all edges that are either forward or backward according to the given accessEnc.
* Edges where neither one of the flags is enabled will still not be accepted. If you need to retrieve all edges
* regardless of their encoding use {@link EdgeFilter#ALL_EDGES} instead.
*/
public static AccessFilter allEdge... | 3.68 |
hadoop_SinglePendingCommit_serializer | /**
* Get a JSON serializer for this class.
* @return a serializer.
*/
public static JsonSerialization<SinglePendingCommit> serializer() {
return new JsonSerialization<>(SinglePendingCommit.class, false, false);
} | 3.68 |
hadoop_AddMountAttributes_getMountTableEntryWithAttributes | /**
* Retrieve mount table object with all attributes derived from this object.
*
* @return MountTable object with updated attributes.
* @throws IOException If mount table instantiation fails.
*/
public MountTable getMountTableEntryWithAttributes() throws IOException {
String normalizedMount = RouterAdmin.normal... | 3.68 |
hbase_RegionNormalizerFactory_createNormalizerManager | // TODO: consolidate this down to MasterServices
public static RegionNormalizerManager createNormalizerManager(final Configuration conf,
final MasterRegion masterRegion, final ZKWatcher zkWatcher, final HMaster master)
throws DeserializationException, IOException, KeeperException {
final RegionNormalizer regionNo... | 3.68 |
framework_VComboBox_showSuggestions | /**
* Shows the popup where the user can see the filtered options that have
* been set with a call to
* {@link SuggestionMenu#setSuggestions(Collection)}.
*
* @param currentPage
* The current page number
*/
public void showSuggestions(final int currentPage) {
debug("VComboBox.SP: showSuggestions(... | 3.68 |
flink_ExecutorUtils_nonBlockingShutdown | /**
* Shuts the given {@link ExecutorService} down in a non-blocking fashion. The shut down will be
* executed by a thread from the common fork-join pool.
*
* <p>The executor services will be shut down gracefully for the given timeout period.
* Afterwards {@link ExecutorService#shutdownNow()} will be called.
*
*... | 3.68 |
framework_ComputedStyle_getDoubleProperty | /**
* Retrieves the given computed property as a double.
*
* Returns NaN if the property cannot be converted to a double
*
* @since 7.5.1
* @param name
* the property to retrieve
* @return the double value of the property
*/
public final double getDoubleProperty(String name) {
Profiler.enter("Co... | 3.68 |
morf_SqlDialect_getSqlForCriterionValueList | /**
* Converts a list of values on a criterion into a comma-separated list.
*
* @param criterion The criterion to convert
* @return The converted criterion as a String
*/
@SuppressWarnings("unchecked")
protected String getSqlForCriterionValueList(Criterion criterion) {
if (!(criterion.getValue() instanceof List)... | 3.68 |
flink_BinaryInMemorySortBuffer_createBuffer | /** Create a memory sorter in `insert` way. */
public static BinaryInMemorySortBuffer createBuffer(
NormalizedKeyComputer normalizedKeyComputer,
AbstractRowDataSerializer<RowData> inputSerializer,
BinaryRowDataSerializer serializer,
RecordComparator comparator,
MemorySegmentPool ... | 3.68 |
hbase_ZNodePaths_joinZNode | /**
* Join the prefix znode name with the suffix znode name to generate a proper full znode name.
* <p>
* Assumes prefix does not end with slash and suffix does not begin with it.
* @param prefix beginning of znode name
* @param suffix ending of znode name
* @return result of properly joining prefix with suffix
... | 3.68 |
flink_ConfigOptions_enumType | /**
* Defines that the value of the option should be of {@link Enum} type.
*
* @param enumClass Concrete type of the expected enum.
*/
public <T extends Enum<T>> TypedConfigOptionBuilder<T> enumType(Class<T> enumClass) {
return new TypedConfigOptionBuilder<>(key, enumClass);
} | 3.68 |
hbase_SpaceLimitSettings_fromSpaceQuota | /**
* Constructs a {@link SpaceLimitSettings} from the provided protobuf message and namespace.
* @param namespace The target namespace for the limit.
* @param proto The protobuf representation.
* @return A QuotaSettings.
*/
static SpaceLimitSettings fromSpaceQuota(final String namespace,
final QuotaProtos.S... | 3.68 |
flink_PekkoRpcService_connect | // this method does not mutate state and is thus thread-safe
@Override
public <F extends Serializable, C extends FencedRpcGateway<F>> CompletableFuture<C> connect(
String address, F fencingToken, Class<C> clazz) {
return connectInternal(
address,
clazz,
(ActorRef actorRef... | 3.68 |
flink_CollectionUtil_newLinkedHashMapWithExpectedSize | /**
* Creates a new {@link LinkedHashMap} of the expected size, i.e. a hash map that will not
* rehash if expectedSize many keys are inserted, considering the load factor.
*
* @param expectedSize the expected size of the created hash map.
* @return a new hash map instance with enough capacity for the expected size... | 3.68 |
hbase_HttpServer_setBindAddress | /**
* @see #addEndpoint(URI)
* @deprecated Since 0.99.0. Use {@link #addEndpoint(URI)} instead.
*/
@Deprecated
public Builder setBindAddress(String bindAddress) {
this.bindAddress = bindAddress;
return this;
} | 3.68 |
flink_DelimitedInputFormat_fillBuffer | /** Fills the read buffer with bytes read from the file starting from an offset. */
private boolean fillBuffer(int offset) throws IOException {
int maxReadLength = this.readBuffer.length - offset;
// special case for reading the whole split.
if (this.splitLength == FileInputFormat.READ_WHOLE_SPLIT_FLAG) {
... | 3.68 |
hbase_HRegionFileSystem_rename | /**
* Renames a directory. Assumes the user has already checked for this directory existence.
* @return true if rename is successful.
*/
boolean rename(Path srcpath, Path dstPath) throws IOException {
IOException lastIOE = null;
int i = 0;
do {
try {
return fs.rename(srcpath, dstPath);
} catch (I... | 3.68 |
streampipes_AssetLinkBuilder_build | /**
* Builds and returns the final instance of AssetLink.
*
* @return The constructed AssetLink instance.
*/
public AssetLink build() {
return this.assetLink;
} | 3.68 |
shardingsphere-elasticjob_JobFacade_postJobStatusTraceEvent | /**
* Post job status trace event.
*
* @param taskId task Id
* @param state job state
* @param message job message
*/
public void postJobStatusTraceEvent(final String taskId, final State state, final String message) {
TaskContext taskContext = TaskContext.from(taskId);
jobTracingEventBus.post(new JobStatu... | 3.68 |
flink_CatalogManager_listTemporaryViews | /**
* Returns an array of names of temporary views registered in the namespace of the current
* catalog and database.
*
* @return names of registered temporary views
*/
public Set<String> listTemporaryViews() {
return listTemporaryViewsInternal(getCurrentCatalog(), getCurrentDatabase())
.map(e -> e... | 3.68 |
framework_FocusElementPanel_getFocusElement | /**
* @return the focus element
*/
public com.google.gwt.user.client.Element getFocusElement() {
return focusElement.cast();
} | 3.68 |
querydsl_SerializerBase_getConstantLabel | /**
* Generate a constant value under which to register a new constant in {@link #getConstantToLabel()}.
*
* @param value the constant value or parameter to create a constant for
* @return the generated label
*/
@NotNull
protected String getConstantLabel(Object value) {
return constantPrefix + (getConstantToLa... | 3.68 |
hbase_RegionReplicationBufferManager_increase | /**
* Return whether we should just drop all the edits, if we have reached the hard limit of max
* pending size.
* @return {@code true} means OK, {@code false} means drop all the edits.
*/
public boolean increase(long size) {
long sz = pendingSize.addAndGet(size);
if (sz > softMaxPendingSize) {
executor.exe... | 3.68 |
framework_BrowserWindowOpener_setUrl | /**
* Sets the provided URL {@code url} for this instance. The {@code url} will
* be opened in a new browser window/tab when the extended component is
* clicked.
*
* @since 7.4
*
* @param url
* URL to open
*/
public void setUrl(String url) {
setResource(new ExternalResource(url));
} | 3.68 |
morf_TableOutputter_createTitle | /**
* Inserts a row at the top of the sheet with the given title
* @param sheet to add the title to
* @param title to add
* @param fileName of the ALFA file to which the sheet relates
*/
private void createTitle(WritableSheet sheet, String title, String fileName) {
try {
//Friendly file name in A1
Label ... | 3.68 |
querydsl_BeanPath_createDate | /**
* Create a new Date path
*
* @param <A>
* @param property property name
* @param type property type
* @return property path
*/
@SuppressWarnings("unchecked")
protected <A extends Comparable> DatePath<A> createDate(String property, Class<? super A> type) {
return add(new DatePath<A>((Class) type, forPrope... | 3.68 |
shardingsphere-elasticjob_JobNodeStorage_executeInTransaction | /**
* Execute operations in transaction.
*
* @param transactionOperations operations to be executed in transaction
*/
public void executeInTransaction(final List<TransactionOperation> transactionOperations) {
List<TransactionOperation> result = new ArrayList<>(transactionOperations.size() + 1);
result.add(... | 3.68 |
morf_DummyXmlOutputStreamProvider_openOutputStreamForTable | /**
* @see org.alfasoftware.morf.xml.XmlStreamProvider.XmlOutputStreamProvider#openOutputStreamForTable(java.lang.String)
*/
@Override
public OutputStream openOutputStreamForTable(String tableName) {
return testOutputStream;
} | 3.68 |
hbase_SequenceIdAccounting_onRegionClose | /**
* Clear all the records of the given region as it is going to be closed.
* <p/>
* We will call this once we get the region close marker. We need this because that, if we use
* Durability.ASYNC_WAL, after calling startCacheFlush, we may still get some ongoing wal entries
* that has not been processed yet, this ... | 3.68 |
hudi_ValidationUtils_checkState | /**
* Ensures the truth of an expression involving the state of the calling instance, but not
* involving any parameters to the calling method.
*
* @param expression a boolean expression
* @param errorMessage - error message
* @throws IllegalStateException if {@code expression} is false
*/
public static void che... | 3.68 |
flink_CompressionUtils_extractTarFileUsingTar | // Copy and simplify from hadoop-common package that is used in YARN
// See
// https://github.com/apache/hadoop/blob/7f93349ee74da5f35276b7535781714501ab2457/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
private static void extractTarFileUsingTar(
String inFilePath, String... | 3.68 |
hbase_CacheConfig_shouldReadBlockFromCache | /**
* Return true if we may find this type of block in block cache.
* <p>
* TODO: today {@code family.isBlockCacheEnabled()} only means {@code cacheDataOnRead}, so here we
* consider lots of other configurations such as {@code cacheDataOnWrite}. We should fix this in
* the future, {@code cacheDataOnWrite} should h... | 3.68 |
flink_AsyncSinkBaseBuilder_setMaxInFlightRequests | /**
* @param maxInFlightRequests maximum number of uncompleted calls to submitRequestEntries that
* the SinkWriter will allow at any given point. Once this point has reached, writes and
* callbacks to add elements to the buffer may block until one or more requests to
* submitRequestEntries completes.
*... | 3.68 |
flink_RocksDBStateBackend_setPredefinedOptions | /**
* Sets the predefined options for RocksDB.
*
* <p>If user-configured options within {@link RocksDBConfigurableOptions} is set (through
* flink-conf.yaml) or a user-defined options factory is set (via {@link
* #setRocksDBOptions(RocksDBOptionsFactory)}), then the options from the factory are applied on
* top o... | 3.68 |
flink_SortedGrouping_withPartitioner | /**
* Uses a custom partitioner for the grouping.
*
* @param partitioner The custom partitioner.
* @return The grouping object itself, to allow for method chaining.
*/
public SortedGrouping<T> withPartitioner(Partitioner<?> partitioner) {
Preconditions.checkNotNull(partitioner);
getKeys().validateCustomPa... | 3.68 |
hbase_FileArchiverNotifierImpl_getStoreFilesFromSnapshot | /**
* Extracts the names of the store files referenced by this snapshot which satisfy the given
* predicate (the predicate returns {@code true}).
*/
Set<StoreFileReference> getStoreFilesFromSnapshot(SnapshotManifest manifest,
Predicate<String> filter) {
Set<StoreFileReference> references = new HashSet<>();
// ... | 3.68 |
framework_ColorPickerHistory_hasColor | /**
* Checks if the history contains given color.
*
* @param c
* the color
*
* @return true, if successful
*/
public boolean hasColor(Color c) {
return getColorHistory().contains(c);
} | 3.68 |
hadoop_HsJobPage_content | /**
* The content of this page is the JobBlock
* @return HsJobBlock.class
*/
@Override protected Class<? extends SubView> content() {
return HsJobBlock.class;
} | 3.68 |
hbase_CloneSnapshotProcedure_prepareClone | /**
* Action before any real action of cloning from snapshot.
* @param env MasterProcedureEnv
*/
private void prepareClone(final MasterProcedureEnv env) throws IOException {
final TableName tableName = getTableName();
if (env.getMasterServices().getTableDescriptors().exists(tableName)) {
throw new TableExist... | 3.68 |
flink_GenericDataSourceBase_getStatisticsKey | /**
* Gets the key under which statistics about this data source may be obtained from the
* statistics cache.
*
* @return The statistics cache key.
*/
public String getStatisticsKey() {
return this.statisticsKey;
} | 3.68 |
shardingsphere-elasticjob_YamlEngine_marshal | /**
* Marshal YAML.
*
* @param value object to be marshaled
* @return YAML content
*/
public static String marshal(final Object value) {
return new Yaml(new ElasticJobYamlRepresenter(new DumperOptions())).dumpAsMap(value);
} | 3.68 |
hudi_KafkaOffsetGen_computeOffsetRanges | /**
* Compute the offset ranges to read from Kafka, while handling newly added partitions, skews, event limits.
*
* @param fromOffsetMap offsets where we left off last time
* @param toOffsetMap offsets of where each partitions is currently at
* @param numEvents maximum number of events to read.
*/
public static O... | 3.68 |
hadoop_TaskTrackerInfo_getReasonForBlacklist | /**
* Gets the reason for which the tasktracker was blacklisted.
*
* @return reason which tracker was blacklisted
*/
public String getReasonForBlacklist() {
return reasonForBlacklist;
} | 3.68 |
zxing_DecoderResult_getByteSegments | /**
* @return list of byte segments in the result, or {@code null} if not applicable
*/
public List<byte[]> getByteSegments() {
return byteSegments;
} | 3.68 |
AreaShop_Materials_isSign | /**
* Check if a Material is a sign (of either the wall or floor type).
* @param name String to check
* @return true if the given material is a sign
*/
public static boolean isSign(String name) {
return name != null && (FLOOR_SIGN_TYPES.contains(name) || WALL_SIGN_TYPES.contains(name));
} | 3.68 |
flink_CopyOnWriteSkipListStateMap_removeNode | /**
* Remove the given node indicated by {@link SkipListNodePointers#currentNode}.
*
* @param pointers pointers of the node to remove and its prev/next node.
* @param isLogicallyRemoved whether the node to remove is already logically removed.
* @param returnOldState whether to return the old state after removal.
... | 3.68 |
hbase_CellModel_setTimestamp | /**
* @param timestamp the timestamp to set
*/
public void setTimestamp(long timestamp) {
this.timestamp = timestamp;
} | 3.68 |
hudi_AvroSchemaCompatibility_getReaderFragment | /**
* Returns the fragment of the reader schema that failed compatibility check.
*
* @return a Schema instance (fragment of the reader schema).
*/
public Schema getReaderFragment() {
return mReaderFragment;
} | 3.68 |
framework_ProgressBar_setValue | /**
* Sets the value of this progress bar. The value is a <code>float</code>
* between 0 and 1 where 0 represents no progress at all and 1 represents
* fully completed.
*
* @param newValue
* the current progress value
*/
@Override
public void setValue(Float newValue) {
super.setValue(newValue);
} | 3.68 |
zxing_CodaBarReader_toNarrowWidePattern | // Assumes that counters[position] is a bar.
private int toNarrowWidePattern(int position) {
int end = position + 7;
if (end >= counterLength) {
return -1;
}
int[] theCounters = counters;
int maxBar = 0;
int minBar = Integer.MAX_VALUE;
for (int j = position; j < end; j += 2) {
int currentCounter... | 3.68 |
flink_FlinkAssertions_anyCauseMatches | /**
* Shorthand to assert the chain of causes includes a {@link Throwable} matching a specific
* {@link Class} and containing the provided message. Same as:
*
* <pre>{@code
* assertThatChainOfCauses(throwable)
* .anySatisfy(
* cause ->
* assertThat(cause)
* .hasMessag... | 3.68 |
morf_SqlDialect_getSqlforLength | /**
* Converts the LENGTH function into SQL.
*
* @param function the function to convert.
* @return a string representation of the SQL.
* @see org.alfasoftware.morf.sql.element.Function#length(AliasedField)
*/
protected String getSqlforLength(Function function) {
return String.format("LENGTH(%s)", getSqlFrom(fu... | 3.68 |
hudi_QuickstartUtils_generateRangeRandomTimestamp | /**
* Generate timestamp range from {@param daysTillNow} before to now.
*/
private static long generateRangeRandomTimestamp(int daysTillNow) {
long maxIntervalMillis = daysTillNow * 24 * 60 * 60 * 1000L;
return System.currentTimeMillis() - (long) (Math.random() * maxIntervalMillis);
} | 3.68 |
framework_FreeformQuery_getPrimaryKeyColumns | /*
* (non-Javadoc)
*
* @see com.vaadin.data.util.sqlcontainer.query.QueryDelegate#
* getPrimaryKeyColumns ()
*/
@Override
public List<String> getPrimaryKeyColumns() {
return primaryKeyColumns;
} | 3.68 |
flink_RetractableTopNFunction_retractRecordWithRowNumber | /**
* Retract the input record and emit updated records. This works for outputting with row_number.
*
* @return true if the input record has been removed from {@link #dataState}.
*/
private boolean retractRecordWithRowNumber(
SortedMap<RowData, Long> sortedMap,
RowData sortKey,
RowData input... | 3.68 |
hadoop_JavaCommandLineBuilder_define | /**
* Add a <code>-D key=val</code> command to the CLI. This is very Hadoop API
* @param key key
* @param val value
* @throws IllegalArgumentException if either argument is null
*/
public void define(String key, String val) {
Preconditions.checkArgument(key != null, "null key");
Preconditions.checkArgument(val... | 3.68 |
hudi_CloudObjectsSelectorCommon_checkIfFileExists | /**
* Check if file with given path URL exists
* @param storageUrlSchemePrefix Eg: s3:// or gs://. The storage-provider-specific prefix to use within the URL.
*/
private static boolean checkIfFileExists(String storageUrlSchemePrefix, String bucket, String filePathUrl,
Configur... | 3.68 |
flink_JobManagerCheckpointStorage_getSavepointPath | /** @return The default location where savepoints will be externalized if set. */
@Nullable
public Path getSavepointPath() {
return location.getBaseSavepointPath();
} | 3.68 |
querydsl_SQLExpressions_regrAvgx | /**
* REGR_AVGX evaluates the average of the independent variable (arg2) of the regression line.
*
* @param arg1 first arg
* @param arg2 second arg
* @return regr_avgx(arg1, arg2)
*/
public static WindowOver<Double> regrAvgx(Expression<? extends Number> arg1, Expression<? extends Number> arg2) {
return new Wi... | 3.68 |
framework_AbstractDateField_getRangeEnd | /**
* Returns the precise rangeEnd used.
*
* @return the precise rangeEnd used, may be {@code null}.
*/
public T getRangeEnd() {
return convertFromDateString(getState(false).rangeEnd);
} | 3.68 |
hbase_ColumnValueFilter_parseFrom | /**
* Parse a serialized representation of {@link ColumnValueFilter}
* @param pbBytes A pb serialized {@link ColumnValueFilter} instance
* @return An instance of {@link ColumnValueFilter} made from <code>bytes</code>
* @throws DeserializationException if an error occurred
* @see #toByteArray
*/
public static Colu... | 3.68 |
hadoop_BlockRecoveryCommand_getNewBlock | /**
* Return the new block.
*/
public Block getNewBlock() {
return recoveryBlock;
} | 3.68 |
morf_TruncateStatement_toString | /**
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return "SQL TRUNCATE TABLE [" + table + "]";
} | 3.68 |
shardingsphere-elasticjob_JobErrorHandlerReloader_reloadIfNecessary | /**
* Reload if necessary.
*
* @param jobConfig job configuration
*/
public synchronized void reloadIfNecessary(final JobConfiguration jobConfig) {
if (jobErrorHandler.getType().equals(jobConfig.getJobErrorHandlerType()) && props.equals(jobConfig.getProps())) {
return;
}
jobErrorHandler.close();... | 3.68 |
open-banking-gateway_PairIdPsuAspspTuple_toDatasafePathWithoutPsu | /**
* Computes current tuples' Datasafe storage path.
* @return Datasafe path corresponding to current tuple
*/
public String toDatasafePathWithoutPsu() {
return pairId.toString() + "/" + this.aspspId;
} | 3.68 |
pulsar_OpenIDProviderMetadataCache_verifyIssuer | /**
* Verify the issuer url, as required by the OpenID Connect spec:
*
* Per the OpenID Connect Discovery spec, the issuer value returned MUST be identical to the
* Issuer URL that was directly used to retrieve the configuration information. This MUST also
* be identical to the iss Claim value in ID Tokens issued ... | 3.68 |
flink_HiveASTParseDriver_parseHint | /*
* Parse a string as a query hint.
*/
public HiveParserASTNode parseHint(String command) throws HiveASTParseException {
LOG.info("Parsing hint: " + command);
HiveLexerX lexer = new HiveLexerX(new ANTLRNoCaseStringStream(command));
TokenRewriteStream tokens = new TokenRewriteStream(lexer);
HiveASTHi... | 3.68 |
framework_Slot_setSpacingResizeListener | /**
* Sets the spacing element resize listener for this slot.
*
* @param spacingResizeListener
* the listener to set, or {@code null} to remove a previously
* set listener
*/
public void setSpacingResizeListener(
ElementResizeListener spacingResizeListener) {
detachListeners();
... | 3.68 |
hbase_HBaseTestingUtility_getConnection | /**
* Get a assigned Connection to the cluster. this method is thread safe.
* @param user assigned user
* @return A Connection with assigned user.
*/
public Connection getConnection(User user) throws IOException {
return getAsyncConnection(user).toConnection();
} | 3.68 |
hadoop_FederationCache_buildGetApplicationHomeSubClusterRequest | /**
* Build GetApplicationHomeSubCluster CacheRequest.
*
* @param cacheKey cacheKey.
* @param applicationId applicationId.
* @return CacheRequest.
* @throws YarnException exceptions from yarn servers.
*/
protected CacheRequest<String, CacheResponse<SubClusterId>>
buildGetApplicationHomeSubClusterRequest(Stri... | 3.68 |
morf_SqlServer_formatJdbcUrl | /**
* @see org.alfasoftware.morf.jdbc.DatabaseType#formatJdbcUrl(org.alfasoftware.morf.jdbc.JdbcUrlElements)
*/
@Override
public String formatJdbcUrl(JdbcUrlElements jdbcUrlElements) {
return "jdbc:sqlserver://" + jdbcUrlElements.getHostName() + (StringUtils.isNotBlank(jdbcUrlElements.getInstanceName()) ? "\\" + jd... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.