[ 
https://issues.apache.org/jira/browse/TAJO-704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14096459#comment-14096459
 ] 

ASF GitHub Bot commented on TAJO-704:
-------------------------------------

Github user jihoonson commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/77#discussion_r16218468
  
    --- Diff: tajo-client/src/main/java/org/apache/tajo/client/TajoAdmin.java 
---
    @@ -416,12 +420,41 @@ public void processKill(Writer writer, String 
queryIdStr)
     
       private void processMasters(Writer writer) throws ParseException, 
IOException,
           ServiceException, SQLException {
    -    String confMasterServiceAddr = 
tajoClient.getConf().getVar(TajoConf.ConfVars.TAJO_MASTER_UMBILICAL_RPC_ADDRESS);
    -    InetSocketAddress masterAddress = 
NetUtils.createSocketAddr(confMasterServiceAddr);
    -    writer.write(masterAddress.getHostName());
    -    writer.write("\n");
    +    checkMasterStatus();
    +    if (tajoConf.getBoolVar(TajoConf.ConfVars.TAJO_MASTER_HA_ENABLE)) {
    +
    +      List<String> list = HAServiceUtil.getMasters(tajoConf);
    +      int i = 0;
    +      for (String master : list) {
    +        if (i > 0) {
    +          writer.write(" ");
    +        }
    +        writer.write(master);
    +        i++;
    +      }
    +      writer.write("\n");
    +    } else {
    +      String confMasterServiceAddr = 
tajoClient.getConf().getVar(TajoConf.ConfVars.TAJO_MASTER_UMBILICAL_RPC_ADDRESS);
    +      InetSocketAddress masterAddress = 
NetUtils.createSocketAddr(confMasterServiceAddr);
    +      writer.write(masterAddress.getHostName());
    +      writer.write("\n");
    +    }
       }
     
    +  // In TajoMaster HA mode, if TajoAdmin can't connect existing active 
master,
    +  // this should try to connect new active master.
    +  private void checkMasterStatus() {
    --- End diff --
    
    TajoAdmin.checkMasterStatus() function has the same name and shares some 
codes with TajoCli.checkMasterStatus(). We can move these functions to one 
location such as HAServiceUtil, because it will help the code maintainance.


> TajoMaster HA
> -------------
>
>                 Key: TAJO-704
>                 URL: https://issues.apache.org/jira/browse/TAJO-704
>             Project: Tajo
>          Issue Type: New Feature
>          Components: tajo master
>    Affects Versions: 0.9.0
>            Reporter: Jaehwa Jung
>            Assignee: Jaehwa Jung
>             Fix For: 0.9.0
>
>         Attachments: TAJO-704.Henrick.01.patch.txt, TajoMasterHAdraft.pdf
>
>
> TajoMaster is a Single Point of Failure in a Tajo Cluster because TajoMaster 
> is the central controlling entity for all components of the Tajo system. 
> TajoMaster failure prevents clients from submitting new queries to the 
> cluster, and results in the disruption of the ability to run insert overwrite 
> queries because the TajoWorker can’t apply its statistical information to 
> CatalogStore. Therefore, the high-availability (HA) of TajoMaster is 
> essential for the high-availability of Tajo generally. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to