name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
flink_DynamicSinkUtils_convertPredicateToNegative
/** Convert the predicate in WHERE clause to the negative predicate. */ private static void convertPredicateToNegative(LogicalTableModify tableModify) { RexBuilder rexBuilder = tableModify.getCluster().getRexBuilder(); RelNode input = tableModify.getInput(); LogicalFilter newFilter; // if the input is a...
3.68
hbase_HFileOutputFormat2_createFamilyBlockSizeMap
/** * Runs inside the task to deserialize column family to block size map from the configuration. * @param conf to read the serialized values from * @return a map from column family to the configured block size */ @InterfaceAudience.Private static Map<byte[], Integer> createFamilyBlockSizeMap(Configuration conf) { ...
3.68
hadoop_FederationCache_buildSubClusterInfoMap
/** * According to the subClusters, build SubClusterInfoMap. * * @param subClusters subCluster List. * @return SubClusterInfoMap. */ private static Map<SubClusterId, SubClusterInfo> buildSubClusterInfoMap( List<SubClusterInfo> subClusters) { Map<SubClusterId, SubClusterInfo> subClustersMap = new HashMap<>(su...
3.68
dubbo_ReflectUtils_getAllFieldNames
/** * Get all field names of target type * @param type * @return */ public static Set<String> getAllFieldNames(Class<?> type) { Set<String> fieldNames = new HashSet<>(); for (Field field : type.getDeclaredFields()) { fieldNames.add(field.getName()); } Set<Class<?>> allSuperClasses = ClassU...
3.68
morf_AbstractSqlDialectTest_testSelectMinimum
/** * Tests use of a minimum function in a select. */ @Test public void testSelectMinimum() { SelectStatement stmt = new SelectStatement(min(new FieldReference(INT_FIELD))).from(new TableReference(TEST_TABLE)); String expectedSql = "SELECT MIN(intField) FROM " + tableName(TEST_TABLE); assertEquals("Select with ...
3.68
streampipes_SpTrajectoryBuilder_returnAsLineString
/** * returns a JTS LineString geometry from the trajectory object. LineString only stores the point * geometry without M value. The lineString is oriented to the trajectory direction. This means: the * newest point is always the last point and has the highest subpoint index. The First point is the * oldest point w...
3.68
pulsar_ManagedLedgerImpl_releaseReadHandleIfNoLongerRead
/** * @param ledgerId the ledger handle which maybe will be released. * @return if the ledger handle was released. */ private boolean releaseReadHandleIfNoLongerRead(long ledgerId, long slowestNonDurationLedgerId) { if (ledgerId < slowestNonDurationLedgerId) { if (log.isDebugEnabled()) { log....
3.68
framework_AbstractBeanContainer_createBeanItem
/** * Create a BeanItem for a bean using pre-parsed bean metadata (based on * {@link #getBeanType()}). * * @param bean * @return created {@link BeanItem} or null if bean is null */ protected BeanItem<BEANTYPE> createBeanItem(BEANTYPE bean) { return bean == null ? null : new BeanItem<BEANTYPE>(bean, model); }
3.68
framework_Slot_isRelativeInDirection
/** * Returns whether this slot has relative size in the indicated direction. * * @param vertical * {@code true} if the height should be checked, {@code false} if * the width should be checked * @return {@code true} if the slot's indicated dimension is relative, * {@code false} othe...
3.68
flink_BuiltInFunctionDefinition_newBuilder
/** Builder for configuring and creating instances of {@link BuiltInFunctionDefinition}. */ public static BuiltInFunctionDefinition.Builder newBuilder() { return new BuiltInFunctionDefinition.Builder(); }
3.68
hadoop_MappingRuleResult_isCreateAllowed
/** * The method returns true if the result queue should be created when it does * not exist yet. * @return true if non-existent queues should be created */ public boolean isCreateAllowed() { return allowCreate; }
3.68
pulsar_SchemaReader_read
/** * serialize bytes convert pojo. * * @param inputStream the stream of message * @param schemaVersion the schema version of message * @return the serialized object */ default T read(InputStream inputStream, byte[] schemaVersion) { return read(inputStream); }
3.68
framework_DesignAttributeHandler_getSupportedAttributes
/** * Searches for supported setter and getter types from the specified class * and returns the list of corresponding design attributes. * * @param clazz * the class scanned for setters * @return the list of supported design attributes */ public static Collection<String> getSupportedAttributes(Class<?...
3.68
hbase_SnapshotDescriptionUtils_isSubDirectoryOf
/** * Determines if the given workingDir is a subdirectory of the given "root directory" * @param workingDir a directory to check * @param rootDir root directory of the HBase installation * @return true if the given workingDir is a subdirectory of the given root directory, false * otherwise */ public s...
3.68
flink_MethodlessRouter_addRoute
/** * This method does nothing if the path pattern has already been added. A path pattern can only * point to one target. */ public MethodlessRouter<T> addRoute(String pathPattern, T target) { PathPattern p = new PathPattern(pathPattern); if (routes.containsKey(p)) { return this; } routes.pu...
3.68
hbase_MasterObserver_preSplitRegionAfterMETAAction
/** * This will be called after update META step as part of split transaction * @param ctx the environment to interact with the framework and master */ default void preSplitRegionAfterMETAAction( final ObserverContext<MasterCoprocessorEnvironment> ctx) throws IOException { }
3.68
flink_ResourceProfile_getNetworkMemory
/** * Get the network memory needed. * * @return The network memory */ public MemorySize getNetworkMemory() { throwUnsupportedOperationExceptionIfUnknown(); return networkMemory; }
3.68
framework_DateCell_addEmphasisStyle
/** * @since 7.2 */ public void addEmphasisStyle(Element elementOver) { addEmphasisStyle(DOM.asOld(elementOver)); }
3.68
querydsl_CurveExpression_endPoint
/** * The end Point of this Curve. * * @return end point */ public PointExpression<Point> endPoint() { if (endPoint == null) { endPoint = GeometryExpressions.pointOperation(SpatialOps.END_POINT, mixin); } return endPoint; }
3.68
flink_CheckpointStatsTracker_reportRestoredCheckpoint
/** * Callback when a checkpoint is restored. * * @param restored The restored checkpoint stats. */ void reportRestoredCheckpoint(RestoredCheckpointStats restored) { checkNotNull(restored, "Restored checkpoint"); statsReadWriteLock.lock(); try { counts.incrementRestoredCheckpoints(); la...
3.68
hadoop_Nfs3HttpServer_getServerURI
/** * Return the URI that locates the HTTP server. */ public URI getServerURI() { // getHttpClientScheme() only returns https for HTTPS_ONLY policy. This // matches the behavior that the first connector is a HTTPS connector only // for HTTPS_ONLY policy. InetSocketAddress addr = httpServer.getConnectorAddress...
3.68
morf_SqlDialect_tableDeploymentStatements
/** * Creates SQL to deploy a database table and its associated indexes. * * @param table The meta data for the table to deploy. * @return The statements required to deploy the table and its indexes. */ public Collection<String> tableDeploymentStatements(Table table) { Builder<String> statements = ImmutableList....
3.68
hudi_PartialBindVisitor_visitPredicate
/** * If an expression is null after accept method, which means it cannot be bounded from * schema, we'll directly return {@link Predicates.TrueExpression}. */ @Override public Expression visitPredicate(Predicate predicate) { if (predicate instanceof Predicates.BinaryComparison) { Predicates.BinaryComparison ...
3.68
hudi_HoodieInputFormatUtils_filterIncrementalFileStatus
/** * Filter a list of FileStatus based on commitsToCheck for incremental view. * * @param job * @param tableMetaClient * @param timeline * @param fileStatuses * @param commitsToCheck * @return */ public static List<FileStatus> filterIncrementalFileStatus(Job job, HoodieTableMetaClient tableMetaClient, ...
3.68
pulsar_ProducerConfiguration_setCryptoKeyReader
/** * Sets a {@link CryptoKeyReader}. * * @param cryptoKeyReader * CryptoKeyReader object */ public ProducerConfiguration setCryptoKeyReader(CryptoKeyReader cryptoKeyReader) { Objects.requireNonNull(cryptoKeyReader); conf.setCryptoKeyReader(cryptoKeyReader); return this; }
3.68
hadoop_MoveStep_setTolerancePercent
/** * Sets the tolerance percentage. * @param tolerancePercent - long */ @Override public void setTolerancePercent(long tolerancePercent) { this.tolerancePercent = tolerancePercent; }
3.68
morf_SqlDialect_addCastsToSelect
/** * For some dialects, this casting is required, as the type may not be inferred for every field in the select statement. * @param table the table to add the casts. * @param selectStatement select statements which the casts need adding to. * @return SelectStatement with casts. */ protected SelectStatement addCas...
3.68
flink_Transformation_declareManagedMemoryUseCaseAtOperatorScope
/** * Declares that this transformation contains certain operator scope managed memory use case. * * @param managedMemoryUseCase The use case that this transformation declares needing managed * memory for. * @param weight Use-case-specific weights for this transformation. Used for sharing managed * memory...
3.68
flink_AsyncDataStream_orderedWait
/** * Adds an AsyncWaitOperator. The order to process input records is guaranteed to be the same as * input ones. * * @param in Input {@link DataStream} * @param func {@link AsyncFunction} * @param timeout for the asynchronous operation to complete * @param timeUnit of the given timeout * @param <IN> Type of in...
3.68
framework_FilesystemContainer_getFileCounts
/** * Internal method to recursively calculate the number of files under a root * directory. * * @param directory * the root to start counting from. */ private int getFileCounts(File directory) { File[] l; if (filter != null) { l = directory.listFiles(filter); } else { l = d...
3.68
morf_SelectStatementBuilder_getSetOperators
/** * @return the list of set operators to be applied on this select statement. */ List<SetOperator> getSetOperators() { return setOperators; }
3.68
flink_TableChange_getNewPosition
/** * Returns the position of the modified {@link Column} instance. When the return value is * null, it means modify the column at the original position. When the return value is * FIRST, it means move the modified column to the first. When the return value is AFTER, it * means move the column after the referred co...
3.68
framework_MenuItem_setSubMenu
/** * Sets the sub-menu associated with this item. * * @param subMenu * this item's new sub-menu */ public void setSubMenu(MenuBar subMenu) { this.subMenu = subMenu; }
3.68
framework_FileTypeResolver_getIcon
/** * Gets the descriptive icon representing a file. First the mime-type for * the given file name is resolved, and then the corresponding icon is * fetched from the internal icon storage. If it is not found the default * icon is returned. * * @param file * the file whose icon is requested. * @return...
3.68
hbase_DynamicMetricsRegistry_setContext
/** * Set the metrics context tag * @param name of the context * @return the registry itself as a convenience */ public DynamicMetricsRegistry setContext(String name) { return tag(MsInfo.Context, name, true); }
3.68
querydsl_NumberExpression_abs
/** * Create a {@code abs(this)} expression * * <p>Returns the absolute value of this expression</p> * * @return abs(this) */ public NumberExpression<T> abs() { if (abs == null) { abs = Expressions.numberOperation(getType(), MathOps.ABS, mixin); } return abs; }
3.68
framework_DataCommunicator_reset
/** * Method for internal reset from a change in the component, requiring a * full data update. */ public void reset() { // Only needed if a full reset is not pending. if (!reset) { if (getParent() instanceof ComboBox) { beforeClientResponse(true); } // Soft reset through ...
3.68
hadoop_AbstractDTService_requireServiceStarted
/** * Require the service to be started. * @throws IllegalStateException if it is not. */ protected void requireServiceStarted() throws IllegalStateException { requireServiceState(STATE.STARTED); }
3.68
flink_ExecutionConfig_getDefaultInputDependencyConstraint
/** * This method is deprecated. It was used to return the {@link InputDependencyConstraint} * utilized by the old scheduler implementations. These implementations were removed as part of * FLINK-20589. * * @return The previous default constraint {@link InputDependencyConstraint#ANY}. * @deprecated due to the dep...
3.68
flink_SqlWindowTableFunction_checkTimeColumnDescriptorOperand
/** * Checks whether the type that the operand of time col descriptor refers to is valid. * * @param callBinding The call binding * @param pos The position of the descriptor at the operands of the call * @return true if validation passes, false otherwise */ Optional<RuntimeException> checkTimeColumnDescriptorOper...
3.68
zxing_PDF417Writer_rotateArray
/** * Takes and rotates the it 90 degrees */ private static byte[][] rotateArray(byte[][] bitarray) { byte[][] temp = new byte[bitarray[0].length][bitarray.length]; for (int ii = 0; ii < bitarray.length; ii++) { // This makes the direction consistent on screen when rotating the // screen; int inversei...
3.68
hudi_HoodieRowDataFileWriterFactory_getRowDataFileWriter
/** * Factory method to assist in instantiating an instance of {@link HoodieRowDataFileWriter}. * * @param path path of the RowFileWriter. * @param hoodieTable instance of {@link HoodieTable} in use. * @param config instance of {@link HoodieWriteConfig} to use. * @param schema schema of the datas...
3.68
hadoop_QueueACLsManager_getQueueACLsManager
/** * Get queue acl manager corresponding to the scheduler. * @param scheduler the scheduler for which the queue acl manager is required * @param conf Configuration. * @return {@link QueueACLsManager} */ public static QueueACLsManager getQueueACLsManager( ResourceScheduler scheduler, Configuration conf) { if...
3.68
hibernate-validator_ConfigurationSource_max
/** * Returns that configuration source from the given two sources, which has * the higher priority. * * @param a * A configuration source. * @param b * Another configuration source. * * @return The source with the higher priority. Will be source {@code a} if * both have the same...
3.68
flink_SqlShowPartitions_getPartitionKVs
/** Get partition spec as key-value strings. */ public LinkedHashMap<String, String> getPartitionKVs() { return SqlPartitionUtils.getPartitionKVs(getPartitionSpec()); }
3.68
dubbo_ReferenceConfig_configInitialized
/** * Return if ReferenceConfig has been initialized * Note: Cannot use `isInitilized` as it may be treated as a Java Bean property * * @return initialized */ @Transient public boolean configInitialized() { return initialized; }
3.68
hudi_HoodieSparkQuickstart_queryData
/** * Load the data files into a DataFrame. */ public static void queryData(SparkSession spark, JavaSparkContext jsc, String tablePath, String tableName, HoodieExampleDataGenerator<HoodieAvroPayload> dataGen) { Dataset<Row> roViewDF = spark .read() .format("hudi") .loa...
3.68
hibernate-validator_ConstraintViolationAssert_assertPathEquals
/** * Asserts that the path matches the expected path. * * @param path The path under test * @param expectedPath The expected path */ public static void assertPathEquals(Path path, PathExpectation expectedPath) { assertEquals( new PathExpectation( path ), expectedPath, "Path does not match" ); }
3.68
hbase_TableSplit_getTable
/** * Returns the table name. * @return The table name. */ public TableName getTable() { // It is ugly that usually to get a TableName, the method is called getTableName. We can't do // that in here though because there was an existing getTableName in place already since // deprecated. return tableName; }
3.68
flink_SharedBuffer_removeEntry
/** * Removes a ShareBufferNode from cache and state. * * @param nodeId id of the event */ void removeEntry(NodeId nodeId) throws Exception { this.entryCache.invalidate(nodeId); this.entries.remove(nodeId); }
3.68
AreaShop_GeneralRegion_isOwner
/** * Check if the players is owner of this region. * @param player Player to check ownership for * @return true if the player currently rents or buys this region */ public boolean isOwner(UUID player) { return (this instanceof RentRegion && ((RentRegion)this).isRenter(player)) || (this instanceof BuyRegion && ((B...
3.68
hudi_AvroSchemaUtils_isSchemaCompatible
/** * Establishes whether {@code newSchema} is compatible w/ {@code prevSchema}, as * defined by Avro's {@link AvroSchemaCompatibility}. * From avro's compatability standpoint, prevSchema is writer schema and new schema is reader schema. * {@code newSchema} is considered compatible to {@code prevSchema}, iff data w...
3.68
open-banking-gateway_Xs2aRedirectExecutor_redirect
/** * Redirects PSU to some page (or emits FinTech redirection required) by performing interpolation of the * string returned by {@code uiScreenUriSpel} * @param execution Execution context of the current process * @param context Current XS2A context * @param uiScreenUriSpel UI screen SpEL expression to interpolat...
3.68
flink_Buckets_initializeState
/** * Initializes the state after recovery from a failure. * * <p>During this process: * * <ol> * <li>we set the initial value for part counter to the maximum value used before across all * tasks and buckets. This guarantees that we do not overwrite valid data, * <li>we commit any pending files for pr...
3.68
hadoop_BufferData_getChecksum
/** * Computes CRC32 checksum of the given buffer's contents. * * @param buffer the buffer whose content's checksum is to be computed. * @return the computed checksum. */ public static long getChecksum(ByteBuffer buffer) { ByteBuffer tempBuffer = buffer.duplicate(); tempBuffer.rewind(); CRC32 crc32 = new CRC...
3.68
framework_ImmediateUpload_getTicketNumber
/* * (non-Javadoc) * * @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber() */ @Override protected Integer getTicketNumber() { return Integer.valueOf(14238); }
3.68
framework_VTwinColSelect_setTabIndex
/** * Sets the tab index. * * @param tabIndex * the tab index to set */ public void setTabIndex(int tabIndex) { optionsListBox.setTabIndex(tabIndex); selectionsListBox.setTabIndex(tabIndex); addItemsLeftToRightButton.setTabIndex(tabIndex); removeItemsRightToLeftButton.setTabIndex(tabInde...
3.68
flink_HiveASTParseDriver_parse
/** * Parses a command, optionally assigning the parser's token stream to the given context. * * @param command command to parse * @param ctx context with which to associate this parser's token stream, or null if either no * context is available or the context already has an existing stream * @return parsed A...
3.68
morf_SpreadsheetDataSetProducer_records
/** * {@inheritDoc} * * @see org.alfasoftware.morf.dataset.DataSetProducer#records(java.lang.String) */ @Override public Iterable<Record> records(String tableName) { return tables.get(tableName); }
3.68
framework_VTree_getFirstRootNode
/** * Returns the first root node of the tree or null if there are no root * nodes. * * @return The first root {@link TreeNode} */ protected TreeNode getFirstRootNode() { if (body.getWidgetCount() == 0) { return null; } return (TreeNode) body.getWidget(0); }
3.68
hadoop_LocalityMulticastAMRMProxyPolicy_getTotNumLocalizedContainers
/** * Return the total number of container coming from localized requests * matching an allocation Id. */ private long getTotNumLocalizedContainers(long allocationId) { AtomicLong c = totNumLocalizedContainers.get(allocationId); return c == null ? 0 : c.get(); }
3.68
hadoop_RouterStateIdContext_setResponseHeaderState
/** * Adds the {@link #namespaceIdMap} to the response header that will be sent to a client. */ public void setResponseHeaderState(RpcResponseHeaderProto.Builder headerBuilder) { if (namespaceIdMap.isEmpty()) { return; } RouterFederatedStateProto.Builder builder = RouterFederatedStateProto.newBuilder(); n...
3.68
graphhopper_DijkstraOneToMany_clear
/** * Call clear if you have a different start node and need to clear the cache. */ public DijkstraOneToMany clear() { doClear = true; return this; }
3.68
hmily_ApolloClient_pull
/** * Pull input stream. * * @param config the config * @return the input stream */ public InputStream pull(final ApolloConfig config) { setApolloConfig(config); ConfigFile configFile = ConfigService.getConfigFile(config.getNamespace(), ConfigFileFormat.fromString(config.getFileExtension())); String co...
3.68
framework_XhrConnectionError_getPayload
/** * Returns the payload which was sent to the server. * * @return the payload which was sent, never null */ public JsonObject getPayload() { return payload; }
3.68
hbase_ColumnSchemaModel___getTTL
/** Returns the value of the TTL attribute or its default if it is unset */ public int __getTTL() { Object o = attrs.get(TTL); return o != null ? Integer.parseInt(o.toString()) : ColumnFamilyDescriptorBuilder.DEFAULT_TTL; }
3.68
framework_BeanFieldGroup_bindFieldsBuffered
/** * Convenience method to bind Fields from a given "field container" to a * given bean with buffering enabled. * <p> * The returned {@link BeanFieldGroup} can be used for further * configuration. * * @see #bindFieldsUnbuffered(Object, Object) * @see #bindMemberFields(Object) * @since 7.2 * @param bean * ...
3.68
hbase_MetaRegionLocationCache_getMetaRegionLocation
/** * Gets the HRegionLocation for a given meta replica ID. Renews the watch on the znode for future * updates. * @param replicaId ReplicaID of the region. * @return HRegionLocation for the meta replica. * @throws KeeperException if there is any issue fetching/parsing the serialized data. */ private HRegionLocati...
3.68
hadoop_DynoInfraUtils_fetchHadoopTarball
/** * If a file matching {@value HADOOP_TAR_FILENAME_FORMAT} and {@code version} * is found in {@code destinationDir}, return its path. Otherwise, first * download the tarball from an Apache mirror. If the * {@value APACHE_DOWNLOAD_MIRROR_KEY} configuration or system property * (checked in that order) is set, use ...
3.68
hudi_OptionsResolver_isCowTable
/** * Returns whether it is a COPY_ON_WRITE table. */ public static boolean isCowTable(Configuration conf) { return conf.getString(FlinkOptions.TABLE_TYPE) .toUpperCase(Locale.ROOT) .equals(FlinkOptions.TABLE_TYPE_COPY_ON_WRITE); }
3.68
pulsar_ManagedLedgerConfig_setAddEntryTimeoutSeconds
/** * Add-entry timeout after which add-entry callback will be failed if add-entry is not succeeded. * * @param addEntryTimeoutSeconds */ public ManagedLedgerConfig setAddEntryTimeoutSeconds(long addEntryTimeoutSeconds) { this.addEntryTimeoutSeconds = addEntryTimeoutSeconds; return this; }
3.68
flink_TimestampUtil_createVectorFromConstant
// creates a Hive ColumnVector of constant timestamp value public static ColumnVector createVectorFromConstant(int batchSize, Object value) { if (hiveTSColVectorClz != null) { return OrcTimestampColumnVector.createFromConstant(batchSize, value); } else { return OrcLegacyTimestampColumnVector.cre...
3.68
streampipes_AdapterResourceManager_encryptAndUpdate
/** * Takes an {@link AdapterDescription}, encrypts the password properties and updates the corresponding database entry * * @param adapterDescription input adapter description */ public void encryptAndUpdate(AdapterDescription adapterDescription) { db.updateAdapter(cloneAndEncrypt(adapterDescription)); }
3.68
hbase_RegionServerSpaceQuotaManager_isStarted
/** Returns if the {@code Chore} has been started. */ public boolean isStarted() { return started; }
3.68
pulsar_ManagedCursor_asyncReadEntriesWithSkipOrWait
/** * Asynchronously read entries from the ManagedLedger, up to the specified number and size. * * <p/>If no entries are available, the callback will not be triggered. Instead it will be registered to wait until * a new message will be persisted into the managed ledger * * @see #readEntriesOrWait(int, long) * @p...
3.68
hbase_ColumnFamilyDescriptorBuilder_removeConfiguration
/** * Remove a configuration setting represented by the key from the {@link #configuration} map. * @return this (for chained invocation) */ public ModifyableColumnFamilyDescriptor removeConfiguration(final String key) { return setConfiguration(key, null); }
3.68
flink_PlanGenerator_registerGenericTypeInfoIfConfigured
/** * Check plan for GenericTypeInfo's and register the types at the serializers. * * @param plan the generated plan. */ private void registerGenericTypeInfoIfConfigured(Plan plan) { if (!config.isAutoTypeRegistrationDisabled()) { plan.accept( new Visitor<Operator<?>>() { ...
3.68
hbase_AbstractStateMachineTableProcedure_checkTableModifiable
/** * Check whether a table is modifiable - exists and either offline or online with config set * @param env MasterProcedureEnv */ protected void checkTableModifiable(final MasterProcedureEnv env) throws IOException { // Checks whether the table exists if (!env.getMasterServices().getTableDescriptors().exists(ge...
3.68
framework_VaadinSession_getLockInstance
/** * Gets the {@link Lock} instance that is used for protecting the data of * this session from concurrent access. * <p> * The <code>Lock</code> can be used to gain more control than what is * available only using {@link #lock()} and {@link #unlock()}. The returned * instance is not guaranteed to support any oth...
3.68
flink_BroadcastConnectedStream_getType2
/** * Gets the type of the second input. * * @return The type of the second input */ public TypeInformation<IN2> getType2() { return broadcastStream.getType(); }
3.68
hbase_QuotaFilter_getRegionServerFilter
/** Returns the RegionServer filter regex */ public String getRegionServerFilter() { return regionServerRegex; }
3.68
morf_Criterion_getValue
/** * Get the value associate with the criterion. This is the right hand side * of an expression. * * @return the value */ public Object getValue() { return value; }
3.68
framework_AbstractComponentConnector_getIconUri
/** * Gets the URI of the icon set for this component. * * @return the URI of the icon, or <code>null</code> if no icon has been * defined. */ protected String getIconUri() { return getResourceUrl(ComponentConstants.ICON_RESOURCE); }
3.68
hadoop_GenericEventTypeMetricsManager_create
// Construct a GenericEventTypeMetrics for dispatcher public static <T extends Enum<T>> GenericEventTypeMetrics create(String dispatcherName, Class<T> eventTypeClass) { MetricsInfo metricsInfo = info("GenericEventTypeMetrics for " + eventTypeClass.getName(), "Metrics for " + dispatcherName); return new Ge...
3.68
hadoop_RouterQuotaManager_put
/** * Put new entity into cache. * @param path Mount table path. * @param quotaUsage Corresponding cache value. */ public void put(String path, RouterQuotaUsage quotaUsage) { writeLock.lock(); try { this.cache.put(path, quotaUsage); } finally { writeLock.unlock(); } }
3.68
rocketmq-connect_DbStructure_createOrAmendIfNecessary
/** * Create or amend table. * * @param config the connector configuration // * @param connection the database connection handle * @param tableId the table ID * @param fieldsMetadata the fields metadata * @return whether a DDL operation was performed * @thro...
3.68
hudi_HoodieParquetRealtimeInputFormat_getRecordReader
// To make Hive on Spark queries work with RT tables. Our theory is that due to // {@link org.apache.hadoop.hive.ql.io.parquet.ProjectionPusher} // not handling empty list correctly, the ParquetRecordReaderWrapper ends up adding the same column ids multiple // times which ultimately breaks the query. @Override public R...
3.68
hbase_ScannerContext_checkSizeLimit
/** * @param checkerScope The scope that the limit is being checked from * @return true when the limit is enforceable from the checker's scope and it has been reached */ boolean checkSizeLimit(LimitScope checkerScope) { return !skippingRow && hasSizeLimit(checkerScope) && (progress.getDataSize() >= limits.getD...
3.68
hadoop_CommitUtilsWithMR_getMagicJobAttemptsPath
/** * Get the location of magic job attempts. * @param out the base output directory. * @param jobUUID unique Job ID. * @return the location of magic job attempts. */ public static Path getMagicJobAttemptsPath(Path out, String jobUUID) { Preconditions.checkArgument(jobUUID != null && !(jobUUID.isEmpty()), ...
3.68
hudi_AbstractTableFileSystemView_getLatestFileSlice
/** * Get Latest File Slice for a given fileId in a given partition. */ @Override public final Option<FileSlice> getLatestFileSlice(String partitionStr, String fileId) { try { readLock.lock(); String partitionPath = formatPartitionKey(partitionStr); ensurePartitionLoadedCorrectly(partitionPath); if ...
3.68
zxing_Version_buildVersions
/** * See ISO 16022:2006 5.5.1 Table 7 */ private static Version[] buildVersions() { return new Version[]{ new Version(1, 10, 10, 8, 8, new ECBlocks(5, new ECB(1, 3))), new Version(2, 12, 12, 10, 10, new ECBlocks(7, new ECB(1, 5))), new Version(3, 14, 14, 12, 12, new ...
3.68
hbase_NamedQueueRecorder_getNamedQueueRecords
/** * Retrieve in memory queue records from ringbuffer * @param request namedQueue request with event type * @return queue records from ringbuffer after filter (if applied) */ public NamedQueueGetResponse getNamedQueueRecords(NamedQueueGetRequest request) { return this.logEventHandler.getNamedQueueRecords(request...
3.68
hbase_BulkLoadHFilesTool_populateLoadQueue
/** * Populate the Queue with given HFiles */ private static void populateLoadQueue(Deque<LoadQueueItem> ret, Map<byte[], List<Path>> map) { map.forEach((k, v) -> v.stream().map(p -> new LoadQueueItem(k, p)).forEachOrdered(ret::add)); }
3.68
flink_BlobKey_createKey
/** * Returns the right {@link BlobKey} subclass for the given parameters. * * @param type whether the referenced BLOB is permanent or transient * @param key the actual key data * @param random the random component of the key * @return BlobKey subclass */ static BlobKey createKey(BlobType type, byte[] key, byte[...
3.68
hudi_HoodieSparkKeyGeneratorFactory_convertToSparkKeyGenerator
/** * Convert hoodie-common KeyGenerator to SparkKeyGeneratorInterface implement. */ public static String convertToSparkKeyGenerator(String keyGeneratorClassName) { return COMMON_TO_SPARK_KEYGENERATOR.getOrDefault(keyGeneratorClassName, keyGeneratorClassName); }
3.68
hadoop_ResourceCalculatorProcessTree_getResourceCalculatorProcessTree
/** * Create the ResourceCalculatorProcessTree rooted to specified process * from the class name and configure it. If class name is null, this method * will try and return a process tree plugin available for this system. * * @param pid process pid of the root of the process tree * @param clazz class-name * @par...
3.68
morf_SqlDialect_convertStatementToHash
/** * Converts a structured {@code SELECT} statement to a hash representation. * * @param statement the statement to convert * @return A hash representation of {@code statement}. */ public String convertStatementToHash(SelectFirstStatement statement) { return md5HashHexEncoded(convertStatementToSQL(statement)); ...
3.68
dubbo_AdaptiveClassCodeGenerator_generate
/** * generate and return class code * @param sort - whether sort methods */ public String generate(boolean sort) { // no need to generate adaptive class since there's no adaptive method found. if (!hasAdaptiveMethod()) { throw new IllegalStateException("No adaptive method exist on extension " + type...
3.68
hadoop_RetriableCommand_execute
/** * The execute() method invokes doExecute() until either: * 1. doExecute() succeeds, or * 2. the command may no longer be retried (e.g. runs out of retry-attempts). * @param arguments The list of arguments for the command. * @return Generic "Object" from doExecute(), on success. * @throws Exception */ publi...
3.68
hadoop_BlockBlobAppendStream_maybeSetFirstError
/** * Set {@link #firstError} to the exception if it is not already set. * @param exception exception to save */ private void maybeSetFirstError(IOException exception) { firstError.compareAndSet(null, exception); }
3.68