name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
AreaShop_GeneralRegion_getRegion | /**
* Get the WorldGuard region associated with this AreaShop region.
* @return The ProtectedRegion of WorldGuard or null if the region does not exist anymore
*/
@Override
public ProtectedRegion getRegion() {
if(getWorld() == null
|| plugin.getWorldGuard() == null
|| plugin.getRegionManager(getWorld()) == nul... | 3.68 |
hbase_EnabledTableSnapshotHandler_snapshotMobRegion | /**
* Takes a snapshot of the mob region
*/
private void snapshotMobRegion(final RegionInfo regionInfo) throws IOException {
snapshotManifest.addMobRegion(regionInfo);
monitor.rethrowException();
status.setStatus("Completed referencing HFiles for the mob region of table: " + snapshotTable);
} | 3.68 |
open-banking-gateway_WebDriverBasedPaymentInitiation_sandbox_anton_brueckner_imitates_click_redirect_back_to_tpp_button_api_localhost_cookie_only_with_oauth2_integrated_hack | /*
* Caused by FIXME https://github.com/adorsys/XS2A-Sandbox/issues/42, should be sandbox_anton_brueckner_clicks_redirect_back_to_tpp_button_api_localhost_cookie_only
*/
public SELF sandbox_anton_brueckner_imitates_click_redirect_back_to_tpp_button_api_localhost_cookie_only_with_oauth2_integrated_hack(WebDriver driver)... | 3.68 |
hbase_MovingAverage_measure | /**
* Measure elapsed time of a measurable method.
* @param measurable method implements {@link TimeMeasurable}
* @return T it refers to the original return type of the measurable method
*/
public T measure(TimeMeasurable<T> measurable) {
long startTime = start();
LOG.trace("{} - start to measure at: {} ns.", l... | 3.68 |
hbase_DrainingServerTracker_start | /**
* Starts the tracking of draining RegionServers.
* <p>
* All Draining RSs will be tracked after this method is called.
*/
public void start() throws KeeperException, IOException {
watcher.registerListener(this);
// Add a ServerListener to check if a server is draining when it's added.
serverManager.regist... | 3.68 |
rocketmq-connect_RetryWithToleranceOperator_execAndRetry | /**
* Attempt to execute an operation.
*/
protected <V> V execAndRetry(Operation<V> operation) throws Exception {
int attempt = 0;
long startTime = System.currentTimeMillis();
long deadline = startTime + retryTimeout;
do {
try {
attempt++;
return operation.call();
... | 3.68 |
flink_StreamProjection_projectTuple10 | /**
* Projects a {@link Tuple} {@link DataStream} to the previously selected fields.
*
* @return The projected DataStream.
* @see Tuple
* @see DataStream
*/
public <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>
SingleOutputStreamOperator<Tuple10<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>>
projectTu... | 3.68 |
hbase_MiniZooKeeperCluster_selectClientPort | /**
* Selects a ZK client port.
* @param seedPort the seed port to start with; -1 means first time.
* @return a valid and unused client port
*/
private int selectClientPort(int seedPort) {
int i;
int returnClientPort = seedPort + 1;
if (returnClientPort == 0) {
// If the new port is invalid, find one - st... | 3.68 |
framework_JSR356WebsocketInitializer_isVaadinServlet | /**
* Tries to determine if the given servlet registration refers to a Vaadin
* servlet.
*
* @param servletRegistration
* The servlet registration info for the servlet
* @return false if the servlet is definitely not a Vaadin servlet, true
* otherwise
*/
protected boolean isVaadinServlet(Serv... | 3.68 |
hadoop_TaskAttemptScanDirectoryStage_executeStage | /**
* Build the Manifest.
* @return the manifest
* @throws IOException failure.
*/
@Override
protected TaskManifest executeStage(final Void arguments)
throws IOException {
final Path taskAttemptDir = getRequiredTaskAttemptDir();
final TaskManifest manifest = createTaskManifest(getStageConfig());
LOG.inf... | 3.68 |
framework_ReportUsage_main | // for testing only
public static void main(String[] args) {
report();
} | 3.68 |
framework_MenuBar_setAutoOpen | /**
* Sets whether this menu bar's child menus will open when the mouse is
* moved over it.
*
* @param autoOpen
* <code>true</code> to cause child menus to auto-open
*/
public void setAutoOpen(boolean autoOpen) {
this.autoOpen = autoOpen;
} | 3.68 |
pulsar_ConsumerImpl_messageProcessed | /**
* Record the event that one message has been processed by the application.
*
* Periodically, it sends a Flow command to notify the broker that it can push more messages
*/
@Override
protected synchronized void messageProcessed(Message<?> msg) {
ClientCnx currentCnx = cnx();
ClientCnx msgCnx = ((MessageI... | 3.68 |
hbase_MiniHBaseCluster_waitOnRegionServer | /**
* Wait for the specified region server to stop. Removes this thread from list of running threads.
* @return Name of region server that just went down.
*/
public String waitOnRegionServer(final int serverNumber) {
return this.hbaseCluster.waitOnRegionServer(serverNumber);
} | 3.68 |
flink_DataSourceTask_initInputFormat | /**
* Initializes the InputFormat implementation and configuration.
*
* @throws RuntimeException Throws if instance of InputFormat implementation can not be
* obtained.
*/
private void initInputFormat() {
ClassLoader userCodeClassLoader = getUserCodeClassLoader();
// obtain task configuration (includin... | 3.68 |
flink_CsvOutputFormat_setQuoteStrings | /**
* Configures whether the output format should quote string values. String values are fields of
* type {@link java.lang.String} and {@link org.apache.flink.types.StringValue}, as well as all
* subclasses of the latter.
*
* <p>By default, strings are not quoted.
*
* @param quoteStrings Flag indicating whether ... | 3.68 |
hudi_HoodieTableFactory_checkRecordKey | /**
* Validate the record key.
*/
private void checkRecordKey(Configuration conf, ResolvedSchema schema) {
List<String> fields = schema.getColumnNames();
if (!schema.getPrimaryKey().isPresent()) {
String[] recordKeys = conf.get(FlinkOptions.RECORD_KEY_FIELD).split(",");
if (recordKeys.length == 1
... | 3.68 |
flink_SplitFetcher_removeSplits | /**
* Notice the split fetcher that some splits finished. This operation is asynchronous.
*
* @param splitsToRemove the splits need to be removed.
*/
public void removeSplits(List<SplitT> splitsToRemove) {
lock.lock();
try {
enqueueTaskUnsafe(
new RemoveSplitsTask<>(
... | 3.68 |
hmily_JavaBeanBinder_getValue | /**
* Gets value.
*
* @param instance the instance
* @return the value
*/
Supplier<Object> getValue(final Supplier<?> instance) {
if (this.getter == null) {
return null;
}
return () -> {
try {
this.getter.setAccessible(true);
return this.getter.invoke(instance.ge... | 3.68 |
AreaShop_GeneralRegion_limitsAllow | /**
* Check if the player can buy/rent this region, detailed info in the result object.
* @param type The type of region to check
* @param offlinePlayer The player to check it for
* @param extend Check for extending of rental regions
* @return LimitResult containing if it is allowed, why and limiting factor
*/
... | 3.68 |
framework_LegacyWindow_getURL | /**
* Gets the full URL of the window. The returned URL is window specific and
* can be used to directly refer to the window.
* <p>
* Note! This method can not be used for portlets.
* </p>
*
* @return the URL of the window or null if the window is not attached to an
* application
*/
public URL getURL()... | 3.68 |
hbase_MasterObserver_postCloneSnapshot | /**
* Called after a snapshot clone operation has been requested. Called as part of restoreSnapshot
* RPC call.
* @param ctx the environment to interact with the framework and master
* @param snapshot the SnapshotDescriptor for the snapshot
* @param tableDescriptor the v of the table to create
... | 3.68 |
hbase_SegmentScanner_getNextIndexedKey | /**
* @return the next key in the index (the key to seek to the next block) if known, or null
* otherwise Not relevant for in-memory scanner
*/
@Override
public Cell getNextIndexedKey() {
return null;
} | 3.68 |
hbase_ByteBufferKeyOnlyKeyValue_getFamilyLengthPosition | // The position in BB where the family length is added.
private int getFamilyLengthPosition() {
return getFamilyLengthPosition(getRowLength());
} | 3.68 |
flink_TypeExtractionUtils_getAllDeclaredMethods | /** Returns all declared methods of a class including methods of superclasses. */
public static List<Method> getAllDeclaredMethods(Class<?> clazz) {
List<Method> result = new ArrayList<>();
while (clazz != null) {
Method[] methods = clazz.getDeclaredMethods();
Collections.addAll(result, methods)... | 3.68 |
flink_DualInputOperator_addSecondInputs | /**
* Add to the second input the union of the given operators.
*
* @param inputs The operator(s) to be unioned with the second input.
* @deprecated This method will be removed in future versions. Use the {@link Union} operator
* instead.
*/
@Deprecated
@SuppressWarnings("unchecked")
public void addSecondInpu... | 3.68 |
hbase_LogRollBackupSubprocedure_cleanup | /**
* Cancel threads if they haven't finished.
*/
@Override
public void cleanup(Exception e) {
taskManager.abort("Aborting log roll subprocedure tasks for backup due to error", e);
} | 3.68 |
hbase_RatioBasedCompactionPolicy_needsCompaction | /**
* A heuristic method to decide whether to schedule a compaction request
* @param storeFiles files in the store.
* @param filesCompacting files being scheduled to compact.
* @return true to schedule a request.
*/
@Override
public boolean needsCompaction(Collection<HStoreFile> storeFiles,
List<HStoreFile>... | 3.68 |
flink_CompletedCheckpointStore_getLatestCheckpoint | /**
* Returns the latest {@link CompletedCheckpoint} instance or <code>null</code> if none was
* added.
*/
default CompletedCheckpoint getLatestCheckpoint() throws Exception {
List<CompletedCheckpoint> allCheckpoints = getAllCheckpoints();
if (allCheckpoints.isEmpty()) {
return null;
}
retur... | 3.68 |
hadoop_S3ListResult_isV1 | /**
* Is this a v1 API result or v2?
* @return true if v1, false if v2
*/
public boolean isV1() {
return v1Result != null;
} | 3.68 |
pulsar_TxnMetaImpl_status | /**
* Return the current status of the transaction.
*
* @return current status of the transaction.
*/
@Override
public synchronized TxnStatus status() {
return txnStatus;
} | 3.68 |
hadoop_LightWeightLinkedSet_addElem | /**
* Add given element to the hash table
*
* @return true if the element was not present in the table, false otherwise
*/
@Override
protected boolean addElem(final T element) {
// validate element
if (element == null) {
throw new IllegalArgumentException("Null element is not supported.");
}
// find has... | 3.68 |
hbase_MasterAddressTracker_getMasterAddress | /**
* Get master address. Use this instead of {@link #getMasterAddress()} if you do not have an
* instance of this tracker in your context.
* @param zkw ZKWatcher to use
* @return ServerName stored in the the master address znode or null if no znode present.
* @throws KeeperException if a ZooKeeper operation fails... | 3.68 |
querydsl_AbstractOracleQuery_connectByPrior | /**
* CONNECT BY specifies the relationship between parent rows and child rows of the hierarchy.
*
* @param cond condition
* @return the current object
*/
public C connectByPrior(Predicate cond) {
return addFlag(Position.BEFORE_ORDER, CONNECT_BY_PRIOR, cond);
} | 3.68 |
framework_CurrentInstance_get | /**
* Gets the current instance of a specific type if available.
* <p>
* When a current instance of the specific type is not found, the
* {@link CurrentInstanceFallbackResolver} registered via
* {@link #defineFallbackResolver(Class, CurrentInstanceFallbackResolver)}
* (if any) is invoked.
*
* @param type
* ... | 3.68 |
flink_ValueTypeInfo_createCopyableValueSerializer | // utility method to summon the necessary bound
private static <X extends CopyableValue<X>>
CopyableValueSerializer<X> createCopyableValueSerializer(Class<X> clazz) {
return new CopyableValueSerializer<X>(clazz);
} | 3.68 |
hadoop_Contracts_checkArg | /**
* Check an argument for false conditions
* @param arg the argument to check
* @param expression the boolean expression for the condition
* @param msg the error message if {@code expression} is false
* @return the argument for convenience
*/
public static double checkArg(double arg, boolean expression, Object... | 3.68 |
framework_Accordion_getState | /*
* (non-Javadoc)
*
* @see com.vaadin.ui.TabSheet#getState()
*/
@Override
protected AccordionState getState() {
return (AccordionState) super.getState();
} | 3.68 |
hadoop_AppPriorityACLConfigurationParser_parsePriorityACLType | /*
* Parse different types of ACLs sub parts for on priority group and store in
* a map for later processing.
*/
private void parsePriorityACLType(AppPriorityACLGroup userPriorityACL,
String[] splits, List<StringBuilder> userAndGroupName) {
// Here splits will have the key value pair at index 0 and 1 respectiv... | 3.68 |
morf_DataValue_defaultHashCode | /**
* Default hashCode implementation for instances.
*
* @param obj The object.
* @return The hashCode.
*/
public static int defaultHashCode(DataValue obj) {
final int prime = 31;
int result = 1;
result = prime * result + obj.getName().hashCode();
if (obj.getObject() == null) {
result = prime * result;... | 3.68 |
morf_SqlServerDialect_getSqlForAddMonths | /**
* @see org.alfasoftware.morf.jdbc.SqlDialect#getSqlForAddMonths(org.alfasoftware.morf.sql.element.Function)
*/
@Override
protected String getSqlForAddMonths(Function function) {
return String.format(
"DATEADD(month, %s, %s)",
getSqlFrom(function.getArguments().get(1)),
getSqlFrom(function.getArgumen... | 3.68 |
hmily_HmilySQLComputeUtils_getAllPKColumns | /**
* Get all pk columns.
*
* @param segment hmily simple table segment
* @param tableName table name
* @param primaryKeyColumns primary key columns
* @return all table primary key columns in asterisk way
*/
public static String getAllPKColumns(final HmilySimpleTableSegment segment, final Strin... | 3.68 |
flink_HiveTableUtil_requireValidateConstraint | // returns whether a trait requires VALIDATE constraint
public static boolean requireValidateConstraint(byte trait) {
return (trait & HIVE_CONSTRAINT_VALIDATE) != 0;
} | 3.68 |
hbase_MasterObserver_preSplitRegionBeforeMETAAction | /**
* This will be called before update META step as part of split transaction.
* @param ctx the environment to interact with the framework and master
*/
default void preSplitRegionBeforeMETAAction(
final ObserverContext<MasterCoprocessorEnvironment> ctx, final byte[] splitKey,
final List<Mutation> metaEntries) ... | 3.68 |
hadoop_BinaryEditsVisitor_start | /**
* Start the visitor (initialization)
*/
@Override
public void start(int version) throws IOException {
} | 3.68 |
druid_NodeEvent_getEventsByDiffProperties | /**
* Diff the given two Properties.
*
* @return A List of AddEvent and DelEvent
*/
public static List<NodeEvent> getEventsByDiffProperties(Properties previous, Properties next) {
List<String> prevNames = PropertiesUtils.loadNameList(previous, "");
List<String> nextNames = PropertiesUtils.loadNameList(next,... | 3.68 |
framework_VAbstractPopupCalendar_buildDate | /**
* Update the text field contents from the date. See {@link #buildDate()}.
*
* @param forceValid
* true to force the text field to be updated, false to only
* update if the parsable flag is true.
*/
protected void buildDate(boolean forceValid) {
if (forceValid) {
parsable = tr... | 3.68 |
hbase_MemStoreSnapshot_getTimeRangeTracker | /** Returns {@link TimeRangeTracker} for all the Cells in the snapshot. */
public TimeRangeTracker getTimeRangeTracker() {
return timeRangeTracker;
} | 3.68 |
morf_AbstractSqlDialectTest_expectedSelectMinimumWithExpression | /**
* @return the decimal representation of a literal for testing
*/
protected String expectedSelectMinimumWithExpression() {
return "SELECT MIN(intField - 1) FROM " + tableName(TEST_TABLE);
} | 3.68 |
AreaShop_CancellableRegionEvent_cancel | /**
* Cancel the event from happening.
* @param reason The reason of cancelling, used for display to the user, should end with a dot
*/
public void cancel(String reason) {
this.cancelled = true;
this.reason = reason;
} | 3.68 |
framework_Overlay_hide | /**
*
* Hides the popup and detaches it from the page. This has no effect if it
* is not currently showing. Animation-in, animation-out can be
* enable/disabled for different use cases.
*
* @see com.google.gwt.user.client.ui.PopupPanel#hide(boolean)
*
* @param autoClosed
* the value that will be pas... | 3.68 |
framework_HierarchicalContainer_setIncludeParentsWhenFiltering | /**
* Controls how the filtering of the container works. Set this to true to
* make filtering include parents for all matched items in addition to the
* items themselves. Setting this to false causes the filtering to only
* include the matching items and make items with excluded parents into root
* items.
*
* @p... | 3.68 |
rocketmq-connect_RetryWithToleranceOperator_sourceRecord | /**
* Set the source record being processed in the connect pipeline.
*
* @param preTransformRecord the source record
*/
public void sourceRecord(ConnectRecord preTransformRecord) {
this.context.sourceRecord(preTransformRecord);
} | 3.68 |
framework_DesignFormatter_findConverterFor | /**
* Finds a converter for a given type. May return a converter for a
* superclass instead, if one is found.
*
* @param sourceType
* Type to find a converter for.
* @return A valid converter for a given type or its subtype, <b>null</b> if
* it was not found.
* @since 8.0
*/
protected <T> Co... | 3.68 |
framework_LoadingIndicatorConfiguration_getFirstDelay | /*
* (non-Javadoc)
*
* @see com.vaadin.ui.LoadingIndicator#getFirstDelay()
*/
@Override
public int getFirstDelay() {
return getState(false).firstDelay;
} | 3.68 |
pulsar_FileUtils_deleteFile | /**
* Deletes the given file. If the given file exists but could not be deleted
* this will be printed as a warning to the given logger
*
* @param file to delete
* @param logger to notify
* @param attempts indicates how many times an attempt to delete should be
* made
* @return true if given file no longer exis... | 3.68 |
flink_SegmentsUtil_getShort | /**
* get short from segments.
*
* @param segments target segments.
* @param offset value offset.
*/
public static short getShort(MemorySegment[] segments, int offset) {
if (inFirstSegment(segments, offset, 2)) {
return segments[0].getShort(offset);
} else {
return getShortMultiSegments(seg... | 3.68 |
hadoop_AbstractDelegationTokenBinding_bindToTokenIdentifier | /**
* Bind to the token identifier, returning the credential providers to use
* for the owner to talk to S3 and related AWS Services.
* @param retrievedIdentifier the unmarshalled data
* @return non-empty list of AWS credential providers to use for
* authenticating this client with AWS services.
* @throws IOExcep... | 3.68 |
framework_VUI_sendClientResized | /**
* Send new dimensions to the server.
* <p>
* For internal use only. May be removed or replaced in the future.
*/
public void sendClientResized() {
Profiler.enter("VUI.sendClientResized");
Element parentElement = getElement().getParentElement();
int viewHeight = parentElement.getClientHeight();
i... | 3.68 |
framework_Button_getButton | /**
* Gets the Button where the event occurred.
*
* @return the Source of the event.
*/
public Button getButton() {
return (Button) getSource();
} | 3.68 |
flink_JobGraph_getNumberOfVertices | /**
* Returns the number of all vertices.
*
* @return The number of all vertices.
*/
public int getNumberOfVertices() {
return this.taskVertices.size();
} | 3.68 |
hbase_MasterObserver_postStartMaster | /**
* Called immediately after an active master instance has completed initialization. Will not be
* called on standby master instances unless they take over the active role.
*/
default void postStartMaster(final ObserverContext<MasterCoprocessorEnvironment> ctx)
throws IOException {
} | 3.68 |
AreaShop_GeneralRegion_getStringListSetting | /**
* Get a string list setting for this region, defined as follows
* - If the region has the setting in its own file (/regions/regionName.yml), use that
* - If the region has groups, use the setting defined by the most important group, if any
* - Otherwise fallback to the default.yml file setting
* @param path Th... | 3.68 |
shardingsphere-elasticjob_JobConfiguration_jobParameter | /**
* Set job parameter.
*
* @param jobParameter job parameter
*
* @return job configuration builder
*/
public Builder jobParameter(final String jobParameter) {
if (null != jobParameter) {
this.jobParameter = jobParameter;
}
return this;
} | 3.68 |
hudi_HoodieFlinkCompactor_shutdownAsyncService | /**
* Shutdown async services like compaction/clustering as DeltaSync is shutdown.
*/
public void shutdownAsyncService(boolean error) {
LOG.info("Gracefully shutting down compactor. Error ?" + error);
executor.shutdown();
writeClient.close();
} | 3.68 |
querydsl_AntMetaDataExporter_addRenameMapping | /**
* Adds RenameMapping instance, called by Ant
*/
public void addRenameMapping(RenameMapping mapping) {
renameMappings.add(mapping);
} | 3.68 |
hadoop_AbstractS3AStatisticsSource_lookupGaugeValue | /**
* {@inheritDoc}
*/
public Long lookupGaugeValue(final String name) {
return ioStatistics.gauges().get(name);
} | 3.68 |
flink_FixedLengthRecordSorter_write | /**
* Writes a given record to this sort buffer. The written record will be appended and take the
* last logical position.
*
* @param record The record to be written.
* @return True, if the record was successfully written, false, if the sort buffer was full.
* @throws IOException Thrown, if an error occurred whil... | 3.68 |
hudi_HoodieSortedMergeHandle_write | /**
* Go through an old record. Here if we detect a newer version shows up, we write the new one to the file.
*/
@Override
public void write(HoodieRecord oldRecord) {
Schema oldSchema = config.populateMetaFields() ? writeSchemaWithMetaFields : writeSchema;
Schema newSchema = useWriterSchemaForCompaction ? writeSc... | 3.68 |
dubbo_DubboBootstrap_getInstance | /**
* See {@link ApplicationModel} and {@link ExtensionLoader} for why DubboBootstrap is designed to be singleton.
*/
public static DubboBootstrap getInstance() {
if (instance == null) {
synchronized (DubboBootstrap.class) {
if (instance == null) {
instance = DubboBootstrap.get... | 3.68 |
zxing_Detector_detect | /**
* Detects an Aztec Code in an image.
*
* @param isMirror if true, image is a mirror-image of original
* @return {@link AztecDetectorResult} encapsulating results of detecting an Aztec Code
* @throws NotFoundException if no Aztec Code can be found
*/
public AztecDetectorResult detect(boolean isMirror) throws N... | 3.68 |
framework_ClickableRenderer_addClickHandler | /**
* Adds a click handler to this button renderer. The handler is invoked
* every time one of the widgets rendered by this renderer is clicked.
* <p>
* Note that the row type of the click handler must match the row type of
* the containing Grid.
*
* @param handler
* the click handler to be added
*/... | 3.68 |
hbase_ReplicationPeerManager_preUpdatePeerConfig | /**
* Return the old peer description. Can never be null.
*/
ReplicationPeerDescription preUpdatePeerConfig(String peerId, ReplicationPeerConfig peerConfig)
throws DoNotRetryIOException {
checkPeerConfig(peerConfig);
ReplicationPeerDescription desc = checkPeerExists(peerId);
ReplicationPeerConfig oldPeerConfi... | 3.68 |
graphhopper_VectorTile_getLayersOrBuilderList | /**
* <code>repeated .vector_tile.Tile.Layer layers = 3;</code>
*/
public java.util.List<? extends vector_tile.VectorTile.Tile.LayerOrBuilder>
getLayersOrBuilderList() {
if (layersBuilder_ != null) {
return layersBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableL... | 3.68 |
pulsar_AvroRecordBuilderImpl_set | /**
* Sets the value of a field.
*
* @param index the field to set.
* @param value the value to set.
* @return a reference to the RecordBuilder.
*/
protected GenericRecordBuilder set(int index, Object value) {
if (value instanceof GenericRecord) {
if (value instanceof GenericAvroRecord) {
... | 3.68 |
hbase_MapReduceHFileSplitterJob_main | /**
* Main entry point.
* @param args The command line parameters.
* @throws Exception When running the job fails.
*/
public static void main(String[] args) throws Exception {
int ret = ToolRunner.run(new MapReduceHFileSplitterJob(HBaseConfiguration.create()), args);
System.exit(ret);
} | 3.68 |
hadoop_ReplicaUnderConstruction_isAlive | /**
* Is data-node the replica belongs to alive.
*/
boolean isAlive() {
return expectedLocation.getDatanodeDescriptor().isAlive();
} | 3.68 |
hadoop_RouterClientRMService_getRootInterceptor | /**
* Gets the root request interceptor.
*
* @return the root request interceptor
*/
public synchronized ClientRequestInterceptor getRootInterceptor() {
return rootInterceptor;
} | 3.68 |
hudi_RowDataKeyGens_hasRecordKey | /**
* Checks whether user provides any record key.
*/
private static boolean hasRecordKey(String recordKeys, List<String> fieldNames) {
return recordKeys.split(",").length != 1
|| fieldNames.contains(recordKeys);
} | 3.68 |
hbase_Import_createCfRenameMap | // helper: make a map from sourceCfName to destCfName by parsing a config key
private static Map<byte[], byte[]> createCfRenameMap(Configuration conf) {
Map<byte[], byte[]> cfRenameMap = null;
String allMappingsPropVal = conf.get(CF_RENAME_PROP);
if (allMappingsPropVal != null) {
// The conf value format shou... | 3.68 |
querydsl_SQLExpressions_lastValue | /**
* returns value evaluated at the row that is the last row of the window frame
*
* @param expr argument
* @return last_value(expr)
*/
public static <T> WindowOver<T> lastValue(Expression<T> expr) {
return new WindowOver<T>(expr.getType(), SQLOps.LASTVALUE, expr);
} | 3.68 |
framework_ConnectorHierarchyChangeEvent_getOldChildren | /**
* Returns a collection of the old children for the connector. This was the
* state before the update was received from the server.
*
* @return A collection of old child connectors. Never returns null.
*/
public List<ComponentConnector> getOldChildren() {
return oldChildren;
} | 3.68 |
hmily_ConsulClient_getInstance | /**
* get instance.
* @param consulConfig consul config
* @return consulClient
*/
public static ConsulClient getInstance(final ConsulConfig consulConfig) {
String hostAndPorts = consulConfig.getHostAndPorts();
List<HostAndPort> hostAndPortList = buildHostAndPortList(hostAndPorts);
Consul consul;
if ... | 3.68 |
dubbo_TTree_recursive | /**
* recursive visit
*/
private void recursive(int deep, boolean isLast, String prefix, Node node, Callback callback) {
callback.callback(deep, isLast, prefix, node);
if (!node.isLeaf()) {
final int size = node.children.size();
for (int index = 0; index < size; index++) {
final bo... | 3.68 |
hadoop_BufferPool_toString | // For debugging purposes.
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(pool.toString());
sb.append("\n");
List<BufferData> allData = new ArrayList<>(getAll());
Collections.sort(allData,
(d1, d2) -> d1.getBlockNumber() - d2.getBlockNumber());
for (BufferData d... | 3.68 |
zilla_HttpClientFactory_teHeader | // 8.1.2.2 TE header MUST NOT contain any value other than "trailers".
private void teHeader(
DirectBuffer name,
DirectBuffer value)
{
if (!error() && name.equals(TE) && !value.equals(TRAILERS))
{
streamError = Http2ErrorCode.PROTOCOL_ERROR;
}
} | 3.68 |
hadoop_AdminACLsManager_areACLsEnabled | /**
* Returns whether ACLs are enabled
*
* @see YarnConfiguration#YARN_ACL_ENABLE
* @see YarnConfiguration#DEFAULT_YARN_ACL_ENABLE
* @return <tt>true</tt> if ACLs are enabled
*/
public boolean areACLsEnabled() {
return aclsEnabled;
} | 3.68 |
flink_ExecutionVertex_markFailed | /**
* This method marks the task as failed, but will make no attempt to remove task execution from
* the task manager. It is intended for cases where the task is known not to be deployed yet.
*
* @param t The exception that caused the task to fail.
*/
public void markFailed(Throwable t) {
currentExecution.mark... | 3.68 |
flink_FileInputFormat_open | /**
* Opens an input stream to the file defined in the input format. The stream is positioned at
* the beginning of the given split.
*
* <p>The stream is actually opened in an asynchronous thread to make sure any interruptions to
* the thread working on the input format do not reach the file system.
*/
@Override
... | 3.68 |
pulsar_ComponentImpl_isSuperUser | /**
* @deprecated use {@link #isSuperUser(AuthenticationParameters)}
*/
@Deprecated
public boolean isSuperUser(String clientRole, AuthenticationDataSource authenticationData) {
AuthenticationParameters authParams = AuthenticationParameters.builder().clientRole(clientRole)
.clientAuthenticationDataSour... | 3.68 |
hbase_HFileLink_createFromHFileLink | /**
* Create a new HFileLink starting from a hfileLink name
* <p>
* It also adds a back-reference to the hfile back-reference directory to simplify the
* reference-count and the cleaning process.
* @param conf {@link Configuration} to read for the archive directory name
* @param fs {@link File... | 3.68 |
hbase_MiniZooKeeperCluster_hasValidClientPortInList | /**
* Check whether the client port in a specific position of the client port list is valid.
* @param index the specified position
*/
private boolean hasValidClientPortInList(int index) {
return (clientPortList.size() > index && clientPortList.get(index) > 0);
} | 3.68 |
hbase_HDFSBlocksDistribution_addHostAndBlockWeight | /**
* add some weight to a specific host
* @param host the host name
* @param weight the weight
* @param weightForSsd the weight for ssd
*/
private void addHostAndBlockWeight(String host, long weight, long weightForSsd) {
if (host == null) {
// erroneous data
return;
}
HostAndWeight ho... | 3.68 |
AreaShop_FileManager_saveVersions | /**
* Save the versions file to disk.
*/
public void saveVersions() {
if(!(new File(versionPath).exists())) {
AreaShop.debug("versions file created, this should happen only after installing or upgrading the plugin");
}
try (ObjectOutputStream output = new ObjectOutputStream(new FileOutputStream(versionPath))) {
... | 3.68 |
querydsl_AbstractOracleQuery_connectBy | /**
* CONNECT BY specifies the relationship between parent rows and child rows of the hierarchy.
*
* @param cond condition
* @return the current object
*/
public C connectBy(Predicate cond) {
return addFlag(Position.BEFORE_ORDER, CONNECT_BY, cond);
} | 3.68 |
pulsar_JSONSchema_clearCaches | /**
* Clears the caches tied to the ObjectMapper instances and replaces the singleton ObjectMapper instance.
*
* This can be used in tests to ensure that classloaders and class references don't leak across tests.
*/
public static void clearCaches() {
jsonMapper().getTypeFactory().clearCache();
replaceSingle... | 3.68 |
framework_UIConnector_activateTheme | /**
* Activates the new theme. Assumes the theme has been loaded and taken into
* use in the browser.
*
* @since 7.4.3
* @param newTheme
* The name of the new theme
*/
protected void activateTheme(String newTheme) {
if (activeTheme != null) {
getWidget().getParent().removeStyleName(activeT... | 3.68 |
hbase_QuotaFilter_getTypeFilters | /** Returns the QuotaType types that we want to filter one */
public Set<QuotaType> getTypeFilters() {
return types;
} | 3.68 |
framework_Slot_getHorizontalSpacing | /**
* Get the horizontal amount of pixels of the spacing.
*
* @return the width of the spacing element or zero if this slot doesn't
* have spacing
*/
protected int getHorizontalSpacing() {
if (spacer == null) {
return 0;
} else if (layout.getLayoutManager() != null) {
return layout.... | 3.68 |
hmily_HmilyRepositoryNode_getHmilyParticipantUndoRootPath | /**
* Get hmily participant undo root path.
*
* @return hmily participant undo root path
*/
public String getHmilyParticipantUndoRootPath() {
return Joiner.on("/").join("", ROOT_PATH_PREFIX, appName, HMILY_PARTICIPANT_UNDO);
} | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.