hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <j...@apache.org>
Subject [jira] [Work logged] (HDDS-2007) Make ozone fs shell command work with OM HA service ids
Date Fri, 06 Sep 2019 06:04:00 GMT

     [ https://issues.apache.org/jira/browse/HDDS-2007?focusedWorklogId=307649&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-307649
]

ASF GitHub Bot logged work on HDDS-2007:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 06/Sep/19 06:03
            Start Date: 06/Sep/19 06:03
    Worklog Time Spent: 10m 
      Work Description: bharatviswa504 commented on pull request #1360: HDDS-2007. Make ozone
fs shell command work with OM HA service ids	
URL: https://github.com/apache/hadoop/pull/1360#discussion_r321586333
 
 

 ##########
 File path: hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/ha/OMFailoverProxyProvider.java
 ##########
 @@ -70,26 +71,46 @@
   private final UserGroupInformation ugi;
   private final Text delegationTokenService;
 
+  // TODO: Do we want this to be final?
+  private String omServiceId;
+
   public OMFailoverProxyProvider(OzoneConfiguration configuration,
-      UserGroupInformation ugi) throws IOException {
+      UserGroupInformation ugi, String omServiceId) throws IOException {
     this.conf = configuration;
     this.omVersion = RPC.getProtocolVersion(OzoneManagerProtocolPB.class);
     this.ugi = ugi;
-    loadOMClientConfigs(conf);
+    this.omServiceId = omServiceId;
+    loadOMClientConfigs(conf, this.omServiceId);
     this.delegationTokenService = computeDelegationTokenService();
 
     currentProxyIndex = 0;
     currentProxyOMNodeId = omNodeIDList.get(currentProxyIndex);
   }
 
-  private void loadOMClientConfigs(Configuration config) throws IOException {
+  public OMFailoverProxyProvider(OzoneConfiguration configuration,
+      UserGroupInformation ugi) throws IOException {
+    this(configuration, ugi, null);
+  }
+
+  private void loadOMClientConfigs(Configuration config, String omSvcId)
+      throws IOException {
     this.omProxies = new HashMap<>();
     this.omProxyInfos = new HashMap<>();
     this.omNodeIDList = new ArrayList<>();
 
-    Collection<String> omServiceIds = config.getTrimmedStringCollection(
-        OZONE_OM_SERVICE_IDS_KEY);
+    Collection<String> omServiceIds;
+    if (omSvcId == null) {
 
 Review comment:
   ```
   if (omSvcId == null) {
         // When no OM service id is passed in
         // Note: this branch will only be followed when omSvcId is null,
         // meaning the host name/service id provided by user doesn't match any
         // ozone.om.service.ids on the client side. Therefore, in this case
         // just treat it as non-HA by assigning an empty list to omServiceIds
         omServiceIds = new ArrayList<>();
       } else {
         omServiceIds = Collections.singletonList(omSvcId);
       }
   ```
   
   Can be replaced with `omServiceIds = Collections.singletonList(omSvcId)`;  
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 307649)
    Time Spent: 1.5h  (was: 1h 20m)

> Make ozone fs shell command work with OM HA service ids
> -------------------------------------------------------
>
>                 Key: HDDS-2007
>                 URL: https://issues.apache.org/jira/browse/HDDS-2007
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>          Components: Ozone Client
>            Reporter: Siyao Meng
>            Assignee: Siyao Meng
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> Build an HDFS HA-like nameservice for OM HA so that Ozone client can access Ozone HA
cluster with ease.
> The majority of the work is already done in HDDS-972. But the problem is that the client
would crash if there are more than one service ids (ozone.om.service.ids) configured in ozone-site.xml.
This need to be address on client side.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message