name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hadoop_MountTableRefresherService_getClientRemover_rdh | /**
* Create cache entry remove listener.
*/
private RemovalListener<String, RouterClient> getClientRemover() {
return new RemovalListener<String, RouterClient>() {
@Override
public void onRemoval(RemovalNotification<String, RouterClient> notification) {
closeRouterClient(notificat... | 3.26 |
hadoop_PlacementRule_getName_rdh | /**
* Return the name of the rule.
*
* @return The name of the rule, the fully qualified class name.
*/
public String getName() {
return this.getClass().getName();} | 3.26 |
hadoop_PlacementRule_setConfig_rdh | /**
* Set the config based on the passed in argument. This construct is used to
* not pollute this abstract class with implementation specific references.
*
* @param initArg
* initialization arguments.
*/
public void setConfig(Object initArg) {
// Default is a noop
} | 3.26 |
hadoop_IOStatisticsLogging_mapToSortedString_rdh | /**
* Given a map, produce a string with all the values, sorted.
* Needs to create a treemap and insert all the entries.
*
* @param sb
* string buffer to append to
* @param type
* type (for output)
* @param map
* map to evaluate
* @param <E>
* type of values of the map
*/
private static <E> void map... | 3.26 |
hadoop_IOStatisticsLogging_m1_rdh | /**
* On demand stringifier of an IOStatisticsSource instance.
* <p>
* Whenever this object's toString() method is called, it evaluates the
* statistics.
* <p>
* This is designed to affordable to use in log statements.
*
* @param source
* source of statistics -may be null.
* @return an object whose toString... | 3.26 |
hadoop_IOStatisticsLogging_toString_rdh | /**
* Evaluate and stringify the statistics.
*
* @return a string value.
*/
@Override
public String toString() {
return f0 != null ? ioStatisticsToString(f0) : IOStatisticsBinding.NULL_SOURCE;
} | 3.26 |
hadoop_IOStatisticsLogging_logIOStatisticsAtLevel_rdh | /**
* A method to log IOStatistics from a source at different levels.
*
* @param log
* Logger for logging.
* @param level
* LOG level.
* @param source
* Source to LOG.
*/
public static void logIOStatisticsAtLevel(Logger log, String level, Object source) {
IOStatistics stats = retrieveIOStatistics(source)... | 3.26 |
hadoop_IOStatisticsLogging_mapToString_rdh | /**
* Given a map, add its entryset to the string.
* The entries are only sorted if the source entryset
* iterator is sorted, such as from a TreeMap.
*
* @param sb
* string buffer to append to
* @param type
* type (for output)
* @param map
* map to evaluate
* @param separator
* separator
* @param <... | 3.26 |
hadoop_IOStatisticsLogging_ioStatisticsToPrettyString_rdh | /**
* Convert IOStatistics to a string form, with all the metrics sorted
* and empty value stripped.
* This is more expensive than the simple conversion, so should only
* be used for logging/output where it's known/highly likely that the
* caller wants to see the val... | 3.26 |
hadoop_IOStatisticsLogging_demandStringifyIOStatistics_rdh | /**
* On demand stringifier of an IOStatistics instance.
* <p>
* Whenever this object's toString() method is called, it evaluates the
* statistics.
* <p>
* This is for use in log statements where for the cost of creation
* of this entry is low; it is affordable to use in log statements.
*
* @param statistics
... | 3.26 |
hadoop_IOStatisticsLogging_ioStatisticsSourceToString_rdh | /**
* Extract the statistics from a source object -or ""
* if it is not an instance of {@link IOStatistics},
* {@link IOStatisticsSource} or the retrieved
* statistics are null.
* <p>
* Exceptions are caught and downgraded to debu... | 3.26 |
hadoop_IOStatisticsLogging_logIOStatisticsAtDebug_rdh | /**
* Extract any statistics from the source and log to
* this class's log at debug, if
* the log is set to log at debug.
* No-op if logging is not at debug or the source is null/of
* the wrong type/doesn't provide statistics.
*
* @param message
* message for log -this must contain "{}" for the
* statistic... | 3.26 |
hadoop_AccessTokenProvider_getConf_rdh | /**
* Return the conf.
*
* @return the conf.
*/
@Override
public Configuration getConf() {return conf;
} | 3.26 |
hadoop_AccessTokenProvider_setConf_rdh | /**
* Set the conf.
*
* @param configuration
* New configuration.
*/
@Override
public void setConf(Configuration configuration) {
this.conf = configuration;
} | 3.26 |
hadoop_PageBlobFormatHelpers_toShort_rdh | /**
* Retrieves a short from the given two bytes.
*/
public static short toShort(byte firstByte, byte secondByte) {
return ByteBuffer.wrap(new byte[]{ firstByte, secondByte }).getShort();
} | 3.26 |
hadoop_PageBlobFormatHelpers_fromShort_rdh | /**
* Stores the given short as a two-byte array.
*/
public static byte[] fromShort(short s) {
return ByteBuffer.allocate(2).putShort(s).array();
} | 3.26 |
hadoop_SetupJobStage_m0_rdh | /**
* Execute the job setup stage.
*
* @param deleteMarker:
* should any success marker be deleted.
* @return the job attempted directory.
* @throws IOException
* failure.
*/
@Override
protected Path m0(final Boolean
deleteMarker) throws IOException {
final Path path = getJobAttemptDir();LOG.info("{}: C... | 3.26 |
hadoop_PathOutputCommitter_hasOutputPath_rdh | /**
* Predicate: is there an output path?
*
* @return true if we have an output path set, else false.
*/
public boolean hasOutputPath() {
return getOutputPath() != null;
} | 3.26 |
hadoop_GetRouterRegistrationResponse_newInstance_rdh | /**
* API response for retrieving a single router registration present in the state
* store.
*/
| 3.26 |
hadoop_OracleDataDrivenDBInputFormat_getSplitter_rdh | /**
*
* @return the DBSplitter implementation to use to divide the table/query into InputSplits.
*/
@Override
protected DBSplitter getSplitter(int sqlDataType) {
switch (sqlDataType) {
case Types.DATE :
case Types.TIME :
case Types.TIMESTAMP :
return new OracleDateSplitter();... | 3.26 |
hadoop_FSSchedulerConfigurationStore_logMutation_rdh | /**
* Update and persist latest configuration in temp file.
*
* @param logMutation
* configuration change to be persisted in write ahead log
* @throws IOException
* throw IOE when write temp configuration file fail
*/
@Override
public void logMutation(LogMutation logMutation) throws IOException {
LOG.inf... | 3.26 |
hadoop_FSSchedulerConfigurationStore_confirmMutation_rdh | /**
*
* @param pendingMutation
* the log mutation to apply
* @param isValid
* if true, finalize temp configuration file
* if false, remove temp configuration file and rollback
* @throws Exception
* throw IOE when write temp configuration file fail
*/
@Overrid... | 3.26 |
hadoop_WordMean_readAndCalcMean_rdh | /**
* Reads the output file and parses the summation of lengths, and the word
* count, to perform a quick calculation of the mean.
*
* @param path
* The path to find the output file in. Set in main to the output
* directory.
* @throws IOException
* If it cannot access the output directory, we throw an exc... | 3.26 |
hadoop_WordMean_map_rdh | /**
* Emits 2 key-value pairs for counting the word and its length. Outputs are
* (Text, LongWritable).
*
* @param value
* This will be a line of text coming in from our input file.
*/
public void map(Object key, Text value, Context context) throws IOException, InterruptedException {
StringTokenizer itr = n... | 3.26 |
hadoop_WordMean_reduce_rdh | /**
* Sums all the individual values within the iterator and writes them to the
* same key.
*
* @param key
* This will be one of 2 constants: LENGTH_STR or COUNT_STR.
* @param values
* This will be an iterator of all the values associated with that
* key.
*/
public void reduce(Text key, Iterable<LongWrit... | 3.26 |
hadoop_YarnVersionInfo_getUser_rdh | /**
* The user that compiled Yarn.
*
* @return the username of the user
*/
public static String getUser() {return YARN_VERSION_INFO._getUser();
} | 3.26 |
hadoop_YarnVersionInfo_getUrl_rdh | /**
* Get the subversion URL for the root YARN directory.
*
* @return URL for the root YARN directory.
*/
public static String getUrl() {
return YARN_VERSION_INFO._getUrl();
} | 3.26 |
hadoop_YarnVersionInfo_getSrcChecksum_rdh | /**
* Get the checksum of the source files from which YARN was
* built.
*
* @return srcChecksum.
*/
public static String getSrcChecksum() {
return YARN_VERSION_INFO._getSrcChecksum();
} | 3.26 |
hadoop_YarnVersionInfo_getVersion_rdh | /**
* Get the YARN version.
*
* @return the YARN version string, eg. "0.6.3-dev"
*/
public static String getVersion() {
return YARN_VERSION_INFO._getVersion();
} | 3.26 |
hadoop_YarnVersionInfo_getRevision_rdh | /**
* Get the subversion revision number for the root directory
*
* @return the revision number, eg. "451451"
*/
public static String getRevision() {
return YARN_VERSION_INFO._getRevision();
} | 3.26 |
hadoop_YarnVersionInfo_getBuildVersion_rdh | /**
* Returns the buildVersion which includes version,
* revision, user and date.
*
* @return buildVersion.
*/
public static String getBuildVersion() {
return YARN_VERSION_INFO._getBuildVersion();
} | 3.26 |
hadoop_YarnVersionInfo_getDate_rdh | /**
* The date that YARN was compiled.
*
* @return the compilation date in unix date format
*/
public static String getDate() {
return
YARN_VERSION_INFO._getDate();
} | 3.26 |
hadoop_UnitsConversionUtil_convert_rdh | /**
* Converts a value from one unit to another. Supported units can be obtained
* by inspecting the KNOWN_UNITS set.
*
* @param fromUnit
* the unit of the from value
* @param toUnit
* the target unit
* @param fromValue
* the value you wish to convert
* @return the value in toUnit
*/
public static lon... | 3.26 |
hadoop_CombinedFileRange_merge_rdh | /**
* Merge this input range into the current one, if it is compatible.
* It is assumed that otherOffset is greater or equal the current offset,
* which typically happens by sorting the input ranges on offset.
*
* @param otherOffset
* the offset to consider merging
* @param otherEnd
* the end to consider me... | 3.26 |
hadoop_CombinedFileRange_getUnderlying_rdh | /**
* Get the list of ranges that were merged together to form this one.
*
* @return the list of input ranges
*/
public List<FileRange> getUnderlying() {
return
underlying;
} | 3.26 |
hadoop_FederationApplicationHomeSubClusterStoreInputValidator_validate_rdh | /**
* Quick validation on the input to check some obvious fail conditions (fail
* fast). Check if the provided {@link DeleteApplicationHomeSubClusterRequest}
* for deleting an application is valid or not.
*
* @param request
* the {@link DeleteApplicationHomeSubClusterRequest} to
* validate against
* @throws... | 3.26 |
hadoop_FederationApplicationHomeSubClusterStoreInputValidator_checkApplicationHomeSubCluster_rdh | /**
* Validate if the ApplicationHomeSubCluster info are present or not.
*
* @param applicationHomeSubCluster
* the information of the application to be
* verified
* @throws FederationStateStoreInvalidInputException
* if the SubCluster Info
... | 3.26 |
hadoop_MDCFilter_init_rdh | /**
* Initializes the filter.
* <p>
* This implementation is a NOP.
*
* @param config
* filter configuration.
* @throws ServletException
* thrown if the filter could not be initialized.
*/
@Override
public void init(FilterConfig config) throws ServletException {
} | 3.26 |
hadoop_MDCFilter_doFilter_rdh | /**
* Sets the slf4j <code>MDC</code> and delegates the request to the chain.
*
* @param request
* servlet request.
* @param response
* servlet response.
* @param chain
* filter chain.
* @throws IOException
* thrown if an IO error occurs.
* @throws Serv... | 3.26 |
hadoop_DeregisterSubClusters_newInstance_rdh | /**
* Initialize DeregisterSubClusters.
*
* @param subClusterId
* subCluster Id.
* @param deregisterState
* deregister state,
* SUCCESS means deregister is successful, Failed means deregister was unsuccessful.
* @param lastHeartBeatTime
* last heartbeat time.
* @param info
* offline information.
*... | 3.26 |
hadoop_CompositeService_addIfService_rdh | /**
* If the passed object is an instance of {@link Service},
* add it to the list of services managed by this {@link CompositeService}
*
* @param object
* object.
* @return true if a service is added, false otherwise.
*/
protected boolean addIfService(Object object) {
if (object instanceof
Service) {... | 3.26 |
hadoop_CompositeService_addService_rdh | /**
* Add the passed {@link Service} to the list of services managed by this
* {@link CompositeService}
*
* @param service
* the {@link Service} to be added
*/
protected void addService(Service service) {
if (f0.isDebugEnabled()) {
f0.debug("Adding service " + service.getName());
}
synchron... | 3.26 |
hadoop_EncryptionSecretOperations_getSSECustomerKey_rdh | /**
* *
* Gets the SSE-C client side key if present.
*
* @param secrets
* source of the encryption secrets.
* @return an optional key to attach to a request.
*/
public static Optional<String> getSSECustomerKey(final EncryptionSecrets secrets) {
if (secrets.hasEncryptionKey() && (secrets.getEncryptionMeth... | 3.26 |
hadoop_EncryptionSecretOperations_getSSEAwsKMSKey_rdh | /**
* Gets the SSE-KMS key if present, else let S3 use AWS managed key.
*
* @param secrets
* source of the encryption secrets.
* @return an optional key to attach to a request.
*/
public static Optional<String> getSSEAwsKMSKey(final EncryptionSecrets secrets) {
if (((secrets.getEncryptionMethod() == S3AEncr... | 3.26 |
hadoop_DFSRouter_main_rdh | /**
* Main run loop for the router.
*
* @param argv
* parameters.
*/
public static void main(String[] argv) {
if (DFSUtil.parseHelpArgument(argv, USAGE, System.out, true)) {
System.exit(0);
}
try {
StringUtils.startupShutdownMessage(Router.class, argv, LOG);
Router router = ... | 3.26 |
hadoop_AbstractTask_getTimeout_rdh | /**
* Get Timeout for a Task.
*
* @return timeout in seconds
*/@Override
public final long getTimeout() {
return this.timeout;
} | 3.26 |
hadoop_AbstractTask_setTimeout_rdh | /**
* Set Task Timeout in seconds.
*
* @param taskTimeout
* : Timeout in seconds
*/
@Override
public final void setTimeout(final long taskTimeout) {
this.timeout = taskTimeout;
} | 3.26 |
hadoop_AbstractTask_getEnvironment_rdh | /**
* Get environment for a Task.
*
* @return environment of a Task
*/@Override
public final Map<String, String> getEnvironment() {
return environment;
} | 3.26 |
hadoop_AbstractTask_setTaskType_rdh | /**
* Set TaskType for a Task.
*
* @param type
* Simple or Composite Task
*/
public final void setTaskType(final TaskType type) {
this.taskType = type;
} | 3.26 |
hadoop_AbstractTask_toString_rdh | /**
* ToString.
*
* @return String representation of Task
*/
@Override
public final String toString() {
return ((((("TaskId: " + this.taskID.toString()) + ", TaskType: ") + this.taskType) + ", cmd: '") + taskCmd) + "'";
} | 3.26 |
hadoop_AbstractTask_readFields_rdh | /**
* Read Fields from file.
*
* @param in
* : datainput object.
* @throws IOException
* : Throws IOException in case of error.
*/
@Override
public final void readFields(final DataInput in) throws IOException {
this.taskID = new TaskId();
taskID.readFields(in);
IntWritable envSize = new IntWritab... | 3.26 |
hadoop_AbstractTask_write_rdh | /**
* Write Task.
*
* @param out
* : dataoutout object.
* @throws IOException
* : Throws IO exception if any error occurs.
*/
@Override
public final void write(final DataOutput out) throws IOException {
taskID.write(out);
int environmentSize = 0;
if (environment ==
null) {
environment... | 3.26 |
hadoop_AbstractTask_getTaskCmd_rdh | /**
* Get TaskCmd for a Task.
*
* @return TaskCMD: Its a task command line such as sleep 10
*/
@Override
public final String getTaskCmd() {
return taskCmd;
} | 3.26 |
hadoop_AbstractTask_setEnvironment_rdh | /**
* Set environment for a Task.
*
* @param localenvironment
* : Map of environment vars
*/
@Override
public final void setEnvironment(final Map<String, String>
localenvironment) {this.environment = localenvironment;
} | 3.26 |
hadoop_AbstractTask_getTaskType_rdh | /**
* Get TaskType for a Task.
*
* @return TaskType: Type of Task
*/
@Override
public final TaskType getTaskType() {
return taskType;
} | 3.26 |
hadoop_S3ListRequest_v2_rdh | /**
* Restricted constructors to ensure v1 or v2, not both.
*
* @param request
* v2 request
* @return new list request container
*/
public static S3ListRequest v2(ListObjectsV2Request request) {
return new S3ListRequest(null, request);
} | 3.26 |
hadoop_S3ListRequest_isV1_rdh | /**
* Is this a v1 API request or v2?
*
* @return true if v1, false if v2
*/
public boolean isV1() {
return v1Request != null;
} | 3.26 |
hadoop_S3ListRequest_v1_rdh | /**
* Restricted constructors to ensure v1 or v2, not both.
*
* @param request
* v1 request
* @return new list request container
*/
public static S3ListRequest v1(ListObjectsRequest request) {
return new S3ListRequest(request, null);
} | 3.26 |
hadoop_ServiceLauncher_getServiceName_rdh | /**
* Get the service name via {@link Service#getName()}.
*
* If the service is not instantiated, the classname is returned instead.
*
* @return the service name
*/
public String getServiceName()
{
Service s = service;
String name =
null;
if (s != null) {
try {
name = s.getName();
} catch (Exception ignored) {
/... | 3.26 |
hadoop_ServiceLauncher_launchServiceAndExit_rdh | /**
* Launch the service and exit.
*
* <ol>
* <li>Parse the command line.</li>
* <li>Build the service configuration from it.</li>
* <li>Start the service.</li>
* <li>If it is a {@link LaunchableService}: execute it</li>
* <li>Otherwise: wait for it to finish.</li>
* <li>Exit passing the status code to the {@l... | 3.26 |
hadoop_ServiceLauncher_launchService_rdh | /**
* Launch a service catching all exceptions and downgrading them to exit codes
* after logging.
*
* Sets {@link #serviceException} to this value.
*
* @param conf
* configuration to use
* @param instance
* optional instance of the service.
* @param processedArgs
* command line after the launcher-spec... | 3.26 |
hadoop_ServiceLauncher_warn_rdh | /**
* Print a warning message.
* <p>
* This tries to log to the log's warn() operation.
* If the log at that level is disabled it logs to system error
*
* @param text
* warning text
*/
protected void warn(String text) {
if (LOG.isWarnEnabled())
{
LOG.warn(text);
} else {
System.err.println(text);
}
} | 3.26 |
hadoop_ServiceLauncher_coreServiceLaunch_rdh | /**
* Launch the service.
*
* All exceptions that occur are propagated upwards.
*
* If the method returns a status code, it means that it got as far starting
* the service, and if it implements {@link LaunchableService}, that the
* method {@link LaunchableService#execute()} has completed.
*
* After this method... | 3.26 |
hadoop_ServiceLauncher_extractCommandOptions_rdh | /**
* Extract the command options and apply them to the configuration,
* building an array of processed arguments to hand down to the service.
*
* @param conf
* configuration to update.
* @param args
* main arguments. {@code args[0]}is assumed to be
* the service classname and is skipped.
* @return the r... | 3.26 |
hadoop_ServiceLauncher_exitWithMessage_rdh | /**
* Exit with a printed message.
*
* @param status
* status code
* @param message
* message message to print before exiting
* @throws ExitUtil.ExitException
* if exceptions are disabled
*/
protected static void exitWithMessage(int status, String message) {
ExitUtil.terminate(new ServiceLaunchException... | 3.26 |
hadoop_ServiceLauncher_parseCommandArgs_rdh | /**
* Parse the command arguments, extracting the service class as the last
* element of the list (after extracting all the rest).
*
* The field {@link #commandOptions} field must already have been set.
*
* @param conf
* configuration to use
* @param args
* command line argument list
* @return the remaini... | 3.26 |
hadoop_ServiceLauncher_createOptions_rdh | /**
* Override point: create an options instance to combine with the
* standard options set.
* <i>Important. Synchronize uses of {@link Option}</i>
* with {@code Option.class}
*
* @return the new options
*/@SuppressWarnings("static-access")
protected Options createOptions() {
synchronized(Option.class) {
Optio... | 3.26 |
hadoop_ServiceLauncher_isClassnameDefined_rdh | /**
* Probe for service classname being defined.
*
* @return true if the classname is set
*/
private boolean isClassnameDefined() {return (serviceClassName != null) && (!serviceClassName.isEmpty());
} | 3.26 |
hadoop_ServiceLauncher_m0_rdh | /**
* Verify that all the specified filenames exist.
*
* @param filenames
* a list of files
* @throws ServiceLaunchException
* if a file is not found
*/
protected void m0(String[] filenames) {
if (filenames == null) {
return;
}
for (String filename : filenames) {
File file = new File(filename);LOG.debug("... | 3.26 |
hadoop_ServiceLauncher_getUsageMessage_rdh | /**
* Get the usage message, ideally dynamically.
*
* @return the usage message
*/
protected String getUsageMessage() {
String message = USAGE_MESSAGE;
if (commandOptions != null) {
message = (((USAGE_NAME + " ") + commandOptions.toString()) + " ") + USAGE_SERVICE_ARGUMENTS;
}
return message;
} | 3.26 |
hadoop_ServiceLauncher_getServiceExitCode_rdh | /**
* The exit code from a successful service execution.
*
* @return the exit code.
*/
public final int getServiceExitCode() {
return serviceExitCode;
}
/**
* Get the exit exception used to end this service.
*
* @return an exception, which will be null until the service
has exited (and {@code System.exit} | 3.26 |
hadoop_ServiceLauncher_main_rdh | /**
* This is the JVM entry point for the service launcher.
*
* Converts the arguments to a list, then invokes {@link #serviceMain(List)}
*
* @param args
* command line arguments.
*/
public static void main(String[] args) {
serviceMain(Arrays.asList(args));
} | 3.26 |
hadoop_ServiceLauncher_startupShutdownMessage_rdh | /**
*
* @return Build a log message for starting up and shutting down.
* @param classname
* the class of the server
* @param args
* arguments
*/
protected static String startupShutdownMessage(String classname, List<String> args) {
final String hostname = NetUtils.getHostname();
return StringUtils.create... | 3.26 |
hadoop_ServiceLauncher_error_rdh | /**
* Report an error.
* <p>
* This tries to log to {@code LOG.error()}.
* <p>
* If that log level is disabled disabled the message
* is logged to system error along with {@code thrown.toString()}
*
* @param message
* message for the user
* @param thrown
* the exception thrown
*/
protected void error(St... | 3.26 |
hadoop_ServiceLauncher_convertToExitException_rdh | /**
* Convert an exception to an {@code ExitException}.
*
* This process may just be a simple pass through, otherwise a new
* exception is created with an exit code, the text of the supplied
* exception, and the supplied exception as an inner cause.
*
* <ol>
* <li>If is already the right type, pass it through... | 3.26 |
hadoop_ServiceLauncher_setService_rdh | /**
* Setter is to give subclasses the ability to manipulate the service.
*
* @param s
* the new service
*/
protected void setService(S s) {
this.service = s;
} | 3.26 |
hadoop_ServiceLauncher_getConfiguration_rdh | /**
* Get the configuration constructed from the command line arguments.
*
* @return the configuration used to create the service
*/
public final Configuration getConfiguration() {
return configuration;
} | 3.26 |
hadoop_ServiceLauncher_noteException_rdh | /**
* Record that an Exit Exception has been raised.
* Save it to {@link #serviceException}, with its exit code in
* {@link #serviceExitCode}
*
* @param exitException
* exception
*/
void noteException(ExitUtil.ExitException exitException) {
int exitCode = exitException.getExitCode();
if (exitCode != 0) {
LOG.d... | 3.26 |
hadoop_ServiceLauncher_createGenericOptionsParser_rdh | /**
* Override point: create a generic options parser or subclass thereof.
*
* @param conf
* Hadoop configuration
* @param argArray
* array of arguments
* @return a generic options parser to parse the arguments
* @throws IOException
* on any failure
*/
protected GenericOptionsParser createGenericOptions... | 3.26 |
hadoop_ServiceLauncher_registerFailureHandling_rdh | /**
* Override point: register this class as the handler for the control-C
* and SIGINT interrupts.
*
* Subclasses can extend this with extra operations, such as
* an exception handler:
* <pre>
* Thread.setDefaultUncaughtExceptionHandler(
* new YarnUncaughtExceptionHandler());
* </pre>
*/
protected void ... | 3.26 |
hadoop_ServiceLauncher_createConfiguration_rdh | /**
* Override point: create the base configuration for the service.
*
* Subclasses can override to create HDFS/YARN configurations etc.
*
* @return the configuration to use as the service initializer.
*/
protected Configuration createConfiguration() {
return new Configuration();
} | 3.26 |
hadoop_ServiceLauncher_getService_rdh | /**
* Get the service.
*
* Null until
* {@link #coreServiceLaunch(Configuration, Service, List, boolean, boolean)}
* has completed.
*
* @return the service
*/
public final S getService() {
return service;
} | 3.26 |
hadoop_ServiceLauncher_serviceMain_rdh | /* ====================================================================== */
public static void serviceMain(List<String>
argsList) {
if (argsList.isEmpty()) {
// no arguments: usage message
exitWithUsageMessage();
} else {
ServiceLauncher<Service> serviceLauncher = new ServiceLauncher<>(argsList.get(0));
serviceLaunche... | 3.26 |
hadoop_ServiceLauncher_exit_rdh | /**
* Exit the JVM using an exception for the exit code and message,
* invoking {@link ExitUtil#terminate(ExitUtil.ExitException)}.
*
* This is the standard way a launched service exits.
* An error code of 0 means success -nothing is printed.
*
* If {@link ExitUtil#disableSystemExit()} has been called, this
* m... | 3.26 |
hadoop_ServiceLauncher_bindCommandOptions_rdh | /**
* Set the {@link #commandOptions} field to the result of
* {@link #createOptions()}; protected for subclasses and test access.
*/
protected void bindCommandOptions() {
commandOptions = createOptions();
} | 3.26 |
hadoop_ServiceLauncher_getClassLoader_rdh | /**
* Override point: get the classloader to use.
*
* @return the classloader for loading a service class.
*/
protected ClassLoader getClassLoader() {
return this.getClass().getClassLoader();
} | 3.26 |
hadoop_XMLUtils_bestEffortSetAttribute_rdh | /**
* Set an attribute value on a {@link TransformerFactory}. If the TransformerFactory
* does not support the attribute, the method just returns <code>false</code> and
* logs the issue at debug level.
*
* @param transformerFactory
* to update
* @param flag
* that indicates whether to do the update and the ... | 3.26 |
hadoop_XMLUtils_transform_rdh | /**
* Transform input xml given a stylesheet.
*
* @param styleSheet
* the style-sheet
* @param xml
* input xml data
* @param out
* output
* @throws TransformerConfigurationException
* synopsis signals a problem
* creating a transformer object.
* @throws TransformerException
* this is used for t... | 3.26 |
hadoop_XMLUtils_setOptionalSecureTransformerAttributes_rdh | /**
* These attributes are recommended for maximum security but some JAXP transformers do
* not support them. If at any stage, we fail to set these attributes, then we won't try again
* for subsequent transformers.
*
* @param transformerFactory
* to update
*/
private static void setOptionalSecureTransformerAtt... | 3.26 |
hadoop_XMLUtils_newSecureSAXParserFactory_rdh | /**
* This method should be used if you need a {@link SAXParserFactory}. Use this method
* instead of {@link SAXParserFactory#newInstance()}. The factory that is returned has
* secure configuration enabled.
*
* @return a {@link SAXParserFactory} with secure configuration enabled
* @throws ParserConfigurationExcep... | 3.26 |
hadoop_XMLUtils_newSecureDocumentBuilderFactory_rdh | /**
* This method should be used if you need a {@link DocumentBuilderFactory}. Use this method
* instead of {@link DocumentBuilderFactory#newInstance()}. The factory that is returned has
* secure configuration enabled.
*
* @return a {@link DocumentBuilderFactory} with secure configuration enabled
* @throws Parser... | 3.26 |
hadoop_XMLUtils_newSecureTransformerFactory_rdh | /**
* This method should be used if you need a {@link TransformerFactory}. Use this method
* instead of {@link TransformerFactory#newInstance()}. The factory that is returned has
* secure configuration enabled.
*
* @return a {@link TransformerFactory} with secure configuration enabled
* @throws TransformerConfigu... | 3.26 |
hadoop_XMLUtils_newSecureSAXTransformerFactory_rdh | /**
* This method should be used if you need a {@link SAXTransformerFactory}. Use this method
* instead of {@link SAXTransformerFactory#newInstance()}. The factory that is returned has
* secure configuration enabled.
*
* @return a {@link SAXTransformerFactory} with secure configuration enab... | 3.26 |
hadoop_NameValuePair_getName_rdh | /**
* Get the name.
*
* @return The name.
*/
public String getName() {
return
name;
} | 3.26 |
hadoop_NameValuePair_getValue_rdh | /**
* Get the value.
*
* @return The value.
*/public Object getValue() {
return value;
} | 3.26 |
hadoop_ClientMethod_getTypes_rdh | /**
* Get the calling types for this method.
*
* @return An array of calling types.
*/
public Class<?>[] getTypes() {
return Arrays.copyOf(this.types, this.types.length);
} | 3.26 |
hadoop_IFileWrappedMapOutput_getMerger_rdh | /**
*
* @return the merger
*/
protected MergeManagerImpl<K, V> getMerger() {
return merger;
} | 3.26 |
hadoop_ActiveOperationContext_newOperationId_rdh | /**
* Create an operation ID. The nature of it should be opaque.
*
* @return an ID for the constructor.
*/
protected static long newOperationId() {
return NEXT_OPERATION_ID.incrementAndGet();
} | 3.26 |
hadoop_AuditingFunctions_callableWithinAuditSpan_rdh | /**
* Given a callable, return a new callable which
* activates and deactivates the span around the inner invocation.
*
* @param auditSpan
* audit span
* @param operation
* operation
* @param <T>
* type of result
* @return a new invocation.
*/
public static <T> Callable<T> callableWithinAuditSpan(@Null... | 3.26 |
hadoop_AuditingFunctions_m0_rdh | /**
* Given an invocation, return a new invocation which
* activates and deactivates the span around the inner invocation.
*
* @param auditSpan
* audit span
* @param operation
* operation
* @return a new invocation.
*/
public static InvocationRaisingIOE m0(@Nullable
AuditSpan auditSpan, InvocationRaisingI... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.