name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hadoop_SchedulerHealth_getLastSchedulerRunTime | /**
* Get the timestamp of the latest scheduler operation.
*
* @return the scheduler's latest timestamp
*/
public long getLastSchedulerRunTime() {
return lastSchedulerRunTime;
} | 3.68 |
morf_OracleDialect_addIndexStatements | /**
* @see org.alfasoftware.morf.jdbc.SqlDialect#addIndexStatements(org.alfasoftware.morf.metadata.Table, org.alfasoftware.morf.metadata.Index)
*/
@Override
public Collection<String> addIndexStatements(Table table, Index index) {
return ImmutableList.of(
// when adding indexes to existing tables, use PARALLEL N... | 3.68 |
morf_SqlServerDialect_changePrimaryKeyColumns | /**
* @see org.alfasoftware.morf.jdbc.SqlDialect#changePrimaryKeyColumns(org.alfasoftware.morf.metadata.Table, java.util.List, java.util.List)
*/
@Override
public Collection<String> changePrimaryKeyColumns(Table table, List<String> oldPrimaryKeyColumns, List<String> newPrimaryKeyColumns) {
List<String> statements =... | 3.68 |
hbase_SpaceQuotaSnapshot_notInViolation | /**
* Returns a singleton referring to a quota which is not in violation.
*/
public static SpaceQuotaStatus notInViolation() {
return NOT_IN_VIOLATION;
} | 3.68 |
hadoop_ColumnRWHelper_readResultsWithTimestamps | /**
* @param result from which to reads data with timestamps
* @param columnPrefixBytes optional prefix to limit columns. If null all
* columns are returned.
* @param <K> identifies the type of column name(indicated by type of key
* converter).
* @param <V> the type of the values. The values will be ... | 3.68 |
framework_VDateTimeCalendarPanel_isTimeSelectorNeeded | /**
* Do we need the time selector
*
* @return True if it is required
*/
private boolean isTimeSelectorNeeded() {
return getResolution().compareTo(DateTimeResolution.DAY) < 0;
} | 3.68 |
framework_VCalendarPanel_handleNavigation | /**
* Handles the keyboard navigation.
*
* @param keycode
* The key code that was pressed
* @param ctrl
* Was the ctrl key pressed
* @param shift
* Was the shift key pressed
* @return Return true if key press was handled by the component, else
* return false
*/
protec... | 3.68 |
framework_BasicEvent_setStyleName | /*
* (non-Javadoc)
*
* @see
* com.vaadin.addon.calendar.event.CalendarEventEditor#setStyleName(java
* .lang.String)
*/
@Override
public void setStyleName(String styleName) {
this.styleName = styleName;
fireEventChange();
} | 3.68 |
hbase_TableResource_getName | /** Returns the table name */
String getName() {
return table;
} | 3.68 |
hbase_Constraints_getConstraints | /**
* Get the constraints stored in the table descriptor
* @param desc To read from
* @param classloader To use when loading classes. If a special classloader is used on a region,
* for instance, then that should be the classloader used to load the
* constraints. This c... | 3.68 |
framework_DefaultEditorEventHandler_isChanged | /**
* Returns whether the cursor move has either horizontal or vertical
* changes.
*
* @return {@code true} if there are changes, {@code false} otherwise
*/
public boolean isChanged() {
return rowDelta != 0 || colDelta != 0;
} | 3.68 |
AreaShop_GeneralRegion_getWidth | /**
* Get the width of the region (x-axis).
* @return The width of the region (x-axis)
*/
@Override
public int getWidth() {
if(getRegion() == null) {
return 0;
}
return getMaximumPoint().getBlockX() - getMinimumPoint().getBlockX() + 1;
} | 3.68 |
hadoop_BooleanWritable_set | /**
* Set the value of the BooleanWritable.
* @param value value.
*/
public void set(boolean value) {
this.value = value;
} | 3.68 |
zxing_PDF417_calculateNumberOfRows | /**
* Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E).
*
* @param m the number of source codewords prior to the additional of the Symbol Length
* Descriptor and any pad codewords
* @param k the number of error correction codewords
* @param c the number of columns ... | 3.68 |
framework_VFilterSelect_selectNextItem | /**
* Selects the next item in the filtered selections.
*/
public void selectNextItem() {
debug("VFS.SP: selectNextItem()");
final int index = menu.getSelectedIndex() + 1;
if (menu.getItems().size() > index) {
selectItem(menu.getItems().get(index));
} else {
selectNextPage();
}
} | 3.68 |
hbase_KeyValueHeap_compare | /**
* Compares two KeyValue
* @return less than 0 if left is smaller, 0 if equal etc..
*/
public int compare(Cell left, Cell right) {
return this.kvComparator.compare(left, right);
} | 3.68 |
druid_WallConfig_setDescribeAllow | /**
* set allow mysql describe statement
*
* @since 0.2.10
*/
public void setDescribeAllow(boolean describeAllow) {
this.describeAllow = describeAllow;
} | 3.68 |
framework_RefreshRenderedCellsOnlyIfAttached_getTicketNumber | /*
* (non-Javadoc)
*
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
protected Integer getTicketNumber() {
return 9138;
} | 3.68 |
streampipes_OutputStrategies_append | /**
* Creates a {@link org.apache.streampipes.model.output.AppendOutputStrategy}. Append output strategies add additional
* properties to an input event stream.
*
* @param appendProperties An arbitrary number of event properties that are appended to any input stream.
* @return AppendOutputStrategy
*/
public stati... | 3.68 |
hadoop_JsonSerialization_toString | /**
* Convert an instance to a string form for output. This is a robust
* operation which will convert any JSON-generating exceptions into
* error text.
* @param instance non-null instance
* @return a JSON string
*/
public String toString(T instance) {
Preconditions.checkArgument(instance != null, "Null instanc... | 3.68 |
morf_SqlDialect_getAutoIncrementColumnForTable | /**
* Scans the specified {@link Table} for any autonumbered columns and returns
* that {@link Column} if it is found, or null otherwise.
*
* @param table The table to check.
* @return The autonumber column, or null if none exists.
*/
protected Column getAutoIncrementColumnForTable(Table table) {
for (Column co... | 3.68 |
framework_ListSorter_getComparator | /**
* Retrieve the comparator assigned for a specific grid column.
*
* @param <C>
* the column data type
* @param column
* a grid column. May not be null.
* @return a comparator, or null if no comparator for the specified grid
* column has been set.
*/
@SuppressWarnings("unchecked... | 3.68 |
framework_TableElement_getCollapseMenuToggle | /**
* Gets the button that shows or hides the collapse menu.
*
* @return button for opening collapse menu
*/
public WebElement getCollapseMenuToggle() {
return findElement(By.className("v-table-column-selector"));
} | 3.68 |
flink_RowtimeAttributeDescriptor_getAttributeName | /** Returns the name of the rowtime attribute. */
public String getAttributeName() {
return attributeName;
} | 3.68 |
hbase_HFile_createReader | /**
* @param fs filesystem
* @param path Path to file to read
* @param cacheConf This must not be null.
* @param primaryReplicaReader true if this is a reader for primary replica
* @param conf Configuration
* @return an active Reader instance
* @throws... | 3.68 |
flink_ClusterClient_listCompletedClusterDatasetIds | /**
* Return a set of ids of the completed cluster datasets.
*
* @return A set of ids of the completely cached intermediate dataset.
*/
default CompletableFuture<Set<AbstractID>> listCompletedClusterDatasetIds() {
return CompletableFuture.completedFuture(Collections.emptySet());
} | 3.68 |
morf_SqlParameter_toString | /**
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return MoreObjects.toStringHelper(this)
.add("name", name)
.add("scale", scale)
.add("width", width)
.add("type", type)
.toString() + super.toString();
} | 3.68 |
flink_TableFactoryService_discoverFactories | /**
* Searches for factories using Java service providers.
*
* @return all factories in the classpath
*/
private static List<TableFactory> discoverFactories(Optional<ClassLoader> classLoader) {
try {
List<TableFactory> result = new LinkedList<>();
ClassLoader cl = classLoader.orElse(Thread.curre... | 3.68 |
zxing_WhiteRectangleDetector_centerEdges | /**
* recenters the points of a constant distance towards the center
*
* @param y bottom most point
* @param z left most point
* @param x right most point
* @param t top most point
* @return {@link ResultPoint}[] describing the corners of the rectangular
* region. The first and last points are opposed o... | 3.68 |
flink_BuiltInFunctionDefinition_name | /**
* Specifies a name that uniquely identifies a built-in function.
*
* <p>Please adhere to the following naming convention:
*
* <ul>
* <li>Use upper case and separate words with underscore.
* <li>Depending on the importance of the function, the underscore is sometimes omitted
* e.g. for {@code IFNUL... | 3.68 |
hadoop_ManifestCommitter_isRecoverySupported | /**
* Declare that task recovery is not supported.
* It would be, if someone added the code *and tests*.
* @param jobContext
* Context of the job whose output is being written.
* @return false, always
* @throws IOException never
*/
@Override
public boolean isRecoverySupported(final JobContext jobContext... | 3.68 |
flink_HiveParserUtils_isRegex | /**
* Returns whether the pattern is a regex expression (instead of a normal string). Normal string
* is a string with all alphabets/digits and "_".
*/
public static boolean isRegex(String pattern, HiveConf conf) {
String qIdSupport = HiveConf.getVar(conf, HiveConf.ConfVars.HIVE_QUOTEDID_SUPPORT);
if ("colum... | 3.68 |
dubbo_InjvmExporterListener_addExporterChangeListener | /**
* Adds an ExporterChangeListener for a specific service, and notifies the listener of the current Exporter instance
* <p>
* if it exists.
*
* @param listener The ExporterChangeListener to add.
* @param serviceKey The service key for the service to listen for changes on.
*/
public synchronized void addExpor... | 3.68 |
hbase_BaseSourceImpl_decGauge | /**
* Decrease the value of a named gauge.
* @param gaugeName The name of the gauge.
* @param delta the ammount to subtract from a gauge value.
*/
@Override
public void decGauge(String gaugeName, long delta) {
MutableGaugeLong gaugeInt = metricsRegistry.getGauge(gaugeName, 0L);
gaugeInt.decr(delta);
} | 3.68 |
hmily_HmilyLogo_logo | /**
* Logo.
*/
public void logo() {
String bannerText = buildBannerText();
if (LOGGER.isInfoEnabled()) {
LOGGER.info(bannerText);
} else {
System.out.print(bannerText);
}
} | 3.68 |
hbase_RegionServerAccounting_getRetainedRegionRWRequestsCnt | /** Returns the retained metrics of region's read and write requests count */
protected ConcurrentMap<String, Pair<Long, Long>> getRetainedRegionRWRequestsCnt() {
return this.retainedRegionRWRequestsCnt;
} | 3.68 |
hadoop_ProgressSplitsBlock_burst | // this coordinates with LoggedTaskAttempt.SplitVectorKind
int[][] burst() {
int[][] result = new int[4][];
result[WALLCLOCK_TIME_INDEX] = progressWallclockTime.getValues();
result[CPU_TIME_INDEX] = progressCPUTime.getValues();
result[VIRTUAL_MEMORY_KBYTES_INDEX] = progressVirtualMemoryKbytes.getValues();
re... | 3.68 |
hbase_HRegionServer_getCompactSplitThread | /** Returns the underlying {@link CompactSplit} for the servers */
public CompactSplit getCompactSplitThread() {
return this.compactSplitThread;
} | 3.68 |
morf_UpdateStatementBuilder_set | /**
* Specifies the fields to set.
*
* @param destinationFields the fields to update in the database table
* @return this, for method chaining.
*/
public UpdateStatementBuilder set(AliasedFieldBuilder... destinationFields) {
this.fields.addAll(Builder.Helper.buildAll(Arrays.asList(destinationFields)));
return ... | 3.68 |
rocketmq-connect_MqttSinkTask_start | /**
* @param props
*/
@Override
public void start(KeyValue props) {
try {
ConfigUtil.load(props, this.sinkConnectConfig);
log.info("init data source success");
} catch (Exception e) {
log.error("Cannot start MQTT Sink Task because of configuration error{}", e);
}
try {
... | 3.68 |
hbase_BalanceRequest_isDryRun | /**
* Returns true if the balancer should run in dry run mode, otherwise false. In dry run mode,
* moves will be calculated but not executed.
*/
public boolean isDryRun() {
return dryRun;
} | 3.68 |
morf_Function_round | /**
* Rounding result for all of the below databases is equivalent to the Java RoundingMode#HALF_UP
* for the datatypes which are currently in use at Alfa, where rounding is performed to the nearest integer
* unless rounding 0.5 in which case the number is rounded up. Note that this is the rounding mode
* commonly ... | 3.68 |
hbase_RecoverableZooKeeper_setData | /**
* setData is NOT an idempotent operation. Retry may cause BadVersion Exception Adding an
* identifier field into the data to check whether badversion is caused by the result of previous
* correctly setData
* @return Stat instance
*/
public Stat setData(String path, byte[] data, int version)
throws KeeperExce... | 3.68 |
framework_AbstractContainer_fireContainerPropertySetChange | /**
* Sends a Property set change event to all interested listeners.
*
* Use {@link #fireContainerPropertySetChange()} instead of this method
* unless additional information about the exact changes is available and
* should be included in the event.
*
* @param event
* the property change event to sen... | 3.68 |
hbase_MasterObserver_postCompletedModifyTableAction | /**
* Called after to modifying a table's properties. Called as part of modify table procedure and it
* is async to the modify table RPC call.
* @param ctx the environment to interact with the framework and master
* @param tableName the name of the table
* @param oldDescriptor descriptor ... | 3.68 |
flink_FinalizeOnMaster_finalizeGlobal | /**
* The method is invoked on the master (JobManager) after all (parallel) instances of an
* OutputFormat finished.
*
* @param context The context to get finalization infos.
* @throws IOException The finalization may throw exceptions, which may cause the job to abort.
*/
default void finalizeGlobal(FinalizationC... | 3.68 |
flink_SharedResourceHolder_release | /**
* Releases an instance of the given resource.
*
* <p>The instance must have been obtained from {@link #get(Resource)}. Otherwise will throw
* IllegalArgumentException.
*
* <p>Caller must not release a reference more than once. It's advisory that you clear the
* reference to the instance with the null returne... | 3.68 |
flink_WindowTrigger_triggerTime | /**
* Returns the trigger time of the window, this should be called after TriggerContext
* initialized.
*/
protected long triggerTime(W window) {
return toEpochMillsForTimer(window.maxTimestamp(), ctx.getShiftTimeZone());
} | 3.68 |
hbase_QuotaSettingsFactory_throttleRegionServer | /**
* Throttle the specified region server.
* @param regionServer the region server to throttle
* @param type the type of throttling
* @param limit the allowed number of request/data per timeUnit
* @param timeUnit the limit time unit
* @return the quota settings
*/
public static QuotaSettings ... | 3.68 |
hbase_ColumnSchemaModel___getVersions | /** Returns the value of the VERSIONS attribute or its default if it is unset */
public int __getVersions() {
Object o = attrs.get(VERSIONS);
return o != null
? Integer.parseInt(o.toString())
: ColumnFamilyDescriptorBuilder.DEFAULT_MAX_VERSIONS;
} | 3.68 |
flink_DataSet_crossWithTiny | /**
* Initiates a Cross transformation.
*
* <p>A Cross transformation combines the elements of two {@link DataSet DataSets} into one
* DataSet. It builds all pair combinations of elements of both DataSets, i.e., it builds a
* Cartesian product. This method also gives the hint to the optimizer that the second DataS... | 3.68 |
framework_VaadinPortletSession_getPortletConfig | /**
* Returns the JSR-286 portlet configuration that provides access to the
* portlet context and init parameters.
*
* @return portlet configuration
*/
public PortletConfig getPortletConfig() {
VaadinPortletResponse response = (VaadinPortletResponse) CurrentInstance
.get(VaadinResponse.class);
... | 3.68 |
flink_Execution_fail | /**
* This method fails the vertex due to an external condition. The task will move to state
* FAILED. If the task was in state RUNNING or DEPLOYING before, it will send a cancel call to
* the TaskManager.
*
* @param t The exception that caused the task to fail.
*/
@Override
public void fail(Throwable t) {
pr... | 3.68 |
hadoop_MultipleOutputFormat_getRecordWriter | /**
* Create a composite record writer that can write key/value data to different
* output files
*
* @param fs
* the file system to use
* @param job
* the job conf for the job
* @param name
* the leaf file name for the output file (such as part-00000")
* @param arg3
* a p... | 3.68 |
flink_DistributedCache_parseCachedFilesFromString | /**
* Parses a list of distributed cache entries encoded in a string. Can be used to parse a config
* option described by {@link org.apache.flink.configuration.PipelineOptions#CACHED_FILES}.
*
* <p>See {@link org.apache.flink.configuration.PipelineOptions#CACHED_FILES} for the format.
*
* @param files List of str... | 3.68 |
hbase_RemoteProcedureDispatcher_addNode | // ============================================================================================
// Node Helpers
// ============================================================================================
/**
* Add a node that will be able to execute remote procedures
* @param key the node identifier
*/
public vo... | 3.68 |
morf_UpgradeTableResolutionVisitor_getResolvedTables | /**
* @return tables resolved by this visitor
*/
public ResolvedTables getResolvedTables() {
return resolvedTables;
} | 3.68 |
hudi_MetadataPartitionType_getMetadataPartitionsNeedingWriteStatusTracking | /**
* Returns the list of metadata table partitions which require WriteStatus to track written records.
* <p>
* These partitions need the list of written records so that they can update their metadata.
*/
public static List<MetadataPartitionType> getMetadataPartitionsNeedingWriteStatusTracking() {
return Collecti... | 3.68 |
hadoop_CosNFileSystem_append | /**
* This optional operation is not yet supported.
*/
@Override
public FSDataOutputStream append(Path f, int bufferSize,
Progressable progress) throws IOException {
throw new IOException("Not supported");
} | 3.68 |
querydsl_BeanMap_entrySet | /**
* Gets a Set of MapEntry objects that are the mappings for this BeanMap.
* <p>
* Each MapEntry can be set but not removed.
*
* @return the unmodifiable set of mappings
*/
@Override
public Set<Entry<String, Object>> entrySet() {
return new AbstractSet<Entry<String, Object>>() {
@Override
pu... | 3.68 |
flink_RestartStrategies_exponentialDelayRestart | /**
* Generates a ExponentialDelayRestartStrategyConfiguration.
*
* @param initialBackoff Starting duration between restarts
* @param maxBackoff The highest possible duration between restarts
* @param backoffMultiplier Delay multiplier how many times is the delay longer than before
* @param resetBackoffThreshold ... | 3.68 |
flink_CollectionUtil_computeRequiredCapacity | /**
* Helper method to compute the right capacity for a hash map with load factor
* HASH_MAP_DEFAULT_LOAD_FACTOR.
*/
@VisibleForTesting
static int computeRequiredCapacity(int expectedSize, float loadFactor) {
Preconditions.checkArgument(expectedSize >= 0);
Preconditions.checkArgument(loadFactor > 0f);
if... | 3.68 |
framework_Slot_setRelativeWidth | /**
* Set if the slot has a relative width.
*
* @param relativeWidth
* True if slot uses relative width, false if the slot has a
* static width
*/
public void setRelativeWidth(boolean relativeWidth) {
this.relativeWidth = relativeWidth;
updateRelativeSize(relativeWidth, "width");
} | 3.68 |
framework_Video_getPoster | /**
* @return The poster image.
*/
public Resource getPoster() {
return getResource(VideoConstants.POSTER_RESOURCE);
} | 3.68 |
flink_NullableSerializer_checkIfNullSupported | /**
* This method checks if {@code serializer} supports {@code null} value.
*
* @param serializer serializer to check
*/
public static <T> boolean checkIfNullSupported(@Nonnull TypeSerializer<T> serializer) {
int length = serializer.getLength() > 0 ? serializer.getLength() : 1;
DataOutputSerializer dos = ne... | 3.68 |
hbase_StoreScanner_trySkipToNextColumn | /**
* See {@link org.apache.hadoop.hbase.regionserver.StoreScanner#trySkipToNextRow(Cell)}
* @param cell current cell
* @return true means skip to next column, false means not
*/
protected boolean trySkipToNextColumn(Cell cell) throws IOException {
Cell nextCell = null;
// used to guard against a changed next i... | 3.68 |
dubbo_StringUtils_isNotEmpty | /**
* is not empty string.
*
* @param str source string.
* @return is not empty.
*/
public static boolean isNotEmpty(String str) {
return !isEmpty(str);
} | 3.68 |
hadoop_DataNodeFaultInjector_delayWhenOfferServiceHoldLock | /**
* Used as a hook to inject intercept when BPOfferService hold lock.
*/
public void delayWhenOfferServiceHoldLock() {} | 3.68 |
hadoop_ExtensionHelper_getCanonicalServiceName | /**
* Invoke {@link BoundDTExtension#getCanonicalServiceName()} or
* return the default value.
* @param extension extension to invoke
* @param def default if the class is of the wrong type.
* @return a canonical service name.
*/
public static String getCanonicalServiceName(Object extension, String def) {
return... | 3.68 |
flink_InputFormatSourceFunction_getFormat | /**
* Returns the {@code InputFormat}. This is only needed because we need to set the input split
* assigner on the {@code StreamGraph}.
*/
public InputFormat<OUT, InputSplit> getFormat() {
return format;
} | 3.68 |
flink_JavaFieldPredicates_isNotStatic | /**
* Match none static modifier of the {@link JavaField}.
*
* @return A {@link DescribedPredicate} returning true, if and only if the tested {@link
* JavaField} has no static modifier.
*/
public static DescribedPredicate<JavaField> isNotStatic() {
return DescribedPredicate.describe(
"not stati... | 3.68 |
hudi_AvroSchemaCompatibility_getResult | /**
* Gets more details about the compatibility, in particular if getType() is
* INCOMPATIBLE.
*
* @return the details of this compatibility check.
*/
public SchemaCompatibilityResult getResult() {
return mResult;
} | 3.68 |
hudi_DatePartitionPathSelector_pruneDatePartitionPaths | /**
* Prunes date level partitions to last few days configured by 'NUM_PREV_DAYS_TO_LIST' from
* 'CURRENT_DATE'. Parallelizes listing by leveraging HoodieSparkEngineContext's methods.
*/
public List<String> pruneDatePartitionPaths(HoodieSparkEngineContext context, FileSystem fs, String rootPath, LocalDate currentDat... | 3.68 |
hmily_HmilySafeNumberOperationUtils_safeEquals | /**
* Execute collection equals method by safe mode.
*
* @param sourceCollection source collection
* @param targetCollection target collection
* @return whether the element in source collection and target collection are all same
*/
public static boolean safeEquals(final Collection<Comparable<?>> sourceCollection,... | 3.68 |
querydsl_NumberExpression_goe | /**
* Create a {@code this >= right} expression
*
* @param <A>
* @param right rhs of the comparison
* @return {@code this >= right}
* @see java.lang.Comparable#compareTo(Object)
*/
public final <A extends Number & Comparable<?>> BooleanExpression goe(Expression<A> right) {
return Expressions.booleanOperation... | 3.68 |
flink_BaseHybridHashTable_nextSegment | /**
* This is the method called by the partitions to request memory to serialize records. It
* automatically spills partitions, if memory runs out.
*
* @return The next available memory segment.
*/
@Override
public MemorySegment nextSegment() {
final MemorySegment seg = getNextBuffer();
if (seg != null) {
... | 3.68 |
hbase_HBaseTestingUtility_waitUntilAllRegionsAssigned | /**
* Wait until all regions for a table in hbase:meta have a non-empty info:server, or until
* timeout. This means all regions have been deployed, master has been informed and updated
* hbase:meta with the regions deployed server.
* @param tableName the table name
* @param timeout timeout, in milliseconds
*/
p... | 3.68 |
hibernate-validator_ValidatorImpl_validateCascadedConstraints | /**
* Validates all cascaded constraints for the given bean using the current group set in the execution context.
* This method must always be called after validateConstraints for the same context.
*
* @param validationContext The execution context
* @param valueContext Collected information for single validation
... | 3.68 |
pulsar_ProducerImpl_recoverProcessOpSendMsgFrom | // Must acquire a lock on ProducerImpl.this before calling method.
private void recoverProcessOpSendMsgFrom(ClientCnx cnx, MessageImpl from, long expectedEpoch) {
if (expectedEpoch != this.connectionHandler.getEpoch() || cnx() == null) {
// In this case, the cnx passed to this method is no longer the active... | 3.68 |
flink_FlinkZooKeeperQuorumPeer_setRequiredProperties | /** Sets required properties to reasonable defaults and logs it. */
private static void setRequiredProperties(Properties zkProps) {
// Set default client port
if (zkProps.getProperty("clientPort") == null) {
zkProps.setProperty("clientPort", String.valueOf(DEFAULT_ZOOKEEPER_CLIENT_PORT));
LOG.w... | 3.68 |
morf_NamedParameterPreparedStatement_createForQueryOn | /**
* Create the prepared statement against the specified connection. The prepared statement
* can only be used to run queries (not updates/inserts etc) and is strictly read only
* and forward only. For use in bulk data loads.
*
* @param connection the connection
* @return the prepared statement.
* @throws SQL... | 3.68 |
hmily_SubCoordinator_addSynchronization | /**
* Add synchronization boolean.
*
* @param synchronization the synchronization
* @throws RollbackException the rollback exception
*/
public synchronized void addSynchronization(final Synchronization synchronization) throws RollbackException {
if (state == XaState.STATUS_ACTIVE) {
synchronizations.ad... | 3.68 |
flink_SSLUtils_createInternalClientSSLEngineFactory | /** Creates a SSLEngineFactory to be used by internal communication client endpoints. */
public static SSLHandlerFactory createInternalClientSSLEngineFactory(final Configuration config)
throws Exception {
SslContext sslContext = createInternalNettySSLContext(config, true);
if (sslContext == null) {
... | 3.68 |
hbase_Threads_setLoggingUncaughtExceptionHandler | /**
* Sets an UncaughtExceptionHandler for the thread which logs the Exception stack if the thread
* dies.
*/
public static void setLoggingUncaughtExceptionHandler(Thread t) {
t.setUncaughtExceptionHandler(LOGGING_EXCEPTION_HANDLER);
} | 3.68 |
flink_SlotProfile_priorAllocation | /**
* Returns a slot profile for the given resource profile, prior allocations and all prior
* allocation ids from the whole execution graph.
*
* @param taskResourceProfile specifying the required resources for the task slot
* @param physicalSlotResourceProfile specifying the required resources for the physical sl... | 3.68 |
zxing_CaptureActivity_drawResultPoints | /**
* Superimpose a line for 1D or dots for 2D to highlight the key features of the barcode.
*
* @param barcode A bitmap of the captured image.
* @param scaleFactor amount by which thumbnail was scaled
* @param rawResult The decoded results which contains the points to draw.
*/
private void drawResultPoints(Bit... | 3.68 |
hadoop_UnmanagedApplicationManager_registerApplicationMaster | /**
* Registers this {@link UnmanagedApplicationManager} with the resource
* manager.
*
* @param request RegisterApplicationMasterRequest
* @return register response
* @throws YarnException if register fails
* @throws IOException if register fails
*/
public RegisterApplicationMasterResponse registerApplicationM... | 3.68 |
pulsar_ProtocolHandlers_protocol | /**
* Return the handler for the provided <tt>protocol</tt>.
*
* @param protocol the protocol to use
* @return the protocol handler to handle the provided protocol
*/
public ProtocolHandler protocol(String protocol) {
ProtocolHandlerWithClassLoader h = handlers.get(protocol);
if (null == h) {
retur... | 3.68 |
hmily_ConfigLoader_with | /**
* With context.
*
* @param sources the sources
* @param original the original
* @return the context.
*/
public Context with(final List<PropertyKeySource<?>> sources, final ConfigLoader<Config> original) {
return new Context(original, sources);
} | 3.68 |
hudi_HoodieIndexUtils_tagRecord | /**
* Tag the record to an existing location. Not creating any new instance.
*/
public static <R> HoodieRecord<R> tagRecord(HoodieRecord<R> record, HoodieRecordLocation location) {
record.unseal();
record.setCurrentLocation(location);
record.seal();
return record;
} | 3.68 |
flink_BufferConsumer_copyWithReaderPosition | /**
* Returns a retained copy with separate indexes and sets the reader position to the given
* value. This allows to read from the same {@link MemorySegment} twice starting from the
* supplied position.
*
* @param readerPosition the new reader position. Can be less than the {@link
* #currentReaderPosition}, ... | 3.68 |
hadoop_SimpleBufferedOutputStream_size | // Get the size of internal buffer being used.
public int size() {
return count;
} | 3.68 |
hbase_QuotaUtil_updateClusterQuotaToMachineQuota | /**
* Convert cluster scope quota to machine scope quota
* @param quotas the original quota
* @param factor factor used to divide cluster limiter to machine limiter
* @return the converted quota whose quota limiters all in machine scope
*/
private static Quotas updateClusterQuotaToMachineQuota(Quotas quotas, doubl... | 3.68 |
hudi_AvroSchemaCompatibility_schemaNameEquals | /**
* Tests the equality of two Avro named schemas.
*
* <p>
* Matching includes reader name aliases.
* </p>
*
* @param reader Named reader schema.
* @param writer Named writer schema.
* @return whether the names of the named schemas match or not.
*/
public static boolean schemaNameEquals(final Schema reader, ... | 3.68 |
hadoop_TimedHealthReporterService_setLastReportedTime | /**
* Sets the last run time of the node health check.
*
* @param lastReportedTime last reported time in long
*/
private synchronized void setLastReportedTime(long lastReportedTime) {
this.lastReportedTime = lastReportedTime;
} | 3.68 |
framework_ContainerOrderedWrapper_firstItemId | /*
* Gets the first item stored in the ordered container Don't add a JavaDoc
* comment here, we use the default documentation from implemented
* interface.
*/
@Override
public Object firstItemId() {
if (ordered) {
return ((Container.Ordered) container).firstItemId();
}
return first;
} | 3.68 |
hbase_GsonSerializationFeature_bindFactory | /**
* Helper method for smoothing over use of {@link SupplierFactoryAdapter}. Inspired by internal
* implementation details of jersey itself.
*/
private <T> ServiceBindingBuilder<T> bindFactory(Supplier<T> supplier) {
return bindFactory(new SupplierFactoryAdapter<>(supplier));
} | 3.68 |
hbase_BlockingRpcCallback_get | /**
* Returns the parameter passed to {@link #run(Object)} or {@code null} if a null value was
* passed. When used asynchronously, this method will block until the {@link #run(Object)} method
* has been called.
* @return the response object or {@code null} if no response was passed
*/
public synchronized R get() t... | 3.68 |
flink_MemorySegment_putLongBigEndian | /**
* Writes the given long value (64bit, 8 bytes) to the given position in big endian byte order.
* This method's speed depends on the system's native byte order, and it is possibly slower than
* {@link #putLong(int, long)}. For most cases (such as transient storage in memory or
* serialization for I/O and network... | 3.68 |
hudi_MergeOnReadInputFormat_mayShiftInputSplit | /**
* Shifts the input split by its consumed records number.
*
* <p>Note: This action is time-consuming.
*/
private void mayShiftInputSplit(MergeOnReadInputSplit split) throws IOException {
if (split.isConsumed()) {
// if the input split has been consumed before,
// shift the input split with consumed num... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.