Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Windows build for 2 Ambari Metrics service: Host Monitoring and Timel…
…ine Service (Collector). + Added Windows profiles to the Maven project files + Added the necessary Windows assemblies + Created Windows service skeletons + Host Monitoring: added OS-independent process termination handler + Collector: added debugging support for the Java process + Fixed services shutdown, especially when joining spawned threads + Fixed unit tests + Added support for unit testing on MacOS and Windows Windows-specific: + Moved the assembly descriptors to ambari-metrics-assembly + Fixed comments in the configuration files + Added soft dependencies on the embedded HBase service + Added support for the embedded HBase service setup
- Loading branch information
Showing
36 changed files
with
2,238 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# 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. | ||
|
||
import inspect | ||
import os | ||
|
||
class ConvertToXml: | ||
"Template class, allow to output fields in xml format" | ||
def getField(self): | ||
return [name for name, obj in inspect.getmembers(self) | ||
if not name.startswith("__") and not inspect.isroutine(obj)] | ||
|
||
def attributesToXml(self): | ||
result = "" | ||
listOfAttr = self.getField() | ||
for attrName in listOfAttr: | ||
result += "<" + attrName + ">" | ||
result += str(getattr(self, attrName)) | ||
result += "</" + attrName + ">\n" | ||
return result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
101 changes: 101 additions & 0 deletions
101
ambari-metrics/ambari-metrics-assembly/src/main/assembly/collector-windows.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
<?xml version="1.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. | ||
--> | ||
|
||
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd"> | ||
<id>collector</id> | ||
<formats> | ||
<format>dir</format> | ||
</formats> | ||
<includeBaseDirectory>false</includeBaseDirectory> | ||
<fileSets> | ||
<fileSet> | ||
<directory>${collector.dir}/target/embedded/${hbase.folder}</directory> | ||
<outputDirectory>hbase</outputDirectory> | ||
</fileSet> | ||
<fileSet> | ||
<directory>${collector.dir}/conf/windows</directory> | ||
<outputDirectory>/</outputDirectory> | ||
<includes> | ||
<include>ambari-metrics-collector.cmd</include> | ||
</includes> | ||
</fileSet> | ||
<fileSet> | ||
<directory>${collector.dir}/conf/windows</directory> | ||
<outputDirectory>conf</outputDirectory> | ||
<includes> | ||
<include>ams.properties</include> | ||
<include>ams-env.cmd</include> | ||
<include>ams-site.xml</include> | ||
<include>log4j.properties</include> | ||
</includes> | ||
</fileSet> | ||
<fileSet> | ||
<directory>${collector.dir}/target/lib</directory> | ||
<outputDirectory>lib</outputDirectory> | ||
</fileSet> | ||
<fileSet> | ||
<directory>${collector.dir}/src/main/python</directory> | ||
<outputDirectory>/sbin</outputDirectory> | ||
<includes> | ||
<include>*.py</include> | ||
</includes> | ||
</fileSet> | ||
<fileSet> | ||
<directory>${collector.dir}/src/main/python/ambari_metrics_collector</directory> | ||
<outputDirectory>/sbin/ambari_metrics_collector</outputDirectory> | ||
<includes> | ||
<include>*.py</include> | ||
</includes> | ||
</fileSet> | ||
<fileSet> | ||
<directory>${project.basedir}/../../ambari-common/src/main/python/ambari_commons</directory> | ||
<outputDirectory>/sbin/ambari_commons</outputDirectory> | ||
<includes> | ||
<include>*.py</include> | ||
</includes> | ||
</fileSet> | ||
<fileSet> | ||
<directory>${project.basedir}/../../ambari-common/src/main/python/ambari_commons/resources</directory> | ||
<outputDirectory>/sbin/ambari_commons/resources</outputDirectory> | ||
<includes> | ||
<include>*.json</include> | ||
</includes> | ||
</fileSet> | ||
</fileSets> | ||
<dependencySets> | ||
<dependencySet> | ||
<unpack>false</unpack> | ||
<outputDirectory>hbase/lib</outputDirectory> | ||
<useProjectArtifact>false</useProjectArtifact> | ||
<includes> | ||
<include>org.antlr:antlr*</include> | ||
<include>org.apache.phoenix:phoenix-core</include> | ||
</includes> | ||
</dependencySet> | ||
<dependencySet> | ||
<unpack>false</unpack> | ||
<outputDirectory>lib</outputDirectory> | ||
<useProjectArtifact>false</useProjectArtifact> | ||
<includes> | ||
<include>org.apache.ambari:ambari-metrics-timelineservice</include> | ||
</includes> | ||
</dependencySet> | ||
</dependencySets> | ||
</assembly> |
Oops, something went wrong.