name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hadoop_RollingFileSystemSink_createOrAppendLogFile | /**
* Create a new log file and return the {@link FSDataOutputStream}. If a
* file with the specified path already exists, open the file for append
* instead.
*
* Once the file is open, update {@link #currentFSOutStream},
* {@link #currentOutStream}, and {@#link #currentFilePath}.
*
* @param initial the target ... | 3.68 |
hudi_HoodieTableMetadataUtil_metadataPartitionExists | /**
* Check if the given metadata partition exists.
*
* @param basePath base path of the dataset
* @param context instance of {@link HoodieEngineContext}.
*/
public static boolean metadataPartitionExists(String basePath, HoodieEngineContext context, MetadataPartitionType partitionType) {
final String metadataTa... | 3.68 |
framework_SingleSelectionModelImpl_setSelectedFromServer | /**
* Sets the selection based on server API call. Does nothing if the
* selection would not change; otherwise updates the selection and fires a
* selection change event with {@code isUserOriginated == false}.
*
* @param item
* the item to select or {@code null} to clear selection
*/
protected void se... | 3.68 |
hadoop_WriteOperationHelper_revertCommit | /**
* Revert a commit by deleting the file.
* Relies on retry code in filesystem.
* Does not attempt to recreate the parent directory
* @throws IOException on problems
* @param destKey destination key
*/
@Retries.OnceTranslated
public void revertCommit(String destKey) throws IOException {
once("revert commit", ... | 3.68 |
hbase_ScannerModel_getLimit | /** Returns the limit specification */
@XmlAttribute
public int getLimit() {
return limit;
} | 3.68 |
hbase_AbstractStateMachineNamespaceProcedure_addOrUpdateNamespace | /**
* Insert/update the row into the ns family of meta table.
* @param env MasterProcedureEnv
*/
protected static void addOrUpdateNamespace(MasterProcedureEnv env, NamespaceDescriptor ns)
throws IOException {
getTableNamespaceManager(env).addOrUpdateNamespace(ns);
} | 3.68 |
hbase_ColumnValueFilter_getFamily | /** Returns the column family */
public byte[] getFamily() {
return family;
} | 3.68 |
flink_DefaultCheckpointPlan_checkNoPartlyFinishedVertexUsedUnionListState | /**
* If a job vertex using {@code UnionListState} has part of tasks FINISHED where others are
* still in RUNNING state, the checkpoint would be aborted since it might cause incomplete
* {@code UnionListState}.
*/
private void checkNoPartlyFinishedVertexUsedUnionListState(
Map<JobVertexID, ExecutionJobVerte... | 3.68 |
framework_VScrollTable_refreshContent | /**
* Sends request to refresh content at this position.
*/
public void refreshContent() {
isRequestHandlerRunning = true;
int first = (int) (firstRowInViewPort - pageLength * cacheRate);
int reqRows = (int) (2 * pageLength * cacheRate + pageLength);
if (first < 0) {
reqRows = reqRows + first;... | 3.68 |
hbase_Writables_copyWritable | /**
* Copy one Writable to another. Copies bytes using data streams.
* @param bytes Source Writable
* @param tgt Target Writable
* @return The target Writable.
* @throws IOException e
*/
public static Writable copyWritable(final byte[] bytes, final Writable tgt) throws IOException {
DataInputStream dis = new ... | 3.68 |
hadoop_StagingCommitter_getFinalKey | /**
* Returns the final S3 key for a relative path. Subclasses can override this
* method to upload files to a different S3 location.
* <p>
* This implementation concatenates the relative path with the key prefix
* from the output path.
* If {@link CommitConstants#FS_S3A_COMMITTER_STAGING_UNIQUE_FILENAMES} is
* ... | 3.68 |
morf_WindowFunction_getOrderBys | /**
* @return the fields to order by.
*/
public ImmutableList<AliasedField> getOrderBys() {
return orderBys;
} | 3.68 |
hudi_CompactionUtils_getDeltaCommitsSinceLatestCompaction | /**
* Returns a pair of (timeline containing the delta commits after the latest completed
* compaction commit, the completed compaction commit instant), if the latest completed
* compaction commit is present; a pair of (timeline containing all the delta commits,
* the first delta commit instant), if there is no com... | 3.68 |
hmily_NacosClient_pull | /**
* Pull input stream.
*
* @param config the config
* @return the input stream
*/
InputStream pull(final NacosConfig config) {
Properties properties = new Properties();
properties.put(NACOS_SERVER_ADDR_KEY, config.getServer());
try {
configService = NacosFactory.createConfigService(properties... | 3.68 |
hadoop_TextView_puts | /**
* Print strings as a line (new line appended at the end, a la C/Tcl puts).
* @param args the strings to print
*/
public void puts(Object... args) {
echo(args);
writer().println();
} | 3.68 |
hudi_OptionsResolver_isLockRequired | /**
* Returns whether the writer txn should be guarded by lock.
*/
public static boolean isLockRequired(Configuration conf) {
return conf.getBoolean(FlinkOptions.METADATA_ENABLED) || isMultiWriter(conf);
} | 3.68 |
framework_HasComponents_getContainer | /**
* Gets the component container.
*
*/
public HasComponents getContainer() {
return (HasComponents) getSource();
} | 3.68 |
flink_FlinkContainersSettings_getZookeeperHostname | /**
* Gets Zookeeper hostname.
*
* @return The Zookeeper hostname.
*/
public String getZookeeperHostname() {
return zookeeperHostname;
} | 3.68 |
hbase_ClientIdGenerator_generateClientId | /**
* Returns a unique ID incorporating IP address, PID, TID and timer. Might be an overkill... Note
* though that new UUID in java by default is just a random number.
*/
public static byte[] generateClientId() {
byte[] selfBytes = getIpAddressBytes();
Long pid = getPid();
long tid = Thread.currentThread().get... | 3.68 |
AreaShop_RegionSign_getRegion | /**
* Get the region this sign is linked to.
* @return The region this sign is linked to
*/
public GeneralRegion getRegion() {
return signsFeature.getRegion();
} | 3.68 |
dubbo_Bytes_unzip | /**
* unzip.
*
* @param bytes compressed byte array.
* @return byte uncompressed array.
* @throws IOException
*/
public static byte[] unzip(byte[] bytes) throws IOException {
UnsafeByteArrayInputStream bis = new UnsafeByteArrayInputStream(bytes);
UnsafeByteArrayOutputStream bos = new UnsafeByteArrayOutput... | 3.68 |
hudi_ByteBufferBackedInputStream_getPosition | /**
* Returns current position of the stream
*/
public int getPosition() {
return buffer.position() - bufferOffset;
} | 3.68 |
pulsar_SinkContext_resume | /**
* Resume requesting messages.
* @param topic - topic name
* @param partition - partition id (0 for non-partitioned topics)
*/
default void resume(String topic, int partition) throws PulsarClientException {
throw new UnsupportedOperationException("not implemented");
} | 3.68 |
hadoop_ReduceTaskAttemptInfo_getMergeRuntime | /**
* Get the runtime for the <b>merge</b> phase of the reduce task-attempt
*
* @return the runtime for the <b>merge</b> phase of the reduce task-attempt
*/
public long getMergeRuntime() {
return mergeTime;
} | 3.68 |
hbase_CellChunkImmutableSegment_createCellReference | /*------------------------------------------------------------------------*/
// for a given cell, write the cell representation on the index chunk
private int createCellReference(ByteBufferKeyValue cell, ByteBuffer idxBuffer, int idxOffset) {
int offset = idxOffset;
int dataChunkID = cell.getChunkId();
offset = ... | 3.68 |
framework_VCalendar_set24HFormat | /**
* Should the 24h time format be used.
*
* @param format
* True if the 24h format should be used else the 12h format is
* used
*/
public void set24HFormat(boolean format) {
this.format = format;
} | 3.68 |
hudi_FileSystemViewManager_clearFileSystemView | /**
* Drops reference to File-System Views. Future calls to view results in creating a new view
*
* @param basePath
*/
public void clearFileSystemView(String basePath) {
SyncableFileSystemView view = globalViewMap.remove(basePath);
if (view != null) {
view.close();
}
} | 3.68 |
flink_OptimizerNode_computeUnionOfInterestingPropertiesFromSuccessors | /**
* Computes all the interesting properties that are relevant to this node. The interesting
* properties are a union of the interesting properties on each outgoing connection. However, if
* two interesting properties on the outgoing connections overlap, the interesting properties
* will occur only once in this se... | 3.68 |
hbase_Scan_getMvccReadPoint | /**
* Get the mvcc read point used to open a scanner.
*/
long getMvccReadPoint() {
return mvccReadPoint;
} | 3.68 |
hadoop_AbfsInputStream_available | /**
* Return the size of the remaining available bytes
* if the size is less than or equal to {@link Integer#MAX_VALUE},
* otherwise, return {@link Integer#MAX_VALUE}.
*
* This is to match the behavior of DFSInputStream.available(),
* which some clients may rely on (HBase write-ahead log reading in
* particular)... | 3.68 |
hudi_ProtoConversionUtil_getAvroSchemaForMessageClass | /**
* Creates an Avro {@link Schema} for the provided class. Assumes that the class is a protobuf {@link Message}.
* @param clazz The protobuf class
* @param schemaConfig configuration used to determine how to handle particular cases when converting from the proto schema
* @return An Avro schema
*/
public static S... | 3.68 |
shardingsphere-elasticjob_PropertiesPreconditions_checkPositiveInteger | /**
* Check property value is positive integer.
*
* @param props properties to be checked
* @param key property key to be checked
*/
public static void checkPositiveInteger(final Properties props, final String key) {
String propertyValue = props.getProperty(key);
if (null == propertyValue) {
retur... | 3.68 |
hbase_CheckAndMutate_getRow | /** Returns the row */
@Override
public byte[] getRow() {
return row;
} | 3.68 |
hbase_RegionPlacementMaintainer_getRegionsMovement | /**
* Return how many regions will move per table since their primary RS will change
* @param newPlan - new AssignmentPlan
* @return how many primaries will move per table
*/
public Map<TableName, Integer> getRegionsMovement(FavoredNodesPlan newPlan) throws IOException {
Map<TableName, Integer> movesPerTable = ne... | 3.68 |
open-banking-gateway_ConsentAuthorizationEncryptionServiceProvider_generateKey | /**
* Generates random symmetric key.
* @return Symmetric key
*/
public SecretKeyWithIv generateKey() {
return oper.generateKey();
} | 3.68 |
hadoop_ExternalStoragePolicySatisfier_main | /**
* Main method to start SPS service.
*/
public static void main(String[] args) throws Exception {
NameNodeConnector nnc = null;
ExternalSPSContext context = null;
try {
StringUtils.startupShutdownMessage(StoragePolicySatisfier.class, args,
LOG);
HdfsConfiguration spsConf = new HdfsConfigurati... | 3.68 |
hadoop_IOStatisticsBinding_aggregateMeanStatistics | /**
* Aggregate the mean statistics.
* This returns a new instance.
* @param l left value
* @param r right value
* @return aggregate value
*/
public static MeanStatistic aggregateMeanStatistics(
MeanStatistic l, MeanStatistic r) {
MeanStatistic res = l.copy();
res.add(r);
return res;
} | 3.68 |
zxing_LuminanceSource_invert | /**
* @return a wrapper of this {@code LuminanceSource} which inverts the luminances it returns -- black becomes
* white and vice versa, and each value becomes (255-value).
*/
public LuminanceSource invert() {
return new InvertedLuminanceSource(this);
} | 3.68 |
framework_ListenerMethod_readObject | /* Special serialization to handle method references */
private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException {
in.defaultReadObject();
try {
String name = (String) in.readObject();
Class<?>[] paramTypes = (Class<?>[]) in.readObject();
// We can... | 3.68 |
querydsl_TimeExpression_coalesce | /**
* Create a {@code coalesce(this, args...)} expression
*
* @param args additional arguments
* @return coalesce
*/
@Override
@SuppressWarnings({"unchecked"})
public TimeExpression<T> coalesce(T... args) {
Coalesce<T> coalesce = new Coalesce<T>(getType(), mixin);
for (T arg : args) {
coalesce.add(... | 3.68 |
flink_RuntimeRestAPIVersion_isStableVersion | /**
* Returns whether this version is considered stable.
*
* @return whether this version is stable
*/
@Override
public boolean isStableVersion() {
return isStable;
} | 3.68 |
rocketmq-connect_ClusterConfigState_allTaskConfigs | /**
* get all task configs
*
* @param connector
* @return
*/
public List<Map<String, String>> allTaskConfigs(String connector) {
Map<Integer, Map<String, String>> taskConfigs = new TreeMap<>();
for (Map.Entry<ConnectorTaskId, Map<String, String>> taskConfigEntry : this.taskConfigs.entrySet()) {
if ... | 3.68 |
pulsar_StreamingDataBlockHeaderImpl_fromStream | // Construct DataBlockHeader from InputStream, which contains `HEADER_MAX_SIZE` bytes readable.
public static StreamingDataBlockHeaderImpl fromStream(InputStream stream) throws IOException {
CountingInputStream countingStream = new CountingInputStream(stream);
DataInputStream dis = new DataInputStream(countingS... | 3.68 |
hbase_HFileReaderImpl_validateBlockType | /**
* Compares the actual type of a block retrieved from cache or disk with its expected type and
* throws an exception in case of a mismatch. Expected block type of {@link BlockType#DATA} is
* considered to match the actual block type [@link {@link BlockType#ENCODED_DATA} as well.
* @param block a bloc... | 3.68 |
AreaShop_Utils_millisToHumanFormat | /**
* Convert milliseconds to a human readable format.
* @param milliseconds The amount of milliseconds to convert
* @return A formatted string based on the language file
*/
public static String millisToHumanFormat(long milliseconds) {
long timeLeft = milliseconds + 500;
// To seconds
timeLeft /= 1000;
if(timeL... | 3.68 |
flink_AvroSchemaConverter_convertToSchema | /**
* Converts Flink SQL {@link LogicalType} (can be nested) into an Avro schema.
*
* <p>The "{rowName}_" is used as the nested row type name prefix in order to generate the right
* schema. Nested record type that only differs with type name is still compatible.
*
* @param logicalType logical type
* @param rowNa... | 3.68 |
dubbo_ReflectUtils_getProperty | /**
* Get the value from the specified bean and its getter method.
*
* @param bean the bean instance
* @param methodName the name of getter
* @param <T> the type of property value
* @return
* @since 2.7.5
*/
public static <T> T getProperty(Object bean, String methodName) {
Class<?> beanClass = ... | 3.68 |
framework_SASSAddonImportFileCreator_updateTheme | /**
* Updates a themes addons.scss with the addon themes found on the
* classpath.
*
* @param themeDirectory
* The target theme directory
*/
public static void updateTheme(String themeDirectory) throws IOException {
File addonImports = new File(themeDirectory, ADDON_IMPORTS_FILE);
if (!addonI... | 3.68 |
morf_OracleDialect_rebuildSequenceAndTrigger | /**
* If the table has an auto-numbered column, rebuild its sequence and trigger.
*
* @param table The {@link Table}.
* @return The SQL statements to run.
*/
private Collection<String> rebuildSequenceAndTrigger(Table table,Column sequence) {
// This requires drop/create trigger/sequence privileges so we avoid wh... | 3.68 |
framework_TabSheetScrollOnTabClose_getTestDescription | /*
* (non-Javadoc)
*
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
protected String getTestDescription() {
return "Scroll position should not change when closing tabs.";
} | 3.68 |
flink_LocalInputChannel_releaseAllResources | /** Releases the partition reader. */
@Override
void releaseAllResources() throws IOException {
if (!isReleased) {
isReleased = true;
ResultSubpartitionView view = subpartitionView;
if (view != null) {
view.releaseAllResources();
subpartitionView = null;
}
... | 3.68 |
flink_HiveJdbcParameterUtils_setVariables | /**
* Use the {@param parameters} to set {@param hiveConf} or {@param hiveVariables} according to
* what kinds of the parameter belongs.
*/
public static void setVariables(
HiveConf hiveConf, Map<String, String> sessionConfigs, Map<String, String> parameters) {
for (Map.Entry<String, String> entry : para... | 3.68 |
flink_MemorySegment_copyTo | /**
* Bulk copy method. Copies {@code numBytes} bytes from this memory segment, starting at
* position {@code offset} to the target memory segment. The bytes will be put into the target
* segment starting at position {@code targetOffset}.
*
* @param offset The position where the bytes are started to be read from i... | 3.68 |
pulsar_ResourceGroup_rgResourceUsageListener | // Transport manager mandated op.
public void rgResourceUsageListener(String broker, ResourceUsage resourceUsage) {
NetworkUsage p;
p = resourceUsage.getPublish();
this.getUsageFromMonitoredEntity(ResourceGroupMonitoringClass.Publish, p, broker);
p = resourceUsage.getDispatch();
this.getUsageFromM... | 3.68 |
flink_OptimizerNode_getInterestingProperties | /**
* Gets the properties that are interesting for this node to produce.
*
* @return The interesting properties for this node, or null, if not yet computed.
*/
public InterestingProperties getInterestingProperties() {
return this.intProps;
} | 3.68 |
pulsar_ResourceGroupService_getRgQuotaCalculationTime | // Visibility for testing.
protected static Summary.Child.Value getRgQuotaCalculationTime() {
return rgQuotaCalculationLatency.get();
} | 3.68 |
flink_ApplicationStatus_processExitCode | /**
* Gets the process exit code associated with this status.
*
* @return The associated process exit code.
*/
public int processExitCode() {
return processExitCode;
} | 3.68 |
morf_Join_toString | /**
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
if (table != null) {
return type.toString() + " " + table.toString() + " ON " + criterion;
} else {
return type.toString() + " (" + subSelect.toString() + ") ON " + criterion;
}
} | 3.68 |
hbase_AbstractFSWALProvider_getServerNameFromWALDirectoryName | /**
* This function returns region server name from a log file name which is in one of the following
* formats:
* <ul>
* <li>hdfs://<name node>/hbase/.logs/<server name>-splitting/...</li>
* <li>hdfs://<name node>/hbase/.logs/<server name>/...</li>
* </ul>
* @return null if the passed in ... | 3.68 |
flink_PermanentBlobCache_run | /** Cleans up BLOBs which are not referenced anymore. */
@Override
public void run() {
synchronized (jobRefCounters) {
Iterator<Map.Entry<JobID, RefCount>> entryIter =
jobRefCounters.entrySet().iterator();
final long currentTimeMillis = System.currentTimeMillis();
while (ent... | 3.68 |
rocketmq-connect_RebalanceImpl_doRebalance | /**
* Distribute connectors and tasks according to the {@link RebalanceImpl#allocateConnAndTaskStrategy}.
*/
public void doRebalance() {
List<String> curAliveWorkers = clusterManagementService.getAllAliveWorkers();
if (curAliveWorkers != null) {
if (clusterManagementService instanceof ClusterManagemen... | 3.68 |
hbase_AbstractRecoveredEditsOutputSink_deleteOneWithFewerEntries | // delete the one with fewer wal entries
private void deleteOneWithFewerEntries(RecoveredEditsWriter editsWriter, Path dst)
throws IOException {
long dstMinLogSeqNum = -1L;
try (WALStreamReader reader =
walSplitter.getWalFactory().createStreamReader(walSplitter.walFS, dst)) {
WAL.Entry entry = reader.next... | 3.68 |
hadoop_TimelineDomains_addDomain | /**
* Add a single domain into the existing domain list
*
* @param domain
* a single domain
*/
public void addDomain(TimelineDomain domain) {
domains.add(domain);
} | 3.68 |
framework_DragHandle_removeFromParent | /**
* Removes this drag handle from whatever it was attached to.
*/
public void removeFromParent() {
if (parent != null) {
parent.removeChild(element);
parent = null;
}
} | 3.68 |
flink_DeltaIteration_parallelism | /**
* Sets the parallelism for the iteration.
*
* @param parallelism The parallelism.
* @return The iteration object, for function call chaining.
*/
public DeltaIteration<ST, WT> parallelism(int parallelism) {
OperatorValidationUtils.validateParallelism(parallelism);
this.parallelism = parallelism;
ret... | 3.68 |
hadoop_BytesWritable_toString | /**
* Generate the stream of bytes as hex pairs separated by ' '.
*/
@Override
public String toString() {
return IntStream.range(0, size)
.mapToObj(idx -> String.format("%02x", bytes[idx]))
.collect(Collectors.joining(" "));
} | 3.68 |
Activiti_TreeValueExpression_isDeferred | /**
* Answer <code>true</code> if this is a deferred expression (containing
* sub-expressions starting with <code>#{</code>)
*/
public boolean isDeferred() {
return deferred;
} | 3.68 |
graphhopper_VectorTileDecoder_isAutoScale | /**
* Get the autoScale setting.
*
* @return autoScale
*/
public boolean isAutoScale() {
return autoScale;
} | 3.68 |
Activiti_TreeValueExpression_getType | /**
* Evaluates the expression as an lvalue and answers the result type.
* @param context used to resolve properties (<code>base.property</code> and <code>base[property]</code>)
* and to determine the result from the last base/property pair
* @return lvalue evaluation type or <code>null</code> for rvalue expression... | 3.68 |
morf_SelectStatementBuilder_withParallelQueryPlan | /**
* Request that this query is executed with a parallel execution plan and with the given degree of parallelism. If the database implementation does not support, or is configured to disable parallel query execution, then this request will have no effect.
*
* <p>For queries that are likely to conduct a full table s... | 3.68 |
flink_ExecutionConfig_setTaskCancellationTimeout | /**
* Sets the timeout (in milliseconds) after which an ongoing task cancellation is considered
* failed, leading to a fatal TaskManager error.
*
* <p>The cluster default is configured via {@link
* TaskManagerOptions#TASK_CANCELLATION_TIMEOUT}.
*
* <p>The value <code>0</code> disables the timeout. In this case a... | 3.68 |
framework_VAbstractCalendarPanel_isYear | /**
* Returns {@code true} if the provided {@code resolution} represents an
* year.
*
* @param resolution
* the given resolution
* @return {@code true} if the {@code resolution} represents a year
*/
protected boolean isYear(R resolution) {
return parent.isYear(resolution);
} | 3.68 |
hbase_StructIterator_skip | /**
* Bypass the next encoded value.
* @return the number of bytes skipped.
*/
public int skip() {
if (!hasNext()) {
throw new NoSuchElementException();
}
DataType<?> t = types[idx++];
if (src.getPosition() == src.getLength() && t.isNullable()) {
return 0;
}
return t.skip(src);
} | 3.68 |
morf_AbstractSqlDialectTest_testBinaryFormatter | /**
* Tests formatting of binary values in record derived from a {@link ResultSet}.
*
* @throws SQLException when a database access error occurs
*/
@Test
public void testBinaryFormatter() throws SQLException {
assertEquals("Value not transformed into Base64", "REVG", checkDatabaseByteArrayToRecordValue(new byte[]... | 3.68 |
flink_SourceCoordinatorContext_callInCoordinatorThread | /**
* A helper method that delegates the callable to the coordinator thread if the current thread
* is not the coordinator thread, otherwise call the callable right away.
*
* @param callable the callable to delegate.
*/
private <V> V callInCoordinatorThread(Callable<V> callable, String errorMessage) {
// Ensur... | 3.68 |
framework_Navigator_runAfterLeaveConfirmation | /**
* Triggers {@link View#beforeLeave(ViewBeforeLeaveEvent)} for the current
* view with the given action.
* <p>
* This method is typically called by
* {@link #navigateTo(View, String, String)} but can be called from
* application code when you want to e.g. show a confirmation dialog before
* perfoming an actio... | 3.68 |
flink_JoinNode_computeOperatorSpecificDefaultEstimates | /**
* The default estimates build on the principle of inclusion: The smaller input key domain is
* included in the larger input key domain. We also assume that every key from the larger input
* has one join partner in the smaller input. The result cardinality is hence the larger one.
*/
@Override
protected void com... | 3.68 |
hudi_InternalFilter_write | /**
* Serialize the fields of this object to <code>out</code>.
*
* @param out <code>DataOuput</code> to serialize this object into.
* @throws IOException
*/
public void write(DataOutput out) throws IOException {
out.writeInt(VERSION);
out.writeInt(this.nbHash);
out.writeByte(this.hashType);
out.writeInt(th... | 3.68 |
hbase_ThriftServer_main | /**
* Start up the Thrift2 server.
*/
public static void main(String[] args) throws Exception {
final Configuration conf = HBaseConfiguration.create();
// for now, only time we return is on an argument error.
final int status = ToolRunner.run(conf, new ThriftServer(conf), args);
System.exit(status);
} | 3.68 |
zilla_HttpClientFactory_encodeLiteral | // TODO dynamic table, Huffman, never indexed
private void encodeLiteral(
HpackLiteralHeaderFieldFW.Builder builder,
HpackContext hpackContext,
DirectBuffer nameBuffer,
DirectBuffer valueBuffer)
{
builder.type(WITHOUT_INDEXING);
final int nameIndex = hpackContext.index(nameBuffer);
if (nameI... | 3.68 |
flink_MutableRecordAndPosition_set | /** Updates the record and position in this object. */
public void set(E record, long offset, long recordSkipCount) {
this.record = record;
this.offset = offset;
this.recordSkipCount = recordSkipCount;
} | 3.68 |
pulsar_ManagedLedgerConfig_setRetentionSizeInMB | /**
* The retention size is used to set a maximum retention size quota on the ManagedLedger.
* <p>
* Retention size and retention time ({@link #setRetentionTime(int, TimeUnit)}) are together used to retain the
* ledger data when there are no cursors or when all the cursors have marked the data for deletion.
* Data... | 3.68 |
flink_TableConfigUtils_getAggPhaseStrategy | /**
* Returns the aggregate phase strategy configuration.
*
* @param tableConfig TableConfig object
* @return the aggregate phase strategy
*/
public static AggregatePhaseStrategy getAggPhaseStrategy(ReadableConfig tableConfig) {
String aggPhaseConf = tableConfig.get(TABLE_OPTIMIZER_AGG_PHASE_STRATEGY).trim();
... | 3.68 |
morf_SqlInternalUtils_defaultOrderByToAscending | /**
* Sets the fields in an ORDER BY to use ascending order if not specified.
*
* This method will be removed when statement immutability is turned on permanently.
*/
@Deprecated
static void defaultOrderByToAscending(Iterable<AliasedField> orderBys) {
for (AliasedField currentField : orderBys) {
if (currentFi... | 3.68 |
hadoop_DumpUtil_dumpChunk | /**
* Print data in hex format in a chunk.
* @param chunk chunk.
*/
public static void dumpChunk(ECChunk chunk) {
String str;
if (chunk == null) {
str = "<EMPTY>";
} else {
byte[] bytes = chunk.toBytesArray();
str = DumpUtil.bytesToHex(bytes, 16);
}
System.out.println(str);
} | 3.68 |
flink_SingleOutputStreamOperator_getSideOutput | /**
* Gets the {@link DataStream} that contains the elements that are emitted from an operation
* into the side output with the given {@link OutputTag}.
*
* @see org.apache.flink.streaming.api.functions.ProcessFunction.Context#output(OutputTag,
* Object)
*/
public <X> SideOutputDataStream<X> getSideOutput(Out... | 3.68 |
framework_VTree_getNavigationDownKey | /**
* Get the key that moves the selection head downwards. By default it is the
* down arrow key but by overriding this you can change the key to whatever
* you want.
*
* @return The keycode of the key
*/
protected int getNavigationDownKey() {
return KeyCodes.KEY_DOWN;
} | 3.68 |
hudi_DayBasedCompactionStrategy_getPartitionPathWithoutPartitionKeys | /**
* If is Hive style partition path, convert it to regular partition path. e.g. year=2019/month=11/day=24 => 2019/11/24
*/
protected static String getPartitionPathWithoutPartitionKeys(String partitionPath) {
if (partitionPath.contains("=")) {
return partitionPath.replaceFirst(".*?=", "").replaceAll("/.*?=", "... | 3.68 |
flink_ExecutionEnvironment_clearJobListeners | /** Clear all registered {@link JobListener}s. */
@PublicEvolving
public void clearJobListeners() {
this.jobListeners.clear();
} | 3.68 |
hadoop_Utils_readString | /**
* Read a String as a VInt n, followed by n Bytes in Text format.
*
* @param in
* The input stream.
* @return The string
* @throws IOException raised on errors performing I/O.
*/
public static String readString(DataInput in) throws IOException {
int length = readVInt(in);
if (length == -1) retur... | 3.68 |
hbase_Procedure_getResult | /** Returns the serialized result if any, otherwise null */
public byte[] getResult() {
return result;
} | 3.68 |
flink_WatermarkSpec_getWatermarkExpression | /** Returns the {@link ResolvedExpression} for watermark generation. */
public ResolvedExpression getWatermarkExpression() {
return watermarkExpression;
} | 3.68 |
flink_SourceReaderTestBase_testRead | /** Simply test the reader reads all the splits fine. */
@Test
void testRead() throws Exception {
try (SourceReader<Integer, SplitT> reader = createReader()) {
reader.addSplits(getSplits(numSplits, NUM_RECORDS_PER_SPLIT, Boundedness.BOUNDED));
ValidatingSourceOutput output = new ValidatingSourceOutp... | 3.68 |
flink_MimeTypes_getMimeTypeForExtension | /**
* Gets the MIME type for the file with the given extension. If the mime type is not recognized,
* this method returns null.
*
* @param fileExtension The file extension.
* @return The MIME type, or {@code null}, if the file extension is not recognized.
*/
public static String getMimeTypeForExtension(String fil... | 3.68 |
morf_H2Dialect_renameTableStatements | /**
* @see org.alfasoftware.morf.jdbc.SqlDialect#renameTableStatements(org.alfasoftware.morf.metadata.Table, org.alfasoftware.morf.metadata.Table)
*/
@Override
public Collection<String> renameTableStatements(Table from, Table to) {
Builder<String> builder = ImmutableList.builder();
if (!primaryKeysForTable(from... | 3.68 |
flink_AvailabilityProvider_getUnavailableToResetUnavailable | /**
* Creates a new uncompleted future as the current state and returns the previous
* uncompleted one.
*/
public CompletableFuture<?> getUnavailableToResetUnavailable() {
CompletableFuture<?> toNotify = availableFuture;
availableFuture = new CompletableFuture<>();
return toNotify;
} | 3.68 |
flink_SemanticPropUtil_addSourceFieldOffsets | /**
* Creates SemanticProperties by adding offsets to each input field index of the given
* SemanticProperties.
*
* @param props The SemanticProperties to which the offset is added.
* @param numInputFields1 The original number of fields of the first input.
* @param numInputFields2 The original number of fields of... | 3.68 |
flink_MergeTableLikeUtil_computeMergingStrategies | /**
* Calculates merging strategies for all options. It applies options given by a user to the
* {@link #defaultMergingStrategies}. The {@link MergingStrategy} specified for {@link
* FeatureOption#ALL} overwrites all the default options. Those can be further changed with a
* specific {@link FeatureOption}.
*/
publ... | 3.68 |
hadoop_SchedulerHealth_getResourcesReserved | /**
* Get the resources reserved in the last scheduler run.
*
* @return resources reserved
*/
public Resource getResourcesReserved() {
return getResourceDetails(Operation.RESERVATION);
} | 3.68 |
dubbo_NettyHttpRestServer_getChannelOptionMap | /**
* create channel options map
*
* @param url
* @return
*/
protected Map<ChannelOption, Object> getChannelOptionMap(URL url) {
Map<ChannelOption, Object> options = new HashMap<>();
options.put(ChannelOption.SO_REUSEADDR, Boolean.TRUE);
options.put(ChannelOption.TCP_NODELAY, Boolean.TRUE);
option... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.