name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hbase_MasterObserver_preModifyTable | /**
* Called prior to modifying a table's properties. Called as part of modify table RPC call.
* @param ctx the environment to interact with the framework and master
* @param tableName the name of the table
* @param currentDescriptor current TableDescriptor of the table
* @param newDescriptor... | 3.68 |
graphhopper_VectorTile_hasStringValue | /**
* <pre>
* Exactly one of these values must be present in a valid message
* </pre>
*
* <code>optional string string_value = 1;</code>
*/
public boolean hasStringValue() {
return ((bitField0_ & 0x00000001) == 0x00000001);
} | 3.68 |
hadoop_HCFSMountTableConfigLoader_load | /**
* Loads the mount-table configuration from hadoop compatible file system and
* add the configuration items to given configuration. Mount-table
* configuration format should be suffixed with version number.
* Format: {@literal mount-table.<versionNumber>.xml}
* Example: mount-table.1.xml
* When user wants to u... | 3.68 |
hbase_NettyRpcServer_createNettyServerRpcConnection | // will be overridden in tests
@InterfaceAudience.Private
protected NettyServerRpcConnection createNettyServerRpcConnection(Channel channel) {
return new NettyServerRpcConnection(NettyRpcServer.this, channel);
} | 3.68 |
hadoop_SelectBinding_expandBackslashChars | /**
* Perform escaping.
* @param src source string.
* @return the replaced value
*/
static String expandBackslashChars(String src) {
return src.replace("\\n", "\n")
.replace("\\\"", "\"")
.replace("\\t", "\t")
.replace("\\r", "\r")
.replace("\\\"", "\"")
// backslash substitution mus... | 3.68 |
hbase_MultiTableInputFormat_getConf | /**
* Returns the current configuration.
* @return The current configuration.
* @see org.apache.hadoop.conf.Configurable#getConf()
*/
@Override
public Configuration getConf() {
return conf;
} | 3.68 |
pulsar_MessageImpl_create | // Constructor for out-going message
public static <T> MessageImpl<T> create(MessageMetadata msgMetadata, ByteBuffer payload, Schema<T> schema,
String topic) {
@SuppressWarnings("unchecked")
MessageImpl<T> msg = (MessageImpl<T>) RECYCLER.get();
msg.msgMetadata.clear();
msg.msgMetadata.copyFrom(m... | 3.68 |
hbase_MasterObserver_preRenameRSGroup | /**
* Called before rename rsgroup.
* @param ctx the environment to interact with the framework and master
* @param oldName old rsgroup name
* @param newName new rsgroup name
*/
default void preRenameRSGroup(final ObserverContext<MasterCoprocessorEnvironment> ctx,
final String oldName, final String newName) ... | 3.68 |
framework_VaadinPortletService_handleSessionExpired | /*
* (non-Javadoc)
*
* @see
* com.vaadin.server.VaadinService#handleSessionExpired(com.vaadin.server
* .VaadinRequest, com.vaadin.server.VaadinResponse)
*/
@Override
protected void handleSessionExpired(VaadinRequest request,
VaadinResponse response) {
// TODO Figure out a better way to deal with
/... | 3.68 |
flink_FlinkPreparingTableBase_getRowCount | /** Returns an estimate of the number of rows in the table. */
public double getRowCount() {
Double rowCnt = getStatistic().getRowCount();
return rowCnt == null ? DEFAULT_ROWCOUNT : rowCnt;
} | 3.68 |
hbase_HFileWriterImpl_getMidpoint | /**
* Try to return a Cell that falls between <code>left</code> and <code>right</code> but that is
* shorter; i.e. takes up less space. This trick is used building HFile block index. Its an
* optimization. It does not always work. In this case we'll just return the <code>right</code>
* cell.
* @return A cell that ... | 3.68 |
framework_AbstractComponentTest_unselectChildren | /**
* Unselect all child menu items
*
* @param parent
*/
protected void unselectChildren(MenuItem parent) {
List<MenuItem> children = parent.getChildren();
if (children == null) {
return;
}
for (MenuItem child : children) {
setSelected(child, false);
}
} | 3.68 |
hadoop_AbstractS3ACommitter_getCommitOperations | /**
* Get the commit actions instance.
* Subclasses may provide a mock version of this.
* @return the commit actions instance to use for operations.
*/
protected CommitOperations getCommitOperations() {
return commitOperations;
} | 3.68 |
flink_LogicalTypeChecks_getScale | /** Returns the scale of all types that define a scale implicitly or explicitly. */
public static int getScale(LogicalType logicalType) {
return logicalType.accept(SCALE_EXTRACTOR);
} | 3.68 |
flink_JoinOperator_projectTuple6 | /**
* 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, T1, T2, T3, T4, T5>
ProjectJoin<I1, I2, Tuple6<T0, T1, T2, T3, T4, ... | 3.68 |
hbase_RegexStringComparator_areSerializedFieldsEqual | /**
* Returns true if and only if the fields of the comparator that are serialized are equal to the
* corresponding fields in other. Used for testing.
*/
@Override
boolean areSerializedFieldsEqual(ByteArrayComparable other) {
if (other == this) {
return true;
}
if (!(other instanceof RegexStringComparator)... | 3.68 |
hbase_OrderedBytes_putVaruint64 | /**
* Encode an unsigned 64-bit unsigned integer {@code val} into {@code dst}.
* @param dst The destination to which encoded bytes are written.
* @param val The value to write.
* @param comp Compliment the encoded value when {@code comp} is true.
* @return number of bytes written.
*/
static int putVaruint64(Pos... | 3.68 |
framework_ColorUtil_getHexPatternColor | /**
* Parses {@link Color} from matched hexadecimal {@link Matcher}.
*
* @param matcher
* {@link Matcher} matching hexadecimal pattern with named regex
* groups {@code red}, {@code green}, and {@code blue}
* @return {@link Color} parsed from {@link Matcher}
*/
public static Color getHexPatt... | 3.68 |
framework_VAbstractCalendarPanel_onFocus | /*
* (non-Javadoc)
*
* @see
* com.google.gwt.event.dom.client.FocusHandler#onFocus(com.google.gwt.event
* .dom.client.FocusEvent)
*/
@Override
public void onFocus(FocusEvent event) {
if (event.getSource() instanceof VAbstractCalendarPanel) {
hasFocus = true;
// Focuses the current day if the ... | 3.68 |
hadoop_SnappyDecompressor_setDictionary | /**
* Does nothing.
*/
@Override
public void setDictionary(byte[] b, int off, int len) {
// do nothing
} | 3.68 |
flink_TaskStateStats_getLatestAckTimestamp | /**
* @return Ack timestamp of the latest acknowledged subtask or <code>-1</code> if none was
* acknowledged yet..
*/
public long getLatestAckTimestamp() {
SubtaskStateStats subtask = latestAckedSubtaskStats;
if (subtask != null) {
return subtask.getAckTimestamp();
} else {
return -1;... | 3.68 |
framework_NativeSelect_setEmptySelectionAllowed | /**
* Sets whether the user is allowed to select nothing in the combo box. When
* true, a special empty item is shown to the user.
*
* @param emptySelectionAllowed
* true to allow not selecting anything, false to require
* selection
* @since 8.0
*/
public void setEmptySelectionAllowed(bool... | 3.68 |
zxing_ECIStringBuilder_isEmpty | /**
* @return true iff nothing has been appended
*/
public boolean isEmpty() {
return currentBytes.length() == 0 && (result == null || result.length() == 0);
} | 3.68 |
cron-utils_CronDefinitionBuilder_withSupportedNicknameHourly | /**
* Supports cron nickname @hourly
*
* @return this CronDefinitionBuilder instance
*/
public CronDefinitionBuilder withSupportedNicknameHourly() {
cronNicknames.add(CronNicknames.HOURLY);
return this;
} | 3.68 |
morf_AddTable_accept | /**
* @see org.alfasoftware.morf.upgrade.SchemaChange#accept(org.alfasoftware.morf.upgrade.SchemaChangeVisitor)
*/
@Override
public void accept(SchemaChangeVisitor visitor) {
visitor.visit(this);
} | 3.68 |
hbase_ClusterId_parseFrom | /**
* Parse the serialized representation of the {@link ClusterId}
* @param bytes A pb serialized {@link ClusterId} instance with pb magic prefix
* @return An instance of {@link ClusterId} made from <code>bytes</code>
* @see #toByteArray()
*/
public static ClusterId parseFrom(final byte[] bytes) throws Deserializa... | 3.68 |
hadoop_SharedKeyCredentials_canonicalizeHttpRequest | /**
* Constructs a canonicalized string from the request's headers that will be used to construct the signature string
* for signing a Blob or Queue service request under the Shared Key Full authentication scheme.
*
* @param address the request URI
* @param accountName the account name associated with the ... | 3.68 |
hbase_MunkresAssignment_updateMin | /**
* A specified row has become covered, and a specified column has become uncovered. The least
* value per row may need to be updated.
* @param row the index of the row which was just covered
* @param col the index of the column which was just uncovered
*/
private void updateMin(int row, int col) {
// If the r... | 3.68 |
hudi_SimpleBloomFilter_serializeToString | /**
* Serialize the bloom filter as a string.
*/
@Override
public String serializeToString() {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
try {
filter.write(dos);
byte[] bytes = baos.toByteArray();
dos.close();
return Base64CodecU... | 3.68 |
hadoop_BlockBlobInputStream_size | /**
* Gets the current size of the stream.
*/
public synchronized int size() {
return writePosition - offset;
} | 3.68 |
hadoop_AbfsClientThrottlingIntercept_sendingRequest | /**
* Called before the request is sent. Client-side throttling
* uses this to suspend the request, if necessary, to minimize errors and
* maximize throughput.
*/
@Override
public void sendingRequest(AbfsRestOperationType operationType,
AbfsCounters abfsCounters) {
switch (operationType) {
case ReadFile:... | 3.68 |
pulsar_AbstractAwsConnector_defaultCredentialProvider | /**
* It creates a default credential provider which takes accessKey and secretKey form configuration and creates.
* {@link AWSCredentials}
*
* @param awsCredentialPluginParam
* @return
*/
public AwsCredentialProviderPlugin defaultCredentialProvider(String awsCredentialPluginParam) {
Map<String, String> crede... | 3.68 |
flink_TableFactoryUtil_findCatalogModificationListenerList | /** Find and create modification listener list from configuration. */
public static List<CatalogModificationListener> findCatalogModificationListenerList(
final ReadableConfig configuration, final ClassLoader classLoader) {
return configuration.getOptional(TableConfigOptions.TABLE_CATALOG_MODIFICATION_LISTE... | 3.68 |
graphhopper_ResponsePath_getWaypoints | /**
* This method returns the input points snapped to the road network.
*/
public PointList getWaypoints() {
check("getWaypoints");
return waypointList;
} | 3.68 |
hbase_Bytes_putBytes | /**
* Put bytes at the specified byte array position.
* @param tgtBytes the byte array
* @param tgtOffset position in the array
* @param srcBytes array to write out
* @param srcOffset source offset
* @param srcLength source length
* @return incremented offset
*/
public static int putBytes(byte[] tgtBytes, int... | 3.68 |
dubbo_SerializableClassRegistry_getRegisteredClasses | /**
* get registered classes
*
* @return class serializer
* */
public static Map<Class<?>, Object> getRegisteredClasses() {
return REGISTRATIONS;
} | 3.68 |
hadoop_ECChunk_toBytesArray | /**
* Convert to a bytes array, just for test usage.
* @return bytes array
*/
public byte[] toBytesArray() {
byte[] bytesArr = new byte[chunkBuffer.remaining()];
// Avoid affecting the original one
chunkBuffer.mark();
chunkBuffer.get(bytesArr);
chunkBuffer.reset();
return bytesArr;
} | 3.68 |
framework_AdjacentElementsWithTooltips_getTestDescription | /*
* (non-Javadoc)
*
* @see com.vaadin.tests.components.AbstractTestUI#getTestDescription()
*/
@Override
protected String getTestDescription() {
return "Moving between adjacent elements with tooltips should open quickOpenDelay";
} | 3.68 |
hadoop_OBSLoginHelper_checkPath | /**
* Check the path, ignoring authentication details. See {@link
* OBSFileSystem#checkPath(Path)} for the operation of this.
*
* <p>Essentially
*
* <ol>
* <li>The URI is canonicalized.
* <li>If the schemas match, the hosts are compared.
* <li>If there is a mismatch between null/non-null host,
* the default F... | 3.68 |
hudi_OptionsResolver_allowCommitOnEmptyBatch | /**
* Returns whether to commit even when current batch has no data, for flink defaults false
*/
public static boolean allowCommitOnEmptyBatch(Configuration conf) {
return conf.getBoolean(HoodieWriteConfig.ALLOW_EMPTY_COMMIT.key(), false);
} | 3.68 |
querydsl_AbstractJDOQuery_setMaxFetchDepth | /**
* Set the maximum fetch depth when fetching.
* A value of 0 has no meaning and will throw a {@link JDOUserException}.
* A value of -1 means that no limit is placed on fetching.
* A positive integer will result in that number of references from the
* initial object to be fetched.
*
* @param depth fetch depth
... | 3.68 |
hbase_SampleUploader_configureJob | /**
* Job configuration.
*/
public static Job configureJob(Configuration conf, String[] args) throws IOException {
Path inputPath = new Path(args[0]);
String tableName = args[1];
Job job = new Job(conf, NAME + "_" + tableName);
job.setJarByClass(Uploader.class);
FileInputFormat.setInputPaths(job, inputPath)... | 3.68 |
hbase_ServerRpcController_setFailedOn | /**
* Sets an exception to be communicated back to the
* {@link org.apache.hbase.thirdparty.com.google.protobuf.Service} client.
* @param ioe the exception encountered during execution of the service method
*/
public void setFailedOn(IOException ioe) {
serviceException = ioe;
setFailed(StringUtils.stringifyExce... | 3.68 |
framework_VTabsheet_getCurrentlyDisplayedWidget | /**
* Returns the currently displayed widget in the tab panel.
*
* @since 7.2
* @return currently displayed content widget
*/
public Widget getCurrentlyDisplayedWidget() {
return tabPanel.getWidget(tabPanel.getVisibleWidget());
} | 3.68 |
hbase_ZKListener_nodeCreated | /**
* Called when a new node has been created.
* @param path full path of the new node
*/
public void nodeCreated(String path) {
// no-op
} | 3.68 |
pulsar_CliCommand_getOneArgument | /**
*
* @param params
* List of positional arguments
* @param pos
* Positional arguments start with index as 1
* @param maxArguments
* Validate against max arguments
* @return
*/
static String getOneArgument(List<String> params, int pos, int maxArguments) {
if (params.size(... | 3.68 |
hudi_HoodieRowCreateHandle_getWriteToken | // TODO extract to utils
private static String getWriteToken(int taskPartitionId, long taskId, long taskEpochId) {
return taskPartitionId + "-" + taskId + "-" + taskEpochId;
} | 3.68 |
hadoop_MawoConfiguration_getRpcHostName | /**
* Get RPC Host map.
* @return value of rpc.server.hostname
*/
public String getRpcHostName() {
return configsMap.get(RPC_SERVER_HOSTNAME);
} | 3.68 |
mutate-test-kata_Company_everybodyGetsRaiseBy | /**
* Increase every employee's salary by the specified fraction
* @param incrementAsFraction salary increase as a fraction of the original salary. e.g. if the value of the
* parameter is 0.1, everyone at the company gets a 10% raise
*/
public void everybodyGetsRaiseBy(double incrementAsF... | 3.68 |
pulsar_Schema_JSON | /**
* Create a JSON schema type with schema definition.
*
* @param schemaDefinition the definition of the schema
* @return a Schema instance
*/
static <T> Schema<T> JSON(SchemaDefinition schemaDefinition) {
return DefaultImplementation.getDefaultImplementation().newJSONSchema(schemaDefinition);
} | 3.68 |
flink_HadoopDataOutputStream_getHadoopOutputStream | /**
* Gets the wrapped Hadoop output stream.
*
* @return The wrapped Hadoop output stream.
*/
public org.apache.hadoop.fs.FSDataOutputStream getHadoopOutputStream() {
return fdos;
} | 3.68 |
hudi_NonThrownExecutor_execute | /**
* Run the action in a loop.
*/
public void execute(
final ThrowingRunnable<Throwable> action,
final ExceptionHook hook,
final String actionName,
final Object... actionParams) {
executor.execute(wrapAction(action, hook, actionName, actionParams));
} | 3.68 |
pulsar_ManagedLedgerImpl_calculateLastEntryInLedgerList | /**
* @return null if all ledgers is empty.
*/
private PositionImpl calculateLastEntryInLedgerList(List<LedgerInfo> ledgersToDelete) {
for (int i = ledgersToDelete.size() - 1; i >= 0; i--) {
LedgerInfo ledgerInfo = ledgersToDelete.get(i);
if (ledgerInfo != null && ledgerInfo.hasEntries() && ledger... | 3.68 |
hbase_WALSplitter_checkForErrors | /**
* Check for errors in the writer threads. If any is found, rethrow it.
*/
void checkForErrors() throws IOException {
Throwable thrown = this.thrown.get();
if (thrown == null) {
return;
}
if (thrown instanceof IOException) {
throw new IOException(thrown);
} else {
throw new RuntimeException(t... | 3.68 |
hbase_MetricsHBaseServerSourceFactory_createContextName | /**
* From the name of the class that's starting up create the context that an IPC source should
* register itself.
* @param serverName The name of the class that's starting up.
* @return The Camel Cased context name.
*/
protected static String createContextName(String serverName) {
if (serverName.startsWith("HM... | 3.68 |
morf_AbstractSqlDialectTest_testCastToInteger | /**
* Tests the output of a cast to an integer.
*/
@Test
public void testCastToInteger() {
String result = testDialect.getSqlFrom(new Cast(new FieldReference("value"), DataType.INTEGER, 10));
assertEquals(expectedIntegerCast(), result);
} | 3.68 |
flink_HiveTableMetaStoreFactory_listDataFileRecursively | /** List data files recursively. */
private List<FileStatus> listDataFileRecursively(FileSystem fileSystem, Path f)
throws IOException {
List<FileStatus> fileStatusList = new ArrayList<>();
for (FileStatus fileStatus : fileSystem.listStatus(f)) {
if (fileStatus.isDir() && !isStagingDir(fileStatu... | 3.68 |
hbase_TableListModel_getTables | /** Returns the tables */
@XmlElementRef(name = "table")
public List<TableModel> getTables() {
return tables;
} | 3.68 |
hadoop_EagerKeyGeneratorKeyProviderCryptoExtension_rollNewVersion | /**
* Roll a new version of the given key generating the material for it.
* <p>
* Due to the caching on the ValueQueue, even after a rollNewVersion call,
* {@link #generateEncryptedKey(String)} may still return an old key - even
* when we drain the queue here, the async thread may later fill in old keys.
* This i... | 3.68 |
flink_SocketClientSink_open | /**
* Initialize the connection with the Socket in the server.
*
* @param openContext the context.
*/
@Override
public void open(OpenContext openContext) throws Exception {
try {
synchronized (lock) {
createConnection();
}
} catch (IOException e) {
throw new IOException("... | 3.68 |
framework_AbstractSelectionModel_getGrid | /**
* Returns the grid this selection model is attached to using, or throws
* {@link IllegalStateException} if not attached to any selection model.
*
* @return the grid this selection model is attached to
* @throws IllegalStateException
* if this selection mode is not attached to any grid
*/
protecte... | 3.68 |
hbase_MonitoredTaskImpl_getStatusJournal | /**
* Returns the status journal. This implementation of status journal is not thread-safe. Currently
* we use this to track various stages of flushes and compactions where we can use this/pretty
* print for post task analysis, by which time we are already done changing states (writing to
* journal)
*/
@Override
p... | 3.68 |
framework_Notification_addCloseListener | /**
* Adds a CloseListener to the Notification.
*
* @param listener
* the CloseListener to add, not {@code null}
* @since 8.2
*/
public Registration addCloseListener(CloseListener listener) {
return addListener(CloseEvent.class, listener, CLOSE_METHOD);
} | 3.68 |
flink_BinaryStringDataUtil_reverse | /**
* Reverse each character in current string.
*
* @return a new string which character order is reverse to current string.
*/
public static BinaryStringData reverse(BinaryStringData str) {
str.ensureMaterialized();
if (str.inFirstSegment()) {
byte[] result = new byte[str.getSizeInBytes()];
... | 3.68 |
framework_AbstractLegacyComponent_getExplicitImmediateValue | /**
* Returns the explicitly set immediate value.
*
* @return the explicitly set immediate value or null if
* {@link #setImmediate(boolean)} has not been explicitly invoked
*/
protected Boolean getExplicitImmediateValue() {
return explicitImmediateValue;
} | 3.68 |
flink_AsyncSnapshotCallable_logAsyncSnapshotComplete | /**
* This method is invoked after completion of the snapshot and can be overridden to output a
* logging about the duration of the async part.
*/
protected void logAsyncSnapshotComplete(long startTime) {} | 3.68 |
hbase_JVM_getSystemLoadAverage | /**
* Get the system load average
* @see java.lang.management.OperatingSystemMXBean#getSystemLoadAverage
*/
public double getSystemLoadAverage() {
return osMbean.getSystemLoadAverage();
} | 3.68 |
hadoop_StageConfig_getDestinationDir | /**
* Destination of job.
*/
public Path getDestinationDir() {
return destinationDir;
} | 3.68 |
hadoop_LightWeightLinkedSet_pollN | /**
* Remove and return n elements from the hashtable.
* The order in which entries are removed is corresponds
* to the order in which they were inserted.
*
* @return first element
*/
@Override
public List<T> pollN(int n) {
if (n >= size) {
// if we need to remove all elements then do fast polling
retu... | 3.68 |
morf_DataMaskingXmlDataSetConsumer_getValue | /**
* If the provided column should be masked then return null, otherwise return the value.
*/
@Override
protected String getValue(Record record, Column column, String table) {
if (tableColumnsToMask.containsKey(table) && tableColumnsToMask.get(table).contains(column.getName())) {
return null;
}
return supe... | 3.68 |
querydsl_StringExpressions_rpad | /**
* Create a {@code rpad(in, length, c)} expression
*
* <p>Returns in right-padded to length characters with c</p>
*
* @param in string to be padded
* @param length target length
* @param c padding char
* @return rpad(in, length, c)
*/
public static StringExpression rpad(Expression<String> in, int length, ch... | 3.68 |
hudi_BaseJavaCommitActionExecutor_getInsertPartitioner | /**
* Provides a partitioner to perform the insert operation, based on the workload profile.
*/
public Partitioner getInsertPartitioner(WorkloadProfile profile) {
return getUpsertPartitioner(profile);
} | 3.68 |
hbase_MasterObserver_preListRSGroups | /**
* Called before listing region server group information.
* @param ctx the environment to interact with the framework and master
*/
default void preListRSGroups(final ObserverContext<MasterCoprocessorEnvironment> ctx)
throws IOException {
} | 3.68 |
hbase_MultiTableHFileOutputFormat_createCompositeKey | /**
* Alternate api which accepts a String for the tableName and ImmutableBytesWritable for the
* suffix
* @see MultiTableHFileOutputFormat#createCompositeKey(byte[], byte[])
*/
public static byte[] createCompositeKey(String tableName, ImmutableBytesWritable suffix) {
return combineTableNameSuffix(tableName.getBy... | 3.68 |
hbase_FixedLengthWrapper_getLength | /**
* Retrieve the maximum length (in bytes) of encoded values.
*/
public int getLength() {
return length;
} | 3.68 |
hadoop_RouterHeartbeatService_updateStateAsync | /**
* Trigger the update of the Router state asynchronously.
*/
protected void updateStateAsync() {
Thread thread = new Thread(this::updateStateStore, "Router Heartbeat Async");
thread.setDaemon(true);
thread.start();
} | 3.68 |
hbase_HRegion_lockRowsAndBuildMiniBatch | /**
* Creates Mini-batch of all operations [nextIndexToProcess, lastIndexExclusive) for which a row
* lock can be acquired. All mutations with locked rows are considered to be In-progress
* operations and hence the name {@link MiniBatchOperationInProgress}. Mini batch is window over
* {@link BatchOperation} and con... | 3.68 |
hadoop_EncryptionSecrets_hasEncryptionAlgorithm | /**
* Does this instance have encryption options?
* That is: is the algorithm non-null.
* @return true if there's an encryption algorithm.
*/
public boolean hasEncryptionAlgorithm() {
return StringUtils.isNotEmpty(encryptionAlgorithm);
} | 3.68 |
hbase_Hash_parseHashType | /**
* This utility method converts String representation of hash function name to a symbolic
* constant. Currently three function types are supported, "jenkins", "murmur" and "murmur3".
* @param name hash function name
* @return one of the predefined constants
*/
public static int parseHashType(String name) {
if... | 3.68 |
framework_MultiSelectionEvent_getAllSelectedItems | /**
* {@inheritDoc}
* <p>
* This is the same as {@link #getValue()}.
*/
@Override
public Set<T> getAllSelectedItems() {
return getValue();
} | 3.68 |
hadoop_OBSCommonUtils_closeAll | /**
* Close the Closeable objects and <b>ignore</b> any Exception or null
* pointers. (This is the SLF4J equivalent of that in {@code IOUtils}).
*
* @param closeables the objects to close
*/
static void closeAll(final java.io.Closeable... closeables) {
for (java.io.Closeable c : closeables) {
if (c != null) ... | 3.68 |
flink_Execution_processFail | /**
* Process a execution failure. The failure can be fired by JobManager or reported by
* TaskManager. If it is fired by JobManager and the execution is already deployed, it needs to
* send a PRC call to remove the task from TaskManager. It also needs to release the produced
* partitions if it fails before deploye... | 3.68 |
framework_AbsoluteLayoutRelativeSizeContent_createHalfTableOnFull | /**
* Creates an {@link AbsoluteLayout} of full size that contains a half-sized
* {@link Table}.
*
* @return the created layout
*/
private Component createHalfTableOnFull() {
AbsoluteLayout absoluteLayout = new AbsoluteLayout();
absoluteLayout.setSizeFull();
absoluteLayout.setId("halfinfull-layout");
... | 3.68 |
framework_GridLayout_readDesign | /**
* {@inheritDoc}
* <p>
* After reading the design, cursorY is set to point to a row outside of the
* GridLayout area. CursorX is reset to 0.
*/
@Override
public void readDesign(Element design, DesignContext designContext) {
super.readDesign(design, designContext);
setMargin(readMargin(design, getMargin... | 3.68 |
AreaShop_AreaShop_setupTasks | /**
* Register all required tasks.
*/
private void setupTasks() {
// Rent expiration timer
long expirationCheck = Utils.millisToTicks(Utils.getDurationFromSecondsOrString("expiration.delay"));
final AreaShop finalPlugin = this;
if(expirationCheck > 0) {
Do.syncTimer(expirationCheck, () -> {
if(isReady()) {
... | 3.68 |
querydsl_DateExpression_dayOfWeek | /**
* Create a day of week expression (range 1-7 / SUN-SAT)
* <p>NOT supported in JDOQL and not in Derby</p>
*
* @return day of week
*/
public NumberExpression<Integer> dayOfWeek() {
if (dayOfWeek == null) {
dayOfWeek = Expressions.numberOperation(Integer.class, Ops.DateTimeOps.DAY_OF_WEEK, mixin);
... | 3.68 |
rocketmq-connect_LocalStateManagementServiceImpl_start | /**
* Start dependent services (if needed)
*/
@Override
public void start() {
connectorStatusStore.load();
taskStatusStore.load();
dataSynchronizer.start();
startSignal();
} | 3.68 |
framework_VLoadingIndicator_setThirdDelay | /**
* Sets the delay (in ms) which must pass before the loading indicator moves
* to its "third" state.
*
* @param thirdDelay
* The delay (in ms) from the event until changing the loading
* indicator into its "third" state. Counted from when
* {@link #trigger()} is called.
*/
pu... | 3.68 |
pulsar_TxnLogBufferedWriter_close | /**
* Release resources and cancel pending tasks.
*/
public CompletableFuture<Void> close() {
// If batch feature is disabled, there is nothing to close, so set the stat only.
if (!batchEnabled) {
STATE_UPDATER.compareAndSet(this, State.OPEN, State.CLOSED);
return CompletableFuture.completedFu... | 3.68 |
hbase_HFileLink_createHFileLinkName | /**
* Create a new HFileLink name
* @param tableName - Linked HFile table name
* @param regionName - Linked HFile region name
* @param hfileName - Linked HFile name
* @return file name of the HFile Link
*/
public static String createHFileLinkName(final TableName tableName, final String regionName,
final Strin... | 3.68 |
Activiti_Identity_primTransform | /**
* {@inheritDoc}
*/
@Override
protected Object primTransform(Object anObject) throws Exception {
return anObject;
} | 3.68 |
hbase_ExportSnapshot_getSnapshotFiles | /**
* Extract the list of files (HFiles/WALs) to copy using Map-Reduce.
* @return list of files referenced by the snapshot (pair of path and size)
*/
private static List<Pair<SnapshotFileInfo, Long>> getSnapshotFiles(final Configuration conf,
final FileSystem fs, final Path snapshotDir) throws IOException {
Snap... | 3.68 |
hbase_OrderedNumeric_encodeDouble | /**
* Write instance {@code val} into buffer {@code dst}.
* @param dst the {@link PositionedByteRange} to write to
* @param val the value to write to {@code dst}
* @return the number of bytes written
*/
public int encodeDouble(PositionedByteRange dst, double val) {
return OrderedBytes.encodeNumeric(dst, val, ord... | 3.68 |
flink_FileSink_build | /** Creates the actual sink. */
public FileSink<IN> build() {
return new FileSink<>(this);
} | 3.68 |
flink_ConnectionUtils_hasCommonPrefix | /**
* Checks if two addresses have a common prefix (first 2 bytes). Example: 192.168.???.??? Works
* also with ipv6, but accepts probably too many addresses
*/
private static boolean hasCommonPrefix(byte[] address, byte[] address2) {
return address[0] == address2[0] && address[1] == address2[1];
} | 3.68 |
hbase_ReplicationQueueInfo_extractDeadServersFromZNodeString | /**
* Parse dead server names from queue id. servername can contain "-" such as
* "ip-10-46-221-101.ec2.internal", so we need skip some "-" during parsing for the following
* cases: 2-ip-10-46-221-101.ec2.internal,52170,1364333181125-<server name>-...
*/
private static void extractDeadServersFromZNodeString(Stri... | 3.68 |
hbase_RpcServer_getMetrics | /**
* Returns the metrics instance for reporting RPC call statistics
*/
@Override
public MetricsHBaseServer getMetrics() {
return metrics;
} | 3.68 |
flink_ClassDataTypeConverter_extractDataType | /**
* Returns the clearly identifiable data type if possible. For example, {@link Long} can be
* expressed as {@link DataTypes#BIGINT()}. However, for example, {@link Row} cannot be
* extracted as information about the fields is missing. Or {@link BigDecimal} needs to be
* mapped from a variable precision/scale to ... | 3.68 |
framework_VComboBox_resetCurrentSuggestionBasedOnServerResponse | /*
* Updates the current suggestion based on values provided by the
* server.
*/
private void resetCurrentSuggestionBasedOnServerResponse(
String selectedKey, String selectedCaption,
String selectedIconUri) {
if (currentSuggestion == null
&& (selectedKey != null || selectedCaption != ... | 3.68 |
framework_Form_setInternalValue | /**
* Sets the internal value.
*
* This is relevant when the Form is used as Field.
*
* @see AbstractField#setInternalValue(java.lang.Object)
*/
@Override
protected void setInternalValue(Object newValue) {
// Stores the old value
final Object oldValue = propertyValue;
// Sets the current Value
su... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.