name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hadoop_FindOptions_getConfiguration | /**
* Return the {@link Configuration} return configuration {@link Configuration}
* @return configuration.
*/
public Configuration getConfiguration() {
return this.configuration;
} | 3.68 |
hadoop_CounterGroupFactory_getFrameworkGroupId | /**
* Get the id of a framework group
* @param name of the group
* @return the framework group id
*/
public static synchronized int getFrameworkGroupId(String name) {
Integer i = s2i.get(name);
if (i == null) throwBadFrameworkGroupNameException(name);
return i;
} | 3.68 |
MagicPlugin_MageDataStore_close | /**
* Close this data store. This should close any open connections and free up any resources that would be
* contentious if this data store was immediately re-created.
*/
default void close() {
} | 3.68 |
flink_TypeSerializerSchemaCompatibility_isCompatibleWithReconfiguredSerializer | /**
* Returns whether or not the type of the compatibility is {@link
* Type#COMPATIBLE_WITH_RECONFIGURED_SERIALIZER}.
*
* @return whether or not the type of the compatibility is {@link
* Type#COMPATIBLE_WITH_RECONFIGURED_SERIALIZER}.
*/
public boolean isCompatibleWithReconfiguredSerializer() {
return resu... | 3.68 |
hudi_HoodieFileGroup_addLogFile | /**
* Add a new log file into the group.
*
* <p>CAUTION: the log file must be added in sequence of the delta commit time.
*/
public void addLogFile(CompletionTimeQueryView completionTimeQueryView, HoodieLogFile logFile) {
String baseInstantTime = getBaseInstantTime(completionTimeQueryView, logFile);
if (!fileSl... | 3.68 |
hbase_MemStoreSizing_decMemStoreSize | /** Returns The new dataSize ONLY as a convenience */
default long decMemStoreSize(long dataSizeDelta, long heapSizeDelta, long offHeapSizeDelta,
int cellsCountDelta) {
return incMemStoreSize(-dataSizeDelta, -heapSizeDelta, -offHeapSizeDelta, -cellsCountDelta);
} | 3.68 |
hbase_AuthManager_accessUserTable | /**
* Checks if the user has access to the full table or at least a family/qualifier for the
* specified action.
* @param user user name
* @param table table name
* @param action action in one of [Read, Write, Create, Exec, Admin]
* @return true if the user has access to the table, false otherwise
*/
public b... | 3.68 |
hbase_BloomFilterMetrics_incrementRequests | /**
* Increment bloom request count, and negative result count if !passed
*/
public void incrementRequests(boolean passed) {
requests.increment();
if (!passed) {
negativeResults.increment();
}
} | 3.68 |
flink_OperationUtils_formatWithChildren | /**
* Formats a Tree of {@link Operation} in a unified way. It prints all the parameters and adds
* all children formatted and properly indented in the following lines.
*
* <p>The format is
*
* <pre>{@code
* <operationName>: [(key1: [value1], key2: [v1, v2])]
* <child1>
* <child2>
* <child3>
... | 3.68 |
hadoop_HsCountersPage_preHead | /*
* (non-Javadoc)
* @see org.apache.hadoop.mapreduce.v2.hs.webapp.HsView#preHead(org.apache.hadoop.yarn.webapp.hamlet.Hamlet.HTML)
*/
@Override protected void preHead(Page.HTML<__> html) {
commonPreHead(html);
setActiveNavColumnForTask();
set(DATATABLES_SELECTOR, "#counters .dt-counters");
set(initSelector(... | 3.68 |
framework_BasicEvent_getDescription | /*
* (non-Javadoc)
*
* @see com.vaadin.addon.calendar.event.CalendarEvent#getDescription()
*/
@Override
public String getDescription() {
return description;
} | 3.68 |
hadoop_AbstractS3ACommitter_abortPendingUploadsInCleanup | /**
* Abort all pending uploads to the destination directory during
* job cleanup operations.
* Note: this instantiates the thread pool if required -so
* @param suppressExceptions should exceptions be suppressed
* @param commitContext commit context
* @throws IOException IO problem
*/
protected void abortPending... | 3.68 |
flink_FlinkRelMdCollation_filter | /** Helper method to determine a {@link org.apache.calcite.rel.core.Filter}'s collation. */
public static List<RelCollation> filter(RelMetadataQuery mq, RelNode input) {
return mq.collations(input);
} | 3.68 |
pulsar_TopicsBase_publishMessages | // Publish message to a topic, can be partitioned or non-partitioned
protected void publishMessages(AsyncResponse asyncResponse, ProducerMessages request, boolean authoritative) {
String topic = topicName.getPartitionedTopicName();
try {
if (pulsar().getBrokerService().getOwningTopics().containsKey(topi... | 3.68 |
flink_Predicates_containAnyFieldsInClassHierarchyThat | /**
* @return A {@link DescribedPredicate} returning true, if and only if the predicate {@link
* JavaField} could be found in the {@link JavaClass}.
*/
public static DescribedPredicate<JavaClass> containAnyFieldsInClassHierarchyThat(
DescribedPredicate<? super JavaField> predicate) {
return new Conta... | 3.68 |
hadoop_FederationMembershipStateStoreInputValidator_checkCapability | /**
* Validate if the Capability is present or not.
*
* @param capability the capability of the subcluster to be verified
* @throws FederationStateStoreInvalidInputException if the capability is
* invalid
*/
private static void checkCapability(String capability)
throws FederationStateStoreInvalidInp... | 3.68 |
hbase_MasterCoprocessorHost_preTruncateRegionAction | /**
* Invoked just before calling the truncate region procedure
* @param region Region to be truncated
* @param user The user
*/
public void preTruncateRegionAction(final RegionInfo region, User user) throws IOException {
execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation(user) {
... | 3.68 |
hbase_HBaseTestingUtility_setupMiniKdc | /**
* Sets up {@link MiniKdc} for testing security. Uses {@link HBaseKerberosUtils} to set the given
* keytab file as {@link HBaseKerberosUtils#KRB_KEYTAB_FILE}. FYI, there is also the easier-to-use
* kerby KDC server and utility for using it,
* {@link org.apache.hadoop.hbase.util.SimpleKdcServerUtil}. The kerby KD... | 3.68 |
hbase_LruBlockCache_runEviction | /**
* Multi-threaded call to run the eviction process.
*/
private void runEviction() {
if (evictionThread == null || !evictionThread.isGo()) {
evict();
} else {
evictionThread.evict();
}
} | 3.68 |
dubbo_IOUtils_write | /**
* write.
*
* @param reader Reader.
* @param writer Writer.
* @param bufferSize buffer size.
* @return count.
* @throws IOException If an I/O error occurs
*/
public static long write(Reader reader, Writer writer, int bufferSize) throws IOException {
int read;
long total = 0;
char[] buf = ... | 3.68 |
hbase_RecoverableZooKeeper_getMaxMultiSizeLimit | /**
* Returns the maximum size (in bytes) that should be included in any single multi() call. NB:
* This is an approximation, so there may be variance in the msg actually sent over the wire.
* Please be sure to set this approximately, with respect to your ZK server configuration for
* jute.maxbuffer.
*/
public int... | 3.68 |
flink_FutureUtils_forwardAsync | /**
* Forwards the value from the source future to the target future using the provided executor.
*
* @param source future to forward the value from
* @param target future to forward the value to
* @param executor executor to forward the source value to the target future
* @param <T> type of the value
*/
public ... | 3.68 |
druid_AntsparkOutputVisitor_visit | //add using statment
@Override
public boolean visit(AntsparkCreateTableStatement x) {
print0(ucase ? "CREATE " : "create ");
if (x.isExternal()) {
print0(ucase ? "EXTERNAL " : "external ");
}
if (x.isIfNotExists()) {
print0(ucase ? "TABLE IF NOT EXISTS " : "table if not exists ");
... | 3.68 |
streampipes_JdbcClient_connect | /**
* Connects to the SQL database and initializes {@link JdbcClient#connection}
*
* @throws SpRuntimeException When the connection could not be established (because of a
* wrong identification, missing database etc.)
*/
private void connect(String host, int port, String databaseName) th... | 3.68 |
hudi_Option_fromJavaOptional | /**
* Convert from java.util.Optional.
*
* @param v java.util.Optional object
* @param <T> type of the value stored in java.util.Optional object
* @return Option
*/
public static <T> Option<T> fromJavaOptional(Optional<T> v) {
return Option.ofNullable(v.orElse(null));
} | 3.68 |
hadoop_EntityGroupFSTimelineStoreMetrics_addActiveLogDirScanTime | // Log scanner and cleaner related
public void addActiveLogDirScanTime(long msec) {
activeLogDirScan.add(msec);
} | 3.68 |
zxing_GenericGF_inverse | /**
* @return multiplicative inverse of a
*/
int inverse(int a) {
if (a == 0) {
throw new ArithmeticException();
}
return expTable[size - logTable[a] - 1];
} | 3.68 |
framework_MultiSelectionModelImpl_selectionContainsId | /**
* Returns if the given id belongs to one of the selected items.
*
* @param id
* the id to check for
* @return {@code true} if id is selected, {@code false} if not
*/
protected boolean selectionContainsId(Object id) {
DataProvider<T, ?> dataProvider = getGrid().getDataProvider();
return sele... | 3.68 |
shardingsphere-elasticjob_JobConfiguration_cron | /**
* Cron expression.
*
* @param cron cron expression
* @return job configuration builder
*/
public Builder cron(final String cron) {
if (null != cron) {
this.cron = cron;
}
return this;
} | 3.68 |
framework_Button_setClickShortcut | /**
* Makes it possible to invoke a click on this button by pressing the given
* {@link KeyCode} and (optional) {@link ModifierKey}s.<br/>
* The shortcut is global (bound to the containing Window).
*
* @param keyCode
* the keycode for invoking the shortcut
* @param modifiers
* the (optiona... | 3.68 |
flink_Path_hasWindowsDrive | /**
* Checks if the provided path string contains a windows drive letter.
*
* @param path the path to check
* @param slashed true to indicate the first character of the string is a slash, false otherwise
* @return <code>true</code> if the path string contains a windows drive letter, false otherwise
*/
private boo... | 3.68 |
hbase_BackupManager_startBackupSession | /**
* Starts new backup session
* @throws IOException if active session already exists
*/
public void startBackupSession() throws IOException {
long startTime = EnvironmentEdgeManager.currentTime();
long timeout = conf.getInt(BACKUP_EXCLUSIVE_OPERATION_TIMEOUT_SECONDS_KEY,
DEFAULT_BACKUP_EXCLUSIVE_OPERATION_... | 3.68 |
hbase_AccessControlClient_hasPermission | /**
* Validates whether specified user has permission to perform actions on the mentioned table,
* column family or column qualifier.
* @param connection Connection
* @param tableName Table name, it shouldn't be null or empty.
* @param columnFamily The column family. Optional argument, can be empty. ... | 3.68 |
hbase_EnableTableProcedure_prepareEnable | /**
* Action before any real action of enabling table. Set the exception in the procedure instead of
* throwing it. This approach is to deal with backward compatible with 1.0.
* @param env MasterProcedureEnv
* @return whether the table passes the necessary checks
*/
private boolean prepareEnable(final MasterProced... | 3.68 |
hbase_RegionPlan_getRegionName | /**
* Get the encoded region name for the region this plan is for.
* @return Encoded region name
*/
public String getRegionName() {
return this.hri.getEncodedName();
} | 3.68 |
framework_Window_removeWindowModeChangeListener | /**
* Removes the WindowModeChangeListener from the window.
*
* @param listener
* the WindowModeChangeListener to remove.
*/
@Deprecated
public void removeWindowModeChangeListener(
WindowModeChangeListener listener) {
removeListener(WindowModeChangeEvent.class, listener,
WindowMo... | 3.68 |
framework_QueryBuilder_getWhereStringForFilter | /**
* Constructs and returns a string representing the filter that can be used
* in a WHERE clause.
*
* @param filter
* the filter to translate
* @param sh
* the statement helper to update with the value(s) of the filter
* @return a string representing the filter.
*/
public static synchro... | 3.68 |
flink_CatalogManager_dropTemporaryView | /**
* Drop a temporary view in a given fully qualified path.
*
* @param objectIdentifier The fully qualified path of the view to drop.
* @param ignoreIfNotExists If false exception will be thrown if the view to be dropped does not
* exist.
*/
public void dropTemporaryView(ObjectIdentifier objectIdentifier, bo... | 3.68 |
flink_EmbeddedRocksDBStateBackend_configure | /**
* Creates a copy of this state backend that uses the values defined in the configuration for
* fields where that were not yet specified in this state backend.
*
* @param config The configuration.
* @param classLoader The class loader.
* @return The re-configured variant of the state backend
*/
@Override
publ... | 3.68 |
framework_DownloadStream_setFileName | /**
* Sets the file name.
*
* @param fileName
* the file name to set.
*/
public void setFileName(String fileName) {
this.fileName = fileName;
} | 3.68 |
flink_JoinInputSideSpec_joinKeyContainsUniqueKey | /** Returns true if the join key contains the unique key of the input. */
public boolean joinKeyContainsUniqueKey() {
return joinKeyContainsUniqueKey;
} | 3.68 |
flink_HiveParserASTNode_getOrigin | /**
* @return information about the object from which this HiveParserASTNode originated, or null if
* this HiveParserASTNode was not expanded from an object reference
*/
public HiveParserASTNodeOrigin getOrigin() {
return origin;
} | 3.68 |
framework_AbstractConnector_getConnectorId | /*
* (non-Javadoc)
*
* @see com.vaadin.client.Connector#getId()
*/
@Override
public String getConnectorId() {
return id;
} | 3.68 |
hmily_MongodbXaRepository_convert | /**
* Convert hmily xa recovery.
*
* @param entity the entity
* @return the hmily xa recovery
*/
private HmilyXaRecovery convert(final XaRecoveryMongoEntity entity) {
return HmilyXaRecoveryImpl.convert(entity);
} | 3.68 |
hbase_DeadServer_getTimeOfDeath | /**
* Get the time when a server died
* @param deadServerName the dead server name
* @return the date when the server died
*/
public synchronized Date getTimeOfDeath(final ServerName deadServerName) {
Long time = deadServers.get(deadServerName);
return time == null ? null : new Date(time);
} | 3.68 |
AreaShop_ImportJob_message | /**
* Send a message to a target, prefixed by the default chat prefix.
* @param key The key of the language string
* @param replacements The replacements to insert in the message
*/
public void message(String key, Object... replacements) {
plugin.message(sender, key, replacements);
if(!(sender instanceo... | 3.68 |
hbase_HRegion_setReadOnly | /**
* Set flags that make this region read-only.
* @param onOff flip value for region r/o setting
*/
synchronized void setReadOnly(final boolean onOff) {
this.writesEnabled = !onOff;
this.readOnly = onOff;
} | 3.68 |
flink_CopyOnWriteStateMap_snapshotMapArrays | /**
* Creates (combined) copy of the table arrays for a snapshot. This method must be called by the
* same Thread that does modifications to the {@link CopyOnWriteStateMap}.
*/
@VisibleForTesting
@SuppressWarnings("unchecked")
StateMapEntry<K, N, S>[] snapshotMapArrays() {
// we guard against concurrent modific... | 3.68 |
framework_ClickEventHandler_fireClick | /**
* Sends the click event based on the given native event. Delegates actual
* sending to {@link #fireClick(MouseEventDetails)}.
*
* @param event
* The native event that caused this click event
*/
@Override
protected void fireClick(NativeEvent event) {
MouseEventDetails mouseDetails = MouseEventDe... | 3.68 |
dubbo_AdaptiveClassCodeGenerator_generateMethodArguments | /**
* generate method arguments
*/
private String generateMethodArguments(Method method) {
Class<?>[] pts = method.getParameterTypes();
return IntStream.range(0, pts.length)
.mapToObj(i -> String.format(CODE_METHOD_ARGUMENT, pts[i].getCanonicalName(), i))
.collect(Collectors.joining(",... | 3.68 |
morf_XmlDataSetConsumer_createContentHandler | /**
* @param outputStream The output
* @return A content handler
* @throws IOException When there's an XML error
*/
private ContentHandler createContentHandler(OutputStream outputStream) throws IOException {
Properties outputProperties = OutputPropertiesFactory.getDefaultMethodProperties(Method.XML);
outputProp... | 3.68 |
framework_Navigator_beforeViewChange | /**
* Check whether view change is allowed by view change listeners (
* {@link ViewChangeListener#beforeViewChange(ViewChangeEvent)}).
*
* This method can be overridden to extend the behavior, and should not be
* called directly except by {@link #navigateTo(View, String, String)}.
*
* @since 7.6
* @param event
... | 3.68 |
dubbo_ClassHelper_isGetter | /**
* @see org.apache.dubbo.common.utils.MethodUtils#isGetter(Method) (Method)
* @deprecated Replace to <code>MethodUtils#isGetter(Method)</code>
*/
public static boolean isGetter(Method method) {
return MethodUtils.isGetter(method);
} | 3.68 |
querydsl_JPAListAccessVisitor_shorten | /**
* Shorten the parent path to a length of max 2 elements
*/
private Path<?> shorten(Path<?> path, boolean outer) {
if (aliases.containsKey(path)) {
return aliases.get(path);
} else if (path.getMetadata().isRoot()) {
return path;
} else if (path.getMetadata().getParent().getMetadata().is... | 3.68 |
hbase_MetaRegionLocationCache_getMetaRegionLocations | /** Returns Optional list of HRegionLocations for meta replica(s), null if the cache is empty. */
public List<HRegionLocation> getMetaRegionLocations() {
ConcurrentNavigableMap<Integer, HRegionLocation> snapshot =
cachedMetaLocations.tailMap(cachedMetaLocations.firstKey());
if (snapshot.isEmpty()) {
// This... | 3.68 |
hbase_TableSplit_getLocations | /**
* Returns the region's location as an array.
* @return The array containing the region location.
* @see org.apache.hadoop.mapreduce.InputSplit#getLocations()
*/
@Override
public String[] getLocations() {
return new String[] { regionLocation };
} | 3.68 |
hadoop_TimelineEntityReaderFactory_createMultipleEntitiesReader | /**
* Creates a timeline entity reader instance for reading set of entities with
* the specified input and predicates.
*
* @param context Reader context which defines the scope in which query has to
* be made.
* @param filters Filters which limit the entities returned.
* @param dataToRetrieve Data to retriev... | 3.68 |
hbase_HFileSystem_useHBaseChecksum | /**
* Are we verifying checksums in HBase?
* @return True, if hbase is configured to verify checksums, otherwise false.
*/
public boolean useHBaseChecksum() {
return useHBaseChecksum;
} | 3.68 |
flink_WindowAssigner_getDefaultTrigger | /**
* Returns the default trigger associated with this {@code WindowAssigner}.
*
* <p>1. If you override {@code getDefaultTrigger()}, the {@code getDefaultTrigger()} will be
* invoked and the {@code getDefaultTrigger(StreamExecutionEnvironment env)} won't be invoked.
* 2. If you don't override {@code getDefaultTri... | 3.68 |
AreaShop_RegionGroup_saveRequired | /**
* Indicates this file needs to be saved, will actually get saved later by a task.
*/
public void saveRequired() {
plugin.getFileManager().saveGroupsIsRequired();
} | 3.68 |
flink_DynamicSourceUtils_pushWatermarkAssigner | /** Creates a specialized node for assigning watermarks. */
private static void pushWatermarkAssigner(FlinkRelBuilder relBuilder, ResolvedSchema schema) {
final ExpressionConverter converter = new ExpressionConverter(relBuilder);
final RelDataType inputRelDataType = relBuilder.peek().getRowType();
// schem... | 3.68 |
flink_Channel_getSerializer | /**
* Gets the serializer from this Channel.
*
* @return The serializer.
*/
public TypeSerializerFactory<?> getSerializer() {
return serializer;
} | 3.68 |
hbase_RefCountingMap_remove | /**
* Decrements the ref count of k, and removes from map if ref count == 0.
* @param k the key to remove
* @return the value associated with the specified key or null if key is removed from map.
*/
V remove(K k) {
Payload<V> p = map.computeIfPresent(k, (k1, v) -> --v.refCount <= 0 ? null : v);
return p == null... | 3.68 |
querydsl_Alias_$ | /**
* Convert the given alias to an expression
*
* @param arg alias
* @param <D>
* @return expression
*/
@SuppressWarnings("unchecked")
@Nullable
public static <D> EntityPathBase<D> $(D arg) {
final Object current = aliasFactory.getCurrentAndReset();
if (arg instanceof EntityPath<?>) {
return (Ent... | 3.68 |
hbase_CellUtil_copyFamilyTo | /**
* Copies the family to the given bytebuffer
* @param cell the cell whose family has to be copied
* @param destination the destination bytebuffer to which the family has to be copied
* @param destinationOffset the offset in the destination bytebuffer
* @return the offset of the bytebuffer aft... | 3.68 |
flink_BigIntComparator_putNormalizedKey | /**
* Adds a normalized key containing the normalized number of bits and MSBs of the given record.
* 1 bit determines the sign (negative, zero/positive), 31 bit the bit length of the record.
* Remaining bytes contain the most significant bits of the record.
*/
@Override
public void putNormalizedKey(BigInteger recor... | 3.68 |
hbase_MonitoredRPCHandlerImpl_getRPC | /**
* Produces a string representation of the method currently being serviced by this Handler.
* @param withParams toggle inclusion of parameters in the RPC String
* @return A human-readable string representation of the method call.
*/
@Override
public synchronized String getRPC(boolean withParams) {
if (getState... | 3.68 |
hbase_IndividualBytesFieldCell_getFamilyArray | // 2) Family
@Override
public byte[] getFamilyArray() {
// Family could be null
return (family == null) ? HConstants.EMPTY_BYTE_ARRAY : family;
} | 3.68 |
morf_AbstractSqlDialectTest_testCastFunctionToBigInt | /**
* Tests the output of a cast of a function to a big int.
*/
@Test
public void testCastFunctionToBigInt() {
String result = testDialect.getSqlFrom(new Cast(min(field("value")), DataType.BIG_INTEGER, 10));
assertEquals(expectedBigIntFunctionCast(), result);
} | 3.68 |
morf_DataSetProducerBuilderImpl_table | /**
* @see org.alfasoftware.morf.metadata.DataSetUtils.DataSetProducerBuilder#table(java.lang.String, java.util.List)
*/
@Override
public DataSetProducerBuilder table(String tableName, Record... records) {
table(tableName, Arrays.asList(records));
return this;
} | 3.68 |
flink_JobVertex_getSlotSharingGroup | /**
* Gets the slot sharing group that this vertex is associated with. Different vertices in the
* same slot sharing group can run one subtask each in the same slot.
*
* @return The slot sharing group to associate the vertex with
*/
public SlotSharingGroup getSlotSharingGroup() {
if (slotSharingGroup == null) ... | 3.68 |
hbase_WALPrettyPrinter_setOutputOnlyRowKey | /**
* Option to print the row key only in case you just need the row keys from the WAL
*/
public void setOutputOnlyRowKey() {
this.outputOnlyRowKey = true;
} | 3.68 |
rocketmq-connect_ConnectorPluginsResource_reloadPlugins | /**
* reload plugins
*
* @param context
*/
public void reloadPlugins(Context context) {
try {
connectController.reloadPlugins();
context.json(new HttpResponse<>(context.status(), "Plugin reload succeeded"));
} catch (Exception ex) {
log.error("Reload plugin failed .", ex);
co... | 3.68 |
rocketmq-connect_RocketMqAdminUtil_offsets | /**
* Get topic offsets
*
* @param config
* @param topic
* @return
*/
public static Map<MessageQueue, TopicOffset> offsets(RocketMqConfig config, String topic) {
// Get db schema topic min and max offset
DefaultMQAdminExt adminClient = null;
try {
adminClient = RocketMqAdminUtil.startMQAdminTo... | 3.68 |
flink_TypeSerializerSnapshot_writeVersionedSnapshot | /**
* Writes the given snapshot to the out stream. One should always use this method to write
* snapshots out, rather than directly calling {@link #writeSnapshot(DataOutputView)}.
*
* <p>The snapshot written with this method can be read via {@link
* #readVersionedSnapshot(DataInputView, ClassLoader)}.
*/
static v... | 3.68 |
framework_VFlash_setSlotHeightAndWidth | /**
* Set dimensions of the containing layout slot so that the size of the
* embed object can be calculated from percentages if needed.
*
* Triggers embed resizing if percentage sizes are in use.
*
* @since 7.7.8
* @param slotOffsetHeight
* offset height of the layout slot
* @param slotOffsetWidth
... | 3.68 |
flink_TextElement_code | /**
* Creates a block of text formatted as code.
*
* @param text a block of text that will be formatted as code
* @return block of text formatted as code
*/
public static TextElement code(String text) {
TextElement element = text(text);
element.textStyles.add(TextStyle.CODE);
return element;
} | 3.68 |
hudi_HiveSchemaUtil_convertField | /**
* Convert one field data type of parquet schema into an equivalent Hive schema.
*
* @param parquetType : Single parquet field
* @return : Equivalent sHive schema
*/
private static String convertField(final Type parquetType, boolean supportTimestamp, boolean doFormat) {
StringBuilder field = new StringBuilder... | 3.68 |
pulsar_PulsarAdmin_builder | /**
* Get a new builder instance that can used to configure and build a {@link PulsarAdmin} instance.
*
* @return the {@link PulsarAdminBuilder}
*
*/
static PulsarAdminBuilder builder() {
return DefaultImplementation.newAdminClientBuilder();
} | 3.68 |
flink_KeyedStateFactory_createOrUpdateInternalState | /**
* Creates or updates internal state and returns a new {@link InternalKvState}.
*
* @param namespaceSerializer TypeSerializer for the state namespace.
* @param stateDesc The {@code StateDescriptor} that contains the name of the state.
* @param snapshotTransformFactory factory of state snapshot transformer.
* @... | 3.68 |
morf_SqlServerDialect_getColumnDefaultConstraintName | /**
* Get the name of the DEFAULT constraint for a column.
*
* @param table The table on which the column exists.
* @param column The column to get the name for.
* @return The name of the DEFAULT constraint for the column on the table.
*/
private String getColumnDefaultConstraintName(final Table table, final Colu... | 3.68 |
framework_GridSingleSelect_isDeselectAllowed | /**
* Gets whether it's allowed to deselect the selected row through the UI.
*
* @return <code>true</code> if deselection is allowed; otherwise
* <code>false</code>
*/
public boolean isDeselectAllowed() {
return model.isDeselectAllowed();
} | 3.68 |
flink_BinaryStringData_numBytesForFirstByte | /**
* Returns the number of bytes for a code point with the first byte as `b`.
*
* @param b The first byte of a code point
*/
static int numBytesForFirstByte(final byte b) {
if (b >= 0) {
// 1 byte, 7 bits: 0xxxxxxx
return 1;
} else if ((b >> 5) == -2 && (b & 0x1e) != 0) {
// 2 bytes... | 3.68 |
hbase_MasterQuotaManager_setQuota | /*
* ========================================================================== Admin operations to
* manage the quota table
*/
public SetQuotaResponse setQuota(final SetQuotaRequest req)
throws IOException, InterruptedException {
checkQuotaSupport();
if (req.hasUserName()) {
userLocks.lock(req.getUserNam... | 3.68 |
hadoop_AbstractRMAdminRequestInterceptor_getNextInterceptor | /**
* Gets the next {@link RMAdminRequestInterceptor} in the chain.
*/
@Override
public RMAdminRequestInterceptor getNextInterceptor() {
return this.nextInterceptor;
} | 3.68 |
hibernate-validator_ValidatorFactoryConfigurationHelper_determinePropertyConfiguredConstraintMappingContributors | /**
* Returns a list with {@link ConstraintMappingContributor}s configured via the
* {@link HibernateValidatorConfiguration#CONSTRAINT_MAPPING_CONTRIBUTORS} property.
*
* Also takes into account the deprecated {@link HibernateValidatorConfiguration#CONSTRAINT_MAPPING_CONTRIBUTOR}
* property.
*
* @param propertie... | 3.68 |
hbase_KeyValue_getValueArray | /**
* Returns the backing array of the entire KeyValue (all KeyValue fields are in a single array)
*/
@Override
public byte[] getValueArray() {
return bytes;
} | 3.68 |
flink_FieldParser_resetParserState | /**
* Reset the state of the parser. Called as the very first method inside {@link
* FieldParser#resetErrorStateAndParse(byte[], int, int, byte[], Object)}, by default it just
* reset its error state.
*/
protected void resetParserState() {
this.errorState = ParseErrorState.NONE;
} | 3.68 |
hudi_HoodieMetaSyncOperations_updateTableProperties | /**
* Update the table properties in metastore.
*
* @return true if properties updated.
*/
default boolean updateTableProperties(String tableName, Map<String, String> tableProperties) {
return false;
} | 3.68 |
druid_Lexer_putChar | /**
* Append a character to sbuf.
*/
protected final void putChar(char ch) {
if (bufPos == buf.length) {
char[] newsbuf = new char[buf.length * 2];
System.arraycopy(buf, 0, newsbuf, 0, buf.length);
buf = newsbuf;
}
buf[bufPos++] = ch;
} | 3.68 |
flink_MapValue_get | /*
* (non-Javadoc)
* @see java.util.Map#get(java.lang.Object)
*/
@Override
public V get(final Object key) {
return this.map.get(key);
} | 3.68 |
dubbo_ReferenceCountedResource_release | /**
* Decreases the reference count by 1 and calls {@link this#destroy} if the reference count reaches 0.
*/
public final boolean release() {
long remainingCount = COUNTER_UPDATER.decrementAndGet(this);
if (remainingCount == 0) {
destroy();
return true;
} else if (remainingCount <= -1) {
... | 3.68 |
hbase_RegionServerFlushTableProcedureManager_start | /**
* Start accepting flush table requests.
*/
@Override
public void start() {
LOG.debug("Start region server flush procedure manager " + rss.getServerName().toString());
this.memberRpcs.start(rss.getServerName().toString(), member);
} | 3.68 |
hbase_QuotaObserverChore_getTimeUnit | /**
* Extracts the time unit for the chore period and initial delay from the configuration. The
* configuration value for {@link #QUOTA_OBSERVER_CHORE_TIMEUNIT_KEY} must correspond to a
* {@link TimeUnit} value.
* @param conf The configuration object.
* @return The configured time unit for the chore period and ini... | 3.68 |
flink_SkipListUtils_putValueVersion | /**
* Puts the version of value to value space.
*
* @param memorySegment memory segment for value space.
* @param offset offset of value space in memory segment.
* @param version version of value.
*/
public static void putValueVersion(MemorySegment memorySegment, int offset, int version) {
memorySegment.putIn... | 3.68 |
hbase_RegionMover_readServersFromFile | /**
* @param filename The file should have 'host:port' per line
* @return List of servers from the file in format 'hostname:port'.
*/
private List<String> readServersFromFile(String filename) throws IOException {
List<String> servers = new ArrayList<>();
if (filename != null) {
try {
Files.readAllLines... | 3.68 |
hadoop_MappableBlockLoader_fillBuffer | /**
* Reads bytes into a buffer until EOF or the buffer's limit is reached.
*/
protected int fillBuffer(FileChannel channel, ByteBuffer buf)
throws IOException {
int bytesRead = channel.read(buf);
if (bytesRead < 0) {
//EOF
return bytesRead;
}
while (buf.remaining() > 0) {
int n = channel.read... | 3.68 |
morf_RemoveTable_getTable | /**
* @return the {@link Table} to be removed.
*/
public Table getTable() {
return tableToBeRemoved;
} | 3.68 |
flink_AvroParquetWriters_forSpecificRecord | /**
* Creates a ParquetWriterFactory for an Avro specific type. The Parquet writers will use the
* schema of that specific type to build and write the columnar data.
*
* @param type The class of the type to write.
*/
public static <T extends SpecificRecordBase> ParquetWriterFactory<T> forSpecificRecord(
Cl... | 3.68 |
framework_MultiSelectionRenderer_reboundScrollArea | /**
* If the scroll are has been offset by the pointer starting out there,
* move it back a bit
*/
private void reboundScrollArea(double timeDiff) {
if (!scrollAreaShouldRebound) {
return;
}
int reboundPx = (int) Math
.ceil(SCROLL_AREA_REBOUND_PX_PER_MS * timeDiff);
if (topBound ... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.