name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
flink_FieldAccessor_getFieldType | /**
* Gets the TypeInformation for the type of the field. Note: For an array of a primitive type,
* it returns the corresponding basic type (Integer for int[]).
*/
@SuppressWarnings("unchecked")
public TypeInformation<F> getFieldType() {
return fieldType;
} | 3.68 |
framework_VTabsheetBase_setClient | /**
* For internal use only. May be removed or replaced in the future.
*
* @param client
* the current application connection instance
*/
public void setClient(ApplicationConnection client) {
this.client = client;
} | 3.68 |
graphhopper_FootAccessParser_getAccess | /**
* Some ways are okay but not separate for pedestrians.
*/
public WayAccess getAccess(ReaderWay way) {
String highwayValue = way.getTag("highway");
if (highwayValue == null) {
WayAccess acceptPotentially = WayAccess.CAN_SKIP;
if (FerrySpeedCalculator.isFerry(way)) {
String foot... | 3.68 |
hbase_CoprocessorClassLoader_clearCache | // This method is used in unit test
public static void clearCache() {
classLoadersCache.clear();
} | 3.68 |
pulsar_PublicSuffixMatcher_matches | /**
* Tests whether the given domain matches any of entry from the public suffix list.
*
* @param domain
* @param expectedType expected domain type or {@code null} if any.
* @return {@code true} if the given domain matches any of the public suffixes.
*
* @since 4.5
*/
public boolean matches(final String domain,... | 3.68 |
hbase_CellSetModel_addRow | /**
* Add a row to this cell set
* @param row the row
*/
public void addRow(RowModel row) {
rows.add(row);
} | 3.68 |
framework_VDateField_setCurrentLocale | /**
* Sets the locale String.
*
* @param currentLocale
* the new locale String.
*/
public void setCurrentLocale(String currentLocale) {
this.currentLocale = currentLocale;
} | 3.68 |
hadoop_AdminACLsManager_getOwner | /**
* Returns the owner
*
* @return Current user at the time of object creation
*/
public UserGroupInformation getOwner() {
return owner;
} | 3.68 |
hbase_Bytes_readByteArray | /**
* Read byte-array written with a WritableableUtils.vint prefix.
* @param in Input to read from.
* @return byte array read off <code>in</code>
* @throws IOException e
*/
public static byte[] readByteArray(final DataInput in) throws IOException {
int len = WritableUtils.readVInt(in);
if (len < 0) {
throw... | 3.68 |
querydsl_MetaDataExporter_setExportForeignKeys | /**
* Set whether foreign keys should be exported
*
* @param exportForeignKeys
*/
public void setExportForeignKeys(boolean exportForeignKeys) {
this.exportForeignKeys = exportForeignKeys;
} | 3.68 |
hbase_RegionHDFSBlockLocationFinder_getDescriptor | /**
* return TableDescriptor for a given tableName
* @param tableName the table name
*/
private TableDescriptor getDescriptor(TableName tableName) throws IOException {
ClusterInfoProvider service = this.provider;
if (service == null) {
return null;
}
return service.getTableDescriptor(tableName);
} | 3.68 |
framework_PropertysetItem_addListener | /**
* @deprecated As of 7.0, replaced by
* {@link #addPropertySetChangeListener(Item.PropertySetChangeListener)}
*/
@Override
@Deprecated
public void addListener(Item.PropertySetChangeListener listener) {
addPropertySetChangeListener(listener);
} | 3.68 |
hadoop_ResourceUsageMatcher_getProgress | /**
* Returns the average progress.
*/
@Override
public float getProgress() {
if (emulationPlugins.size() > 0) {
// return the average progress
float progress = 0f;
for (ResourceUsageEmulatorPlugin emulator : emulationPlugins) {
// consider weighted progress of each emulator
progress += emul... | 3.68 |
framework_DragSourceExtension_setDataTransferData | /**
* Sets data for this drag source element with the given type. The data is
* set for the client side draggable element using {@code
* DataTransfer.setData(type, data)} method.
* <p>
* Note that {@code "text"} is the only cross browser supported data type.
* Use {@link #setDataTransferText(String)} method inste... | 3.68 |
hbase_SimpleRpcServerResponder_doRespond | //
// Enqueue a response from the application.
//
void doRespond(SimpleServerRpcConnection conn, RpcResponse resp) throws IOException {
boolean added = false;
// If there is already a write in progress, we don't wait. This allows to free the handlers
// immediately for other tasks.
if (conn.responseQueue.isEmpt... | 3.68 |
dubbo_LFUCache_proceedEviction | /**
* Evicts less frequently used elements corresponding to eviction factor,
* specified at instantiation step.
*
* @return number of evicted elements
*/
private int proceedEviction() {
int targetSize = capacity - evictionCount;
int evictedElements = 0;
FREQ_TABLE_ITER_LOOP:
for (int i = 0; i <= c... | 3.68 |
hadoop_CredentialProviderListFactory_buildAWSProviderList | /**
* Load list of AWS credential provider/credential provider factory classes;
* support a forbidden list to prevent loops, mandate full secrets, etc.
* @param binding Binding URI -may be null
* @param conf configuration
* @param key configuration key to use
* @param forbidden a possibly empty set of forbidden c... | 3.68 |
framework_AbstractLegacyComponent_isReadOnly | /**
* Tests whether the component is in the read-only mode. The user can not
* change the value of a read-only component. As only {@code AbstractField}
* or {@code LegacyField} components normally have a value that can be input
* or changed by the user, this is mostly relevant only to field components,
* though no... | 3.68 |
hadoop_RateLimitingFactory_unlimitedRate | /**
* Get the unlimited rate.
* @return a rate limiter which always has capacity.
*/
public static RateLimiting unlimitedRate() {
return UNLIMITED;
} | 3.68 |
querydsl_SQLExpressions_avg | /**
* Start a window function expression
*
* @param expr expression
* @return avg(expr)
*/
public static <T extends Number> WindowOver<T> avg(Expression<T> expr) {
return new WindowOver<T>(expr.getType(), Ops.AggOps.AVG_AGG, expr);
} | 3.68 |
hudi_GenericRecordPartialPayloadGenerator_validate | // Atleast 1 entry should be null
private boolean validate(Object object) {
if (object == null) {
return true;
} else if (object instanceof GenericRecord) {
for (Schema.Field field : ((GenericRecord) object).getSchema().getFields()) {
boolean ret = validate(((GenericRecord) object).get(field.name()));... | 3.68 |
framework_GridLayout_getColumn1 | /**
* Gets the column of the top-left corner cell.
*
* @return the column of the top-left corner cell.
*/
public int getColumn1() {
return childData.column1;
} | 3.68 |
hadoop_NativeAzureFileSystemHelper_checkForAzureStorageException | /*
* Helper method to recursively check if the cause of the exception is
* a Azure storage exception.
*/
public static Throwable checkForAzureStorageException(Exception e) {
Throwable innerException = e.getCause();
while (innerException != null
&& !(innerException instanceof StorageException)) {
... | 3.68 |
flink_Costs_getHeuristicNetworkCost | /**
* Gets the heuristic network cost.
*
* @return The heuristic network cost, in bytes to be transferred.
*/
public double getHeuristicNetworkCost() {
return this.heuristicNetworkCost;
} | 3.68 |
flink_JobGraphGenerator_preVisit | /**
* This methods implements the pre-visiting during a depth-first traversal. It create the job
* vertex and sets local strategy.
*
* @param node The node that is currently processed.
* @return True, if the visitor should descend to the node's children, false if not.
* @see org.apache.flink.util.Visitor#preVisit... | 3.68 |
framework_WindowElement_getCaption | /**
* @return the caption of the window
*/
@Override
public String getCaption() {
return findElement(By.className(HEADER_CLASS)).getText();
} | 3.68 |
hbase_AsyncTableBuilder_setMaxRetries | /**
* Set the max retry times for an operation. Usually it is the max attempt times minus 1.
* <p>
* Operation timeout and max attempt times(or max retry times) are both limitations for retrying,
* we will stop retrying when we reach any of the limitations.
* @see #setMaxAttempts(int)
* @see #setOperationTimeout(... | 3.68 |
morf_HumanReadableStatementProducer_removeColumn | /** @see org.alfasoftware.morf.upgrade.SchemaEditor#removeColumn(java.lang.String, org.alfasoftware.morf.metadata.Column) **/
@Override
public void removeColumn(String tableName, Column definition) {
consumer.schemaChange(HumanReadableStatementHelper.generateRemoveColumnString(tableName, definition));
} | 3.68 |
hbase_RegionInfo_toByteArray | /**
* Returns This instance serialized as protobuf w/ a magic pb prefix.
* @see #parseFrom(byte[])
*/
static byte[] toByteArray(RegionInfo ri) {
byte[] bytes = ProtobufUtil.toRegionInfo(ri).toByteArray();
return ProtobufUtil.prependPBMagic(bytes);
} | 3.68 |
flink_BulkPartialSolutionNode_getOperator | /**
* Gets the operator (here the {@link PartialSolutionPlaceHolder}) that is represented by this
* optimizer node.
*
* @return The operator represented by this optimizer node.
*/
@Override
public PartialSolutionPlaceHolder<?> getOperator() {
return (PartialSolutionPlaceHolder<?>) super.getOperator();
} | 3.68 |
framework_ComputedStyle_getBoxSizing | /**
* Returns the value of the boxSizing property.
*
* @return the value of the boxSizing property
*/
private String getBoxSizing() {
return getProperty("boxSizing");
} | 3.68 |
flink_GenericDataSinkBase_getUserCodeWrapper | /**
* Gets the class describing the output format.
*
* <p>This method is basically identical to {@link #getFormatWrapper()}.
*
* @return The class describing the output format.
* @see org.apache.flink.api.common.operators.Operator#getUserCodeWrapper()
*/
@Override
public UserCodeWrapper<? extends OutputFormat<IN... | 3.68 |
pulsar_BrokerInterceptors_load | /**
* Load the broker event interceptor for the given <tt>interceptor</tt> list.
*
* @param conf the pulsar broker service configuration
* @return the collection of broker event interceptor
*/
public static BrokerInterceptor load(ServiceConfiguration conf) throws IOException {
BrokerInterceptorDefinitions defi... | 3.68 |
framework_MultiSelect_deselectAll | /**
* Deselects all currently selected items.
*/
public default void deselectAll() {
getSelectedItems().forEach(this::deselect);
} | 3.68 |
framework_AbstractRemoteDataSource_dropFromCache | /**
* Drop the given range of rows from this data source's cache.
*
* @param range
* the range of rows to drop
*/
protected void dropFromCache(Range range) {
for (int i = range.getStart(); i < range.getEnd(); i++) {
// Called after dropping from cache. Dropped row is passed as a
// p... | 3.68 |
hadoop_AbfsTokenRenewer_cancel | /**
* Cancel the delegation token.
*
* @param token token to cancel.
* @param conf configuration object.
* @throws IOException thrown when trying get current user.
* @throws InterruptedException thrown when thread is interrupted.
*/
@Override
public void cancel(final Token<?> token, Configuration conf)... | 3.68 |
hbase_ModeStrategyUtils_aggregateRecords | /**
* Group by records on the basis of supplied groupBy field and Aggregate records using
* {@link Record#combine(Record)}
* @param records records needs to be processed
* @param groupBy Field to be used for group by
* @return aggregated records
*/
public static List<Record> aggregateRecords(List<Record> records,... | 3.68 |
flink_SqlResourceType_symbol | /**
* Creates a parse-tree node representing an occurrence of this keyword at a particular position
* in the parsed text.
*/
public SqlLiteral symbol(SqlParserPos pos) {
return SqlLiteral.createSymbol(this, pos);
} | 3.68 |
flink_ExpressionConverter_extractValue | /**
* Extracts a value from a literal. Including planner-specific instances such as {@link
* DecimalData}.
*/
@SuppressWarnings("unchecked")
public static <T> T extractValue(ValueLiteralExpression literal, Class<T> clazz) {
final Optional<Object> possibleObject = literal.getValueAs(Object.class);
if (!possib... | 3.68 |
flink_AdvancedFunctionsExample_executeLastDatedValueFunction | /**
* Aggregates data by name and returns the latest non-null {@code item_count} value with its
* corresponding {@code order_date}.
*/
private static void executeLastDatedValueFunction(TableEnvironment env) {
// create a table with example data
final Table customers =
env.fromValues(
... | 3.68 |
hibernate-validator_BeanMetaDataManagerImpl_getAnnotationProcessingOptionsFromNonDefaultProviders | /**
* @return returns the annotation ignores from the non annotation based meta data providers
*/
private AnnotationProcessingOptions getAnnotationProcessingOptionsFromNonDefaultProviders(List<MetaDataProvider> optionalMetaDataProviders) {
AnnotationProcessingOptions options = new AnnotationProcessingOptionsImpl();
... | 3.68 |
framework_FilesystemContainer_getParent | /*
* Gets the parent item of the specified Item. Don't add a JavaDoc comment
* here, we use the default documentation from implemented interface.
*/
@Override
public Object getParent(Object itemId) {
if (!(itemId instanceof File)) {
return null;
}
return ((File) itemId).getParentFile();
} | 3.68 |
hadoop_GPGPoliciesBlock_policyWeight2String | /**
* We will convert the PolicyWeight to string format.
*
* @param weights PolicyWeight.
* @return string format PolicyWeight. example: SC-1:0.91, SC-2:0.09
*/
private String policyWeight2String(Map<SubClusterIdInfo, Float> weights) {
StringBuilder sb = new StringBuilder();
for (Map.Entry<SubClusterIdInfo, Fl... | 3.68 |
pulsar_MessageUtils_messageConverter | /**
* Message convert to FlatMessage.
*
* @param message
* @return FlatMessage List
*/
public static List<FlatMessage> messageConverter(Message message) {
try {
if (message == null) {
return null;
}
List<FlatMessage> flatMessages = new ArrayList<>();
List<CanalEntry... | 3.68 |
querydsl_GenericExporter_setHandleFields | /**
* Set whether fields are handled (default true)
*
* @param b
* @deprecated Use {@link #setPropertyHandling(PropertyHandling)} instead
*/
@Deprecated
public void setHandleFields(boolean b) {
handleFields = b;
setPropertyHandling();
} | 3.68 |
pulsar_BrokerService_isAllowAutoSubscriptionCreation | /**
* @deprecated Avoid using the deprecated method
* #{@link org.apache.pulsar.broker.resources.NamespaceResources#getPoliciesIfCached(NamespaceName)} and blocking
* call. we can use #{@link BrokerService#isAllowAutoSubscriptionCreationAsync(TopicName)} to instead of it.
*/
@Deprecated
public boolean isAllowAutoSu... | 3.68 |
hbase_RegionMover_writeFile | /**
* Write the number of regions moved in the first line followed by regions moved in subsequent
* lines
*/
private void writeFile(String filename, List<RegionInfo> movedRegions) throws IOException {
try (DataOutputStream dos =
new DataOutputStream(new BufferedOutputStream(new FileOutputStream(filename)))) {
... | 3.68 |
hbase_CreateNamespaceProcedure_setNamespaceQuota | /**
* Set quota for the namespace
* @param env MasterProcedureEnv
* @param nsDescriptor NamespaceDescriptor
**/
private static void setNamespaceQuota(final MasterProcedureEnv env,
final NamespaceDescriptor nsDescriptor) throws IOException {
if (env.getMasterServices().isInitialized()) {
env.getMast... | 3.68 |
flink_ExecNodeContext_resetIdCounter | /** Reset the id counter to 0. */
@VisibleForTesting
public static void resetIdCounter() {
idCounter.set(0);
} | 3.68 |
flink_Table_limit | /**
* Limits a (possibly sorted) result to the first n rows from an offset position.
*
* <p>This method is a synonym for {@link #offset(int)} followed by {@link #fetch(int)}.
*/
default Table limit(int offset, int fetch) {
return offset(offset).fetch(fetch);
} | 3.68 |
hadoop_AllocateResponse_allocatedContainers | /**
* Set the <code>allocatedContainers</code> of the response.
* @see AllocateResponse#setAllocatedContainers(List)
* @param allocatedContainers
* <code>allocatedContainers</code> of the response
* @return {@link AllocateResponseBuilder}
*/
@Private
@Unstable
public AllocateResponseBuilder allocatedContainer... | 3.68 |
hadoop_MawoConfiguration_getWorkerWorkSpace | /**
* Get worker work space.
* @return value of worker.workspace
*/
public String getWorkerWorkSpace() {
return configsMap.get(WORKER_WORK_SPACE);
} | 3.68 |
hbase_MemStoreLABImpl_close | /**
* Close this instance since it won't be used any more, try to put the chunks back to pool
*/
@Override
public void close() {
if (!this.closed.compareAndSet(false, true)) {
return;
}
// We could put back the chunks to pool for reusing only when there is no
// opening scanner which will read their data
... | 3.68 |
hbase_CommonFSUtils_logFSTree | /**
* Recursive helper to log the state of the FS
* @see #logFileSystemState(FileSystem, Path, Logger)
*/
private static void logFSTree(Logger log, final FileSystem fs, final Path root, String prefix)
throws IOException {
FileStatus[] files = listStatus(fs, root, null);
if (files == null) {
return;
}
... | 3.68 |
hudi_OptionsResolver_isAppendMode | /**
* Returns whether the insert is clustering disabled with given configuration {@code conf}.
*/
public static boolean isAppendMode(Configuration conf) {
// 1. inline clustering is supported for COW table;
// 2. async clustering is supported for both COW and MOR table
return isInsertOperation(conf) && ((isCowT... | 3.68 |
hadoop_BlockBlobAppendStream_generateBlockId | /**
* Helper method that generates the next block id for uploading a block to
* azure storage.
* @return String representing the block ID generated.
* @throws IOException if the stream is in invalid state
*/
private String generateBlockId() throws IOException {
if (nextBlockCount == UNSET_BLOCKS_COUNT || blockI... | 3.68 |
flink_StateUtil_bestEffortDiscardAllStateObjects | /**
* Iterates through the passed state handles and calls discardState() on each handle that is not
* null. All occurring exceptions are suppressed and collected until the iteration is over and
* emitted as a single exception.
*
* @param handlesToDiscard State handles to discard. Passed iterable is allowed to deli... | 3.68 |
shardingsphere-elasticjob_RDBTracingStorageConfiguration_createDataSource | /**
* Create data source.
*
* @return data source
*/
@SuppressWarnings({"unchecked", "rawtypes"})
@SneakyThrows(ReflectiveOperationException.class)
public DataSource createDataSource() {
DataSource result = (DataSource) Class.forName(dataSourceClassName).getConstructor().newInstance();
Method[] methods = re... | 3.68 |
framework_AbstractOrderedLayout_isSpacing | /*
* (non-Javadoc)
*
* @see com.vaadin.ui.Layout.SpacingHandler#isSpacing()
*/
@Override
public boolean isSpacing() {
return getState(false).spacing;
} | 3.68 |
pulsar_FieldParser_integerToString | /**
* Converts Integer to String.
*
* @param value
* The Integer to be converted.
* @return The converted String value.
*/
public static String integerToString(Integer value) {
return value.toString();
} | 3.68 |
hudi_AvroSchemaCompatibility_getMessage | /**
* Returns a human-readable message with more details about what failed. Syntax
* depends on the SchemaIncompatibilityType.
*
* @return a String with details about the incompatibility.
* @see #getType()
*/
public String getMessage() {
return mMessage;
} | 3.68 |
hbase_AbstractRpcClient_cancelConnections | /**
* Interrupt the connections to the given ip:port server. This should be called if the server is
* known as actually dead. This will not prevent current operation to be retried, and, depending
* on their own behavior, they may retry on the same server. This can be a feature, for example at
* startup. In any case... | 3.68 |
morf_AbstractSqlDialectTest_likeEscapeSuffix | /**
* On some databases our string literals need suffixing with explicit escape
* character key word.
*
* @return suffix to insert after quoted string literal.
*/
protected String likeEscapeSuffix() {
return " ESCAPE '\\'";
} | 3.68 |
hadoop_CommitUtilsWithMR_formatAppAttemptDir | /**
* Build the name of the job attempt directory.
* @param jobUUID unique Job ID.
* @param appAttemptId the ID of the application attempt for this job.
* @return the directory tree for the application attempt
*/
public static String formatAppAttemptDir(
String jobUUID,
int appAttemptId) {
return formatJ... | 3.68 |
hbase_HMaster_isActiveMaster | /**
* Report whether this master is currently the active master or not. If not active master, we are
* parked on ZK waiting to become active. This method is used for testing.
* @return true if active master, false if not.
*/
@Override
public boolean isActiveMaster() {
return activeMaster;
} | 3.68 |
pulsar_KerberosName_getRealm | /**
* Get the realm of the name.
* @return the realm of the name, may be null
*/
public String getRealm() {
return realm;
} | 3.68 |
hadoop_ECBlock_isErased | /**
*
* @return true if it's erased due to erasure, otherwise false
*/
public boolean isErased() {
return isErased;
} | 3.68 |
flink_SkipListUtils_putPrevIndexNode | /**
* Puts previous key pointer on the given index level to key space.
*
* @param memorySegment memory segment for key space.
* @param offset offset of key space in the memory segment.
* @param totalLevel top level of the key.
* @param level level of index.
* @param prevKeyPointer previous key pointer on the giv... | 3.68 |
morf_AbstractSqlDialectTest_testAddColumnNotNullable | /**
* Test adding a non-nullable column.
*/
@Test
public void testAddColumnNotNullable() {
testAlterTableColumn(AlterationType.ADD, column("dateField_new", DataType.DATE).defaultValue("2010-01-01"), expectedAlterTableAddColumnNotNullableStatement());
} | 3.68 |
framework_DataCommunicator_setMinPushSize | /**
* Set minimum size of data which will be sent to the client when data
* source is set.
* <p>
* Server doesn't send all data from data source to the client. It sends
* some initial chunk of data (whose size is determined as minimum between
* {@code size} parameter of this method and data size). Client decides
... | 3.68 |
hadoop_MRJobConfUtil_setTaskLogProgressDeltaThresholds | /**
* load the values defined from a configuration file including the delta
* progress and the maximum time between each log message.
* @param conf
*/
public static void setTaskLogProgressDeltaThresholds(
final Configuration conf) {
if (progressMinDeltaThreshold == null) {
progressMinDeltaThreshold =
... | 3.68 |
hbase_WALPlayer_usage | /**
* Print usage
* @param errorMsg Error message. Can be null.
*/
private void usage(final String errorMsg) {
if (errorMsg != null && errorMsg.length() > 0) {
System.err.println("ERROR: " + errorMsg);
}
System.err.println("Usage: " + NAME + " [options] <WAL inputdir> [<tables> <tableMappings>]");
System... | 3.68 |
hudi_StreamSync_getDeducedSchemaProvider | /**
* Apply schema reconcile and schema evolution rules(schema on read) and generate new target schema provider.
*
* @param incomingSchema schema of the source data
* @param sourceSchemaProvider Source schema provider.
* @return the SchemaProvider that can be used as writer schema.
*/
private SchemaProvider getDe... | 3.68 |
flink_JoinedStreams_with | /**
* Completes the join operation with the user function that is executed for each combination
* of elements with the same key in a window.
*
* <p><b>Note:</b> This is a temporary workaround while the {@link #apply(FlatJoinFunction,
* TypeInformation)} method has the wrong return type and hence does not allow one... | 3.68 |
hadoop_AzureBlobFileSystemStore_generateContinuationTokenForNonXns | // generate continuation token for non-xns account
private String generateContinuationTokenForNonXns(String path, final String firstEntryName) {
Preconditions.checkArgument(!Strings.isNullOrEmpty(firstEntryName)
&& !firstEntryName.startsWith(AbfsHttpConstants.ROOT_PATH),
"startFrom must be a dir/f... | 3.68 |
framework_TestSizeableIncomponents_getComponent | /**
* Instantiates and populates component with test data to be ready for
* testing.
*
* @return
* @throws InstantiationException
* @throws IllegalAccessException
*/
public Component getComponent()
throws InstantiationException, IllegalAccessException {
Component c = (Component) classToTest.newInstan... | 3.68 |
pulsar_BrokerInterceptorUtils_getBrokerInterceptorDefinition | /**
* Retrieve the broker interceptor definition from the provided handler nar package.
*
* @param narPath the path to the broker interceptor NAR package
* @return the broker interceptor definition
* @throws IOException when fail to load the broker interceptor or get the definition
*/
public BrokerInterceptorDefi... | 3.68 |
rocketmq-connect_RetryWithToleranceOperator_reporters | /**
* Set the error reporters for this connector.
*
* @param reporters the error reporters (should not be null).
*/
public void reporters(List<ErrorReporter> reporters) {
this.context.reporters(reporters);
} | 3.68 |
flink_FileSystem_getLocalFileSystem | /**
* Returns a reference to the {@link FileSystem} instance for accessing the local file system.
*
* @return a reference to the {@link FileSystem} instance for accessing the local file system.
*/
public static FileSystem getLocalFileSystem() {
return FileSystemSafetyNet.wrapWithSafetyNetWhenActivated(
... | 3.68 |
framework_ExpandingContainer_checkExpand | // Expand container if we scroll past 85%
public int checkExpand(int index) {
log("checkExpand(" + index + ")");
if (index >= currentSize * 0.85) {
final int oldsize = currentSize;
currentSize = (int) (oldsize * 1.3333);
log("*** getSizeWithHint(" + index + "): went past 85% of size="
... | 3.68 |
hbase_Abortable_abort | /**
* It just call another abort method and the Throwable parameter is null.
* @param why Why we're aborting.
* @see Abortable#abort(String, Throwable)
*/
default void abort(String why) {
abort(why, null);
} | 3.68 |
hadoop_RegistryDNSServer_serviceInit | /**
* Initializes the DNS server.
* @param conf the hadoop configuration instance.
* @throws Exception if service initialization fails.
*/
@Override
protected void serviceInit(Configuration conf) throws Exception {
pathToRecordMap = new ConcurrentHashMap<>();
registryOperations = new RegistryOperationsService... | 3.68 |
hbase_StorageClusterStatusModel_setTotalStaticBloomSizeKB | /**
* @param totalStaticBloomSizeKB The total size of all Bloom filter blocks, not just loaded
* into the block cache, in KB.
*/
public void setTotalStaticBloomSizeKB(int totalStaticBloomSizeKB) {
this.totalStaticBloomSizeKB = totalStaticBloomSizeKB;
} | 3.68 |
flink_FieldParser_nextStringEndPos | /**
* Returns the end position of a string. Sets the error state if the column is empty.
*
* @return the end position of the string or -1 if an error occurred
*/
protected final int nextStringEndPos(byte[] bytes, int startPos, int limit, byte[] delimiter) {
int endPos = startPos;
final int delimLimit = lim... | 3.68 |
pulsar_SslContextAutoRefreshBuilder_get | /**
* It updates SSLContext at every configured refresh time and returns updated SSLContext.
*
* @return
*/
public T get() {
T ctx = getSslContext();
if (ctx == null) {
try {
update();
lastRefreshTime = System.currentTimeMillis();
return getSslContext();
}... | 3.68 |
hbase_AccessController_grant | /**
* @deprecated since 2.2.0 and will be removed in 4.0.0. Use
* {@link Admin#grant(UserPermission, boolean)} instead.
* @see Admin#grant(UserPermission, boolean)
* @see <a href="https://issues.apache.org/jira/browse/HBASE-21739">HBASE-21739</a>
*/
@Deprecated
@Override
public void grant(RpcController... | 3.68 |
morf_InsertStatementBuilder_getHints | /**
* @return all hints in the order they were declared.
*/
List<Hint> getHints() {
return hints;
} | 3.68 |
hbase_DeadServer_putIfAbsent | /**
* Adds the server to the dead server list if it's not there already.
*/
synchronized void putIfAbsent(ServerName sn) {
this.deadServers.putIfAbsent(sn, EnvironmentEdgeManager.currentTime());
} | 3.68 |
hbase_Size_getUnit | /** Returns size unit */
public Unit getUnit() {
return unit;
} | 3.68 |
zxing_PDF417ResultMetadata_getFileSize | /**
* filesize in bytes of the encoded file
*
* @return filesize in bytes, -1 if not set
*/
public long getFileSize() {
return fileSize;
} | 3.68 |
hibernate-validator_XmlParserHelper_getSchemaVersion | /**
* Retrieves the schema version applying for the given XML input stream as
* represented by the "version" attribute of the root element of the stream.
* <p>
* The given reader will be advanced to the root element of the given XML
* structure. It can be used for unmarshalling from there.
*
* @param resourceNam... | 3.68 |
flink_BufferDecompressor_decompressToIntermediateBuffer | /**
* Decompresses the given {@link Buffer} using {@link BlockDecompressor}. The decompressed data
* will be stored in the intermediate buffer of this {@link BufferDecompressor} and returned to
* the caller. The caller must guarantee that the returned {@link Buffer} has been freed when
* calling the method next tim... | 3.68 |
flink_FlinkImageBuilder_setTempDirectory | /**
* Sets temporary path for holding temp files when building the image.
*
* <p>Note that this parameter is required, because the builder doesn't have lifecycle
* management, and it is the caller's responsibility to create and remove the temp directory.
*/
public FlinkImageBuilder setTempDirectory(Path tempDirect... | 3.68 |
hudi_TableChanges_getFullColName2Id | // expose to test
public Map<String, Integer> getFullColName2Id() {
return fullColName2Id;
} | 3.68 |
pulsar_AuthenticationDataSource_hasDataFromTls | /**
* Check if data from TLS are available.
*
* @return true if this authentication data contain data from TLS
*/
default boolean hasDataFromTls() {
return false;
} | 3.68 |
morf_JdbcUrlElements_getInstanceName | /**
* @return the instance name. The meaning of this varies between database types.
*/
public String getInstanceName() {
return instanceName;
} | 3.68 |
hbase_Bytes_putLong | /**
* Put a long value out to the specified byte array position.
* @param bytes the byte array
* @param offset position in the array
* @param val long to write out
* @return incremented offset
* @throws IllegalArgumentException if the byte array given doesn't have enough room at the offset
* ... | 3.68 |
hadoop_RouterSafemodeService_enter | /**
* Enter safe mode.
*/
private void enter() {
LOG.info("Entering safe mode");
enterSafeModeTime = monotonicNow();
safeMode = true;
router.updateRouterState(RouterServiceState.SAFEMODE);
} | 3.68 |
flink_CalciteParser_parseSqlList | /**
* Parses a SQL string into a {@link SqlNodeList}. The {@link SqlNodeList} is not yet validated.
*
* @param sql a sql string to parse
* @return a parsed sql node list
* @throws SqlParserException if an exception is thrown when parsing the statement
* @throws SqlParserEOFException if the statement is incomplete... | 3.68 |
hadoop_AMRMProxyApplicationContextImpl_setLocalAMRMToken | /**
* Sets the application's AMRMToken.
*
* @param localToken amrmToken issued by AMRMProxy
*/
public synchronized void setLocalAMRMToken(
Token<AMRMTokenIdentifier> localToken) {
this.localToken = localToken;
this.localTokenKeyId = null;
} | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.