name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hadoop_HAServiceTarget_getZKFCProxy_rdh | /**
*
* @return a proxy to the ZKFC which is associated with this HA service.
* @param conf
* configuration.
* @param timeoutMs
* timeout in milliseconds.
* @throws IOException
* raised on errors performing I/O.
*/
public ZKFCProtocol getZKFCProxy(Configuration conf, int timeoutMs)
throws IOException {
... | 3.26 |
hadoop_HAServiceTarget_addFencingParameters_rdh | /**
* Hook to allow subclasses to add any parameters they would like to
* expose to fencing implementations/scripts. Fencing methods are free
* to use this map as they see fit -- notably, the shell script
* implementation takes each entry, prepends 'target_', substitutes
* '_' for '.', and adds it to the environme... | 3.26 |
hadoop_SimpleTcpClientHandler_channelRead_rdh | /**
* Shutdown connection by default. Subclass can override this method to do
* more interaction with the server.
*/
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) {
ctx.channel().close();
} | 3.26 |
hadoop_TimelineDomain_getCreatedTime_rdh | /**
* Get the created time of the domain
*
* @return the created time of the domain
*/
@XmlElement(name = "createdtime")
public Long getCreatedTime() {
return createdTime;
} | 3.26 |
hadoop_TimelineDomain_getReaders_rdh | /**
* Get the reader (and/or reader group) list string
*
* @return the reader (and/or reader group) list string
*/
@XmlElement(name = "readers")
public String getReaders() {
return readers;
} | 3.26 |
hadoop_TimelineDomain_setModifiedTime_rdh | /**
* Set the modified time of the domain
*
* @param modifiedTime
* the modified time of the domain
*/
public void setModifiedTime(Long modifiedTime) {
this.modifiedTime = modifiedTime;
} | 3.26 |
hadoop_TimelineDomain_getOwner_rdh | /**
* Get the domain owner
*
* @return the domain owner
*/
@XmlElement(name = "owner")
public String getOwner() {
return owner;
} | 3.26 |
hadoop_TimelineDomain_setReaders_rdh | /**
* Set the reader (and/or reader group) list string
*
* @param readers
* the reader (and/or reader group) list string
*/
public void setReaders(String readers) {
this.readers = readers;
} | 3.26 |
hadoop_TimelineDomain_setDescription_rdh | /**
* Set the domain description
*
* @param description
* the domain description
*/
public void setDescription(String description) {
this.f0 = description;
} | 3.26 |
hadoop_TimelineDomain_setWriters_rdh | /**
* Set the writer (and/or writer group) list string
*
* @param writers
* the writer (and/or writer group) list string
*/public void setWriters(String writers) {
this.writers = writers;
} | 3.26 |
hadoop_TimelineDomain_setCreatedTime_rdh | /**
* Set the created time of the domain
*
* @param createdTime
* the created time of the domain
*/
public void
setCreatedTime(Long createdTime) {
this.createdTime = createdTime;
} | 3.26 |
hadoop_TimelineDomain_setOwner_rdh | /**
* Set the domain owner. The user doesn't need to set it, which will
* automatically set to the user who puts the domain.
*
* @param owner
* the domain owner
*/
public void setOwner(String owner) {
this.owner = owner;
} | 3.26 |
hadoop_TimelineDomain_setId_rdh | /**
* Set the domain ID
*
* @param id
* the domain ID
*/
public void setId(String id) {
this.id = id;
} | 3.26 |
hadoop_TimelineDomain_getWriters_rdh | /**
* Get the writer (and/or writer group) list string
*
* @return the writer (and/or writer group) list string
*/
@XmlElement(name = "writers")
public String getWriters() {
return writers;
} | 3.26 |
hadoop_TimelineDomain_getDescription_rdh | /**
* Get the domain description
*
* @return the domain description
*/
@XmlElement(name = "description")
public String getDescription() {
return f0;
} | 3.26 |
hadoop_RpcProgram_m0_rdh | /**
* Unregister this program with the local portmapper.
*
* @param transport
* transport layer for port map
* @param boundPort
* port number of bounded RPC program
*/
public void m0(int transport, int boundPort) {
if (boundPort != port) {
LOG.info((("The bound port is " + boundPort) + ", diffe... | 3.26 |
hadoop_RpcProgram_m1_rdh | // Start extra daemons or services
public void m1() {
} | 3.26 |
hadoop_RpcProgram_register_rdh | /**
* Register the program with Portmap or Rpcbind.
*
* @param mapEntry
* port map entries
* @param set
* specifies registration or not
*/
protected void register(PortmapMapping mapEntry, boolean set) {
XDR mappingRequest = PortmapRequest.create(mapEntry, set);
SimpleUdpClient registrationClient = ne... | 3.26 |
hadoop_Summarizer_toString_rdh | /**
* Summarizes the current {@link Gridmix} run and the cluster used.
*/
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append(executionSummarizer.toString());
builder.append(clusterSummarizer.toString());
return builder.toString();
} | 3.26 |
hadoop_Summarizer_finalize_rdh | /**
* This finalizes the summarizer.
*/
@SuppressWarnings("unchecked")
void finalize(JobFactory factory, String path, long size, UserResolver resolver, DataStatistics stats, Configuration conf) throws IOException {
executionSummarizer.finalize(factory, path, size,
resolver, stats, conf);
} | 3.26 |
hadoop_TimelineReaderAuthenticationFilterInitializer_m0_rdh | /**
* Filter initializer to initialize {@link AuthenticationFilter}
* for ATSv2 timeline reader server with timeline service specific
* configurations.
*/ public class TimelineReaderAuthenticationFilterInitializer extends TimelineAuthenticationFilterInitializer {
/**
* Initializes {@link AuthenticationFilt... | 3.26 |
hadoop_TFileDumper_dumpInfo_rdh | /**
* Dump information about TFile.
*
* @param file
* Path string of the TFile
* @param out
* PrintStream to output the information.
* @param conf
* The configuration object.
* @throws IOException
*/
public static void dumpInfo(String file, PrintStream out, Configuration conf) throws IOException {
final... | 3.26 |
hadoop_ExecutingStoreOperation_executeOnlyOnce_rdh | /**
* Check that the operation has not been invoked twice.
* This is an atomic check.
* After the check: activates the span.
*
* @throws IllegalStateException
* on a second invocation.
*/
protected void executeOnlyOnce() {
Preconditions.checkState(!executed.getAndSet(true), "Operation attempted twice");
... | 3.26 |
hadoop_ExecutingStoreOperation_apply_rdh | /**
* Apply calls {@link #execute()}.
*
* @return the result.
* @throws IOException
* IO problem
*/
@Override
public final T apply() throws IOException {
return execute();
} | 3.26 |
hadoop_CounterGroupFactory_updateFrameworkGroupMapping_rdh | // Update static mappings (c2i, i2s) of framework groups
private static synchronized void updateFrameworkGroupMapping(Class<?> cls) {
String name = cls.getName();Integer v1 = s2i.get(name);
if (v1 != null)
return;
i2s.add(name);
s2i.put(name, i2s.size() - 1);} | 3.26 |
hadoop_CounterGroupFactory_newGroup_rdh | /**
* Create a new counter group
*
* @param name
* of the group
* @param displayName
* of the group
* @param limits
* the counters limits policy object
* @return a new counter group
*/
public G
newGroup(String name, String displayName, Limits limits) ... | 3.26 |
hadoop_CounterGroupFactory_version_rdh | /**
*
* @return the counter factory version
*/public int version() {
return VERSION;
} | 3.26 |
hadoop_CounterGroupFactory_isFrameworkGroup_rdh | /**
* Check whether a group name is a name of a framework group (including
* the filesystem group).
*
* @param name
* to check
* @return true for framework group names
*/
public static synchronized boolean isFrameworkGroup(String name) {
return (s2i.get(name) != null) || name.equals(FS_GROUP_NAME);
} | 3.26 |
hadoop_CounterGroupFactory_getFrameworkGroupId_rdh | /**
* Get the id of a framework group
*
* @param name
* of the group
* @return the framework group id
*/
public static synchronized int getFrameworkGroupId(String name) {
Integer i
= s2i.get(name);
if (i == null)
throwBadFrameworkGroupNameException(name);
return i;
} | 3.26 |
hadoop_CounterGroupFactory_addFrameworkGroup_rdh | // Initialize the framework counter group mapping
private synchronized <T extends Enum<T>> void addFrameworkGroup(final Class<T> cls) {
updateFrameworkGroupMapping(cls);fmap.put(cls.getName(), newFrameworkGroupFactory(cls));
} | 3.26 |
hadoop_CounterGroupFactory_newFrameworkGroup_rdh | /**
* Create a new framework group
*
* @param id
* of the group
* @return a new framework group
*/
public G newFrameworkGroup(int id) {
String name;
synchronized(CounterGroupFactory.class) {
if ((id < 0) || (id >= i2s.size()))
throwBadFrameGroupIdException(id);
name = i2s.ge... | 3.26 |
hadoop_CommitResponse_m0_rdh | /**
* Create a Commit Response.
*
* @return Commit Response.
*/
@Private
@Unstable
public static CommitResponse m0() {
return Records.newRecord(CommitResponse.class);
} | 3.26 |
hadoop_MutableQuantiles_getEstimator_rdh | /**
* Get the quantile estimator.
*
* @return the quantile estimator
*/
@VisibleForTesting
public synchronized QuantileEstimator getEstimator() {
return estimator;
} | 3.26 |
hadoop_MutableQuantiles_addQuantileInfo_rdh | /**
* Add entry to quantileInfos array.
*
* @param i
* array index.
* @param info
* info to be added to quantileInfos array.
*/
public synchronized void addQuantileInfo(int i, MetricsInfo info) {
this.quantileInfos[i] = info;
} | 3.26 |
hadoop_MutableQuantiles_setQuantiles_rdh | /**
* Sets quantileInfo.
*
* @param ucName
* capitalized name of the metric
* @param uvName
* capitalized type of the values
* @param desc
* uncapitalized long-form textual description of the metric
* @param lvName
* uncapitalized type of the values
* @... | 3.26 |
hadoop_MutableQuantiles_getInterval_rdh | /**
* Get the rollover interval (in seconds) of the estimator.
*
* @return intervalSecs of the estimator.
*/
public synchronized int getInterval() {
return intervalSecs;
} | 3.26 |
hadoop_MutableQuantiles_setNumInfo_rdh | /**
* Set info about the metrics.
*
* @param pNumInfo
* info about the metrics.
*/
public synchronized void setNumInfo(MetricsInfo pNumInfo) {
this.numInfo = pNumInfo;
} | 3.26 |
hadoop_MutableQuantiles_getQuantiles_rdh | /**
* Returns the array of Quantiles declared in MutableQuantiles.
*
* @return array of Quantiles
*/
public synchronized Quantile[] getQuantiles() {
return QUANTILES;
} | 3.26 |
hadoop_MutableQuantiles_setQuantileInfos_rdh | /**
* Initialize quantileInfos array.
*
* @param length
* of the quantileInfos array.
*/
public synchronized void setQuantileInfos(int length) {this.quantileInfos = new MetricsInfo[length];} | 3.26 |
hadoop_MutableQuantiles_setInterval_rdh | /**
* Set the rollover interval (in seconds) of the estimator.
*
* @param pIntervalSecs
* of the estimator.
*/
public synchronized void setInterval(int pIntervalSecs) {this.intervalSecs = pIntervalSecs;
} | 3.26 |
hadoop_LocalSASKeyGeneratorImpl_getStorageAccountInstance_rdh | /**
* Helper method that creates CloudStorageAccount Instance using the
* storage account key.
*
* @param accountName
* Name of the storage account
* @param accountKey
* Storage Account key
* @return CloudStorageAccount instance for the storage account.
* @throws SASKeyGenerationException
*/
private Cloud... | 3.26 |
hadoop_LocalSASKeyGeneratorImpl_getRelativeBlobSASUri_rdh | /**
* Implementation for generation of Relative Path Blob SAS Uri.
*/
@Override
public URI getRelativeBlobSASUri(String accountName, String container, String relativePath) throws SASKeyGenerationException {
CloudBlobContainer sc = null;
CloudBlobClient client = null;
CachedSASKeyEntry cacheKey = null;
try {
cacheKey... | 3.26 |
hadoop_LocalSASKeyGeneratorImpl_getDefaultAccountAccessPolicy_rdh | /**
* Helper method to generate Access Policy for the Storage Account SAS Key
*
* @return SharedAccessAccountPolicy
*/
private SharedAccessAccountPolicy getDefaultAccountAccessPolicy() {
SharedAccessAccountPolicy ap = new SharedAccessAccountPolicy();
Calendar cal = new GregorianCalendar(TimeZone.getTimeZone("UTC"))... | 3.26 |
hadoop_LocalSASKeyGeneratorImpl_getContainerSASUri_rdh | /**
* Implementation to generate SAS Key for a container
*/
@Override
public URI getContainerSASUri(String accountName, String container) throws SASKeyGenerationException {
LOG.debug("Retrieving Container SAS URI For {}@{}", container, accountName);
try {
CachedSASKeyEn... | 3.26 |
hadoop_LocalSASKeyGeneratorImpl_getAccountNameWithoutDomain_rdh | /**
* Helper method that returns the Storage account name without
* the domain name suffix.
*
* @param fullAccountName
* Storage account name with domain name suffix
* @return String
*/
private String getAccountNameWithoutDomain(String fullAccountName) {
StringTokenizer tokenizer = new StringTokenizer(fullAcco... | 3.26 |
hadoop_FilterFs_getDelegationTokens_rdh | // AbstractFileSystem
@Override
public List<Token<?>> getDelegationTokens(String
renewer) throws IOException {
return myFs.getDelegationTokens(renewer);
} | 3.26 |
hadoop_FilterFs_getCanonicalServiceName_rdh | // AbstractFileSystem
@Override
public String getCanonicalServiceName()
{
return myFs.getCanonicalServiceName();
} | 3.26 |
hadoop_RemoteSASKeyGeneratorImpl_makeRemoteRequest_rdh | /**
* Helper method to make a remote request.
*
* @param urls
* - Urls to use for the remote request
* @param path
* - hadoop.auth token for the remote request
* @param queryParams
* - queryParams to be used.
* @return RemoteSASKeyGenerationResponse
*/
private RemoteSASKeyGenerationResponse makeRemoteRe... | 3.26 |
hadoop_FifoCandidatesSelector_preemptAMContainers_rdh | /**
* As more resources are needed for preemption, saved AMContainers has to be
* rescanned. Such AMContainers can be preemptionCandidates based on resToObtain, but
* maxAMCapacityForThisQueue resources will be still retained.
*
* @param clusterResource
* @param preemptMap
* @par... | 3.26 |
hadoop_ResourceBundles_getValue_rdh | /**
* Get a resource given bundle name and key
*
* @param <T>
* type of the resource
* @param bundleName
* name of the resource bundle
* @param key
* to lookup the resource
* @param suffix
* for the key to lookup
* @param defaultValue
* of the resource
* @return the resource or the defaultValue
... | 3.26 |
hadoop_ResourceBundles_getCounterName_rdh | /**
* Get the counter display name
*
* @param group
* the counter group name for the counter
* @param counter
* the counter name to lookup
* @param defaultValue
* of the counter
* @return the counter display name
*/
public static String getCounterName(Stri... | 3.26 |
hadoop_ResourceBundles_getCounterGroupName_rdh | /**
* Get the counter group display name
*
* @param group
* the group name to lookup
* @param defaultValue
* of the group
* @return the group display name
*/
public static String
getCounterGroupName(String group, String defaultValue) {
return getValue(group, "CounterGroupName", "", defaultValue);
} | 3.26 |
hadoop_ExportedBlockKeys_write_rdh | /**
*/
@Override
public void write(DataOutput out) throws IOException {
out.writeBoolean(isBlockTokenEnabled);
out.writeLong(keyUpdateInterval);
out.writeLong(tokenLifetime);
currentKey.write(out);
out.writeInt(allKeys.length);
for (int i = 0; i < allKeys.length; i++) {
allKeys[i].writ... | 3.26 |
hadoop_ExportedBlockKeys_readFields_rdh | /**
*/
@Override
public void readFields(DataInput in) throws IOException {
isBlockTokenEnabled = in.readBoolean();
keyUpdateInterval = in.readLong();
tokenLifetime = in.readLong();
currentKey.readFields(in);
this.allKeys = new BlockKey[in.readInt()]; for (int i = 0; i < allKeys.length; i++) {
... | 3.26 |
hadoop_FsAction_and_rdh | /**
* AND operation.
*
* @param that
* FsAction that.
* @return FsAction.
*/
public FsAction and(FsAction that) {
return vals[ordinal() &
that.ordinal()];
} | 3.26 |
hadoop_FsAction_implies_rdh | /**
* Return true if this action implies that action.
*
* @param that
* FsAction that.
* @return if implies true,not false.
*/
public boolean implies(FsAction that) {
if (that != null) {
return (ordinal() & that.ordinal()) == that.ordinal();
}
return false;
} | 3.26 |
hadoop_FsAction_not_rdh | /**
* NOT operation.
*
* @return FsAction.
*/
public FsAction not() {
return vals[7 - ordinal()];} | 3.26 |
hadoop_FsAction_or_rdh | /**
* OR operation.
*
* @param that
* FsAction that.
* @return FsAction.
*/
public FsAction or(FsAction that) {
return vals[ordinal() | that.ordinal()];
} | 3.26 |
hadoop_AMRunner_startAMFromRumenTrace_rdh | /**
* Parse workload from a rumen trace file.
*/
private void startAMFromRumenTrace(String inputTrace, long baselineTimeMS) throws IOException {
Configuration conf = new Configuration();
conf.set("fs.defaultFS", "file:///");
File fin = new File(inputTrace);
try (JobTraceReader reader =
new JobTraceReader(new Path(fin... | 3.26 |
hadoop_AMRunner_startAMFromSLSTrace_rdh | /**
* Parse workload from a SLS trace file.
*/
private void startAMFromSLSTrace(String inputTrace) throws IOException {
JsonFactory jsonF = new JsonFactory();
ObjectMapper mapper = new ObjectMapper();
try (Reader input = new InputStreamReader(new FileInputStream(inputTrace), StandardCharsets.UTF_8)) {
JavaTyp... | 3.26 |
hadoop_AMRunner_startAMFromSynthGenerator_rdh | /**
* parse workload information from synth-generator trace files.
*/
private void startAMFromSynthGenerator() throws YarnException, IOException {
Configuration localConf = new Configuration();
localConf.set("fs.defaultFS", "file:///");
// if we use the nodeFile this could have been not initialized yet.
if (slsRunner... | 3.26 |
hadoop_ContainerSchedulerEvent_getContainer_rdh | /**
* Get the container associated with the event.
*
* @return Container.
*/
public Container getContainer() {
return container;
} | 3.26 |
hadoop_AMRMClientAsyncImpl_getAvailableResources_rdh | /**
* Get the currently available resources in the cluster.
* A valid value is available after a call to allocate has been made
*
* @return Currently available resources
*/
public Resource getAvailableResources() {
return client.getAvailableResources();
} | 3.26 |
hadoop_AMRMClientAsyncImpl_getClusterNodeCount_rdh | /**
* Get the current number of nodes in the cluster.
* A valid values is available after a call to allocate has been made
*
* @return Current number of nodes in the cluster
*/
public int getClusterNodeCount() {
return client.getClusterNodeCount();
} | 3.26 |
hadoop_AMRMClientAsyncImpl_removeContainerRequest_rdh | /**
* Remove previous container request. The previous container request may have
* already been sent to the ResourceManager. So even after the remove request
* the app must be prepared to receive an allocation for the previous request
* even after the remove request
*
* @param req
* Resource request
*/
public... | 3.26 |
hadoop_AMRMClientAsyncImpl_releaseAssignedContainer_rdh | /**
* Release containers assigned by the Resource Manager. If the app cannot use
* the container or wants to give up the container then it can release them.
* The app needs to make new requests for the released resource capability if
* it still needs it. eg. it released non-local resources
*
* @param containerId
... | 3.26 |
hadoop_AMRMClientAsyncImpl_updateBlacklist_rdh | /**
* Update application's blacklist with addition or removal resources.
*
* @param blacklistAdditions
* list of resources which should be added to the
* application blacklist
* @param blacklistRemovals
* list of resources which should be removed from the
* application blacklist
*/
public void updateBl... | 3.26 |
hadoop_AMRMClientAsyncImpl_addContainerRequest_rdh | /**
* Request containers for resources before calling <code>allocate</code>
*
* @param req
* Resource request
*/
public void
addContainerRequest(T req) {
client.addContainerRequest(req);
} | 3.26 |
hadoop_AMRMClientAsyncImpl_registerApplicationMaster_rdh | /**
* Registers this application master with the resource manager. On successful
* registration, starts the heartbeating thread.
*
* @param appHostName
* Name of the host on which master is running
* @param appHostPort
* Port master is listening on
* @param appTrackingUrl
* URL at which the master info c... | 3.26 |
hadoop_AMRMClientAsyncImpl_m1_rdh | /**
* Unregister the application master. This must be called in the end.
*
* @param appStatus
* Success/Failure status of the master
* @param appMessage
* Diagnostics message on failure
* @param appTrackingUrl
* New URL to get master info
* @throws YarnException
* @throws IOException
*/
public void m1(... | 3.26 |
hadoop_AMRMClientAsyncImpl_serviceStop_rdh | /**
* Tells the heartbeat and handler threads to stop and waits for them to
* terminate.
*/
@Override
protected void serviceStop() throws Exception {
keepRunning = false;heartbeatThread.interrupt();
try {
heartbeatThread.join();
} catch (InterruptedException ex) {
LOG.error("Error joining... | 3.26 |
hadoop_DirectoryPolicy_getOptionName_rdh | /**
* Get the option name.
*
* @return name of the option
*/
public String getOptionName() {
return optionName;
} | 3.26 |
hadoop_WindowsGetSpaceUsed_refresh_rdh | /**
* Override to hook in DUHelper class.
*/
@Override
protected void refresh() {
used.set(DUHelper.getFolderUsage(getDirPath()));
} | 3.26 |
hadoop_HCFSMountTableConfigLoader_m0_rdh | /**
* 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.26 |
hadoop_DefaultAnonymizableDataType_needsAnonymization_rdh | // Determines if the contained data needs anonymization
protected boolean needsAnonymization(Configuration conf) {
return true;
} | 3.26 |
hadoop_DynoInfraUtils_getNameNodeWebUri_rdh | /**
* Get the URI that can be used to access the launched NameNode's web UI, e.g.
* for JMX calls.
*
* @param nameNodeProperties
* The set of properties representing the
* information about the launched NameNode.
* @return The URI to the web UI.
*/
static URI getNameNodeWebUri(Properties nameNodeProperties)... | 3.26 |
hadoop_DynoInfraUtils_fetchHadoopTarball_rdh | /**
* If a file matching {@value HADOOP_TAR_FILENAME_FORMAT} and {@code version}
* is found in {@code destinationDir}, return its path. Otherwise, first
* download the tarball from an Apache mirror. If the
* {@value APACHE_DOWNLOAD_MIRROR_KEY} configuration or system property... | 3.26 |
hadoop_DynoInfraUtils_getNameNodeHdfsUri_rdh | /**
* Get the URI that can be used to access the launched NameNode for HDFS RPCs.
*
* @param nameNodeProperties
* The set of properties representing the
* information about the launched NameNode.
* @return The HDFS URI.
*/
static URI getNameNodeHdfsUri(Properties nameNodeProperties) {
return URI.create(S... | 3.26 |
hadoop_DynoInfraUtils_m0_rdh | /**
* Wait for the launched NameNode to finish starting up. Continues until
* {@code shouldExit} returns true.
*
* @param nameNodeProperties
* The set of properties containing information
* about the NameNode.
* @param shouldExit
* Sh... | 3.26 |
hadoop_DynoInfraUtils_fetchNameNodeJMXValue_rdh | /**
* Fetch a value from the launched NameNode's JMX.
*
* @param nameNodeProperties
* The set of properties containing information
* about the NameNode.
* @param jmxBeanQuery
* The JMX bean query to execute; should return a
* JMX property matching {@code jmxProperty}.... | 3.26 |
hadoop_DynoInfraUtils_getNameNodeServiceRpcAddr_rdh | /**
* Get the URI that can be used to access the launched NameNode for HDFS
* Service RPCs (i.e. from DataNodes).
*
* @param nameNodeProperties
* The set of properties representing the
* information about the launched NameNode.
* @return The service RPC URI.
*/
stati... | 3.26 |
hadoop_DynoInfraUtils_waitForNameNodeReadiness_rdh | /**
* Wait for the launched NameNode to be ready, i.e. to have at least 99% of
* its DataNodes register, have fewer than 0.01% of its blocks missing, and
* less than 1% of its blocks under replicated. Continues until the criteria
* have been met or {@code shouldExit} returns true.
*
* @param nameNodeProperties
*... | 3.26 |
hadoop_DynoInfraUtils_triggerDataNodeBlockReport_rdh | /**
* Trigger a block report on a given DataNode.
*
* @param conf
* Configuration
* @param dataNodeTarget
* The target; should be like {@code <host>:<port>}
*/
private static void triggerDataNodeBlockReport(Configuration conf, String dataNodeTarget) throws IOException {
InetSocketAddress datanodeAddr = N... | 3.26 |
hadoop_DynoInfraUtils_waitForNameNodeJMXValue_rdh | /**
* Poll the launched NameNode's JMX for a specific value, waiting for it to
* cross some threshold. Continues until the threshold has been crossed or
* {@code shouldExit} returns true. Periodically logs the current value.
*
* @param valueName
* The human-readable name of the value which is being
* polled ... | 3.26 |
hadoop_Chain_createBlockingQueue_rdh | /**
* Creates a ChainBlockingQueue with KeyValuePair as element
*
* @return the ChainBlockingQueue
*/
ChainBlockingQueue<KeyValuePair<?, ?>> createBlockingQueue() {
return new ChainBlockingQueue<KeyValuePair<?, ?>>();
} | 3.26 |
hadoop_Chain_getCurrentValue_rdh | /**
* Get the current value.
*
* @return the value object that was read into
* @throws IOException
* @throws InterruptedException
*/
public VALUEIN getCurrentValue() throws IOException, InterruptedException {
return this.value;
} | 3.26 |
hadoop_Chain_write_rdh | /**
* Writes a key/value pair.
*
* @param key
* the key to write.
* @param value
* the value to write.
* @throws IOException
*/
public void write(KEYOUT key, VALUEOUT value) throws IOException, InterruptedException {
if (outputQueue != null) {
writeToQueue(key, value);
} else {
outpu... | 3.26 |
hadoop_Chain_getPrefix_rdh | /**
* Returns the prefix to use for the configuration of the chain depending if
* it is for a Mapper or a Reducer.
*
* @param isMap
* TRUE for Mapper, FALSE for Reducer.
* @return the prefix to use.
*/
protected static String getPrefix(boolean isMap) {
return isMap ? CHAIN_MAPPER : CHAIN_REDUCER;
} | 3.26 |
hadoop_Chain_addMapper_rdh | /**
* Adds a Mapper class to the chain job.
*
* <p>
* The configuration properties of the chain job have precedence over the
* configuration properties of the Mapper.
*
* @param isMap
* indicates if the Chain is for a Mapper or for a Reducer.
* @param job
* chain job.
* @param klass
* the Mapper class... | 3.26 |
hadoop_Chain_checkReducerAlreadySet_rdh | // if a reducer chain check the Reducer has been already set or not
protected static void checkReducerAlreadySet(boolean isMap, Configuration jobConf, String prefix, boolean shouldSet) {
if (!isMap) {
if (shouldSet) {
if (jobConf.getClass(prefix + CHAIN_REDUCER_CLASS, null) == null) {
... | 3.26 |
hadoop_Chain_startAllThreads_rdh | // start all the threads
void startAllThreads() {
for (Thread thread : threads) {
thread.start();
}
} | 3.26 |
hadoop_Chain_joinAllThreads_rdh | // wait till all threads finish
void joinAllThreads() throws IOException, InterruptedException {
for (Thread thread : threads) {
thread.join();
}
Throwable th = getThrowable();
if (th != null) {
if (th instanceof
IOException) {
throw ((IOException) (th));
} el... | 3.26 |
hadoop_Chain_addReducer_rdh | /**
* Add reducer that reads from context and writes to a queue
*/
@SuppressWarnings("unchecked")
void addReducer(TaskInputOutputContext inputContext, ChainBlockingQueue<KeyValuePair<?, ?>> outputQueue) throws IOException, InterruptedException {
Class<?> keyOutClass = rConf.getClass(REDUCER_OUTPUT_KEY_CLASS, Obj... | 3.26 |
hadoop_Chain_createMapContext_rdh | /**
* Create a map context that is based on ChainMapContext and the given record
* reader and record writer
*/
private <KEYIN,
VALUEIN, KEYOUT, VALUEOUT> Mapper<KEYIN, VALUEIN, KEYOUT, VALUEOUT>.Context createMapContext(RecordReader<KEYIN, VALUEIN> rr, RecordWriter<KEYOUT, VALUEOUT> rw, TaskInputOutputContext<KEYIN... | 3.26 |
hadoop_Chain_createReduceContext_rdh | /**
* Create a reduce context that is based on ChainMapContext and the given
* record writer
*/
private <KEYIN, VALUEIN, KEYOUT, VALUEOUT>
Reducer<KEYIN, VALUEIN, KEYOUT, VALUEOUT>.Context createReduceContext(RecordWriter<KEYOUT, VALUEOUT> rw, ReduceContext<KEYIN, VALUEIN,
KEYOUT, VALUEOUT> context, Configuration c... | 3.26 |
hadoop_Chain_setReducer_rdh | /**
* Sets the Reducer class to the chain job.
*
* <p>
* The configuration properties of the chain job have precedence over the
* configuration properties of the Reducer.
*
* @param job
* the chain job.
* @param klass
* the Reducer class to add.
* @param inputKeyClass
* reducer input key class.
* @pa... | 3.26 |
hadoop_Chain_getCurrentKey_rdh | /**
* Get the current key.
*
* @return the current key object or null if there isn't one
* @throws IOException
* @throws InterruptedException
*/
public KEYIN getCurrentKey() throws IOException,
InterruptedException {
return this.key;
} | 3.26 |
hadoop_Chain_getReducer_rdh | /**
* Returns the Reducer instance in the chain.
*
* @return the Reducer instance in the chain or NULL if none.
*/
Reducer<?, ?, ?, ?> getReducer() {
return reducer;
} | 3.26 |
hadoop_Chain_interruptAllThreads_rdh | // interrupt all threads
private synchronized void interruptAllThreads() {
for (Thread th : threads) {
th.interrupt();
}
for (ChainBlockingQueue<?> queue : blockingQueues) {
queue.interrupt();
}
} | 3.26 |
hadoop_Chain_runReducer_rdh | // Run the reducer directly.
@SuppressWarnings("unchecked")
<KEYIN,
VALUEIN, KEYOUT, VALUEOUT> void runReducer(TaskInputOutputContext<KEYIN, VALUEIN, KEYOUT, VALUEOUT> context) throws IOException, InterruptedException {
RecordWriter<KEYOUT, VALUEOUT> rw = new ChainRecordWriter<KEYOUT, VALUEOUT>(context);
Reduc... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.