name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
graphhopper_OSMReaderConfig_setLongEdgeSamplingDistance | /**
* Sets the distance between elevation samples on long edges
*/
public OSMReaderConfig setLongEdgeSamplingDistance(double longEdgeSamplingDistance) {
this.longEdgeSamplingDistance = longEdgeSamplingDistance;
return this;
} | 3.68 |
flink_MemoryManager_create | /**
* Creates a memory manager with the given capacity and given page size.
*
* <p>This is a production version of MemoryManager which checks for memory leaks ({@link
* #verifyEmpty()}) once the owner of the MemoryManager is ready to dispose.
*
* @param memorySize The total size of the off-heap memory to be manag... | 3.68 |
framework_Button_fireClick | /**
* Fires a click event to all listeners.
*
* @param details
* MouseEventDetails from which keyboard modifiers and other
* information about the mouse click can be obtained. If the
* button was clicked by a keyboard event, some of the fields may
* be empty/undefined.... | 3.68 |
hudi_HoodieLogFormatWriter_getLogBlockLength | /**
* This method returns the total LogBlock Length which is the sum of 1. Number of bytes to write version 2. Number of
* bytes to write ordinal 3. Length of the headers 4. Number of bytes used to write content length 5. Length of the
* content 6. Length of the footers 7. Number of bytes to write totalLogBlockLengt... | 3.68 |
framework_Button_setDisableOnClick | /**
* Determines if a button is automatically disabled when clicked. If this is
* set to true the button will be automatically disabled when clicked,
* typically to prevent (accidental) extra clicks on a button.
* <p>
* Note that this is only used when the click comes from the user, not when
* calling {@link #cli... | 3.68 |
hbase_AccessControlUtil_getUserPermissions | /**
* A utility used to get permissions for selected namespace based on the specified user name.
* @param controller RpcController
* @param protocol the AccessControlService protocol proxy
* @param namespace name of the namespace
* @param userName User name, if empty then all user permissions will be retrieve... | 3.68 |
hudi_CompactionStrategy_orderAndFilter | /**
* Order and Filter the list of compactions. Use the metrics captured with the captureMetrics to order and filter out
* compactions
*
* @param writeConfig config for this compaction is passed in
* @param operations list of compactions collected
* @param pendingCompactionPlans Pending Compaction Plans for strat... | 3.68 |
hudi_ClusteringPlanStrategy_getExtraMetadata | /**
* Returns any specific parameters to be stored as part of clustering metadata.
*/
protected Map<String, String> getExtraMetadata() {
return Collections.emptyMap();
} | 3.68 |
hbase_AbstractFSWAL_getFileNumFromFileName | /**
* A log file has a creation timestamp (in ms) in its file name ({@link #filenum}. This helper
* method returns the creation timestamp from a given log file. It extracts the timestamp assuming
* the filename is created with the {@link #computeFilename(long filenum)} method.
* @return timestamp, as in the log fil... | 3.68 |
framework_VAbstractOrderedLayout_setHeight | /**
* {@inheritDoc}
*/
@Override
public void setHeight(String height) {
super.setHeight(height);
definedHeight = height != null && !height.isEmpty();
} | 3.68 |
flink_RocksDBIncrementalRestoreOperation_restore | /** Root method that branches for different implementations of {@link KeyedStateHandle}. */
@Override
public RocksDBRestoreResult restore() throws Exception {
if (restoreStateHandles == null || restoreStateHandles.isEmpty()) {
return null;
}
final KeyedStateHandle theFirstStateHandle = restoreStat... | 3.68 |
framework_StreamResource_setBufferSize | /**
* Sets the size of the download buffer used for this resource.
*
* @param bufferSize
* the size of the buffer in bytes.
*/
public void setBufferSize(int bufferSize) {
this.bufferSize = bufferSize;
} | 3.68 |
hadoop_DataJoinJob_runJob | /**
* Submit/run a map/reduce job.
*
* @param job
* @return true for success
* @throws IOException
*/
public static boolean runJob(JobConf job) throws IOException {
JobClient jc = new JobClient(job);
boolean sucess = true;
RunningJob running = null;
try {
running = jc.submitJob(job);
JobID jobId ... | 3.68 |
hbase_HFileReaderImpl_getGeneralBloomFilterMetadata | /**
* Returns a buffer with the Bloom filter metadata. The caller takes ownership of the buffer.
*/
@Override
public DataInput getGeneralBloomFilterMetadata() throws IOException {
return this.getBloomFilterMetadata(BlockType.GENERAL_BLOOM_META);
} | 3.68 |
hibernate-validator_INNValidator_checkChecksumJuridicalINN | /**
* Check the digits for juridical INN using algorithm from
* <a href="https://ru.wikipedia.org/wiki/%D0%98%D0%B4%D0%B5%D0%BD%D1%82%D0%B8%D1%84%D0%B8%D0%BA%D0%B0%D1%86%D0%B8%D0%BE%D0%BD%D0%BD%D1%8B%D0%B9_%D0%BD%D0%BE%D0%BC%D0%B5%D1%80_%D0%BD%D0%B0%D0%BB%D0%BE%D0%B3%D0%BE%D0%BF%D0%BB%D0%B0%D1%82%D0%B5%D0%BB%D1%8C%D1... | 3.68 |
flink_Catalog_getTableFactory | /**
* Get an optional {@link TableFactory} instance that's responsible for generating table-related
* instances stored in this catalog, instances such as source/sink.
*
* @return an optional TableFactory instance
* @deprecated Use {@link #getFactory()} for the new factory stack. The new factory stack uses
* t... | 3.68 |
hbase_TableBackupClient_failBackup | /**
* Fail the overall backup.
* @param backupInfo backup info
* @param e exception
* @throws IOException exception
*/
protected void failBackup(Connection conn, BackupInfo backupInfo, BackupManager backupManager,
Exception e, String msg, BackupType type, Configuration conf) throws IOException {
try {... | 3.68 |
framework_AbstractColorPicker_isHtmlContentAllowed | /**
* Return HTML rendering setting.
*
* @return <code>true</code> if the caption text is to be rendered as HTML,
* <code>false</code> otherwise
* @deprecated as of , use {@link #isCaptionAsHtml()} instead
*/
@Deprecated
public boolean isHtmlContentAllowed() {
return isCaptionAsHtml();
} | 3.68 |
druid_MySqlSelectIntoParser_parseIntoArgs | /**
* parser the select into arguments
*
* @return
*/
protected List<SQLExpr> parseIntoArgs() {
List<SQLExpr> args = new ArrayList<SQLExpr>();
if (lexer.token() == (Token.INTO)) {
accept(Token.INTO);
//lexer.nextToken();
for (; ; ) {
SQLExpr var = exprParser.primary();
... | 3.68 |
hbase_PrivateCellUtil_isDeleteColumnOrFamily | /** Returns True if this cell is a delete family or column type. */
public static boolean isDeleteColumnOrFamily(Cell cell) {
int t = cell.getTypeByte();
return t == KeyValue.Type.DeleteColumn.getCode() || t == KeyValue.Type.DeleteFamily.getCode();
} | 3.68 |
hbase_AsyncConnection_getBufferedMutator | /**
* Retrieve an {@link AsyncBufferedMutator} for performing client-side buffering of writes.
* <p>
* The returned instance will use default configs. Use
* {@link #getBufferedMutatorBuilder(TableName, ExecutorService)} if you want to customize some
* configs.
* @param tableName the name of the table
* @param po... | 3.68 |
flink_StreamExecutionEnvironment_getTypeInfo | // Private helpers.
@SuppressWarnings("unchecked")
private <OUT, T extends TypeInformation<OUT>> T getTypeInfo(
Object source,
String sourceName,
Class<?> baseSourceClass,
TypeInformation<OUT> typeInfo) {
TypeInformation<OUT> resolvedTypeInfo = typeInfo;
if (resolvedTypeInfo == n... | 3.68 |
hudi_CopyOnWriteInputFormat_getBlockIndexForPosition | /**
* Retrieves the index of the <tt>BlockLocation</tt> that contains the part of the file described by the given
* offset.
*
* @param blocks The different blocks of the file. Must be ordered by their offset.
* @param offset The offset of the position in the file.
* @param startIndex The earliest index to... | 3.68 |
framework_VaadinSession_setLastRequestDuration | /**
* Sets the time spent servicing the last request in the session and updates
* the total time spent servicing requests in this session.
*
* @param time
* The time spent in the last request, in milliseconds.
*/
public void setLastRequestDuration(long time) {
assert hasLock();
lastRequestDurat... | 3.68 |
pulsar_ManagedLedgerConfig_getClock | /**
* Get clock to use to time operations.
*
* @return a clock
*/
public Clock getClock() {
return clock;
} | 3.68 |
flink_AbstractInvokable_getEnvironment | /**
* Returns the environment of this task.
*
* @return The environment of this task.
*/
public final Environment getEnvironment() {
return this.environment;
} | 3.68 |
streampipes_DataSinkApi_subscribe | /**
* Subscribe to the input stream of the sink
*
* @param sink The data sink to subscribe to
* @param brokerConfigOverride Additional kafka settings which will override the default value (see docs)
* @param callback The callback where events will be received
*/
@Override
public ISubsc... | 3.68 |
flink_KvStateRegistry_registerKvState | /**
* Registers the KvState instance and returns the assigned ID.
*
* @param jobId JobId the KvState instance belongs to
* @param jobVertexId JobVertexID the KvState instance belongs to
* @param keyGroupRange Key group range the KvState instance belongs to
* @param registrationName Name under which the KvState is... | 3.68 |
MagicPlugin_BoundingBox_scaleFromBase | /**
* Scale this BoundingBox, but keep the min-Y value constant.
*
* <p>Useful for scaling entity AABB's.
*
* @return the scaled BB (this object)
*/
public BoundingBox scaleFromBase(double scale, double scaleY)
{
if (scale <= 0 || scale == 1) return this;
Vector center = this.center();
this.min.setX(... | 3.68 |
hbase_TableSchemaModel_getColumns | /** Returns the columns */
@XmlElement(name = "ColumnSchema")
public List<ColumnSchemaModel> getColumns() {
return columns;
} | 3.68 |
hadoop_AbfsHttpOperation_getConnResponseCode | /**
* Gets the connection response code.
* @return response code.
* @throws IOException
*/
Integer getConnResponseCode() throws IOException {
return connection.getResponseCode();
} | 3.68 |
dubbo_ConfigUtils_loadProperties | /**
* Load properties file to {@link Properties} from class path.
*
* @param fileName properties file name. for example: <code>dubbo.properties</code>, <code>METE-INF/conf/foo.properties</code>
* @param allowMultiFile if <code>false</code>, throw {@link IllegalStateException} when found multi file on the clas... | 3.68 |
querydsl_StringExpression_isEmpty | /**
* Create a {@code this.isEmpty()} expression
*
* <p>Return true if this String is empty</p>
*
* @return this.isEmpty()
* @see java.lang.String#isEmpty()
*/
public BooleanExpression isEmpty() {
if (isempty == null) {
isempty = Expressions.booleanOperation(Ops.STRING_IS_EMPTY, mixin);
}
ret... | 3.68 |
zxing_Code39Reader_toNarrowWidePattern | // For efficiency, returns -1 on failure. Not throwing here saved as many as 700 exceptions
// per image when using some of our blackbox images.
private static int toNarrowWidePattern(int[] counters) {
int numCounters = counters.length;
int maxNarrowCounter = 0;
int wideCounters;
do {
int minCounter = Integ... | 3.68 |
flink_SavepointReader_read | /**
* Loads an existing savepoint. Useful if you want to query the state of an existing
* application.
*
* @param env The execution environment used to transform the savepoint.
* @param path The path to an existing savepoint on disk.
* @param stateBackend The state backend of the savepoint.
* @return A {@link Sa... | 3.68 |
hadoop_TimedHealthReporterService_setHealthReport | /**
* Sets the health report from the node health check. Also set the disks'
* health info obtained from DiskHealthCheckerService.
*
* @param report report String
*/
private synchronized void setHealthReport(String report) {
this.healthReport = report;
} | 3.68 |
morf_AbstractSelectStatementBuilder_castToChild | /**
* @param abstractSelectStatement
* @return
*/
@SuppressWarnings("unchecked")
private T castToChild(AbstractSelectStatementBuilder<U, T> abstractSelectStatement) {
return (T) abstractSelectStatement;
} | 3.68 |
zxing_IntentIntegrator_initiateScan | /**
* Initiates a scan, using the specified camera, only for a certain set of barcode types, given as strings
* corresponding to their names in ZXing's {@code BarcodeFormat} class like "UPC_A". You can supply constants
* like {@link #PRODUCT_CODE_TYPES} for example.
*
* @param desiredBarcodeFormats names of {@code... | 3.68 |
hbase_Get_setTimestamp | /**
* Get versions of columns with the specified timestamp.
* @param timestamp version timestamp
* @return this for invocation chaining
*/
public Get setTimestamp(long timestamp) {
try {
tr = TimeRange.at(timestamp);
} catch (Exception e) {
// This should never happen, unless integer overflow or somethi... | 3.68 |
flink_SerializationSchema_open | /**
* Initialization method for the schema. It is called before the actual working methods {@link
* #serialize(Object)} and thus suitable for one time setup work.
*
* <p>The provided {@link InitializationContext} can be used to access additional features such
* as e.g. registering user metrics.
*
* @param contex... | 3.68 |
flink_RocksDBMemoryConfiguration_isUsingManagedMemory | /**
* Gets whether the state backend is configured to use the managed memory of a slot for RocksDB.
* See {@link RocksDBOptions#USE_MANAGED_MEMORY} for details.
*/
public boolean isUsingManagedMemory() {
return useManagedMemory != null
? useManagedMemory
: RocksDBOptions.USE_MANAGED_MEMOR... | 3.68 |
morf_SqlParameter_hashCode | /**
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
return new HashCodeBuilder()
.appendSuper(super.hashCode())
.append(name)
.append(scale)
.append(width)
.append(type)
.toHashCode();
} | 3.68 |
framework_Action_setIcon | /**
* Sets the icon.
*
* @param icon
* the icon to set.
*/
public void setIcon(Resource icon) {
this.icon = icon;
} | 3.68 |
hbase_BitSetNode_alignDown | /** Returns lower boundary (aligned to multiple of BITS_PER_WORD) of bitmap range x belongs to. */
private static long alignDown(final long x) {
return x & -BITS_PER_WORD;
} | 3.68 |
framework_Table_getColumnAlignment | /**
* Gets the specified column's alignment.
*
* @param propertyId
* the propertyID identifying the column.
* @return the specified column's alignment if it as one; {@link Align#LEFT}
* otherwise.
*/
public Align getColumnAlignment(Object propertyId) {
final Align a = columnAlignments.get(... | 3.68 |
framework_VTree_getCommonGrandParent | /**
* Returns the first common parent of two nodes.
*
* @param node1
* The first node
* @param node2
* The second node
* @return The common parent or null
*/
public TreeNode getCommonGrandParent(TreeNode node1, TreeNode node2) {
// If either one does not have a grand parent then return... | 3.68 |
flink_DataSet_printToErr | /**
* Writes a DataSet to the standard error stream (stderr).
*
* <p>For each element of the DataSet the result of {@link Object#toString()} is written.
*
* @param sinkIdentifier The string to prefix the output with.
* @return The DataSink that writes the DataSet.
* @deprecated Use {@link #printOnTaskManager(Str... | 3.68 |
flink_FunctionTemplate_createResultTemplate | /** Creates an instance of {@link FunctionResultTemplate} from a {@link DataTypeHint}. */
static @Nullable FunctionResultTemplate createResultTemplate(
DataTypeFactory typeFactory, @Nullable DataTypeHint hint) {
if (hint == null) {
return null;
}
final DataTypeTemplate template;
try {
... | 3.68 |
hudi_BaseHoodieWriteClient_writeTableMetadata | /**
* Write the HoodieCommitMetadata to metadata table if available.
*
* @param table {@link HoodieTable} of interest.
* @param instantTime instant time of the commit.
* @param metadata instance of {@link HoodieCommitMetadata}.
* @param writeStatuses WriteStatuses for the completed action.
*/
prot... | 3.68 |
hudi_HadoopConfigurations_getParquetConf | /**
* Creates a merged hadoop configuration with given flink configuration and hadoop configuration.
*/
public static org.apache.hadoop.conf.Configuration getParquetConf(
org.apache.flink.configuration.Configuration options,
org.apache.hadoop.conf.Configuration hadoopConf) {
org.apache.hadoop.conf.Configura... | 3.68 |
framework_AbstractSplitPanel_getOldSplitPosition | /**
* Returns the position of the split before this change event occurred.
*
* @since 8.1
*
* @return the split position previously set to the source of this event
*/
public float getOldSplitPosition() {
return oldPosition;
} | 3.68 |
hbase_BloomFilterFactory_createDeleteBloomAtWrite | /**
* Creates a new Delete Family Bloom filter at the time of
* {@link org.apache.hadoop.hbase.regionserver.HStoreFile} writing.
* @param maxKeys an estimate of the number of keys we expect to insert. Irrelevant if compound
* Bloom filters are enabled.
* @param writer the HFile writer
* @return th... | 3.68 |
framework_LogSection_toggleScrollLock | /**
* Toggles scroll lock, writes state to persistent storage.
*/
void toggleScrollLock() {
setScrollLock(scrollTimer != null);
Storage storage = Storage.getLocalStorageIfSupported();
if (storage == null) {
return;
}
VDebugWindow.writeState(storage, "log-scrollLock", scrollTimer == null);... | 3.68 |
flink_LookupFunction_eval | /** Invoke {@link #lookup} and handle exceptions. */
public final void eval(Object... keys) {
GenericRowData keyRow = GenericRowData.of(keys);
try {
Collection<RowData> lookup = lookup(keyRow);
if (lookup == null) {
return;
}
lookup.forEach(this::collect);
} catch... | 3.68 |
hudi_LSMTimelineWriter_compactedFileName | /**
* Returns a new file name.
*/
@VisibleForTesting
public static String compactedFileName(List<String> files) {
String minInstant = files.stream().map(LSMTimeline::getMinInstantTime)
.min(Comparator.naturalOrder()).get();
String maxInstant = files.stream().map(LSMTimeline::getMaxInstantTime)
.max(Co... | 3.68 |
flink_StateMap_releaseSnapshot | /**
* Releases a snapshot for this {@link StateMap}. This method should be called once a snapshot
* is no more needed.
*
* @param snapshotToRelease the snapshot to release, which was previously created by this state
* map.
*/
public void releaseSnapshot(
StateMapSnapshot<K, N, S, ? extends StateMap<K,... | 3.68 |
pulsar_RawBatchMessageContainerImpl_setCryptoKeyReader | /**
* Sets a CryptoKeyReader instance to encrypt batched messages during serialization, `toByteBuf()`.
* @param cryptoKeyReader a CryptoKeyReader instance
*/
public void setCryptoKeyReader(CryptoKeyReader cryptoKeyReader) {
this.cryptoKeyReader = cryptoKeyReader;
} | 3.68 |
flink_Transformation_setOutputType | /**
* Tries to fill in the type information. Type information can be filled in later when the
* program uses a type hint. This method checks whether the type information has ever been
* accessed before and does not allow modifications if the type was accessed already. This
* ensures consistency by making sure diffe... | 3.68 |
hadoop_BalanceProcedureScheduler_getAllJobs | /**
* Return all jobs in the scheduler.
*/
public Collection<BalanceJob> getAllJobs() {
return jobSet.values();
} | 3.68 |
hudi_HoodieFlinkClusteringJob_cluster | /**
* Follows the same execution methodology of HoodieFlinkCompactor, where only one clustering job is allowed to be
* executed at any point in time.
* <p>
* If there is an inflight clustering job, it will be rolled back and re-attempted.
* <p>
* A clustering plan will be generated if `schedule` is true.
*
* @t... | 3.68 |
hadoop_TimelineEntity_setEntityType | /**
* Set the entity type
*
* @param entityType
* the entity type
*/
public void setEntityType(String entityType) {
this.entityType = entityType;
} | 3.68 |
hadoop_PersistentCommitData_saveFile | /**
* Save to a file.
* This uses the createFile() API, which S3A supports for
* faster load and declaring sequential access, always
*
* @param <T> type of persistent format
* @param fs filesystem
* @param path path to save to
* @param instance data to save
* @param serializer serializer to use
* @param perfo... | 3.68 |
flink_ExecutionConfig_getExecutionMode | /**
* Gets the execution mode used to execute the program. The execution mode defines whether data
* exchanges are performed in a batch or on a pipelined manner.
*
* <p>The default execution mode is {@link ExecutionMode#PIPELINED}.
*
* @return The execution mode for the program.
* @deprecated The {@link Executio... | 3.68 |
hadoop_MetricStringBuilder_tuple | /**
* Add any key,val pair to the string, between the prefix and suffix,
* separated by the separator.
* @param key key
* @param value value
* @return this instance
*/
public MetricStringBuilder tuple(String key, String value) {
builder.append(prefix)
.append(key)
.append(separator)
.append(va... | 3.68 |
hadoop_ServiceLauncher_getConfiguration | /**
* Get the configuration constructed from the command line arguments.
* @return the configuration used to create the service
*/
public final Configuration getConfiguration() {
return configuration;
} | 3.68 |
MagicPlugin_Base64Coder_encodeLines | /**
* Encodes a byte array into Base 64 format and breaks the output into lines.
*
* @param in An array containing the data bytes to be encoded.
* @param iOff Offset of the first byte in <code>in</code> to be processed.
* @param iLen Number of bytes to be processed in <code>in</code>, ... | 3.68 |
open-banking-gateway_FacadeResult_getBody | /**
* Response body
*/
default T getBody() {
return null;
} | 3.68 |
hbase_JSONBean_write | /** Returns Return non-zero if failed to find bean. 0 */
private static int write(JsonWriter writer, MBeanServer mBeanServer, ObjectName qry,
String attribute, boolean description, ObjectName excluded) throws IOException {
LOG.debug("Listing beans for {}", qry);
Set<ObjectName> names = mBeanServer.queryNames(qry,... | 3.68 |
hadoop_ManifestCommitter_getTaskAttemptCommittedManifest | /**
* Get the manifest of the last committed task.
* @return a task manifest or null.
*/
@VisibleForTesting
TaskManifest getTaskAttemptCommittedManifest() {
return taskAttemptCommittedManifest;
} | 3.68 |
flink_StreamExecutionEnvironment_setBufferTimeout | /**
* Sets the maximum time frequency (milliseconds) for the flushing of the output buffers. By
* default the output buffers flush frequently to provide low latency and to aid smooth
* developer experience. Setting the parameter can result in three logical modes:
*
* <ul>
* <li>A positive integer triggers flush... | 3.68 |
morf_XmlDataSetProducer_getScale | /**
* @see org.alfasoftware.morf.metadata.Column#getScale()
*/
@Override
public int getScale() {
if (scale == null) {
return 0;
}
return scale;
} | 3.68 |
hbase_OrderedInt8_decodeByte | /**
* Read a {@code byte} value from the buffer {@code src}.
* @param src the {@link PositionedByteRange} to read the {@code byte} from
* @return the {@code byte} read from the buffer
*/
public byte decodeByte(PositionedByteRange src) {
return OrderedBytes.decodeInt8(src);
} | 3.68 |
hadoop_ResourceRequest_getExecutionTypeRequest | /**
* Get whether locality relaxation is enabled with this
* <code>ResourceRequest</code>. Defaults to true.
*
* @return whether locality relaxation is enabled with this
* <code>ResourceRequest</code>.
*/
@Public
@Evolving
public ExecutionTypeRequest getExecutionTypeRequest() {
throw new UnsupportedOperationExc... | 3.68 |
hbase_TableSchemaModel_addAttribute | /**
* Add an attribute to the table descriptor
* @param name attribute name
* @param value attribute value
*/
@JsonAnySetter
public void addAttribute(String name, Object value) {
attrs.put(new QName(name), value);
} | 3.68 |
shardingsphere-elasticjob_JobConfiguration_staticSharding | /**
* Set static sharding.
*
* @param staticSharding static sharding
* @return ElasticJob configuration builder
*/
public Builder staticSharding(final boolean staticSharding) {
this.staticSharding = staticSharding;
return this;
} | 3.68 |
hbase_DynamicMetricsRegistry_tag | /**
* Add a tag to the metrics
* @param info metadata of the tag
* @param value of the tag
* @param override existing tag if true
* @return the registry (for keep adding tags etc.)
*/
public DynamicMetricsRegistry tag(MetricsInfo info, String value, boolean override) {
MetricsTag tag = Interns.tag(info, ... | 3.68 |
hbase_BaseEnvironment_startup | /** Initialize the environment */
public void startup() throws IOException {
if (state == Coprocessor.State.INSTALLED || state == Coprocessor.State.STOPPED) {
state = Coprocessor.State.STARTING;
Thread currentThread = Thread.currentThread();
ClassLoader hostClassLoader = currentThread.getContextClassLoade... | 3.68 |
hadoop_ManifestCommitterSupport_createTaskManifest | /**
* Create a task attempt dir; stage config must be for a task attempt.
* @param stageConfig state config.
* @return a manifest with job and task attempt info set up.
*/
public static TaskManifest createTaskManifest(StageConfig stageConfig) {
final TaskManifest manifest = new TaskManifest();
manifest.setTaskA... | 3.68 |
hudi_DeletePartitionUtils_checkForPendingTableServiceActions | /**
* Check if there are any pending table service actions (requested + inflight) on a table affecting the partitions to
* be dropped.
* <p>
* This check is to prevent a drop-partition from proceeding should a partition have a table service action in
* the pending stage. If this is allowed to happen, the filegroup... | 3.68 |
hbase_SingleColumnValueFilter_getLatestVersionOnly | /**
* Get whether only the latest version of the column value should be compared. If true, the row
* will be returned if only the latest version of the column value matches. If false, the row will
* be returned if any version of the column value matches. The default is true.
* @return return value
*/
public boolea... | 3.68 |
hbase_SkipFilter_toByteArray | /** Returns The filter serialized using pb */
@Override
public byte[] toByteArray() throws IOException {
FilterProtos.SkipFilter.Builder builder = FilterProtos.SkipFilter.newBuilder();
builder.setFilter(ProtobufUtil.toFilter(this.filter));
return builder.build().toByteArray();
} | 3.68 |
framework_LogSection_getLimit | /**
* Gets the current log row limit.
*
* @return
*/
public int getLimit() {
// TODO should be read from persistent storage
return limit;
} | 3.68 |
hbase_QuotaSettingsFactory_removeNamespaceSpaceLimit | /**
* Creates a {@link QuotaSettings} object to remove the FileSystem space quota for the given
* namespace.
* @param namespace The namespace to remove the quota on.
* @return A {@link QuotaSettings} object.
*/
public static QuotaSettings removeNamespaceSpaceLimit(String namespace) {
return new SpaceLimitSetting... | 3.68 |
flink_OrInputTypeStrategy_commonMax | /** Returns the common maximum argument count or null if undefined. */
private static @Nullable Integer commonMax(List<ArgumentCount> counts) {
// max=5, max=3, max=0 -> max=5
// max=5, max=3, max=0, max=null -> max=null
int commonMax = Integer.MIN_VALUE;
for (ArgumentCount count : counts) {
... | 3.68 |
hudi_KafkaConnectHdfsProvider_listAllFileStatus | /**
* List file status recursively.
*
* @param curPath Current Path
* @param filter PathFilter
* @return All file status match kafka connect naming convention
* @throws IOException
*/
private ArrayList<FileStatus> listAllFileStatus(Path curPath,
KafkaConnectPathFi... | 3.68 |
hbase_HRegion_checkInterrupt | /**
* Check thread interrupt status and throw an exception if interrupted.
* @throws NotServingRegionException if region is closing
* @throws InterruptedIOException if interrupted but region is not closing
*/
// Package scope for tests
void checkInterrupt() throws NotServingRegionException, InterruptedIOExceptio... | 3.68 |
AreaShop_FileManager_addRegionNoSave | /**
* Add a region to the list without saving it to disk (useful for loading at startup).
* @param region The region to add
* @return true when successful, otherwise false (denied by an event listener)
*/
public AddingRegionEvent addRegionNoSave(GeneralRegion region) {
AddingRegionEvent event = new AddingRegionEve... | 3.68 |
MagicPlugin_CompatibilityUtilsBase_toMinecraftAttribute | // Taken from CraftBukkit code.
protected String toMinecraftAttribute(Attribute attribute) {
String bukkit = attribute.name();
int first = bukkit.indexOf('_');
int second = bukkit.indexOf('_', first + 1);
StringBuilder sb = new StringBuilder(bukkit.toLowerCase(java.util.Locale.ENGLISH));
sb.setCha... | 3.68 |
hudi_HoodieTimer_start | /**
* Creates an instance of {@link HoodieTimer} already started
*/
public static HoodieTimer start() {
return new HoodieTimer(true);
} | 3.68 |
flink_TaskManagerLocation_getResourceID | /**
* Gets the ID of the resource in which the TaskManager is started. The format of this depends
* on how the TaskManager is started:
*
* <ul>
* <li>If the TaskManager is started via YARN, this is the YARN container ID.
* <li>If the TaskManager is started in standalone mode, or via a MiniCluster, this is a
... | 3.68 |
hbase_CellFlatMap_navigableKeySet | // -------------------------------- Sub-Sets --------------------------------
@Override
public NavigableSet<Cell> navigableKeySet() {
throw new UnsupportedOperationException();
} | 3.68 |
hbase_RSGroupAdminClient_getRSGroupOfServer | /**
* Retrieve the RSGroupInfo a server is affiliated to
* @param hostPort HostPort to get RSGroupInfo for
*/
public RSGroupInfo getRSGroupOfServer(Address hostPort) throws IOException {
GetRSGroupInfoOfServerRequest request =
GetRSGroupInfoOfServerRequest.newBuilder().setServer(HBaseProtos.ServerName.newBuild... | 3.68 |
framework_Window_addWindowModeChangeListener | /**
* Adds a WindowModeChangeListener to the window.
*
* The WindowModeChangeEvent is fired when the user changed the display
* state by clicking the maximize/restore button or by double clicking on
* the window header. The event is also fired if the state is changed using
* {@link #setWindowMode(WindowMode)}.
*... | 3.68 |
hbase_IdentityTableReduce_reduce | /**
* No aggregation, output pairs of (key, record)
*/
public void reduce(ImmutableBytesWritable key, Iterator<Put> values,
OutputCollector<ImmutableBytesWritable, Put> output, Reporter reporter) throws IOException {
while (values.hasNext()) {
output.collect(key, values.next());
}
} | 3.68 |
hadoop_CacheDirectiveStats_setBytesNeeded | /**
* Sets the bytes needed by this directive.
*
* @param bytesNeeded The bytes needed.
* @return This builder, for call chaining.
*/
public Builder setBytesNeeded(long bytesNeeded) {
this.bytesNeeded = bytesNeeded;
return this;
} | 3.68 |
flink_ResultPartitionFactory_createBufferPoolFactory | /**
* The minimum pool size should be <code>numberOfSubpartitions + 1</code> for two
* considerations:
*
* <p>1. StreamTask can only process input if there is at-least one available buffer on output
* side, so it might cause stuck problem if the minimum pool size is exactly equal to the number
* of subpartitions,... | 3.68 |
flink_DataSet_minBy | /**
* Selects an element with minimum value.
*
* <p>The minimum is computed over the specified fields in lexicographical order.
*
* <p><strong>Example 1</strong>: Given a data set with elements <code>[0, 1], [1, 0]</code>,
* the results will be:
*
* <ul>
* <li><code>minBy(0)</code>: <code>[0, 1]</code>
* ... | 3.68 |
hbase_ClusterStatusTracker_setClusterUp | /**
* Sets the cluster as up.
* @throws KeeperException unexpected zk exception
*/
public void setClusterUp() throws KeeperException {
byte[] upData = toByteArray();
try {
ZKUtil.createAndWatch(watcher, watcher.getZNodePaths().clusterStateZNode, upData);
} catch (KeeperException.NodeExistsException nee) {
... | 3.68 |
dubbo_ConfigurationUtils_getCachedDynamicProperty | /**
* For compact single instance
*
* @deprecated Replaced to {@link ConfigurationUtils#getCachedDynamicProperty(ScopeModel, String, String)}
*/
@Deprecated
public static String getCachedDynamicProperty(String key, String defaultValue) {
return getCachedDynamicProperty(ApplicationModel.defaultModel(), key, defa... | 3.68 |
flink_RocksDBOptionsFactory_createReadOptions | /**
* This method should set the additional options on top of the current options object. The
* current options object may contain pre-defined options based on flags that have been
* configured on the state backend.
*
* <p>It is important to set the options on the current object and return the result from the
* s... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.