name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hadoop_RouterQuotaUpdateService_isQuotaSet | /**
* Check if the quota was set in given MountTable.
* @param mountTable Mount table entry.
*/
private boolean isQuotaSet(MountTable mountTable) {
if (mountTable != null) {
return this.quotaManager.isQuotaSet(mountTable.getQuota());
}
return false;
} | 3.68 |
hadoop_NamenodeStatusReport_getProvidedSpace | /**
* Get the space occupied by provided storage.
*
* @return the provided capacity.
*/
public long getProvidedSpace() {
return this.providedSpace;
} | 3.68 |
hudi_HiveAvroSerializer_getOtherTypeFromNullableType | /**
* If the union schema is a nullable union, get the schema for the non-nullable type.
* This method does no checking that the provided Schema is nullable. If the provided
* union schema is non-nullable, it simply returns the union schema
*/
public static Schema getOtherTypeFromNullableType(Schema unionSchema) {
... | 3.68 |
hadoop_VersionInfoMojo_getSCMCommit | /**
* Parses SCM output and returns commit of SCM.
*
* @param scm SCM in use for this build
* @return String commit of SCM
*/
private String getSCMCommit(SCM scm) {
String commit = "Unknown";
switch (scm) {
case GIT:
for (String s : scmOut) {
if (s.startsWith("commit")) {
commit = ... | 3.68 |
flink_InputTypeStrategies_constraint | /** Strategy for an argument that must fulfill a given constraint. */
public static ConstraintArgumentTypeStrategy constraint(
String constraintMessage, Predicate<List<DataType>> evaluator) {
return new ConstraintArgumentTypeStrategy(constraintMessage, evaluator);
} | 3.68 |
shardingsphere-elasticjob_JobNodeStorage_executeInLeader | /**
* Execute in leader server.
*
* @param latchNode node for leader latch
* @param callback execute callback
*/
public void executeInLeader(final String latchNode, final LeaderExecutionCallback callback) {
regCenter.executeInLeader(jobNodePath.getFullPath(latchNode), callback);
} | 3.68 |
flink_ResourceManagerId_toUUID | /** Creates a UUID with the bits from this ResourceManagerId. */
public UUID toUUID() {
return new UUID(getUpperPart(), getLowerPart());
} | 3.68 |
hbase_Encryption_failOnHashAlgorithmMismatch | /**
* Returns the Hash Algorithm mismatch behaviour defined in the crypto configuration.
*/
public static boolean failOnHashAlgorithmMismatch(Configuration conf) {
return conf.getBoolean(CRYPTO_KEY_FAIL_ON_ALGORITHM_MISMATCH_CONF_KEY,
CRYPTO_KEY_FAIL_ON_ALGORITHM_MISMATCH_CONF_DEFAULT);
} | 3.68 |
Activiti_ProcessEngines_destroy | /**
* closes all process engines. This method should be called when the server shuts down.
*/
public synchronized static void destroy() {
if (isInitialized()) {
Map<String, ProcessEngine> engines = new HashMap<String, ProcessEngine>(processEngines);
processEngines = new HashMap<String, ProcessEngine>();
... | 3.68 |
hadoop_ReconfigurationException_getOldValue | /**
* Get old value of property that cannot be changed.
* @return old value.
*/
public String getOldValue() {
return oldVal;
} | 3.68 |
flink_DateTimeUtils_timestampMillisToDate | /**
* Get date from a timestamp.
*
* @param ts the timestamp in milliseconds.
* @return the date in days.
*/
public static int timestampMillisToDate(long ts) {
int days = (int) (ts / MILLIS_PER_DAY);
if (days < 0) {
days = days - 1;
}
return days;
} | 3.68 |
framework_ConnectorInfoPanel_update | /**
* Update the panel to show information about a connector.
*
* @param connector
*/
public void update(ServerConnector connector) {
SharedState state = connector.getState();
Set<String> ignoreProperties = new HashSet<>();
ignoreProperties.add("id");
String html = getRowHTML("Id", connector.getCo... | 3.68 |
morf_TableOutputter_table | /**
* Output the given table to the given workbook.
*
* @param maxSampleRows the maximum number of rows to export in the "sample data" section
* (all rows are included in the "Parameters to set up" section).
* @param workbook to add the table to.
* @param table to add to the workbook.
* @par... | 3.68 |
hbase_CommonFSUtils_isStartingWithPath | /**
* Compare of path component. Does not consider schema; i.e. if schemas different but
* <code>path</code> starts with <code>rootPath</code>, then the function returns true
* @param rootPath value to check for
* @param path subject to check
* @return True if <code>path</code> starts with <code>rootPath</code... | 3.68 |
hadoop_HadoopExecutors_newSingleThreadExecutor | //Executors.newSingleThreadExecutor has special semantics - for the
// moment we'll delegate to it rather than implement the semantics here.
public static ExecutorService newSingleThreadExecutor(ThreadFactory
threadFactory) {
return Executors.newSingleThreadExecutor(threadFactory);
} | 3.68 |
druid_ZookeeperNodeListener_destroy | /**
* Close PathChildrenCache and CuratorFramework.
*/
@Override
public void destroy() {
if (cache != null) {
try {
cache.close();
} catch (IOException e) {
LOG.error("IOException occurred while closing PathChildrenCache.", e);
}
}
if (client != null && priv... | 3.68 |
hbase_LocalHBaseCluster_getRegionServer | /** Returns region server */
public HRegionServer getRegionServer(int serverNumber) {
return regionThreads.get(serverNumber).getRegionServer();
} | 3.68 |
hudi_AbstractTableFileSystemView_isBaseFileDueToPendingCompaction | /**
* With async compaction, it is possible to see partial/complete base-files due to inflight-compactions, Ignore those
* base-files.
*
* @param baseFile base File
*/
protected boolean isBaseFileDueToPendingCompaction(HoodieBaseFile baseFile) {
final String partitionPath = getPartitionPathFor(baseFile);
Opti... | 3.68 |
hbase_StateMachineProcedure_failIfAborted | /**
* If procedure has more states then abort it otherwise procedure is finished and abort can be
* ignored.
*/
protected final void failIfAborted() {
if (aborted.get()) {
if (hasMoreState()) {
setAbortFailure(getClass().getSimpleName(), "abort requested");
} else {
LOG.warn("Ignoring abort req... | 3.68 |
hadoop_MappableBlockLoader_verifyChecksum | /**
* Verifies the block's checksum. This is an I/O intensive operation.
*/
protected void verifyChecksum(long length, FileInputStream metaIn,
FileChannel blockChannel, String blockFileName) throws IOException {
// Verify the checksum from the block's meta file
// Get the DataChecksum from the meta file heade... | 3.68 |
hadoop_RouterHeartbeatService_updateStateStore | /**
* Update the state of the Router in the State Store.
*/
@VisibleForTesting
synchronized void updateStateStore() {
String routerId = router.getRouterId();
if (routerId == null) {
LOG.error("Cannot heartbeat for router: unknown router id");
return;
}
if (isStoreAvailable()) {
RouterStore routerS... | 3.68 |
flink_DualInputOperator_addFirstInputs | /**
* Add to the first input the union of the given operators.
*
* @param inputs The operator(s) to be unioned with the first input.
* @deprecated This method will be removed in future versions. Use the {@link Union} operator
* instead.
*/
@Deprecated
@SuppressWarnings("unchecked")
public void addFirstInputs(... | 3.68 |
streampipes_Labels_from | /**
* @deprecated Externalize labels by using
* {@link org.apache.streampipes.sdk.builder.AbstractProcessingElementBuilder#withLocales(Locales...)}
* to ease future support for multiple languages.
*
* Creates a new label with internalId, label and description. Fully-configured labels are required by static
* prop... | 3.68 |
hadoop_AbfsInputStream_incrementReadOps | /**
* Increment Read Operations.
*/
private void incrementReadOps() {
if (statistics != null) {
statistics.incrementReadOps(1);
}
} | 3.68 |
flink_DefaultExecutionTopology_ensureCoLocatedVerticesInSameRegion | /**
* Co-location constraints are only used for iteration head and tail. A paired head and tail
* needs to be in the same pipelined region so that they can be restarted together.
*/
private static void ensureCoLocatedVerticesInSameRegion(
List<DefaultSchedulingPipelinedRegion> pipelinedRegions,
Execu... | 3.68 |
hbase_StorageClusterStatusModel_setStorefileIndexSizeKB | /**
* @param storefileIndexSizeKB total size of store file indexes, in KB
*/
public void setStorefileIndexSizeKB(long storefileIndexSizeKB) {
this.storefileIndexSizeKB = storefileIndexSizeKB;
} | 3.68 |
hbase_BufferedMutatorParams_writeBufferSize | /**
* Override the write buffer size specified by the provided {@link Connection}'s
* {@link org.apache.hadoop.conf.Configuration} instance, via the configuration key
* {@code hbase.client.write.buffer}.
*/
public BufferedMutatorParams writeBufferSize(long writeBufferSize) {
this.writeBufferSize = writeBufferSize... | 3.68 |
hadoop_DockerCommandExecutor_parseContainerStatus | /**
* Parses the container status string.
*
* @param containerStatusStr container status.
* @return a {@link DockerContainerStatus} representing the status.
*/
public static DockerContainerStatus parseContainerStatus(
String containerStatusStr) {
DockerContainerStatus dockerContainerStatus;
if (containerSt... | 3.68 |
framework_AbstractConnector_hasEventListener | /*
* (non-Javadoc)
*
* @see com.vaadin.client.ServerConnector#hasEventListener(java.lang.String)
*/
@Override
public boolean hasEventListener(String eventIdentifier) {
Set<String> reg = getState().registeredEventListeners;
return reg != null && reg.contains(eventIdentifier);
} | 3.68 |
morf_AbstractSqlDialectTest_testCreateTableStatementsLongTableName | /**
* Tests the SQL for creating tables with long names
*/
@SuppressWarnings("unchecked")
@Test
public void testCreateTableStatementsLongTableName() {
Table table = metadata.getTable(TABLE_WITH_VERY_LONG_NAME);
compareStatements(
expectedCreateTableStatementsWithLongTableName(),
testDialect.tableDeployme... | 3.68 |
morf_HumanReadableStatementHelper_generateNullableString | /**
* Generates a nullable / non-null string for the specified definition.
*
* @param definition the column definition
* @return a string representation of nullable / non-null
*/
private static String generateNullableString(final Column definition) {
return definition.isNullable() ? "nullable" : "non-null";
} | 3.68 |
flink_DateTimeUtils_isValidValue | /**
* Returns whether a given value is valid for a field of this time unit.
*
* @param field Field value
* @return Whether value
*/
public boolean isValidValue(BigDecimal field) {
return field.compareTo(BigDecimal.ZERO) >= 0
&& (limit == null || field.compareTo(limit) < 0);
} | 3.68 |
hbase_RpcServer_logResponse | /**
* Logs an RPC response to the LOG file, producing valid JSON objects for client Operations.
* @param param The parameters received in the call.
* @param methodName The name of the method invoked
* @param call The string representation of the call
* @param tooLarge To in... | 3.68 |
hibernate-validator_MetaConstraint_getGroupList | /**
* @return Returns the list of groups this constraint is part of. This might include the default group even when
* it is not explicitly specified, but part of the redefined default group list of the hosting bean.
*/
public final Set<Class<?>> getGroupList() {
return constraintTree.getDescriptor().getGrou... | 3.68 |
zilla_HpackContext_staticIndex3 | // Index in static table for the given name of length 3
private static int staticIndex3(DirectBuffer name)
{
switch (name.getByte(2))
{
case 'a':
if (STATIC_TABLE[60].name.equals(name)) // via
{
return 60;
}
break;
case 'e':
if (STATIC_TABLE[21]... | 3.68 |
flink_KeyedStream_minBy | /**
* Applies an aggregation that gives the current element with the minimum value at the given
* position by the given key. An independent aggregate is kept per key. If more elements have
* the minimum value at the given position, the operator returns either the first or last one,
* depending on the parameter set.... | 3.68 |
framework_Escalator_refreshRows | /**
* {@inheritDoc}
* <p>
* <em>Implementation detail:</em> This method does no DOM modifications
* (i.e. is very cheap to call) if there is no data for columns when
* this method is called.
*
* @see #hasColumnAndRowData()
*/
@Override
// overridden because of JavaDoc
public void refreshRows(final int index, fi... | 3.68 |
flink_BinaryStringDataUtil_trimRight | /**
* Walk each character of current string from right end, remove the character if it is in trim
* string. Stops at the first character which is not in trim string. Return the new substring.
*
* @param trimStr the trim string
* @return A subString which removes all of the character from the right side that is in ... | 3.68 |
hadoop_TaskManifest_toJson | /**
* To JSON.
* @return json string value.
* @throws IOException failure
*/
public String toJson() throws IOException {
return serializer().toJson(this);
} | 3.68 |
AreaShop_GeneralRegion_getMaximumPoint | /**
* Get the maximum corner of the region.
* @return Vector
*/
public Vector getMaximumPoint() {
return plugin.getWorldGuardHandler().getMaximumPoint(getRegion());
} | 3.68 |
hbase_KeyValue_compareKey | // compare a key against row/fam/qual/ts/type
public int compareKey(Cell cell, byte[] row, int roff, int rlen, byte[] fam, int foff, int flen,
byte[] col, int coff, int clen, long ts, byte type) {
int compare =
compareRows(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength(), row, roff, rlen);
if (co... | 3.68 |
hbase_ZKUtil_deleteNodeRecursively | /**
* Delete the specified node and all of it's children.
* <p>
* If the node does not exist, just returns.
* <p>
* Sets no watches. Throws all exceptions besides dealing with deletion of children.
*/
public static void deleteNodeRecursively(ZKWatcher zkw, String node) throws KeeperException {
deleteNodeRecursi... | 3.68 |
hbase_ReplicationUtils_sleepForRetries | /**
* Do the sleeping logic
* @param msg Why we sleep
* @param sleepForRetries the base sleep time.
* @param sleepMultiplier by how many times the default sleeping time is augmented
* @param maxRetriesMultiplier the max retry multiplier
* @return True if <code>sleepMultiplier</code> is ... | 3.68 |
morf_SqlUtils_cast | /**
* @see CastBuilder#asString(int)
* @param field the field to cast
* @return A builder to produce a {@link Cast}.
*/
public static CastBuilder cast(AliasedField field) {
return new CastBuilder(field);
} | 3.68 |
flink_CsvReaderFormat_forSchema | /**
* Builds a new {@code CsvReaderFormat} using a {@code CsvSchema} generator and {@code
* CsvMapper} factory.
*
* @param mapperFactory The factory creating the {@code CsvMapper}.
* @param schemaGenerator A generator that creates and configures the Jackson CSV schema for
* parsing specific CSV files, from a ... | 3.68 |
framework_UidlRequestHandler_createRpcHandler | /**
* Creates the ServerRpcHandler to use.
*
* @since 7.7
* @return the ServerRpcHandler to use
*/
protected ServerRpcHandler createRpcHandler() {
return new ServerRpcHandler();
} | 3.68 |
hudi_OptionsResolver_getPreCombineField | /**
* Returns the preCombine field
* or null if the value is set as {@link FlinkOptions#NO_PRE_COMBINE}.
*/
public static String getPreCombineField(Configuration conf) {
final String preCombineField = conf.getString(FlinkOptions.PRECOMBINE_FIELD);
return preCombineField.equals(FlinkOptions.NO_PRE_COMBINE) ? null... | 3.68 |
framework_Range_getEnd | /**
* Returns the <em>exclusive</em> end point of this range.
*
* @return the end point of this range
*/
public int getEnd() {
return end;
} | 3.68 |
hadoop_AbstractS3AStatisticsSource_incCounter | /**DefaultS3ClientFactoryDefaultS3ClientFactory
* Increment a named counter by 1.
* @param name counter name
* @param value value to increment by
* @return the updated value or, if the counter is unknown: 0
*/
public long incCounter(String name, long value) {
return ioStatistics.incrementCounter(name, value);
} | 3.68 |
hbase_BucketCache_freeBucketEntry | /**
* Free the {{@link BucketEntry} actually,which could only be invoked when the
* {@link BucketEntry#refCnt} becoming 0.
*/
void freeBucketEntry(BucketEntry bucketEntry) {
bucketAllocator.freeBlock(bucketEntry.offset(), bucketEntry.getLength());
realCacheSize.add(-1 * bucketEntry.getLength());
} | 3.68 |
Activiti_BpmnDeploymentHelper_copyDeploymentValuesToProcessDefinitions | /**
* Updates all the process definition entities to match the deployment's values for tenant,
* engine version, and deployment id.
*/
public void copyDeploymentValuesToProcessDefinitions(DeploymentEntity deployment,
List<ProcessDefinitionEntity> processDefinitions) {
String engineVersion = deployment.getEngin... | 3.68 |
hbase_TableDescriptorBuilder_getRegionSplitPolicyClassName | /**
* This gets the class associated with the region split policy which determines when a region
* split should occur. The class used by default is defined in
* org.apache.hadoop.hbase.regionserver.RegionSplitPolicy
* @return the class name of the region split policy for this table. If this returns null, the
* ... | 3.68 |
hbase_QuotaObserverChore_pruneOldRegionReports | /**
* Removes region reports over a certain age.
*/
void pruneOldRegionReports() {
final long now = EnvironmentEdgeManager.currentTime();
final long pruneTime = now - regionReportLifetimeMillis;
final int numRemoved = quotaManager.pruneEntriesOlderThan(pruneTime, this);
if (LOG.isTraceEnabled()) {
LOG.tra... | 3.68 |
flink_BufferReaderWriterUtil_positionToNextBuffer | /** Skip one data buffer from the channel's current position by headerBuffer. */
public static void positionToNextBuffer(FileChannel channel, ByteBuffer headerBuffer)
throws IOException {
headerBuffer.clear();
if (!tryReadByteBuffer(channel, headerBuffer)) {
throwCorruptDataException();
}
... | 3.68 |
morf_SqlDialect_getAutoNumberName | /**
* Gets the autonumber name for the {@code destinationReference}.
*
* @param destinationReference the table name to get the autonumber name for.
* @return the autonumber name.
*/
protected String getAutoNumberName(String destinationReference) {
String autoNumberName = destinationReference;
if (autoNumberNam... | 3.68 |
hadoop_AzureNativeFileSystemStore_setToString | /**
* Helper to format a string for log output from Set<String>
*/
private String setToString(Set<String> set) {
StringBuilder sb = new StringBuilder();
int i = 1;
for (String s : set) {
sb.append("/" + s);
if (i != set.size()) {
sb.append(", ");
}
i++;
}
return sb.toString();
} | 3.68 |
querydsl_GeometryExpression_dimension | /**
* The inherent dimension of this geometric object, which must be less than or equal
* to the coordinate dimension. In non-homogeneous collections, this will return the largest topological
* dimension of the contained objects.
*
* @return dimension
*/
public NumberExpression<Integer> dimension() {
if (dime... | 3.68 |
zxing_HybridBinarizer_thresholdBlock | /**
* Applies a single threshold to a block of pixels.
*/
private static void thresholdBlock(byte[] luminances,
int xoffset,
int yoffset,
int threshold,
int stride,
... | 3.68 |
hbase_RpcServer_channelIO | /**
* Helper for {@link #channelRead(java.nio.channels.ReadableByteChannel, java.nio.ByteBuffer)}.
* Only one of readCh or writeCh should be non-null.
* @param readCh read channel
* @param writeCh write channel
* @param buf buffer to read or write into/out of
* @return bytes written
* @throws java.io.IOExce... | 3.68 |
Activiti_LongToInteger_primTransform | /**
* {@inheritDoc}
*/
@Override
protected Object primTransform(Object anObject) throws Exception {
return Integer.valueOf(((Long) anObject).toString());
} | 3.68 |
hbase_TableScanResource_getIterator | // jackson needs an iterator for streaming
@JsonProperty("Row")
public Iterator<RowModel> getIterator() {
return Row.iterator();
} | 3.68 |
flink_StateDescriptor_getName | /** Returns the name of this {@code StateDescriptor}. */
public String getName() {
return name;
} | 3.68 |
framework_VaadinSession_setLocale | /**
* Sets the default locale for this session.
*
* By default this is the preferred locale of the user using the
* application. In most cases it is read from the browser defaults.
*
* @param locale
* the Locale object.
*
*/
public void setLocale(Locale locale) {
assert hasLock();
this.local... | 3.68 |
flink_HiveParserDDLSemanticAnalyzer_convertAlterTableAddParts | /**
* Add one or more partitions to a table. Useful when the data has been copied to the right
* location by some other process.
*/
private Operation convertAlterTableAddParts(String[] qualified, CommonTree ast) {
// ^(TOK_ALTERTABLE_ADDPARTS identifier ifNotExists?
// alterStatementSuffixAddPartitionsElemen... | 3.68 |
framework_AbstractTransactionalQuery_commit | /**
* Commits (if not in auto-commit mode) and releases the active connection.
*
* @throws SQLException
* if not in a transaction managed by this query
*/
public void commit() throws UnsupportedOperationException, SQLException {
if (!isInTransaction()) {
throw new SQLException("No active tr... | 3.68 |
pulsar_PulsarClientImpl_timer | /** visible for pulsar-functions. **/
public Timer timer() {
return timer;
} | 3.68 |
hbase_TableInputFormatBase_closeTable | /**
* Close the Table and related objects that were initialized via
* {@link #initializeTable(Connection, TableName)}.
*/
protected void closeTable() throws IOException {
close(table, connection);
table = null;
connection = null;
} | 3.68 |
graphhopper_PrepareLandmarks_setMaximumWeight | /**
* @see LandmarkStorage#setMaximumWeight(double)
*/
public PrepareLandmarks setMaximumWeight(double maximumWeight) {
lms.setMaximumWeight(maximumWeight);
return this;
} | 3.68 |
framework_ContainerHierarchicalWrapper_removeContainerProperty | /**
* Removes the specified Property from the underlying container and from the
* hierarchy.
* <p>
* Note : The Property will be removed from all Items in the Container.
* </p>
*
* @param propertyId
* the ID of the Property to remove.
* @return <code>true</code> if the operation succeeded, <code>fal... | 3.68 |
hbase_StoreScanner_selectScannersFrom | /**
* Filters the given list of scanners using Bloom filter, time range, and TTL.
* <p>
* Will be overridden by testcase so declared as protected.
*/
protected List<KeyValueScanner> selectScannersFrom(HStore store,
List<? extends KeyValueScanner> allScanners) {
boolean memOnly;
boolean filesOnly;
if (scan i... | 3.68 |
dubbo_Bytes_bytes2int | /**
* to int.
*
* @param b byte array.
* @param off offset.
* @return int.
*/
public static int bytes2int(byte[] b, int off) {
return ((b[off + 3] & 0xFF) << 0)
+ ((b[off + 2] & 0xFF) << 8)
+ ((b[off + 1] & 0xFF) << 16)
+ ((b[off + 0]) << 24);
} | 3.68 |
flink_FileWriterBucket_getNew | /**
* Creates a new empty {@code Bucket}.
*
* @param bucketId the identifier of the bucket, as returned by the {@link BucketAssigner}.
* @param bucketPath the path to where the part files for the bucket will be written to.
* @param bucketWriter the {@link BucketWriter} used to write part files in the bucket.
* @p... | 3.68 |
hbase_Response_setHeaders | /**
* @param headers the HTTP response headers
*/
public void setHeaders(Header[] headers) {
this.headers = headers;
} | 3.68 |
hbase_ZKProcedureUtil_getAcquireBarrierNode | /**
* Get the full znode path for the node used by the coordinator to trigger a global barrier
* acquire on each subprocedure.
* @param controller controller running the procedure
* @param opInstanceName name of the running procedure instance (not the procedure description).
* @return full znode path to the pr... | 3.68 |
flink_WindowedStream_apply | /**
* Applies the given window function to each window. The window function is called for each
* evaluation of the window for each key individually. The output of the window function is
* interpreted as a regular non-windowed stream.
*
* <p>Arriving data is incrementally aggregated using the given reducer.
*
* @... | 3.68 |
hadoop_ECChunk_toBuffers | /**
* Convert an array of this chunks to an array of ByteBuffers
* @param chunks chunks to convert into buffers
* @return an array of ByteBuffers
*/
public static ByteBuffer[] toBuffers(ECChunk[] chunks) {
ByteBuffer[] buffers = new ByteBuffer[chunks.length];
ECChunk chunk;
for (int i = 0; i < chunks.length;... | 3.68 |
pulsar_WindowManager_getSlidingCountTimestamps | /**
* Scans the event queue and returns the list of event ts
* falling between startTs (exclusive) and endTs (inclusive)
* at each sliding interval counts.
*
* @param startTs the start timestamp (exclusive)
* @param endTs the end timestamp (inclusive)
* @param slidingCount the sliding interval count
* @return t... | 3.68 |
hibernate-validator_ValidationProviderHelper_determineRequiredQualifiers | /**
* Returns the qualifiers to be used for registering a validator or validator factory.
*/
@SuppressWarnings("serial")
private static Set<Annotation> determineRequiredQualifiers(boolean isDefaultProvider,
boolean isHibernateValidator) {
HashSet<Annotation> qualifiers = newHashSet( 3 );
if ( isDefaultProvider )... | 3.68 |
hbase_MD5Hash_getMD5AsHex | /**
* Given a byte array, returns its MD5 hash as a hex string. Only "length" number of bytes
* starting at "offset" within the byte array are used.
* @param key the key to hash (variable length byte array)
* @return MD5 hash as a 32 character hex string.
*/
public static String getMD5AsHex(byte[] key, int offset,... | 3.68 |
framework_AbstractComponentContainer_getComponentIterator | /**
* {@inheritDoc}
*
* @deprecated As of 7.0, use {@link #iterator()} instead.
*/
@Deprecated
@Override
public Iterator<Component> getComponentIterator() {
return iterator();
} | 3.68 |
framework_Table_getVisibleCells | /**
* Gets the cached visible table contents.
*
* @return the cached visible table contents.
*/
private Object[][] getVisibleCells() {
if (pageBuffer == null) {
refreshRenderedCells();
}
return pageBuffer;
} | 3.68 |
flink_MemoryManager_verifyEmpty | /**
* Checks if the memory manager's memory is completely available (nothing allocated at the
* moment).
*
* @return True, if the memory manager is empty and valid, false if it is not empty or
* corrupted.
*/
public boolean verifyEmpty() {
return memoryBudget.verifyEmpty();
} | 3.68 |
framework_VUpload_disableUpload | /** For internal use only. May be removed or replaced in the future. */
public void disableUpload() {
if (!submitted) {
// Cannot disable the fileupload while submitting or the file won't
// be submitted at all
fu.getElement().setPropertyBoolean("disabled", true);
}
enabled = false;
... | 3.68 |
hadoop_RPCUtil_getRemoteException | /**
* Returns an instance of {@link YarnException}.
* @param message yarn exception message.
* @return instance of YarnException.
*/
public static YarnException getRemoteException(String message) {
return new YarnException(message);
} | 3.68 |
hadoop_ServiceLauncher_exitWithUsageMessage | /**
* Exit with the usage exit code {@link #EXIT_USAGE}
* and message {@link #USAGE_MESSAGE}.
* @throws ExitUtil.ExitException if exceptions are disabled
*/
protected static void exitWithUsageMessage() {
exitWithMessage(EXIT_USAGE, USAGE_MESSAGE);
} | 3.68 |
hbase_CatalogFamilyFormat_parseReplicaIdFromServerColumn | /**
* Parses the replicaId from the server column qualifier. See top of the class javadoc for the
* actual meta layout
* @param serverColumn the column qualifier
* @return an int for the replicaId
*/
static int parseReplicaIdFromServerColumn(byte[] serverColumn) {
String serverStr = Bytes.toString(serverColumn);... | 3.68 |
flink_InPlaceMutableHashTable_reset | /** Seeks to the beginning. */
public void reset() {
seekOutput(segments.get(0), 0);
currentSegmentIndex = 0;
} | 3.68 |
hudi_ArrayColumnReader_collectDataFromParquetPage | /**
* Collects data from a parquet page and returns the final row index where it stopped. The
* returned index can be equal to or less than total.
*
* @param total maximum number of rows to collect
* @param lcv column vector to do initial setup in data collection time
* @param valueList collection of va... | 3.68 |
hadoop_BlockBlobAppendStream_getBlockList | /**
* Get the list of block entries. It is used for testing purposes only.
* @return List of block entries.
*/
@VisibleForTesting
List<BlockEntry> getBlockList() throws StorageException, IOException {
return blob.downloadBlockList(
BlockListingFilter.COMMITTED,
new BlobRequestOptions(),
opContext... | 3.68 |
framework_FileParameters_setName | /**
* Sets the file name.
*
* @param name
* Name of the file.
*/
public void setName(String name) {
this.name = name;
} | 3.68 |
zxing_ECIStringBuilder_length | /**
* Short for {@code toString().length()} (if possible, use {@link #isEmpty()} instead)
*
* @return length of string representation in characters
*/
public int length() {
return toString().length();
} | 3.68 |
framework_StaticSection_writeCellState | /**
*
* Writes declarative design for the cell using its {@code state} to the
* given table cell element.
* <p>
* The method is used instead of StaticCell::writeDesign because
* sometimes there is no a reference to the cell which should be written
* (merged cell) but only its state is available (the cell is virt... | 3.68 |
hadoop_JavaCommandLineBuilder_getJavaBinary | /**
* Get the java binary. This is called in the constructor so don't try and
* do anything other than return a constant.
* @return the path to the Java binary
*/
protected String getJavaBinary() {
return ApplicationConstants.Environment.JAVA_HOME.$$() + "/bin/java";
} | 3.68 |
hadoop_MountTableProcedure_disableWrite | /**
* Disable write by making the mount point readonly.
*
* @param mount the mount point to set readonly.
* @param conf the configuration of the router.
*/
static void disableWrite(String mount, Configuration conf)
throws IOException {
setMountReadOnly(mount, true, conf);
} | 3.68 |
flink_BinaryRawValueData_fromObject | /** Creates a {@link BinaryRawValueData} instance from the given Java object. */
public static <T> BinaryRawValueData<T> fromObject(T javaObject) {
if (javaObject == null) {
return null;
}
return new BinaryRawValueData<>(javaObject);
} | 3.68 |
flink_OperatingSystem_isFreeBSD | /**
* Checks whether the operating system this JVM runs on is FreeBSD.
*
* @return <code>true</code> if the operating system this JVM runs on is FreeBSD, <code>false
* </code> otherwise
*/
public static boolean isFreeBSD() {
return getCurrentOperatingSystem() == FREE_BSD;
} | 3.68 |
hbase_RSGroupInfoManagerImpl_waitForRegionMovement | /**
* Wait for all the region move to complete. Keep waiting for other region movement completion
* even if some region movement fails.
*/
private void waitForRegionMovement(List<Pair<RegionInfo, Future<byte[]>>> regionMoveFutures,
Set<String> failedRegions, String sourceGroupName, int retryCount) {
LOG.info("Mo... | 3.68 |
querydsl_BeanPath_createString | /**
* Create a new String path
*
* @param property property name
* @return property path
*/
protected StringPath createString(String property) {
return add(new StringPath(forProperty(property)));
} | 3.68 |
flink_SemanticPropUtil_addSourceFieldOffset | /**
* Creates SemanticProperties by adding an offset to each input field index of the given
* SemanticProperties.
*
* @param props The SemanticProperties to which the offset is added.
* @param numInputFields The original number of fields of the input.
* @param offset The offset that is added to each input field i... | 3.68 |
framework_MethodPropertyDescriptor_readObject | /* Special serialization to handle method references */
private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException {
in.defaultReadObject();
try {
@SuppressWarnings("unchecked")
// business assumption; type parameters not checked at runtime
Class<BT>... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.