name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hadoop_SinglePendingCommit_getUri
/** @return path URI of the destination. */ public String getUri() { return uri; }
3.68
hadoop_BufferedIOStatisticsInputStream_hasCapability
/** * If the inner stream supports {@link StreamCapabilities}, * forward the probe to it. * Otherwise: return false. * * @param capability string to query the stream support for. * @return true if a capability is known to be supported. */ @Override public boolean hasCapability(final String capability) { if (in...
3.68
flink_EnvironmentInformation_getMaxJvmHeapMemory
/** * The maximum JVM heap size, in bytes. * * <p>This method uses the <i>-Xmx</i> value of the JVM, if set. If not set, it returns (as a * heuristic) 1/4th of the physical memory size. * * @return The maximum JVM heap size, in bytes. */ public static long getMaxJvmHeapMemory() { final long maxMemory = Runti...
3.68
framework_LegacyApplication_getWindow
/** * <p> * Gets a UI by name. Returns <code>null</code> if the application is not * running or it does not contain a window corresponding to the name. * </p> * * @param name * the name of the requested window * @return a UI corresponding to the name, or <code>null</code> to use the * defaul...
3.68
hmily_HmilyQuoteCharacter_getQuoteCharacter
/** * Get quote character. * * @param value value to be get quote character * @return value of quote character */ public static HmilyQuoteCharacter getQuoteCharacter(final String value) { if (Strings.isNullOrEmpty(value)) { return NONE; } return Arrays.stream(values()).filter(each -> NONE != ea...
3.68
hadoop_CommitContext_maybeResetIOStatisticsContext
/** * Reset the IOStatistics context if statistics are being * collected. * Logs at info. */ public void maybeResetIOStatisticsContext() { if (collectIOStatistics) { LOG.info("Resetting IO statistics context {}", ioStatisticsContext.getID()); ioStatisticsContext.reset(); } }
3.68
dubbo_ArrayUtils_of
/** * Convert from variable arguments to array * * @param values variable arguments * @param <T> The class * @return array * @since 2.7.9 */ public static <T> T[] of(T... values) { return values; }
3.68
morf_SqlDialect_viewDeploymentStatementsAsLiteral
/** * Creates SQL script to deploy a database view. * * @param view The meta data for the view to deploy. * @return The statements required to deploy the view joined into a script and prepared as literals. */ public AliasedField viewDeploymentStatementsAsLiteral(View view) { return SqlUtils.clobLiteral(viewDeplo...
3.68
framework_EmptyTable_getTestDescription
/* * (non-Javadoc) * * @see com.vaadin.tests.components.AbstractTestUI#getTestDescription() */ @Override protected String getTestDescription() { return "Empty Table should not cause JS exception"; }
3.68
flink_SqlUniqueSpec_symbol
/** * Creates a parse-tree node representing an occurrence of this keyword at a particular position * in the parsed text. */ public SqlLiteral symbol(SqlParserPos pos) { return SqlLiteral.createSymbol(this, pos); }
3.68
dubbo_StringUtils_isNoneEmpty
/** * <p>Checks if the strings contain empty or null elements. <p/> * * <pre> * StringUtils.isNoneEmpty(null) = false * StringUtils.isNoneEmpty("") = false * StringUtils.isNoneEmpty(" ") = true * StringUtils.isNoneEmpty("abc") = true * StringUtils.isNoneEmpty("abc",...
3.68
flink_HiveParserCalcitePlanner_genGBLogicalPlan
// Generate GB plan. private RelNode genGBLogicalPlan(HiveParserQB qb, RelNode srcRel) throws SemanticException { RelNode gbRel = null; HiveParserQBParseInfo qbp = qb.getParseInfo(); // 1. Gather GB Expressions (AST) (GB + Aggregations) // NOTE: Multi Insert is not supported String detsClauseName =...
3.68
hudi_BaseHoodieWriteClient_deleteColumns
/** * delete columns to table. * * @param colNames col name to be deleted. if we want to delete col from a nested filed, the fullName should be specified */ public void deleteColumns(String... colNames) { Pair<InternalSchema, HoodieTableMetaClient> pair = getInternalSchemaAndMetaClient(); InternalSchema newSche...
3.68
framework_Escalator_getSpacersForRowAndAfter
/** * Calculates the sum of all spacers from one row index onwards. * * @param logicalRowIndex * the spacer to include as the first calculated spacer * @return the sum of all spacers from {@code logicalRowIndex} and * onwards, or 0 if no suitable spacers were found */ @SuppressWarnings("boxing...
3.68
framework_MethodProperty_getSetters
/** * Returns a list of all setters found in the beanType or its parent class * * @param beanType * The type to check * @param getters * Set that will be filled with names of getters. * @return A list of setter methods from the class and its parents */ private static List<JMethod> getSette...
3.68
flink_PhysicalFile_isOpen
/** @return whether this physical file is still open for writing. */ public boolean isOpen() { return !closed && outputStream != null; }
3.68
pulsar_TimeEvictionPolicy_evict
/** * {@inheritDoc} */ @Override public EvictionPolicy.Action evict(Event<T> event) { long now = evictionContext == null ? System.currentTimeMillis() : evictionContext.getReferenceTime(); long diff = now - event.getTimestamp(); if (diff >= (windowLength + delta)) { return EvictionPolic...
3.68
hmily_DubboHmilyOrderApplication_main
/** * main. * * @param args args */ public static void main(final String[] args) { SpringApplication.run(DubboHmilyOrderApplication.class, args); }
3.68
hadoop_DynoInfraUtils_fetchNameNodeJMXValue
/** * Fetch a value from the launched NameNode's JMX. * * @param nameNodeProperties The set of properties containing information * about the NameNode. * @param jmxBeanQuery The JMX bean query to execute; should return a * JMX property matching {@code jmxProperty}. * ...
3.68
framework_VCaption_isCaptionAsHtml
/** * Checks whether captions are rendered as HTML. * <p> * Default is false * * @return true if the captions are rendered as HTML, false if rendered as * plain text */ public boolean isCaptionAsHtml() { return captionAsHtml; }
3.68
hadoop_AbstractMultipartUploader_checkPartHandles
/** * Utility method to validate partHandles. * @param partHandles handles * @throws IllegalArgumentException if the parts are invalid */ protected void checkPartHandles(Map<Integer, PartHandle> partHandles) { checkArgument(!partHandles.isEmpty(), "Empty upload"); partHandles.keySet() .stream() ...
3.68
flink_FromElementsGeneratorFunction_setOutputType
// For backward compatibility: Supports legacy usage of // StreamExecutionEnvironment#fromElements() which lacked type information and relied on the // returns() method. See FLINK-21386 for details. @Override public void setOutputType(TypeInformation<OUT> outTypeInfo, ExecutionConfig executionConfig) { Precondition...
3.68
hudi_MetadataMigrator_upgradeToLatest
/** * Upgrade Metadata version to its latest. * * @param metadata Metadata * @param metadataVersion Current version of metadata * @return Metadata conforming to the latest version of this metadata */ public T upgradeToLatest(T metadata, int metadataVersion) { if (metadataVersion == latestVersion) { return ...
3.68
hbase_QuotaCache_getTableLimiter
/** * Returns the limiter associated to the specified table. * @param table the table to limit * @return the limiter associated to the specified table */ public QuotaLimiter getTableLimiter(final TableName table) { return getQuotaState(this.tableQuotaCache, table).getGlobalLimiter(); }
3.68
hbase_SyncFuture_done
/** * @param txid the transaction id at which this future 'completed'. * @param t Can be null. Set if we are 'completing' on error (and this 't' is the error). * @return True if we successfully marked this outstanding future as completed/done. Returns false * if this future is already 'done' when this me...
3.68
hbase_LogRollBackupSubprocedurePool_waitForOutstandingTasks
/** * Wait for all of the currently outstanding tasks submitted via {@link #submitTask(Callable)} * @return <tt>true</tt> on success, <tt>false</tt> otherwise * @throws ForeignException exception */ public boolean waitForOutstandingTasks() throws ForeignException { LOG.debug("Waiting for backup procedure to finis...
3.68
hudi_HoodieDeltaWriteStat_setRecordsStats
// keep for serialization efficiency public void setRecordsStats(Map<String, HoodieColumnRangeMetadata<Comparable>> stats) { recordsStats = Option.of(stats); }
3.68
hudi_CompactionAdminClient_renameLogFile
/** * Rename log files. This is done for un-scheduling a pending compaction operation NOTE: Can only be used safely when * no writer (ingestion/compaction) is running. * * @param metaClient Hoodie Table Meta-Client * @param oldLogFile Old Log File * @param newLogFile New Log File */ protected static void renameL...
3.68
hbase_MetricSampleQuantiles_allowableError
/** * Specifies the allowable error for this rank, depending on which quantiles are being targeted. * This is the f(r_i, n) function from the CKMS paper. It's basically how wide the range of this * rank can be. the index in the list of samples */ private double allowableError(int rank) { int size = samples.size()...
3.68
flink_SequenceGeneratorSource_incrementAndGet
/** Increments and returns the current sequence number for the given key. */ long incrementAndGet(int key) { return ++statesPerKey[key - startKey]; }
3.68
dubbo_RestRPCInvocationUtil_createPathMatcher
/** * create path matcher by request * * @param request * @return */ public static PathMatcher createPathMatcher(RequestFacade request) { String path = request.getPath(); String version = request.getHeader(RestHeaderEnum.VERSION.getHeader()); String group = request.getHeader(RestHeaderEnum.GROUP.getHea...
3.68
flink_KeyContextHandler_hasKeyContext1
/** * Whether the first input of {@link StreamOperator} has "KeyContext". If false, we can omit the * call of {@link StreamOperator#setKeyContextElement1} for each record arrived on the first * input. * * @return True if the first input has "KeyContext", false otherwise. */ default boolean hasKeyContext1() { ...
3.68
morf_DummyXmlOutputStreamProvider_close
/** * @see org.alfasoftware.morf.xml.XmlStreamProvider#close() */ @Override public void close() { // Nothing to do }
3.68
flink_GenericWriteAheadSink_saveHandleInState
/** * Called when a checkpoint barrier arrives. It closes any open streams to the backend and marks * them as pending for committing to the external, third-party storage system. * * @param checkpointId the id of the latest received checkpoint. * @throws IOException in case something went wrong when handling the st...
3.68
rocketmq-connect_IdentifierRules_identifierDelimiter
/** * Get the delimiter that is used to delineate segments within fully-qualified identifiers. * * @return the identifier delimiter; never null */ public String identifierDelimiter() { return identifierDelimiter; }
3.68
streampipes_Formats_cborFormat
/** * Defines the transport format CBOR used by a data stream at runtime. * * @return The {@link org.apache.streampipes.model.grounding.TransportFormat} of type CBOR. */ public static TransportFormat cborFormat() { return new TransportFormat(MessageFormat.CBOR); }
3.68
framework_ScrollbarBundle_setOffsetSizeAndScrollSize
/** * Sets the length of the scrollbar and the amount of pixels the scrollbar * needs to be able to scroll through. * * @param offsetPx * the length of the scrollbar in pixels * @param scrollPx * the number of pixels the scrollbar should be able to scroll * through */ public fi...
3.68
pulsar_TopKBundles_update
/** * Update the topK bundles from the input bundleStats. * * @param bundleStats bundle stats. * @param topk top k bundle stats to select. */ public void update(Map<String, NamespaceBundleStats> bundleStats, int topk) { arr.clear(); try { var isLoadBalancerSheddingBundlesWithPoliciesEnabled ...
3.68
hudi_BootstrapUtils_getAllLeafFoldersWithFiles
/** * Returns leaf folders with files under a path. * @param baseFileFormat Hoodie base file format * @param fs File System * @param context JHoodieEngineContext * @return list of partition paths with files under them. * @throws IOException */ public static List<Pair<String, List<HoodieFileStatus>>> getAllLeafF...
3.68
dubbo_AbstractDynamicConfiguration_getDefaultGroup
/** * @return the default group * @since 2.7.8 */ @Override public String getDefaultGroup() { return getGroup(); }
3.68
flink_MemoryLogger_getGarbageCollectorStatsAsString
/** * Gets the garbage collection statistics from the JVM. * * @param gcMXBeans The collection of garbage collector beans. * @return A string denoting the number of times and total elapsed time in garbage collection. */ public static String getGarbageCollectorStatsAsString(List<GarbageCollectorMXBean> gcMXBeans) {...
3.68
hbase_AnnotationReadingPriorityFunction_getAnnotatedPriority
/** * See if the method has an annotation. * @return Return the priority from the annotation. If there isn't an annotation, this returns * something below zero. */ protected int getAnnotatedPriority(RequestHeader header) { String methodName = header.getMethodName(); Integer priorityByAnnotation = annota...
3.68
Activiti_BaseEntityEventListener_onDelete
/** * Called when an entity delete event is received. */ protected void onDelete(ActivitiEvent event) { // Default implementation is a NO-OP }
3.68
starts_AnnotationVisitor_visitArray
/** * Visits an array value of the annotation. Note that arrays of primitive * types (such as byte, boolean, short, char, int, long, float or double) * can be passed as value to {@link #visit visit}. This is what * {@link ClassReader} does. * * @param name * the value name. * @return a visitor to vis...
3.68
framework_TestBenchElementRightClick_fillTable
// fill the table with some random data private void fillTable(Table table) { initProperties(table); for (int i = 0; i < ROWS; i++) { String[] line = new String[COLUMNS]; for (int j = 0; j < COLUMNS; j++) { line[j] = "col=" + j + " row=" + i; } table.addItem(line, nul...
3.68
dubbo_AdaptiveClassCodeGenerator_generateScopeModelAssignment
/** * @return */ private String generateScopeModelAssignment() { return String.format(CODE_SCOPE_MODEL_ASSIGNMENT, type.getName()); }
3.68
hbase_AbstractHBaseSaslRpcClient_dispose
/** Release resources used by wrapped saslClient */ public void dispose() { SaslUtil.safeDispose(saslClient); }
3.68
hbase_CoprocessorHost_getExternalClassLoaders
/** * Retrieves the set of classloaders used to instantiate Coprocessor classes defined in external * jar files. * @return A set of ClassLoader instances */ Set<ClassLoader> getExternalClassLoaders() { Set<ClassLoader> externalClassLoaders = new HashSet<>(); final ClassLoader systemClassLoader = this.getClass()...
3.68
rocketmq-connect_PositionManagementService_configure
/** * Configure class with the given key-value pairs * * @param config can be DistributedConfig or StandaloneConfig */ default void configure(WorkerConfig config) { }
3.68
hbase_Result_createCompleteResult
/** * Forms a single result from the partial results in the partialResults list. This method is * useful for reconstructing partial results on the client side. * @param partialResults list of partial results * @return The complete result that is formed by combining all of the partial results together * @throws IOE...
3.68
flink_ContinuousFileMonitoringFunction_listEligibleFiles
/** * Returns the paths of the files not yet processed. * * @param fileSystem The filesystem where the monitored directory resides. */ private Map<Path, FileStatus> listEligibleFiles(FileSystem fileSystem, Path path) { final FileStatus[] statuses; try { statuses = fileSystem.listStatus(path); }...
3.68
hudi_ParquetUtils_filterRowKeys
/** * Read the rowKey list matching the given filter, from the given parquet file. If the filter is empty, then this will * return all the rowkeys and corresponding positions. * * @param filePath The parquet file path. * @param configuration configuration to build fs object * @param filter record keys...
3.68
flink_FlinkUserCodeClassLoader_loadClassWithoutExceptionHandling
/** * Same as {@link #loadClass(String, boolean)} but without exception handling. * * <p>Extending concrete class loaders should implement this instead of {@link * #loadClass(String, boolean)}. */ protected Class<?> loadClassWithoutExceptionHandling(String name, boolean resolve) throws ClassNotFoundExcepti...
3.68
hudi_HoodieHeartbeatClient_stopHeartbeatTimer
/** * Stops the timer of the given heartbeat. * * @param heartbeat The heartbeat to stop. */ private void stopHeartbeatTimer(Heartbeat heartbeat) { LOG.info("Stopping heartbeat for instant " + heartbeat.getInstantTime()); heartbeat.getTimer().cancel(); heartbeat.setHeartbeatStopped(true); LOG.info("Stopped ...
3.68
flink_AbstractHeapPriorityQueue_iterator
/** * Returns an iterator over the elements in this queue. The iterator does not return the * elements in any particular order. * * @return an iterator over the elements in this queue. */ @Nonnull @Override public CloseableIterator<T> iterator() { return new HeapIterator(); }
3.68
flink_Tuple9_setFields
/** * Sets new values to all fields of the tuple. * * @param f0 The value for field 0 * @param f1 The value for field 1 * @param f2 The value for field 2 * @param f3 The value for field 3 * @param f4 The value for field 4 * @param f5 The value for field 5 * @param f6 The value for field 6 * @param f7 The valu...
3.68
flink_ConfigurationUtils_convertValue
/** * Tries to convert the raw value into the provided type. * * @param rawValue rawValue to convert into the provided type clazz * @param clazz clazz specifying the target type * @param <T> type of the result * @return the converted value if rawValue is of type clazz * @throws IllegalArgumentException if the ra...
3.68
hbase_MasterObserver_postSetTableQuota
/** * Called after the quota for the table is stored. * @param ctx the environment to interact with the framework and master * @param tableName the name of the table * @param quotas the resulting quota for the table */ default void postSetTableQuota(final ObserverContext<MasterCoprocessorEnvironment> ctx,...
3.68
flink_JoinOperator_projectTuple1
/** * Projects a pair of joined elements to a {@link Tuple} with the previously selected * fields. Requires the classes of the fields of the resulting tuples. * * @return The projected data set. * @see Tuple * @see DataSet */ public <T0> ProjectJoin<I1, I2, Tuple1<T0>> projectTuple1() { TypeInformation<?>[] ...
3.68
hbase_CoprocessorRpcUtils_getServiceName
/** * Returns the name to use for coprocessor service calls. For core HBase services (in the hbase.pb * protobuf package), this returns the unqualified name in order to provide backward compatibility * across the package name change. For all other services, the fully-qualified service name is * used. */ public sta...
3.68
flink_EnvironmentSettings_fromConfiguration
/** * Creates an instance of {@link EnvironmentSettings} from configuration. * * @deprecated use {@link Builder#withConfiguration(Configuration)} instead. */ @Deprecated public static EnvironmentSettings fromConfiguration(ReadableConfig configuration) { return new EnvironmentSettings( (Configuration...
3.68
pulsar_ManagedCursorMetrics_aggregate
/** * Aggregation by namespace, ledger, cursor. * * @return List<Metrics> */ private List<Metrics> aggregate() { metricsCollection.clear(); for (Map.Entry<String, ManagedLedgerImpl> e : getManagedLedgers().entrySet()) { String ledgerName = e.getKey(); ManagedLedgerImpl ledger = e.getValue();...
3.68
framework_StringToBooleanConverter_convertToModel
/* * (non-Javadoc) * * @see * com.vaadin.data.util.converter.Converter#convertToModel(java.lang.Object, * java.lang.Class, java.util.Locale) */ @Override public Boolean convertToModel(String value, Class<? extends Boolean> targetType, Locale locale) throws ConversionException { if (value == nu...
3.68
morf_GraphBasedUpgradeNode_getModifies
/** * @return all the tables which are modified by this upgrade node */ public Set<String> getModifies() { return modifies; }
3.68
hudi_HashFunction_clear
/** * Clears <i>this</i> hash function. A NOOP */ public void clear() { }
3.68
hibernate-validator_ConstraintHelper_getDefaultValidatorDescriptors
/** * Returns the default validators for the given constraint type. * * @param annotationType The constraint annotation type. * * @return A list with the default validators as retrieved from * {@link Constraint#validatedBy()} or the list of validators for * built-in constraints. */ @SuppressWarn...
3.68
flink_BridgingSqlAggFunction_of
/** Creates an instance of a aggregate function during translation. */ public static BridgingSqlAggFunction of( FlinkContext context, FlinkTypeFactory typeFactory, ContextResolvedFunction resolvedFunction) { final DataTypeFactory dataTypeFactory = context.getCatalogManager().getDataTypeFacto...
3.68
hadoop_HttpFSExceptionProvider_log
/** * Logs the HTTP status code and exception in HttpFSServer's log. * * @param status HTTP status code. * @param throwable exception thrown. */ @Override protected void log(Response.Status status, Throwable throwable) { String method = MDC.get("method"); String path = MDC.get("path"); String message = getOn...
3.68
hadoop_IOStatisticsLogging_mapToSortedString
/** * Given a map, produce a string with all the values, sorted. * Needs to create a treemap and insert all the entries. * @param sb string buffer to append to * @param type type (for output) * @param map map to evaluate * @param <E> type of values of the map */ private static <E> void mapToSortedString(StringBu...
3.68
flink_FileStateHandle_getStateSize
/** * Returns the file size in bytes. * * @return The file size in bytes. */ @Override public long getStateSize() { return stateSize; }
3.68
flink_DataSet_iterateDelta
/** * Initiates a delta iteration. A delta iteration is similar to a regular iteration (as started * by {@link #iterate(int)}, but maintains state across the individual iteration steps. The * Solution set, which represents the current state at the beginning of each iteration can be * obtained via {@link org.apache....
3.68
flink_TieredStorageConfiguration_getAccumulatorExclusiveBuffers
/** * Get exclusive buffer number of accumulator. * * <p>The buffer number is used to compare with the subpartition number to determine the type of * {@link BufferAccumulator}. * * <p>If the exclusive buffer number is larger than (subpartitionNum + 1), the accumulator will * use {@link HashBufferAccumulator}. If...
3.68
hbase_ZKProcedureMemberRpcs_sendMemberCompleted
/** * This acts as the ack for a completed procedure */ @Override public void sendMemberCompleted(Subprocedure sub, byte[] data) throws IOException { String procName = sub.getName(); LOG.debug( "Marking procedure '" + procName + "' completed for member '" + memberName + "' in zk"); String joinPath = ZN...
3.68
flink_RichSqlInsert_getTableHints
/** Returns the table hints as list of {@code SqlNode} for current insert node. */ public SqlNodeList getTableHints() { return this.tableHints; }
3.68
flink_JobID_fromByteArray
/** * Creates a new JobID from the given byte sequence. The byte sequence must be exactly 16 bytes * long. The first eight bytes make up the lower part of the ID, while the next 8 bytes make up * the upper part of the ID. * * @param bytes The byte sequence. * @return A new JobID corresponding to the ID encoded in...
3.68
flink_GSCommitRecoverable_getComponentBlobIds
/** * Returns the list of component blob ids, which have to be resolved from the temporary bucket * name, prefix, and component ids. Resolving them this way vs. storing the blob ids directly * allows us to move in-progress blobs by changing options to point to new in-progress * locations. * * @param options The G...
3.68
hadoop_AbfsOutputStream_getActiveBlock
/** * Synchronized accessor to the active block. * * @return the active block; null if there isn't one. */ private synchronized DataBlocks.DataBlock getActiveBlock() { return activeBlock; }
3.68
framework_ThemeResource_hashCode
/** * @see java.lang.Object#hashCode() */ @Override public int hashCode() { return resourceID.hashCode(); }
3.68
hbase_HBaseTestingUtility_assertRegionOnlyOnServer
/** * Check to make sure the region is open on the specified region server, but not on any other one. */ public void assertRegionOnlyOnServer(final RegionInfo hri, final ServerName server, final long timeout) throws IOException, InterruptedException { long timeoutTime = EnvironmentEdgeManager.currentTime() + time...
3.68
flink_FlinkAssertions_assertThatFuture
/** * Create assertion for {@link java.util.concurrent.CompletionStage}. * * @param actual the actual value. * @param <T> the type of the value contained in the {@link * java.util.concurrent.CompletionStage}. * @return the created assertion object. */ public static <T> FlinkCompletableFutureAssert<T> assertT...
3.68
hbase_StorageClusterStatusModel_setMaxHeapSizeMB
/** * @param maxHeapSizeMB the maximum heap size, in MB */ public void setMaxHeapSizeMB(int maxHeapSizeMB) { this.maxHeapSizeMB = maxHeapSizeMB; }
3.68
flink_MiniCluster_createMetricRegistry
/** * Factory method to create the metric registry for the mini cluster. * * @param config The configuration of the mini cluster * @param maximumMessageSizeInBytes the maximum message size */ protected MetricRegistryImpl createMetricRegistry( Configuration config, long maximumMessageSizeInBytes) { retu...
3.68
flink_MetricStore_getSubtaskMetricStore
/** * Returns the {@link ComponentMetricStore} for the given job/task ID and subtask index. * * @param jobID job ID * @param taskID task ID * @param subtaskIndex subtask index * @return SubtaskMetricStore for the given IDs and index, or null if no store for the given * arguments exists */ public synchronize...
3.68
hbase_FilterBase_isFamilyEssential
/** * By default, we require all scan's column families to be present. Our subclasses may be more * precise. {@inheritDoc} */ @Override public boolean isFamilyEssential(byte[] name) throws IOException { return true; }
3.68
hadoop_AbfsClientThrottlingIntercept_getWriteThrottler
/** * Returns the analyzer for write operations. * @return AbfsClientThrottlingAnalyzer for write. */ AbfsClientThrottlingAnalyzer getWriteThrottler() { return writeThrottler; }
3.68
morf_XmlDataSetConsumer_outputTableMetaData
/** * Serialise the meta data for a table. * * @param table The meta data to serialise. * @param contentHandler Content handler to receive the meta data xml. * @throws SAXException Propagates from SAX API calls. */ private void outputTableMetaData(Table table, ContentHandler contentHandler) throws SAXException { ...
3.68
framework_Tree_expandItem
/** * Expands an item. * * @param itemId * the item id. * @param sendChildTree * flag to indicate if client needs subtree or not (may be * cached) * @return True if the expand operation succeeded */ private boolean expandItem(Object itemId, boolean sendChildTree) { // Succ...
3.68
cron-utils_ConstantsMapper_weekDayMapping
/** * Performs weekday mapping between two weekday definitions. * * @param source - source * @param target - target weekday definition * @param weekday - value in source range. * @return int - mapped value */ public static int weekDayMapping(final WeekDay source, final WeekDay target, final int weekday) { ...
3.68
framework_VAbstractSplitPanel_convertToPercentage
/** * Converts given split position string (in pixels or percentage) to a float * percentage value. * * @param pos * @return */ private float convertToPercentage(String pos) { if (pos.endsWith("px")) { float pixelPosition = Float .parseFloat(pos.substring(0, pos.length() - 2)); ...
3.68
hadoop_StageConfig_checkOpen
/** * Verify that the config is not yet frozen. */ private void checkOpen() { Preconditions.checkState(!frozen, "StageConfig is now read-only"); }
3.68
framework_TextFileProperty_isReadOnly
/* * (non-Javadoc) * * @see com.vaadin.data.Property#isReadOnly() */ @Override public boolean isReadOnly() { return file == null || super.isReadOnly() || !file.canWrite(); }
3.68
querydsl_AntMetaDataExporter_addCustomType
/** * Adds custom type to ant */ public void addCustomType(CustomType customType) { customTypes.add(customType); }
3.68
framework_WebBrowser_isLinux
/** * Tests whether the user is using Linux. * * @return true if the user is using Linux, false if the user is not using * Linux or if no information on the browser is present */ public boolean isLinux() { return browserDetails.isLinux(); }
3.68
hadoop_DiskBalancerWorkItem_getStartTime
/** * Records the Start time of execution. * @return startTime */ public long getStartTime() { return startTime; }
3.68
flink_HsFullSpillingStrategy_onMemoryUsageChanged
// When the amount of memory used exceeds the threshold, decide action based on global // information. Otherwise, no need to take action. @Override public Optional<Decision> onMemoryUsageChanged( int numTotalRequestedBuffers, int currentPoolSize) { return numTotalRequestedBuffers < currentPoolSize * release...
3.68
hbase_ImmutableBytesWritable_toArray
/** * Convert a list of byte arrays into an array of byte arrays * @param array List of byte []. * @return Array of byte []. */ public static byte[][] toArray(final List<byte[]> array) { // List#toArray doesn't work on lists of byte []. byte[][] results = new byte[array.size()][]; for (int i = 0; i < array.si...
3.68
hmily_ExtensionLoaderFactory_loadAll
/** * Load all list. * * @param <T> the type parameter * @param service the service * @return the list */ public static <T> List<T> loadAll(final Class<T> service) { return ExtensionLoader.getExtensionLoader(service).loadAll(findClassLoader()); }
3.68
framework_DownloadStream_getParameterNames
/** * Gets the names of the parameters. * * @return Iterator of names or null if no parameters are set. */ public Iterator<String> getParameterNames() { if (params != null) { return params.keySet().iterator(); } return null; }
3.68
graphhopper_Entity_getTimeField
/** * Fetch the given column of the current row, and interpret it as a time in the format HH:MM:SS. * @return the time value in seconds since midnight */ protected int getTimeField(String column, boolean required) throws IOException { String str = getFieldCheckRequired(column, required); int val = INT_MISSIN...
3.68
flink_CompileUtils_compile
/** * Compiles a generated code to a Class. * * @param cl the ClassLoader used to load the class * @param name the class name * @param code the generated code * @param <T> the class type * @return the compiled class */ @SuppressWarnings("unchecked") public static <T> Class<T> compile(ClassLoader cl, String name...
3.68