name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hadoop_ManifestStoreOperations_getEtag_rdh
/** * Extract an etag from a status if the conditions are met. * If the conditions are not met, return null or ""; they will * both be treated as "no etags available" * <pre> * 1. The status is of a type which the implementation recognizes * as containing an etag. * 2. After casting the etag field can be r...
3.26
hadoop_ManifestStoreOperations_bindToFileSystem_rdh
/** * Bind to the filesystem. * This is called by the manifest committer after the operations * have been instantiated. * * @param fileSystem * target FS * @param path * actual path under FS. * @throws IOException * if there are binding problems. */ public void bindToFileSystem(FileSystem fileSystem, P...
3.26
hadoop_ManifestStoreOperations_isFile_rdh
/** * Is a path a file? Used during directory creation. * The is a copy & paste of FileSystem.isFile(); * {@code StoreOperationsThroughFileSystem} calls into * the FS direct so that stores which optimize their probes * can save on IO. * * @param path * path to probe * @return true if the path exists and reso...
3.26
hadoop_ManifestStoreOperations_fromResilientCommit_rdh
/** * Full commit result. * * @param recovered * Did recovery take place? * @param waitTime * any time spent waiting for IO capacity. */ public static CommitFileResult fromResilientCommit(final boolean recovered, final Duration waitTime) {return new CommitFileResult(recovered, waitTime); }
3.26
hadoop_ManifestStoreOperations_storeSupportsResilientCommit_rdh
/** * Does the store provide rename resilience through an * implementation of {@link #commitFile(FileEntry)}? * If true then that method will be invoked to commit work * * @return true if resilient commit support is available. */ public boolean storeSupportsResilientCommit() { return false; }
3.26
hadoop_ManifestStoreOperations_storePreservesEtagsThroughRenames_rdh
/** * Does the store preserve etags through renames. * If true, and if the source listing entry has an etag, * it will be used to attempt to validate a failed rename. * * @param path * path to probe. * @return true if etag comparison is a valid strategy. */ public boolean storePreservesEtagsThroughRenames(Pat...
3.26
hadoop_ManifestStoreOperations_renameDir_rdh
/** * Rename a dir; defaults to invoking * Forward to {@link #renameFile(Path, Path)}. * Usual "what does 'false' mean?" ambiguity. * * @param source * source file * @param dest * destination path -which must not exist. * @return true if the directory was created. * @throws IOException * failure. */ p...
3.26
hadoop_FederationBlock_initLocalClusterPage_rdh
/** * Initialize the Federation page of the local-cluster. * * @param tbody * HTML tbody. * @param lists * subCluster page data list. */ private void initLocalClusterPage(TBODY<TABLE<Hamlet>> tbody, List<Map<String, String>> lists) { Configuration config = this.router.getConfig(); SubClusterInfo loca...
3.26
hadoop_FederationBlock_initSubClusterPageItem_rdh
/** * We will initialize the specific SubCluster's data within this method. * * @param tbody * HTML TBody. * @param subClusterInfo * Sub-cluster information. * @param lists * Used to record data that needs to be displayed in JS. */ private void initSubClusterPageItem(TBODY<TABLE<Hamlet>> tbody, SubCluste...
3.26
hadoop_FederationBlock_getClusterMetricsInfo_rdh
/** * Parse the capability and obtain the metric information of the cluster. * * @param capability * metric json obtained from RM. * @return ClusterMetricsInfo Object */ protected ClusterMetricsInfo getClusterMetricsInfo(String capability) { try { if ((capability != null) && (!capability.isEmpty())...
3.26
hadoop_FederationBlock_initFederationSubClusterDetailTableJs_rdh
/** * Initialize the subCluster details JavaScript of the Federation page. * * This part of the js script will control to display or hide the detailed information * of the subCluster when the user clicks on the subClusterId. * * We will obtain the specific information of a SubCluster, * including the information...
3.26
hadoop_FederationBlock_initHtmlPageFederation_rdh
/** * Initialize the Html page. * * @param html * html object */ private void initHtmlPageFederation(Block html, boolean isEnabled) { List<Map<String, String>> lists = new ArrayList<>(); // Table header TBODY<TABLE<Hamlet>> tbody = html.table("#rms").$class("cell-border").$style("width:100%").thea...
3.26
hadoop_FederationBlock_initSubClusterPage_rdh
/** * Initialize the Federation page of the sub-cluster. * * @param tbody * HTML tbody. * @param lists * subCluster page data list. */ private void initSubClusterPage(TBODY<TABLE<Hamlet>> tbody, List<Map<String, String>> lists) { // Sort the SubClusters List<SubClusterInfo> subClusters = getSubCl...
3.26
hadoop_ErrorTranslation_wrapWithInnerIOE_rdh
/** * Given an outer and an inner exception, create a new IOE * of the inner type, with the outer exception as the cause. * The message is derived from both. * This only works if the inner exception has a constructor which * takes a string; if not a PathIOException is created. * <p> * See {@code NetUtils}. * *...
3.26
hadoop_ErrorTranslation_maybeExtractIOException_rdh
/** * Translate an exception if it or its inner exception is an * IOException. * If this condition is not met, null is returned. * * @param path * path of operation. * @param thrown * exception * @return a translated exception or null. */ public static IOException maybeExtractIOException(String path, Th...
3.26
hadoop_Quota_setQuotaInternal_rdh
/** * Set quota for the federation path. * * @param path * Federation path. * @param locations * Locations of the Federation path. * @param namespaceQuota * Name space quota. * @param storagespaceQuota * Storage space quota. * @param type * StorageType that the space quota is intended to be set on...
3.26
hadoop_Quota_eachByStorageType_rdh
/** * Invoke consumer by each storage type. * * @param consumer * the function consuming the storage type. */ public static void eachByStorageType(Consumer<StorageType> consumer) {for (StorageType type : StorageType.values()) { consumer.accept(type); } }
3.26
hadoop_Quota_isMountEntry_rdh
/** * Is the path a mount entry. * * @param path * the path to be checked. * @return {@code true} if path is a mount entry; {@code false} otherwise. */ private boolean isMountEntry(String path) { return router.getQuotaManager().isMountEntry(path); } /** * Get valid quota remote locations used in {@link #getQ...
3.26
hadoop_Quota_andByStorageType_rdh
/** * Invoke predicate by each storage type and bitwise AND the results. * * @param predicate * the function test the storage type. * @return true if bitwise AND by all storage type returns true, false otherwise. */ public static boolean andByStorageType(Predicate<StorageType> predicate) { boolean res = true;...
3.26
hadoop_Quota_getGlobalQuota_rdh
/** * Get global quota for the federation path. * * @param path * Federation path. * @return global quota for path. * @throws IOException * If the quota system is disabled. */ QuotaUsage getGlobalQuota(String path) throws IOException {if (!router.isQuotaEnabled()) { throw new IOException("The quota syst...
3.26
hadoop_Quota_getQuotaUsage_rdh
/** * Get aggregated quota usage for the federation path. * * @param path * Federation path. * @return Aggregated quota. * @throws IOException * If the quota system is disabled. */ public QuotaUsage getQuotaUsage(String path) throws IOException {return aggregateQuota(path, getEachQuotaUsage(path)); }
3.26
hadoop_Quota_aggregateQuota_rdh
/** * Aggregate quota that queried from sub-clusters. * * @param path * Federation path of the results. * @param results * Quota query result. * @return Aggregated Quota. */ QuotaUsage aggregateQuota(String path, Map<RemoteLocation, QuotaUsage> results) throws IOException { long nsCount = 0; long ssCount = ...
3.26
hadoop_Quota_setQuota_rdh
/** * Set quota for the federation path. * * @param path * Federation path. * @param namespaceQuota * Name space quota. * @param storagespaceQuota * Storage space quota. * @param type * StorageType that the space quota is intended to be set on. * @param checkMountEntry * whether to check the path ...
3.26
hadoop_Quota_getQuotaRemoteLocations_rdh
/** * Get all quota remote locations across subclusters under given * federation path. * * @param path * Federation path. * @return List of quota remote locations. * @throws IOException */ private List<RemoteLocation> getQuotaRemoteLocations(String path) throws IOException { List<RemoteLocation> locations = ...
3.26
hadoop_Quota_orByStorageType_rdh
/** * Invoke predicate by each storage type and bitwise inclusive OR the results. * * @param predicate * the function test the storage type. * @return true if bitwise OR by all storage type returns true, false otherwise. */ public static boolean orByStorageType(Predicate<StorageType> predicate) { boolean res = ...
3.26
hadoop_Quota_getEachQuotaUsage_rdh
/** * Get quota usage for the federation path. * * @param path * Federation path. * @return quota usage for each remote location. * @throws IOException * If the quota system is disabled. */ Map<RemoteLocation, QuotaUsage> getEachQuotaUsage(String path) throws IOException { rpcServer.checkOperation(Operatio...
3.26
hadoop_BlockResolver_resolve_rdh
/** * * @param s * the external reference. * @return sequence of blocks that make up the reference. */ public Iterable<BlockProto> resolve(FileStatus s) { List<Long> lengths = blockLengths(s); ArrayList<BlockProto> ret = new ArrayList<>(lengths.size()); long tot = 0; for (long l : lengths) {tot +...
3.26
hadoop_BlockResolver_preferredBlockSize_rdh
/** * * @param status * the external reference. * @return the block size to assign to this external reference. */ public long preferredBlockSize(FileStatus status) { return status.getBlockSize(); }
3.26
hadoop_MapReduceJobPropertiesParser_accept_rdh
// Accepts a key if there is a corresponding key in the current mapreduce // configuration private boolean accept(String key) { return getLatestKeyName(key) != null; }
3.26
hadoop_MapReduceJobPropertiesParser_extractMinHeapOpts_rdh
/** * Extracts the -Xms heap option from the specified string. */ public static void extractMinHeapOpts(String javaOptions, List<String> heapOpts, List<String> others) { for (String opt : javaOptions.split(" ")) { Matcher matcher = MIN_HEAP_PATTERN.matcher(opt); if (matcher.find()) { ...
3.26
hadoop_MapReduceJobPropertiesParser_fromString_rdh
// Maps the value of the specified key. private DataType<?> fromString(String key, String value) { DefaultDataType defaultValue = new DefaultDataType(value); if (value != null) { // check known configs // job-name String latestKey = getLatestKeyName(key); if (MRJobConfig.J...
3.26
hadoop_MapReduceJobPropertiesParser_extractMaxHeapOpts_rdh
/** * Extracts the -Xmx heap option from the specified string. */ public static void extractMaxHeapOpts(final String javaOptions, List<String> heapOpts, List<String> others) { for (String opt : javaOptions.split(" ")) { Matcher matcher = MAX_HEAP_PATTERN.matcher(opt); if (matcher.find()) {hea...
3.26
hadoop_MapReduceJobPropertiesParser_getLatestKeyName_rdh
// Finds a corresponding key for the specified key in the current mapreduce // setup. // Note that this API uses a cached copy of the Configuration object. This is // purely for performance reasons. private String getLatestKeyName(String key) { // set the specified key configuration.set(key, key); try { ...
3.26
hadoop_ResourceRequestSetKey_m0_rdh
/** * Extract the corresponding ResourceRequestSetKey for an allocated container * from a given set. Return null if not found. * * @param container * the allocated container * @param keys * the set of keys to look from * @return ResourceRequestSetKey */ public static ResourceRequestSetKey m0(Container con...
3.26
hadoop_SpillCallBackPathsFinder_getInvalidSpillEntries_rdh
/** * Gets the set of path:pos of the entries that were accessed incorrectly. * * @return a set of string in the format of {@literal Path[Pos]} */ public Set<String> getInvalidSpillEntries() { Set<String> result = new LinkedHashSet<>(); for (Entry<Path, Set<Long>> spillMapEntry : invalidAccessMap.entrySet()) { for ...
3.26
hadoop_PlacementConstraint_type_rdh
/** * The type of placement. */ public PlacementConstraint type(PlacementType type) { this.type = type; return this; }
3.26
hadoop_PlacementConstraint_scope_rdh
/** * The scope of placement. */ public PlacementConstraint scope(PlacementScope scope) { this.scope = scope; return this; }
3.26
hadoop_PlacementConstraint_maxCardinality_rdh
/** * When placement type is cardinality, the maximum number of containers of the * depending component that a host should have, where containers of this * component can be allocated on. */ public PlacementConstraint maxCardinality(Long maxCardinality) { this.maxCardinality = maxCardinality; return this; }
3.26
hadoop_PlacementConstraint_toIndentedString_rdh
/** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
3.26
hadoop_PlacementConstraint_name_rdh
/** * An optional name associated to this constraint. */ public PlacementConstraint name(String name) { this.name = name; return this; }
3.26
hadoop_PlacementConstraint_minCardinality_rdh
/** * When placement type is cardinality, the minimum number of containers of the * depending component that a host should have, where containers of this * component can be allocated on. */ public PlacementConstraint minCardinality(Long minCardinality) { this.minCardinality = minCardinality; return this; }
3.26
hadoop_PlacementConstraint_nodePartitions_rdh
/** * Node partitions where the containers of this component can run. */ public PlacementConstraint nodePartitions(List<String> nodePartitions) { this.nodePartitions = nodePartitions; return this; }
3.26
hadoop_PlacementConstraint_nodeAttributes_rdh
/** * Node attributes are a set of key:value(s) pairs associated with nodes. */ public PlacementConstraint nodeAttributes(Map<String, List<String>> nodeAttributes) { this.nodeAttributes = nodeAttributes; return this; }
3.26
hadoop_PlacementConstraint_targetTags_rdh
/** * The name of the components that this component's placement policy is * depending upon are added as target tags. So for affinity say, this * component's containers are requesting to be placed on hosts where * containers of the target tag component(s) are running on. Target tags can * also contain the name of ...
3.26
hadoop_HttpExceptionUtils_createServletExceptionResponse_rdh
/** * Creates a HTTP servlet response serializing the exception in it as JSON. * * @param response * the servlet response * @param status * the error code to set in the response * @param ex * the exception to serialize in the response * @throws IOException * thrown if there was an error while creating...
3.26
hadoop_HttpExceptionUtils_throwEx_rdh
// trick, riding on generics to throw an undeclared exception private static void throwEx(Throwable ex) { HttpExceptionUtils.<RuntimeException>throwException(ex); }
3.26
hadoop_HttpExceptionUtils_createJerseyExceptionResponse_rdh
/** * Creates a HTTP JAX-RPC response serializing the exception in it as JSON. * * @param status * the error code to set in the response * @param ex * the exception to serialize in the response * @return the JAX-RPC response with the set error and JSON encoded exception */ public static Response createJerse...
3.26
hadoop_HttpExceptionUtils_validateResponse_rdh
/** * Validates the status of an <code>HttpURLConnection</code> against an * expected HTTP status code. If the current status code is not the expected * one it throws an exception with a detail message using Server side error * messages if available. * <p> * <b>NOTE:</b> this method will throw the deserialized ex...
3.26
hadoop_ClientGSIContext_receiveResponseState_rdh
/** * Client side implementation for receiving state alignment info * in responses. */ @Overridepublic synchronized void receiveResponseState(RpcResponseHeaderProto header) {if (header.hasRouterFederatedState()) { routerFederatedState = mergeRouterFederatedState(this.routerFederatedState, header.getRouterFe...
3.26
hadoop_ClientGSIContext_updateRequestState_rdh
/** * Client side implementation for providing state alignment info in requests. */ @Override public synchronized void updateRequestState(RpcRequestHeaderProto.Builder header) { if (lastSeenStateId.get() != Long.MIN_VALUE) { header.setStateId(lastSeenStateId.get()); }if (routerFederatedState != null) { heade...
3.26
hadoop_ClientGSIContext_getRouterFederatedStateMap_rdh
/** * Utility function to parse routerFederatedState field in RPC headers. */ public static Map<String, Long> getRouterFederatedStateMap(ByteString byteString) { if (byteString != null) { try { RouterFederatedStateProto federatedState = RouterFederatedStateProto.parseFrom(byteString); return ...
3.26
hadoop_ClientGSIContext_mergeRouterFederatedState_rdh
/** * Merge state1 and state2 to get the max value for each namespace. * * @param state1 * input ByteString. * @param state2 * input ByteString. * @return one ByteString object which contains the max value of each namespace. */ public static ByteString mergeRouterFederatedState(ByteString state1, ByteString...
3.26
hadoop_ClientGSIContext_updateResponseState_rdh
/** * Client side implementation only receives state alignment info. * It does not provide state alignment info therefore this does nothing. */ @Override public void updateResponseState(RpcResponseHeaderProto.Builder header) { // Do nothing. }
3.26
hadoop_RouterDistCpProcedure_enableWrite_rdh
/** * Enable write. */ @Override protected void enableWrite() throws IOException { // do nothing. }
3.26
hadoop_StreamXmlRecordReader_nextState_rdh
/* also updates firstMatchStart_; */ int nextState(int state, int input, int bufPos) {switch (state) { case CDATA_UNK : case CDATA_OUT : switch (input) { case CDATA_BEGIN : return CDATA_IN; case CDATA_END : if (state == CDATA_OUT) { // System.out.println("buggy XML " ...
3.26
hadoop_GetClusterNodeAttributesResponse_newInstance_rdh
/** * Create instance of GetClusterNodeAttributesResponse. * * @param attributes * Map of Node attributeKey to Type. * @return GetClusterNodeAttributesResponse. */ public static GetClusterNodeAttributesResponse newInstance(Set<NodeAttributeInfo> attributes) { GetClusterNodeAttributesResponse response = Rec...
3.26
hadoop_S3ACachingBlockManager_read_rdh
/** * Reads into the given {@code buffer} {@code size} bytes from the underlying file * starting at {@code startOffset}. * * @param buffer * the buffer to read data in to. * @param startOffset * the offset at which reading starts. * @param size * the number bytes to read. * @return number of bytes read....
3.26
hadoop_AbfsStatistic_getStatName_rdh
/** * Getter for statistic name. * * @return Name of statistic. */ public String getStatName() { return statName; }
3.26
hadoop_AbfsStatistic_getStatNameFromHttpCall_rdh
/** * Get the statistic name using the http call name. * * @param httpCall * The HTTP call used to get the statistic name. * @return Statistic name. */ public static String getStatNameFromHttpCall(String httpCall) { return HTTP_CALL_TO_NAME_MAP.get(httpCall); }
3.26
hadoop_AbfsStatistic_getHttpCall_rdh
/** * Getter for http call for HTTP duration trackers. * * @return http call of a statistic. */ public String getHttpCall() { return httpCall; }
3.26
hadoop_AbfsStatistic_getStatDescription_rdh
/** * Getter for statistic description. * * @return Description of statistic. */ public String getStatDescription() { return statDescription; }
3.26
hadoop_NMClient_getLocalizationStatuses_rdh
/** * Get the localization statuses of a container. * * @param containerId * the Id of the container * @param nodeId * node Id of the container * @return the status of a container. * @throws YarnException * YarnException. * @throws IOException * IOException. */ @InterfaceStability.Unstable public Li...
3.26
hadoop_NMClient_localize_rdh
/** * Localize resources for a container. * * @param containerId * the ID of the container * @param nodeId * node Id of the container * @param localResources * resources to localize */ @InterfaceStability.Unstable public void localize(ContainerId containerId, NodeId nodeId, Map<String, LocalResource> loc...
3.26
hadoop_NMClient_getNMTokenCache_rdh
/** * Get the NM token cache of the <code>NMClient</code>. This cache must be * shared with the {@link AMRMClient} that requested the containers managed * by this <code>NMClient</code> * <p> * If a NM token cache is not set, the {@link NMTokenCache#getSingleton()} * singleton instance will be used. * * @return ...
3.26
hadoop_NMClient_createNMClient_rdh
/** * Create a new instance of NMClient. */ @Public public static NMClient createNMClient(String name) { NMClient client = new NMClientImpl(name); return client; }
3.26
hadoop_NMClient_setNMTokenCache_rdh
/** * Set the NM Token cache of the <code>NMClient</code>. This cache must be * shared with the {@link AMRMClient} that requested the containers managed * by this <code>NMClient</code> * <p> * If a NM token cache is not set, the {@link NMTokenCache#getSingleton()} * singleton instance will be used. * * @param n...
3.26
hadoop_NMClient_getNodeIdOfStartedContainer_rdh
/** * Get the NodeId of the node on which container is running. It returns * null if the container if container is not found or if it is not running. * * @param containerId * Container Id of the container. * @return NodeId of the container on which it is running. */ public NodeId getNodeIdOfStartedContainer(Co...
3.26
hadoop_WebHdfs_createWebHdfsFileSystem_rdh
/** * Returns a new {@link WebHdfsFileSystem}, with the given configuration. * * @param conf * configuration * @return new WebHdfsFileSystem */ private static WebHdfsFileSystem createWebHdfsFileSystem(Configuration conf) { WebHdfsFileSystem fs = new WebHdfsFileSystem(); fs.setConf(conf); return fs; ...
3.26
hadoop_MountVolumeMap_getCapacityRatioByMountAndStorageType_rdh
/** * Return capacity ratio. * If not exists, return 1 to use full capacity. */ double getCapacityRatioByMountAndStorageType(String mount, StorageType storageType) { if (mountVolumeMapping.containsKey(mount)) { return mountVolumeMapping.get(mount).getCapacityRatio(storageType); } return 1; ...
3.26
hadoop_FlowActivityDocument_merge_rdh
/** * Merge the {@link FlowActivityDocument} that is passed with the current * document for upsert. * * @param flowActivityDocument * that has to be merged */ @Override public void merge(FlowActivityDocument flowActivityDocument) { if (flowActivityDocument.getDayTimestamp() > 0) { this.dayTimestamp ...
3.26
hadoop_CsiGrpcClient_createNodeBlockingStub_rdh
/** * Creates a blocking stub for CSI node plugin on the given channel. * * @return the blocking stub */ public NodeBlockingStub createNodeBlockingStub() { return NodeGrpc.newBlockingStub(channel); }
3.26
hadoop_CsiGrpcClient_close_rdh
/** * Shutdown the communication channel gracefully, * wait for 5 seconds before it is enforced. */ @Override public void close() { try { this.channel.shutdown().awaitTermination(5, TimeUnit.SECONDS); } catch (InterruptedException e) { LOG.error("Failed to gracefully shutdown" + " gRPC communication channel ...
3.26
hadoop_CsiGrpcClient_createControllerBlockingStub_rdh
/** * Creates a blocking stub for CSI controller plugin on the given channel. * * @return the blocking stub */ public ControllerBlockingStub createControllerBlockingStub() { return ControllerGrpc.newBlockingStub(channel); }
3.26
hadoop_CsiGrpcClient_createIdentityBlockingStub_rdh
/** * Creates a blocking stub for CSI identity plugin on the given channel. * * @return the blocking stub */ public IdentityBlockingStub createIdentityBlockingStub() { return IdentityGrpc.newBlockingStub(channel); }
3.26
hadoop_FsGetter_get_rdh
/** * Gets file system instance of given uri. * * @param uri * uri. * @param conf * configuration. * @throws IOException * raised on errors performing I/O. * @return FileSystem. */ public FileSystem get(URI uri, Configuration conf) throws IOException { return FileSystem.get(uri, conf); }
3.26
hadoop_ConfiguredNodeLabels_setLabelsByQueue_rdh
/** * Set node labels for a specific queue. * * @param queuePath * path of the queue * @param nodeLabels * configured node labels to set */ public void setLabelsByQueue(String queuePath, Collection<String> nodeLabels) { f0.put(queuePath, new HashSet<>(nodeLabels)); }
3.26
hadoop_ConfiguredNodeLabels_getAllConfiguredLabels_rdh
/** * Get all configured node labels aggregated from each queue. * * @return all node labels */ public Set<String> getAllConfiguredLabels() { Set<String> nodeLabels = f0.values().stream().flatMap(Set::stream).collect(Collectors.toSet());if (nodeLabels.size() == 0) { nodeLabels = NO_LABEL; } ret...
3.26
hadoop_DeletionTaskRecoveryInfo_getDeletionTimestamp_rdh
/** * Return the deletion timestamp. * * @return the deletion timestamp. */ public long getDeletionTimestamp() { return deletionTimestamp; }
3.26
hadoop_DeletionTaskRecoveryInfo_getTask_rdh
/** * Return the recovered DeletionTask. * * @return the recovered DeletionTask. */ public DeletionTask getTask() { return task; }
3.26
hadoop_DeletionTaskRecoveryInfo_getSuccessorTaskIds_rdh
/** * Return all of the dependent DeletionTasks. * * @return the dependent DeletionTasks. */ public List<Integer> getSuccessorTaskIds() { return successorTaskIds; }
3.26
hadoop_DeSelectFields_toString_rdh
/** * use literals as toString. * * @return the literals of this type. */ @Override public String toString() { return literals; }
3.26
hadoop_DeSelectFields_obtainType_rdh
/** * Obtain the <code>DeSelectType</code> by the literals given behind * <code>deSelects</code> in URL. * <br> e.g: deSelects="resourceRequests" * * @param literals * e.g: resourceRequests * @return <code>DeSelectType</code> e.g: DeSelectType.RESOURCE_REQUESTS */ public static DeSelectType obtainType(String ...
3.26
hadoop_DeSelectFields_initFields_rdh
/** * Initial DeSelectFields with unselected fields. * * @param unselectedFields * a set of unselected field. */ public void initFields(Set<String> unselectedFields) { if (unselectedFields == null) { return; } for (String field : unselectedFields) { if (!field.trim().isEmpty()...
3.26
hadoop_DeSelectFields_contains_rdh
/** * Determine to deselect type should be handled or not. * * @param type * deselected type * @return true if the deselect type should be handled */ public boolean contains(DeSelectType type) { return types.contains(type); }
3.26
hadoop_AMRMProxyService_authorizeAndGetInterceptorChain_rdh
/** * Authorizes the request and returns the application specific request * processing pipeline. * * @return the interceptor wrapper instance * @throws YarnException * if fails */ private RequestInterceptorChainWrapper authorizeAndGetInterceptorChain() throws YarnException { AMRMTokenIdentifier tokenIdenti...
3.26
hadoop_AMRMProxyService_initializePipeline_rdh
/** * Initializes the request interceptor pipeline for the specified application. * * @param applicationAttemptId * attempt id * @param user * user name * @param amrmToken * amrmToken issued by RM * @param localToken * amrmToken issued by AMRMProxy * @p...
3.26
hadoop_AMRMProxyService_processApplicationStartRequest_rdh
/** * Callback from the ContainerManager implementation for initializing the * application request processing pipeline. * * @param request * - encapsulates information for starting an AM * @throws IOException * if fails * @throws YarnEx...
3.26
hadoop_AMRMProxyService_createRequestInterceptorChain_rdh
/** * This method creates and returns reference of the first interceptor in the * chain of request interceptor instances. * * @return the reference of the first interceptor in the chain */ protected RequestInterceptor createRequestInterceptorChain() { Configuration conf = getConfig(); List<String> interceptorClass...
3.26
hadoop_AMRMProxyService_getInterceptorClassNames_rdh
/** * Returns the comma separated interceptor class names from the configuration. * * @param conf * configuration * @return the interceptor class names as an instance of ArrayList */ private List<String> getInterceptorClassNames(Configuration conf) { String configuredInterceptorClassNames = conf.get(YarnCon...
3.26
hadoop_AMRMProxyService_m1_rdh
/** * This is called by the AMs started on this node to register with the RM. * This method does the initial authorization and then forwards the request to * the application instance specific interceptor chain. */ @Override public RegisterApplicationMasterResponse m1(RegisterApplicationMasterRequest request) throws...
3.26
hadoop_AMRMProxyService_getApplicationAttemptId_rdh
/** * Gets the application attempt identifier. * * @return the application attempt identifier */ public synchronized ApplicationAttemptId getApplicationAttemptId() { return f0; }
3.26
hadoop_AMRMProxyService_recover_rdh
/** * Recover from NM state store. Called after serviceInit before serviceStart. * * @throws IOException * if recover fails */ public void recover() throws IOException { LOG.info("Recovering AMRMProxyService."); RecoveredAMRMProxyState state = this.nmContext.getNMStateStore().loadAMRMProxyState(); t...
3.26
hadoop_AMRMProxyService_stopApplication_rdh
/** * Shuts down the request processing pipeline for the specified application * attempt id. * * @param applicationId * application id */ protected void stopApplication(ApplicationId applicationId) { this.metrics.incrRequestCount(); Preconditions.checkArgument(applicationId != null, "applicationId is n...
3.26
hadoop_AMRMProxyService_init_rdh
/** * Initializes the wrapper with the specified parameters. * * @param interceptor * the root request interceptor * @param appAttemptId * attempt id */ public synchronized void init(RequestInterceptor interceptor, ApplicationAttemptId appAttemptId) { rootInterceptor = interceptor; f0 = appAttemptI...
3.26
hadoop_AMRMProxyService_getPipelines_rdh
/** * Gets the Request interceptor chains for all the applications. * * @return the request interceptor chains. */ protected Map<ApplicationId, RequestInterceptorChainWrapper> getPipelines() { return this.applPipelineMap; }
3.26
hadoop_AMRMProxyService_getRootInterceptor_rdh
/** * Gets the root request interceptor. * * @return the root request interceptor */ public synchronized RequestInterceptor getRootInterceptor() { return rootInterceptor;}
3.26
hadoop_AMRMProxyService_m2_rdh
/** * This is called by the AMs started on this node to send heart beat to RM. * This method does the initial authorization and then forwards the request to * the application instance specific pipeline, which is a chain of request * interceptor objects. One application request processing pipeline is created * per ...
3.26
hadoop_AMRMProxyService_finishApplicationMaster_rdh
/** * This is called by the AMs started on this node to unregister from the RM. * This method does the initial authorization and then forwards the request to * the application instance specific interceptor chain. */ @Override public FinishApplicationMasterResponse finishApplicationMaster(FinishApplicationMasterRequ...
3.26
hadoop_FSTreeTraverser_traverseDir_rdh
/** * Iterate through all files directly inside parent, and recurse down * directories. The listing is done in batch, and can optionally start after * a position. The iteration of the inode tree is done in a depth-first * fashion. But instead of holding all {@link INodeDirectory}'s in memory * on the fly, only the...
3.26
hadoop_Result_isPass_rdh
/** * Should processing continue. * * @return if is pass true,not false. */ public boolean isPass() { return this.success; }
3.26