[ https://issues.apache.org/jira/browse/HADOOP-17795?focusedWorklogId=621615&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-621615 ]
ASF GitHub Bot logged work on HADOOP-17795: ------------------------------------------- Author: ASF GitHub Bot Created on: 12/Jul/21 19:58 Start Date: 12/Jul/21 19:58 Worklog Time Spent: 10m Work Description: virajjasani commented on a change in pull request #3192: URL: https://github.com/apache/hadoop/pull/3192#discussion_r667852647 ########## File path: hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java ########## @@ -714,13 +714,40 @@ private String getQueueClassPrefix() { return CommonConfigurationKeys.IPC_NAMESPACE + "." + port; } + @Deprecated static Class<? extends BlockingQueue<Call>> getQueueClass( String prefix, Configuration conf) { String name = prefix + "." + CommonConfigurationKeys.IPC_CALLQUEUE_IMPL_KEY; Class<?> queueClass = conf.getClass(name, LinkedBlockingQueue.class); return CallQueueManager.convertQueueClass(queueClass, Call.class); } + /** + * Return class configured by property 'ipc.<port>.callqueue.impl'. If the + * config is not present, default config (without port) is used to derive + * class 'ipc.callqueue.impl' and returned if class value is present and + * valid. If default config is also not present, default + * class {@link LinkedBlockingQueue} is returned. + * + * @param namespace Namespace "ipc". + * @param port Server's listener port. + * @param conf Configuration properties. + * @return Class returned based on configuration. + */ + static Class<? extends BlockingQueue<Call>> getQueueClass( + String namespace, int port, Configuration conf) { + String nameWithPort = namespace + "." + port + "." + + CommonConfigurationKeys.IPC_CALLQUEUE_IMPL_KEY; + String nameWithoutPort = namespace + "." Review comment: Done ########## File path: hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java ########## @@ -746,6 +773,50 @@ private String getQueueClassPrefix() { return CallQueueManager.convertSchedulerClass(schedulerClass); } + /** + * Return class configured by property 'ipc.<port>.scheduler.impl'. If the + * config is not present, and if property 'ipc.<port>.callqueue.impl' + * represents FairCallQueue class, return DecayRpcScheduler. If that config + * does not have value FairCallQueue, default config (without port) is used + * to derive class 'ipc.scheduler.impl'. If default config is also not + * present, default class {@link DefaultRpcScheduler} is returned. + * + * @param namespace Namespace "ipc". + * @param port Server's listener port. + * @param conf Configuration properties. + * @return Class returned based on configuration. + */ + static Class<? extends RpcScheduler> getSchedulerClass( + String namespace, int port, Configuration conf) { + String schedulerKeyNameWithPort = namespace + "." + port + "." + + CommonConfigurationKeys.IPC_SCHEDULER_IMPL_KEY; + String schedulerKeyNameWithoutPort = namespace + "." Review comment: Done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 621615) Time Spent: 1h (was: 50m) > Provide fallbacks for callqueue.impl and scheduler.impl > ------------------------------------------------------- > > Key: HADOOP-17795 > URL: https://issues.apache.org/jira/browse/HADOOP-17795 > Project: Hadoop Common > Issue Type: Sub-task > Reporter: Viraj Jasani > Assignee: Viraj Jasani > Priority: Major > Labels: pull-request-available > Time Spent: 1h > Remaining Estimate: 0h > > As mentioned in parent Jira, we should provide default properties forĀ > callqueue.impl and scheduler.impl such that if properties with port is not > configured, we can fallback to default property. If "ipc.8020.callqueue.impl" > is not present, fallback property could be "ipc.callqueue.impl" (without > port). We can take up rest of the callqueue properties in separate sub-tasks. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org