name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hudi_PartialUpdateAvroPayload_overwriteField | /**
* Return true if value equals defaultValue otherwise false.
*/
public Boolean overwriteField(Object value, Object defaultValue) {
return value == null;
} | 3.68 |
dubbo_AbstractJSONImpl_checkStringList | /**
* Casts a list of unchecked JSON values to a list of String. If the given list
* contains a value that is not a String, throws an exception.
*/
@SuppressWarnings("unchecked")
@Override
public List<String> checkStringList(List<?> rawList) {
assert rawList != null;
for (int i = 0; i < rawList.size(); i++) ... | 3.68 |
querydsl_ComparableExpression_nullif | /**
* Create a {@code nullif(this, other)} expression
*
* @param other
* @return nullif(this, other)
*/
@Override
public ComparableExpression<T> nullif(T other) {
return nullif(ConstantImpl.create(other));
} | 3.68 |
hadoop_NMClientAsync_onContainerReInitializeError | /**
* Error Callback for container re-initialization request.
*
* @param containerId the Id of the container to be Re-Initialized.
* @param t a Throwable.
*/
public void onContainerReInitializeError(ContainerId containerId,
Throwable t) {} | 3.68 |
hbase_OrderedBytes_isEncodedValue | /**
* Returns true when {@code src} appears to be positioned an encoded value, false otherwise.
*/
public static boolean isEncodedValue(PositionedByteRange src) {
return isNull(src) || isNumeric(src) || isFixedInt8(src) || isFixedInt16(src)
|| isFixedInt32(src) || isFixedInt64(src) || isFixedFloat32(src) || isF... | 3.68 |
zxing_HybridBinarizer_calculateThresholdForBlock | /**
* For each block in the image, calculate the average black point using a 5x5 grid
* of the blocks around it. Also handles the corner cases (fractional blocks are computed based
* on the last pixels in the row/column which are also used in the previous block).
*/
private static void calculateThresholdForBlock(by... | 3.68 |
flink_ExecutionConfig_getClosureCleanerLevel | /** Returns the configured {@link ClosureCleanerLevel}. */
public ClosureCleanerLevel getClosureCleanerLevel() {
return configuration.get(PipelineOptions.CLOSURE_CLEANER_LEVEL);
} | 3.68 |
querydsl_DateTimeExpression_nullif | /**
* Create a {@code nullif(this, other)} expression
*
* @param other
* @return nullif(this, other)
*/
@Override
public DateTimeExpression<T> nullif(T other) {
return nullif(ConstantImpl.create(other));
} | 3.68 |
flink_HiveParserBaseSemanticAnalyzer_getUnescapedUnqualifiedTableName | /**
* Get the unqualified name from a table node. This method works for table names qualified with
* their schema (e.g., "catalog.db.table") and table names without schema qualification. In both
* cases, it returns the table name without the schema.
*
* @param node the table node
* @return the table name without ... | 3.68 |
hbase_HttpServer_setName | /**
* @see #setAppDir(String)
* @deprecated Since 0.99.0. Use {@link #setAppDir(String)} instead.
*/
@Deprecated
public Builder setName(String name) {
this.name = name;
return this;
} | 3.68 |
hadoop_WritableName_getName | /**
* Return the name for a class.
* Default is {@link Class#getName()}.
* @param writableClass input writableClass.
* @return name for a class.
*/
public static synchronized String getName(Class<?> writableClass) {
String name = CLASS_TO_NAME.get(writableClass);
if (name != null)
return name;
return wri... | 3.68 |
hbase_StoreFileTrackerValidationUtils_checkForModifyTable | /**
* Pre check when modifying a table.
* <p/>
* The basic idea is when you want to change the store file tracker implementation, you should use
* {@link Trackers#MIGRATION} first and then change to the destination store file tracker
* implementation.
* <p/>
* There are several rules:
* <ul>
* <li>For newly ad... | 3.68 |
hmily_HmilyLogicalOperator_valueFrom | /**
* Get logical operator value from text.
*
* @param text text
* @return logical operator value
*/
public static Optional<HmilyLogicalOperator> valueFrom(final String text) {
return Arrays.stream(values()).filter(each -> each.texts.contains(text)).findFirst();
} | 3.68 |
hadoop_TypedBytesInput_readRaw | /**
* Reads a typed bytes sequence. The first byte is interpreted as a type code,
* and then the right number of subsequent bytes are read depending on the
* obtained type.
*
* @return the obtained typed bytes sequence or null when the end of the file
* is reached
* @throws IOException
*/
public byte[]... | 3.68 |
morf_UpgradePathFinder_determinePath | /**
* Determines the upgrade path between two schemas. If no path can be found an
* {@link IllegalStateException} is thrown.
*
* @param current The current schema to be upgraded.
* @param target The target schema to upgrade to.
* @param exceptionRegexes Regular exceptions for the table exceptions.
* @return An o... | 3.68 |
hbase_QuotaCache_getNamespaceLimiter | /**
* Returns the limiter associated to the specified namespace.
* @param namespace the namespace to limit
* @return the limiter associated to the specified namespace
*/
public QuotaLimiter getNamespaceLimiter(final String namespace) {
return getQuotaState(this.namespaceQuotaCache, namespace).getGlobalLimiter();
... | 3.68 |
hadoop_RenameOperation_completeActiveCopiesAndDeleteSources | /**
* Block waiting for ay active copies to finish
* then delete all queued keys + paths to delete.
* @param reason reason for logs
* @throws IOException failure.
*/
@Retries.RetryTranslated
private void completeActiveCopiesAndDeleteSources(String reason)
throws IOException {
completeActiveCopies(reason);
... | 3.68 |
flink_SchedulerBase_computeVertexParallelismStore | /**
* Compute the {@link VertexParallelismStore} for all vertices of a given job graph, which will
* set defaults and ensure that the returned store contains valid parallelisms.
*
* @param jobGraph the job graph to retrieve vertices from
* @return the computed parallelism store
*/
public static VertexParallelismS... | 3.68 |
morf_UpgradeTestHelper_instantiateAndValidateUpgradeSteps | /**
* Turn the list of classes into a list of objects.
*/
private List<UpgradeStep> instantiateAndValidateUpgradeSteps(Iterable<Class<? extends UpgradeStep>> stepClasses) {
return Streams.stream(stepClasses)
.map(stepClass -> {
UpgradeStep upgradeStep;
try {
Constructor<? extends Upg... | 3.68 |
hbase_OrderedBytes_normalize | /**
* Strip all trailing zeros to ensure that no digit will be zero and round using our default
* context to ensure precision doesn't exceed max allowed. From Phoenix's {@code NumberUtil}.
* @return new {@link BigDecimal} instance
*/
static BigDecimal normalize(BigDecimal val) {
return null == val ? null : val.st... | 3.68 |
hudi_HoodieTableConfig_storeProperties | /**
* Write the properties to the given output stream and return the table checksum.
*
* @param props - properties to be written
* @param outputStream - output stream to which properties will be written
* @return return the table checksum
* @throws IOException
*/
private static String storeProperties(Prop... | 3.68 |
hudi_HoodieInputFormatUtils_filterInstantsTimeline | /**
* Filter any specific instants that we do not want to process.
* example timeline:
* <p>
* t0 -> create bucket1.parquet
* t1 -> create and append updates bucket1.log
* t2 -> request compaction
* t3 -> create bucket2.parquet
* <p>
* if compaction at t2 takes a long time, incremental readers on RO tables can... | 3.68 |
hbase_ZKAuthentication_isSecureZooKeeper | /**
* Returns {@code true} when secure authentication is enabled (whether
* {@code hbase.security.authentication} is set to "{@code kerberos}").
*/
public static boolean isSecureZooKeeper(Configuration conf) {
// Detection for embedded HBase client with jaas configuration
// defined for third party programs.
t... | 3.68 |
hudi_HiveSchemaUtil_convertParquetSchemaToHiveSchema | /**
* Returns equivalent Hive table schema read from a parquet file.
*
* @param messageType : Parquet Schema
* @return : Hive Table schema read from parquet file MAP[String,String]
*/
public static Map<String, String> convertParquetSchemaToHiveSchema(MessageType messageType, boolean supportTimestamp) throws IOExce... | 3.68 |
hudi_HoodieRealtimeRecordReaderUtils_addPartitionFields | /**
* Hive implementation of ParquetRecordReader results in partition columns not present in the original parquet file to
* also be part of the projected schema. Hive expects the record reader implementation to return the row in its
* entirety (with un-projected column having null values). As we use writerSchema for... | 3.68 |
querydsl_MetaDataExporter_setConfiguration | /**
* Override the configuration
*
* @param configuration override configuration for custom type mappings etc
*/
public void setConfiguration(Configuration configuration) {
module.bind(Configuration.class, configuration);
} | 3.68 |
morf_AbstractSqlDialectTest_testAlterPrimaryKeyColumnCompositeKey | /**
* Test changing a column which is part of a composite primary key.
*/
@Test
public void testAlterPrimaryKeyColumnCompositeKey() {
testAlterTableColumn(COMPOSITE_PRIMARY_KEY_TABLE, AlterationType.ALTER, getColumn(COMPOSITE_PRIMARY_KEY_TABLE, SECOND_PRIMARY_KEY),
column(SECOND_PRIMARY_KEY, DataType.STRING, 5)... | 3.68 |
dubbo_ScopeClusterInvoker_invoke | /**
* Checks if the current ScopeClusterInvoker is exported to the local JVM and invokes the corresponding Invoker.
* If it's not exported locally, then it delegates the invocation to the original Invoker.
*
* @param invocation the invocation to be performed
* @return the result of the invocation
* @throws RpcExc... | 3.68 |
querydsl_ComparableExpression_lt | /**
* Create a {@code this < right} expression
*
* @param right rhs of the comparison
* @return this < right
* @see java.lang.Comparable#compareTo(Object)
*/
public BooleanExpression lt(Expression<T> right) {
return Expressions.booleanOperation(Ops.LT, mixin, right);
} | 3.68 |
dubbo_BasicJsonWriter_println | /**
* Write a new line.
*/
public IndentingWriter println() {
String separator = System.lineSeparator();
try {
this.out.write(separator.toCharArray(), 0, separator.length());
} catch (IOException ex) {
throw new IllegalStateException(ex);
}
this.prependIndent = true;
return thi... | 3.68 |
hbase_AtomicUtils_updateMax | /**
* Updates a AtomicLong which is supposed to maintain the maximum values. This method is not
* synchronized but is thread-safe.
*/
public static void updateMax(AtomicLong max, long value) {
while (true) {
long cur = max.get();
if (value <= cur) {
break;
}
if (max.compareAndSet(cur, value)... | 3.68 |
hadoop_RPCUtil_unwrapAndThrowException | /**
* Utility method that unwraps and returns appropriate exceptions.
*
* @param se
* ServiceException
* @return An instance of the actual exception, which will be a subclass of
* {@link YarnException} or {@link IOException}
* @throws IOException io error occur.
* @throws YarnException excepti... | 3.68 |
morf_AbstractSqlDialectTest_testSelectHavingScript | /**
* Tests a select with a "having" clause.
*/
@Test
public void testSelectHavingScript() {
SelectStatement stmt = new SelectStatement(new FieldReference(STRING_FIELD))
.from(new TableReference(ALTERNATE_TABLE))
.groupBy(new FieldReference(STRING_FIELD))
.having(eq(new FieldReference("blah"), "X"));
Strin... | 3.68 |
flink_Tuple8_equals | /**
* Deep equality for tuples by calling equals() on the tuple members.
*
* @param o the object checked for equality
* @return true if this is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Tuple8)) {
return false;
}
... | 3.68 |
framework_Embedded_removeClickListener | /**
* Remove a click listener from the component. The listener should earlier
* have been added using {@link #addClickListener(ClickListener)}.
*
* @param listener
* The listener to remove
*
* @deprecated As of 8.0, replaced by {@link Registration#remove()} in the
* registration object re... | 3.68 |
hadoop_FederationStateStoreHeartbeat_updateClusterState | /**
* Get the current cluster state as a JSON string representation of the
* {@link ClusterMetricsInfo}.
*/
private void updateClusterState() {
try {
// get the current state
currentClusterState.getBuffer().setLength(0);
ClusterMetricsInfo clusterMetricsInfo = new ClusterMetricsInfo(rs);
marshaller... | 3.68 |
pulsar_ServiceUrlProvider_close | /**
* Close the resource that the provider allocated.
*
*/
@Override
default void close() {
// do nothing
} | 3.68 |
hadoop_BlockRecoveryCommand_add | /**
* Add recovering block to the command.
*/
public void add(RecoveringBlock block) {
recoveringBlocks.add(block);
} | 3.68 |
dubbo_SlidingWindow_list | /**
* Get valid pane list for entire sliding window at the specified time.
* The list will only contain "valid" panes.
*
* @param timeMillis the specified time.
* @return valid pane list for entire sliding window.
*/
public List<Pane<T>> list(long timeMillis) {
if (timeMillis < 0) {
return new ArrayLi... | 3.68 |
morf_TableReference_isTemporary | /**
* Indicates whether the table is temporary.
*
* @return true if the table is a temporary table.
*/
public boolean isTemporary() {
return temporary;
} | 3.68 |
hmily_MetricsReporter_register | /**
* Register.
*
* @param metricsRegister metrics register
*/
public static void register(final MetricsRegister metricsRegister) {
MetricsReporter.metricsRegister = metricsRegister;
} | 3.68 |
hbase_WALEdit_isCompactionMarker | /**
* Returns true if the given cell is a serialized {@link CompactionDescriptor}
* @see #getCompaction(Cell)
*/
public static boolean isCompactionMarker(Cell cell) {
return CellUtil.matchingColumn(cell, METAFAMILY, COMPACTION);
} | 3.68 |
framework_VTabsheet_hideTabs | /**
* Makes tab bar invisible.
*
* @since 7.2
*/
public void hideTabs() {
tb.setVisible(false);
addStyleName(CLASSNAME + "-hidetabs");
} | 3.68 |
hbase_RpcExecutor_getHandler | /**
* Override if providing alternate Handler implementation.
*/
protected RpcHandler getHandler(final String name, final double handlerFailureThreshhold,
final int handlerCount, final BlockingQueue<CallRunner> q,
final AtomicInteger activeHandlerCount, final AtomicInteger failedHandlerCount,
final Abortable ab... | 3.68 |
morf_Oracle_formatJdbcUrl | /**
*
* @see org.alfasoftware.morf.jdbc.DatabaseType#formatJdbcUrl(org.alfasoftware.morf.jdbc.JdbcUrlElements)
*/
@Override
public String formatJdbcUrl(JdbcUrlElements jdbcUrlElements) {
return "jdbc:oracle:thin:@" + jdbcUrlElements.getHostName() + (jdbcUrlElements.getPort() == 0 ? "" : ":" + jdbcUrlElements.getPo... | 3.68 |
morf_SqlScriptExecutorProvider_executionEnd | /**
* @see org.alfasoftware.morf.jdbc.SqlScriptExecutor.SqlScriptVisitor#executionEnd()
*/
@Override
public void executionEnd() {
// Defaults to no-op
} | 3.68 |
hbase_StochasticLoadBalancer_updateStochasticCosts | /**
* update costs to JMX
*/
private void updateStochasticCosts(TableName tableName, double overall, double[] subCosts) {
if (tableName == null) {
return;
}
// check if the metricsBalancer is MetricsStochasticBalancer before casting
if (metricsBalancer instanceof MetricsStochasticBalancer) {
MetricsS... | 3.68 |
morf_AbstractSqlDialectTest_testSelectMultipleNestedWhereScript | /**
* Tests a select with multiple nested where clauses.
*/
@Test
public void testSelectMultipleNestedWhereScript() {
SelectStatement stmt = new SelectStatement().from(new TableReference(TEST_TABLE))
.where(and(
eq(new FieldReference(STRING_FIELD), "A0001"),
or(
greaterThan(new Field... | 3.68 |
hudi_HoodieBloomIndex_loadColumnRangesFromMetaIndex | /**
* Load the column stats index as BloomIndexFileInfo for all the involved files in the partition.
*
* @param partitions - List of partitions for which column stats need to be loaded
* @param context - Engine context
* @param hoodieTable - Hoodie table
* @return List of partition and file column range info... | 3.68 |
dubbo_AbstractClusterInvoker_setRemote | /**
* Set the remoteAddress and remoteApplicationName so that filter can get them.
*
*/
private void setRemote(Invoker<?> invoker, Invocation invocation) {
invocation.addInvokedInvoker(invoker);
RpcServiceContext serviceContext = RpcContext.getServiceContext();
serviceContext.setRemoteAddress(invoker.get... | 3.68 |
framework_WebBrowser_getCurrentDate | /**
* Returns the current date and time of the browser. This will not be
* entirely accurate due to varying network latencies, but should provide a
* close-enough value for most cases. Also note that the returned Date
* object uses servers default time zone, not the clients.
* <p>
* To get the actual date and tim... | 3.68 |
hbase_CommonFSUtils_getWrongWALRegionDir | /**
* For backward compatibility with HBASE-20734, where we store recovered edits in a wrong
* directory without BASE_NAMESPACE_DIR. See HBASE-22617 for more details.
* @deprecated For compatibility, will be removed in 4.0.0.
*/
@Deprecated
public static Path getWrongWALRegionDir(final Configuration conf, final Tab... | 3.68 |
hbase_Reference_toByteArray | /**
* Use this when writing to a stream and you want to use the pb mergeDelimitedFrom (w/o the
* delimiter, pb reads to EOF which may not be what you want).
* @return This instance serialized as a delimited protobuf w/ a magic pb prefix.
*/
byte[] toByteArray() throws IOException {
return ProtobufUtil.prependPBMa... | 3.68 |
rocketmq-connect_WorkerTask_getState | /**
* get state
*
* @return
*/
public WorkerTaskState getState() {
return this.state.get();
} | 3.68 |
hbase_BitSetNode_getBitmapIndex | // ========================================================================
// Bitmap Helpers
// ========================================================================
private int getBitmapIndex(final long procId) {
return (int) (procId - start);
} | 3.68 |
hadoop_BlockRecoveryCommand_getNewGenerationStamp | /**
* Return the new generation stamp of the block,
* which also plays role of the recovery id.
*/
public long getNewGenerationStamp() {
return newGenerationStamp;
} | 3.68 |
hbase_BloomFilterMetrics_getNegativeResultsCount | /** Returns Current value for bloom negative results count */
public long getNegativeResultsCount() {
return negativeResults.sum();
} | 3.68 |
hudi_AvroSchemaCompatibility_getDescription | /**
* Gets a human readable description of this validation result.
*
* @return a human readable description of this validation result.
*/
public String getDescription() {
return mDescription;
} | 3.68 |
querydsl_JTSGeometryExpressions_asEWKT | /**
* Return a specified ST_Geometry value from Extended Well-Known Text representation (EWKT).
*
* @param expr geometry
* @return EWKT form
*/
public static StringExpression asEWKT(JTSGeometryExpression<?> expr) {
return Expressions.stringOperation(SpatialOps.AS_EWKT, expr);
} | 3.68 |
framework_VAbstractCalendarPanel_getDateField | /**
* Returns the date field which this panel is attached to.
*
* @return the "parent" date field
*/
protected VDateField<R> getDateField() {
return parent;
} | 3.68 |
hadoop_ServiceLauncher_serviceMain | /**
* Varargs version of the entry point for testing and other in-JVM use.
* Hands off to {@link #serviceMain(List)}
* @param args command line arguments.
*/
public static void serviceMain(String... args) {
serviceMain(Arrays.asList(args));
} | 3.68 |
hbase_MetaTableMetrics_getRegionIdFromOp | /**
* Get regionId from Ops such as: get, put, delete.
* @param op such as get, put or delete.
*/
private String getRegionIdFromOp(Row op) {
final String tableRowKey = Bytes.toString(op.getRow());
if (StringUtils.isEmpty(tableRowKey)) {
return null;
}
final String[] splits = tableRowKey.split(",");
ret... | 3.68 |
flink_RpcSerializedValue_getSerializedDataLength | /** Return length of serialized data, zero if no serialized data. */
public int getSerializedDataLength() {
return serializedData == null ? 0 : serializedData.length;
} | 3.68 |
framework_TableConnector_showSavedContextMenu | /**
* Shows a saved row context menu if the row for the context menu is still
* visible. Does nothing if a context menu has not been saved.
*
* @param savedContextMenu
*/
public void showSavedContextMenu(ContextMenuDetails savedContextMenu) {
if (isEnabled() && savedContextMenu != null) {
for (Widget w... | 3.68 |
flink_ListViewSerializer_transformLegacySerializerSnapshot | /**
* We need to override this as a {@link LegacySerializerSnapshotTransformer} because in Flink
* 1.6.x and below, this serializer was incorrectly returning directly the snapshot of the
* nested list serializer as its own snapshot.
*
* <p>This method transforms the incorrect list serializer snapshot to be a prope... | 3.68 |
hadoop_CommonCallableSupplier_submit | /**
* Submit a callable into a completable future.
* RTEs are rethrown.
* Non RTEs are caught and wrapped; IOExceptions to
* {@code RuntimeIOException} instances.
* @param executor executor.
* @param call call to invoke
* @param <T> type
* @return the future to wait for
*/
@SuppressWarnings("unchecked... | 3.68 |
graphhopper_MinHeapWithUpdate_push | /**
* Adds an element to the heap, the given id must not exceed the size specified in the constructor. Its illegal
* to push the same id twice (unless it was polled/removed before). To update the value of an id contained in the
* heap use the {@link #update} method.
*/
public void push(int id, float value) {
ch... | 3.68 |
hadoop_FSBuilderSupport_getPositiveLong | /**
* Get a long value with resilience to unparseable values.
* Negative values are replaced with the default.
* @param key key to log
* @param defVal default value
* @return long value
*/
public long getPositiveLong(String key, long defVal) {
long l = getLong(key, defVal);
if (l < 0) {
LOG.debug("The opt... | 3.68 |
hbase_HtmlQuoting_quoteOutputStream | /**
* Return an output stream that quotes all of the output.
* @param out the stream to write the quoted output to
* @return a new stream that the application show write to
*/
public static OutputStream quoteOutputStream(final OutputStream out) {
return new OutputStream() {
private byte[] data = new byte[1];
... | 3.68 |
querydsl_ExpressionUtils_path | /**
* Create a new Path expression
*
* @param type type of expression
* @param metadata path metadata
* @param <T> type of expression
* @return path expression
*/
public static <T> Path<T> path(Class<? extends T> type, PathMetadata metadata) {
return new PathImpl<T>(type, metadata);
} | 3.68 |
MagicPlugin_Base64Coder_decodeLines | /**
* Decodes a byte array from Base64 format and ignores line separators, tabs and blanks.
* CR, LF, Tab and Space characters are ignored in the input data.
* This method is compatible with <code>sun.misc.BASE64Decoder.decodeBuffer(String)</code>.
*
* @param s A Base64 String to be decoded.
* @return An array co... | 3.68 |
framework_VGridLayout_calcColumnUsedSpace | /**
* Calculates column used space
*/
private int calcColumnUsedSpace() {
int usedSpace = 0;
int horizontalSpacing = getHorizontalSpacing();
boolean visibleFound = false;
for (int i = 0; i < minColumnWidths.length; i++) {
if (minColumnWidths[i] > 0 || !hiddenEmptyColumn(i)) {
if (v... | 3.68 |
hbase_HRegion_shouldFlushStore | /**
* Should the store be flushed because it is old enough.
* <p>
* Every FlushPolicy should call this to determine whether a store is old enough to flush (except
* that you always flush all stores). Otherwise the method will always returns true which will
* make a lot of flush requests.
*/
boolean shouldFlushSto... | 3.68 |
AreaShop_CommandAreaShop_getTabCompleteList | /**
* Get a list of string to complete a command with (raw list, not matching ones not filtered out).
* @param toComplete The number of the argument that has to be completed
* @param start The already given start of the command
* @param sender The CommandSender that wants to tab complete
* @return A colle... | 3.68 |
morf_UpgradePath_hasStepsToApply | /**
* Returns whether it contains an upgrade path. i.e. if we have either
* {@link #getSteps()} or {@link #getSql()}.
*
* @return true if there is a path.
*/
public boolean hasStepsToApply() {
return !getSteps().isEmpty() || !sql.isEmpty();
} | 3.68 |
framework_TablePushStreaming_setup | /*
* (non-Javadoc)
*
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@Override
protected void setup(VaadinRequest request) {
final Table t = new Table("The table");
t.setContainerDataSource(generateContainer(10, 10, iteration++));
t.setSizeFull();
Runn... | 3.68 |
flink_UserDefinedFunction_close | /**
* Tear-down method for user-defined function. It can be used for clean up work. By default,
* this method does nothing.
*/
public void close() throws Exception {
// do nothing
} | 3.68 |
pulsar_BrokerService_registerConfigurationListener | /**
* Allows a listener to listen on update of {@link ServiceConfiguration} change, so listener can take appropriate
* action if any specific config-field value has been changed.
*
* On notification, listener should first check if config value has been changed and after taking appropriate
* action, listener should... | 3.68 |
hbase_ScannerContext_hasMoreValues | /**
* @return true when the state indicates that more values may follow those that have been
* returned
*/
public boolean hasMoreValues() {
return this.moreValues;
} | 3.68 |
flink_ResourceCounter_add | /**
* Adds increment to the count of resourceProfile and returns the new value.
*
* @param resourceProfile resourceProfile to which to add increment
* @param increment increment is the number by which to increase the resourceProfile
* @return new ResourceCounter containing the result of the addition
*/
public Res... | 3.68 |
hbase_MemStoreFlusher_setGlobalMemStoreLimit | /**
* Sets the global memstore limit to a new size.
*/
@Override
public void setGlobalMemStoreLimit(long globalMemStoreSize) {
this.server.getRegionServerAccounting().setGlobalMemStoreLimits(globalMemStoreSize);
reclaimMemStoreMemory();
} | 3.68 |
hbase_NamespacesInstanceResource_processUpdate | // Check that POST or PUT is valid and then update namespace.
private Response processUpdate(NamespacesInstanceModel model, final boolean updateExisting,
final UriInfo uriInfo) {
if (LOG.isTraceEnabled()) {
LOG.trace((updateExisting ? "PUT " : "POST ") + uriInfo.getAbsolutePath());
}
if (model == null) {
... | 3.68 |
hbase_HRegionFileSystem_mergeStoreFile | /**
* Write out a merge reference under the given merges directory.
* @param mergingRegion {@link RegionInfo} for one of the regions being merged.
* @param familyName Column Family Name
* @param f File to create reference.
* @return Path to created reference.
* @throws IOException if the merge writ... | 3.68 |
hadoop_ReencryptionHandler_restoreFromLastProcessedFile | /**
* Restore the re-encryption from the progress inside ReencryptionStatus.
* This means start from exactly the lastProcessedFile (LPF), skipping all
* earlier paths in lexicographic order. Lexicographically-later directories
* on the LPF parent paths are added to subdirs.
*/
private void restoreFromLastProcessed... | 3.68 |
framework_TreeTable_removeExpandListener | /**
* Removes an expand listener.
*
* @param listener
* the Listener to be removed.
*/
public void removeExpandListener(ExpandListener listener) {
removeListener(ExpandEvent.class, listener,
ExpandListener.EXPAND_METHOD);
} | 3.68 |
hbase_TableInputFormatBase_initializeTable | /**
* Allows subclasses to initialize the table information.
* @param connection The Connection to the HBase cluster. MUST be unmanaged. We will close.
* @param tableName The {@link TableName} of the table to process.
*/
protected void initializeTable(Connection connection, TableName tableName) throws IOException ... | 3.68 |
hbase_FavoredNodeAssignmentHelper_multiRackCase | /**
* Place secondary and tertiary nodes in a multi rack case. If there are only two racks, then we
* try the place the secondary and tertiary on different rack than primary. But if the other rack
* has only one region server, then we place primary and tertiary on one rack and secondary on
* another. The aim is two... | 3.68 |
flink_HsFileDataManager_tryRead | /** @return number of buffers read. */
private int tryRead() {
Queue<HsSubpartitionFileReader> availableReaders = prepareAndGetAvailableReaders();
if (availableReaders.isEmpty()) {
return 0;
}
Queue<MemorySegment> buffers;
try {
buffers = allocateBuffers();
} catch (Exception ex... | 3.68 |
hudi_TableOptionProperties_loadFromProperties | /**
* Read table options map from the given table base path.
*/
public static Map<String, String> loadFromProperties(String basePath, Configuration hadoopConf) {
Path propertiesFilePath = getPropertiesFilePath(basePath);
Map<String, String> options = new HashMap<>();
Properties props = new Properties();
File... | 3.68 |
AreaShop_CancellableRegionEvent_allow | /**
* Let the event continue, possible overwriting a cancel() call from another plugin.
*/
public void allow() {
this.cancelled = false;
this.reason = null;
} | 3.68 |
dubbo_DubboProtocol_getSharedClient | /**
* Get shared connection
*
* @param url
* @param connectNum connectNum must be greater than or equal to 1
*/
@SuppressWarnings("unchecked")
private SharedClientsProvider getSharedClient(URL url, int connectNum) {
String key = url.getAddress();
// connectNum must be greater than or equal to 1
int ex... | 3.68 |
querydsl_AbstractSQLQuery_endContext | /**
* Called to end a SQL listener context
*
* @param context the listener context to end
*/
protected void endContext(SQLListenerContext context) {
listeners.end(context);
} | 3.68 |
flink_TableEnvironment_create | /**
* Creates a table environment that is the entry point and central context for creating Table
* and SQL API programs.
*
* <p>It is unified both on a language level for all JVM-based languages (i.e. there is no
* distinction between Scala and Java API) and for bounded and unbounded data processing.
*
* <p>A ta... | 3.68 |
pulsar_MultiTopicsConsumerImpl_getPartitionedTopics | // get topics name
public List<String> getPartitionedTopics() {
return partitionedTopics.keySet().stream().collect(Collectors.toList());
} | 3.68 |
hbase_Import_addFilterAndArguments | /**
* Add a Filter to be instantiated on import
* @param conf Configuration to update (will be passed to the job)
* @param clazz {@link Filter} subclass to instantiate on the server.
* @param filterArgs List of arguments to pass to the filter on instantiation
*/
public static void addFilterAndArguments(... | 3.68 |
framework_FieldBinder_resolveFields | /**
* Resolves the fields of the design class instance.
*/
private void resolveFields(Class<?> classWithFields) {
for (Field memberField : getFields(classWithFields)) {
if (Component.class.isAssignableFrom(memberField.getType())) {
fieldMap.put(memberField.getName().toLowerCase(Locale.ROOT),
... | 3.68 |
dubbo_ConfigUtils_mergeValues | /**
* Insert default extension into extension list.
* <p>
* Extension list support<ul>
* <li>Special value <code><strong>default</strong></code>, means the location for default extensions.
* <li>Special symbol<code><strong>-</strong></code>, means remove. <code>-foo1</code> will remove default extension 'foo'; <co... | 3.68 |
hibernate-validator_ClassHierarchyHelper_getHierarchy | /**
* Retrieves all superclasses and interfaces recursively.
*
* @param clazz the class to start the search with
* @param classes list of classes to which to add all found super types matching
* the given filters
* @param filters filters applying for the search
*/
private static <T> void getHierarchy(Class<? sup... | 3.68 |
framework_DesignAttributeHandler_removeSubsequentUppercase | /**
* Replaces subsequent UPPERCASE strings of length 2 or more followed either
* by another uppercase letter or an end of string. This is to generalise
* handling of method names like <tt>showISOWeekNumbers</tt>.
*
* @param param
* Input string.
* @return Input string with sequences of UPPERCASE turn... | 3.68 |
framework_VLayoutSlot_setExpandRatio | /**
* Set how the slot should be expanded relative to the other slots.
*
* @param expandRatio
* The ratio of the space the slot should occupy
*
* @deprecated this value isn't used for anything by default
*/
@Deprecated
public void setExpandRatio(double expandRatio) {
this.expandRatio = expandRatio... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.