Uploaded image for project: 'Apache Knox'
  1. Apache Knox
  2. KNOX-818

Admin API PUT corrupts the topology file

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.11.0
    • Component/s: None
    • Labels:
      None

      Description

      When using the Admin API to PUT/save a topology file, the content doesn't always wind up being correct.

      For example when saving the sandbox topology:

      curl -iku admin:admin-password -H "Accept: application/xml" -H "Content-Type: application/xml" -T sandbox.xml -X PUT http://localhost:8443/gateway/admin/api/v1/topologies/sandbox

      The following is saved:

      <?xml version="1.0" encoding="UTF-8"?>
      <topology>
         <name>sandbox2</name>
         <gateway>
            <provider>
               <role>authentication</role>
               <name>ShiroProvider</name>
               <enabled>true</enabled>
            </provider>
            <provider>
               <role>identity-assertion</role>
               <name>Default</name>
               <enabled>true</enabled>
            </provider>
            <provider>
               <role>hostmap</role>
               <name>static</name>
               <enabled>true</enabled>
            </provider>
         </gateway>
         <service>
            <role>NAMENODE</role>
            <url>hdfs://localhost:8020</url>
         </service>
         <service>
            <role>JOBTRACKER</role>
            <url>rpc://localhost:8050</url>
         </service>
         <service>
            <role>WEBHDFS</role>
            <url>http://localhost:50070/webhdfs</url>
         </service>
         <service>
            <role>WEBHCAT</role>
            <url>http://localhost:50111/templeton</url>
         </service>
         <service>
            <role>OOZIE</role>
            <url>http://localhost:11000/oozie</url>
         </service>
         <service>
            <role>WEBHBASE</role>
            <url>http://localhost:60080</url>
         </service>
         <service>
            <role>HIVE</role>
            <url>http://localhost:10001/cliservice</url>
         </service>
         <service>
            <role>RESOURCEMANAGER</role>
            <url>http://localhost:8088/ws</url>
         </service>
         <service>
            <role>DRUID-COORDINATOR-UI</role>
            <url>http://localhost:8081</url>
         </service>
         <service>
            <role>DRUID-COORDINATOR</role>
            <url>http://localhost:8081</url>
         </service>
         <service>
            <role>DRUID-BROKER</role>
            <url>http://localhost:8082</url>
         </service>
         <service>
            <role>DRUID-ROUTER</role>
            <url>http://localhost:8082</url>
         </service>
         <service>
            <role>DRUID-OVERLORD</role>
            <url>http://localhost:8090</url>
         </service>
         <service>
            <role>DRUID-OVERLORD-UI</role>
            <url>http://localhost:8090</url>
         </service>
      </topology>
      

        Attachments

          Activity

            People

            • Assignee:
              sumit.gupta Sumit Gupta
              Reporter:
              sumit.gupta Sumit Gupta
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: