name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hudi_CompactionUtil_rollbackCompaction | /**
* Force rolls back all the inflight compaction instants, especially for job failover restart.
*
* @param table The hoodie table
*/
public static void rollbackCompaction(HoodieFlinkTable<?> table) {
HoodieTimeline inflightCompactionTimeline = table.getActiveTimeline()
.filterPendingCompactionTimeline()
... | 3.68 |
flink_PythonShellParser_constructYarnOption | /**
* Constructs yarn options. The python shell option will add prefix 'y' to align yarn options in
* `flink run`.
*
* @param options Options that will be used in `flink run`.
* @param yarnOption Python shell yarn options.
* @param commandLine Parsed Python shell parser options.
*/
private static void constructY... | 3.68 |
morf_SqlDialect_appendHaving | /**
* appends having clause to the result
*
* @param result having clause will be appended here
* @param stmt statement with having clause
*/
protected void appendHaving(StringBuilder result, SelectStatement stmt) {
if (stmt.getHaving() != null) {
result.append(" HAVING ");
result.append(getSqlFrom(stmt.... | 3.68 |
hadoop_AbfsPermission_getAclBit | /**
* Returns true if there is also an ACL (access control list).
*
* @return boolean true if there is also an ACL (access control list).
* @deprecated Get acl bit from the {@link org.apache.hadoop.fs.FileStatus}
* object.
*/
public boolean getAclBit() {
return aclBit;
} | 3.68 |
morf_AbstractSqlDialectTest_testDeleteWithLimitAndComplexWhereCriterion | /**
* Tests that a delete string with a limit and a complex where criterion (involving an 'OR') is created correctly (i.e. brackets around the 'OR' are preserved).
*/
@Test
public void testDeleteWithLimitAndComplexWhereCriterion() {
DeleteStatement stmt = DeleteStatement
.delete(new TableReference(TEST_TABLE))
... | 3.68 |
hadoop_IdentifierResolver_getOutputKeyClass | /**
* Returns the resolved output key class.
*/
public Class getOutputKeyClass() {
return outputKeyClass;
} | 3.68 |
flink_TimerGauge_getMaxSingleMeasurement | /**
* @return the longest marked period as measured by the given * TimerGauge. For example the
* longest consecutive back pressured period.
*/
public synchronized long getMaxSingleMeasurement() {
return previousMaxSingleMeasurement;
} | 3.68 |
morf_DeleteStatementBuilder_limit | /**
* Specifies the limit for the delete statement.
*
* <blockquote><pre>DeleteStatement.delete([table])
* .where([criteria])
* .limit(1000)
* .build();</pre></blockquote>
*
* @param limit the limit on the number of deleted records.
* @return this, for method chaining.
*/
public DeleteStatementBuilde... | 3.68 |
framework_ListenerMethod_isType | /**
* Compares the type of this ListenerMethod to the given type.
*
* @param eventType
* The type to compare with
* @return true if this type of this ListenerMethod matches the given type,
* false otherwise
*/
public boolean isType(Class<?> eventType) {
return this.eventType == eventType;
... | 3.68 |
framework_AbstractDateField_afterDate | /**
* Checks if {@code value} is after {@code base} or not.
*
* @param value
* temporal value
* @param base
* temporal value to compare to
* @return {@code true} if {@code value} is after {@code base},
* {@code false} otherwise
*/
protected boolean afterDate(T value, T base) {
... | 3.68 |
hbase_SegmentFactory_createCompositeImmutableSegment | // create composite immutable segment from a list of segments
// for snapshot consisting of multiple segments
public CompositeImmutableSegment createCompositeImmutableSegment(final CellComparator comparator,
List<ImmutableSegment> segments) {
return new CompositeImmutableSegment(comparator, segments);
} | 3.68 |
flink_Execution_getTerminalStateFuture | /**
* Gets a future that completes once the task execution reaches a terminal state. The future
* will be completed with specific state that the execution reached. This future is always
* completed from the job master's main thread.
*
* @return A future which is completed once the execution reaches a terminal stat... | 3.68 |
hbase_StorageClusterStatusModel_addDeadNode | /**
* Add a dead node to the cluster representation.
* @param node the dead region server's name
*/
public void addDeadNode(String node) {
deadNodes.add(node);
} | 3.68 |
framework_AbstractRendererConnector_getRowKey | /**
* Gets the row key for a row object.
* <p>
* In case this renderer wants be able to identify a row in such a way that
* the server also understands it, the row key is used for that. Rows are
* identified by unified keys between the client and the server.
*
* @param row
* the row object
* @return... | 3.68 |
framework_Window_setTabStopTopAssistiveText | /**
* Sets the message that is provided to users of assistive devices when the
* user reaches the top of the window when leaving a window with the tab key
* is prevented.
* <p>
* This message is not visible on the screen.
*
* @param topMessage
* String provided when the user navigates with Shift-Tab ... | 3.68 |
streampipes_ConnectWorkerDescriptionProvider_getAdapterDescriptions | /**
* Retrieves a list of all adapter descriptions that are currently registered.
* @return a list of {@link AdapterDescription} objects representing the registered adapters
*/
public List<AdapterDescription> getAdapterDescriptions() {
return getRegisteredAdapters()
.stream()
.map(adapter -> applyLoc... | 3.68 |
framework_VTabsheetPanel_replaceComponent | /**
* Removes the old component and sets the new component to its place.
*
* @param oldComponent
* the component to remove
* @param newComponent
* the component to add to the old location
*/
public void replaceComponent(Widget oldComponent, Widget newComponent) {
boolean isVisible = (vi... | 3.68 |
hbase_LogRollBackupSubprocedure_releaseBarrier | /**
* Hooray!
*/
public void releaseBarrier() {
// NO OP
} | 3.68 |
flink_RocksDBIncrementalRestoreOperation_readMetaData | /** Reads Flink's state meta data file from the state handle. */
private KeyedBackendSerializationProxy<K> readMetaData(StreamStateHandle metaStateHandle)
throws Exception {
InputStream inputStream = null;
try {
inputStream = metaStateHandle.openInputStream();
cancelStreamRegistry.regi... | 3.68 |
hadoop_ManifestSuccessData_getFilenamePaths | /**
* Get the list of filenames as paths.
* @return the paths.
*/
@JsonIgnore
public List<Path> getFilenamePaths() {
return getFilenames().stream()
.map(AbstractManifestData::unmarshallPath)
.collect(Collectors.toList());
} | 3.68 |
hbase_BloomFilterFactory_createGeneralBloomAtWrite | /**
* Creates a new general (Row or RowCol) 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
* ... | 3.68 |
hadoop_ResourceRequest_getAllocationRequestId | /**
* Get the optional <em>ID</em> corresponding to this allocation request. This
* ID is an identifier for different {@code ResourceRequest}s from the <b>same
* application</b>. The allocated {@code Container}(s) received as part of the
* {@code AllocateResponse} response will have the ID corresponding to the
* o... | 3.68 |
flink_HiveTablePartition_ofTable | /**
* Creates a HiveTablePartition to represent a hive table.
*
* @param hiveConf the HiveConf used to connect to HMS
* @param hiveVersion the version of hive in use, if it's null the version will be automatically
* detected
* @param dbName name of the database
* @param tableName name of the table
*/
public... | 3.68 |
hadoop_Validate_checkPathExists | /**
* Validates that the given path exists.
* @param path the path to check.
* @param argName the name of the argument being validated.
*/
public static void checkPathExists(Path path, String argName) {
checkNotNull(path, argName);
checkArgument(Files.exists(path), "Path %s (%s) does not exist.", argName,
... | 3.68 |
flink_CommonExecSink_getTargetRowKind | /**
* Get the target row-kind that the row data should change to, assuming the current row kind is
* RowKind.INSERT. Return Optional.empty() if it doesn't need to change. Currently, it'll only
* consider row-level delete/update.
*/
private Optional<RowKind> getTargetRowKind() {
if (tableSinkSpec.getSinkAbilitie... | 3.68 |
framework_StringToDoubleConverter_getModelType | /*
* (non-Javadoc)
*
* @see com.vaadin.data.util.converter.Converter#getModelType()
*/
@Override
public Class<Double> getModelType() {
return Double.class;
} | 3.68 |
flink_Broker_handIn | /** Hand in the object to share. */
public void handIn(String key, V obj) {
if (!retrieveSharedQueue(key).offer(obj)) {
throw new RuntimeException(
"Could not register the given element, broker slot is already occupied.");
}
} | 3.68 |
flink_TaskExecutorManager_clearPendingTaskManagerSlots | /** clear all pending task manager slots. */
public void clearPendingTaskManagerSlots() {
if (!resourceAllocator.isSupported()) {
return;
}
if (!pendingSlots.isEmpty()) {
this.pendingSlots.clear();
declareNeededResourcesWithDelay();
}
} | 3.68 |
framework_TooltipInfo_getTitle | /**
* Gets the tooltip title.
*
* @return the title
*/
public String getTitle() {
return title;
} | 3.68 |
rocketmq-connect_MetricUtils_stringToMetricName | /**
* string to MetricName
*
* @param name
* @return
*/
public static MetricName stringToMetricName(String name) {
if (StringUtils.isEmpty(name)) {
throw new IllegalArgumentException("Metric name str is empty");
}
String[] splits = name.replace(ROCKETMQ_CONNECT, "").replace(SPLIT_KV, SPLIT_COMM... | 3.68 |
flink_ExecutionConfig_registerTypeWithKryoSerializer | /**
* Registers the given Serializer via its class as a serializer for the given type at the
* KryoSerializer
*
* @param type The class of the types serialized with the given serializer.
* @param serializerClass The class of the serializer to use.
*/
@SuppressWarnings("rawtypes")
public void registerTypeWithKryoS... | 3.68 |
streampipes_EpProperties_listBooleanEp | /**
* Creates a new list-based event property of type boolean and with the assigned domain property.
*
* @param label A human-readable label of the property
* @param runtimeName The field identifier of the event property at runtime.
* @param domainProperty The semantics of the list property as a String... | 3.68 |
morf_InsertStatementBuilder_useDirectPath | /**
* If supported by the dialect, hints to the database that an {@code APPEND} query hint should be used in the insert statement.
*
* <p>In general, as with all query plan modification, <strong>do not use this unless you know
* exactly what you are doing</strong>.</p>
*
* <p>These directives are applied in the S... | 3.68 |
flink_FactoryUtil_createTableSink | /**
* Creates a {@link DynamicTableSink} from a {@link CatalogTable}.
*
* <p>It considers {@link Catalog#getFactory()} if provided.
*
* @deprecated Use {@link #createDynamicTableSink(DynamicTableSinkFactory, ObjectIdentifier,
* ResolvedCatalogTable, Map, ReadableConfig, ClassLoader, boolean)} instead.
*/
@De... | 3.68 |
hudi_ImmutablePair_of | /**
* <p>
* Obtains an immutable pair of from two objects inferring the generic types.
* </p>
*
* <p>
* This factory allows the pair to be created using inference to obtain the generic types.
* </p>
*
* @param <L> the left element type
* @param <R> the right element type
* @param left the left element, may b... | 3.68 |
hadoop_HdfsFileStatus_symlink | /**
* Set symlink bytes for this entity (default = null).
* @param symlink Symlink bytes (see
* {@link DFSUtilClient#bytes2String(byte[])})
* @return This Builder instance
*/
public Builder symlink(byte[] symlink) {
this.symlink = null == symlink
? null
: Arrays.copyOf(symlink, symlink... | 3.68 |
hbase_Constraints_enable | /**
* Enable constraints on a table.
* <p/>
* Currently, if you attempt to add a constraint to the table, then Constraints will automatically
* be turned on.
*/
public static TableDescriptorBuilder enable(TableDescriptorBuilder builder) throws IOException {
if (!builder.hasCoprocessor(ConstraintProcessor.class.g... | 3.68 |
flink_MutableHashTable_buildInitialTable | /**
* Creates the initial hash table. This method sets up partitions, hash index, and inserts the
* data from the given iterator.
*
* @param input The iterator with the build side data.
* @throws IOException Thrown, if an element could not be fetched and deserialized from the
* iterator, or if serialization f... | 3.68 |
hadoop_LocalSASKeyGeneratorImpl_getDefaultAccountAccessPolicy | /**
* Helper method to generate Access Policy for the Storage Account SAS Key
* @return SharedAccessAccountPolicy
*/
private SharedAccessAccountPolicy getDefaultAccountAccessPolicy() {
SharedAccessAccountPolicy ap =
new SharedAccessAccountPolicy();
Calendar cal = new GregorianCalendar(TimeZone.getTimeZon... | 3.68 |
flink_DelimitedInputFormat_close | /**
* Closes the input by releasing all buffers and closing the file input stream.
*
* @throws IOException Thrown, if the closing of the file stream causes an I/O error.
*/
@Override
public void close() throws IOException {
this.wrapBuffer = null;
this.readBuffer = null;
super.close();
} | 3.68 |
flink_NFACompiler_getCurrentNotCondition | /**
* Retrieves list of conditions resulting in Stop state and names of the corresponding NOT
* patterns.
*
* <p>A current not condition can be produced in two cases:
*
* <ol>
* <li>the previous pattern is a {@link Quantifier.ConsumingStrategy#NOT_FOLLOW}
* <li>exists a backward path of {@link Quantifier.Qu... | 3.68 |
hbase_User_shouldLoginFromKeytab | /**
* In secure environment, if a user specified his keytab and principal, a hbase client will try to
* login with them. Otherwise, hbase client will try to obtain ticket(through kinit) from system.
* @param conf configuration file
* @return true if keytab and principal are configured
*/
public static boolean shou... | 3.68 |
flink_Tuple2_copy | /**
* Shallow tuple copy.
*
* @return A new Tuple with the same fields as this.
*/
@Override
@SuppressWarnings("unchecked")
public Tuple2<T0, T1> copy() {
return new Tuple2<>(this.f0, this.f1);
} | 3.68 |
flink_CrossOperator_projectTuple21 | /**
* Projects a pair of crossed elements to a {@link Tuple} with the previously selected
* fields.
*
* @return The projected data set.
* @see Tuple
* @see DataSet
*/
public <
T0,
T1,
T2,
T3,
T4,
T5,
T... | 3.68 |
morf_MySqlDialect_sqlForDefaultClauseLiteral | /**
* For MySQL, we need to alter the way we render a date literal in a default clause: We need to suppress the "DATE" prefix.
*/
@Override
protected String sqlForDefaultClauseLiteral(Column column) {
if (column.getType() != DataType.DATE) {
return super.sqlForDefaultClauseLiteral(column);
}
// suppress th... | 3.68 |
hbase_TableDescriptorBuilder_toString | /** Returns Name of this table and then a map of all of the column family descriptors. */
@Override
public String toString() {
StringBuilder s = new StringBuilder();
s.append('\'').append(Bytes.toString(name.getName())).append('\'');
s.append(getValues(true));
families.values().forEach(f -> s.append(", ").appen... | 3.68 |
hbase_HRegionFileSystem_setStoragePolicy | /**
* Set storage policy for a whole region. <br>
* <i>"LAZY_PERSIST"</i>, <i>"ALL_SSD"</i>, <i>"ONE_SSD"</i>, <i>"HOT"</i>, <i>"WARM"</i>,
* <i>"COLD"</i> <br>
* <br>
* See {@link org.apache.hadoop.hdfs.protocol.HdfsConstants} for more details.
* @param policyName The name of the storage policy: 'HOT', 'COLD', e... | 3.68 |
starts_Attribute_getSize | /**
* Returns the size of all the attributes in this attribute list.
*
* @param cw
* the class writer to be used to convert the attributes into
* byte arrays, with the {@link #write write} method.
* @param code
* the bytecode of the method corresponding to these code
* ... | 3.68 |
hbase_ServerRpcConnection_setupCryptoCipher | /**
* Set up cipher for rpc encryption with Apache Commons Crypto.
*/
private Pair<RPCProtos.ConnectionHeaderResponse, CryptoAES> setupCryptoCipher()
throws FatalConnectionException {
// If simple auth, return
if (saslServer == null) {
return null;
}
// check if rpc encryption with Crypto AES
String q... | 3.68 |
hadoop_AbfsDtFetcher_getScheme | /**
* Get the scheme for this specific fetcher.
* @return a scheme.
*/
protected String getScheme() {
return FileSystemUriSchemes.ABFS_SCHEME;
} | 3.68 |
flink_ResolvedExpression_asSerializableString | /**
* Returns a string that fully serializes this instance. The serialized string can be used for
* storing the query in, for example, a {@link org.apache.flink.table.catalog.Catalog} as a
* view.
*
* @return detailed string for persisting in a catalog
*/
default String asSerializableString() {
throw new Tabl... | 3.68 |
hbase_AssignReplicationQueuesProcedure_shouldSkip | // check whether ReplicationSyncUp has already done the work for us, if so, we should skip
// claiming the replication queues and deleting them instead.
private boolean shouldSkip(MasterProcedureEnv env) throws IOException {
MasterFileSystem mfs = env.getMasterFileSystem();
Path syncUpDir = new Path(mfs.getRootDir(... | 3.68 |
flink_BloomFilter_optimalNumOfBits | /**
* Compute optimal bits number with given input entries and expected false positive probability.
*
* @param inputEntries
* @param fpp
* @return optimal bits number
*/
public static int optimalNumOfBits(long inputEntries, double fpp) {
int numBits = (int) (-inputEntries * Math.log(fpp) / (Math.log(2) * Math... | 3.68 |
graphhopper_Entity_getRefField | /**
* Used to check referential integrity.
* Return value is not used, but could allow entities to point to each other directly rather than
* using indirection through string-keyed maps.
*/
protected <K, V> V getRefField(String column, boolean required, Map<K, V> target) throws IOException {
String str = getFie... | 3.68 |
hbase_HFilePreadReader_getRegionName | /*
* Get the region name for the given file path. A HFile is always kept under the <region>/<column
* family>/<hfile>. To find the region for a given hFile, just find the name of the grandparent
* directory.
*/
private static String getRegionName(Path path) {
return path.getParent().getParent().getName();
} | 3.68 |
hbase_WALSplitUtil_tryCreateRecoveredHFilesDir | /**
* Return path to recovered.hfiles directory of the region's column family: e.g.
* /hbase/some_table/2323432434/cf/recovered.hfiles/. This method also ensures existence of
* recovered.hfiles directory under the region's column family, creating it if necessary.
* @param rootFS the root file system
* @... | 3.68 |
hadoop_FindOptions_getOut | /**
* Returns the output stream to be used.
*
* @return output stream to be used
*/
public PrintStream getOut() {
return this.out;
} | 3.68 |
flink_PartitionWriter_createNewOutputFormat | /** Create a new output format with path, configure it and open it. */
OutputFormat<T> createNewOutputFormat(Path path) throws IOException {
OutputFormat<T> format = factory.createOutputFormat(path);
format.configure(conf);
// Here we just think of it as a single file format, so there can only be a single t... | 3.68 |
hudi_SecondaryIndexManager_create | /**
* Create a secondary index for hoodie table, two steps will be performed:
* 1. Add secondary index metadata to hoodie.properties
* 2. Trigger build secondary index
*
* @param metaClient Hoodie table meta client
* @param indexName The unique secondary index name
* @param indexType Index type
* ... | 3.68 |
hadoop_NMTokenCache_containsToken | /**
* Returns true if NMToken is present in cache.
*/
@Private
@VisibleForTesting
public boolean containsToken(String nodeAddr) {
return nmTokens.containsKey(nodeAddr);
} | 3.68 |
hbase_MetricsMaster_convertToProcedureMetrics | /**
* This is utility function that converts {@link OperationMetrics} to {@link ProcedureMetrics}.
* NOTE: Procedure framework in hbase-procedure module accesses metrics common to most procedures
* through {@link ProcedureMetrics} interface. Metrics source classes in hbase-hadoop-compat
* module provides similar in... | 3.68 |
framework_Table_removeGeneratedColumn | /**
* Removes a generated column previously added with addGeneratedColumn.
*
* @param columnId
* id of the generated column to remove
* @return true if the column could be removed (existed in the Table)
*/
public boolean removeGeneratedColumn(Object columnId) {
if (columnGenerators.containsKey(colu... | 3.68 |
dubbo_Converter_accept | /**
* Accept the source type and target type or not
*
* @param sourceType the source type
* @param targetType the target type
* @return if accepted, return <code>true</code>, or <code>false</code>
*/
default boolean accept(Class<?> sourceType, Class<?> targetType) {
return isAssignableFrom(sourceType, getSour... | 3.68 |
hbase_Procedure_getProcedureMetrics | /**
* Override this method to provide procedure specific counters for submitted count, failed count
* and time histogram.
* @param env The environment passed to the procedure executor
* @return Container object for procedure related metric
*/
protected ProcedureMetrics getProcedureMetrics(TEnvironment env) {
ret... | 3.68 |
hadoop_PersistentCommitData_saveToStream | /**
* 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 path path to save to (used for logging)
* @param instance data to save
* @param builder builder already prepared for the write
* @p... | 3.68 |
hudi_HoodieGlobalBloomIndex_tagLocationBacktoRecords | /**
* Tagging for global index should only consider the record key.
*/
@Override
protected <R> HoodieData<HoodieRecord<R>> tagLocationBacktoRecords(
HoodiePairData<HoodieKey, HoodieRecordLocation> keyLocationPairs,
HoodieData<HoodieRecord<R>> records,
HoodieTable hoodieTable) {
HoodiePairData<String, Ho... | 3.68 |
framework_VScrollTable_selectFocusedRow | /**
* Selects a row where the current selection head is
*
* @param ctrlSelect
* Is the selection a ctrl+selection
* @param shiftSelect
* Is the selection a shift+selection
* @return Returns truw
*/
private void selectFocusedRow(boolean ctrlSelect, boolean shiftSelect) {
if (focusedRow ... | 3.68 |
pulsar_ClientConfiguration_getMaxNumberOfRejectedRequestPerConnection | /**
* Get configured max number of reject-request in a time-frame (60 seconds) after which connection will be closed.
*
* @return
*/
public int getMaxNumberOfRejectedRequestPerConnection() {
return confData.getMaxNumberOfRejectedRequestPerConnection();
} | 3.68 |
flink_DataSet_leftOuterJoin | /**
* Initiates a Left Outer Join transformation.
*
* <p>An Outer Join transformation joins two elements of two {@link DataSet DataSets} on key
* equality and provides multiple ways to combine joining elements into one DataSet.
*
* <p>Elements of the <b>left</b> DataSet (i.e. {@code this}) that do not have a matc... | 3.68 |
flink_PendingCheckpoint_acknowledgeTask | /**
* Acknowledges the task with the given execution attempt id and the given subtask state.
*
* @param executionAttemptId of the acknowledged task
* @param operatorSubtaskStates of the acknowledged task
* @param metrics Checkpoint metrics for the stats
* @return TaskAcknowledgeResult of the operation
*/
public ... | 3.68 |
dubbo_FileSystemDynamicConfiguration_isBasedPoolingWatchService | /**
* It's whether the implementation of {@link WatchService} is based on {@linkplain sun.nio.fs.PollingWatchService}
* or not.
* <p>
*
* @return if based, return <code>true</code>, or <code>false</code>
* @see #detectPoolingBasedWatchService(Optional)
*/
protected static boolean isBasedPoolingWatchService() {
... | 3.68 |
pulsar_LoadSimulationController_read | /**
* Read the user-submitted arguments as commands to send to clients.
*
* @param args
* Arguments split on whitespace from user input.
*/
private void read(final String[] args) {
// Don't attempt to process blank input.
if (args.length > 0 && !(args.length == 1 && args[0].isEmpty())) {
... | 3.68 |
framework_CheckBox_getCustomAttributes | /*
* (non-Javadoc)
*
* @see com.vaadin.ui.AbstractField#getCustomAttributes()
*/
@Override
protected Collection<String> getCustomAttributes() {
Collection<String> attributes = super.getCustomAttributes();
attributes.add("checked");
return attributes;
} | 3.68 |
framework_FlyweightCell_getElement | /**
* Returns the element of the cell. Can be either a <code>TD</code> element
* or a <code>TH</code> element.
*
* @return the element
*/
public TableCellElement getElement() {
assertSetup();
return element;
} | 3.68 |
querydsl_ExpressionUtils_and | /**
* Create the intersection of the given arguments
*
* @param left lhs of expression
* @param right rhs of expression
* @return left and right
*/
public static Predicate and(Predicate left, Predicate right) {
left = (Predicate) extract(left);
right = (Predicate) extract(right);
if (left == null) {
... | 3.68 |
framework_AbstractConnector_init | /**
* Called when the connector has been initialized. Override this method to
* perform initialization of the connector.
*/
// FIXME: It might make sense to make this abstract to force users to
// use init instead of constructor, where connection and id has not yet been
// set.
protected void init() {
} | 3.68 |
framework_Upload_focus | /**
* {@inheritDoc}
*/
@Override
public void focus() {
super.focus();
} | 3.68 |
framework_VTabsheet_getNextTabKey | /**
* Returns the key code of the keyboard shortcut that focuses the next tab
* in a focused tabsheet.
*
* @return the key to move focus to the next tab
*/
protected int getNextTabKey() {
return KeyCodes.KEY_RIGHT;
} | 3.68 |
flink_PhysicalFile_innerClose | /**
* Close the physical file, stop reusing.
*
* @throws IOException if anything goes wrong with file system.
*/
private void innerClose() throws IOException {
closed = true;
if (outputStream != null) {
outputStream.close();
outputStream = null;
}
} | 3.68 |
hudi_HoodieJavaPairRDD_of | /**
* @param pairRDDData a {@link JavaPairRDD} of pairs.
* @param <K> type of key.
* @param <V> type of value.
* @return a new instance containing the {@link JavaPairRDD<K, V>} reference.
*/
public static <K, V> HoodieJavaPairRDD<K, V> of(JavaPairRDD<K, V> pairRDDData) {
return new HoodieJavaPair... | 3.68 |
querydsl_DateTimeExpression_min | /**
* Get the minimum value of this expression (aggregation)
*
* @return min(this)
*/
@Override
public DateTimeExpression<T> min() {
if (min == null) {
min = Expressions.dateTimeOperation(getType(), Ops.AggOps.MIN_AGG, mixin);
}
return min;
} | 3.68 |
flink_VertexThreadInfoTrackerBuilder_setCleanUpInterval | /**
* Sets {@code cleanUpInterval}.
*
* @param cleanUpInterval Clean up interval for completed stats.
* @return Builder.
*/
public VertexThreadInfoTrackerBuilder setCleanUpInterval(Duration cleanUpInterval) {
this.cleanUpInterval = cleanUpInterval;
return this;
} | 3.68 |
querydsl_GenericExporter_getGeneratedFiles | /**
* Return the set of generated files
*
* @return a set of generated files
*/
public Set<File> getGeneratedFiles() {
return generatedFiles;
} | 3.68 |
hbase_RegionServerFlushTableProcedureManager_initialize | /**
* Initialize this region server flush procedure manager Uses a zookeeper based member controller.
* @param rss region server
* @throws KeeperException if the zookeeper cannot be reached
*/
@Override
public void initialize(RegionServerServices rss) throws KeeperException {
this.rss = rss;
ZKWatcher zkw = rss... | 3.68 |
druid_FileNodeListener_destroy | /**
* Close the ScheduledExecutorService.
*/
@Override
public void destroy() {
if (executor == null || executor.isShutdown()) {
return;
}
try {
executor.shutdown();
} catch (Exception e) {
LOG.error("Can NOT shutdown the ScheduledExecutorService.", e);
}
} | 3.68 |
hadoop_StageConfig_withIOProcessors | /**
* Set builder value.
* @param value new value
* @return this
*/
public StageConfig withIOProcessors(final TaskPool.Submitter value) {
checkOpen();
ioProcessors = value;
return this;
} | 3.68 |
flink_NormalizedKeySorter_reset | /**
* Resets the sort buffer back to the state where it is empty. All contained data is discarded.
*/
@Override
public void reset() {
// reset all offsets
this.numRecords = 0;
this.currentSortIndexOffset = 0;
this.currentDataBufferOffset = 0;
this.sortIndexBytes = 0;
// return all memory
... | 3.68 |
hadoop_TrashPolicy_getCurrentTrashDir | /**
* Get the current trash directory for path specified based on the Trash
* Policy
* @param path path to be deleted
* @return current trash directory for the path to be deleted
* @throws IOException raised on errors performing I/O.
*/
public Path getCurrentTrashDir(Path path) throws IOException {
throw new Un... | 3.68 |
hbase_HFileOutputFormat2_configureIncrementalLoad | /**
* Configure a MapReduce Job to perform an incremental load into the given table. This
* <ul>
* <li>Inspects the table to configure a total order partitioner</li>
* <li>Uploads the partitions file to the cluster and adds it to the DistributedCache</li>
* <li>Sets the number of reduce tasks to match the current ... | 3.68 |
framework_TabsheetNotEnoughHorizontalSpace_getTicketNumber | /*
* (non-Javadoc)
*
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
protected Integer getTicketNumber() {
return 12154;
} | 3.68 |
flink_BinaryHashTable_spillPartition | /**
* Selects a partition and spills it. The number of the spilled partition is returned.
*
* @return The number of the spilled partition.
*/
@Override
protected int spillPartition() throws IOException {
// find the largest partition
int largestNumBlocks = 0;
int largestPartNum = -1;
for (int i = 0... | 3.68 |
hadoop_CustomResourceMetrics_registerCustomResources | /**
* As and when this metric object construction happens for any queue, all
* custom resource metrics value would be initialized with '0' like any other
* mandatory resources metrics.
* @param customResources Map containing all custom resource types
* @param registry of the metric type
* @param metricPrefix pref... | 3.68 |
framework_LocatorUtil_isUIElement | /**
* Checks if path refers to vaadin UI element com.vaadin.ui.UI.
*
* @param path
* to vaadin element
* @return true if path refers to UI element, false otherwise
*/
public static boolean isUIElement(String path) {
String regex = "^\\/{0,2}(com\\.vaadin\\.ui\\.)?V?UI[\\/\\[]?";
RegExp regexp =... | 3.68 |
morf_DummyXmlOutputStreamProvider_cleared | /**
* @return Whether clearDestination was called.
*/
public boolean cleared() {
return cleared;
} | 3.68 |
dubbo_GenericBeanPostProcessorAdapter_getBeanType | /**
* Bean Type
*
* @return Bean Type
*/
public final Class<T> getBeanType() {
return beanType;
} | 3.68 |
graphhopper_IntsRef_isValid | /**
* Performs internal consistency checks.
* Always returns true (or throws IllegalStateException)
*/
public boolean isValid() {
if (ints == null) {
throw new IllegalStateException("ints is null");
}
if (length < 0) {
throw new IllegalStateException("length is negative: " + length);
... | 3.68 |
framework_ButtonUpdateAltText_getTestDescription | /*
* (non-Javadoc)
*
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
protected String getTestDescription() {
return "Button should have a alt text";
} | 3.68 |
hadoop_HttpReferrerAuditHeader_maybeStripWrappedQuotes | /**
* Strip any quotes from around a header.
* This is needed when processing log entries.
* @param header field.
* @return field without quotes.
*/
public static String maybeStripWrappedQuotes(String header) {
String h = header;
// remove quotes if needed.
while (h.startsWith("\"")) {
h = h.substring(1)... | 3.68 |
hbase_StorageClusterStatusModel_getStartCode | /** Returns the region server's start code */
@XmlAttribute
public long getStartCode() {
return startCode;
} | 3.68 |
hbase_BinaryComparator_toByteArray | /** Returns The comparator serialized using pb */
@Override
public byte[] toByteArray() {
ComparatorProtos.BinaryComparator.Builder builder =
ComparatorProtos.BinaryComparator.newBuilder();
builder.setComparable(ProtobufUtil.toByteArrayComparable(this.value));
return builder.build().toByteArray();
} | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.