name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
framework_VTooltip_getFinalTouchY | /**
* Return the final Y-coordinate of the tooltip based on cursor
* position, size of the tooltip, size of the page and necessary
* margins.
*
* @param offsetHeight
* @return The final y-coordinate
*
*/
private int getFinalTouchY(int offsetHeight) {
int y = 0;
int heightNeeded = 10 + offsetHeight;
... | 3.68 |
hadoop_InnerJoinRecordReader_combine | /**
* Return true iff the tuple is full (all data sources contain this key).
*/
protected boolean combine(Object[] srcs, TupleWritable dst) {
assert srcs.length == dst.size();
for (int i = 0; i < srcs.length; ++i) {
if (!dst.has(i)) {
return false;
}
}
return true;
} | 3.68 |
flink_FloatHashSet_contains | /** See {@link Float#equals(Object)}. */
public boolean contains(final float k) {
int intKey = Float.floatToIntBits(k);
if (intKey == 0) {
return this.containsZero;
} else {
float[] key = this.key;
int curr;
int pos;
if ((curr = Float.floatToIntBits(key[pos = MurmurHa... | 3.68 |
zxing_BitMatrix_flip | /**
* <p>Flips every bit in the matrix.</p>
*/
public void flip() {
int max = bits.length;
for (int i = 0; i < max; i++) {
bits[i] = ~bits[i];
}
} | 3.68 |
flink_Configuration_getLong | /**
* Returns the value associated with the given config option as a long integer. If no value is
* mapped under any key of the option, it returns the specified default instead of the option's
* default value.
*
* @param configOption The configuration option
* @param overrideDefault The value to return if no valu... | 3.68 |
framework_MenuBar_addItem | /**
* Adds a menu item to the bar, that will open the specified menu when it is
* selected.
*
* @param text
* the item's text
* @param popup
* the menu to be cascaded from it
* @return the {@link MenuItem} object created
*/
public MenuItem addItem(String text, MenuBar popup) {
final M... | 3.68 |
hadoop_MapTaskImpl_getSplitsAsString | /**
* @return a String formatted as a comma-separated list of splits.
*/
@Override
protected String getSplitsAsString() {
String[] splits = getTaskSplitMetaInfo().getLocations();
if (splits == null || splits.length == 0)
return "";
StringBuilder sb = new StringBuilder();
for (int i = 0; i < splits.length; i... | 3.68 |
flink_BufferConsumer_copy | /**
* Returns a retained copy with separate indexes. This allows to read from the same {@link
* MemorySegment} twice.
*
* <p>WARNING: the newly returned {@link BufferConsumer} will have its reader index copied from
* the original buffer. In other words, data already consumed before copying will not be visible
* t... | 3.68 |
hbase_TableDescriptorBuilder_setNormalizationEnabled | /**
* Setting the table normalization enable flag.
* @param isEnable True if enable normalization.
* @return the modifyable TD
*/
public ModifyableTableDescriptor setNormalizationEnabled(final boolean isEnable) {
return setValue(NORMALIZATION_ENABLED_KEY, Boolean.toString(isEnable));
} | 3.68 |
hudi_HoodieMergedLogRecordScanner_scan | /**
* Scans delta-log files processing blocks
*/
public final void scan() {
scan(false);
} | 3.68 |
flink_SessionManager_create | /** Create the {@link SessionManager} with the default configuration. */
static SessionManager create(DefaultContext defaultContext) {
return new SessionManagerImpl(defaultContext);
} | 3.68 |
hbase_ServerCommandLine_logJVMInfo | /**
* Log information about the currently running JVM.
*/
public static void logJVMInfo() {
// Print out vm stats before starting up.
RuntimeMXBean runtime = ManagementFactory.getRuntimeMXBean();
if (runtime != null) {
LOG.info("vmName=" + runtime.getVmName() + ", vmVendor=" + runtime.getVmVendor()
+ ... | 3.68 |
flink_Task_failExternally | /**
* Marks task execution failed for an external reason (a reason other than the task code itself
* throwing an exception). If the task is already in a terminal state (such as FINISHED,
* CANCELED, FAILED), or if the task is already canceling this does nothing. Otherwise it sets
* the state to FAILED, and, if the ... | 3.68 |
hbase_MasterObserver_postDeleteTable | /**
* Called after the deleteTable operation has been requested. Called as part of delete table RPC
* call.
* @param ctx the environment to interact with the framework and master
* @param tableName the name of the table
*/
default void postDeleteTable(final ObserverContext<MasterCoprocessorEnvironment> ctx,
... | 3.68 |
hbase_ReflectionUtils_getOneArgStaticMethodAsFunction | /**
* Creates a Function which can be called to performantly execute a reflected static method. The
* creation of the Function itself may not be fast, but executing that method thereafter should be
* much faster than {@link #invokeMethod(Object, String, Object...)}.
* @param lookupClazz the class to find the s... | 3.68 |
framework_Overlay_setAnimationFromCenterProgress | /**
* Offset the set values from center by given progress to create the
* state of a single animation frame. Each frame needs to be initialized
* from the beginning, since calling this method for a second time
* without resetting the size and position values would lead to
* incorrect end results.
*
* @param prog... | 3.68 |
hbase_RpcHandler_getCallRunner | /** Returns A {@link CallRunner} n */
protected CallRunner getCallRunner() throws InterruptedException {
return this.q.take();
} | 3.68 |
hbase_TableName_isMetaTableName | /** Returns True if <code>tn</code> is the hbase:meta table name. */
public static boolean isMetaTableName(final TableName tn) {
return tn.equals(TableName.META_TABLE_NAME);
} | 3.68 |
framework_DataProvider_withConvertedFilter | /**
* Wraps this data provider to create a data provider that uses a different
* filter type. This can be used for adapting this data provider to a filter
* type provided by a Component such as ComboBox.
* <p>
* For example receiving a String from ComboBox and making a Predicate based
* on it:
*
* <pre>
* Data... | 3.68 |
hadoop_ManifestCommitter_commitJob | /**
* This is the big job commit stage.
* Load the manifests, prepare the destination, rename
* the files then cleanup the job directory.
* @param jobContext Context of the job whose output is being written.
* @throws IOException failure.
*/
@Override
public void commitJob(final JobContext jobContext) throws IOEx... | 3.68 |
hudi_MarkerUtils_stripMarkerFolderPrefix | /**
* Strips the marker folder prefix of any file path under the marker directory.
*
* @param fullMarkerPath the full path of the file
* @param markerDir marker directory
* @return file name
*/
public static String stripMarkerFolderPrefix(String fullMarkerPath, String markerDir) {
int begin = fullMarkerPat... | 3.68 |
hadoop_CachingGetSpaceUsed_running | /**
* Is the background thread running.
*/
boolean running() {
return running.get();
} | 3.68 |
hbase_HFileArchiveTableMonitor_setArchiveTables | /**
* Set the tables to be archived. Internally adds each table and attempts to register it.
* <p>
* <b>Note: All previous tables will be removed in favor of these tables.</b>
* @param tables add each of the tables to be archived.
*/
public synchronized void setArchiveTables(List<String> tables) {
archivedTables... | 3.68 |
hudi_HoodieRecordGlobalLocation_toLocal | /**
* Returns the record location as local.
*/
public HoodieRecordLocation toLocal(String instantTime) {
return new HoodieRecordLocation(instantTime, fileId, position);
} | 3.68 |
framework_AbsoluteLayout_setLeft | /**
* Sets the 'left' attribute; distance from the left of the component to
* the left edge of the layout.
*
* @param leftValue
* The value of the 'left' attribute
* @param leftUnits
* The unit of the 'left' attribute. See UNIT_SYMBOLS for a
* description of the available units.... | 3.68 |
hudi_UtilHelpers_createHoodieClient | /**
* Build Hoodie write client.
*
* @param jsc Java Spark Context
* @param basePath Base Path
* @param schemaStr Schema
* @param parallelism Parallelism
*/
public static SparkRDDWriteClient<HoodieRecordPayload> createHoodieClient(JavaSparkContext jsc, String basePath, String schemaStr,
int parallelism, Opti... | 3.68 |
rocketmq-connect_WorkerConnector_awaitShutdown | /**
* Wait for this connector to finish shutting down.
*
* @param timeoutMs time in milliseconds to await shutdown
* @return true if successful, false if the timeout was reached
*/
public boolean awaitShutdown(long timeoutMs) {
try {
return shutdownLatch.await(timeoutMs, TimeUnit.MILLISECONDS);
} c... | 3.68 |
framework_FlyweightRow_assertSetup | /**
* Asserts that the flyweight row has properly been set up before trying to
* access any of its data.
*/
private void assertSetup() {
assert element != null && row != BLANK
&& columnWidths != null : "Flyweight row was not "
+ "properly initialized. Make sure the setup-method is... | 3.68 |
hbase_HFilePrettyPrinter_processFile | // HBASE-22561 introduces boolean checkRootDir for WebUI specificly
public int processFile(Path file, boolean checkRootDir) throws IOException {
if (verbose) {
out.println("Scanning -> " + file);
}
if (checkRootDir) {
Path rootPath = CommonFSUtils.getRootDir(getConf());
String rootString = rootPath +... | 3.68 |
hadoop_GenericRefreshProtocolServerSideTranslatorPB_pack | // Convert a collection of RefreshResponse objects to a
// RefreshResponseCollection proto
private GenericRefreshResponseCollectionProto pack(
Collection<RefreshResponse> responses) {
GenericRefreshResponseCollectionProto.Builder b =
GenericRefreshResponseCollectionProto.newBuilder();
for (RefreshResponse re... | 3.68 |
AreaShop_RentRegion_setRentedUntil | /**
* Set the time until the region is rented (milliseconds from 1970, system time).
* @param rentedUntil The time until the region is rented
*/
public void setRentedUntil(Long rentedUntil) {
if(rentedUntil == null) {
setSetting("rent.rentedUntil", null);
} else {
setSetting("rent.rentedUntil", rentedUntil);
... | 3.68 |
dubbo_InstanceAddressURL_getServiceMethodParameter | /**
* method parameter only exists in ServiceInfo
*
* @param method
* @param key
* @return
*/
@Override
public String getServiceMethodParameter(String protocolServiceKey, String method, String key) {
if (consumerParamFirst(key)) {
URL consumerUrl = RpcContext.getServiceContext().getConsumerUrl();
... | 3.68 |
morf_SelectStatement_withDialectSpecificHint | /**
* Supplies a specified custom hint to the database for a query.
*
* @param databaseType a database type identifier. Eg: ORACLE, PGSQL, SQL_SERVER
* @param hintContents the hint contents themselves, without the delimiters. Eg: without /*+ and *"/ * for Oracle hints
* @return this, for method chaining.
*/
publi... | 3.68 |
hudi_HoodieMetaSyncOperations_databaseExists | /**
* Check if a database already exists in the metastore.
*/
default boolean databaseExists(String databaseName) {
return false;
} | 3.68 |
hbase_DynamicMetricsRegistry_newStat | /**
* Create a mutable metric with stats
* @param name of the metric
* @param desc metric description
* @param sampleName of the metric (e.g., "Ops")
* @param valueName of the metric (e.g., "Time" or "Latency")
* @return a new mutable metric object
*/
public MutableStat newStat(String name, String d... | 3.68 |
framework_BootstrapHandler_getPushMode | /**
* Gets the push mode to use.
*
* @return the desired push mode
*/
public PushMode getPushMode() {
if (pushMode == null) {
UICreateEvent event = new UICreateEvent(getRequest(),
getUIClass());
pushMode = getBootstrapResponse().getUIProvider()
.getPushMode(event... | 3.68 |
framework_CalendarDateRange_inRange | /**
* Is a date in the date range.
*
* @param date
* The date to check
* @return true if the date range contains a date start and end of range
* inclusive; false otherwise
*/
public boolean inRange(Date date) {
if (date == null) {
return false;
}
return date.compareTo(star... | 3.68 |
pulsar_ConsumerConfiguration_getSubscriptionType | /**
* @return the configured subscription type
*/
public SubscriptionType getSubscriptionType() {
return conf.getSubscriptionType();
} | 3.68 |
morf_ChangelogBuilder_produceChangelog | /**
* Produces the Changelog based on the given input settings.
*/
public void produceChangelog() {
HumanReadableStatementProducer producer = new HumanReadableStatementProducer(upgradeSteps, includeDataChanges, preferredSQLDialect);
producer.produceFor(new ChangelogStatementConsumer(outputStream));
} | 3.68 |
framework_VAbstractCalendarPanel_onSubmit | /**
* Notifies submit-listeners of a submit event
*/
private void onSubmit() {
if (getSubmitListener() != null) {
getSubmitListener().onSubmit();
}
} | 3.68 |
hbase_ScannerModel_getCacheBlocks | /** Returns true if HFile blocks should be cached on the servers for this scan, false otherwise */
@XmlAttribute
public boolean getCacheBlocks() {
return cacheBlocks;
} | 3.68 |
hadoop_CoderUtil_getEmptyChunk | /**
* Make sure to return an empty chunk buffer for the desired length.
* @param leastLength
* @return empty chunk of zero bytes
*/
static byte[] getEmptyChunk(int leastLength) {
if (emptyChunk.length >= leastLength) {
return emptyChunk; // In most time
}
synchronized (CoderUtil.class) {
emptyChunk =... | 3.68 |
framework_Button_removeClickListener | /**
* Removes the button click listener.
*
* @param listener
* the Listener to be removed.
*
* @deprecated As of 8.0, replaced by {@link Registration#remove()} in the
* registration object returned from
* {@link #addClickListener(ClickListener)}.
*/
@Deprecated
public void re... | 3.68 |
flink_SqlClientParserState_isEndMarkerOfState | /**
* Returns whether at current {@code pos} of {@code input} there is {@code end} marker of the
* state. In case {@code end} marker is null it returns false.
*
* @param input a string to look at
* @param pos a position to check if anything matches to {@code end} starting from this position
* @return whether end ... | 3.68 |
framework_SQLContainer_removeReference | /**
* Removes the reference pointing to the given SQLContainer.
*
* @param refdCont
* Target SQLContainer of the reference
* @return true if successful, false if the reference did not exist
*/
public boolean removeReference(SQLContainer refdCont) {
if (refdCont == null) {
throw new IllegalA... | 3.68 |
hadoop_EntityTableRW_setMetricsTTL | /**
* @param metricsTTL time to live parameter for the metricss in this table.
* @param hbaseConf configururation in which to set the metrics TTL config
* variable.
*/
public void setMetricsTTL(int metricsTTL, Configuration hbaseConf) {
hbaseConf.setInt(METRICS_TTL_CONF_NAME, metricsTTL);
} | 3.68 |
framework_ContainerHierarchicalWrapper_getContainerProperty | /*
* Gets the Property identified by the given itemId and propertyId from the
* Container Don't add a JavaDoc comment here, we use the default
* documentation from implemented interface.
*/
@Override
public Property getContainerProperty(Object itemId, Object propertyId) {
return container.getContainerProperty(i... | 3.68 |
querydsl_MathExpressions_sin | /**
* Create a {@code sin(num)} expression
*
* <p>Returns the sine of an angle of num radians.</p>
*
* @param num numeric expression
* @return sin(num)
*/
public static <A extends Number & Comparable<?>> NumberExpression<Double> sin(Expression<A> num) {
return Expressions.numberOperation(Double.class, Ops.Ma... | 3.68 |
hbase_KeyValue_getFamilyArray | /**
* Returns the backing array of the entire KeyValue (all KeyValue fields are in a single array)
*/
@Override
public byte[] getFamilyArray() {
return bytes;
} | 3.68 |
hbase_BloomFilterFactory_getBloomBlockSize | /** Returns the compound Bloom filter block size from the configuration */
public static int getBloomBlockSize(Configuration conf) {
return conf.getInt(IO_STOREFILE_BLOOM_BLOCK_SIZE, 128 * 1024);
} | 3.68 |
zxing_PDF417_generateBarcodeLogic | /**
* @param msg message to encode
* @param errorCorrectionLevel PDF417 error correction level to use
* @param autoECI automatically insert ECIs if needed
* @throws WriterException if the contents cannot be encoded in this format
*/
public void generateBarcodeLogic(String msg, int errorCorrectionLevel, boolean aut... | 3.68 |
framework_AbstractMedia_getPreload | /**
* @return the configured media preload value
* @since 7.7.11
*/
public PreloadMode getPreload() {
return getState(false).preload;
} | 3.68 |
hadoop_AbstractPolicyManager_getAMRMPolicy | /**
* This default implementation validates the
* {@link FederationPolicyInitializationContext},
* then checks whether it needs to reinstantiate the class (null or
* mismatching type), and reinitialize the policy.
*
* @param federationPolicyContext the current context
* @param oldInstance the existin... | 3.68 |
druid_FileNodeListener_init | /**
* Start a Scheduler to check the specified file.
*
* @see #setIntervalSeconds(int)
* @see #update()
*/
@Override
public void init() {
super.init();
if (intervalSeconds <= 0) {
intervalSeconds = 60;
}
executor = Executors.newScheduledThreadPool(1);
executor.scheduleAtFixedRate(new Ru... | 3.68 |
hbase_ZNodePaths_isClientReadable | /**
* Returns whether the path is supposed to be readable by the client and DOES NOT contain
* sensitive information (world readable).
*/
public boolean isClientReadable(String path) {
// Developer notice: These znodes are world readable. DO NOT add more znodes here UNLESS
// all clients need to access this data... | 3.68 |
flink_CsvOutputFormat_setAllowNullValues | /**
* Configures the format to either allow null values (writing an empty field), or to throw an
* exception when encountering a null field.
*
* <p>by default, null values are disallowed.
*
* @param allowNulls Flag to indicate whether the output format should accept null values.
*/
public void setAllowNullValues... | 3.68 |
rocketmq-connect_RocketMqAdminUtil_topicExist | /**
* check topic exist
*
* @param config
* @param topic
* @return
*/
public static boolean topicExist(RocketMqConfig config, String topic) {
DefaultMQAdminExt defaultMQAdminExt = null;
boolean foundTopicRouteInfo = false;
try {
defaultMQAdminExt = startMQAdminTool(config);
TopicRouteD... | 3.68 |
flink_HiveParserJoinCondTypeCheckProcFactory_getDefaultExprProcessor | /** Factory method to get DefaultExprProcessor. */
@Override
public HiveParserTypeCheckProcFactory.DefaultExprProcessor getDefaultExprProcessor() {
return new HiveParserJoinCondTypeCheckProcFactory.JoinCondDefaultExprProcessor();
} | 3.68 |
framework_AbstractInMemoryContainer_internalRemoveAllItems | /**
* Removes all items from the internal data structures of this class. This
* can be used to implement {@link #removeAllItems()} in subclasses.
*
* No notification is sent, the caller has to fire a suitable item set
* change notification.
*/
protected void internalRemoveAllItems() {
// Removes all Items
... | 3.68 |
pulsar_LoadSimulationController_changeIfExists | // Find a topic and change it if it exists.
private int changeIfExists(final ShellArguments arguments, final String topic) throws Exception {
final int client = find(topic);
if (client != -1) {
change(arguments, topic, client);
}
return client;
} | 3.68 |
hbase_AbstractFSWALProvider_getWALFiles | /**
* List all the wal files for a logPrefix.
*/
public static List<Path> getWALFiles(Configuration c, ServerName serverName) throws IOException {
Path walRoot = new Path(CommonFSUtils.getWALRootDir(c), HConstants.HREGION_LOGDIR_NAME);
FileSystem fs = walRoot.getFileSystem(c);
List<Path> walFiles = new ArrayLis... | 3.68 |
hbase_TableBackupClient_deleteSnapshots | /**
* Delete HBase snapshot for backup.
* @param backupInfo backup info
* @throws IOException exception
*/
protected static void deleteSnapshots(final Connection conn, BackupInfo backupInfo,
Configuration conf) throws IOException {
LOG.debug("Trying to delete snapshot for full backup.");
for (String snapshotN... | 3.68 |
framework_HierarchicalContainer_rootItemIds | /*
* Gets the IDs of the root elements in the container. Don't add a JavaDoc
* comment here, we use the default documentation from implemented
* interface.
*/
@Override
public Collection<?> rootItemIds() {
if (filteredRoots != null) {
return Collections.unmodifiableCollection(filteredRoots);
} else ... | 3.68 |
morf_XmlDataSetConsumer_table | /**
* @see org.alfasoftware.morf.dataset.DataSetConsumer#table(org.alfasoftware.morf.metadata.Table, java.lang.Iterable)
*/
@Override
public void table(final Table table, final Iterable<Record> records) {
if (table == null) {
throw new IllegalArgumentException("table is null");
}
// Get a content handler f... | 3.68 |
morf_BaseDataSetReader_tableExists | /**
* @see org.alfasoftware.morf.xml.XmlStreamProvider.XmlInputStreamProvider#tableExists(java.lang.String)
*/
@Override
public final boolean tableExists(String name) {
return tableNameToFileNameMap.containsKey(name.toUpperCase());
} | 3.68 |
hadoop_DirectoryPolicy_getOptionName | /**
* Get the option name.
* @return name of the option
*/
public String getOptionName() {
return optionName;
} | 3.68 |
hbase_MasterObserver_postMoveTables | /**
* Called after servers are moved to target region server group
* @param ctx the environment to interact with the framework and master
* @param tables set of tables to move
* @param targetGroup name of group
*/
default void postMoveTables(final ObserverContext<MasterCoprocessorEnvironment> ctx,
S... | 3.68 |
morf_AbstractSqlDialectTest_testNow | /**
* Test that now functionality behaves as expected.
*/
@Test
public void testNow() {
String result = testDialect.getSqlFrom(now());
assertEquals(expectedNow(), result);
} | 3.68 |
graphhopper_RoadDensityCalculator_calcRoadDensities | /**
* Loops over all edges of the graph and calls the given edgeHandler for each edge. This is done in parallel using
* the given number of threads. For every call we can calculate the road density using the provided thread local
* road density calculator.
*/
public static void calcRoadDensities(Graph graph, BiCons... | 3.68 |
hadoop_FlowRunColumnPrefix_getColumnPrefix | /**
* @return the column name value
*/
public String getColumnPrefix() {
return columnPrefix;
} | 3.68 |
morf_AbstractSqlDialectTest_testSelectAnd | /**
* Tests a select with a nested "and where" clause.
*/
@Test
public void testSelectAnd() {
SelectStatement stmt = new SelectStatement().from(new TableReference(TEST_TABLE))
.where(and(
eq(new FieldReference(STRING_FIELD), "A0001"),
greaterThan(new FieldReference(INT_FIELD), 20080101)
... | 3.68 |
shardingsphere-elasticjob_JobConfiguration_failover | /**
* Set enable failover.
*
* <p>
* Only for `monitorExecution` enabled.
* </p>
*
* @param failover enable or disable failover
* @return job configuration builder
*/
public Builder failover(final boolean failover) {
this.failover = failover;
return this;
} | 3.68 |
framework_ApplicationConnection_getVersionInfo | /**
* Helper for tt initialization
*/
private JavaScriptObject getVersionInfo() {
return configuration.getVersionInfoJSObject();
} | 3.68 |
flink_RpcServiceUtils_createWildcardName | /**
* Creates a wildcard name symmetric to {@link #createRandomName(String)}.
*
* @param prefix prefix of the wildcard name
* @return wildcard name starting with the prefix
*/
public static String createWildcardName(String prefix) {
return prefix + "_*";
} | 3.68 |
flink_HiveParserTypeCheckProcFactory_getColumnExprProcessor | /** Factory method to get ColumnExprProcessor. */
public HiveParserTypeCheckProcFactory.ColumnExprProcessor getColumnExprProcessor() {
return new HiveParserTypeCheckProcFactory.ColumnExprProcessor();
} | 3.68 |
pulsar_ManagedLedgerImpl_checkFenced | /**
* Throws an exception if the managed ledger has been previously fenced.
*
* @throws ManagedLedgerException
*/
private void checkFenced() throws ManagedLedgerException {
if (STATE_UPDATER.get(this).isFenced()) {
log.error("[{}] Attempted to use a fenced managed ledger", name);
throw new Manag... | 3.68 |
flink_NetworkBufferPool_requestUnpooledMemorySegments | /**
* Unpooled memory segments are requested directly from {@link NetworkBufferPool}, as opposed to
* pooled segments, that are requested through {@link BufferPool} that was created from this
* {@link NetworkBufferPool} (see {@link #createBufferPool}). They are used for example for
* exclusive {@link RemoteInputCha... | 3.68 |
morf_FieldReference_setDirection | /**
* Sets the direction to sort the field on.
*
* @param direction the direction to set
* @deprecated Use {@link #direction(Direction)}
*/
@Deprecated
public void setDirection(Direction direction) {
AliasedField.assetImmutableDslDisabled();
this.direction = direction;
} | 3.68 |
flink_DataSet_aggregate | /**
* Applies an Aggregate transformation on a non-grouped {@link Tuple} {@link DataSet}.
*
* <p><b>Note: Only Tuple DataSets can be aggregated.</b> The transformation applies a built-in
* {@link Aggregations Aggregation} on a specified field of a Tuple DataSet. Additional
* aggregation functions can be added to t... | 3.68 |
pulsar_ConnectionPool_getConnection | /**
* Get a connection from the pool.
* <p>
* The connection can either be created or be coming from the pool itself.
* <p>
* When specifying multiple addresses, the logicalAddress is used as a tag for the broker, while the physicalAddress
* is where the connection is actually happening.
* <p>
* These two addre... | 3.68 |
hbase_HelloHBase_deleteNamespaceAndTable | /**
* Invokes Admin#disableTable, Admin#deleteTable, and Admin#deleteNamespace to disable/delete
* Table and delete Namespace.
* @param admin Standard Admin object
* @throws IOException If IO problem is encountered
*/
static void deleteNamespaceAndTable(final Admin admin) throws IOException {
if (admin.tableExis... | 3.68 |
hadoop_ManifestCommitter_getTaskAttemptPath | /**
* Compute the path where the output of a task attempt is stored until
* that task is committed.
* @param context the context of the task attempt.
* @return the path where a task attempt should be stored.
*/
@VisibleForTesting
public Path getTaskAttemptPath(TaskAttemptContext context) {
return enterCommitter(... | 3.68 |
hbase_MetricRegistryInfo_getMetricsDescription | /**
* Get the description of what this source exposes.
*/
public String getMetricsDescription() {
return metricsDescription;
} | 3.68 |
flink_FlinkBushyJoinReorderRule_createTopProject | /**
* Creates the topmost projection that will sit on top of the selected join ordering. The
* projection needs to match the original join ordering. Also, places any post-join filters on
* top of the project.
*/
private static RelNode createTopProject(
RelBuilder relBuilder,
LoptMultiJoin multiJoin,... | 3.68 |
hudi_ArchivalUtils_getMinAndMaxInstantsToKeep | /**
* getMinAndMaxInstantsToKeep is used by archival service to find the
* min instants and max instants to keep in the active timeline
* @param table table implementation extending org.apache.hudi.table.HoodieTable
* @param metaClient meta client
* @return Pair containing min instants and max instants to keep.
... | 3.68 |
flink_BinaryRowData_isInFixedLengthPart | /**
* If it is a fixed-length field, we can call this BinaryRowData's setXX method for in-place
* updates. If it is variable-length field, can't use this method, because the underlying data
* is stored continuously.
*/
public static boolean isInFixedLengthPart(LogicalType type) {
switch (type.getTypeRoot()) {
... | 3.68 |
morf_ConnectionResources_getFetchSizeForBulkSelectsAllowingConnectionUseDuringStreaming | /**
*
* The JDBC Fetch Size to use when performing bulk select operations while allowing connection use, intended to replace the default in {@link SqlDialect#fetchSizeForBulkSelectsAllowingConnectionUseDuringStreaming()}.
* The default behaviour for this method is interpreted as "not set" rather than 0.
* @return ... | 3.68 |
hadoop_MountTableStoreImpl_checkMountTableEntryPermission | /**
* Whether a mount table entry can be accessed by the current context.
*
* @param src mount entry being accessed
* @param action type of action being performed on the mount entry
* @throws AccessControlException if mount table cannot be accessed
*/
private void checkMountTableEntryPermission(String src, FsActi... | 3.68 |
hadoop_FilterFileSystem_rename | /**
* Renames Path src to Path dst. Can take place on local fs
* or remote DFS.
*/
@Override
public boolean rename(Path src, Path dst) throws IOException {
return fs.rename(src, dst);
} | 3.68 |
rocketmq-connect_MemoryClusterManagementServiceImpl_hasClusterStoreTopic | /**
* Check if Cluster Store Topic exists.
*
* @return true if Cluster Store Topic exists, otherwise return false.
*/
@Override
public boolean hasClusterStoreTopic() {
return false;
} | 3.68 |
flink_TypeStrategies_explicit | /** Type strategy that returns a fixed {@link DataType}. */
public static TypeStrategy explicit(DataType dataType) {
return new ExplicitTypeStrategy(dataType);
} | 3.68 |
hudi_HFileBootstrapIndex_writeNextPartition | /**
* Append bootstrap index entries for next partitions in sorted order.
* @param partitionPath Hudi Partition Path
* @param bootstrapPartitionPath Source Partition Path
* @param bootstrapFileMappings Bootstrap Source File to Hudi File Id mapping
*/
private void writeNextPartition(String partitionPath, Stri... | 3.68 |
flink_Optimizer_createPreOptimizedPlan | /**
* This function performs only the first step to the compilation process - the creation of the
* optimizer representation of the plan. No estimations or enumerations of alternatives are done
* here.
*
* @param program The plan to generate the optimizer representation for.
* @return The optimizer representation... | 3.68 |
flink_SegmentsUtil_setBoolean | /**
* set boolean from segments.
*
* @param segments target segments.
* @param offset value offset.
*/
public static void setBoolean(MemorySegment[] segments, int offset, boolean value) {
if (inFirstSegment(segments, offset, 1)) {
segments[0].putBoolean(offset, value);
} else {
setBooleanMu... | 3.68 |
flink_EmbeddedRocksDBStateBackend_getPredefinedOptions | /**
* Gets the currently set predefined options for RocksDB. The default options (if nothing was
* set via {@link #setPredefinedOptions(PredefinedOptions)}) are {@link
* PredefinedOptions#DEFAULT}.
*
* <p>If user-configured options within {@link RocksDBConfigurableOptions} is set (through
* flink-conf.yaml) of a ... | 3.68 |
open-banking-gateway_FintechSecureStorage_registerFintech | /**
* Registers FinTech in Datasafe and DB.
* @param fintech new FinTech to register
* @param password FinTechs' KeyStore password.
*/
public void registerFintech(Fintech fintech, Supplier<char[]> password) {
this.userProfile()
.createDocumentKeystore(
fintech.getUserIdAuth(passw... | 3.68 |
hmily_CommonAssembler_assembleHmilyExpressionSegment | /**
* Assemble hmily expression segment.
*
* @param expression expression
* @return hmily expression segment
*/
public static HmilyExpressionSegment assembleHmilyExpressionSegment(final ExpressionSegment expression) {
HmilyExpressionSegment result = null;
if (expression instanceof BinaryOperationExpression... | 3.68 |
flink_ProjectOperator_projectTuple5 | /**
* Projects a {@link Tuple} {@link DataSet} to the previously selected fields.
*
* @return The projected DataSet.
* @see Tuple
* @see DataSet
*/
public <T0, T1, T2, T3, T4> ProjectOperator<T, Tuple5<T0, T1, T2, T3, T4>> projectTuple5() {
TypeInformation<?>[] fTypes = extractFieldTypes(fieldIndexes, ds.getT... | 3.68 |
framework_VAbstractCalendarPanel_getBackwardKey | /**
* The key that selects the previous day in the calendar. By default this is
* the left arrow key but by overriding this method it can be changed to
* whatever you like.
*
* @return the backward key
*/
protected int getBackwardKey() {
return KeyCodes.KEY_LEFT;
} | 3.68 |
flink_ProducerMergedPartitionFileWriter_flushBuffers | /** Write all buffers to the disk. */
private void flushBuffers(List<Tuple2<Buffer, Integer>> bufferAndIndexes, long expectedBytes)
throws IOException {
if (bufferAndIndexes.isEmpty()) {
return;
}
ByteBuffer[] bufferWithHeaders = generateBufferWithHeaders(bufferAndIndexes);
BufferReader... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.