name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
rocketmq-connect_DebeziumMysqlConnector_getConnectorClass | /**
* get connector class
*/
@Override
public String getConnectorClass() {
return DEFAULT_CONNECTOR;
} | 3.68 |
framework_BasicEventProvider_getEvents | /*
* (non-Javadoc)
*
* @see
* com.vaadin.addon.calendar.event.CalendarEventProvider#getEvents(java.
* util.Date, java.util.Date)
*/
@Override
public List<CalendarEvent> getEvents(Date startDate, Date endDate) {
List<CalendarEvent> activeEvents = new ArrayList<CalendarEvent>();
for (CalendarEvent ev : eve... | 3.68 |
framework_Table_getColumnExpandRatio | /**
* Gets the column expand ratio for a column. See
* {@link #setColumnExpandRatio(Object, float)}
*
* @param propertyId
* columns property id
* @return the expandRatio used to divide excess space for this column
*/
public float getColumnExpandRatio(Object propertyId) {
final Float width = column... | 3.68 |
hbase_FavoredNodeAssignmentHelper_generateMissingFavoredNodeMultiRack | /*
* Generates a missing FN based on the input favoredNodes and also the nodes to be skipped. Get
* the current layout of favored nodes arrangement and nodes to be excluded and get a random node
* that goes with HDFS block placement. Eg: If the existing nodes are on one rack, generate one
* from another rack. We ex... | 3.68 |
hbase_SecureBulkLoadManager_isFile | /**
* Check if the path is referencing a file. This is mainly needed to avoid symlinks.
* @return true if the p is a file
*/
private boolean isFile(Path p) throws IOException {
FileStatus status = srcFs.getFileStatus(p);
boolean isFile = !status.isDirectory();
try {
isFile =
isFile && !(Boolean) Meth... | 3.68 |
flink_RawFormatDeserializationSchema_createConverter | /** Creates a runtime converter. */
private static DeserializationRuntimeConverter createConverter(
LogicalType type, String charsetName, boolean isBigEndian) {
switch (type.getTypeRoot()) {
case CHAR:
case VARCHAR:
return createStringConverter(charsetName);
case VARBIN... | 3.68 |
flink_SingleInputGate_setupChannels | /** Assign the exclusive buffers to all remote input channels directly for credit-based mode. */
@VisibleForTesting
public void setupChannels() throws IOException {
// Allocate enough exclusive and floating buffers to guarantee that job can make progress.
// Note: An exception will be thrown if there is no buff... | 3.68 |
morf_AbstractSelectStatementBuilder_where | /**
* Specifies the where criteria. For use in code where the criteria are being generated dynamically.
* The iterable can be empty but not null.
*
* @param criteria the criteria to filter the results by. They will be <i>AND</i>ed together.
* @return this, for method chaining.
*/
public T where(Iterable<Criterion... | 3.68 |
hbase_HBaseTestingUtility_predicateNoRegionsInTransition | /**
* Returns a {@link Predicate} for checking that there are no regions in transition in master
*/
public ExplainingPredicate<IOException> predicateNoRegionsInTransition() {
return new ExplainingPredicate<IOException>() {
@Override
public String explainFailure() throws IOException {
final RegionState... | 3.68 |
hbase_BitComparator_toByteArray | /** Returns The comparator serialized using pb */
@Override
public byte[] toByteArray() {
ComparatorProtos.BitComparator.Builder builder = ComparatorProtos.BitComparator.newBuilder();
builder.setComparable(ProtobufUtil.toByteArrayComparable(this.value));
ComparatorProtos.BitComparator.BitwiseOp bitwiseOpPb =
... | 3.68 |
morf_ViewURLAsFile_downloadFileFromHttpUrl | /**
* Downloads a file over HTTP/HTTPS.
*
* @param url The url to download from.
* @param urlUsername The username for the url.
* @param urlPassword The password for the url.
* @param file The file to populate from the download.
*/
private void downloadFileFromHttpUrl(final URL url, final String urlUsername, fin... | 3.68 |
hbase_MobUtils_getMobColumnFamilies | /**
* Get list of Mob column families (if any exists)
* @param htd table descriptor
* @return list of Mob column families
*/
public static List<ColumnFamilyDescriptor> getMobColumnFamilies(TableDescriptor htd) {
List<ColumnFamilyDescriptor> fams = new ArrayList<ColumnFamilyDescriptor>();
ColumnFamilyDescriptor... | 3.68 |
hadoop_FederationCache_buildPolicyConfigMap | /**
* According to the cacheRequest, build PolicyConfigMap.
*
* @param cacheRequest CacheRequest.
* @return PolicyConfigMap.
*/
public static Map<String, SubClusterPolicyConfiguration> buildPolicyConfigMap(
CacheRequest<String, ?> cacheRequest){
Object value = cacheRequest.value;
SubClusterPolicyConfigurat... | 3.68 |
graphhopper_CarAccessParser_isForwardOneway | /**
* make sure that isOneway is called before
*/
protected boolean isForwardOneway(ReaderWay way) {
return !way.hasTag("oneway", "-1")
&& !way.hasTag("vehicle:forward", restrictedValues)
&& !way.hasTag("motor_vehicle:forward", restrictedValues);
} | 3.68 |
rocketmq-connect_MetricUtils_metricNameToString | /**
* MetricName to string
*
* @param name
* @return
*/
public static String metricNameToString(MetricName name) {
if (StringUtils.isEmpty(name.getType())) {
name.setType("none");
}
StringBuilder sb = new StringBuilder(ROCKETMQ_CONNECT)
.append(name.getGroup())
.append(S... | 3.68 |
hbase_RestoreTool_getRegionList | /**
* Gets region list
* @param tableArchivePath table archive path
* @return RegionList region list
* @throws IOException exception
*/
ArrayList<Path> getRegionList(Path tableArchivePath) throws IOException {
ArrayList<Path> regionDirList = new ArrayList<>();
FileStatus[] children = fs.listStatus(tableArchive... | 3.68 |
flink_Conditions_haveLeafReturnTypes | /**
* Tests leaf return types of a method against the given predicate.
*
* <p>See {@link #haveLeafTypes(DescribedPredicate)} for details.
*/
public static ArchCondition<JavaMethod> haveLeafReturnTypes(
DescribedPredicate<JavaClass> typePredicate) {
return new ArchCondition<JavaMethod>(
"have... | 3.68 |
querydsl_BeanMap_getType | /**
* Returns the type of the property with the given name.
*
* @param name the name of the property
* @return the type of the property, or {@code null} if no such
* property exists
*/
public Class<?> getType(String name) {
return types.get(name);
} | 3.68 |
flink_ModuleFactory_createModule | /** Creates and configures a {@link Module}. */
default Module createModule(Context context) {
throw new ModuleException("Module factories must implement createModule(Context).");
} | 3.68 |
hbase_HRegion_getNextSequenceId | /**
* Method to safely get the next sequence number.
* @return Next sequence number unassociated with any actual edit.
*/
protected long getNextSequenceId(final WAL wal) throws IOException {
WriteEntry we = mvcc.begin();
mvcc.completeAndWait(we);
return we.getWriteNumber();
} | 3.68 |
hbase_HRegion_sawWrongRegion | /**
* Records that a {@link WrongRegionException} has been observed.
*/
void sawWrongRegion() {
wrongRegion = true;
} | 3.68 |
AreaShop_CommandAreaShop_canExecute | /**
* Check if this Command instance can execute the given command and arguments.
* @param command The command to check for execution
* @param args The arguments to check
* @return true if it can execute the command, false otherwise
*/
public boolean canExecute(Command command, String[] args) {
String commandS... | 3.68 |
framework_Table_setContainerDataSource | /**
* Sets the container data source and the columns that will be visible.
* Columns are shown in the collection's iteration order.
* <p>
* Keeps propertyValueConverters if the corresponding id exists in the new
* data source and is of a compatible type.
* </p>
*
* @see Table#setContainerDataSource(Container)
... | 3.68 |
hadoop_IngressPortBasedResolver_getServerProperties | /**
* Identify the Sasl Properties to be used for a connection with a client.
* @param clientAddress client's address
* @param ingressPort the port that the client is connecting
* @return the sasl properties to be used for the connection.
*/
@Override
@VisibleForTesting
public Map<String, String> getServerProperti... | 3.68 |
pulsar_ModularLoadManagerImpl_updateBundleUnloadingMetrics | /**
* As leader broker, update bundle unloading metrics.
*
* @param bundlesToUnload
*/
private void updateBundleUnloadingMetrics(Multimap<String, String> bundlesToUnload) {
unloadBrokerCount += bundlesToUnload.keySet().size();
unloadBundleCount += bundlesToUnload.values().size();
List<Metrics> metrics ... | 3.68 |
flink_PartitionLoader_commitPartition | /**
* Reuse of PartitionCommitPolicy mechanisms. The default in Batch mode is metastore and
* success-file.
*/
private void commitPartition(LinkedHashMap<String, String> partitionSpec, Path path)
throws Exception {
PartitionCommitPolicy.Context context = new CommitPolicyContextImpl(partitionSpec, path);
... | 3.68 |
graphhopper_GTFSFeed_getInterpolatedStopTimesForTrip | /**
* For the given trip ID, fetch all the stop times in order, and interpolate stop-to-stop travel times.
*/
public Iterable<StopTime> getInterpolatedStopTimesForTrip (String trip_id) throws FirstAndLastStopsDoNotHaveTimes {
// clone stop times so as not to modify base GTFS structures
StopTime[] stopTimes = ... | 3.68 |
hbase_StoreFileWriter_getGeneralBloomWriter | /**
* For unit testing only.
* @return the Bloom filter used by this writer.
*/
BloomFilterWriter getGeneralBloomWriter() {
return generalBloomFilterWriter;
} | 3.68 |
hbase_SnappyCodec_isLoaded | /** Return true if the native shared libraries were loaded; false otherwise. */
public static boolean isLoaded() {
return loaded;
} | 3.68 |
hbase_QuotaFilter_setRegionServerFilter | /**
* Set the region server filter regex
* @param regex the region server filter
* @return the quota filter object
*/
public QuotaFilter setRegionServerFilter(final String regex) {
this.regionServerRegex = regex;
hasFilters |= StringUtils.isNotEmpty(regex);
return this;
} | 3.68 |
framework_BrowserInfo_getWebkitVersion | /**
* Returns the WebKit version if the browser is WebKit based. The WebKit
* version returned is the major version e.g., 523.
*
* @return The WebKit version or -1 if the browser is not WebKit based
*/
public float getWebkitVersion() {
if (!browserDetails.isWebKit()) {
return -1;
}
return brow... | 3.68 |
flink_SingleInputPlanNode_getPredecessor | /**
* Gets the predecessor of this node, i.e. the source of the input channel.
*
* @return The predecessor of this node.
*/
public PlanNode getPredecessor() {
return this.input.getSource();
} | 3.68 |
hbase_RegionNormalizerManager_isNormalizerOn | /**
* Return {@code true} if region normalizer is on, {@code false} otherwise
*/
public boolean isNormalizerOn() {
return regionNormalizerStateStore.get();
} | 3.68 |
morf_Function_count | /**
* Helper method to create an instance of the "count" SQL function.
*
* @param field the field to evaluate in the count function.
*
* @return an instance of a count function
*/
public static Function count(AliasedField field) {
return new Function(FunctionType.COUNT, field);
} | 3.68 |
hadoop_BondedS3AStatisticsContext_newDelegationTokenStatistics | /**
* Create a delegation token statistics instance.
* @return an instance of delegation token statistics
*/
@Override
public DelegationTokenStatistics newDelegationTokenStatistics() {
return getInstrumentation().newDelegationTokenStatistics();
} | 3.68 |
hadoop_BigDecimalSplitter_tryDivide | /**
* Divide numerator by denominator. If impossible in exact mode, use rounding.
*/
protected BigDecimal tryDivide(BigDecimal numerator, BigDecimal denominator) {
try {
return numerator.divide(denominator);
} catch (ArithmeticException ae) {
return numerator.divide(denominator, BigDecimal.ROUND_HALF_UP);... | 3.68 |
hadoop_TypedBytesInput_readRawBool | /**
* Reads the raw bytes following a <code>Type.BOOL</code> code.
* @return the obtained bytes sequence
* @throws IOException
*/
public byte[] readRawBool() throws IOException {
byte[] bytes = new byte[2];
bytes[0] = (byte) Type.BOOL.code;
in.readFully(bytes, 1, 1);
return bytes;
} | 3.68 |
framework_ExpandingContainer_addItemAfter | /**
* @throws UnsupportedOperationException
* always
*/
@Override
public Item addItemAfter(Object previousItemId, Object newItemId) {
throw new UnsupportedOperationException();
} | 3.68 |
framework_VComboBox_actOnEnteredValueAfterFiltering | /**
* Create/select a suggestion based on the used entered string. This
* method is called after filtering has completed with the given string.
*
* @param enteredItemValue
* user entered string
*/
public void actOnEnteredValueAfterFiltering(String enteredItemValue) {
debug("VComboBox.SM: doPostFilt... | 3.68 |
hadoop_BlockReaderLocalMetrics_collectThreadLocalStates | /**
* Collects states maintained in {@link ThreadLocal}, if any.
*/
public void collectThreadLocalStates() {
shortCircuitReadRollingAverages.collectThreadLocalStates();
} | 3.68 |
hudi_JdbcSource_fetch | /**
* Decide to do a full RDBMS table scan or an incremental scan based on the lastCkptStr. If previous checkpoint
* value exists then we do an incremental scan with a PPD query or else we do a full scan. In certain cases where the
* incremental query fails, we fallback to a full scan.
*
* @param lastCkptStr Last ... | 3.68 |
flink_DefaultJobGraphStore_localCleanupAsync | /**
* Releases the locks on the specified {@link JobGraph}.
*
* <p>Releasing the locks allows that another instance can delete the job from the {@link
* JobGraphStore}.
*
* @param jobId specifying the job to release the locks for
* @param executor the executor being used for the asynchronous execution of the loc... | 3.68 |
framework_SliderTooltip_getTicketNumber | /*
* (non-Javadoc)
*
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
protected Integer getTicketNumber() {
return 14019;
} | 3.68 |
flink_VertexThreadInfoTrackerBuilder_newBuilder | /**
* Create a new {@link VertexThreadInfoTrackerBuilder}.
*
* @return Builder.
*/
public static VertexThreadInfoTrackerBuilder newBuilder(
GatewayRetriever<ResourceManagerGateway> resourceManagerGatewayRetriever,
ScheduledExecutorService executor,
Time restTimeout) {
return new VertexTh... | 3.68 |
framework_VCalendar_setRangeMoveAllowed | /**
* Is moving a range allowed.
*
* @param rangeMoveAllowed
* Is it allowed
*/
public void setRangeMoveAllowed(boolean rangeMoveAllowed) {
this.rangeMoveAllowed = rangeMoveAllowed;
} | 3.68 |
morf_RenameIndex_getTableName | /**
* Gets the name of the table to change.
*
* @return the name of the table to change
*/
public String getTableName() {
return tableName;
} | 3.68 |
flink_DateTimeUtils_fromTemporalAccessor | /**
* This is similar to {@link LocalDateTime#from(TemporalAccessor)}, but it's less strict and
* introduces default values.
*/
private static LocalDateTime fromTemporalAccessor(TemporalAccessor accessor, int precision) {
// complement year with 1970
int year = accessor.isSupported(YEAR) ? accessor.get(YEAR)... | 3.68 |
morf_DatabaseMetaDataProvider_setAdditionalColumnMetadata | /**
* Sets additional column information.
*
* @param tableName Name of the table.
* @param column Column builder to set to.
* @param columnResultSet Result set to be read.
* @return Resulting column builder.
* @throws SQLException Upon errors.
*/
@SuppressWarnings("unused")
protected ColumnBuilder setAdditional... | 3.68 |
hudi_HoodieFunctionalIndexConfig_storeProperties | /**
* Write the properties to the given output stream and return the table checksum.
*
* @param props - properties to be written
* @param outputStream - output stream to which properties will be written
* @return return the table checksum
*/
private static String storeProperties(Properties props, FSDataOut... | 3.68 |
hudi_StreamerUtil_isWriteCommit | /**
* Returns whether the given instant is a data writing commit.
*
* @param tableType The table type
* @param instant The instant
* @param timeline The timeline
*/
public static boolean isWriteCommit(HoodieTableType tableType, HoodieInstant instant, HoodieTimeline timeline) {
return tableType == HoodieTable... | 3.68 |
hudi_UpsertPartitioner_averageBytesPerRecord | /**
* Obtains the average record size based on records written during previous commits. Used for estimating how many
* records pack into one file.
*/
protected static long averageBytesPerRecord(HoodieTimeline commitTimeline, HoodieWriteConfig hoodieWriteConfig) {
long avgSize = hoodieWriteConfig.getCopyOnWriteReco... | 3.68 |
hadoop_CredentialProviderListFactory_initCredentialProvidersMap | /**
* Maps V1 credential providers to either their equivalent SDK V2 class or hadoop provider.
*/
private static Map<String, String> initCredentialProvidersMap() {
Map<String, String> v1v2CredentialProviderMap = new HashMap<>();
v1v2CredentialProviderMap.put(ANONYMOUS_CREDENTIALS_V1,
AnonymousAWSCredential... | 3.68 |
framework_AbstractSelect_containerPropertySetChange | /**
* Notifies this listener that the Containers contents has changed.
*
* @see Container.PropertySetChangeListener#containerPropertySetChange(Container.PropertySetChangeEvent)
*/
@Override
public void containerPropertySetChange(
Container.PropertySetChangeEvent event) {
firePropertySetChange();
} | 3.68 |
framework_IndexedContainer_clone | /**
* Supports cloning of the IndexedContainer cleanly.
*
* @throws CloneNotSupportedException
* if an object cannot be cloned. .
*
* @deprecated As of 6.6. Cloning support might be removed from
* IndexedContainer in the future
*/
@Deprecated
@Override
public Object clone() throws CloneN... | 3.68 |
hadoop_RemoteParam_getParameterForContext | /**
* Determine the appropriate value for this parameter based on the location.
*
* @param context Context identifying the location.
* @return A parameter specific to this location.
*/
public Object getParameterForContext(RemoteLocationContext context) {
if (context == null) {
return null;
} else if (this.... | 3.68 |
morf_IndexNameDecorator_isUnique | /**
* @see org.alfasoftware.morf.metadata.Index#isUnique()
*/
@Override
public boolean isUnique() {
return index.isUnique();
} | 3.68 |
pulsar_NamespacesBase_internalRemoveReplicatorDispatchRate | /**
* Base method for removeReplicatorDispatchRate v1 and v2.
* Notion: don't re-use this logic.
*/
protected void internalRemoveReplicatorDispatchRate(AsyncResponse asyncResponse) {
validateSuperUserAccessAsync()
.thenCompose(__ -> namespaceResources().setPoliciesAsync(namespaceName, policies -> {
... | 3.68 |
morf_AbstractSqlDialectTest_testSelectWhereScript | /**
* Tests a select with a where clause.
*/
@Test
public void testSelectWhereScript() {
SelectStatement stmt = new SelectStatement().from(new TableReference(TEST_TABLE))
.where(eq(new FieldReference(STRING_FIELD), "A0001"));
String value = varCharCast("'A0001'");
String expectedSql = "SELECT * FROM " + ... | 3.68 |
pulsar_SchemaReader_setSchemaInfoProvider | /**
* Set schema info provider, this method support multi version reader.
*
* @param schemaInfoProvider the stream of message
*/
default void setSchemaInfoProvider(SchemaInfoProvider schemaInfoProvider) {
} | 3.68 |
flink_DeduplicateFunctionHelper_checkInsertOnly | /** check message should be insert only. */
static void checkInsertOnly(RowData currentRow) {
Preconditions.checkArgument(currentRow.getRowKind() == RowKind.INSERT);
} | 3.68 |
framework_DragSourceExtensionConnector_sendDragEndEventToServer | /**
* Initiates a server RPC for the drag end event.
*
* @param dragEndEvent
* Client side dragend event.
* @param dropEffect
* Drop effect of the dragend event, extracted from {@code
* DataTransfer.dropEffect} parameter.
*/
protected void sendDragEndEventToServer(NativeEvent dragE... | 3.68 |
pulsar_ManagedLedgerConfig_getMinimumBacklogCursorsForCaching | /**
* Minimum cursors with backlog after which broker is allowed to cache read entries to reuse them for other cursors'
* backlog reads. (Default = 0, broker will not cache backlog reads)
*
* @return
*/
public int getMinimumBacklogCursorsForCaching() {
return minimumBacklogCursorsForCaching;
} | 3.68 |
querydsl_ExtendedTypeFactory_createClassType | // TODO : simplify
private Type createClassType(DeclaredType declaredType, TypeElement typeElement, boolean deep) {
// other
String name = typeElement.getQualifiedName().toString();
if (name.startsWith("java.")) {
Iterator<? extends TypeMirror> i = declaredType.getTypeArguments().iterator();
... | 3.68 |
hbase_CheckAndMutate_ifNotExists | /**
* Check for lack of column
* @param family family to check
* @param qualifier qualifier to check
* @return the CheckAndMutate object
*/
public Builder ifNotExists(byte[] family, byte[] qualifier) {
return ifEquals(family, qualifier, null);
} | 3.68 |
flink_CompactingHashTable_getPartitioningFanOutNoEstimates | /**
* Gets the number of partitions to be used for an initial hash-table, when no estimates are
* available.
*
* <p>The current logic makes sure that there are always between 10 and 32 partitions, and close
* to 0.1 of the number of buffers.
*
* @param numBuffers The number of buffers available.
* @return The n... | 3.68 |
flink_KubernetesUtils_getDeploymentName | /** Generate name of the Deployment. */
public static String getDeploymentName(String clusterId) {
return clusterId;
} | 3.68 |
framework_VaadinSession_writeObject | /**
* Override default serialization logic to avoid
* ConcurrentModificationException if the contents are modified while
* serialization is reading them.
*/
private void writeObject(ObjectOutputStream out) throws IOException {
Lock lock = this.lock;
if (lock != null) {
lock.lock();
}
try {
... | 3.68 |
zxing_DetectionResultRowIndicatorColumn_adjustCompleteIndicatorColumnRowNumbers | // TODO implement properly
// TODO maybe we should add missing codewords to store the correct row number to make
// finding row numbers for other columns easier
// use row height count to make detection of invalid row numbers more reliable
void adjustCompleteIndicatorColumnRowNumbers(BarcodeMetadata barcodeMetadata) {
... | 3.68 |
hadoop_ReconfigurationException_getNewValue | /**
* Get value to which property was supposed to be changed.
* @return new value.
*/
public String getNewValue() {
return newVal;
} | 3.68 |
hadoop_VolumeFailureSummary_getLastVolumeFailureDate | /**
* Returns the date/time of the last volume failure in milliseconds since
* epoch.
*
* @return date/time of last volume failure in milliseconds since epoch
*/
public long getLastVolumeFailureDate() {
return this.lastVolumeFailureDate;
} | 3.68 |
flink_Tuple2_toString | /**
* Creates a string representation of the tuple in the form (f0, f1), where the individual
* fields are the value returned by calling {@link Object#toString} on that field.
*
* @return The string representation of the tuple.
*/
@Override
public String toString() {
return "("
+ StringUtils.arrayA... | 3.68 |
morf_DatabaseMetaDataProvider_tables | /**
* @see org.alfasoftware.morf.metadata.Schema#tables()
*/
@Override
public Collection<Table> tables() {
return tableNames.get().values().stream().map(RealName::getRealName).map(this::getTable).collect(Collectors.toList());
} | 3.68 |
framework_Calendar_setLastVisibleDayOfWeek | /**
* <p>
* This method restricts the weekdays that are shown. This affects both the
* monthly and the weekly view. The general contract is that <b>firstDay <
* lastDay</b>.
* </p>
*
* <p>
* Note that this only affects the rendering process. Events are still
* requested by the dates set by {@link #setStartDate... | 3.68 |
hbase_ProcedureStoreTracker_mergeNodes | /**
* Merges {@code leftNode} & {@code rightNode} and updates the map.
*/
private BitSetNode mergeNodes(BitSetNode leftNode, BitSetNode rightNode) {
assert leftNode.getStart() < rightNode.getStart();
leftNode.merge(rightNode);
map.remove(rightNode.getStart());
return leftNode;
} | 3.68 |
flink_RestServerEndpoint_getRestBaseUrl | /**
* Returns the base URL of the REST server endpoint.
*
* @return REST base URL of this endpoint
*/
public String getRestBaseUrl() {
synchronized (lock) {
assertRestServerHasBeenStarted();
return restBaseUrl;
}
} | 3.68 |
hadoop_FutureIO_awaitFuture | /**
* Given a future, evaluate it.
* <p>
* Any exception generated in the future is
* extracted and rethrown.
* </p>
* @param future future to evaluate
* @param timeout timeout to wait
* @param unit time unit.
* @param <T> type of the result.
* @return the result, if all went well.
* @throws InterruptedIOExc... | 3.68 |
framework_Table_setCurrentPageFirstItemId | /**
* Setter for property currentPageFirstItemId.
*
* @param currentPageFirstItemId
* the New value of property currentPageFirstItemId.
*/
public void setCurrentPageFirstItemId(Object currentPageFirstItemId) {
// Gets the corresponding index
int index = -1;
if (items instanceof Container.In... | 3.68 |
dubbo_URLParam_getParameter | /**
* get value of specified key in URLParam
*
* @param key specified key
* @return value, null if key is absent
*/
public String getParameter(String key) {
int keyIndex = DynamicParamTable.getKeyIndex(enableCompressed, key);
if (keyIndex < 0) {
return EXTRA_PARAMS.get(key);
}
if (KEY.get(k... | 3.68 |
hbase_MobUtils_createMobRefCell | /**
* Creates a mob reference KeyValue. The value of the mob reference KeyValue is mobCellValueSize +
* mobFileName.
* @param cell The original Cell.
* @param fileName The mob file name where the mob reference KeyValue is written.
* @param tableNameTag The tag of the current table name. It's very impor... | 3.68 |
morf_SqlDialect_addTableFromStatements | /**
* Generates the SQL to create a table and insert the data specified in the {@link SelectStatement}.
*
* @param table The table to create.
* @param selectStatement The {@link SelectStatement}
* @return A collection of SQL statements
*/
public Collection<String> addTableFromStatements(Table table, SelectStateme... | 3.68 |
hbase_ImmutableBytesWritable_getLength | /** Returns the number of valid bytes in the buffer */
public int getLength() {
if (this.bytes == null) {
throw new IllegalStateException(
"Uninitialiized. Null constructor " + "called w/o accompaying readFields invocation");
}
return this.length;
} | 3.68 |
hbase_ProcedureWALPrettyPrinter_processFile | /**
* Reads a log file and outputs its contents.
* @param conf HBase configuration relevant to this log file
* @param p path of the log file to be read
* @throws IOException IOException
*/
public void processFile(final Configuration conf, final Path p) throws IOException {
FileSystem fs = p.getFileSystem(con... | 3.68 |
hudi_LogReaderUtils_decodeRecordPositionsHeader | /**
* Decodes the {@link HeaderMetadataType#RECORD_POSITIONS} block header into record positions.
*
* @param content A string of Base64-encoded bytes ({@link java.util.Base64} in Java
* implementation) generated from serializing {@link Roaring64NavigableMap}
* bitmap using the portabl... | 3.68 |
hadoop_CopyOutputFormat_getWorkingDirectory | /**
* Getter for the working directory.
* @param job The Job from whose configuration the working-directory is to
* be retrieved.
* @return The working-directory Path.
*/
public static Path getWorkingDirectory(Job job) {
return getWorkingDirectory(job.getConfiguration());
} | 3.68 |
hadoop_ReadBufferManager_getBufferFromCompletedQueue | /**
* Returns buffers that failed or passed from completed queue.
* @param stream
* @param requestedOffset
* @return
*/
private ReadBuffer getBufferFromCompletedQueue(final AbfsInputStream stream, final long requestedOffset) {
for (ReadBuffer buffer : completedReadList) {
// Buffer is returned if the request... | 3.68 |
flink_SpillingThread_mergeChannelList | /**
* Merges the given sorted runs to a smaller number of sorted runs.
*
* @param channelIDs The IDs of the sorted runs that need to be merged.
* @param allReadBuffers
* @param writeBuffers The buffers to be used by the writers.
* @return A list of the IDs of the merged channels.
* @throws IOException Thrown, if... | 3.68 |
flink_AbstractColumnReader_readToVector | /** Reads `total` values from this columnReader into column. */
@Override
public final void readToVector(int readNumber, VECTOR vector) throws IOException {
int rowId = 0;
WritableIntVector dictionaryIds = null;
if (dictionary != null) {
dictionaryIds = vector.reserveDictionaryIds(readNumber);
}... | 3.68 |
framework_WindowElement_isMaximized | /**
* Check if this window is currently maximized.
*/
public boolean isMaximized() {
return isElementPresent(By.className(RESTORE_BOX_CLASS));
} | 3.68 |
hbase_HBaseServerBase_setupClusterConnection | /**
* Setup our cluster connection if not already initialized.
*/
protected final synchronized void setupClusterConnection() throws IOException {
if (asyncClusterConnection == null) {
InetSocketAddress localAddress =
new InetSocketAddress(rpcServices.getSocketAddress().getAddress(), 0);
User user = us... | 3.68 |
flink_ProjectOperator_projectTuple1 | /**
* Projects a {@link Tuple} {@link DataSet} to the previously selected fields.
*
* @return The projected DataSet.
* @see Tuple
* @see DataSet
*/
public <T0> ProjectOperator<T, Tuple1<T0>> projectTuple1() {
TypeInformation<?>[] fTypes = extractFieldTypes(fieldIndexes, ds.getType());
TupleTypeInfo<Tuple1... | 3.68 |
framework_DesignContext_shouldWriteDefaultValues | /**
* Determines whether default attribute values should be written by the
* {@code DesignAttributeHandler#writeAttribute(String, Attributes, Object, Object, Class, DesignContext)}
* method. Default is {@code false}.
*
* @since 8.0
* @return {@code true} if default values of attributes should be written,
* ... | 3.68 |
hadoop_ManifestCommitter_getWorkPath | /**
* Work path of the current task attempt.
* This is null if the task does not have one.
* @return a path.
*/
@Override
public Path getWorkPath() {
return getTaskAttemptDir();
} | 3.68 |
framework_VAbstractDropHandler_drop | /**
* The default implemmentation visits server if {@link AcceptCriterion}
* can't be verified on client or if {@link AcceptCriterion} are met on
* client.
*/
@Override
public boolean drop(VDragEvent drag) {
if (acceptCriteria.needsServerSideCheck(drag, criterioUIDL)) {
return true;
} else {
... | 3.68 |
flink_TimestampedValue_hasTimestamp | /**
* Checks whether this record has a timestamp.
*
* @return True if the record has a timestamp, false if not.
*/
public boolean hasTimestamp() {
return hasTimestamp;
} | 3.68 |
shardingsphere-elasticjob_AbstractDistributeOnceElasticJobListener_notifyWaitingTaskComplete | /**
* Notify waiting task complete.
*/
public void notifyWaitingTaskComplete() {
synchronized (completedWait) {
completedWait.notifyAll();
}
} | 3.68 |
framework_VAbstractTextualDate_checkGroupFocus | /**
* Checks if the group focus has changed, and sends to the server if needed.
*
* @param textFocus
* the focus of the {@link #text}
* @since 8.3
*/
protected void checkGroupFocus(boolean textFocus) {
boolean newGroupFocus = textFocus | hasChildFocus();
if (getClient() != null
&& c... | 3.68 |
flink_BlobInputStream_throwEOFException | /**
* Convenience method to throw an {@link EOFException}.
*
* @throws EOFException thrown to indicate the underlying input stream did not provide as much
* data as expected
*/
private void throwEOFException() throws EOFException {
throw new EOFException(
String.format(
"Exp... | 3.68 |
flink_GateNotificationHelper_notifyPriority | /** Must be called under lock to ensure integrity of priorityAvailabilityHelper. */
public void notifyPriority() {
toNotifyPriority = inputGate.priorityAvailabilityHelper.getUnavailableToResetAvailable();
} | 3.68 |
hadoop_AzureBlobFileSystem_breakLease | /**
* Break the current lease on an ABFS file if it exists. A lease that is broken cannot be
* renewed. A new lease may be obtained on the file immediately.
*
* @param f file name
* @throws IOException on any exception while breaking the lease
*/
public void breakLease(final Path f) throws IOException {
LOG.deb... | 3.68 |
hadoop_ZStandardDecompressor_reset | /**
* Resets everything including the input buffers (user and direct).
*/
@Override
public void reset() {
checkStream();
init(stream);
remaining = 0;
finished = false;
compressedDirectBufOff = 0;
bytesInCompressedBuffer = 0;
uncompressedDirectBuf.limit(directBufferSize);
uncompressedDirectBuf.position... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.