name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hadoop_IrqHandler_handle | /**
* Handler for the JVM API for signal handling.
* @param s signal raised
*/
@Override
public void handle(Signal s) {
signalCount.incrementAndGet();
InterruptData data = new InterruptData(s.getName(), s.getNumber());
LOG.info("Interrupted: {}", data);
handler.interrupted(data);
} | 3.68 |
hadoop_OBSCommonUtils_propagateBucketOptions | /**
* Propagates bucket-specific settings into generic OBS configuration keys.
* This is done by propagating the values of the form {@code
* fs.obs.bucket.${bucket}.key} to {@code fs.obs.key}, for all values of "key"
* other than a small set of unmodifiable values.
*
* <p>The source of the updated property is set... | 3.68 |
hbase_FileIOEngine_write | /**
* Transfers data from the given byte buffer to file
* @param srcBuffer the given byte buffer from which bytes are to be read
* @param offset The offset in the file where the first byte to be written
*/
@Override
public void write(ByteBuffer srcBuffer, long offset) throws IOException {
write(ByteBuff.wrap(s... | 3.68 |
flink_ConnectedStreams_getType1 | /**
* Gets the type of the first input.
*
* @return The type of the first input
*/
public TypeInformation<IN1> getType1() {
return inputStream1.getType();
} | 3.68 |
hadoop_ByteArray_size | /**
* @return the size of the byte array.
*/
@Override
public int size() {
return len;
} | 3.68 |
AreaShop_FileManager_getBuyNames | /**
* Get a list of names of all buy regions.
* @return A String list with all the names
*/
public List<String> getBuyNames() {
ArrayList<String> result = new ArrayList<>();
for(BuyRegion region : getBuys()) {
result.add(region.getName());
}
return result;
} | 3.68 |
framework_FlyweightCell_getColumn | /**
* Returns the column index of the cell.
*
* @return the column index
*/
public int getColumn() {
assertSetup();
return column;
} | 3.68 |
hadoop_ProtobufHelper_getByteString | /**
* Get the byte string of a non-null byte array.
* If the array is 0 bytes long, return a singleton to reduce object allocation.
* @param bytes bytes to convert.
* @return a value
*/
public static ByteString getByteString(byte[] bytes) {
// return singleton to reduce object allocation
return ShadedProtobufH... | 3.68 |
hbase_CellUtil_compareColumns | /**
* Compares the cell's column (family and qualifier) with the given byte[]
* @param left the cell for which the column has to be compared
* @param right the byte[] having the column
* @param rfoffset the offset of the family
* @param rflength the length of the family
* @param rqoffset the offset of the ... | 3.68 |
flink_PlannerTypeInferenceUtilImpl_getValidationErrorMessage | /**
* Return the validation error message of this {@link PlannerExpression} or return the
* validation error message of it's children if it passes the validation. Return empty if all
* validation succeeded.
*/
private Optional<String> getValidationErrorMessage(PlannerExpression plannerCall) {
ValidationResult v... | 3.68 |
morf_ChangeColumn_reverse | /**
* @see org.alfasoftware.morf.upgrade.SchemaChange#reverse(org.alfasoftware.morf.metadata.Schema)
*/
@Override
public Schema reverse(Schema schema) {
return applyChange(schema, toColumn, fromColumn);
} | 3.68 |
hudi_Triple_of | /**
* <p>
* Obtains an immutable triple of from three objects inferring the generic types.
* </p>
*
* <p>
* This factory allows the triple to be created using inference to obtain the generic types.
* </p>
*
* @param <L> the left element type
* @param <M> the middle element type
* @param <R> the right element... | 3.68 |
hadoop_ClusterMetrics_getTotalJobSubmissions | /**
* Get the total number of job submissions in the cluster.
*
* @return total number of job submissions
*/
public int getTotalJobSubmissions() {
return totalJobSubmissions;
} | 3.68 |
hmily_Binder_setSource | /**
* Sets source.
*
* @param source the source
* @param value the value
* @return the source
*/
Object setSource(final ConfigPropertySource source, final Supplier<?> value) {
this.source = source;
return value.get();
} | 3.68 |
hadoop_AuthenticationToken_parse | /**
* Parses a string into an authentication token.
*
* @param tokenStr string representation of a token.
*
* @return the parsed authentication token.
*
* @throws AuthenticationException thrown if the string representation could not be parsed into
* an authentication token.
*/
public static AuthenticationToken... | 3.68 |
morf_NamedParameterPreparedStatement_executeBatch | /**
* @see PreparedStatement#executeBatch()
* @return an array of update counts containing one element for each
* command in the batch. The elements of the array are ordered according
* to the order in which commands were added to the batch.
* @exception SQLException if a database access error occurs,
* this met... | 3.68 |
hadoop_RollingFileSystemSink_createLogFile | /**
* Create a new log file and return the {@link FSDataOutputStream}. If a
* file with the specified path already exists, add a suffix, starting with 1
* and try again. Keep incrementing the suffix until a nonexistent target
* path is found.
*
* Once the file is open, update {@link #currentFSOutStream},
* {@lin... | 3.68 |
zxing_ResultPoint_orderBestPatterns | /**
* Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC
* and BC is less than AC, and the angle between BC and BA is less than 180 degrees.
*
* @param patterns array of three {@code ResultPoint} to order
*/
public static void orderBestPatterns(ResultPoint[] patterns) {
// Fi... | 3.68 |
hbase_BucketCache_finalize | /**
* Needed mostly for UTs that might run in the same VM and create different BucketCache instances
* on different UT methods.
*/
@Override
protected void finalize() {
if (cachePersister != null && !cachePersister.isInterrupted()) {
cachePersister.interrupt();
}
} | 3.68 |
hadoop_OBSInputStream_seekInStream | /**
* Adjust the stream to a specific position.
*
* @param targetPos target seek position
* @throws IOException on any failure to seek
*/
private void seekInStream(final long targetPos) throws IOException {
checkNotClosed();
if (wrappedStream == null) {
return;
}
// compute how much more to skip
long... | 3.68 |
hbase_RegionNormalizerManager_getSkippedCount | /**
* Retrieve a count of the number of times plans of type {@code type} were submitted but skipped.
* @param type type of plan for which skipped count is to be returned
*/
public long getSkippedCount(NormalizationPlan.PlanType type) {
// TODO: this appears to be used only for testing.
return worker == null ? 0 ... | 3.68 |
flink_KeyedStream_min | /**
* Applies an aggregation that gives the current minimum of the data stream at the given field
* expression by the given key. An independent aggregate is kept per key. A field expression is
* either the name of a public field or a getter method with parentheses of the {@link
* DataStream}'s underlying type. A do... | 3.68 |
hbase_CreateStoreFileWriterParams_compression | /**
* Set the compression algorithm to use
*/
public CreateStoreFileWriterParams compression(Compression.Algorithm compression) {
this.compression = compression;
return this;
} | 3.68 |
hadoop_StagingCommitter_commitTaskInternal | /**
* Commit the task by uploading all created files and then
* writing a pending entry for them.
* @param context task context
* @param taskOutput list of files from the output
* @param commitContext commit context
* @return number of uploads committed.
* @throws IOException IO Failures.
*/
protected int commi... | 3.68 |
framework_GenericFontIcon_getFontFamily | /*
* (non-Javadoc)
*
* @see com.vaadin.server.FontIcon#getFontFamily()
*/
@Override
public String getFontFamily() {
return fontFamily;
} | 3.68 |
flink_ExecutionConfig_enableAutoGeneratedUIDs | /**
* Enables the Flink runtime to auto-generate UID's for operators.
*
* @see #disableAutoGeneratedUIDs()
*/
public void enableAutoGeneratedUIDs() {
setAutoGeneratedUids(true);
} | 3.68 |
hudi_MiniBatchHandle_finalizeWrite | /**
* Finalize the write of one mini-batch. Usually these mini-bathes
* come from one checkpoint interval. The file handle may roll over to new name
* if the name conflicts, give a chance to clean the intermediate file.
*/
default void finalizeWrite() {
} | 3.68 |
flink_ResourceCounter_empty | /**
* Creates an empty resource counter.
*
* @return empty resource counter
*/
public static ResourceCounter empty() {
return new ResourceCounter(Collections.emptyMap());
} | 3.68 |
flink_BlobKey_addToMessageDigest | /**
* Adds the BLOB key to the given {@link MessageDigest}.
*
* @param md the message digest to add the BLOB key to
*/
public void addToMessageDigest(MessageDigest md) {
md.update(this.key);
} | 3.68 |
hadoop_TaskAttemptContextImpl_getStatus | /**
* Get the last set status message.
* @return the current status message
*/
public String getStatus() {
return status;
} | 3.68 |
pulsar_BrokerService_unloadDeletedReplNamespace | /**
* Unloads the namespace bundles if local cluster is not part of replication-cluster list into the namespace.
* So, broker that owns the bundle and doesn't receive the zk-watch will unload the namespace.
* @param data
* @param namespace
*/
private void unloadDeletedReplNamespace(Policies data, NamespaceName nam... | 3.68 |
hbase_MemoryBoundedLogMessageBuffer_add | /**
* Append the given message to this buffer, automatically evicting older messages until the
* desired memory limit is achieved.
*/
public synchronized void add(String messageText) {
LogMessage message = new LogMessage(messageText, EnvironmentEdgeManager.currentTime());
usage += message.estimateHeapUsage();
... | 3.68 |
flink_HiveParserStorageFormat_fillStorageFormat | /**
* Returns true if the passed token was a storage format token and thus was processed
* accordingly.
*/
public boolean fillStorageFormat(HiveParserASTNode child) throws SemanticException {
switch (child.getToken().getType()) {
case HiveASTParser.TOK_TABLEFILEFORMAT:
if (child.getChildCount... | 3.68 |
incubator-hugegraph-toolchain_HugeGraphLoader_stopThenShutdown | /**
* TODO: How to distinguish load task finished normally or abnormally
*/
private synchronized void stopThenShutdown() {
if (this.context.closed()) {
return;
}
LOG.info("Stop loading then shutdown HugeGraphLoader");
try {
this.context.stopLoading();
if (this.manager != null) ... | 3.68 |
hibernate-validator_ScriptEngineScriptEvaluator_engineAllowsParallelAccessFromMultipleThreads | /**
* Checks whether the given engine is thread-safe or not.
*
* @return true if the given engine is thread-safe, false otherwise.
*/
private boolean engineAllowsParallelAccessFromMultipleThreads() {
String threadingType = (String) engine.getFactory().getParameter( "THREADING" );
return "THREAD-ISOLATED".equals(... | 3.68 |
zxing_ByteMatrix_getArray | /**
* @return an internal representation as bytes, in row-major order. array[y][x] represents point (x,y)
*/
public byte[][] getArray() {
return bytes;
} | 3.68 |
rocketmq-connect_BrokerBasedLog_prepare | /**
* Preparation before startup
*/
private void prepare() {
Set<String> consumerGroupSet = ConnectUtil.fetchAllConsumerGroupList(workerConfig);
if (!consumerGroupSet.contains(groupName)) {
log.info("Try to create group: {}!", groupName);
ConnectUtil.createSubGroup(workerConfig, groupName);
... | 3.68 |
framework_DesignContext_getComponentByCaption | /**
* Returns a component having the specified caption. If no component is
* found, returns null.
*
* @param caption
* The caption of the component
* @return a component whose caption equals the caption given as a parameter
*/
public Component getComponentByCaption(String caption) {
return caption... | 3.68 |
pulsar_BundleData_update | /**
* Update the historical data for this bundle.
*
* @param newSample
* The bundle stats to update this data with.
*/
public void update(final NamespaceBundleStats newSample) {
shortTermData.update(newSample);
longTermData.update(newSample);
this.topics = (int) newSample.topics;
} | 3.68 |
flink_IterationHeadTask_initBackChannel | /**
* The iteration head prepares the backchannel: it allocates memory, instantiates a {@link
* BlockingBackChannel} and hands it to the iteration tail via a {@link Broker} singleton.
*/
private BlockingBackChannel initBackChannel() throws Exception {
/* get the size of the memory available to the backchannel *... | 3.68 |
hadoop_MountTableRefresherThread_run | /**
* Refresh mount table cache of local and remote routers. Local and remote
* routers will be refreshed differently. Let's understand what are the
* local and remote routers and refresh will be done differently on these
* routers. Suppose there are three routers R1, R2 and R3. User want to add
* new mount table ... | 3.68 |
streampipes_PipelineManager_startPipeline | /**
* Starts all processing elements of the pipeline with the pipelineId
*
* @param pipelineId of pipeline to be started
* @return pipeline status of the start operation
*/
public static PipelineOperationStatus startPipeline(String pipelineId) {
Pipeline pipeline = getPipeline(pipelineId);
return Operations.st... | 3.68 |
hadoop_LocalCacheCleaner_addResources | /**
* Adds resources from the passed LocalResourceTracker that are candidates for
* deletion from the cache.
*
* @param newTracker add all resources being tracked by the passed
* LocalResourcesTracker to the LocalCacheCleaner.
*/
public void addResources(LocalResourcesTracker newTracker) {
for (Localiz... | 3.68 |
framework_TabSheet_areTabsHidden | /**
* Are the tab selection parts ("tabs") hidden.
*
* @return true if the tabs are hidden in the UI
* @deprecated as of 7.5, use {@link #isTabsVisible()} instead
*/
@Deprecated
public boolean areTabsHidden() {
return !isTabsVisible();
} | 3.68 |
hbase_MasterProcedureScheduler_wakeNamespaceExclusiveLock | /**
* Wake the procedures waiting for the specified namespace
* @see #waitNamespaceExclusiveLock(Procedure,String)
* @param procedure the procedure releasing the lock
* @param namespace the namespace that has the exclusive lock
*/
public void wakeNamespaceExclusiveLock(final Procedure<?> procedure, final String na... | 3.68 |
hbase_MasterObserver_preMergeRegions | /**
* Called before merge regions request.
* @param ctx coprocessor environment
* @param regionsToMerge regions to be merged
*/
default void preMergeRegions(final ObserverContext<MasterCoprocessorEnvironment> ctx,
final RegionInfo[] regionsToMerge) throws IOException {
} | 3.68 |
AreaShop_Value_get | /**
* Get the stored content.
* @return The stored content
*/
public T get() {
return content;
} | 3.68 |
hudi_HoodieIndexUtils_filterKeysFromFile | /**
* Given a list of row keys and one file, return only row keys existing in that file.
*
* @param filePath - File to filter keys from
* @param candidateRecordKeys - Candidate keys to filter
* @return List of pairs of candidate keys and positions that are available in the file
*/
public static List<Pa... | 3.68 |
dubbo_ProtobufTypeBuilder_isSimplePropertySettingMethod | /**
* judge custom type or primitive type property<br/>
* 1. proto3 grammar ex: string name = 1 <br/>
* 2. proto3 grammar ex: optional string name =1 <br/>
* generated setting method ex: setNameValue(String name);
*
* @param method
* @return
*/
private boolean isSimplePropertySettingMethod(Method method) {
... | 3.68 |
zxing_MatrixUtil_buildMatrix | // Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On
// success, store the result in "matrix" and return true.
static void buildMatrix(BitArray dataBits,
ErrorCorrectionLevel ecLevel,
Version version,
int... | 3.68 |
flink_ConfluentRegistryAvroDeserializationSchema_forSpecific | /**
* Creates {@link AvroDeserializationSchema} that produces classes that were generated from Avro
* schema and looks up the writer schema in the Confluent Schema Registry.
*
* @param tClass class of record to be produced
* @param url URL of schema registry to connect
* @param identityMapCapacity maximum number ... | 3.68 |
flink_CliFrontend_validateAndGetActiveCommandLine | /**
* Gets the custom command-line for the arguments.
*
* @param commandLine The input to the command-line.
* @return custom command-line which is active (may only be one at a time)
*/
public CustomCommandLine validateAndGetActiveCommandLine(CommandLine commandLine) {
LOG.debug("Custom commandlines: {}", custo... | 3.68 |
hbase_Bytes_putAsShort | /**
* Put an int value as short out to the specified byte array position. Only the lower 2 bytes of
* the short will be put into the array. The caller of the API need to make sure they will not
* loose the value by doing so. This is useful to store an unsigned short which is represented as
* int in other parts.
* ... | 3.68 |
flink_HadoopMapFunction_writeObject | /**
* Custom serialization methods.
*
* @see <a
* href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html">http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html</a>
*/
private void writeObject(final ObjectOutputStream out) throws IOException {
out.writeObject(mapper.getClass()... | 3.68 |
hadoop_YarnWebServiceUtils_getNodeInfoFromRMWebService | /**
* Utility function to get NodeInfo by calling RM WebService.
* @param conf the configuration
* @param nodeId the nodeId
* @return a JSONObject which contains the NodeInfo
* @throws ClientHandlerException if there is an error
* processing the response.
* @throws UniformInterfaceException if the respon... | 3.68 |
hadoop_DynamicIOStatisticsBuilder_withAtomicLongGauge | /**
* Add a gauge statistic to dynamically return the
* latest value of the source.
* @param key key of this statistic
* @param source atomic long gauge
* @return the builder.
*/
public DynamicIOStatisticsBuilder withAtomicLongGauge(String key,
AtomicLong source) {
withLongFunctionGauge(key, s -> source.get... | 3.68 |
hadoop_FederationStateStoreFacade_deregisterSubCluster | /**
* Deregister subCluster, Update the subCluster state to
* SC_LOST、SC_DECOMMISSIONED etc.
*
* @param subClusterId subClusterId.
* @param subClusterState The state of the subCluster to be updated.
* @throws YarnException yarn exception.
* @return If Deregister subCluster is successful, return true, otherwise, ... | 3.68 |
flink_PushWatermarkIntoTableSourceScanRuleBase_getNewScan | /**
* It uses the input watermark expression to generate the {@link WatermarkGeneratorSupplier}.
* After the {@link WatermarkStrategy} is pushed into the scan, it will build a new scan.
* However, when {@link FlinkLogicalWatermarkAssigner} is the parent of the {@link
* FlinkLogicalTableSourceScan} it should modify ... | 3.68 |
hbase_ClientIdGenerator_getIpAddressBytes | /**
* Returns Some IPv4/IPv6 address available on the current machine that is up, not virtual and not
* a loopback address. Empty array if none can be found or error occurred.
*/
public static byte[] getIpAddressBytes() {
try {
return Addressing.getIpAddress().getAddress();
} catch (IOException ex) {
LOG... | 3.68 |
hbase_MobUtils_isMobFileExpired | /**
* Checks if the mob file is expired.
* @param column The descriptor of the current column family.
* @param current The current time.
* @param fileDate The date string parsed from the mob file name.
* @return True if the mob file is expired.
*/
public static boolean isMobFileExpired(ColumnFamilyDescriptor c... | 3.68 |
framework_DragSourceExtension_getEffectAllowed | /**
* Returns the allowed effects for the current drag source element. Used to
* set client side {@code DataTransfer.effectAllowed} parameter for the drag
* event.
* <p>
* You can use different types of data to support dragging to different
* targets. Accepted types depend on the drop target and those can be
* p... | 3.68 |
flink_ProjectOperator_projectTuple6 | /**
* Projects a {@link Tuple} {@link DataSet} to the previously selected fields.
*
* @return The projected DataSet.
* @see Tuple
* @see DataSet
*/
public <T0, T1, T2, T3, T4, T5>
ProjectOperator<T, Tuple6<T0, T1, T2, T3, T4, T5>> projectTuple6() {
TypeInformation<?>[] fTypes = extractFieldTypes(field... | 3.68 |
flink_DefaultVertexParallelismAndInputInfosDecider_decideParallelismAndEvenlyDistributeSubpartitions | /**
* Decide parallelism and input infos, which will make the subpartitions be evenly distributed
* to downstream subtasks, such that different downstream subtasks consume roughly the same
* number of subpartitions.
*
* @param jobVertexId The job vertex id
* @param consumedResults The information of consumed bloc... | 3.68 |
flink_MultipleParameterTool_getNumberOfParameters | /** Returns number of parameters in {@link ParameterTool}. */
@Override
public int getNumberOfParameters() {
return data.size();
} | 3.68 |
framework_LoadingIndicatorConfiguration_setFirstDelay | /*
* (non-Javadoc)
*
* @see com.vaadin.ui.LoadingIndicator#setFirstDelay(int)
*/
@Override
public void setFirstDelay(int firstDelay) {
getState().firstDelay = firstDelay;
} | 3.68 |
hbase_ZNodeClearer_readMyEphemeralNodeOnDisk | /**
* read the content of znode file, expects a single line.
*/
public static String readMyEphemeralNodeOnDisk() throws IOException {
String fileName = getMyEphemeralNodeFileName();
if (fileName == null) {
throw new FileNotFoundException("No filename; set environment variable HBASE_ZNODE_FILE");
}
FileRea... | 3.68 |
flink_CsvReaderFormat_withIgnoreParseErrors | /**
* Returns a new {@code CsvReaderFormat} configured to ignore all parsing errors. All the other
* options directly carried over from the subject of the method call.
*/
public CsvReaderFormat<T> withIgnoreParseErrors() {
return new CsvReaderFormat<>(
this.mapperFactory,
this.schemaGener... | 3.68 |
pulsar_SSLContextValidatorEngine_validate | /**
* Validates TLS handshake up to TLSv1.2.
* TLSv1.3 has a differences in TLS handshake as described in https://stackoverflow.com/a/62465859
*/
public static void validate(SSLEngineProvider clientSslEngineSupplier, SSLEngineProvider serverSslEngineSupplier)
throws SSLException {
SSLContextValidatorEngi... | 3.68 |
framework_DefaultSQLGenerator_generateLimits | /**
* Generates the LIMIT and OFFSET clause.
*
* @param sb
* StringBuffer to which the clause is appended.
* @param offset
* Value for offset.
* @param pagelength
* Value for pagelength.
* @return StringBuffer with LIMIT and OFFSET clause added.
*/
protected StringBuffer gener... | 3.68 |
flink_WindowedStream_evictor | /**
* Sets the {@code Evictor} that should be used to evict elements from a window before emission.
*
* <p>Note: When using an evictor window performance will degrade significantly, since
* incremental aggregation of window results cannot be used.
*/
@PublicEvolving
public WindowedStream<T, K, W> evictor(Evictor<?... | 3.68 |
shardingsphere-elasticjob_ShardingNode_getRunningNode | /**
* Get job running node.
*
* @param item sharding item
* @return job running node
*/
public static String getRunningNode(final int item) {
return String.format(RUNNING, item);
} | 3.68 |
flink_FlinkDatabaseMetaData_supportsMixedCaseQuotedIdentifiers | /** Flink sql is mixed case as sensitive. */
@Override
public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException {
return true;
} | 3.68 |
zxing_OneDReader_recordPattern | /**
* Records the size of successive runs of white and black pixels in a row, starting at a given point.
* The values are recorded in the given array, and the number of runs recorded is equal to the size
* of the array. If the row starts on a white pixel at the given start point, then the first count
* recorded is ... | 3.68 |
flink_Tuple16_setFields | /**
* Sets new values to all fields of the tuple.
*
* @param f0 The value for field 0
* @param f1 The value for field 1
* @param f2 The value for field 2
* @param f3 The value for field 3
* @param f4 The value for field 4
* @param f5 The value for field 5
* @param f6 The value for field 6
* @param f7 The valu... | 3.68 |
zxing_Detector_sampleGrid | /**
* Creates a BitMatrix by sampling the provided image.
* topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the
* diagonal just outside the bull's eye.
*/
private BitMatrix sampleGrid(BitMatrix image,
ResultPoint topLeft,
Res... | 3.68 |
hmily_HmilyRepositoryNode_getHmilyParticipantRootPath | /**
* Get hmily participant root path.
*
* @return hmily participant root path
*/
public String getHmilyParticipantRootPath() {
return Joiner.on("/").join("", ROOT_PATH_PREFIX, appName, HMILY_TRANSACTION_PARTICIPANT);
} | 3.68 |
morf_SqlDialect_getSqlForOrderByFieldNullValueHandling | /**
* Get the SQL expression for NULL values handling.
* @param orderByField The order by clause
* @return The resulting SQL String
*
*/
protected String getSqlForOrderByFieldNullValueHandling(FieldReference orderByField) {
if (orderByField.getNullValueHandling().isPresent()) {
switch (orderByField.getNullV... | 3.68 |
hudi_SourceFormatAdapter_fetchNewDataInRowFormat | /**
* Fetch new data in row format. If the source provides data in different format, they are translated to Row format
*/
public InputBatch<Dataset<Row>> fetchNewDataInRowFormat(Option<String> lastCkptStr, long sourceLimit) {
switch (source.getSourceType()) {
case ROW:
//we do the sanitizing here if enabl... | 3.68 |
hadoop_StartupProgress_setCount | /**
* Sets counter to the specified value.
*
* @param phase Phase to set
* @param step Step to set
* @param count long to set
*/
public void setCount(Phase phase, Step step, long count) {
lazyInitStep(phase, step).count.set(count);
} | 3.68 |
hmily_HmilyRepositoryFacade_findHmilyParticipant | /**
* Find hmily participant list.
*
* @param participantId the participant id
* @return the list
*/
public List<HmilyParticipant> findHmilyParticipant(final Long participantId) {
return hmilyRepository.findHmilyParticipant(participantId);
} | 3.68 |
hadoop_DiskBalancerWorkItem_toJson | /**
* returns a serialized json string.
*
* @return String - json
* @throws IOException
*/
public String toJson() throws IOException {
return MAPPER.writeValueAsString(this);
} | 3.68 |
Activiti_ExecutionTree_leafsFirstIterator | /**
* Uses an {@link ExecutionTreeBfsIterator}, but returns the leafs first (so flipped order of BFS)
*/
public ExecutionTreeBfsIterator leafsFirstIterator() {
return new ExecutionTreeBfsIterator(this.getRoot(), true);
} | 3.68 |
zxing_GenericGFPoly_evaluateAt | /**
* @return evaluation of this polynomial at a given point
*/
int evaluateAt(int a) {
if (a == 0) {
// Just return the x^0 coefficient
return getCoefficient(0);
}
if (a == 1) {
// Just the sum of the coefficients
int result = 0;
for (int coefficient : coefficients) {
result = Generic... | 3.68 |
flink_HeaderlessChannelWriterOutputView_close | /**
* Closes this OutputView, closing the underlying writer. And return number bytes in last memory
* segment.
*/
@Override
public int close() throws IOException {
if (!writer.isClosed()) {
int currentPositionInSegment = getCurrentPositionInSegment();
// write last segment
writer.writeBlo... | 3.68 |
flink_ModuleManager_listFullModules | /**
* Get all loaded modules with use status. Modules in use status are returned in resolution
* order.
*
* @return a list of module entries with module name and use status
*/
public List<ModuleEntry> listFullModules() {
// keep the order for used modules
List<ModuleEntry> moduleEntries =
usedM... | 3.68 |
framework_AbstractSplitPanel_setSplitPosition | /**
* Moves the position of the splitter with given position and unit.
*
* @param pos
* the new size of the first region. Fractions are only allowed
* when unit is percentage.
* @param unit
* the unit (from {@link Sizeable}) in which the size is given.
* @param reverse
* ... | 3.68 |
flink_SharedResourceHolder_getInternal | /**
* Visible to unit tests.
*
* @see #get(Resource)
*/
@SuppressWarnings("unchecked")
synchronized <T> T getInternal(Resource<T> resource) {
Instance instance = instances.get(resource);
if (instance == null) {
instance = new Instance(resource.create());
instances.put(resource, instance);
... | 3.68 |
hadoop_LoadManifestsStage_getIOStatistics | /**
* Get the IOStatistics.
* @return aggregate IOStatistics
*/
@Override
public IOStatisticsSnapshot getIOStatistics() {
return iostatistics;
} | 3.68 |
hadoop_HeaderProcessing_extractXAttrLongValue | /**
* Convert an XAttr byte array to a long.
* testability.
* @param data data to parse
* @return either a length or none
*/
public static Optional<Long> extractXAttrLongValue(byte[] data) {
String xAttr;
xAttr = HeaderProcessing.decodeBytes(data);
if (StringUtils.isNotEmpty(xAttr)) {
try {
long l ... | 3.68 |
hadoop_MoveStep_setBandwidth | /**
* Sets the maximum disk bandwidth per sec to use for this step.
* @param bandwidth - Long, MB / Sec of data to be moved between
* source and destinatin volume.
*/
@Override
public void setBandwidth(long bandwidth) {
this.bandwidth = bandwidth;
} | 3.68 |
framework_ShortcutActionHandler_shakeTarget | /**
* We try to fire value change in the component the key combination was
* typed. E.g. TextField may contain newly typed text that is expected to be
* sent to server before the shortcut action is triggered. This is done by
* removing focus and then returning it immediately back to target element.
* <p>
* This i... | 3.68 |
framework_AbstractDateField_setParseErrorMessage | /**
* Sets the default error message used if the DateField cannot parse the
* text input by user to a Date field. Note that if the
* {@link #handleUnparsableDateString(String)} method is overridden, the
* localized message from its exception is used.
*
* @param parsingErrorMessage
* the default parsin... | 3.68 |
flink_FlinkPreparingTableBase_getStatistic | /** Returns the statistic of this table. */
public FlinkStatistic getStatistic() {
return this.statistic;
} | 3.68 |
dubbo_PathMatcher_httpMethodMatch | /**
* it is needed to compare http method when one of needCompareHttpMethod is true,and don`t compare when both needCompareHttpMethod are false
*
* @param that
* @return
*/
private boolean httpMethodMatch(PathMatcher that) {
return !that.needCompareHttpMethod || !this.needCompareHttpMethod
? true
... | 3.68 |
hudi_HoodieAvroDataBlock_getBlock | /**
* This method is retained to provide backwards compatibility to HoodieArchivedLogs which were written using
* HoodieLogFormat V1.
*/
@Deprecated
public static HoodieAvroDataBlock getBlock(byte[] content, Schema readerSchema, InternalSchema internalSchema) throws IOException {
SizeAwareDataInputStream dis = ne... | 3.68 |
hbase_HBaseTestingUtility_createTableDescriptor | /**
* Create a table of name <code>name</code>.
* @param name Name to give table.
* @return Column descriptor.
*/
public TableDescriptor createTableDescriptor(final TableName name) {
return createTableDescriptor(name, ColumnFamilyDescriptorBuilder.DEFAULT_MIN_VERSIONS,
MAXVERSIONS, HConstants.FOREVER, ColumnF... | 3.68 |
dubbo_DubboCertManager_generateCsr | /**
* Generate CSR (Certificate Sign Request)
*
* @param keyPair key pair to request
* @return csr
* @throws IOException ioException
*/
private String generateCsr(KeyPair keyPair) throws IOException {
PKCS10CertificationRequest request = new JcaPKCS10CertificationRequestBuilder(
new X500Na... | 3.68 |
hbase_HFileArchiveUtil_getStoreArchivePathForRootDir | /**
* Gets the archive directory under specified root dir. One scenario where this is useful is when
* WAL and root dir are configured under different file systems, i.e. root dir on S3 and WALs on
* HDFS. This is mostly useful for archiving recovered edits, when
* <b>hbase.region.archive.recovered.edits</b> is enab... | 3.68 |
hudi_ParquetUtils_readSchema | /**
* Get the schema of the given parquet file.
*/
public MessageType readSchema(Configuration configuration, Path parquetFilePath) {
return readMetadata(configuration, parquetFilePath).getFileMetaData().getSchema();
} | 3.68 |
hadoop_FederationStateStoreUtils_logAndThrowInvalidInputException | /**
* Throws an <code>FederationStateStoreInvalidInputException</code> due to an
* error in <code>FederationStateStore</code>.
*
* @param log the logger interface
* @param errMsg the error message
* @throws YarnException on failure
*/
public static void logAndThrowInvalidInputException(Logger log, String errMsg)... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.