name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hbase_IncrementalTableBackupClient_isActiveWalPath | /**
* Check if a given path is belongs to active WAL directory
* @param p path
* @return true, if yes
*/
protected boolean isActiveWalPath(Path p) {
return !AbstractFSWALProvider.isArchivedLogFile(p);
} | 3.68 |
framework_Notification_getPosition | /**
* Gets the position of the notification message.
*
* @return The position
*/
public Position getPosition() {
return getState(false).position;
} | 3.68 |
graphhopper_WaySegmentParser_setElevationProvider | /**
* @param elevationProvider used to determine the elevation of an OSM node
*/
public Builder setElevationProvider(ElevationProvider elevationProvider) {
waySegmentParser.elevationProvider = elevationProvider;
return this;
} | 3.68 |
pulsar_PersistentSubscription_disconnect | /**
* Disconnect all consumers attached to the dispatcher and close this subscription.
*
* @return CompletableFuture indicating the completion of disconnect operation
*/
@Override
public synchronized CompletableFuture<Void> disconnect() {
if (fenceFuture != null){
return fenceFuture;
}
fenceFutu... | 3.68 |
hbase_ReplicationThrottler_getNextSleepInterval | /**
* Get how long the caller should sleep according to the current size and current cycle's total
* push size and start tick, return the sleep interval for throttling control.
* @param size is the size of edits to be pushed
* @return sleep interval for throttling control
*/
public long getNextSleepInterval(final ... | 3.68 |
hadoop_Preconditions_checkNotNull | /**
* Preconditions that the specified argument is not {@code null},
* throwing a NPE exception otherwise.
*
* <p>The message of the exception is {@code msgSupplier.get()}.</p>
*
* @param <T> the object type
* @param obj the object to check
* @param msgSupplier the {@link Supplier#get()} set the
* ... | 3.68 |
hbase_WALObserver_postWALRoll | /**
* Called after rolling the current WAL
* @param oldPath the path of the wal that we replaced
* @param newPath the path of the wal we have created and now is the current
*/
default void postWALRoll(ObserverContext<? extends WALCoprocessorEnvironment> ctx, Path oldPath,
Path newPath) throws IOException {
} | 3.68 |
framework_AbstractDateField_setPreventInvalidInput | /**
* Control whether value change event is emitted when user input value does
* not meet the integrated range validator.
*
* @param preventInvalidInput
* Set to false to disable the value change event.
*
* @since 8.13
*/
public void setPreventInvalidInput(boolean preventInvalidInput) {
this.prev... | 3.68 |
morf_ConnectionResources_setFetchSizeForBulkSelectsAllowingConnectionUseDuringStreaming | /**
* Sets the JDBC Fetch Size to use when performing bulk select operations while allowing connection use, intended to replace the default in {@link SqlDialect#fetchSizeForBulkSelectsAllowingConnectionUseDuringStreaming()}.
* The default behaviour for this method is interpreted as not setting the value.
* @param fe... | 3.68 |
hadoop_EntityGroupFSTimelineStoreMetrics_getEntitiesReadToSummary | // Getters
MutableCounterLong getEntitiesReadToSummary() {
return entitiesReadToSummary;
} | 3.68 |
hadoop_SaslOutputStream_write | /**
* Writes <code>len</code> bytes from the specified byte array starting at
* offset <code>off</code> to this output stream.
*
* @param inBuf
* the data.
* @param off
* the start offset in the data.
* @param len
* the number of bytes to write.
* @exception IOException
* ... | 3.68 |
flink_RawType_getSerializerString | /**
* Returns the serialized {@link TypeSerializerSnapshot} in Base64 encoding of this raw type.
*/
public String getSerializerString() {
if (serializerString == null) {
final DataOutputSerializer outputSerializer = new DataOutputSerializer(128);
try {
TypeSerializerSnapshot.writeVersi... | 3.68 |
flink_FlinkMatchers_findThrowable | // copied from flink-core to not mess up the dependency design too much, just for a little
// utility method
private static Optional<Throwable> findThrowable(
Throwable throwable, Predicate<Throwable> predicate) {
if (throwable == null || predicate == null) {
return Optional.empty();
}
Thro... | 3.68 |
framework_GridSingleSelect_select | /**
* Selects the given item. If another item was already selected, that item
* is deselected.
*
* @param item
* the item to select
*/
public void select(T item) {
model.select(item);
} | 3.68 |
hbase_HBaseCluster_isDistributedCluster | /**
* @return whether we are interacting with a distributed cluster as opposed to an in-process
* mini/local cluster.
*/
public boolean isDistributedCluster() {
return false;
} | 3.68 |
flink_ResourceProfile_setExtendedResource | /**
* Add the given extended resource. The old value with the same resource name will be
* replaced if present.
*/
public Builder setExtendedResource(ExternalResource extendedResource) {
this.extendedResources.put(extendedResource.getName(), extendedResource);
return this;
} | 3.68 |
framework_VRadioButtonGroup_updateItemSelection | /**
* Updates the selected state of a radio button.
*
* @param radioButton
* the radio button to update
* @param value
* {@code true} if selected; {@code false} if not
*/
protected void updateItemSelection(RadioButton radioButton, boolean value) {
radioButton.setValue(value);
radioB... | 3.68 |
MagicPlugin_MapController_getAll | // Public API
@Override
public List<com.elmakers.mine.bukkit.api.maps.URLMap> getAll() {
return new ArrayList<>(idMap.values());
} | 3.68 |
flink_MutableHashTable_hash | /**
* The level parameter is needed so that we can have different hash functions when we
* recursively apply the partitioning, so that the working set eventually fits into memory.
*/
public static int hash(int code, int level) {
final int rotation = level * 11;
code = Integer.rotateLeft(code, rotation);
... | 3.68 |
hbase_JSONMetricUtil_dumpBeanToString | /**
* Returns a subset of mbeans defined by qry. Modeled after DumpRegionServerMetrics#dumpMetrics.
* Example: String qry= "java.lang:type=Memory"
* @throws MalformedObjectNameException if json have bad format
* @throws IOException /
* @return String representation of json array.
*/
public static... | 3.68 |
pulsar_LinuxInfoUtils_checkHasNicSpeeds | /**
* Check this VM has nic speed.
* @return Whether the VM has nic speed
*/
public static boolean checkHasNicSpeeds() {
List<String> physicalNICs = getUsablePhysicalNICs();
if (CollectionUtils.isEmpty(physicalNICs)) {
return false;
}
double totalNicLimit = getTotalNicLimit(physicalNICs, BitR... | 3.68 |
flink_AfterMatchSkipStrategy_noSkip | /**
* Every possible match will be emitted.
*
* @return the created AfterMatchSkipStrategy
*/
public static NoSkipStrategy noSkip() {
return NoSkipStrategy.INSTANCE;
} | 3.68 |
flink_MetricRegistryImpl_isShutdown | /**
* Returns whether this registry has been shutdown.
*
* @return true, if this registry was shutdown, otherwise false
*/
public boolean isShutdown() {
synchronized (lock) {
return isShutdown;
}
} | 3.68 |
flink_ProjectOperator_projectTuple19 | /**
* 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, T16, T17, T18>
ProjectOperator<
T,
... | 3.68 |
hbase_KeyValue_setKey | /**
* A setter that helps to avoid object creation every time and whenever there is a need to
* create new KeyOnlyKeyValue.
* @param key Key to set
* @param offset Offset of the Key
* @param length length of the Key
*/
public void setKey(byte[] key, int offset, int length) {
this.bytes = key;
this.offset =... | 3.68 |
framework_ClientSideCriterion_isClientSideVerifiable | /*
* All criteria that extend this must be completely validatable on client
* side.
*
* (non-Javadoc)
*
* @see
* com.vaadin.event.dd.acceptCriteria.AcceptCriterion#isClientSideVerifiable
* ()
*/
@Override
public final boolean isClientSideVerifiable() {
return true;
} | 3.68 |
flink_SlotSharingGroup_setTaskHeapMemoryMB | /** Set the task heap memory for this SlotSharingGroup in MB. */
public Builder setTaskHeapMemoryMB(int taskHeapMemoryMB) {
checkArgument(taskHeapMemoryMB > 0, "The task heap memory should be positive.");
this.taskHeapMemory = MemorySize.ofMebiBytes(taskHeapMemoryMB);
return this;
} | 3.68 |
hadoop_OBSDataBlocks_read | /**
* Read in data.
*
* @param b destination buffer
* @param offset offset within the buffer
* @param length length of bytes to read
* @return read size
* @throws EOFException if the position is negative
* @throws IndexOutOfBoundsException if there isn't space for the amount
* ... | 3.68 |
dubbo_ExpiringMap_setTimeToLive | /**
* update time to live
*
* @param timeToLive time to live
*/
public void setTimeToLive(long timeToLive) {
this.timeToLiveMillis = timeToLive * 1000;
} | 3.68 |
flink_CompactingHashTable_getOverflowSegmentCount | /** @return number of memory segments used in overflow buckets */
private int getOverflowSegmentCount() {
int result = 0;
for (InMemoryPartition<T> p : this.partitions) {
result += p.numOverflowSegments;
}
return result;
} | 3.68 |
hudi_MysqlDebeziumSource_processDataset | /**
* Debezium Kafka Payload has a nested structure (see https://debezium.io/documentation/reference/1.4/connectors/mysql.html).
* This function flattens this nested structure for the Mysql data, and also extracts a subset of Debezium metadata fields.
*
* @param rowDataset Dataset containing Debezium Payloads
* @r... | 3.68 |
hbase_HBaseTestingUtility_createMultiRegionTable | /**
* Create a table with multiple regions.
* @return A Table instance for the created table.
*/
public Table createMultiRegionTable(TableName tableName, byte[] family) throws IOException {
return createTable(tableName, family, KEYS_FOR_HBA_CREATE_TABLE);
} | 3.68 |
hadoop_DataJoinReducerBase_regroup | /**
* This is the function that re-groups values for a key into sub-groups based
* on a secondary key (input tag).
*
* @param arg1
* @return
*/
private SortedMap<Object, ResetableIterator> regroup(Object key,
Iterator arg1, Reporter reporter) throws IOExceptio... | 3.68 |
framework_Table_handleSelectedItems | /**
* Handles selection if selection is a multiselection
*
* @param variables
* The variables
*/
private void handleSelectedItems(Map<String, Object> variables) {
final String[] ka = (String[]) variables.get("selected");
final String[] ranges = (String[]) variables.get("selectedRanges");
Se... | 3.68 |
framework_GridElement_getBody | /**
* Get the body element.
*
* @return the tbody element
*/
public TestBenchElement getBody() {
return getSubPart("#cell");
} | 3.68 |
shardingsphere-elasticjob_JobScheduleController_shutdown | /**
* Shutdown scheduler graceful.
* @param isCleanShutdown if wait jobs complete
*/
public synchronized void shutdown(final boolean isCleanShutdown) {
try {
if (!scheduler.isShutdown()) {
scheduler.shutdown(isCleanShutdown);
}
} catch (final SchedulerException ex) {
throw... | 3.68 |
shardingsphere-elasticjob_InstanceService_removeInstance | /**
* Persist job instance.
*/
public void removeInstance() {
jobNodeStorage.removeJobNodeIfExisted(instanceNode.getLocalInstancePath());
} | 3.68 |
hudi_StreamerUtil_partitionExists | /**
* Returns whether the hoodie partition exists under given table path {@code tablePath} and partition path {@code partitionPath}.
*
* @param tablePath Base path of the table.
* @param partitionPath The path of the partition.
* @param hadoopConf The hadoop configuration.
*/
public static boolean partitio... | 3.68 |
hadoop_SharedKeyCredentials_parseQueryString | /**
* Parses a query string into a one to many hashmap.
*
* @param parseString the string to parse
* @return a HashMap<String, String[]> of the key values.
*/
private static HashMap<String, String[]> parseQueryString(String parseString) throws UnsupportedEncodingException {
final HashMap<String, String[]> retVal... | 3.68 |
hibernate-validator_BeanMetaDataManagerImpl_createBeanMetaData | /**
* Creates a {@link org.hibernate.validator.internal.metadata.aggregated.BeanMetaData} containing the meta data from all meta
* data providers for the given type and its hierarchy.
*
* @param <T> The type of interest.
* @param clazz The type's class.
*
* @return A bean meta data object for the given type.
*/... | 3.68 |
hadoop_AbfsInputStream_toString | /**
* Get the statistics of the stream.
* @return a string value.
*/
@Override
public String toString() {
final StringBuilder sb = new StringBuilder(super.toString());
sb.append("AbfsInputStream@(").append(this.hashCode()).append("){");
sb.append("[" + CAPABILITY_SAFE_READAHEAD + "]");
if (streamStatistics !... | 3.68 |
flink_ErrorInfo_createErrorInfoWithNullableCause | /**
* Instantiates an {@code ErrorInfo} to cover inconsistent behavior due to FLINK-21376.
*
* @param exception The error cause that might be {@code null}.
* @param timestamp The timestamp the error was noticed.
* @return a {@code ErrorInfo} containing a generic {@link FlinkException} in case of a missing
* e... | 3.68 |
flink_MemorySegmentFactory_wrapOffHeapMemory | /**
* Creates a memory segment that wraps the off-heap memory backing the given ByteBuffer. Note
* that the ByteBuffer needs to be a <i>direct ByteBuffer</i>.
*
* <p>This method is intended to be used for components which pool memory and create memory
* segments around long-lived memory regions.
*
* @param memor... | 3.68 |
hadoop_RegexMountPointResolvedDstPathReplaceInterceptor_interceptSource | /**
* Source won't be changed in the interceptor.
*
* @return source param string passed in.
*/
@Override
public String interceptSource(String source) {
return source;
} | 3.68 |
rocketmq-connect_MetricsReporter_onTimerAdded | /**
* Called when a {@link Timer} is added to the registry.
*
* @param name the timer's name
* @param timer the timer
*/
public void onTimerAdded(String name, Timer timer) {
this.onTimerAdded(MetricUtils.stringToMetricName(name), timer);
} | 3.68 |
hudi_HoodieTable_validateSchema | /**
* Ensure that the current writerSchema is compatible with the latest schema of this dataset.
*
* When inserting/updating data, we read records using the last used schema and convert them to the
* GenericRecords with writerSchema. Hence, we need to ensure that this conversion can take place without errors.
*/
p... | 3.68 |
morf_GraphBasedUpgradeNode_requiresExclusiveExecution | /**
* @return true if this node should be executed in an exclusive way (no other
* node should be executed while this one is being processed)
*/
public boolean requiresExclusiveExecution() {
return exclusiveExecution || reads.isEmpty() && modifies.isEmpty();
} | 3.68 |
framework_VCalendarPanel_selectFocused | /**
* Updates year, month, day from focusedDate to value
*/
private void selectFocused() {
if (focusedDate != null && isDateInsideRange(focusedDate, resolution)) {
if (value == null) {
// No previously selected value (set to null on server side).
// Create a new date using current ... | 3.68 |
framework_AbstractSelect_setNewItemsAllowed | /**
* Enables or disables possibility to add new options by the user.
*
* @param allowNewOptions
* the New value of property allowNewOptions.
*/
public void setNewItemsAllowed(boolean allowNewOptions) {
// Only handle change requests
if (this.allowNewOptions != allowNewOptions) {
this.... | 3.68 |
hudi_HoodieIndexUtils_getLatestBaseFilesForPartition | /**
* Fetches Pair of partition path and {@link HoodieBaseFile}s for interested partitions.
*
* @param partition Partition of interest
* @param hoodieTable Instance of {@link HoodieTable} of interest
* @return the list of {@link HoodieBaseFile}
*/
public static List<HoodieBaseFile> getLatestBaseFilesForPartitio... | 3.68 |
hudi_MarkerUtils_doesMarkerTypeFileExist | /**
* @param fileSystem file system to use.
* @param markerDir marker directory.
* @return {@code true} if the MARKERS.type file exists; {@code false} otherwise.
*/
public static boolean doesMarkerTypeFileExist(FileSystem fileSystem, String markerDir) throws IOException {
return fileSystem.exists(new Path(marker... | 3.68 |
flink_WindowReader_evictor | /** Reads from a window that uses an evictor. */
public EvictingWindowReader<W> evictor() {
return new EvictingWindowReader<>(env, metadata, stateBackend, windowSerializer);
} | 3.68 |
hbase_CompactingMemStore_stopReplayingFromWAL | /**
* This message intends to inform the MemStore that the replaying edits from WAL are done
*/
@Override
public void stopReplayingFromWAL() {
inWalReplay = false;
} | 3.68 |
hadoop_BinaryPartitioner_getPartition | /**
* Use (the specified slice of the array returned by)
* {@link BinaryComparable#getBytes()} to partition.
*/
@Override
public int getPartition(BinaryComparable key, V value, int numPartitions) {
int length = key.getLength();
int leftIndex = (leftOffset + length) % length;
int rightIndex = (rightOffset + ... | 3.68 |
framework_FieldGroup_commit | /**
* Commits all changes done to the bound fields.
* <p>
* Calls all {@link CommitHandler}s before and after committing the field
* changes to the item data source. The whole commit is aborted and state is
* restored to what it was before commit was called if any
* {@link CommitHandler} throws a CommitException ... | 3.68 |
hadoop_TimelineEntity_addPrimaryFilters | /**
* Add a map of primary filters to the existing primary filter map
*
* @param primaryFilters
* a map of primary filters
*/
public void addPrimaryFilters(Map<String, Set<Object>> primaryFilters) {
for (Entry<String, Set<Object>> primaryFilter : primaryFilters.entrySet()) {
Set<Object> thisPrimary... | 3.68 |
cron-utils_CronFieldName_getOrder | /**
* Returns the order number that corresponds to the field.
*
* @return order number - int
*/
public int getOrder() {
return order;
} | 3.68 |
hudi_SparkValidatorUtils_getRecordsFromPendingCommits | /**
* Get reads from partitions modified including any inflight commits.
* Note that this only works for COW tables
*/
public static Dataset<Row> getRecordsFromPendingCommits(SQLContext sqlContext,
Set<String> partitionsAffected,
... | 3.68 |
framework_ComputedStyle_getPaddingWidth | /**
* Returns the sum of the top and bottom padding.
*
* @since 7.5.3
* @return the sum of the left and right padding
*/
public double getPaddingWidth() {
double paddingWidth = getDoubleProperty("paddingLeft");
paddingWidth += getDoubleProperty("paddingRight");
return paddingWidth;
} | 3.68 |
hbase_MiniHBaseCluster_getNumLiveRegionServers | /** Returns Number of live region servers in the cluster currently. */
public int getNumLiveRegionServers() {
return this.hbaseCluster.getLiveRegionServers().size();
} | 3.68 |
morf_AbstractSqlDialectTest_testSelectOrderByNullsFirstDescendingScript | /**
* Tests a select with an "order by" clause with nulls first and descending direction.
*/
@Test
public void testSelectOrderByNullsFirstDescendingScript() {
FieldReference fieldReference = new FieldReference(STRING_FIELD);
SelectStatement stmt = new SelectStatement(fieldReference)
.from(new TableReference(ALT... | 3.68 |
querydsl_Projections_fields | /**
* Create a field access based Bean populating projection for the given type and bindings
*
* @param <T> type of projection
* @param type type of the projection
* @param bindings field bindings
* @return factory expression
*/
public static <T> QBean<T> fields(Class<? extends T> type, Map<String, ? extends Exp... | 3.68 |
pulsar_AuthenticationProviderToken_authenticate | /**
* @param authData Authentication data.
* @return null. Explanation of returning null values, {@link AuthenticationState#authenticateAsync(AuthData)}
* @throws AuthenticationException
*/
@Override
public AuthData authenticate(AuthData authData) throws AuthenticationException {
String token = new String(authD... | 3.68 |
hudi_FlinkWriteClients_createWriteClient | /**
* Creates the Flink write client.
*
* <p>This expects to be used by client, set flag {@code loadFsViewStorageConfig} to use
* remote filesystem view storage config, or an in-memory filesystem view storage is used.
*/
@SuppressWarnings("rawtypes")
public static HoodieFlinkWriteClient createWriteClient(Configura... | 3.68 |
framework_AbstractLayout_readMargin | /**
* Reads margin attributes from a design into a MarginInfo object. This
* helper method should be called from the
* {@link #readDesign(Element, DesignContext) readDesign} method of layouts
* that implement {@link MarginHandler}.
*
* @since 7.5
*
* @param design
* the design from which to read
* ... | 3.68 |
hudi_KafkaOffsetGen_fetchPartitionInfos | /**
* Fetch partition infos for given topic.
*
* @param consumer
* @param topicName
*/
private List<PartitionInfo> fetchPartitionInfos(KafkaConsumer consumer, String topicName) {
long timeout = getLongWithAltKeys(this.props, KafkaSourceConfig.KAFKA_FETCH_PARTITION_TIME_OUT);
long start = System.currentTimeMill... | 3.68 |
hbase_AbstractStateMachineNamespaceProcedure_createDirectory | /**
* Create the namespace directory
* @param env MasterProcedureEnv
* @param nsDescriptor NamespaceDescriptor
*/
protected static void createDirectory(MasterProcedureEnv env, NamespaceDescriptor nsDescriptor)
throws IOException {
createDirectory(env.getMasterServices().getMasterFileSystem(), nsDescrip... | 3.68 |
hadoop_ValueAggregatorBaseDescriptor_generateEntry | /**
*
* @param type the aggregation type
* @param id the aggregation id
* @param val the val associated with the id to be aggregated
* @return an Entry whose key is the aggregation id prefixed with
* the aggregation type.
*/
public static Entry<Text, Text> generateEntry(String type, String id, Text val... | 3.68 |
framework_Criterion_getOperator | /**
* Gets the comparison operator.
*
* @return operator to be used when comparing payload value with criterion
*/
public ComparisonOperator getOperator() {
return operator;
} | 3.68 |
flink_ThrowableClassifier_findThrowableOfThrowableType | /**
* Checks whether a throwable chain contains a specific throwable type and returns the
* corresponding throwable.
*
* @param throwable the throwable chain to check.
* @param throwableType the throwable type to search for in the chain.
* @return Optional throwable of the throwable type if available, otherwise e... | 3.68 |
pulsar_ManagedLedgerImpl_getPositionAfterN | /**
* Get the entry position at a given distance from a given position.
*
* @param startPosition
* starting position
* @param n
* number of entries to skip ahead
* @param startRange
* specifies whether to include the start position in calculating the distance
* @return the new ... | 3.68 |
flink_TestLoggerResource_asSingleTestResource | /** Enables the use of {@link TestLoggerResource} for try-with-resources statement. */
public static SingleTestResource asSingleTestResource(
String loggerName, org.slf4j.event.Level level) throws Throwable {
return new SingleTestResource(loggerName, level);
} | 3.68 |
hadoop_YarnServerSecurityUtils_selectAMRMTokenIdentifier | // Obtain the needed AMRMTokenIdentifier from the remote-UGI. RPC layer
// currently sets only the required id, but iterate through anyways just to be
// sure.
private static AMRMTokenIdentifier selectAMRMTokenIdentifier(
UserGroupInformation remoteUgi) throws IOException {
AMRMTokenIdentifier result = null;
Se... | 3.68 |
MagicPlugin_Targeting_findTarget | /**
* Returns the block at the cursor, or null if out of range
*
* @return The target block
*/
protected Target findTarget(MageContext context, double range)
{
if (targetType == TargetType.NONE) {
return new Target(source);
}
boolean isBlock = targetType == TargetType.BLOCK || targetType == Targ... | 3.68 |
hbase_MobUtils_formatDate | /**
* Formats a date to a string.
* @param date The date.
* @return The string format of the date, it's yyyymmdd.
*/
public static String formatDate(Date date) {
return LOCAL_FORMAT.get().format(date);
} | 3.68 |
MagicPlugin_MageConversation_sayNextLine | /**
* Returns true when finished
*/
public boolean sayNextLine(List<String> dialog) {
Player target = targetPlayer.get();
if (target == null || nextLine >= dialog.size()) {
return true;
}
String configuredLines = dialog.get(nextLine);
if (!configuredLines.isEmpty()) {
String[] line... | 3.68 |
flink_EnvironmentSettings_getUserClassLoader | /**
* Returns the user {@link ClassLoader} to use for code generation, UDF loading and other
* operations requiring reflections on user code.
*/
@Internal
public ClassLoader getUserClassLoader() {
return classLoader;
} | 3.68 |
morf_SqlDialect_getUpdateStatementAssignmentsSql | /**
* Returns the assignments for the SET clause of an SQL UPDATE statement
* based on the {@link List} of {@link AliasedField}s provided.
*
* @param fields The {@link List} of {@link AliasedField}s to create the assignments from
* @return the assignments for the SET clause as a string
*/
protected String getUpda... | 3.68 |
hudi_HoodieCombineHiveInputFormat_getInputPaths | /**
* MOD - Just added this for visibility.
*/
Path[] getInputPaths(JobConf job) throws IOException {
Path[] dirs = FileInputFormat.getInputPaths(job);
if (dirs.length == 0) {
// on tez we're avoiding to duplicate the file info in FileInputFormat.
if (HiveConf.getVar(job, HiveConf.ConfVars.HIVE_EXECUTION_... | 3.68 |
morf_DummyXmlOutputStreamProvider_clearDestination | /**
* @see org.alfasoftware.morf.xml.XmlStreamProvider.XmlOutputStreamProvider#clearDestination()
*/
@Override
public void clearDestination() {
cleared = true;
} | 3.68 |
flink_HiveTablePartition_ofPartition | /**
* Creates a HiveTablePartition to represent a hive partition.
*
* @param hiveConf the HiveConf used to connect to HMS
* @param hiveVersion the version of hive in use, if it's null the version will be automatically
* detected
* @param dbName name of the database
* @param tableName name of the table
* @pa... | 3.68 |
flink_HiveParserDefaultGraphWalker_walk | // walk the current operator and its descendants.
protected void walk(Node nd) throws SemanticException {
// Push the node in the stack
opStack.push(nd);
// While there are still nodes to dispatch...
while (!opStack.empty()) {
Node node = opStack.peek();
if (node.getChildren() == null ... | 3.68 |
framework_ComputedStyle_getBorderHeight | /**
* Returns the sum of the top and bottom border width.
*
* @since 7.5.3
* @return the sum of the top and bottom border
*/
public double getBorderHeight() {
double borderHeight = getDoubleProperty("borderTopWidth");
borderHeight += getDoubleProperty("borderBottomWidth");
return borderHeight;
} | 3.68 |
hadoop_AllocateResponse_numClusterNodes | /**
* Set the <code>numClusterNodes</code> of the response.
* @see AllocateResponse#setNumClusterNodes(int)
* @param numClusterNodes <code>numClusterNodes</code> of the response
* @return {@link AllocateResponseBuilder}
*/
@Private
@Unstable
public AllocateResponseBuilder numClusterNodes(int numClusterNodes) {
a... | 3.68 |
framework_VCalendar_getRangeSelectListener | /**
* Get the listener that listens to the user highlighting a region in the
* calendar.
*
* @return
*/
public RangeSelectListener getRangeSelectListener() {
return rangeSelectListener;
} | 3.68 |
hadoop_DeletedDirTracker_isContained | /**
* Is a path directly contained in the set of deleted directories.
* @param dir directory to probe
* @return true if this directory is recorded as being deleted.
*/
boolean isContained(Path dir) {
return directories.getIfPresent(dir) != null;
} | 3.68 |
framework_Slot_onBrowserEvent | /*
* (non-Javadoc)
*
* @see com.google.gwt.user.client.ui.Widget#onBrowserEvent(com.google.gwt
* .user.client.Event)
*/
@Override
public void onBrowserEvent(Event event) {
super.onBrowserEvent(event);
if (DOM.eventGetType(event) == Event.ONLOAD && icon != null
&& icon.getElement() == DOM.eventG... | 3.68 |
hudi_HoodieMetaserver_getMetaserverStorage | // only for test
public static MetaserverStorage getMetaserverStorage() {
return metaserverStorage;
} | 3.68 |
hbase_Scan_numFamilies | /** Returns the number of families in familyMap */
public int numFamilies() {
if (hasFamilies()) {
return this.familyMap.size();
}
return 0;
} | 3.68 |
streampipes_JdbcClient_save | /**
* Prepares a statement for the insertion of values or the
*
* @param event The event which should be saved to the Postgres table
* @throws SpRuntimeException When there was an error in the saving process
*/
protected void save(final Event event) throws SpRuntimeException {
//TODO: Add batch support (https://... | 3.68 |
querydsl_MathExpressions_atan | /**
* Create a {@code atan(num)} expression
*
* <p>Returns the principal value of the arc tangent of num, expressed in radians.</p>
*
* @param num numeric expression
* @return atan(num)
*/
public static <A extends Number & Comparable<?>> NumberExpression<Double> atan(Expression<A> num) {
return Expressions.n... | 3.68 |
hbase_KeyValue_matchingRows | /**
* Compare rows. Just calls Bytes.equals, but it's good to have this encapsulated.
* @param left Left row array.
* @param loffset Left row offset.
* @param llength Left row length.
* @param right Right row array.
* @param roffset Right row offset.
* @param rlength Right row length.
* @return Whether row... | 3.68 |
pulsar_WebSocketWebResource_isAuthorized | /**
* Checks if user is authorized to produce/consume on a given topic.
*
* @param topic
* @return
* @throws Exception
*/
protected boolean isAuthorized(TopicName topic) throws Exception {
if (service().isAuthorizationEnabled()) {
return service().getAuthorizationService().canLookup(topic, clientAppId... | 3.68 |
flink_CsvRowSchemaConverter_convertType | /**
* Convert {@link LogicalType} to {@link CsvSchema.ColumnType} based on Jackson's categories.
*/
private static CsvSchema.ColumnType convertType(String fieldName, LogicalType type) {
if (STRING_TYPE_ROOTS.contains(type.getTypeRoot())) {
return CsvSchema.ColumnType.STRING;
} else if (NUMBER_TYPE_ROO... | 3.68 |
morf_ConnectionResourcesBean_getStatementPoolingMaxStatements | /**
* @see org.alfasoftware.morf.jdbc.ConnectionResources#getStatementPoolingMaxStatements()
*/
@Override
public int getStatementPoolingMaxStatements() {
return statementPoolingMaxStatements;
} | 3.68 |
hbase_CacheConfig_shouldCacheCompactedBlocksOnWrite | /** Returns true if blocks should be cached while writing during compaction, false if not */
public boolean shouldCacheCompactedBlocksOnWrite() {
return this.cacheCompactedDataOnWrite;
} | 3.68 |
pulsar_FunctionRuntimeManager_findFunctionAssignments | /**
* Find all instance assignments of function.
* @param tenant
* @param namespace
* @param functionName
* @return
*/
public synchronized Collection<Assignment> findFunctionAssignments(String tenant,
String namespace, String functionName) {
r... | 3.68 |
rocketmq-connect_WrapperStatusListener_onStartup | /**
* Invoked after successful startup of the task.
*
* @param id The id of the task
*/
@Override
public void onStartup(ConnectorTaskId id) {
managementService.put(new TaskStatus(id, TaskStatus.State.RUNNING, workerId, generation()));
} | 3.68 |
flink_SlotProfile_getReservedAllocations | /**
* Returns a set of all reserved allocation ids from the execution graph. It will used by {@link
* PreviousAllocationSlotSelectionStrategy} to support local recovery. In this case, a vertex
* cannot take an reserved allocation unless it exactly prefers that allocation.
*
* <p>This is optional and can be empty i... | 3.68 |
hadoop_WriteOperationHelper_completeMPUwithRetries | /**
* This completes a multipart upload to the destination key via
* {@code finalizeMultipartUpload()}.
* Retry policy: retrying, translated.
* Retries increment the {@code errorCount} counter.
* @param destKey destination
* @param uploadId multipart operation Id
* @param partETags list of partial uploads
* @pa... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.