name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
morf_DirectoryDataSet_openInputStreamForTable | /**
* @see org.alfasoftware.morf.xml.XmlStreamProvider.XmlInputStreamProvider#openInputStreamForTable(java.lang.String)
*/
@Override
public InputStream openInputStreamForTable(String tableName) {
try {
return new FileInputStream(new File(directory, fileNameForTable(tableName)));
} catch (FileNotFoundException... | 3.68 |
morf_XmlDataSetProducer_getDefaultValue | /**
* @see org.alfasoftware.morf.metadata.Column#getDefaultValue()
*/
@Override
public String getDefaultValue() {
return defaultValue;
} | 3.68 |
hbase_RegionCoprocessorHost_preWALRestore | /**
* Supports Coprocessor 'bypass'.
* @return true if default behavior should be bypassed, false otherwise
* @deprecated Since hbase-2.0.0. No replacement. To be removed in hbase-3.0.0 and replaced with
* something that doesn't expose IntefaceAudience.Private classes.
*/
@Deprecated
public boolean pre... | 3.68 |
pulsar_AuthorizationProvider_getPermissionsAsync | /**
* Get authorization-action permissions on a namespace.
* @param namespaceName
* @return CompletableFuture<Map<String, Set<AuthAction>>>
*/
default CompletableFuture<Map<String, Set<AuthAction>>> getPermissionsAsync(NamespaceName namespaceName) {
return FutureUtil.failedFuture(new IllegalStateException(
... | 3.68 |
flink_LeaderElectionUtils_convertToString | /**
* Converts the passed {@link LeaderInformation} into a human-readable representation that can
* be used in log messages.
*/
public static String convertToString(LeaderInformation leaderInformation) {
return leaderInformation.isEmpty()
? "<no leader>"
: convertToString(
... | 3.68 |
dubbo_CollectionUtils_isEmpty | /**
* Return {@code true} if the supplied Collection is {@code null} or empty.
* Otherwise, return {@code false}.
*
* @param collection the Collection to check
* @return whether the given Collection is empty
*/
public static boolean isEmpty(Collection<?> collection) {
return collection == null || collection.i... | 3.68 |
querydsl_BeanPath_createList | /**
* Create a new List typed path
*
* @param <A>
* @param <E>
* @param property property name
* @param type property type
* @param queryType expression type
* @return property path
*/
@SuppressWarnings("unchecked")
protected <A, E extends SimpleExpression<? super A>> ListPath<A, E> createList(String property,... | 3.68 |
hbase_HRegionServer_getWriteRequestCount | /** Returns Current write count for all online regions. */
private long getWriteRequestCount() {
long writeCount = 0;
for (Map.Entry<String, HRegion> e : this.onlineRegions.entrySet()) {
writeCount += e.getValue().getWriteRequestsCount();
}
return writeCount;
} | 3.68 |
flink_AvroSchemaConverter_convertToTypeInfo | /**
* Converts an Avro schema string into a nested row structure with deterministic field order and
* data types that are compatible with Flink's Table & SQL API.
*
* @param avroSchemaString Avro schema definition string
* @return type information matching the schema
*/
@SuppressWarnings("unchecked")
public stati... | 3.68 |
hadoop_AMRMProxyService_authorizeAndGetInterceptorChain | /**
* Authorizes the request and returns the application specific request
* processing pipeline.
*
* @return the interceptor wrapper instance
* @throws YarnException if fails
*/
private RequestInterceptorChainWrapper authorizeAndGetInterceptorChain()
throws YarnException {
AMRMTokenIdentifier tokenIdentifie... | 3.68 |
flink_SubsequenceInputTypeStrategy_argument | /** Defines that we expect a single argument at the next position. */
public SubsequenceStrategyBuilder argument(ArgumentTypeStrategy argumentTypeStrategy) {
SequenceInputTypeStrategy singleArgumentStrategy =
new SequenceInputTypeStrategy(
Collections.singletonList(argumentTypeStrate... | 3.68 |
framework_CvalChecker_getFirstLaunch | /*
* Get the GWT firstLaunch timestamp.
*/
String getFirstLaunch() {
try {
Class<?> clz = Class
.forName("com.google.gwt.dev.shell.CheckForUpdates");
return Preferences.userNodeForPackage(clz).get("firstLaunch",
"-");
} catch (ClassNotFoundException e) {
... | 3.68 |
hbase_DefaultMobStoreFlusher_flushSnapshot | /**
* Flushes the snapshot of the MemStore. If this store is not a mob store, flush the cells in the
* snapshot to store files of HBase. If the store is a mob one, the flusher flushes the MemStore
* into two places. One is the store files of HBase, the other is the mob files.
* <ol>
* <li>Cells that are not PUT ty... | 3.68 |
hmily_BindData_of | /**
* Of bind data.
*
* @param <T> the type parameter
* @param type the type
* @param value the value
* @return the bind data
*/
public static <T> BindData<T> of(final DataType type, final Supplier<T> value) {
return new BindData<>(type, value);
} | 3.68 |
pulsar_LedgerMetadataUtils_buildMetadataForSchema | /**
* Build additional metadata for a Schema.
*
* @param schemaId id of the schema
* @return an immutable map which describes the schema
*/
public static Map<String, byte[]> buildMetadataForSchema(String schemaId) {
return Map.of(
METADATA_PROPERTY_APPLICATION, METADATA_PROPERTY_APPLICATION_PULSAR,... | 3.68 |
framework_SelectorPredicate_setWildcard | /**
* @param wildcard
* the wildcard to set
*/
public void setWildcard(boolean wildcard) {
this.wildcard = wildcard;
} | 3.68 |
hadoop_TFile_getRecordNumNear | /**
* Get the RecordNum for the first key-value pair in a compressed block
* whose byte offset in the TFile is greater than or equal to the specified
* offset.
*
* @param offset
* the user supplied offset.
* @return the RecordNum to the corresponding entry. If no such entry
* exists, it return... | 3.68 |
hadoop_AdlFsInputStream_getPos | /**
* Return the current offset from the start of the file.
*/
@Override
public synchronized long getPos() throws IOException {
return in.getPos();
} | 3.68 |
flink_MemorySegment_swapBytes | /**
* Swaps bytes between two memory segments, using the given auxiliary buffer.
*
* @param tempBuffer The auxiliary buffer in which to put data during triangle swap.
* @param seg2 Segment to swap bytes with
* @param offset1 Offset of this segment to start swapping
* @param offset2 Offset of seg2 to start swappin... | 3.68 |
framework_VCalendar_setLastDayNumber | /**
* Set the number when a week ends.
*
* @param dayNumber
* The number of the day
*/
public void setLastDayNumber(int dayNumber) {
assert (dayNumber >= 1 && dayNumber <= 7);
lastDay = dayNumber;
} | 3.68 |
hbase_WALEntryStream_next | /**
* Returns the next WAL entry in this stream and advance the stream. Will throw
* {@link IllegalStateException} if you do not call {@link #hasNext()} before calling this method.
* Please see the javadoc of {@link #peek()} method to see why we need this.
* @throws IllegalStateException Every time you want to call... | 3.68 |
flink_SubsequenceInputTypeStrategy_finish | /** Constructs the given strategy. */
public InputTypeStrategy finish() {
return new SubsequenceInputTypeStrategy(
argumentsSplits, ConstantArgumentCount.of(currentPos));
} | 3.68 |
hadoop_AllocateResponse_getRejectedSchedulingRequests | /**
* Get a list of all SchedulingRequests that the RM has rejected between
* this allocate call and the previous one.
* @return List of RejectedSchedulingRequests.
*/
@Public
@Unstable
public List<RejectedSchedulingRequest> getRejectedSchedulingRequests() {
return Collections.emptyList();
} | 3.68 |
dubbo_StringUtils_parseQueryString | /**
* parse query string to Parameters.
*
* @param qs query string.
* @return Parameters instance.
*/
public static Map<String, String> parseQueryString(String qs) {
if (isEmpty(qs)) {
return new HashMap<String, String>();
}
return parseKeyValuePair(qs, "\\&");
} | 3.68 |
hbase_RestoreSnapshotHelper_hasRegionsToRestore | /** Returns true if there're regions to restore */
public boolean hasRegionsToRestore() {
return this.regionsToRestore != null && this.regionsToRestore.size() > 0;
} | 3.68 |
hadoop_Paths_getRelativePath | /**
* Using {@code URI#relativize()}, build the relative path from the
* base path to the full path.
* If {@code childPath} is not a child of {@code basePath} the outcome
* os undefined.
* @param basePath base path
* @param fullPath full path under the base path.
* @return the relative path
*/
public static Str... | 3.68 |
flink_FutureUtils_runAsync | /**
* Returns a future which is completed when {@link RunnableWithException} is finished.
*
* @param runnable represents the task
* @param executor to execute the runnable
* @return Future which is completed when runnable is finished
*/
public static CompletableFuture<Void> runAsync(
RunnableWithException... | 3.68 |
hadoop_ChangeDetectionPolicy_getPolicy | /**
* Reads the change detection policy from Configuration.
*
* @param configuration the configuration
* @return the policy
*/
public static ChangeDetectionPolicy getPolicy(Configuration configuration) {
Mode mode = Mode.fromConfiguration(configuration);
Source source = Source.fromConfiguration(configuration);... | 3.68 |
hbase_FavoredStochasticBalancer_generateFavoredNodesForDaughter | /**
* Generate Favored Nodes for daughters during region split.
* <p/>
* If the parent does not have FN, regenerates them for the daughters.
* <p/>
* If the parent has FN, inherit two FN from parent for each daughter and generate the remaining.
* The primary FN for both the daughters should be the same as parent.... | 3.68 |
framework_TableSqlContainer_insertTestData | /**
* Adds test data to the test table
*
* @param connectionPool
* @throws SQLException
*/
private void insertTestData(JDBCConnectionPool connectionPool)
throws SQLException {
Connection conn = null;
try {
conn = connectionPool.reserveConnection();
Statement statement = conn.createS... | 3.68 |
framework_VaadinFinderLocatorStrategy_getElementsByPathStartingAt | /**
* {@inheritDoc}
*/
@Override
public List<Element> getElementsByPathStartingAt(String path,
Element root) {
List<SelectorPredicate> postFilters = SelectorPredicate
.extractPostFilterPredicates(path);
if (!postFilters.isEmpty()) {
path = path.substring(1, path.lastIndexOf(')'));
... | 3.68 |
framework_SQLContainer_hasContainerFilters | /**
* Returns true if any filters have been applied to the container.
*
* @return true if the container has filters applied, false otherwise
* @since 7.1
*/
public boolean hasContainerFilters() {
return !getContainerFilters().isEmpty();
} | 3.68 |
morf_InsertStatementBuilder_withDefaults | /**
* Specifies the defaults to use when inserting new fields.
*
* @param defaultValues the list of values to use as defaults
* @return this, for method chaining.
*/
public InsertStatementBuilder withDefaults(List<AliasedFieldBuilder> defaultValues) {
for(AliasedField currentValue : Builder.Helper.buildAll(defau... | 3.68 |
MagicPlugin_ActionFactory_registerResolver | /**
* Registers an action resolver.
*
* @param actionResolver
* The action resolver to register.
* @param highPriority
* When this is set to true, the resolver is registered such that
* it is used before any of the currently registered resolvers.
* @throws NullPointerException
... | 3.68 |
hbase_StreamSlowMonitor_checkProcessTimeAndSpeed | /**
* Check if the packet process time shows that the relevant datanode is a slow node.
* @param datanodeInfo the datanode that processed the packet
* @param packetDataLen the data length of the packet (in bytes)
* @param processTimeMs the process time (in ms) of the packet on the datanode,
* @param last... | 3.68 |
graphhopper_BaseGraph_edge | /**
* Create edge between nodes a and b
*
* @return EdgeIteratorState of newly created edge
*/
@Override
public EdgeIteratorState edge(int nodeA, int nodeB) {
if (isFrozen())
throw new IllegalStateException("Cannot create edge if graph is already frozen");
if (nodeA == nodeB)
// Loop edges w... | 3.68 |
hbase_MasterObserver_postDeleteSnapshot | /**
* Called after the delete snapshot operation has been requested. Called as part of deleteSnapshot
* RPC call.
* @param ctx the environment to interact with the framework and master
* @param snapshot the SnapshotDescriptor of the snapshot to delete
*/
default void postDeleteSnapshot(final ObserverContext<M... | 3.68 |
framework_VConsole_setImplementation | /**
* Used by ApplicationConfiguration to initialize VConsole.
*
* @param console
*/
static void setImplementation(VDebugWindow console) {
impl = console;
} | 3.68 |
flink_HiveParallelismInference_limit | /**
* Apply limit to calculate the parallelism. Here limit is the limit in query <code>
* SELECT * FROM xxx LIMIT [limit]</code>.
*/
int limit(Long limit) {
if (!infer) {
return parallelism;
}
if (limit != null) {
parallelism = Math.min(parallelism, (int) (limit / 1000));
}
// m... | 3.68 |
flink_JobEdge_setForward | /** Sets whether the edge is forward edge. */
public void setForward(boolean forward) {
isForward = forward;
} | 3.68 |
morf_DeleteStatement_getLimit | /**
* Gets the limit.
*
* @return the limit on the number of deleted records.
*/
public Optional<Integer> getLimit() {
return limit;
} | 3.68 |
framework_SQLContainer_getPageLength | /**
* Returns the currently set page length.
*
* @return current page length
*/
public int getPageLength() {
return pageLength;
} | 3.68 |
framework_AbsoluteLayoutResizeComponents_addStartWithFullWidth | /**
* Build test layout for #8255
*/
private void addStartWithFullWidth(AbsoluteLayout layout) {
final Panel full = new Panel(
new CssLayout(new Label("Start Width 100%")));
full.setWidth("100%");
full.setId("expanding-panel");
layout.addComponent(full, "right:0;top:10px;");
layout.ad... | 3.68 |
hadoop_JsonSerialization_fromBytes | /**
* Deserialize from a byte array.
* @param bytes byte array
* @throws IOException IO problems
* @throws EOFException not enough data
* @return byte array.
*/
public T fromBytes(byte[] bytes) throws IOException {
return fromJson(new String(bytes, 0, bytes.length, UTF_8));
} | 3.68 |
framework_VaadinService_verifyNoOtherSessionLocked | /**
* Checks that another {@link VaadinSession} instance is not locked. This is
* internally used by {@link VaadinSession#accessSynchronously(Runnable)}
* and {@link UI#accessSynchronously(Runnable)} to help avoid causing
* deadlocks.
*
* @since 7.1
* @param session
* the session that is being locked... | 3.68 |
morf_JdbcUrlElements_getDatabaseName | /**
* @return the database name. The meaning of this varies between database types.
*/
public String getDatabaseName() {
return databaseName;
} | 3.68 |
flink_SubtaskStateStats_getSyncCheckpointDuration | /**
* @return Duration of the synchronous part of the checkpoint or <code>-1</code> if the runtime
* did not report this.
*/
public long getSyncCheckpointDuration() {
return syncCheckpointDuration;
} | 3.68 |
framework_VComboBox_selectLastItem | /**
* @deprecated use {@link SuggestionPopup#selectLastItem()} instead.
*/
@Deprecated
public void selectLastItem() {
debug("VComboBox.SM: selectLastItem()");
List<MenuItem> items = getItems();
MenuItem lastItem = items.get(items.size() - 1);
selectItem(lastItem);
} | 3.68 |
flink_StreamSource_markCanceledOrStopped | /**
* Marks this source as canceled or stopped.
*
* <p>This indicates that any exit of the {@link #run(Object, Output, OperatorChain)} method
* cannot be interpreted as the result of a finite source.
*/
protected void markCanceledOrStopped() {
this.canceledOrStopped = true;
} | 3.68 |
hadoop_ValueAggregatorBaseDescriptor_generateValueAggregator | /**
*
* @param type the aggregation type
* @return a value aggregator of the given type.
*/
static public ValueAggregator generateValueAggregator(String type) {
ValueAggregator retv = null;
if (type.compareToIgnoreCase(LONG_VALUE_SUM) == 0) {
retv = new LongValueSum();
} if (type.compareToIgnoreCase(LONG... | 3.68 |
morf_SqlDialect_getSqlForFloor | /**
* Converts the FLOOR function into SQL.
*
* @param function the function to convert.
* @return a string representation of the SQL.
* @see org.alfasoftware.morf.sql.element.Function#floor(AliasedField)
*/
protected String getSqlForFloor(Function function) {
return "FLOOR(" + getSqlFrom(function.getArguments(... | 3.68 |
flink_SSLUtils_createRestClientSSLEngineFactory | /**
* Creates a {@link SSLHandlerFactory} to be used by the REST Clients.
*
* @param config The application configuration.
*/
public static SSLHandlerFactory createRestClientSSLEngineFactory(final Configuration config)
throws Exception {
ClientAuth clientAuth =
SecurityOptions.isRestSSLAuthe... | 3.68 |
hadoop_WriteOperationHelper_newUploadPartRequestBuilder | /**
* Create and initialize a part request builder of a multipart upload.
* The part number must be less than 10000.
* Retry policy is once-translated; to much effort
* @param destKey destination key of ongoing operation
* @param uploadId ID of ongoing upload
* @param partNumber current part number of the upload
... | 3.68 |
hbase_FileArchiverNotifierImpl_getLastFullCompute | /**
* Returns a strictly-increasing measure of time extracted by {@link System#nanoTime()}.
*/
long getLastFullCompute() {
return lastFullCompute;
} | 3.68 |
hbase_AbstractFSWAL_getFiles | /**
* Get the backing files associated with this WAL.
* @return may be null if there are no files.
*/
FileStatus[] getFiles() throws IOException {
return CommonFSUtils.listStatus(fs, walDir, ourFiles);
} | 3.68 |
framework_JsonCodec_encodeObject | /*
* Loops through the fields of value and encodes them.
*/
private static EncodeResult encodeObject(Object value, Class<?> valueType,
JsonObject referenceValue, ConnectorTracker connectorTracker) {
JsonObject encoded = Json.createObject();
JsonObject diff = Json.createObject();
try {
for... | 3.68 |
hbase_ServerCrashProcedure_isMatchingRegionLocation | /**
* Moved out here so can be overridden by the HBCK fix-up SCP to be less strict about what it will
* tolerate as a 'match'.
* @return True if the region location in <code>rsn</code> matches that of this crashed server.
*/
protected boolean isMatchingRegionLocation(RegionStateNode rsn) {
return this.serverName.... | 3.68 |
morf_ViewBean_getSelectStatement | /**
* @see org.alfasoftware.morf.metadata.View#getSelectStatement()
*/
@Override
public SelectStatement getSelectStatement() {
if (!knowsSelectStatement)
throw new UnsupportedOperationException("Unable to return select statement for view [" + name + "]");
return selectStatement;
} | 3.68 |
rocketmq-connect_JsonSchemaConverterConfig_decimalFormat | /**
* decimal format
*
* @return
*/
public DecimalFormat decimalFormat() {
return props.containsKey(DECIMAL_FORMAT_CONFIG) ?
DecimalFormat.valueOf(props.get(DECIMAL_FORMAT_CONFIG).toString().toUpperCase(Locale.ROOT)) : DECIMAL_FORMAT_DEFAULT;
} | 3.68 |
hbase_Mutation_toCellVisibility | /**
* Convert a protocol buffer CellVisibility bytes to a client CellVisibility
* @return the converted client CellVisibility
*/
private static CellVisibility toCellVisibility(byte[] protoBytes)
throws DeserializationException {
if (protoBytes == null) return null;
ClientProtos.CellVisibility.Builder builder =... | 3.68 |
framework_Escalator_moveAndUpdateEscalatorRows | /**
* Move escalator rows around, and make sure everything gets
* appropriately repositioned and repainted.
*
* @param visualSourceRange
* the range of rows to move to a new place
* @param visualTargetIndex
* the visual index where the rows will be placed to
* @param logicalTargetIndex
* ... | 3.68 |
hbase_ZNodePaths_isMetaZNodePath | /** Returns True is the fully qualified path is for meta location */
public boolean isMetaZNodePath(String path) {
int prefixLen = baseZNode.length() + 1;
return path.length() > prefixLen && isMetaZNodePrefix(path.substring(prefixLen));
} | 3.68 |
hadoop_BlockBlobAppendStream_flush | /**
* Flushes this output stream and forces any buffered output bytes to be
* written out. If any data remains in the payload it is committed to the
* service. Data is queued for writing and forced out to the service
* before the call returns.
*/
@Override
public void flush() throws IOException {
if (closed) {
... | 3.68 |
framework_RowVisibilityChangeEvent_dispatch | /*
* (non-Javadoc)
*
* @see
* com.google.gwt.event.shared.GwtEvent#dispatch(com.google.gwt.event.shared
* .EventHandler)
*/
@Override
protected void dispatch(RowVisibilityChangeHandler handler) {
handler.onRowVisibilityChange(this);
} | 3.68 |
flink_Tuple7_equals | /**
* Deep equality for tuples by calling equals() on the tuple members.
*
* @param o the object checked for equality
* @return true if this is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Tuple7)) {
return false;
}
... | 3.68 |
flink_Time_hours | /** Creates a new {@link Time} that represents the given number of hours. */
public static Time hours(long hours) {
return of(hours, TimeUnit.HOURS);
} | 3.68 |
hadoop_ServiceLauncher_setService | /**
* Setter is to give subclasses the ability to manipulate the service.
* @param s the new service
*/
protected void setService(S s) {
this.service = s;
} | 3.68 |
hbase_MasterObserver_postListTablesInRSGroup | /**
* Called after listing all tables in the region server group.
* @param ctx the environment to interact with the framework and master
* @param groupName name of the region server group
*/
default void postListTablesInRSGroup(final ObserverContext<MasterCoprocessorEnvironment> ctx,
final String groupName)... | 3.68 |
dubbo_TriHttp2RemoteFlowController_channelHandlerContext | /**
* {@inheritDoc}
* <p>
* Any queued {@link FlowControlled} objects will be sent.
*/
@Override
public void channelHandlerContext(ChannelHandlerContext ctx) throws Http2Exception {
this.ctx = checkNotNull(ctx, "ctx");
// Writing the pending bytes will not check writability change and instead a writability... | 3.68 |
framework_CustomizedSystemMessages_setInternalErrorNotificationEnabled | /**
* Enables or disables the notification. If disabled, the set URL (or
* current) is loaded directly.
*
* @param internalErrorNotificationEnabled
* true = enabled, false = disabled
*/
public void setInternalErrorNotificationEnabled(
boolean internalErrorNotificationEnabled) {
this.interna... | 3.68 |
framework_DefaultFieldGroupFieldFactory_anyField | /**
* @since 7.4
* @param fieldType
* the type of the field
* @return true if any AbstractField can be assigned to the field
*/
protected boolean anyField(Class<?> fieldType) {
return fieldType == Field.class || fieldType == AbstractField.class;
} | 3.68 |
hmily_HmilyRepositoryStorage_updateHmilyParticipantStatus | /**
* Update hmily participant status.
*
* @param hmilyParticipant the hmily participant
*/
public static void updateHmilyParticipantStatus(final HmilyParticipant hmilyParticipant) {
if (Objects.nonNull(hmilyParticipant)) {
PUBLISHER.publishEvent(hmilyParticipant, EventTypeEnum.UPDATE_HMILY_PARTICIPANT_... | 3.68 |
flink_AbstractParameterTool_getUnrequestedParameters | /**
* Returns the set of parameter names which have not been requested with {@link #has(String)} or
* one of the {@code get} methods. Access to the map returned by {@link #toMap()} is not
* tracked.
*/
@PublicEvolving
public Set<String> getUnrequestedParameters() {
return Collections.unmodifiableSet(unrequested... | 3.68 |
flink_SourceTestSuiteBase_checkSourceMetrics | /** Compare the metrics. */
private boolean checkSourceMetrics(
MetricQuerier queryRestClient,
TestEnvironment testEnv,
JobID jobId,
String sourceName,
long allRecordSize)
throws Exception {
Double sumNumRecordsIn =
queryRestClient.getAggregatedMetricsByRe... | 3.68 |
graphhopper_InstructionsOutgoingEdges_getAllowedTurns | /**
* This method calculates the number of allowed outgoing edges, which could be considered the number of possible
* roads one might take at the intersection. This excludes the road you are coming from and inaccessible roads.
*/
public int getAllowedTurns() {
return 1 + allowedAlternativeTurns.size();
} | 3.68 |
hadoop_FileBasedCopyListing_getNumberOfPaths | /** {@inheritDoc} */
@Override
protected long getNumberOfPaths() {
return globbedListing.getNumberOfPaths();
} | 3.68 |
hadoop_S3ListResult_v2 | /**
* Restricted constructors to ensure v1 or v2, not both.
* @param result v2 result
* @return new list result container
*/
public static S3ListResult v2(ListObjectsV2Response result) {
return new S3ListResult(null, requireNonNull(result));
} | 3.68 |
hbase_TableMapReduceUtil_addDependencyJarsForClasses | /**
* Add the jars containing the given classes to the job's configuration such that JobClient will
* ship them to the cluster and add them to the DistributedCache. N.B. that this method at most
* adds one jar per class given. If there is more than one jar available containing a class with
* the same name as a give... | 3.68 |
hadoop_AbfsStatistic_getStatDescription | /**
* Getter for statistic description.
*
* @return Description of statistic.
*/
public String getStatDescription() {
return statDescription;
} | 3.68 |
graphhopper_GTFSFeed_getShape | /** Get the shape for the given shape ID */
public Shape getShape (String shape_id) {
Shape shape = new Shape(this, shape_id);
return shape.shape_dist_traveled.length > 0 ? shape : null;
} | 3.68 |
graphhopper_TranslationMap_get | /**
* Returns the Translation object for the specified locale and returns null if not found.
*/
public Translation get(String locale) {
locale = locale.replace("-", "_");
Translation tr = translations.get(locale);
if (locale.contains("_") && tr == null)
tr = translations.get(locale.substring(0, 2)... | 3.68 |
zxing_MinimalEncoder_getB256Size | // does not count beyond 250
int getB256Size() {
int cnt = 0;
Edge current = this;
while (current != null && current.mode == Mode.B256 && cnt <= 250) {
cnt++;
current = current.previous;
}
return cnt;
} | 3.68 |
flink_CalciteParser_parseIdentifier | /**
* Parses a SQL string as an identifier into a {@link SqlIdentifier}.
*
* @param identifier a sql string to parse as an identifier
* @return a parsed sql node
* @throws SqlParserException if an exception is thrown when parsing the identifier
*/
public SqlIdentifier parseIdentifier(String identifier) throws Sql... | 3.68 |
hadoop_ResourceEstimatorService_getHistoryResourceSkyline | /**
* Get history {@link ResourceSkyline} from {@link SkylineStore}. This
* function supports the following special wildcard operations regarding
* {@link RecurrenceId}: If the {@code pipelineId} is "*", it will return all
* entries in the store; else, if the {@code runId} is "*", it will return all
* {@link Resou... | 3.68 |
rocketmq-connect_AbstractConnectController_deleteConnectorConfig | /**
* Remove the connector with the specified connector name in the cluster.
*
* @param connectorName
*/
public void deleteConnectorConfig(String connectorName) {
configManagementService.deleteConnectorConfig(connectorName);
} | 3.68 |
flink_OperatingSystem_isWindows | /**
* Checks whether the operating system this JVM runs on is Windows.
*
* @return <code>true</code> if the operating system this JVM runs on is Windows, <code>false
* </code> otherwise
*/
public static boolean isWindows() {
return getCurrentOperatingSystem() == WINDOWS;
} | 3.68 |
flink_ResultPartitionType_canBePipelinedConsumed | /** return if this partition's upstream and downstream support scheduling in the same time. */
public boolean canBePipelinedConsumed() {
return consumingConstraint == ConsumingConstraint.CAN_BE_PIPELINED
|| consumingConstraint == ConsumingConstraint.MUST_BE_PIPELINED;
} | 3.68 |
zxing_BitSource_getBitOffset | /**
* @return index of next bit in current byte which would be read by the next call to {@link #readBits(int)}.
*/
public int getBitOffset() {
return bitOffset;
} | 3.68 |
hbase_CommonFSUtils_getRegionDir | /**
* Returns the {@link org.apache.hadoop.fs.Path} object representing the region directory under
* path rootdir
* @param rootdir qualified path of HBase root directory
* @param tableName name of table
* @param regionName The encoded region name
* @return {@link org.apache.hadoop.fs.Path} for region
*/
publ... | 3.68 |
flink_BloomFilter_mergeSerializedBloomFilters | /** Merge the bf2 bytes to bf1. After merge completes, the contents of bf1 will be changed. */
private static byte[] mergeSerializedBloomFilters(
byte[] bf1Bytes,
int bf1Start,
int bf1Length,
byte[] bf2Bytes,
int bf2Start,
int bf2Length) {
if (bf1Length != bf2Length) ... | 3.68 |
hbase_StoreUtils_hasReferences | /**
* Determines whether any files in the collection are references.
* @param files The files.
*/
public static boolean hasReferences(Collection<HStoreFile> files) {
// TODO: make sure that we won't pass null here in the future.
return files != null && files.stream().anyMatch(HStoreFile::isReference);
} | 3.68 |
hadoop_FederationUtil_updateMountPointStatus | /**
* Add the number of children for an existing HdfsFileStatus object.
* @param dirStatus HdfsfileStatus object.
* @param children number of children to be added.
* @return HdfsFileStatus with the number of children specified.
*/
public static HdfsFileStatus updateMountPointStatus(HdfsFileStatus dirStatus,
in... | 3.68 |
hadoop_CommitContext_buildThreadPool | /**
* Returns an {@link ExecutorService} for parallel tasks. The number of
* threads in the thread-pool is set by fs.s3a.committer.threads.
* If num-threads is 0, this will raise an exception.
* The threads have a lifespan set by
* {@link InternalCommitterConstants#THREAD_KEEP_ALIVE_TIME}.
* When the thread pool ... | 3.68 |
hadoop_RegistryPathUtils_join | /**
* Join two paths, guaranteeing that there will not be exactly
* one separator between the two, and exactly one at the front
* of the path. There will be no trailing "/" except for the special
* case that this is the root path
* @param base base path
* @param path second path to add
* @return a combined path.... | 3.68 |
dubbo_MeshRuleRouter_getDubboRoute | /**
* Match virtual service (by serviceName)
*/
protected DubboRoute getDubboRoute(VirtualServiceRule virtualServiceRule, Invocation invocation) {
String serviceName = invocation.getServiceName();
VirtualServiceSpec spec = virtualServiceRule.getSpec();
List<DubboRoute> dubboRouteList = spec.getDubbo();
... | 3.68 |
flink_StreamingJobGraphGenerator_setVertexParallelismsForDynamicGraphIfNecessary | /**
* This method is used to reset or set job vertices' parallelism for dynamic graph:
*
* <p>1. Reset parallelism for job vertices whose parallelism is not configured.
*
* <p>2. Set parallelism and maxParallelism for job vertices in forward group, to ensure the
* parallelism and maxParallelism of vertices in the... | 3.68 |
framework_PointerEvent_getHeight | /**
* Gets the height of the contact geometry of the pointer in CSS pixels.
*
* @return height in CSS pixels.
*/
public final int getHeight() {
return getHeight(getNativeEvent());
} | 3.68 |
hadoop_ManifestCommitterSupport_manifestPathForTask | /**
* Get the path in the job attempt dir for a manifest for a task.
* @param manifestDir manifest directory
* @param taskId taskID.
* @return the final path to rename the manifest file to
*/
public static Path manifestPathForTask(Path manifestDir, String taskId) {
return new Path(manifestDir, taskId + MANIFEST... | 3.68 |
hudi_FutureUtils_allOf | /**
* Similar to {@link CompletableFuture#allOf(CompletableFuture[])} with a few important
* differences:
*
* <ol>
* <li>Completes successfully as soon as *all* of the futures complete successfully</li>
* <li>Completes exceptionally as soon as *any* of the futures complete exceptionally</li>
* <li>In case it'... | 3.68 |
hadoop_LpSolver_getJobLen | /**
* Get the job length of recurring pipeline.
*
* @param resourceSkylines the history ResourceSkylines allocated to the
* recurring pipeline.
* @param numJobs number of history runs of the recurring pipeline.
* @return length of (discretized time intervals of) the recurring pipe... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.