name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hbase_ServerNonceManager_getMvccFromOperationContext | /**
* Return the write point of the previous succeed operation.
* @param group Nonce group.
* @param nonce Nonce.
* @return write point of the previous succeed operation.
*/
public long getMvccFromOperationContext(long group, long nonce) {
if (nonce == HConstants.NO_NONCE) {
return Long.MAX_VALUE;
}
Nonc... | 3.68 |
hbase_StorageClusterStatusModel_getStores | /** Returns the number of stores */
@XmlAttribute
public int getStores() {
return stores;
} | 3.68 |
hbase_ZKUtil_positionToByteArray | /**
* @param position the position to serialize
* @return Serialized protobuf of <code>position</code> with pb magic prefix prepended suitable
* for use as content of an wal position in a replication queue.
*/
public static byte[] positionToByteArray(final long position) {
byte[] bytes = ReplicationProtos... | 3.68 |
hbase_HMaster_decorateMasterConfiguration | /**
* This method modifies the master's configuration in order to inject replication-related features
*/
@InterfaceAudience.Private
public static void decorateMasterConfiguration(Configuration conf) {
String plugins = conf.get(HBASE_MASTER_LOGCLEANER_PLUGINS);
String cleanerClass = ReplicationLogCleaner.class.get... | 3.68 |
hbase_ReplicationSyncUp_listRegionServers | // Find region servers under wal directory
// Here we only care about the region servers which may still be alive, as we need to add
// replications for them if missing. The dead region servers which have already been processed
// fully do not need to add their replication queues again, as the operation has already bee... | 3.68 |
Activiti_SimpleContext_setVariable | /**
* Define a variable.
*/
public ValueExpression setVariable(
String name,
ValueExpression expression
) {
if (variables == null) {
variables = new Variables();
}
return variables.setVariable(name, expression);
} | 3.68 |
hbase_UserProvider_getCurrentUserName | /**
* Returns the userName for the current logged-in user.
* @throws IOException if the underlying user cannot be obtained
*/
public String getCurrentUserName() throws IOException {
User user = getCurrent();
return user == null ? null : user.getName();
} | 3.68 |
hbase_QuotaTableUtil_createDeletesForExistingSnapshotsFromScan | /**
* Returns a list of {@code Delete} to remove all entries returned by the passed scanner.
* @param connection connection to re-use
* @param scan the scanner to use to generate the list of deletes
*/
static List<Delete> createDeletesForExistingSnapshotsFromScan(Connection connection, Scan scan)
throws IOE... | 3.68 |
hadoop_LogAggregationWebUtils_verifyAndGetAppOwner | /**
* Verify and parse the application owner.
* @param html the html
* @param appOwner the Application owner
* @return the appOwner
*/
public static String verifyAndGetAppOwner(Block html, String appOwner) {
if (appOwner == null || appOwner.isEmpty()) {
html.h1().__("Cannot get container logs without an app ... | 3.68 |
morf_OracleDialect_getDeleteLimitWhereClause | /**
* @see SqlDialect#getDeleteLimitWhereClause(int)
*/
@Override
protected Optional<String> getDeleteLimitWhereClause(int limit) {
return Optional.of("ROWNUM <= " + limit);
} | 3.68 |
hadoop_HeaderProcessing_getXAttr | /**
* Get an XAttr name and value for a file or directory.
* @param path Path to get extended attribute
* @param name XAttr name.
* @return byte[] XAttr value or null
* @throws IOException IO failure
*/
public byte[] getXAttr(Path path, String name) throws IOException {
return retrieveHeaders(path, INVOCATION_X... | 3.68 |
flink_CopyOnWriteSkipListStateMap_deleteNodeMeta | /**
* Physically delte the meta of the node, including the node level index, the node key, and
* reduce the total size of the skip list.
*
* @param node node to remove.
* @param prevNode previous node at the level 0.
* @param nextNode next node at the level 0.
* @return value pointer of the node.
*/
private lon... | 3.68 |
morf_AbstractSqlDialectTest_testSelectWithExceptStatement | /**
* Tests the generation of SQL string for a query with EXCEPT operator.
*/
@Test
public void testSelectWithExceptStatement() {
assumeTrue("for dialects with no EXCEPT operation support the test will be skipped.", expectedSelectWithExcept() != null);
SelectStatement stmt = new SelectStatement(new FieldReferenc... | 3.68 |
flink_LinkedOptionalMap_hasAbsentKeysOrValues | /** Checks whether there are entries with absent keys or values. */
public boolean hasAbsentKeysOrValues() {
for (Entry<String, KeyValue<K, V>> entry : underlyingMap.entrySet()) {
if (keyOrValueIsAbsent(entry)) {
return true;
}
}
return false;
} | 3.68 |
hadoop_CommonAuditContext_containsKey | /**
* Does the context contain a specific key?
* @param key key
* @return true if it is in the context.
*/
public boolean containsKey(String key) {
return evaluatedEntries.containsKey(key);
} | 3.68 |
hbase_TableSchemaModel_getAttribute | /**
* Return a table descriptor value as a string. Calls toString() on the object stored in the
* descriptor value map.
* @param name the attribute name
* @return the attribute value
*/
public String getAttribute(String name) {
Object o = attrs.get(new QName(name));
return o != null ? o.toString() : null;
} | 3.68 |
flink_LookupFunctionProvider_of | /** Helper function for creating a static provider. */
static LookupFunctionProvider of(LookupFunction lookupFunction) {
return () -> lookupFunction;
} | 3.68 |
flink_FileSource_forRecordFileFormat | /**
* Builds a new {@code FileSource} using a {@link FileRecordFormat} to read record-by-record
* from a a file path.
*
* <p>A {@code FileRecordFormat} is more general than the {@link StreamFormat}, but also
* requires often more careful parametrization.
*
* @deprecated Please use {@link #forRecordStreamFormat(S... | 3.68 |
hadoop_RMAuthenticationFilter_doFilter | /**
* {@inheritDoc}
*/
@Override
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain filterChain) throws IOException, ServletException {
HttpServletRequest req = (HttpServletRequest) request;
String newHeader =
req.getHeader(DelegationTokenAuthenticator.DELEGATION_TOKEN_HE... | 3.68 |
hadoop_AbfsClientContextBuilder_build | /**
* Build the context and get the instance with the properties selected.
*
* @return an instance of AbfsClientContext.
*/
public AbfsClientContext build() {
//validate the values
return new AbfsClientContext(exponentialRetryPolicy, abfsPerfTracker,
abfsCounters);
} | 3.68 |
dubbo_Proxy_getProxy | /**
* Get proxy.
*
* @param ics interface class array.
* @return Proxy instance.
*/
public static Proxy getProxy(Class<?>... ics) {
if (ics.length > MAX_PROXY_COUNT) {
throw new IllegalArgumentException("interface limit exceeded");
}
// ClassLoader from App Interface should support load some c... | 3.68 |
framework_AsyncPushUpdates_getTestDescription | /*
* (non-Javadoc)
*
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
protected String getTestDescription() {
return "Make sure there are no duplicates on the table.";
} | 3.68 |
hadoop_HistoryServerStateStoreService_serviceStart | /**
* Start the state storage for use
*
* @throws IOException
*/
@Override
public void serviceStart() throws IOException {
startStorage();
} | 3.68 |
hbase_TableSplit_getEndRow | /**
* Returns the end row.
* @return The end row.
*/
public byte[] getEndRow() {
return endRow;
} | 3.68 |
framework_StaticSection_removeCell | /**
* Removes the cell from this section that corresponds to the given
* column id. If there is no such cell, does nothing.
*
* @param columnId
* the id of the column from which to remove the cell
*/
protected void removeCell(String columnId) {
CELL cell = cells.remove(columnId);
if (cell != nu... | 3.68 |
hbase_CacheConfig_enableCacheOnWrite | /**
* Enable cache on write including: cacheDataOnWrite cacheIndexesOnWrite cacheBloomsOnWrite
*/
public void enableCacheOnWrite() {
this.cacheDataOnWrite = true;
this.cacheIndexesOnWrite = true;
this.cacheBloomsOnWrite = true;
} | 3.68 |
hbase_EncryptionTest_testEncryption | /**
* Check that the specified cipher can be loaded and initialized, or throw an exception. Verifies
* key and cipher provider configuration as a prerequisite for cipher verification. Also verifies
* if encryption is enabled globally.
* @param conf HBase configuration
* @param cipher chiper algorith to use for t... | 3.68 |
pulsar_NettyChannelUtil_writeAndFlushWithVoidPromise | /**
* Write and flush the message to the channel.
*
* The promise is an instance of {@link VoidChannelPromise} that properly propagates exceptions up to the pipeline.
* Netty has many ad-hoc optimization if the promise is an instance of {@link VoidChannelPromise}.
* Lastly, it reduces pollution of useless {@link i... | 3.68 |
hbase_LockProcedure_setTimeoutFailure | /**
* Re run the procedure after every timeout to write new WAL entries so we don't hold back old
* WALs.
* @return false, so procedure framework doesn't mark this procedure as failure.
*/
@Override
protected synchronized boolean setTimeoutFailure(final MasterProcedureEnv env) {
synchronized (event) {
if (LOG... | 3.68 |
hadoop_CommitUtilsWithMR_formatJobDir | /**
* Build the name of the job directory, without
* app attempt.
* This is the path to use for cleanup.
* @param jobUUID unique Job ID.
* @return the directory name for the job
*/
public static String formatJobDir(
String jobUUID) {
return JOB_ID_PREFIX + jobUUID;
} | 3.68 |
hadoop_ParsedTaskAttempt_obtainDiagnosticInfo | /**
* @return the diagnostic-info of this task attempt.
* If the attempt is successful, returns null.
*/
public String obtainDiagnosticInfo() {
return diagnosticInfo;
} | 3.68 |
hbase_Result_compareResults | /**
* Does a deep comparison of two Results, down to the byte arrays.
* @param res1 first result to compare
* @param res2 second result to compare
* @param verbose includes string representation for all cells in the exception if true; otherwise
* include rowkey only
* @throws Exception Every ... | 3.68 |
hbase_BackupManager_addIncrementalBackupTableSet | /**
* Adds set of tables to overall incremental backup table set
* @param tables tables
* @throws IOException exception
*/
public void addIncrementalBackupTableSet(Set<TableName> tables) throws IOException {
systemTable.addIncrementalBackupTableSet(tables, backupInfo.getBackupRootDir());
} | 3.68 |
hbase_ScannerContext_incrementBatchProgress | /**
* Progress towards the batch limit has been made. Increment internal tracking of batch progress
*/
void incrementBatchProgress(int batch) {
if (skippingRow) {
return;
}
int currentBatch = progress.getBatch();
progress.setBatch(currentBatch + batch);
} | 3.68 |
hadoop_CosNFileSystem_getScheme | /**
* Return the protocol scheme for the FileSystem.
*
* @return <code>cosn</code>
*/
@Override
public String getScheme() {
return CosNFileSystem.SCHEME;
} | 3.68 |
rocketmq-connect_WorkerErrorRecordReporter_report | /**
* report record
*
* @param record
* @param error
* @return
*/
@Override
public void report(ConnectRecord record, Throwable error) {
RecordPartition partition = record.getPosition().getPartition();
String topic = partition.getPartition().containsKey("topic") ? String.valueOf(partition.getPartition().ge... | 3.68 |
hudi_HoodieWriteHandle_makeWriteToken | /**
* Generate a write token based on the currently running spark task and its place in the spark dag.
*/
private String makeWriteToken() {
return FSUtils.makeWriteToken(getPartitionId(), getStageId(), getAttemptId());
} | 3.68 |
hadoop_RouterAuditLogger_addRemoteIP | /**
* A helper api to add remote IP address.
*/
static void addRemoteIP(StringBuilder b) {
InetAddress ip = Server.getRemoteIp();
// ip address can be null for testcases
if (ip != null) {
add(Keys.IP, ip.getHostAddress(), b);
}
} | 3.68 |
hadoop_AclUtil_isMinimalAcl | /**
* Checks if the given entries represent a minimal ACL (contains exactly 3
* entries).
*
* @param entries List<AclEntry> entries to check
* @return boolean true if the entries represent a minimal ACL
*/
public static boolean isMinimalAcl(List<AclEntry> entries) {
return entries.size() == 3;
} | 3.68 |
pulsar_BinaryProtoLookupService_getBroker | /**
* Calls broker binaryProto-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
*/
public CompletableFuture<Pair<InetSocketAddress, InetSocketAddress>> getBroker(TopicName topicName) {
... | 3.68 |
hudi_AbstractTableFileSystemView_clear | /**
* Clear the resource.
*/
protected void clear() {
addedPartitions.clear();
resetViewState();
bootstrapIndex = null;
} | 3.68 |
hbase_JenkinsHash_hash | /**
* taken from hashlittle() -- hash a variable-length key into a 32-bit value
* @param hashKey the key to extract the bytes for hash algo
* @param initval can be any integer value
* @return a 32-bit value. Every bit of the key affects every bit of the return value. Two keys
* differing by one or two bits... | 3.68 |
morf_HumanReadableStatementProducer_versionCompare | /**
* Compare two version strings. This differs from natural ordering
* as a version of 5.3.27 is higher than 5.3.3.
* @param str1 One version string to compare
* @param str2 The other version string to compare
* @return a negative integer, zero, or a positive integer as the
* first argument is less than,... | 3.68 |
hbase_MobFileCache_openFile | /**
* Opens a mob file.
* @param fs The current file system.
* @param path The file path.
* @param cacheConf The current MobCacheConfig
* @return A opened mob file.
*/
public MobFile openFile(FileSystem fs, Path path, CacheConfig cacheConf) throws IOException {
if (!isCacheEnabled) {
MobFile mob... | 3.68 |
hudi_CachingPath_concatPathUnsafe | // TODO java-doc
public static CachingPath concatPathUnsafe(Path basePath, String relativePath) {
try {
URI baseURI = basePath.toUri();
// NOTE: {@code normalize} is going to be invoked by {@code Path} ctor, so there's no
// point in invoking it here
String resolvedPath = resolveRelativePath(bas... | 3.68 |
flink_NFACompiler_createStartState | /**
* Creates the Start {@link State} of the resulting NFA graph.
*
* @param sinkState the state that Start state should point to (always first state of middle
* states)
* @return created state
*/
@SuppressWarnings("unchecked")
private State<T> createStartState(State<T> sinkState) {
final State<T> beginni... | 3.68 |
flink_Predicates_arePublicStaticOfType | /**
* Tests that the given field is {@code public static} and has the fully qualified type name of
* {@code fqClassName}.
*
* <p>Attention: changing the description will add a rule into the stored.rules.
*/
public static DescribedPredicate<JavaField> arePublicStaticOfType(String fqClassName) {
return areFieldO... | 3.68 |
flink_FlinkContainers_getJobManagerHost | /** Gets JobManager's hostname on the host machine. */
public String getJobManagerHost() {
return jobManager.getHost();
} | 3.68 |
hadoop_NamenodeStatusReport_getHighestPriorityLowRedundancyReplicatedBlocks | /**
* Gets the total number of replicated low redundancy blocks on the cluster
* with the highest risk of loss.
*
* @return the total number of low redundancy blocks on the cluster
* with the highest risk of loss.
*/
public long getHighestPriorityLowRedundancyReplicatedBlocks() {
return this.highestPriorityLowR... | 3.68 |
hadoop_SinglePendingCommit_bindCommitData | /**
* Set the commit data.
* @param parts ordered list of etags.
* @throws ValidationFailure if the data is invalid
*/
public void bindCommitData(List<CompletedPart> parts) throws ValidationFailure {
etags = new ArrayList<>(parts.size());
int counter = 1;
for (CompletedPart part : parts) {
verify(part.par... | 3.68 |
rocketmq-connect_WorkerSinkTaskContext_configs | /**
* Get the configurations of current task.
*
* @return the configuration of current task.
*/
@Override
public KeyValue configs() {
return taskConfig;
} | 3.68 |
hadoop_AbstractRESTRequestInterceptor_getNextInterceptor | /**
* Gets the next {@link RESTRequestInterceptor} in the chain.
*/
@Override
public RESTRequestInterceptor getNextInterceptor() {
return this.nextInterceptor;
} | 3.68 |
flink_AllWindowedStream_process | /**
* Applies the given window function to each window. The window function is called for each
* evaluation of the window. The output of the window function is interpreted as a regular
* non-windowed stream.
*
* <p>Note that this function requires that all data in the windows is buffered until the window
* is eva... | 3.68 |
flink_BuiltInFunctionDefinition_version | /**
* Specifies a version that will be persisted in the plan together with the function's name.
* The default version is 1 for non-internal functions.
*
* <p>Note: Internal functions don't need to specify a version as we enforce a unique name
* that includes a version (see {@link #name(String)}).
*/
public Builde... | 3.68 |
rocketmq-connect_ConnectorPluginsResource_listPlugins | /**
* list connector plugins
*
* @param context
* @return
*/
public void listPlugins(Context context) {
synchronized (this) {
context.json(new HttpResponse<>(context.status(), Collections.unmodifiableList(connectorPlugins)));
}
} | 3.68 |
hadoop_S3ClientFactory_getMultiPartThreshold | /**
* Get the threshold for multipart operations.
* @return multipart threshold
*/
public long getMultiPartThreshold() {
return multiPartThreshold;
} | 3.68 |
pulsar_ProtocolHandlerUtils_load | /**
* Load the protocol handler according to the handler definition.
*
* @param metadata the protocol handler definition.
* @return
*/
static ProtocolHandlerWithClassLoader load(ProtocolHandlerMetadata metadata,
String narExtractionDirectory) throws IOException {
fina... | 3.68 |
morf_DataSetConnectorMultiThreaded_run | /**
* Cryo-s the table with the name given in the constructor from the producer to
* the consumer.
*/
@Override
public void run() {
consumer.table(producer.getSchema().getTable(tableName), producer.records(tableName));
} | 3.68 |
framework_VScrollTable_getNavigationEndKey | /**
* Get the key the moves the selection to the end of the table. By default
* this is the End key but by overriding this you can change the key to
* whatever you want.
*
* @return
*/
protected int getNavigationEndKey() {
return KeyCodes.KEY_END;
} | 3.68 |
hbase_MasterObserver_postRestoreSnapshot | /**
* Called after a snapshot restore 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 TableDescriptor of the t... | 3.68 |
framework_AbstractMedia_addSource | /**
* Adds an alternative media file to the sources list. Which of the sources
* is used is selected by the browser depending on which file formats it
* supports. See
* <a href="http://en.wikipedia.org/wiki/HTML5_video#Table">wikipedia</a>
* for a table of formats supported by different browsers.
*
* @param sour... | 3.68 |
zxing_FinderPatternFinder_foundPatternCross | /**
* @param stateCount count of black/white/black/white/black pixels just read
* @return true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios
* used by finder patterns to be considered a match
*/
protected static boolean foundPatternCross(int[] stateCount) {
int totalModuleSize ... | 3.68 |
hbase_KeyValueUtil_previousKey | /**
* Decrement the timestamp. For tests (currently wasteful) Remember timestamps are sorted reverse
* chronologically.
* @return previous key
*/
public static KeyValue previousKey(final KeyValue in) {
return createFirstOnRow(CellUtil.cloneRow(in), CellUtil.cloneFamily(in),
CellUtil.cloneQualifier(in), in.get... | 3.68 |
hbase_OrderedBytes_decodeNumericAsBigDecimal | /**
* Decode a {@link BigDecimal} value from the variable-length encoding.
* @throws IllegalArgumentException when the encoded value is not a Numeric.
* @see #encodeNumeric(PositionedByteRange, BigDecimal, Order)
*/
public static BigDecimal decodeNumericAsBigDecimal(PositionedByteRange src) {
if (isNull(src)) {
... | 3.68 |
framework_BootstrapFragmentResponse_getFragmentNodes | /**
* Gets the list of DOM nodes that will be used to generate the fragment
* HTML. Changes to the returned list will be reflected in the generated
* HTML.
*
* @return the current list of DOM nodes that makes up the application
* fragment
*/
public List<Node> getFragmentNodes() {
return fragmentNodes... | 3.68 |
hudi_BaseHoodieLogRecordReader_scanInternal | /**
* @param keySpecOpt specifies target set of keys to be scanned
* @param skipProcessingBlocks controls, whether (delta) blocks have to actually be processed
*/
protected final void scanInternal(Option<KeySpec> keySpecOpt, boolean skipProcessingBlocks) {
synchronized (this) {
if (enableOptimizedLog... | 3.68 |
MagicPlugin_CompoundAction_addAction | // These are here for legacy spell support
// via programmatic action building
public void addAction(SpellAction action) {
addAction(action, null);
} | 3.68 |
flink_AfterMatchSkipStrategy_prune | /**
* Prunes matches/partial matches based on the chosen strategy.
*
* @param matchesToPrune current partial matches
* @param matchedResult already completed matches
* @param sharedBufferAccessor accessor to corresponding shared buffer
* @throws Exception thrown if could not access the state
*/
public void prune... | 3.68 |
hbase_TableDescriptorBuilder_getColumnFamilyNames | /**
* Returns all the column family names of the current table. The map of TableDescriptor contains
* mapping of family name to ColumnFamilyDescriptor. This returns all the keys of the family map
* which represents the column family names of the table.
* @return Immutable sorted set of the keys of the families.
*/... | 3.68 |
druid_SQLASTOutputVisitor_visit | ///////////// for odps & hive
@Override
public boolean visit(SQLLateralViewTableSource x) {
SQLTableSource tableSource = x.getTableSource();
if (tableSource != null) {
tableSource.accept(this);
}
this.indentCount++;
println();
print0(ucase ? "LATERAL VIEW " : "lateral view ");
if (... | 3.68 |
flink_ManagedTableListener_notifyTableCompaction | /** Notify compaction for managed table. */
public Map<String, String> notifyTableCompaction(
@Nullable Catalog catalog,
ObjectIdentifier identifier,
ResolvedCatalogBaseTable<?> table,
CatalogPartitionSpec partitionSpec,
boolean isTemporary) {
if (isManagedTable(catalog, tabl... | 3.68 |
flink_Tuple20_equals | /**
* Deep equality for tuples by calling equals() on the tuple members.
*
* @param o the object checked for equality
* @return true if this is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Tuple20)) {
return false;
}
... | 3.68 |
hudi_OptionsResolver_isConsistentLogicalTimestampEnabled | /**
* Returns whether consistent value will be generated for a logical timestamp type column.
*/
public static boolean isConsistentLogicalTimestampEnabled(Configuration conf) {
return conf.getBoolean(KeyGeneratorOptions.KEYGENERATOR_CONSISTENT_LOGICAL_TIMESTAMP_ENABLED.key(),
Boolean.parseBoolean(KeyGenerator... | 3.68 |
flink_PojoComparator_accessField | /** This method is handling the IllegalAccess exceptions of Field.get() */
public final Object accessField(Field field, Object object) {
try {
object = field.get(object);
} catch (NullPointerException npex) {
throw new NullKeyFieldException(
"Unable to access field " + field + " ... | 3.68 |
hbase_Operation_toMap | /**
* Produces a Map containing a full summary of a query.
* @return a map containing parameters of a query (i.e. rows, columns...)
*/
public Map<String, Object> toMap() {
return toMap(DEFAULT_MAX_COLS);
} | 3.68 |
hudi_HoodieCLI_getTableMetaClient | /**
* Get tableMetadata, throw NullPointerException when it is null.
*
* @return tableMetadata which is instance of HoodieTableMetaClient
*/
public static HoodieTableMetaClient getTableMetaClient() {
if (tableMetadata == null) {
throw new NullPointerException("There is no hudi table. Please use connect comman... | 3.68 |
framework_TableElement_getRow | /**
* Return table row element by zero-based index.
*
* @return table row element by zero-based index
*/
public TableRowElement getRow(int row) {
TestBenchElement rowElem = wrapElement(
findElement(By.vaadin("#row[" + row + "]")),
getCommandExecutor());
return rowElem.wrap(TableRowEl... | 3.68 |
MagicPlugin_MagicController_hasPermission | // Note that this version doesn't work with mob permissions
@Override
@Deprecated
public boolean hasPermission(CommandSender sender, String pNode, boolean defaultValue) {
if (!(sender instanceof Player)) return true;
return hasPermission((Player) sender, pNode);
} | 3.68 |
hadoop_AzureNativeFileSystemStore_normalizeKey | /**
* This private method normalizes the key by stripping the container name from
* the path and returns a path relative to the root directory of the
* container.
*
* @param directory
* - adjust the key to this directory to a path relative to the root
* directory
*
* @returns normKey
*/
priv... | 3.68 |
querydsl_Expressions_currentDate | /**
* Create an expression representing the current date as a DateExpression instance
*
* @return current date
*/
public static DateExpression<Date> currentDate() {
return DateExpression.currentDate();
} | 3.68 |
framework_ListenerMethod_matches | /**
* Checks if the given object, event and method match with the ones stored
* in this listener.
*
* @param target
* the object to be matched against the object stored by this
* listener.
* @param eventType
* the type to be tested for equality against the type stored by
* ... | 3.68 |
hadoop_AzureNativeFileSystemStore_initialize | /**
* Method for the URI and configuration object necessary to create a storage
* session with an Azure session. It parses the scheme to ensure it matches
* the storage protocol supported by this file system.
*
* @param uri - URI for target storage blob.
* @param conf - reference to configuration object.
* @para... | 3.68 |
flink_TaskStateStats_getStateSize | /** @return Total checkpoint state size over all subtasks. */
public long getStateSize() {
return summaryStats.getStateSizeStats().getSum();
} | 3.68 |
flink_FlinkContainersSettings_getDefaultCheckpointPath | /**
* Gets default checkpoint path.
*
* @return The default checkpoint path.
*/
public static String getDefaultCheckpointPath() {
return DEFAULT_CHECKPOINT_PATH;
} | 3.68 |
hbase_MultiByteBuff_toBytes | /**
* Copy the content from this MBB to a byte[] based on the given offset and length the position
* from where the copy should start the length upto which the copy has to be done
* @return byte[] with the copied contents from this MBB.
*/
@Override
public byte[] toBytes(int offset, int length) {
checkRefCount();... | 3.68 |
hbase_MasterObserver_postGrant | /**
* Called after granting user permissions.
* @param ctx the coprocessor instance's environment
* @param userPermission the user and permissions
* @param mergeExistingPermissions True if merge with previous granted permissions
*/
default void postGrant(ObserverContext<MasterCoproce... | 3.68 |
hadoop_Error_message | /**
**/
public Error message(String message) {
this.message = message;
return this;
} | 3.68 |
pulsar_ResourceUsageTopicTransportManager_registerResourceUsageConsumer | /*
* Register a resource owner (resource-group, tenant, namespace, topic etc).
*
* @param resource usage consumer
*/
public void registerResourceUsageConsumer(ResourceUsageConsumer r) {
consumerMap.put(r.getID(), r);
} | 3.68 |
hbase_ProcedureStoreTracker_setDeletedIfDeletedByThem | /**
* For the global tracker, we will use this method to build the holdingCleanupTracker, as the
* modified flags will be cleared after rolling so we only need to test the deleted flags.
* @see #setDeletedIfModifiedInBoth(ProcedureStoreTracker)
*/
public void setDeletedIfDeletedByThem(ProcedureStoreTracker tracker)... | 3.68 |
morf_ConnectionResources_setFetchSizeForBulkSelects | /**
* Sets the JDBC Fetch Size to use when performing bulk select operations, intended to replace the default in {@link SqlDialect#fetchSizeForBulkSelects()}.
* The default behaviour for this method is interpreted as not setting the value.
* @param fetchSizeForBulkSelects the JDBC fetch size to use.
*/
public defau... | 3.68 |
querydsl_AbstractLuceneQuery_load | /**
* Load only the fields of the given paths
*
* @param paths fields to load
* @return the current object
*/
@SuppressWarnings("unchecked")
public Q load(Path<?>... paths) {
List<String> fields = new ArrayList<String>(paths.length);
for (Path<?> path : paths) {
fields.add(serializer.toField(path))... | 3.68 |
hadoop_FsAction_or | /**
* OR operation.
* @param that FsAction that.
* @return FsAction.
*/
public FsAction or(FsAction that) {
return vals[ordinal() | that.ordinal()];
} | 3.68 |
hbase_BulkLoadHFilesTool_getRegionIndex | /**
* @param startEndKeys the start/end keys of regions belong to this table, the list in ascending
* order by start key
* @param key the key need to find which region belong to
* @return region index
*/
private int getRegionIndex(List<Pair<byte[], byte[]>> startEndKeys, byte[] key) {
... | 3.68 |
flink_OperatorCoordinator_notifyCheckpointAborted | /**
* We override the method here to remove the checked exception. Please check the Java docs of
* {@link CheckpointListener#notifyCheckpointAborted(long)} for more detail semantic of the
* method.
*/
@Override
default void notifyCheckpointAborted(long checkpointId) {} | 3.68 |
flink_RocksDBMemoryConfiguration_getHighPriorityPoolRatio | /**
* Gets the fraction of the total memory to be used for high priority blocks like indexes,
* dictionaries, etc. This only has an effect is either {@link #setUseManagedMemory(boolean)} or
* {@link #setFixedMemoryPerSlot(MemorySize)} are set.
*
* <p>See {@link RocksDBOptions#HIGH_PRIORITY_POOL_RATIO} for details.... | 3.68 |
druid_StatViewServlet_initJmxConn | /**
* 初始化jmx连接
*
* @throws IOException
*/
private void initJmxConn() throws IOException {
if (jmxUrl != null) {
JMXServiceURL url = new JMXServiceURL(jmxUrl);
Map<String, String[]> env = null;
if (jmxUsername != null) {
env = new HashMap<String, String[]>();
Strin... | 3.68 |
flink_AsynchronousBlockWriterWithCallback_writeBlock | /**
* Issues a asynchronous write request to the writer.
*
* @param segment The segment to be written.
* @throws IOException Thrown, when the writer encounters an I/O error. Due to the asynchronous
* nature of the writer, the exception thrown here may have been caused by an earlier write
* request.
*/
@O... | 3.68 |
hudi_HoodieTableMetadataUtil_getPartitionLatestMergedFileSlices | /**
* Get the latest file slices for a Metadata Table partition. If the file slice is
* because of pending compaction instant, then merge the file slice with the one
* just before the compaction instant time. The list of file slices returned is
* sorted in the correct order of file group name.
*
* @param metaClie... | 3.68 |
hadoop_AbfsOutputStream_failureWhileSubmit | /**
* A method to set the lastError if an exception is caught.
* @param ex Exception caught.
* @throws IOException Throws the lastError.
*/
private void failureWhileSubmit(Exception ex) throws IOException {
if (ex instanceof AbfsRestOperationException) {
if (((AbfsRestOperationException) ex).getStatusCode()
... | 3.68 |
hadoop_AzureBlobFileSystem_incrementStatistic | /**
* Method for incrementing AbfsStatistic by a long value.
*
* @param statistic the Statistic to be incremented.
*/
private void incrementStatistic(AbfsStatistic statistic) {
if (abfsCounters != null) {
abfsCounters.incrementCounter(statistic, 1);
}
} | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.