name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hbase_PrivateCellUtil_writeQualifierSkippingBytes
/** * Writes the qualifier from the given cell to the output stream excluding the common prefix * @param out The dataoutputstream to which the data has to be written * @param cell The cell whose contents has to be written * @param qlength the qualifier length */ public static void writeQualifierSkippingByte...
3.68
morf_SqlDialect_sqlIsComment
/** * @param sql The SQL to test * @return true if the sql provided is a comment */ public boolean sqlIsComment(String sql) { return sql.startsWith("--") && !sql.contains("\n"); // multi-line statements may have comments as the top line }
3.68
flink_JobGraph_addUserJarBlobKey
/** * Adds the BLOB referenced by the key to the JobGraph's dependencies. * * @param key path of the JAR file required to run the job on a task manager */ public void addUserJarBlobKey(PermanentBlobKey key) { if (key == null) { throw new IllegalArgumentException(); } if (!userJarBlobKeys.contai...
3.68
hadoop_ECPolicyLoader_loadSchema
/** * Load a schema from a schema element in the XML configuration file. * @param element EC schema element * @return ECSchema */ private ECSchema loadSchema(Element element) { Map<String, String> schemaOptions = new HashMap<String, String>(); NodeList fields = element.getChildNodes(); for (int i = 0; i < fi...
3.68
morf_InsertStatementBuilder_fields
/** * Specifies the fields to insert into the table. * * <p> * NOTE: This method should not be used in conjunction with {@link #values}. * </p> * * @param destinationFields the fields to insert into the database table * @return this, for method chaining. */ public InsertStatementBuilder fields(Iterable<? exten...
3.68
morf_SqlUtils_update
/** * Constructs an update statement. * * <p>Usage is discouraged; this method will be deprecated at some point. Use * {@link UpdateStatement#update(TableReference)} for preference.</p> * * @param tableReference the database table to update * @return {@link UpdateStatement} */ public static UpdateStatement upda...
3.68
morf_OracleMetaDataProvider_readViewMap
/** * Populate {@link #viewMap} with information from the database. Since JDBC metadata reading * is slow on Oracle, this uses an optimised query. * * @see <a href="http://docs.oracle.com/cd/B19306_01/server.102/b14237/statviews_2117.htm">ALL_VIEWS specification</a> */ private void readViewMap() { log.info("Star...
3.68
framework_TableConnector_onUnregister
/* * (non-Javadoc) * * @see com.vaadin.client.ui.AbstractComponentConnector#onUnregister() */ @Override public void onUnregister() { super.onUnregister(); getWidget().onUnregister(); }
3.68
hbase_FSWALEntry_getFamilyNames
/** Returns the family names which are effected by this edit. */ Set<byte[]> getFamilyNames() { return familyNames; }
3.68
flink_ExecutionConfig_setExecutionMode
/** * Sets the execution mode to execute the program. The execution mode defines whether data * exchanges are performed in a batch or on a pipelined manner. * * <p>The default execution mode is {@link ExecutionMode#PIPELINED}. * * @param executionMode The execution mode to use. * @deprecated The {@link Execution...
3.68
graphhopper_GraphHopperWeb_setPostRequest
/** * Use new endpoint 'POST /route' instead of 'GET /route' */ public GraphHopperWeb setPostRequest(boolean postRequest) { this.postRequest = postRequest; return this; }
3.68
hbase_CommonFSUtils_invokeSetStoragePolicy
/* * All args have been checked and are good. Run the setStoragePolicy invocation. */ private static void invokeSetStoragePolicy(final FileSystem fs, final Path path, final String storagePolicy) throws IOException { Exception toThrow = null; try { fs.setStoragePolicy(path, storagePolicy); LOG.debug("Se...
3.68
zxing_QRCodeDecoderMetaData_applyMirroredCorrection
/** * Apply the result points' order correction due to mirroring. * * @param points Array of points to apply mirror correction to. */ public void applyMirroredCorrection(ResultPoint[] points) { if (!mirrored || points == null || points.length < 3) { return; } ResultPoint bottomLeft = points[0]; points[0...
3.68
hudi_RocksDBDAO_writeBatch
/** * Perform a batch write operation. */ public void writeBatch(BatchHandler handler) { try (WriteBatch batch = new WriteBatch()) { handler.apply(batch); getRocksDB().write(new WriteOptions(), batch); } catch (RocksDBException re) { throw new HoodieException(re); } }
3.68
hbase_KeyValueUtil_createKeyValueFromInputStream
/** * Create a KeyValue reading from the raw InputStream. Named * <code>createKeyValueFromInputStream</code> so doesn't clash with {@link #create(DataInput)} * @param in inputStream to read. * @param withTags whether the keyvalue should include tags are not * @return Created KeyValue OR if we find a length o...
3.68
aws-saas-boost_ExistingEnvironmentFactory_getExistingSaaSBoostStackDetails
// VisibleForTesting static Map<String, String> getExistingSaaSBoostStackDetails( CloudFormationClient cfn, String baseCloudFormationStackName) { LOGGER.debug("Getting CloudFormation stack details for SaaS Boost stack {}", baseCloudFormationStackName); Map<String, String> details = new HashMap<...
3.68
framework_TableQuery_executeUpdate
/** * Executes the given update query string using either the active connection * if a transaction is already open, or a new connection from this query's * connection pool. * * @param sh * an instance of StatementHelper, containing the query string * and parameter values. * @return Number ...
3.68
hbase_HRegion_getCoprocessorHost
/** Returns the coprocessor host */ public RegionCoprocessorHost getCoprocessorHost() { return coprocessorHost; }
3.68
hbase_LruAdaptiveBlockCache_assertCounterSanity
/** * Sanity-checking for parity between actual block cache content and metrics. Intended only for * use with TRACE level logging and -ea JVM. */ private static void assertCounterSanity(long mapSize, long counterVal) { if (counterVal < 0) { LOG.trace("counterVal overflow. Assertions unreliable. counterVal=" + ...
3.68
hudi_BoundedInMemoryQueue_adjustBufferSizeIfNeeded
/** * Samples records with "RECORD_SAMPLING_RATE" frequency and computes average record size in bytes. It is used for * determining how many maximum records to queue. Based on change in avg size it ma increase or decrease available * permits. * * @param payload Payload to size */ private void adjustBufferSizeIfNe...
3.68
hudi_AvroSchemaUtils_resolveUnionSchema
/** * Passed in {@code Union} schema and will try to resolve the field with the {@code fieldSchemaFullName} * w/in the union returning its corresponding schema * * @param schema target schema to be inspected * @param fieldSchemaFullName target field-name to be looked up w/in the union * @return schema of the fiel...
3.68
hbase_HFileLink_getOriginPath
/** Returns the origin path of the hfile. */ public Path getOriginPath() { return this.originPath; }
3.68
framework_Escalator_getScrollWidth
/** * Returns the scroll width for the escalator. Note that this is not * necessary the same as {@code Element.scrollWidth} in the DOM. * * @since 7.5.0 * @return the scroll width in pixels */ public double getScrollWidth() { return horizontalScrollbar.getScrollSize(); }
3.68
hbase_MasterObserver_postGetRSGroupInfoOfServer
/** * Called after getting region server group info of the passed server. * @param ctx the environment to interact with the framework and master * @param server server to get RSGroupInfo for */ default void postGetRSGroupInfoOfServer(final ObserverContext<MasterCoprocessorEnvironment> ctx, final Address server...
3.68
hibernate-validator_ValueExtractorResolver_getMaximallySpecificValueExtractors
/** * Used to find all the maximally specific value extractors based on a declared type in the case of value unwrapping. * <p> * There might be several of them as there might be several type parameters. * <p> * Used for container element constraints. */ public Set<ValueExtractorDescriptor> getMaximallySpecificVal...
3.68
pulsar_PulsarMetadata_getPulsarColumns
/** * Convert pulsar schema into presto table metadata. */ @VisibleForTesting public List<ColumnMetadata> getPulsarColumns(TopicName topicName, SchemaInfo schemaInfo, boolean withInternalColumns, ...
3.68
flink_FileWriter_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_YarnVersionInfo_getBuildVersion
/** * Returns the buildVersion which includes version, * revision, user and date. * * @return buildVersion. */ public static String getBuildVersion(){ return YARN_VERSION_INFO._getBuildVersion(); }
3.68
hudi_HoodieTable_shouldTrackSuccessRecords
/** * When {@link HoodieTableConfig#POPULATE_META_FIELDS} is enabled, * we need to track written records within WriteStatus in two cases: * <ol> * <li> When the HoodieIndex being used is not implicit with storage * <li> If any of the metadata table partitions (record index, etc) which require written record tr...
3.68
shardingsphere-elasticjob_InstanceService_persistOnline
/** * Persist job online status. */ public void persistOnline() { jobNodeStorage.fillEphemeralJobNode(instanceNode.getLocalInstancePath(), instanceNode.getLocalInstanceValue()); }
3.68
MagicPlugin_PlayerController_onPlayerPreLogin
// TODO: Why not MONITOR? @EventHandler(priority = EventPriority.HIGHEST) public void onPlayerPreLogin(AsyncPlayerPreLoginEvent event) { if (event.getLoginResult() != AsyncPlayerPreLoginEvent.Result.ALLOWED) { // Did not emit any events prior to this, nothing to clean up return; } controlle...
3.68
hbase_CacheConfig_shouldCacheCompressed
/** * Returns true if this {@link BlockCategory} should be compressed in blockcache, false otherwise */ public boolean shouldCacheCompressed(BlockCategory category) { switch (category) { case DATA: return this.cacheDataOnRead && this.cacheDataCompressed; default: return false; } }
3.68
framework_Table_parseItemIdToCells
/** * Update a cache array for a row, register any relevant listeners etc. * * This is an internal method extracted from * {@link #getVisibleCellsNoCache(int, int, boolean)} and should be removed * when the Table is rewritten. */ private void parseItemIdToCells(Object[][] cells, Object id, int i, int firs...
3.68
flink_StreamGraphGenerator_transformFeedback
/** * Transforms a {@code FeedbackTransformation}. * * <p>This will recursively transform the input and the feedback edges. We return the * concatenation of the input IDs and the feedback IDs so that downstream operations can be * wired to both. * * <p>This is responsible for creating the IterationSource and Ite...
3.68
hadoop_S3ClientFactory_withMetrics
/** * Metrics binding. This is the S3A-level * statistics interface, which will be wired * up to the AWS callbacks. * @param statistics statistics implementation * @return this object */ public S3ClientCreationParameters withMetrics( @Nullable final StatisticsFromAwsSdk statistics) { metrics = statistics; ...
3.68
hadoop_TwoColumnLayout_header
/** * @return the class that will render the header of the page. */ protected Class<? extends SubView> header() { return HeaderBlock.class; }
3.68
hadoop_TextSplitter_bigDecimalToString
/** * Return the string encoded in a BigDecimal. * Repeatedly multiply the input value by 65536; the integer portion after such a multiplication * represents a single character in base 65536. Convert that back into a char and create a * string out of these until we have no data left. */ String bigDecimalToString(B...
3.68
hbase_MasterObserver_preGetTableDescriptors
/** * Called before a getTableDescriptors request has been processed. * @param ctx the environment to interact with the framework and master * @param tableNamesList the list of table names, or null if querying for all * @param descriptors an empty list, can be filled with what to return in coprocessor...
3.68
framework_GridElement_getErrorMessage
/** * Gets the error message text, or <code>null</code> if no message is * present. */ public String getErrorMessage() { WebElement messageWrapper = findElement( By.className("v-grid-editor-message")); List<WebElement> divs = messageWrapper .findElements(By.tagName("div")); if (di...
3.68
flink_Tuple16_toString
/** * Creates a string representation of the tuple in the form (f0, f1, f2, f3, f4, f5, f6, f7, f8, * f9, f10, f11, f12, f13, f14, f15), where the individual fields are the value returned by * calling {@link Object#toString} on that field. * * @return The string representation of the tuple. */ @Override public St...
3.68
pulsar_PulsarAdminImpl_lookups
/** * @return does a looks up for the broker serving the topic */ public Lookup lookups() { return lookups; }
3.68
hbase_Bytes_putByteBuffer
/** * Add the whole content of the ByteBuffer to the bytes arrays. The ByteBuffer is modified. * @param bytes the byte array * @param offset position in the array * @param buf ByteBuffer to write out * @return incremented offset */ public static int putByteBuffer(byte[] bytes, int offset, ByteBuffer buf) { ...
3.68
flink_SkipListUtils_helpGetValuePointer
/** * Returns the value pointer of the node. * * @param node the node. * @param spaceAllocator the space allocator. */ static long helpGetValuePointer(long node, Allocator spaceAllocator) { Chunk chunk = spaceAllocator.getChunkById(SpaceUtils.getChunkIdByAddress(node)); int offsetInChunk = SpaceUtils.getCh...
3.68
flink_Tuple14_equals
/** * Deep equality for tuples by calling equals() on the tuple members. * * @param o the object checked for equality * @return true if this is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Tuple14)) { return false; } ...
3.68
hudi_AvroSchemaUtils_isStrictProjectionOf
/** * Validate whether the {@code targetSchema} is a strict projection of {@code sourceSchema}. * * Schema B is considered a strict projection of schema A iff * <ol> * <li>Schemas A and B are equal, or</li> * <li>Schemas A and B are array schemas and element-type of B is a strict projection * of the elemen...
3.68
hadoop_TimelineReaderWebServicesUtils_parseIntStr
/** * Interpret passed string as a integer. * @param str Passed string. * @return integer representation if string is not null, null otherwise. */ static Integer parseIntStr(String str) { return str == null ? null : Integer.parseInt(str.trim()); }
3.68
hbase_MasterRpcServices_execProcedure
/** * Triggers an asynchronous attempt to run a distributed procedure. {@inheritDoc} */ @Override public ExecProcedureResponse execProcedure(RpcController controller, ExecProcedureRequest request) throws ServiceException { try { server.checkInitialized(); ProcedureDescription desc = request.getProcedure()...
3.68
shardingsphere-elasticjob_RequestBodyDeserializerFactory_getRequestBodyDeserializer
/** * Get deserializer for specific HTTP content type. * * <p> * This method will look for a deserializer instance of specific MIME type. * If deserializer not found, this method would look for deserializer factory by MIME type. * If it is still not found, the MIME type would be marked as <code>MISSING_DESERIALIZ...
3.68
hadoop_DumpUtil_dumpChunks
/** * Print data in hex format in an array of chunks. * @param header header. * @param chunks chunks. */ public static void dumpChunks(String header, ECChunk[] chunks) { System.out.println(); System.out.println(header); for (int i = 0; i < chunks.length; i++) { dumpChunk(chunks[i]); } System.out.print...
3.68
flink_DataSinkNode_getOutgoingConnections
/** * Gets all outgoing connections, which is an empty set for the data sink. * * @return An empty list. */ @Override public List<DagConnection> getOutgoingConnections() { return Collections.emptyList(); }
3.68
framework_AbstractJavaScriptExtension_callFunction
/** * Invoke a named function that the connector JavaScript has added to the * JavaScript connector wrapper object. The arguments can be any boxed * primitive type, String, {@link JsonValue} or arrays of any other * supported type. Complex types (e.g. List, Set, Map, Connector or any * JavaBean type) must be expli...
3.68
flink_TopologyGraph_link
/** * Link an edge from `from` node to `to` node if no loop will occur after adding this edge. * Returns if this edge is successfully added. */ boolean link(ExecNode<?> from, ExecNode<?> to) { TopologyNode fromNode = getOrCreateTopologyNode(from); TopologyNode toNode = getOrCreateTopologyNode(to); if (c...
3.68
hibernate-validator_GroupSequenceProviderCheck_hasPublicDefaultConstructor
/** * Checks that the given {@code TypeElement} has a public * default constructor. * * @param element The {@code TypeElement} to check. * * @return True if the given {@code TypeElement} has a public default constructor, false otherwise */ private boolean hasPublicDefaultConstructor(TypeElement element) { retur...
3.68
framework_DropTargetExtensionConnector_removeDropTargetStyle
/** * Remove class name from the drop target element indication that data can * be dropped onto it. */ protected void removeDropTargetStyle() { getDropTargetElement() .removeClassName(getStylePrimaryName(getDropTargetElement()) + STYLE_SUFFIX_DROPTARGET); }
3.68
morf_GraphBasedUpgradeBuilder_handleStandardNode
/** * Insert standard node (node with dependencies which doesn't require exclusive * execution) into the graph. * * @param processedNodes nodes processed so far * @param node to be inserted * @param root of the graph */ private void handleStandardNode(List<GraphBasedUpgradeNode> processedNode...
3.68
graphhopper_DistanceCalcEarth_calcDist
/** * Calculates distance of (from, to) in meter. * <p> * http://en.wikipedia.org/wiki/Haversine_formula a = sin²(Δlat/2) + * cos(lat1).cos(lat2).sin²(Δlong/2) c = 2.atan2(√a, √(1−a)) d = R.c */ @Override public double calcDist(double fromLat, double fromLon, double toLat, double toLon) { double normedDist = c...
3.68
hbase_StoreFileWriter_toCompactionEventTrackerBytes
/** * Used when write {@link HStoreFile#COMPACTION_EVENT_KEY} to new file's file info. The compacted * store files's name is needed. But if the compacted store file is a result of compaction, it's * compacted files which still not archived is needed, too. And don't need to add compacted files * recursively. If file...
3.68
hudi_StreamerUtil_medianInstantTime
/** * Returns the median instant time between the given two instant time. */ public static Option<String> medianInstantTime(String highVal, String lowVal) { try { long high = HoodieActiveTimeline.parseDateFromInstantTime(highVal).getTime(); long low = HoodieActiveTimeline.parseDateFromInstantTime(lowVal).ge...
3.68
zxing_BinaryBitmap_rotateCounterClockwise45
/** * Returns a new object with rotated image data by 45 degrees counterclockwise. * Only callable if {@link #isRotateSupported()} is true. * * @return A rotated version of this object. */ public BinaryBitmap rotateCounterClockwise45() { LuminanceSource newSource = binarizer.getLuminanceSource().rotateCounterClo...
3.68
pulsar_PulsarAdminImpl_bookies
/** * @return the bookies management object */ public Bookies bookies() { return bookies; }
3.68
flink_LogicalType_isAnyOf
/** * Returns whether the root of the type is part of at least one family of the {@code typeFamily} * or not. * * @param typeFamilies The families to check against for equality */ public boolean isAnyOf(LogicalTypeFamily... typeFamilies) { return Arrays.stream(typeFamilies).anyMatch(tf -> this.typeRoot.getFami...
3.68
hadoop_OBSInputStream_close
/** * Close the stream. This triggers publishing of the stream statistics back to * the filesystem statistics. This operation is synchronized, so that only one * thread can attempt to close the connection; all later/blocked calls are * no-ops. * * @throws IOException on any problem */ @Override public synchroniz...
3.68
dubbo_TTable_getWidth
/** * get current width * * @return width */ public int getWidth() { // if not auto resize, return preset width if (!isAutoResize) { return width; } // if it's auto resize, then calculate the possible max width int maxWidth = 0; for (String data : rows) { maxWidth = max(wid...
3.68
flink_TaskStateStats_getCheckpointedSize
/** @return Total persisted size over all subtasks of this checkpoint. */ public long getCheckpointedSize() { return summaryStats.getCheckpointedSize().getSum(); }
3.68
hadoop_FederationRouterRMTokenInputValidator_validate
/** * We will check with the RouterMasterKeyRequest{@link RouterMasterKeyRequest} * to ensure that the request object is not empty and that the RouterMasterKey is not empty. * * @param request RouterMasterKey Request. * @throws FederationStateStoreInvalidInputException if the request is invalid. */ public static ...
3.68
framework_VaadinSession_accessSynchronously
/** * Locks this session and runs the provided Runnable right away. * <p> * It is generally recommended to use {@link #access(Runnable)} instead of * this method for accessing a session from a different thread as * {@link #access(Runnable)} can be used while holding the lock of another * session. To avoid causing...
3.68
hadoop_SubApplicationTableRW_setMetricsTTL
/** * @param metricsTTL time to live parameter for the metricss in this table. * @param hbaseConf configururation in which to set the metrics TTL config * variable. */ public void setMetricsTTL(int metricsTTL, Configuration hbaseConf) { hbaseConf.setInt(METRICS_TTL_CONF_NAME, metricsTTL); }
3.68
framework_GridRowDragger_setDropIndexCalculator
/** * Sets the drop index calculator for the target grid. With this callback * you can have a custom drop location instead of the actual one. * <p> * By default, items are placed on the index they are dropped into in the * target grid. * <p> * If you want to always drop items to the end of the target grid, you c...
3.68
flink_DateTimeUtils_formatDate
/** Helper for CAST({date} AS VARCHAR(n)). */ public static String formatDate(int date) { final StringBuilder buf = new StringBuilder(10); formatDate(buf, date); return buf.toString(); }
3.68
pulsar_BrokerService_createPendingLoadTopic
/** * Create pending topic and on completion it picks the next one until processes all topics in * {@link #pendingTopicLoadingQueue}.<br/> * It also tries to acquire {@link #topicLoadRequestSemaphore} so throttle down newly incoming topics and release * permit if it was successful to acquire it. */ private void cr...
3.68
hbase_BlockingRpcConnection_closeConn
// close socket, reader, and clean up all pending calls. private void closeConn(IOException e) { if (thread == null) { return; } thread.interrupt(); thread = null; closeSocket(); if (callSender != null) { callSender.cleanup(e); } for (Call call : calls.values()) { call.setException(e); } ...
3.68
flink_OuterJoinPaddingUtil_padRight
/** * Returns a padding result with the given right row. * * @param rightRow the right row to pad * @return the reusable null padding result */ public final RowData padRight(RowData rightRow) { return joinedRow.replace(leftNullPaddingRow, rightRow); }
3.68
hadoop_LongBitFormat_combine
/** Combine the value to the record. */ public long combine(long value, long record) { if (value < MIN) { throw new IllegalArgumentException( "Illagal value: " + NAME + " = " + value + " < MIN = " + MIN); } if (value > MAX) { throw new IllegalArgumentException( "Illagal value: " + NAME + "...
3.68
hadoop_SelectBinding_select
/** * Build and execute a select request. * @param readContext the read context, which includes the source path. * @param expression the SQL expression. * @param builderOptions query options * @param objectAttributes object attributes from a HEAD request * @return an FSDataInputStream whose wrapped stream is a Se...
3.68
hbase_HRegion_sawNoSuchFamily
/** * Records that a {@link NoSuchColumnFamilyException} has been observed. */ void sawNoSuchFamily() { wrongFamily = true; }
3.68
hbase_HFileLink_create
/** * Create a new HFileLink * <p> * It also adds a back-reference to the hfile back-reference directory to simplify the * reference-count and the cleaning process. * @param conf {@link Configuration} to read for the archive directory name * @param fs {@link FileSystem} on which to write the H...
3.68
hadoop_SplitCompressionInputStream_getAdjustedEnd
/** * After calling createInputStream, the values of start or end * might change. So this method can be used to get the new value of end. * @return The changed value of end */ public long getAdjustedEnd() { return end; }
3.68
hbase_ThroughputControlUtil_getNameForThrottling
/** * Generate a name for throttling, to prevent name conflict when multiple IO operation running * parallel on the same store. * @param store the Store instance on which IO operation is happening * @param opName Name of the IO operation, e.g. "flush", "compaction", etc. * @return The name for throttling */ publ...
3.68
hbase_SnapshotManager_restoreSnapshot
/** * Restore the specified snapshot. The restore will fail if the destination table has a snapshot * or restore in progress. * @param snapshot Snapshot Descriptor * @param tableDescriptor Table Descriptor * @param nonceKey unique identifier to prevent duplicated RPC * @param restoreAcl true to...
3.68
flink_BlobCacheSizeTracker_update
/** * Update the least used index for the BLOBs so that the tracker can easily find out the least * recently used BLOBs. */ public void update(JobID jobId, BlobKey blobKey) { checkNotNull(jobId); checkNotNull(blobKey); synchronized (lock) { caches.get(Tuple2.of(jobId, blobKey)); } }
3.68
hudi_WriteOperationType_value
/** * Getter for value. * @return string form of WriteOperationType */ public String value() { return value; }
3.68
hadoop_DiskBalancerWorkItem_getErrorCount
/** * Returns the number of errors encountered. * * @return long */ public long getErrorCount() { return errorCount; }
3.68
morf_MySqlDialect_getSqlForDateToYyyymmdd
/** * @see org.alfasoftware.morf.jdbc.SqlDialect#getSqlForDateToYyyymmdd(org.alfasoftware.morf.sql.element.Function) */ @Override protected String getSqlForDateToYyyymmdd(Function function) { return String.format("CAST(DATE_FORMAT(%s, '%%Y%%m%%d') AS DECIMAL(8))",getSqlFrom(function.getArguments().get(0))); }
3.68
hadoop_StagingCommitter_failDestinationExists
/** * Generate a {@link PathExistsException} because the destination exists. * Lists some of the child entries first, to help diagnose the problem. * @param path path which exists * @param description description (usually task/job ID) * @return an exception to throw */ protected PathExistsException failDestinatio...
3.68
framework_ApplicationConnection_unregisterPaintable
/** * @deprecated As of 7.0. No longer serves any purpose. */ @Deprecated public void unregisterPaintable(ServerConnector p) { getLogger().info("unregisterPaintable (unnecessarily) called for " + Util.getConnectorString(p)); }
3.68
hbase_HRegion_checkTargetRegion
/** * Checks whether the given regionName is either equal to our region, or that the regionName is * the primary region to our corresponding range for the secondary replica. */ private void checkTargetRegion(byte[] encodedRegionName, String exceptionMsg, Object payload) throws WrongRegionException { if (Bytes.eq...
3.68
hbase_TableSplit_compareTo
/** * Compares this split against the given one. * @param split The split to compare to. * @return The result of the comparison. * @see java.lang.Comparable#compareTo(java.lang.Object) */ @Override public int compareTo(TableSplit split) { // If The table name of the two splits is the same then compare start row ...
3.68
morf_HumanReadableStatementHelper_paren
/** * Wraps a string in parenthesis if the field is considered {@link #isComplexField}. * * @param string the string to process. * @param field the field to evaluate. * @return the original string, or one wrapped in parenthesis. */ private static String paren(final String string, final AliasedField field) { if ...
3.68
streampipes_ArticleSentencesExtractor_getInstance
/** * Returns the singleton instance for {@link ArticleSentencesExtractor}. */ public static ArticleSentencesExtractor getInstance() { return INSTANCE; }
3.68
hadoop_CommonAuditContext_currentAuditContext
/** * Get the current common audit context. Thread local. * @return the audit context of this thread. */ public static CommonAuditContext currentAuditContext() { return ACTIVE_CONTEXT.get(); }
3.68
hudi_CompactionOperation_convertFromAvroRecordInstance
/** * Convert Avro generated Compaction operation to POJO for Spark RDD operation. * * @param operation Hoodie Compaction Operation * @return */ public static CompactionOperation convertFromAvroRecordInstance(HoodieCompactionOperation operation) { CompactionOperation op = new CompactionOperation(); op.baseIns...
3.68
framework_AbstractConnector_getConnection
/* * (non-Javadoc) * * @see com.vaadin.client.VPaintable#getConnection() */ @Override public final ApplicationConnection getConnection() { return connection; }
3.68
streampipes_Networking_getIpAddressForOsx
/** * this method is a workaround for developers using osx * in OSX InetAddress.getLocalHost().getHostAddress() always returns 127.0.0.1 * as a workaround developers must manually set the SP_HOST environment variable with the actual ip * with this method the IP is set automatically * * @return IP */ private stat...
3.68
hbase_Mutation_getCellBuilder
/** * get a CellBuilder instance that already has relevant Type and Row set. * @param cellBuilderType e.g CellBuilderType.SHALLOW_COPY * @param cellType e.g Cell.Type.Put * @return CellBuilder which already has relevant Type and Row set. */ protected CellBuilder getCellBuilder(CellBuilderType cellBuilderTyp...
3.68
hadoop_HdfsFileStatus_mtime
/** * Set the modification time of this entity (default = 0). * @param mtime Last modified time * @return This Builder instance */ public Builder mtime(long mtime) { this.mtime = mtime; return this; }
3.68
hbase_Reference_toString
/** * @see java.lang.Object#toString() */ @Override public String toString() { return "" + this.region; }
3.68
hadoop_BlockPoolTokenSecretManager_createIdentifier
/** Return an empty BlockTokenIdentifer */ @Override public BlockTokenIdentifier createIdentifier() { return new BlockTokenIdentifier(); }
3.68
hbase_SnapshotOfRegionAssignmentFromMeta_getRegionNameToRegionInfoMap
/** * Get the regioninfo for a region * @return the regioninfo */ public Map<String, RegionInfo> getRegionNameToRegionInfoMap() { return this.regionNameToRegionInfoMap; }
3.68
hibernate-validator_ValidationXmlParser_parseValidationXml
/** * Tries to check whether a <i>validation.xml</i> file exists and parses it. * * @return The parameters parsed out of <i>validation.xml</i> wrapped in an instance of {@code ConfigurationImpl.ValidationBootstrapParameters}. */ public final BootstrapConfiguration parseValidationXml() { InputStream in = getValidat...
3.68
flink_SubpartitionDiskCacheManager_addBuffer
/** This method is only called by the task thread. */ private void addBuffer(Buffer buffer) { synchronized (allBuffers) { allBuffers.add(new Tuple2<>(buffer, bufferIndex)); } bufferIndex++; }
3.68