HDFS-13298. Ozone: Make ozone/hdsl/cblock modules turned off by default. 
Contributed by  Elek, Marton.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/542e0d34
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/542e0d34
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/542e0d34

Branch: refs/heads/HDFS-7240
Commit: 542e0d34234d4ea47d7e3bf96da3b2dc7de931c6
Parents: 1f74cb2
Author: Anu Engineer <[email protected]>
Authored: Fri Mar 16 13:27:29 2018 -0700
Committer: Anu Engineer <[email protected]>
Committed: Fri Mar 16 13:27:29 2018 -0700

----------------------------------------------------------------------
 dev-support/bin/dist-layout-stitching           |   4 -
 hadoop-dist/pom.xml                             |  82 +++--
 hadoop-hdsl/framework/pom.xml                   |   6 +-
 .../framework/src/main/webapps/datanode/dn.js   |  92 -----
 .../main/webapps/static/angular-1.6.4.min.js    | 332 -----------------
 .../webapps/static/angular-nvd3-1.0.9.min.js    |   1 -
 .../webapps/static/angular-route-1.6.4.min.js   |  17 -
 .../src/main/webapps/static/d3-3.5.17.min.js    |   5 -
 .../src/main/webapps/static/dfs-dust.js         | 133 -------
 .../src/main/webapps/static/nvd3-1.8.5.min.css  |   2 -
 .../main/webapps/static/nvd3-1.8.5.min.css.map  |   1 -
 .../src/main/webapps/static/nvd3-1.8.5.min.js   |  11 -
 .../main/webapps/static/nvd3-1.8.5.min.js.map   |   1 -
 .../framework/src/main/webapps/static/ozone.css |  60 ----
 .../framework/src/main/webapps/static/ozone.js  | 355 -------------------
 .../main/webapps/static/templates/config.html   |  91 -----
 .../src/main/webapps/static/templates/jvm.html  |  26 --
 .../src/main/webapps/static/templates/menu.html |  60 ----
 .../main/webapps/static/templates/overview.html |  39 --
 .../webapps/static/templates/rpc-metrics.html   |  87 -----
 hadoop-hdsl/server-scm/pom.xml                  |  24 ++
 hadoop-ozone/ozone-manager/pom.xml              |  24 ++
 hadoop-tools/hadoop-tools-dist/pom.xml          |  21 +-
 hadoop-tools/pom.xml                            |  13 +-
 pom.xml                                         |  14 +-
 25 files changed, 134 insertions(+), 1367 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/542e0d34/dev-support/bin/dist-layout-stitching
----------------------------------------------------------------------
diff --git a/dev-support/bin/dist-layout-stitching 
b/dev-support/bin/dist-layout-stitching
index 5579435..94f4778 100755
--- a/dev-support/bin/dist-layout-stitching
+++ b/dev-support/bin/dist-layout-stitching
@@ -141,10 +141,6 @@ run copy 
"${ROOT}/hadoop-ozone/tools/target/hadoop-ozone-tools-${VERSION}" .
 run copy 
"${ROOT}/hadoop-ozone/objectstore-service/target/hadoop-ozone-objectstore-service-${VERSION}"
 .
 run copy "${ROOT}/hadoop-cblock/server/target/hadoop-cblock-server-${VERSION}" 
.
 run copy "${ROOT}/hadoop-cblock/tools/target/hadoop-cblock-tools-${VERSION}" .
-run cp -r 
"${ROOT}/hadoop-hdsl/framework/target/hadoop-hdsl-server-framework-${VERSION}/share/hadoop/hdsl/webapps/static"
 share/hadoop/ozone/webapps/
-run cp -r 
"${ROOT}/hadoop-hdfs-project/hadoop-hdfs/target/hadoop-hdfs-${VERSION}/share/hadoop/hdfs/webapps/static"
 share/hadoop/ozone/webapps/
-run cp -r 
"${ROOT}/hadoop-hdfs-project/hadoop-hdfs/target/hadoop-hdfs-${VERSION}/share/hadoop/hdfs/webapps/static"
 share/hadoop/hdsl/webapps/
-
 
 run copy "${ROOT}/hadoop-yarn-project/target/hadoop-yarn-project-${VERSION}" .
 run copy "${ROOT}/hadoop-mapreduce-project/target/hadoop-mapreduce-${VERSION}" 
.

http://git-wip-us.apache.org/repos/asf/hadoop/blob/542e0d34/hadoop-dist/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-dist/pom.xml b/hadoop-dist/pom.xml
index 4f68ace..6d4798e 100644
--- a/hadoop-dist/pom.xml
+++ b/hadoop-dist/pom.xml
@@ -69,42 +69,6 @@
       <scope>provided</scope>
     </dependency>
 
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-ozone-ozone-manager</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-hdsl-server-scm</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-hdsl-tools</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-cblock-server</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-hdsl-container-service</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-ozone-objectstore-service</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-hdsl-tools</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-ozone-tools</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-cblock-tools</artifactId>
-    </dependency>
 
   </dependencies>
 
