name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hadoop_NodePlan_setPort
/** * Sets the DataNode RPC Port. * * @param port - int */ public void setPort(int port) { this.port = port; }
3.68
zxing_TelResultHandler_getDisplayContents
// Overriden so we can take advantage of Android's phone number hyphenation routines. @Override public CharSequence getDisplayContents() { String contents = getResult().getDisplayResult(); contents = contents.replace("\r", ""); return formatPhone(contents); }
3.68
hadoop_SuccessData_getJobId
/** @return Job ID, if known. */ public String getJobId() { return jobId; }
3.68
hadoop_TwoColumnLayout_render
/* * (non-Javadoc) * @see org.apache.hadoop.yarn.webapp.view.HtmlPage#render(org.apache.hadoop.yarn.webapp.hamlet.Hamlet.HTML) */ @Override protected void render(Page.HTML<__> html) { preHead(html); html. title($(TITLE)). link(root_url("static", "yarn.css")). style("#layout { height: 100%; }", ...
3.68
hudi_ParquetUtils_readAvroRecords
/** * NOTE: This literally reads the entire file contents, thus should be used with caution. */ @Override public List<GenericRecord> readAvroRecords(Configuration configuration, Path filePath) { List<GenericRecord> records = new ArrayList<>(); try (ParquetReader reader = AvroParquetReader.builder(filePath).withCo...
3.68
framework_Overlay_setHeight
/** * Sets the pixel value for height css property. * * @param height * value to set */ public void setHeight(int height) { if (height < 0) { height = 0; } this.height = height; }
3.68
hadoop_AbstractS3ACommitter_createSuccessData
/** * Create the success data structure from a job context. * @param context job context. * @param filenames short list of filenames; nullable * @param ioStatistics IOStatistics snapshot * @param destConf config of the dest fs, can be null * @return the structure * */ private SuccessData createSuccessData(final...
3.68
querydsl_LuceneSerializer_createBooleanClause
/** * If the query is a BooleanQuery and it contains a single Occur.MUST_NOT * clause it will be returned as is. Otherwise it will be wrapped in a * BooleanClause with the given Occur. */ private BooleanClause createBooleanClause(Query query, Occur occur) { if (query instanceof BooleanQuery) { BooleanCl...
3.68
pulsar_ManagedLedgerConfig_setAckQuorumSize
/** * @param ackQuorumSize * the ackQuorumSize to set */ public ManagedLedgerConfig setAckQuorumSize(int ackQuorumSize) { this.ackQuorumSize = ackQuorumSize; return this; }
3.68
hbase_CompactingMemStore_tryFlushInMemoryAndCompactingAsync
/** * Try to flush the currActive in memory and submit the background * {@link InMemoryCompactionRunnable} to * {@link RegionServicesForStores#getInMemoryCompactionPool()}. Just one thread can do the actual * flushing in memory. * @param currActive current Active Segment to be flush in memory. */ private void try...
3.68
hadoop_ExportedBlockKeys_readFields
/** */ @Override public void readFields(DataInput in) throws IOException { isBlockTokenEnabled = in.readBoolean(); keyUpdateInterval = in.readLong(); tokenLifetime = in.readLong(); currentKey.readFields(in); this.allKeys = new BlockKey[in.readInt()]; for (int i = 0; i < allKeys.length; i++) { allKeys[i...
3.68
hadoop_BlockData_getState
/** * Gets the state of the given block. * @param blockNumber the id of the given block. * @return the state of the given block. * @throws IllegalArgumentException if blockNumber is invalid. */ public State getState(int blockNumber) { throwIfInvalidBlockNumber(blockNumber); return state[blockNumber]; }
3.68
hadoop_MultipartUploaderBuilderImpl_blockSize
/** * Set block size. */ @Override public B blockSize(long blkSize) { blockSize = blkSize; return getThisBuilder(); }
3.68
hbase_ReusableStreamGzipCodec_finish
/** * Override because certain implementation calls def.end() which causes problem when resetting * the stream for reuse. */ @Override public void finish() throws IOException { if (HAS_BROKEN_FINISH) { if (!def.finished()) { def.finish(); while (!def.finished()) { int i = def.deflate(this.b...
3.68
flink_HiveTableUtil_enableConstraint
// returns a constraint trait that requires ENABLE public static byte enableConstraint(byte trait) { return (byte) (trait | HIVE_CONSTRAINT_ENABLE); }
3.68
pulsar_FileUtils_deleteFiles
/** * Deletes given files. * * @param files to delete * @param recurse will recurse * @throws IOException if issues deleting files */ public static void deleteFiles(final Collection<File> files, final boolean recurse) throws IOException { for (final File file : files) { FileUtils.deleteFile(file, recu...
3.68
hadoop_QueuePriorityContainerCandidateSelector_preemptionAllowed
/** * Do we allow demandingQueue preempt resource from toBePreemptedQueue * * @param demandingQueue demandingQueue * @param toBePreemptedQueue toBePreemptedQueue * @return can/cannot */ private boolean preemptionAllowed(String demandingQueue, String toBePreemptedQueue) { return priorityDigraph.contains(dema...
3.68
hbase_AbstractFSWAL_getNumLogFiles
// public only until class moves to o.a.h.h.wal /** Returns the number of log files in use */ public int getNumLogFiles() { // +1 for current use log return getNumRolledLogFiles() + 1; }
3.68
hadoop_DataNodeFaultInjector_stripedBlockChecksumReconstruction
/** * Used as a hook to inject failure in erasure coding checksum reconstruction * process. */ public void stripedBlockChecksumReconstruction() throws IOException {}
3.68
hudi_TableSchemaResolver_getTableAvroSchemaFromLatestCommit
/** * Returns table's latest Avro {@link Schema} iff table is non-empty (ie there's at least * a single commit) * * This method differs from {@link #getTableAvroSchema(boolean)} in that it won't fallback * to use table's schema used at creation */ public Option<Schema> getTableAvroSchemaFromLatestCommit(boolean i...
3.68
hbase_CandidateGenerator_pickRandomRegion
/** * From a list of regions pick a random one. Null can be returned which * {@link StochasticLoadBalancer#balanceCluster(Map)} recognize as signal to try a region move * rather than swap. * @param cluster The state of the cluster * @param server index of the server * @param chanceOfNoSwap Chance t...
3.68
framework_Header_setDefaultRow
/** * Sets the default row of this header. The default row displays column * captions and sort indicators. * * @param defaultRow * the new default row, or null for no default row * * @throws IllegalArgumentException * if the header does not contain the row */ public void setDefaultRow(Ro...
3.68
dubbo_RestProtocol_createReferenceCountedClient
/** * create rest ReferenceCountedClient * * @param url * @return * @throws RpcException */ private ReferenceCountedClient<? extends RestClient> createReferenceCountedClient(URL url) throws RpcException { // url -> RestClient RestClient restClient = clientFactory.createRestClient(url); return new Re...
3.68
dubbo_AbstractConfigManager_addIfAbsent
/** * Add config * * @param config * @param configsMap * @return the existing equivalent config or the new adding config * @throws IllegalStateException */ private <C extends AbstractConfig> C addIfAbsent(C config, Map<String, C> configsMap) throws IllegalStateException { if (config == null || configsMap ==...
3.68
hibernate-validator_MethodInheritanceTree_getAllMethods
/** * Returns a set containing all the methods of the hierarchy. * * @return a set containing all the methods of the hierarchy */ public Set<ExecutableElement> getAllMethods() { return Collections.unmodifiableSet( methodNodeMapping.keySet() ); }
3.68
hadoop_QueueCapacityConfigParser_heterogeneousParser
/** * A parser method that is usable on resource capacity values e.g. mixed or * absolute resource. * @param matcher a regex matcher that contains the matched resource string * @return a parsed capacity vector */ private QueueCapacityVector heterogeneousParser(Matcher matcher) { QueueCapacityVector capacityVecto...
3.68
hbase_FlushPolicyFactory_getFlushPolicyClass
/** * Get FlushPolicy class for the given table. */ public static Class<? extends FlushPolicy> getFlushPolicyClass(TableDescriptor htd, Configuration conf) throws IOException { String className = htd.getFlushPolicyClassName(); if (className == null) { className = conf.get(HBASE_FLUSH_POLICY_KEY, DEFAULT_FLU...
3.68
framework_HasValue_getComponent
/** * Returns the component. * * @return the component, not null */ public Component getComponent() { return component; }
3.68
flink_AbstractFileStateBackend_getSavepointPath
/** * Gets the directory where savepoints are stored by default (when no custom path is given to * the savepoint trigger command). * * @return The default directory for savepoints, or null, if no default directory has been * configured. */ @Nullable public Path getSavepointPath() { return baseSavepointPat...
3.68
querydsl_QueryModifiers_subList
/** * Get a sublist based on the restriction of limit and offset * * @param <T> * @param list list to be handled * @return sublist with limit and offset applied */ public <T> List<T> subList(List<T> list) { if (!list.isEmpty()) { int from = offset != null ? toInt(offset) : 0; int to = limit !=...
3.68
hadoop_AMWebServices_getJobFromJobIdString
/** * convert a job id string to an actual job and handle all the error checking. */ public static Job getJobFromJobIdString(String jid, AppContext appCtx) throws NotFoundException { JobId jobId; Job job; try { jobId = MRApps.toJobID(jid); } catch (YarnRuntimeException e) { // TODO:...
3.68
hbase_RegionStateStore_hasGlobalReplicationScope
// ========================================================================== // Table Descriptors helpers // ========================================================================== private boolean hasGlobalReplicationScope(TableName tableName) throws IOException { return hasGlobalReplicationScope(getDescriptor(ta...
3.68
morf_SqlDialect_getSqlForLower
/** * Converts the <code>LOWER</code> function into SQL. * * @param function the function to convert. * @return a string representation of the SQL. */ protected String getSqlForLower(Function function) { return "LOWER(" + getSqlFrom(function.getArguments().get(0)) + ")"; }
3.68
flink_OneShotLatch_await
/** * Waits until {@link OneShotLatch#trigger()} is called. Once {@code #trigger()} has been called * this call will always return immediately. * * <p>If the latch is not triggered within the given timeout, a {@code TimeoutException} will be * thrown after the timeout. * * <p>A timeout value of zero means infini...
3.68
hbase_MetaTableAccessor_getScanForTableName
/** * This method creates a Scan object that will only scan catalog rows that belong to the specified * table. It doesn't specify any columns. This is a better alternative to just using a start row * and scan until it hits a new table since that requires parsing the HRI to get the table name. * @param tableName byt...
3.68
hadoop_DynamicIOStatisticsBuilder_build
/** * Build the IOStatistics instance. * @return an instance. * @throws IllegalStateException if the builder has already been built. */ public IOStatistics build() { final DynamicIOStatistics stats = activeInstance(); // stop the builder from working any more. instance = null; return stats; }
3.68
hbase_HbckChore_scanForMergedParentRegions
/** * Scan hbase:meta to get set of merged parent regions, this is a very heavy scan. * @return Return generated {@link HashSet} */ private HashSet<String> scanForMergedParentRegions() throws IOException { HashSet<String> mergedParentRegions = new HashSet<>(); // Null tablename means scan all of meta. MetaTabl...
3.68
AreaShop_RegionGroup_setSetting
/** * Set a setting of this group. * @param path The path to set * @param setting The value to set */ public void setSetting(String path, Object setting) { plugin.getFileManager().setGroupSetting(this, path, setting); }
3.68
dubbo_ConfigValidationUtils_checkMultiExtension
/** * Check whether there is a <code>Extension</code> who's name (property) is <code>value</code> (special treatment is * required) * * @param type The Extension type * @param property The extension key * @param value The Extension name */ public static void checkMultiExtension(ScopeModel scopeModel, Clas...
3.68
pulsar_ComponentImpl_isAuthorizedRole
/** * @deprecated use {@link #isAuthorizedRole(String, String, AuthenticationParameters)} instead. */ @Deprecated public boolean isAuthorizedRole(String tenant, String namespace, String clientRole, AuthenticationDataSource authenticationData) throws PulsarAdminException { Authentic...
3.68
hbase_JVM_isLinux
/** * Check if the OS is linux. * @return whether this is linux or not. */ public static boolean isLinux() { return linux; }
3.68
hbase_MetricsAssignmentManager_updateRITCount
/** * set new value for number of regions in transition. */ public void updateRITCount(final int ritCount) { assignmentManagerSource.setRIT(ritCount); }
3.68
flink_FlinkImageBuilder_setJavaVersion
/** * Sets JDK version in the image. * * <p>This version string will be used as the tag of openjdk image. If version is not specified, * the JDK version of the current JVM will be used. * * @see <a href="https://hub.docker.com/_/openjdk">OpenJDK on Docker Hub</a> for all available * tags. */ public FlinkIma...
3.68
hadoop_ExitUtil_haltOnOutOfMemory
/** * Handler for out of memory events -no attempt is made here * to cleanly shutdown or support halt blocking; a robust * printing of the event to stderr is all that can be done. * @param oome out of memory event */ public static void haltOnOutOfMemory(OutOfMemoryError oome) { //After catching an OOM java says ...
3.68
hbase_OrderedBytes_isFixedFloat64
/** * Return true when the next encoded value in {@code src} uses fixed-width Float64 encoding, false * otherwise. */ public static boolean isFixedFloat64(PositionedByteRange src) { return FIXED_FLOAT64 == (-1 == Integer.signum(src.peek()) ? DESCENDING : ASCENDING).apply(src.peek()); }
3.68
morf_MergeStatementBuilder_from
/** * Specifies the select statement to use as a source of the data. * * @param statement the source statement. * @return this, for method chaining. */ public MergeStatementBuilder from(SelectStatement statement) { if (statement.getOrderBys().size() != 0) { throw new IllegalArgumentException("ORDER BY is not...
3.68
hbase_TableSchemaModel_getTableDescriptor
/** Returns a table descriptor */ @JsonIgnore public TableDescriptor getTableDescriptor() { TableDescriptorBuilder tableDescriptorBuilder = TableDescriptorBuilder.newBuilder(TableName.valueOf(getName())); for (Map.Entry<QName, Object> e : getAny().entrySet()) { tableDescriptorBuilder.setValue(e.getKey().get...
3.68
hudi_HoodieMultiTableStreamer_sync
/** * Creates actual HoodieDeltaStreamer objects for every table/topic and does incremental sync. */ public void sync() { for (TableExecutionContext context : tableExecutionContexts) { try { new HoodieStreamer(context.getConfig(), jssc, Option.ofNullable(context.getProperties())).sync(); successTabl...
3.68
flink_PlanProjectOperator_map
// TODO We should use code generation for this. @SuppressWarnings("unchecked") @Override public R map(Tuple inTuple) throws Exception { for (int i = 0; i < fields.length; i++) { outTuple.setField(inTuple.getField(fields[i]), i); } return (R) outTuple; }
3.68
hadoop_SnappyCodec_setConf
/** * Set the configuration to be used by this object. * * @param conf the configuration object. */ @Override public void setConf(Configuration conf) { this.conf = conf; }
3.68
flink_DataSet_partitionByRange
/** * Range-partitions a DataSet using the specified KeySelector. * * <p><b>Important:</b>This operation requires an extra pass over the DataSet to compute the * range boundaries and shuffles the whole DataSet over the network. This can take significant * amount of time. * * @param keyExtractor The KeyExtractor ...
3.68
flink_RocksDBNativeMetricOptions_enableCurSizeActiveMemTable
/** Returns approximate size of active memtable (bytes). */ public void enableCurSizeActiveMemTable() { this.properties.add(RocksDBProperty.CurSizeActiveMemTable.getRocksDBProperty()); }
3.68
morf_LoggingSqlScriptVisitor_beforeExecute
/** * {@inheritDoc} * @see org.alfasoftware.morf.jdbc.SqlScriptExecutor.SqlScriptVisitor#beforeExecute(java.lang.String) */ @Override public void beforeExecute(String sql) { log.info(logSchemaPositionPrefix() + "Executing [" + sql + "]"); }
3.68
hadoop_LongLong_multiplication
/** Compute a*b and store the result to r. * @return r */ static LongLong multiplication(final LongLong r, final long a, final long b) { /* final long x0 = a & LOWER_MASK; final long x1 = (a & UPPER_MASK) >> MID; final long y0 = b & LOWER_MASK; final long y1 = (b & UPPER_MASK) >> MID; final long t = (x0...
3.68
hadoop_SuccessData_putDiagnostic
/** * Add a diagnostics entry. * @param key name * @param value value */ public void putDiagnostic(String key, String value) { diagnostics.put(key, value); }
3.68
hbase_StripeStoreFileManager_updateCandidateFilesForRowKeyBefore
/** * See {@link StoreFileManager#getCandidateFilesForRowKeyBefore(KeyValue)} and * {@link StoreFileManager#updateCandidateFilesForRowKeyBefore(Iterator, KeyValue, Cell)} for * details on this methods. */ @Override public Iterator<HStoreFile> updateCandidateFilesForRowKeyBefore( Iterator<HStoreFile> candidateFile...
3.68
hbase_HFileBlock_totalChecksumBytes
/** * Return the number of bytes required to store all the checksums for this block. Each checksum * value is a 4 byte integer. <br/> * NOTE: ByteBuff returned by {@link HFileBlock#getBufferWithoutHeader()} and * {@link HFileBlock#getBufferReadOnly} or DataInputStream returned by * {@link HFileBlock#getByteStream(...
3.68
pulsar_MultiTopicsConsumerImpl_unsubscribeAsync
// un-subscribe a given topic public CompletableFuture<Void> unsubscribeAsync(String topicName) { checkArgument(TopicName.isValid(topicName), "Invalid topic name:" + topicName); if (getState() == State.Closing || getState() == State.Closed) { return FutureUtil.failedFuture( new PulsarClient...
3.68
dubbo_DubboSpringInitContext_setKeepRunningOnSpringClosed
/** * Keep Dubbo running when spring is stopped * @param keepRunningOnSpringClosed */ public void setKeepRunningOnSpringClosed(boolean keepRunningOnSpringClosed) { this.setModuleAttribute(ModelConstants.KEEP_RUNNING_ON_SPRING_CLOSED, keepRunningOnSpringClosed); }
3.68
hadoop_WriteManager_commitBeforeRead
// Do a possible commit before read request in case there is buffered data // inside DFSClient which has been flushed but not synced. int commitBeforeRead(DFSClient dfsClient, FileHandle fileHandle, long commitOffset) { int status; OpenFileCtx openFileCtx = fileContextCache.get(fileHandle); if (openFileCtx =...
3.68
flink_DualInputOperator_getOperatorInfo
/** Gets the information about the operators input/output types. */ @Override @SuppressWarnings("unchecked") public BinaryOperatorInformation<IN1, IN2, OUT> getOperatorInfo() { return (BinaryOperatorInformation<IN1, IN2, OUT>) this.operatorInfo; }
3.68
hbase_AbstractViolationPolicyEnforcement_getFileSize
/** * Computes the size of a single file on the filesystem. If the size cannot be computed for some * reason, a {@link SpaceLimitingException} is thrown, as the file may violate a quota. If the * provided path does not reference a file, an {@link IllegalArgumentException} is thrown. * @param fs The FileSystem whi...
3.68
zxing_CharacterSetECI_getCharacterSetECIByValue
/** * @param value character set ECI value * @return {@code CharacterSetECI} representing ECI of given value, or null if it is legal but * unsupported * @throws FormatException if ECI value is invalid */ public static CharacterSetECI getCharacterSetECIByValue(int value) throws FormatException { if (value < 0 |...
3.68
flink_RpcUtils_createRemoteRpcService
/** * Convenient shortcut for constructing a remote RPC Service that takes care of checking for * null and empty optionals. * * @see RpcSystem#remoteServiceBuilder(Configuration, String, String) */ public static RpcService createRemoteRpcService( RpcSystem rpcSystem, Configuration configuration, ...
3.68
dubbo_AbstractDirectory_getCheckConnectivityPermit
/** * for ut only */ @Deprecated public Semaphore getCheckConnectivityPermit() { return checkConnectivityPermit; }
3.68
framework_VCalendarPanel_setFocusChangeListener
/** * The given FocusChangeListener is notified when the focused date changes * by user either clicking on a new date or by using the keyboard. * * @param listener * The FocusChangeListener to be notified */ public void setFocusChangeListener(FocusChangeListener listener) { focusChangeListener = li...
3.68
hbase_MetricsTableRequests_updateCheckAndMutate
/** * Update the CheckAndMutate time histogram. * @param time time it took */ public void updateCheckAndMutate(long time, long blockBytesScanned) { if (isEnableTableLatenciesMetrics()) { checkAndMutateTimeHistogram.update(time); if (blockBytesScanned > 0) { blockBytesScannedCount.increment(blockBytes...
3.68
morf_XmlDataSetProducer_isTableEmpty
/** * @see org.alfasoftware.morf.dataset.DataSetProducer#isTableEmpty(java.lang.String) */ @Override public boolean isTableEmpty(String tableName) { final InputStream inputStream = xmlStreamProvider.openInputStreamForTable(tableName); try { final XMLStreamReader pullParser = openPullParser(inputStream); ...
3.68
hadoop_AllocateResponse_amRmToken
/** * Set the <code>amRmToken</code> of the response. * @see AllocateResponse#setAMRMToken(Token) * @param amRmToken <code>amRmToken</code> of the response * @return {@link AllocateResponseBuilder} */ @Private @Unstable public AllocateResponseBuilder amRmToken(Token amRmToken) { allocateResponse.setAMRMToken(amR...
3.68
flink_RocksDBStateDownloader_transferAllStateDataToDirectoryAsync
/** Asynchronously runs the specified download requests on executorService. */ private Stream<CompletableFuture<Void>> transferAllStateDataToDirectoryAsync( Collection<StateHandleDownloadSpec> handleWithPaths, CloseableRegistry closeableRegistry) { return handleWithPaths.stream() .flatMa...
3.68
framework_AbstractInMemoryContainer_isFiltered
/** * Returns true is the container has active filters. * * @return true if the container is currently filtered */ protected boolean isFiltered() { return filteredItemIds != null; }
3.68
hbase_MetricsMaster_setNumNamespacesInSpaceQuotaViolation
/** * Sets the number of namespaces in violation of a space quota. * @see MetricsMasterQuotaSource#updateNumNamespacesInSpaceQuotaViolation(long) */ public void setNumNamespacesInSpaceQuotaViolation(final long numNamespacesInViolation) { masterQuotaSource.updateNumNamespacesInSpaceQuotaViolation(numNamespacesInVio...
3.68
hadoop_DNSOperationsFactory_createInstance
/** * Create and initialize a registry operations instance. * Access rights will be determined from the configuration. * * @param name name of the instance * @param impl the DNS implementation. * @param conf configuration * @return a registry operations instance */ public static DNSOperations createInstance(Str...
3.68
flink_PhysicalFile_deleteIfNecessary
/** * Delete this physical file if there is no reference count from logical files (all discarded), * and this physical file is closed (no further writing on it). * * @throws IOException if anything goes wrong with file system. */ public void deleteIfNecessary() throws IOException { synchronized (this) { ...
3.68
framework_EditorImpl_doEdit
/** * Handles editor component generation and adding them to the hierarchy of * the Grid. * * @param bean * the edited item; can't be {@code null} */ protected void doEdit(T bean) { Objects.requireNonNull(bean, "Editor can't edit null"); if (!isEnabled()) { throw new IllegalStateExcepti...
3.68
hudi_HoodieTableMetaClient_getFunctionalIndexMetadata
/** * Returns Option of {@link HoodieFunctionalIndexMetadata} from index definition file if present, else returns empty Option. */ public Option<HoodieFunctionalIndexMetadata> getFunctionalIndexMetadata() { if (functionalIndexMetadata.isPresent()) { return functionalIndexMetadata; } if (tableConfig.getIndex...
3.68
flink_FlinkResource_get
/** * Returns the configured FlinkResource implementation, or a {@link * LocalStandaloneFlinkResource} if none is configured. * * @param setup setup instructions for the FlinkResource * @return configured FlinkResource, or {@link LocalStandaloneFlinkResource} is none is * configured */ static FlinkResource g...
3.68
hbase_StoreFileInfo_getReferredToRegionAndFile
/* * Return region and file name referred to by a Reference. * @param referenceFile HFile name which is a Reference. * @return Calculated referenced region and file name. * @throws IllegalArgumentException when referenceFile regex fails to match. */ public static Pair<String, String> getReferredToRegionAndFile(fin...
3.68
flink_RocksDBIncrementalRestoreOperation_createColumnFamilyDescriptors
/** * This method recreates and registers all {@link ColumnFamilyDescriptor} from Flink's state * meta data snapshot. */ private List<ColumnFamilyDescriptor> createColumnFamilyDescriptors( List<StateMetaInfoSnapshot> stateMetaInfoSnapshots, boolean registerTtlCompactFilter) { List<ColumnFamilyDescriptor...
3.68
framework_ReverseConverter_convertToModel
/* * (non-Javadoc) * * @see com.vaadin.data.util.converter.Converter#convertToModel(java * .lang.Object, java.util.Locale) */ @Override public MODEL convertToModel(PRESENTATION value, Class<? extends MODEL> targetType, Locale locale) throws ConversionException { return realConverter.convertToPr...
3.68
hmily_GsonUtils_getType
/** * Get JsonElement class type. * * @param element the element * @return Class class */ public Class getType(final JsonElement element) { if (!element.isJsonPrimitive()) { return element.getClass(); } final JsonPrimitive primitive = element.getAsJsonPrimitive(); if (primitive.isStrin...
3.68
hadoop_KerberosSecurityTestcase_createMiniKdcConf
/** * Create a Kdc configuration */ public void createMiniKdcConf() { conf = MiniKdc.createConf(); }
3.68
pulsar_ProxyService_shutdownEventLoop
// Shutdown the event loop. // If graceful is true, will wait for the current requests to be completed, up to 15 seconds. // Graceful shutdown can be disabled by setting the gracefulShutdown flag to false. This is used in tests // to speed up the shutdown process. private Future<?> shutdownEventLoop(EventLoopGroup even...
3.68
hbase_HFileInfo_parsePB
/** * Fill our map with content of the pb we read off disk * @param fip protobuf message to read */ void parsePB(final HFileProtos.FileInfoProto fip) { this.map.clear(); for (BytesBytesPair pair : fip.getMapEntryList()) { this.map.put(pair.getFirst().toByteArray(), pair.getSecond().toByteArray()); } }
3.68
hbase_MultiTableInputFormatBase_setTableRecordReader
/** * Allows subclasses to set the {@link TableRecordReader}. * @param tableRecordReader A different {@link TableRecordReader} implementation. */ protected void setTableRecordReader(TableRecordReader tableRecordReader) { this.tableRecordReader = tableRecordReader; }
3.68
hadoop_ActiveAuditManagerS3A_isActive
/** * Is the span active? * @return true if this span is the active one for the current thread. */ private boolean isActive() { return this == getActiveAuditSpan(); }
3.68
hadoop_ResourcePool_close
/** * Derived classes may implement a way to cleanup each item. * * @param item the resource to close. */ protected void close(T item) { // Do nothing in this class. Allow overriding classes to take any cleanup action. }
3.68
morf_AbstractSqlDialectTest_shouldGenerateCorrectSqlForMathOperations16
/** * Test for proper SQL mathematics operation generation from DSL expressions. */ @Test public void shouldGenerateCorrectSqlForMathOperations16() { String result = testDialect.getSqlFrom(field("a").plus(field("b")).plus(field("c")).divideBy(literal(2)).plus(field("z"))); assertEquals(expectedSqlForMathOperation...
3.68
flink_CheckpointStatsHistory_createSnapshot
/** * Creates a snapshot of the current state. * * @return Snapshot of the current state. */ CheckpointStatsHistory createSnapshot() { if (readOnly) { throw new UnsupportedOperationException( "Can't create a snapshot of a read-only history."); } List<AbstractCheckpointStats> che...
3.68
morf_AbstractSqlDialectTest_testSelectMaximum
/** * Tests select statement with maximum function. */ @Test public void testSelectMaximum() { SelectStatement stmt = new SelectStatement(max(new FieldReference(INT_FIELD))).from(new TableReference(TEST_TABLE)); String expectedSql = "SELECT MAX(intField) FROM " + tableName(TEST_TABLE); assertEquals("Select scri...
3.68
flink_AllWindowedStream_trigger
/** Sets the {@code Trigger} that should be used to trigger window emission. */ @PublicEvolving public AllWindowedStream<T, W> trigger(Trigger<? super T, ? super W> trigger) { if (windowAssigner instanceof MergingWindowAssigner && !trigger.canMerge()) { throw new UnsupportedOperationException( ...
3.68
flink_HiveTableUtil_createSchema
/** Create a Flink's Schema from Hive table's columns and partition keys. */ public static org.apache.flink.table.api.Schema createSchema( List<FieldSchema> nonPartCols, List<FieldSchema> partitionKeys, Set<String> notNullColumns, @Nullable UniqueConstraint primaryKey) { Tuple2<Strin...
3.68
morf_Function_deepCopyInternal
/** * @see org.alfasoftware.morf.sql.element.AliasedField#deepCopyInternal(DeepCopyTransformation) */ @Override protected Function deepCopyInternal(DeepCopyTransformation transformer) { return new Function(Function.this, transformer); }
3.68
hbase_BlockCache_blockFitsIntoTheCache
/** * Checks whether there's enough space left in the cache to accommodate the passed block. This * method may not be overridden by all implementing classes. In such cases, the returned Optional * will be empty. For subclasses implementing this logic, the returned Optional would contain the * boolean value reflecti...
3.68
framework_BootstrapHandler_getResponse
/** * Gets the Vaadin/HTTP response. * * @return the Vaadin/HTTP response */ public VaadinResponse getResponse() { return response; }
3.68
hadoop_ClientCache_stopClient
/** * Stop a RPC client connection * A RPC client is closed only when its reference count becomes zero. * * @param client input client. */ public void stopClient(Client client) { if (Client.LOG.isDebugEnabled()) { Client.LOG.debug("stopping client from cache: " + client); } final int count; synchroniz...
3.68
flink_CharValue_setValue
/** * Sets the encapsulated char to the specified value. * * @param value the new value of the encapsulated char. */ public void setValue(char value) { this.value = value; }
3.68
hadoop_SignerSecretProvider_destroy
/** * Will be called on shutdown; subclasses should perform any cleanup here. */ public void destroy() {}
3.68
druid_SQLMethodInvokeExpr_addParameter
/** * deprecated, instead of addArgument * * @deprecated */ public void addParameter(SQLExpr param) { if (param != null) { param.setParent(this); } this.arguments.add(param); }
3.68
hbase_ZKSplitLogManagerCoordination_setIgnoreDeleteForTesting
/** * Temporary function that is used by unit tests only */ public void setIgnoreDeleteForTesting(boolean b) { ignoreZKDeleteForTesting = b; }
3.68