name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hudi_ClientIds_getClientId | /**
* Returns the client id from the heartbeat file path, the path name follows
* the naming convention: _, _1, _2, ... _N.
*/
private static String getClientId(Path path) {
String[] splits = path.getName().split(HEARTBEAT_FILE_NAME_PREFIX);
return splits.length > 1 ? splits[1] : INIT_CLIENT_ID;
} | 3.68 |
morf_MergeStatement_shallowCopy | /**
* Performs a shallow copy to a builder, allowing a duplicate
* to be created and modified.
*
* @return A builder, initialised as a duplicate of this statement.
*/
@Override
public MergeStatementBuilder shallowCopy() {
return new MergeStatementBuilder(this);
} | 3.68 |
morf_InsertStatementBuilder_avoidDirectPath | /**
* If supported by the dialect, hints to the database that an {@code APPEND} query hint should be used in the insert statement.
*
* <p>In general, as with all query plan modification, <strong>do not use this unless you know
* exactly what you are doing</strong>.</p>
*
* <p>These directives are applied in the S... | 3.68 |
rocketmq-connect_RecordOffsetManagement_remove | /**
* remove record
*
* @return
*/
public boolean remove() {
Deque<SubmittedPosition> deque = records.get(position.getPartition());
if (deque == null) {
return false;
}
boolean result = deque.removeLastOccurrence(this);
if (deque.isEmpty()) {
records.remove(position.getPartition(... | 3.68 |
pulsar_SchemaDefinitionImpl_getJsonDef | /**
* Get json schema definition.
*
* @return schema class
*/
public String getJsonDef() {
return jsonDef;
} | 3.68 |
hadoop_ConnectionContext_hasAvailableConcurrency | /**
* Return true if this connection context still has available concurrency,
* else return false.
*/
private synchronized boolean hasAvailableConcurrency() {
return this.numThreads < maxConcurrencyPerConn;
} | 3.68 |
hbase_StorageClusterStatusModel_getWriteRequestsCount | /** Returns the current total write requests made to region */
@XmlAttribute
public long getWriteRequestsCount() {
return writeRequestsCount;
} | 3.68 |
hbase_ServerManager_findServerWithSameHostnamePortWithLock | /**
* Assumes onlineServers is locked.
* @return ServerName with matching hostname and port.
*/
public ServerName findServerWithSameHostnamePortWithLock(final ServerName serverName) {
ServerName end =
ServerName.valueOf(serverName.getHostname(), serverName.getPort(), Long.MAX_VALUE);
ServerName r = onlineSe... | 3.68 |
rocketmq-connect_WorkerConnector_getKeyValue | /**
* connector config
*
* @return
*/
public ConnectKeyValue getKeyValue() {
return keyValue;
} | 3.68 |
framework_ContainerHierarchicalWrapper_addToHierarchyWrapper | /**
* Adds the specified Item specified to the internal hierarchy structure.
* The new item is added as a root Item. The underlying container is not
* modified.
*
* @param itemId
* the ID of the item to add to the hierarchy.
*/
private void addToHierarchyWrapper(Object itemId) {
roots.add(itemId);... | 3.68 |
hbase_CleanerChore_calculatePoolSize | /**
* Calculate size for cleaner pool.
* @param poolSize size from configuration
* @return size of pool after calculation
*/
static int calculatePoolSize(String poolSize) {
if (poolSize.matches("[1-9][0-9]*")) {
// If poolSize is an integer, return it directly,
// but upmost to the number of available pro... | 3.68 |
hbase_FileArchiverNotifierImpl_getSizeOfStoreFile | /**
* Computes the size of the store file given its name, region and family name in the archive
* directory.
*/
long getSizeOfStoreFile(TableName tn, String regionName, String family, String storeFile) {
Path familyArchivePath;
try {
familyArchivePath = HFileArchiveUtil.getStoreArchivePath(conf, tn, regionNa... | 3.68 |
flink_AbstractUdfOperator_getBroadcastInputs | /**
* Returns the input, or null, if none is set.
*
* @return The broadcast input root operator.
*/
public Map<String, Operator<?>> getBroadcastInputs() {
return this.broadcastInputs;
} | 3.68 |
hadoop_ApplicationEntity_getApplicationEvent | /**
* @param te TimelineEntity object.
* @param eventId event with this id needs to be fetched
* @return TimelineEvent if TimelineEntity contains the desired event.
*/
public static TimelineEvent getApplicationEvent(TimelineEntity te,
String eventId) {
if (isApplicationEntity(te)) {
for (TimelineEvent eve... | 3.68 |
hudi_RowDataKeyGens_instance | /**
* Creates a {@link RowDataKeyGen} with given configuration.
*/
public static RowDataKeyGen instance(Configuration conf, RowType rowType, int taskId, String instantTime) {
String recordKeys = conf.getString(FlinkOptions.RECORD_KEY_FIELD);
if (hasRecordKey(recordKeys, rowType.getFieldNames())) {
return RowD... | 3.68 |
dubbo_ServiceDiscoveryRegistryDirectory_isNotificationReceived | /**
* This implementation makes sure all application names related to serviceListener received address notification.
* <p>
* FIXME, make sure deprecated "interface-application" mapping item be cleared in time.
*/
@Override
public boolean isNotificationReceived() {
return serviceListener == null
|| s... | 3.68 |
flink_ClassLeakCleaner_cleanUpLeakingClasses | /** Clean up the soft references of the classes under the specified class loader. */
public static synchronized void cleanUpLeakingClasses(ClassLoader classLoader)
throws ReflectiveOperationException, SecurityException, ClassCastException {
if (!leakedClassesCleanedUp) {
// clear the soft references... | 3.68 |
framework_StaticSection_getRows | /**
* Returns an unmodifiable list of the rows in this section.
*
* @return the rows in this section
*/
protected List<ROW> getRows() {
return Collections.unmodifiableList(rows);
} | 3.68 |
pulsar_AuthorizationService_isValidOriginalPrincipal | /**
* Validates that the authenticatedPrincipal and the originalPrincipal are a valid combination.
* Valid combinations fulfill one of the following two rules:
* <p>
* 1. The authenticatedPrincipal is in {@link ServiceConfiguration#getProxyRoles()}, if, and only if,
* the originalPrincipal is set to a role that is... | 3.68 |
framework_VAbstractPopupCalendar_closeCalendarPanel | /**
* Closes the open popup panel.
*/
public void closeCalendarPanel() {
if (open) {
toggleButtonClosesWithGuarantee = true;
popup.hide(true);
}
} | 3.68 |
hbase_HRegionServer_startServices | /**
* Start maintenance Threads, Server, Worker and lease checker threads. Start all threads we need
* to run. This is called after we've successfully registered with the Master. Install an
* UncaughtExceptionHandler that calls abort of RegionServer if we get an unhandled exception. We
* cannot set the handler on a... | 3.68 |
flink_BinaryArrayWriter_createNullSetter | /**
* Creates an for accessor setting the elements of an array writer to {@code null} during
* runtime.
*
* @param elementType the element type of the array
*/
public static NullSetter createNullSetter(LogicalType elementType) {
// ordered by type root definition
switch (elementType.getTypeRoot()) {
... | 3.68 |
hadoop_BlockManagerParameters_withPrefetchingStatistics | /**
* Sets the prefetching statistics for the stream.
*
* @param statistics The prefetching statistics.
* @return The builder.
*/
public BlockManagerParameters withPrefetchingStatistics(
final PrefetchingStatistics statistics) {
this.prefetchingStatistics = statistics;
return this;
} | 3.68 |
flink_AbstractServerBase_attemptToBind | /**
* Tries to start the server at the provided port.
*
* <p>This, in conjunction with {@link #start()}, try to start the server on a free port among
* the port range provided at the constructor.
*
* @param port the port to try to bind the server to.
* @throws Exception If something goes wrong during the bind op... | 3.68 |
flink_SharedBufferAccessor_lockNode | /**
* Increases the reference counter for the given entry so that it is not accidentally removed.
*
* @param node id of the entry
* @param version dewey number of the (potential) edge that locks the given node
*/
public void lockNode(final NodeId node, final DeweyNumber version) {
Lockable<SharedBufferNode> sh... | 3.68 |
hadoop_LeveldbIterator_peekNext | /**
* Returns the next element in the iteration, without advancing the
* iteration.
*
* @return the next element in the iteration.
* @throws DBException db Exception.
*/
public Map.Entry<byte[], byte[]> peekNext() throws DBException {
try {
return iter.peekNext();
} catch (DBException e) {
throw e;
... | 3.68 |
flink_ExecutionEnvironment_executeAsync | /**
* Triggers the program execution asynchronously. The environment will execute all parts of the
* program that have resulted in a "sink" operation. Sink operations are for example printing
* results ({@link DataSet#print()}, writing results (e.g. {@link DataSet#writeAsText(String)},
* {@link DataSet#write(org.ap... | 3.68 |
framework_TypeDataStore_isNoLayoutRpcMethod | /**
* Checks whether the provided method is annotated with {@link NoLayout}.
*
* @param method
* the rpc method to check
*
* @since 7.4
*
* @return <code>true</code> if the method has a NoLayout annotation;
* otherwise <code>false</code>
*/
public static boolean isNoLayoutRpcMethod(Method m... | 3.68 |
hadoop_TaskPool_suppressExceptions | /**
* Suppress exceptions from tasks.
* RemoteIterator exceptions are not suppressable.
* @param suppress new value
* @return the builder.
*/
public Builder<I> suppressExceptions(boolean suppress) {
this.suppressExceptions = suppress;
return this;
} | 3.68 |
zxing_PDF417HighLevelEncoder_determineConsecutiveTextCount | /**
* Determines the number of consecutive characters that are encodable using text compaction.
*
* @param input the input
* @param startpos the start position within the input
* @return the requested character count
*/
private static int determineConsecutiveTextCount(ECIInput input, int startpos) {
final ... | 3.68 |
hbase_RegionCoprocessorHost_postCompact | /**
* Called after the store compaction has completed.
* @param store the store being compacted
* @param resultFile the new store file written during compaction
* @param tracker used to track the life cycle of a compaction
* @param request the compaction request
* @param user the user
*/
public ... | 3.68 |
hadoop_RollingFileSystemSink_extractId | /**
* Extract the ID from the suffix of the given file name.
*
* @param file the file name
* @return the ID or -1 if no ID could be extracted
*/
private int extractId(String file) {
int index = file.lastIndexOf(".");
int id = -1;
// A hostname has to have at least 1 character
if (index > 0) {
try {
... | 3.68 |
flink_CollectionUtil_map | /** Returns an immutable {@link Map} from the provided entries. */
@SafeVarargs
public static <K, V> Map<K, V> map(Map.Entry<K, V>... entries) {
if (entries == null) {
return Collections.emptyMap();
}
Map<K, V> map = new HashMap<>();
for (Map.Entry<K, V> entry : entries) {
map.put(entry.... | 3.68 |
hbase_MoveWithAck_isSameServer | /**
* Returns true if passed region is still on serverName when we look at hbase:meta.
* @return true if region is hosted on serverName otherwise false
*/
private boolean isSameServer(RegionInfo region, ServerName serverName) throws IOException {
ServerName serverForRegion = getServerNameForRegion(region, admin, c... | 3.68 |
flink_ThreadInfoSamplesRequest_getNumSamples | /**
* Returns the number of samples that are requested to be collected.
*
* @return the number of requested samples.
*/
public int getNumSamples() {
return numSubSamples;
} | 3.68 |
hmily_HmilyRepositoryNode_getHmilyLockRealPath | /**
* Get hmily lock real path.
*
* @param lockId lock id
* @return hmily lock real path
*/
public String getHmilyLockRealPath(final String lockId) {
return Joiner.on("/").join(getHmilyLockRootPath(), lockId);
} | 3.68 |
framework_BrowserWindowOpener_setFeatures | // Avoid breaking url to multiple lines
// @formatter:off
/**
* Sets the features for opening the window. See e.g.
* {@link https://developer.mozilla.org/en-US/docs/DOM/window.open#Position_and_size_features}
* for a description of the commonly supported features.
*
* @param features a string with window features,... | 3.68 |
hadoop_TypedBytesInput_readRawString | /**
* Reads the raw bytes following a <code>Type.STRING</code> code.
* @return the obtained bytes sequence
* @throws IOException
*/
public byte[] readRawString() throws IOException {
int length = in.readInt();
byte[] bytes = new byte[5 + length];
bytes[0] = (byte) Type.STRING.code;
bytes[1] = (byte) (0xff &... | 3.68 |
flink_HiveParserSqlSumAggFunction_isDistinct | // ~ Methods ----------------------------------------------------------------
@Override
public boolean isDistinct() {
return isDistinct;
} | 3.68 |
hadoop_TimelineDomain_setDescription | /**
* Set the domain description
*
* @param description the domain description
*/
public void setDescription(String description) {
this.description = description;
} | 3.68 |
pulsar_HttpLookupService_getBroker | /**
* Calls http-lookup api to find broker-service address which can serve a given topic.
*
* @param topicName topic-name
* @return broker-socket-address that serves given topic
*/
@Override
@SuppressWarnings("deprecation")
public CompletableFuture<Pair<InetSocketAddress, InetSocketAddress>> getBroker(TopicName to... | 3.68 |
flink_CachingLookupFunction_lookupByDelegate | // -------------------------------- Helper functions ------------------------------
private Collection<RowData> lookupByDelegate(RowData keyRow) throws IOException {
try {
Preconditions.checkState(
delegate != null,
"User's lookup function can't be null, if there are possible... | 3.68 |
querydsl_GeometryExpressions_polygonOperation | /**
* Create a new Polygon operation expression
*
* @param op operator
* @param args arguments
* @return operation expression
*/
public static PolygonExpression<Polygon> polygonOperation(Operator op, Expression<?>... args) {
return new PolygonOperation<Polygon>(Polygon.class, op, args);
} | 3.68 |
hbase_CompactingMemStore_flushInMemory | // externally visible only for tests
// when invoked directly from tests it must be verified that the caller doesn't hold updatesLock,
// otherwise there is a deadlock
void flushInMemory() {
MutableSegment currActive = getActive();
if (currActive.setInMemoryFlushed()) {
flushInMemory(currActive);
}
inMemory... | 3.68 |
hadoop_OperationAuditor_noteSpanReferenceLost | /**
* Span reference lost from GC operations.
* This is only called when an attempt is made to retrieve on
* the active thread or when a prune operation is cleaning up.
*
* @param threadId thread ID.
*/
default void noteSpanReferenceLost(long threadId) {
} | 3.68 |
flink_AllocatedSlot_equals | /** This always checks based on reference equality. */
@Override
public final boolean equals(Object obj) {
return this == obj;
} | 3.68 |
hudi_AvroSchemaCompatibility_getReader | /**
* Gets the reader schema that was validated.
*
* @return reader schema that was validated.
*/
public Schema getReader() {
return mReader;
} | 3.68 |
flink_ExecutionTimeBasedSlowTaskDetector_scheduleTask | /** Schedule periodical slow task detection. */
private void scheduleTask(
final ExecutionGraph executionGraph,
final SlowTaskDetectorListener listener,
final ComponentMainThreadExecutor mainThreadExecutor) {
this.scheduledDetectionFuture =
mainThreadExecutor.schedule(
... | 3.68 |
hadoop_LogAggregationWebUtils_verifyAndGetNodeId | /**
* Verify and parse NodeId.
* @param html the html
* @param nodeIdStr the nodeId string
* @return the {@link NodeId}
*/
public static NodeId verifyAndGetNodeId(Block html, String nodeIdStr) {
if (nodeIdStr == null || nodeIdStr.isEmpty()) {
html.h1().__("Cannot get container logs without a NodeId").__();
... | 3.68 |
pulsar_PersistentSubscription_deleteForcefully | /**
* Forcefully close all consumers and deletes the subscription.
*
* @return
*/
@Override
public CompletableFuture<Void> deleteForcefully() {
return delete(true);
} | 3.68 |
flink_HiveParserUtils_extractLateralViewInfo | // extracts useful information for a given lateral view node
public static LateralViewInfo extractLateralViewInfo(
HiveParserASTNode lateralView,
HiveParserRowResolver inputRR,
HiveParserSemanticAnalyzer hiveAnalyzer,
FrameworkConfig frameworkConfig,
RelOptCluster cluster)
... | 3.68 |
hbase_ZkSplitLogWorkerCoordination_submitTask | /**
* Submit a log split task to executor service
* @param curTask task to submit
* @param curTaskZKVersion current version of task
*/
void submitTask(final String curTask, final int curTaskZKVersion, final int reportPeriod) {
final MutableInt zkVersion = new MutableInt(curTaskZKVersion);
CancelablePr... | 3.68 |
hbase_HRegion_getLongValue | /** Returns Get the long out of the passed in Cell */
private static long getLongValue(final Cell cell) throws DoNotRetryIOException {
int len = cell.getValueLength();
if (len != Bytes.SIZEOF_LONG) {
// throw DoNotRetryIOException instead of IllegalArgumentException
throw new DoNotRetryIOException("Field is... | 3.68 |
hbase_NamespaceStateManager_getState | /**
* Gets an instance of NamespaceTableAndRegionInfo associated with namespace.
* @param name The name of the namespace
* @return An instance of NamespaceTableAndRegionInfo.
*/
public NamespaceTableAndRegionInfo getState(String name) {
return nsStateCache.get(name);
} | 3.68 |
framework_VUnknownComponent_setCaption | /**
* Sets the content text for this placeholder. Can contain HTML.
*
* @param c
* the content text to set
*/
public void setCaption(String c) {
caption.getElement().setInnerHTML(c);
} | 3.68 |
framework_Table_removeHeaderClickListener | /**
* Removes a header click listener.
*
* @param listener
* The listener to remove.
*/
public void removeHeaderClickListener(HeaderClickListener listener) {
removeListener(TableConstants.HEADER_CLICK_EVENT_ID,
HeaderClickEvent.class, listener);
} | 3.68 |
framework_VAbstractCalendarPanel_setFocusChangeListener | /**
* The given FocusChangeListener is notified when the focused date changes
* by user either clicking on a new date or by using the keyboard.
*
* @param listener
* The FocusChangeListener to be notified
*/
public void setFocusChangeListener(FocusChangeListener listener) {
focusChangeListener = li... | 3.68 |
druid_SQLASTVisitor_visit | /**
* support procedure
*/
default boolean visit(SQLWhileStatement x) {
return true;
} | 3.68 |
flink_GenericDataSourceBase_setSplitDataProperties | /**
* Sets properties of input splits for this data source. Split properties can help to generate
* more efficient execution plans. <br>
* <b> IMPORTANT: Providing wrong split data properties can cause wrong results! </b>
*
* @param splitDataProperties The data properties of this data source's splits.
*/
public v... | 3.68 |
hbase_FixedIntervalRateLimiter_setNextRefillTime | // This method is for strictly testing purpose only
@Override
public void setNextRefillTime(long nextRefillTime) {
this.nextRefillTime = nextRefillTime;
} | 3.68 |
hbase_Tag_getValueAsByte | /**
* Converts the value bytes of the given tag into a byte value
* @param tag The Tag
* @return value as byte
*/
public static byte getValueAsByte(Tag tag) {
if (tag.hasArray()) {
return tag.getValueArray()[tag.getValueOffset()];
}
return ByteBufferUtils.toByte(tag.getValueByteBuffer(), tag.getValueOffse... | 3.68 |
framework_DropTargetExtensionConnector_removeDragOverStyle | /**
* Remove the drag over indicator class name from the target element.
* <p>
* This is triggered on {@link #onDrop(Event) drop},
* {@link #onDragLeave(Event) dragleave} and {@link #onDragOver(Event)
* dragover} events pending on whether the drop has happened or if it is not
* possible. The drop is not possible ... | 3.68 |
flink_ExecutionConfig_setLatencyTrackingInterval | /**
* Interval for sending latency tracking marks from the sources to the sinks. Flink will send
* latency tracking marks from the sources at the specified interval.
*
* <p>Setting a tracking interval <= 0 disables the latency tracking.
*
* @param interval Interval in milliseconds.
*/
@PublicEvolving
public Exec... | 3.68 |
hbase_MutableRegionInfo_getEndKey | /** Returns the endKey */
@Override
public byte[] getEndKey() {
return endKey;
} | 3.68 |
hadoop_RouterQuotaManager_isQuotaSet | /**
* Check if the quota was set.
* @param quota the quota usage.
* @return True if the quota is set.
*/
public static boolean isQuotaSet(QuotaUsage quota) {
if (quota != null) {
long nsQuota = quota.getQuota();
long ssQuota = quota.getSpaceQuota();
// once nsQuota or ssQuota was set, this mount tabl... | 3.68 |
flink_ThroughputCalculator_resumeMeasurement | /** Mark when the time should be included to the throughput calculation. */
public void resumeMeasurement() {
if (measurementStartTime == NOT_TRACKED) {
measurementStartTime = clock.absoluteTimeMillis();
}
} | 3.68 |
hadoop_RequestFactoryImpl_uploadPartEncryptionParameters | /**
* Sets server side encryption parameters to the part upload
* request when encryption is enabled.
* @param builder upload part request builder
*/
protected void uploadPartEncryptionParameters(
UploadPartRequest.Builder builder) {
// need to set key to get objects encrypted with SSE_C
EncryptionSecretOpe... | 3.68 |
zxing_ITFReader_skipWhiteSpace | /**
* Skip all whitespace until we get to the first black line.
*
* @param row row of black/white values to search
* @return index of the first black line.
* @throws NotFoundException Throws exception if no black lines are found in the row
*/
private static int skipWhiteSpace(BitArray row) throws NotFoundExceptio... | 3.68 |
hadoop_Cluster_getJobTrackerStatus | /**
* Get the JobTracker's status.
*
* @return {@link JobTrackerStatus} of the JobTracker
* @throws IOException
* @throws InterruptedException
*/
public JobTrackerStatus getJobTrackerStatus() throws IOException,
InterruptedException {
return client.getJobTrackerStatus();
} | 3.68 |
hadoop_FilterFileSystem_completeLocalOutput | /**
* Called when we're all done writing to the target. A local FS will
* do nothing, because we've written to exactly the right place. A remote
* FS will copy the contents of tmpLocalFile to the correct target at
* fsOutputFile.
*/
@Override
public void completeLocalOutput(Path fsOutputFile, Path tmpLocalFile)
... | 3.68 |
zxing_MinimalEncoder_encodeHighLevel | /**
* Performs message encoding of a DataMatrix message
*
* @param msg the message
* @param priorityCharset The preferred {@link Charset}. When the value of the argument is null, the algorithm
* chooses charsets that leads to a minimal representation. Otherwise the algorithm will use the priority
* charset to... | 3.68 |
morf_MySqlDialect_buildPrimaryKeyConstraint | /**
* CONSTRAINT TABLENAME_PK PRIMARY KEY (`X`, `Y`, `Z`)
*/
private String buildPrimaryKeyConstraint(String tableName, List<String> primaryKeyColumns) {
return new StringBuilder()
.append("CONSTRAINT `")
.append(tableName)
.append("_PK` ")
.append("PRIMARY KEY (`")
.append(Joiner.on("`, `").join(primaryK... | 3.68 |
hbase_SyncReplicationReplayWALRemoteProcedure_truncateWALs | /**
* Only truncate wals one by one when task succeed. The parent procedure will check the first wal
* length to know whether this task succeed.
*/
private void truncateWALs(MasterProcedureEnv env) {
String firstWal = wals.get(0);
try {
env.getMasterServices().getSyncReplicationReplayWALManager().finishRepla... | 3.68 |
hadoop_UriUtils_extractAccountNameFromHostName | /**
* Extracts the account name from the host name.
* @param hostName the fully-qualified domain name of the storage service
* endpoint (e.g. {account}.dfs.core.windows.net.
* @return the storage service account name.
*/
public static String extractAccountNameFromHostName(final String hostName) {
... | 3.68 |
flink_Configuration_getDouble | /**
* Returns the value associated with the given config option as a {@code double}. 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 va... | 3.68 |
hbase_ChaosAgent_setStatusOfTaskZNode | /**
* sets given Status for Task Znode
* @param taskZNode ZNode to set status
* @param status Status value
*/
public void setStatusOfTaskZNode(String taskZNode, String status) {
LOG.info("Setting status of Task ZNode: " + taskZNode + " status : " + status);
zk.setData(taskZNode, status.getBytes(StandardChars... | 3.68 |
hbase_FavoredNodesManager_isFavoredNodeApplicable | /**
* Favored nodes are not applicable for system tables. We will use this to check before we apply
* any favored nodes logic on a region.
*/
public static boolean isFavoredNodeApplicable(RegionInfo regionInfo) {
return !regionInfo.getTable().isSystemTable();
} | 3.68 |
flink_AbstractID_byteArrayToLong | /**
* Converts the given byte array to a long.
*
* @param ba the byte array to be converted
* @param offset the offset indicating at which byte inside the array the conversion shall begin
* @return the long variable
*/
private static long byteArrayToLong(byte[] ba, int offset) {
long l = 0;
for (int i = ... | 3.68 |
flink_TableSinkFactory_createTableSink | /**
* Creates and configures a {@link TableSink} based on the given {@link Context}.
*
* @param context context of this table sink.
* @return the configured table sink.
*/
default TableSink<T> createTableSink(Context context) {
return createTableSink(context.getObjectIdentifier().toObjectPath(), context.getTab... | 3.68 |
flink_CheckpointConfig_toConfiguration | /**
* @return A copy of internal {@link #configuration}. Note it is missing all options that are
* stored as plain java fields in {@link CheckpointConfig}, for example {@link #storage}.
*/
@Internal
public Configuration toConfiguration() {
return new Configuration(configuration);
} | 3.68 |
flink_DataSet_mapPartition | /**
* Applies a Map-style operation to the entire partition of the data. The function is called
* once per parallel partition of the data, and the entire partition is available through the
* given Iterator. The number of elements that each instance of the MapPartition function sees
* is non deterministic and depend... | 3.68 |
morf_SqlDateUtils_castAsDateReplaceValueIfNullOrZero | /**
* Returns the replacement value if the evaluating expression is null or zero,
* otherwise returns the value casted as date.
*
* @param expression the expression to evaluate
* @param replace the replacement value
* @return expression or replacement value casted as date
*/
public static AliasedField castAsDate... | 3.68 |
rocketmq-connect_JsonConverter_fromConnectData | /**
* Convert a rocketmq Connect data object to a native object for serialization.
*
* @param topic the topic associated with the data
* @param schema the schema for the value
* @param value the value to convert
* @return the serialized value
*/
@Override
public byte[] fromConnectData(String topic, Schema schema... | 3.68 |
graphhopper_BBox_intersects | /**
* This method calculates if this BBox intersects with the specified BBox
*/
public boolean intersects(BBox o) {
// return (o.minLon < minLon && o.maxLon > minLon || o.minLon < maxLon && o.minLon >= minLon)
// && (o.maxLat < maxLat && o.maxLat >= minLat || o.maxLat >= maxLat && o.minLat < maxLat);
ret... | 3.68 |
hbase_DynamicMetricsRegistry_info | /** Returns the info object of the metrics registry */
public MetricsInfo info() {
return metricsInfo;
} | 3.68 |
flink_VertexThreadInfoTrackerBuilder_setExecutionVertexStatsCache | /**
* Sets {@code executionVertexStatsCache}. This is currently only used for testing.
*
* @param executionVertexStatsCache The Cache instance to use for caching statistics. Will use
* the default defined in {@link VertexThreadInfoTrackerBuilder#defaultCache()} if not set.
* @return Builder.
*/
@VisibleForTes... | 3.68 |
hadoop_BaseNMTokenSecretManager_createIdentifier | /**
* It is required for RPC
*/
@Override
public NMTokenIdentifier createIdentifier() {
return new NMTokenIdentifier();
} | 3.68 |
hadoop_LeveldbIterator_seek | /**
* Repositions the iterator so the key of the next BlockElement
* returned greater than or equal to the specified targetKey.
*
* @param key key of the next BlockElement.
* @throws DBException db Exception.
*/
public void seek(byte[] key) throws DBException {
try {
iter.seek(key);
} catch (DBException e... | 3.68 |
hadoop_FsCreateModes_create | /**
* Create from masked and unmasked modes.
*
* @param masked masked.
* @param unmasked unmasked.
* @return FsCreateModes.
*/
public static FsCreateModes create(FsPermission masked,
FsPermission unmasked) {
assert masked.getUnmasked() == null;
assert unmasked.getUnmasked() ... | 3.68 |
dubbo_IOUtils_appendLines | /**
* append lines.
*
* @param file file.
* @param lines lines.
* @throws IOException If an I/O error occurs
*/
public static void appendLines(File file, String[] lines) throws IOException {
if (file == null) {
throw new IOException("File is null.");
}
writeLines(new FileOutputStream(file, tr... | 3.68 |
flink_BlobServerConnection_close | /** Closes the connection socket and lets the thread exit. */
public void close() {
closeSilently(clientSocket, LOG);
interrupt();
} | 3.68 |
hadoop_BlockStorageMovementAttemptedItems_notifyReportedBlock | /**
* Notify the storage movement attempt finished block.
*
* @param reportedDn
* reported datanode
* @param type
* storage type
* @param reportedBlock
* reported block
*/
public void notifyReportedBlock(DatanodeInfo reportedDn, StorageType type,
Block reportedBlock) {
synchron... | 3.68 |
hbase_MasterObserver_preListNamespaceDescriptors | /**
* Called before a listNamespaceDescriptors request has been processed.
* @param ctx the environment to interact with the framework and master
* @param descriptors an empty list, can be filled with what to return by coprocessor
*/
default void preListNamespaceDescriptors(ObserverContext<MasterCoprocessor... | 3.68 |
morf_TableSetSchema_viewNames | /**
* @see org.alfasoftware.morf.metadata.Schema#viewNames()
*/
@Override
public Collection<String> viewNames() {
return Collections.emptySet();
} | 3.68 |
hadoop_StoragePolicySatisfyManager_start | /**
* This function will do following logic based on the configured sps mode:
*
* <p>
* If the configured mode is {@link StoragePolicySatisfierMode#EXTERNAL}, then
* it won't do anything. Administrator requires to start external sps service
* explicitly.
*
* <p>
* If the configured mode is {@link StoragePolicy... | 3.68 |
zxing_CalendarParsedResult_parseDate | /**
* Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021)
* or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC).
*
* @param when The string to parse
* @throws ParseException if not able to parse as a date
*/
private static long parseDa... | 3.68 |
framework_View_beforeLeave | /**
* Called when the user is requesting navigation away from the view.
* <p>
* This method allows the view to accept or prevent navigation away from the
* view or optionally delay navigation away until a later stage. For
* navigation to take place, the {@link ViewBeforeLeaveEvent#navigate()}
* method must be cal... | 3.68 |
hbase_CompactingMemStore_getNextRow | /**
* @param cell Find the row that comes after this one. If null, we return the first.
* @return Next row or null if none found.
*/
Cell getNextRow(final Cell cell) {
Cell lowest = null;
List<Segment> segments = getSegments();
for (Segment segment : segments) {
if (lowest == null) {
lowest = getNext... | 3.68 |
flink_Transformation_getManagedMemoryOperatorScopeUseCaseWeights | /**
* Get operator scope use cases that this transformation needs managed memory for, and the
* use-case-specific weights for this transformation. The weights are used for sharing managed
* memory across transformations for the use cases. Check the individual {@link
* ManagedMemoryUseCase} for the specific weight d... | 3.68 |
flink_SourceEventWrapper_getSourceEvent | /** @return The {@link SourceEvent} in this SourceEventWrapper. */
public SourceEvent getSourceEvent() {
return sourceEvent;
} | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.