@@ -290,6 +254,52 @@
         </plugins>
       </build>
     </profile>
+
+    <profile>
+      <id>hdsl</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+      <dependencies>
+
+        <dependency>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-ozone-ozone-manager</artifactId>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-hdsl-server-scm</artifactId>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-hdsl-tools</artifactId>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-cblock-server</artifactId>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-hdsl-container-service</artifactId>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-ozone-objectstore-service</artifactId>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-hdsl-tools</artifactId>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-ozone-tools</artifactId>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-cblock-tools</artifactId>
+        </dependency>
+      </dependencies>
+    </profile>
   </profiles>
 
 </project>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/542e0d34/hadoop-hdsl/framework/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-hdsl/framework/pom.xml b/hadoop-hdsl/framework/pom.xml
index 161a1e6..2c38573 100644
--- a/hadoop-hdsl/framework/pom.xml
+++ b/hadoop-hdsl/framework/pom.xml
@@ -87,9 +87,9 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd";>
             </goals>
             <configuration>
               <target>
-                <copy toDir="${project.build.directory}/webapps">
-                  <fileset dir="${basedir}/src/main/webapps">
-                    <exclude name="**/proto-web.xml"/>
+                <copy 
toDir="${project.build.directory}/classes/webapps/static">
+                  <fileset
+                          
dir="${basedir}/../../hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static">
                   </fileset>
                 </copy>
               </target>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/542e0d34/hadoop-hdsl/framework/src/main/webapps/datanode/dn.js
----------------------------------------------------------------------
diff --git a/hadoop-hdsl/framework/src/main/webapps/datanode/dn.js 
b/hadoop-hdsl/framework/src/main/webapps/datanode/dn.js
deleted file mode 100644
index 3b67167..0000000
--- a/hadoop-hdsl/framework/src/main/webapps/datanode/dn.js
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-(function () {
-  "use strict";
-
-  var data = {ozone: {enabled: false}};
-
-  dust.loadSource(dust.compile($('#tmpl-dn').html(), 'dn'));
-
-  function loadDatanodeInfo() {
-    $.get('/jmx?qry=Hadoop:service=DataNode,name=DataNodeInfo', function(resp) 
{
-      data.dn = workaround(resp.beans[0]);
-      data.dn.HostName = resp.beans[0]['DatanodeHostname'];
-      render();
-    }).fail(show_err_msg);
-  }
-
-  function loadOzoneScmInfo() {
-        
$.get('/jmx?qry=Hadoop:service=OzoneDataNode,name=SCMConnectionManager', 
function (resp) {
-            if (resp.beans.length > 0) {
-                data.ozone.SCMServers = resp.beans[0].SCMServers;
-                data.ozone.enabled = true;
-                render();
-            }
-        }).fail(show_err_msg);
-  }
-
-  function loadOzoneStorageInfo() {
-        
$.get('/jmx?qry=Hadoop:service=OzoneDataNode,name=ContainerLocationManager', 
function (resp) {
-            if (resp.beans.length > 0) {
-                data.ozone.LocationReport = resp.beans[0].LocationReport;
-                data.ozone.enabled = true;
-                render();
-            }
-        }).fail(show_err_msg);
-    }
-
-  function workaround(dn) {
-    function node_map_to_array(nodes) {
-      var res = [];
-      for (var n in nodes) {
-        var p = nodes[n];
-        p.name = n;
-        res.push(p);
-      }
-      return res;
-    }
-
-    dn.VolumeInfo = node_map_to_array(JSON.parse(dn.VolumeInfo));
-    dn.BPServiceActorInfo = JSON.parse(dn.BPServiceActorInfo);
-
-    return dn;
-  }
-
-  function render() {
-    var base = dust.makeBase({
-      'helper_relative_time' : function (chunk, ctx, bodies, params) {
-        var value = dust.helpers.tap(params.value, chunk, ctx);
-        return chunk.write(moment().subtract(Number(value), 
'seconds').fromNow(true));
-      }
-    });
-    dust.render('dn', base.push(data), function(err, out) {
-      $('#tab-overview').html(out);
-      $('#tab-overview').addClass('active');
-    });
-  }
-
-  function show_err_msg() {
-    $('#alert-panel-body').html("Failed to load datanode information");
-    $('#alert-panel').show();
-  }
-
-    loadDatanodeInfo();
-    loadOzoneScmInfo();
-    loadOzoneStorageInfo();
-
-})();


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to