Author: mahadev
Date: Thu Jan 31 01:07:57 2013
New Revision: 1440776
URL: http://svn.apache.org/viewvc?rev=1440776&view=rev
Log:
AMBARI-1314. Hostname test is failing in some environments. (Nate Cole via
mahadev)
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-agent/pom.xml
incubator/ambari/trunk/ambari-agent/src/test/python/TestHostname.py
incubator/ambari/trunk/ambari-project/pom.xml
incubator/ambari/trunk/ambari-server/pom.xml
incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/controller/ganglia/GangliaPropertyProvider.java
incubator/ambari/trunk/pom.xml
Modified: incubator/ambari/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1440776&r1=1440775&r2=1440776&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Thu Jan 31 01:07:57 2013
@@ -350,6 +350,11 @@ Trunk (unreleased changes):
AMBARI-1285. Some host Ganglia metrics may be missing in some cases.
(tbeerbower)
+ AMBARI-1310. Get rid of mvn warnings. (Arun Kumar via mahadev)
+
+ AMBARI-1314. Hostname test is failing in some environments. (Nate Cole via
+ mahadev)
+
AMBARI-1.2.0 branch:
INCOMPATIBLE CHANGES
Modified: incubator/ambari/trunk/ambari-agent/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/pom.xml?rev=1440776&r1=1440775&r2=1440776&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/pom.xml (original)
+++ incubator/ambari/trunk/ambari-agent/pom.xml Thu Jan 31 01:07:57 2013
@@ -30,6 +30,7 @@
<name>Ambari Agent</name>
<description>Ambari Agent</description>
<properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<final.name>${project.artifactId}-${project.version}</final.name>
<package.release>1</package.release>
<package.prefix>/usr</package.prefix>
@@ -60,6 +61,10 @@
<build>
<plugins>
<plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.0</version>
+ </plugin>
+ <plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<tarLongFileMode>gnu</tarLongFileMode>
Modified: incubator/ambari/trunk/ambari-agent/src/test/python/TestHostname.py
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/test/python/TestHostname.py?rev=1440776&r1=1440775&r2=1440776&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/test/python/TestHostname.py
(original)
+++ incubator/ambari/trunk/ambari-agent/src/test/python/TestHostname.py Thu Jan
31 01:07:57 2013
@@ -20,7 +20,7 @@ limitations under the License.
from unittest import TestCase
import ambari_agent.hostname as hostname
-from ambari_agent.AmbariConfig import AmbariConfig
+import ambari_agent.AmbariConfig as AmbariConfig
import socket
import tempfile
import shutil
@@ -33,21 +33,24 @@ class TestHostname(TestCase):
pass
def test_hostname_override(self):
- tmpname = tempfile.mkstemp(text=True)[1]
+ fd = tempfile.mkstemp(text=True)
+ tmpname = fd[1]
+ os.close(fd[0])
os.chmod(tmpname, os.stat(tmpname).st_mode | stat.S_IXUSR)
tmpfile = file(tmpname, "w+")
+ config = AmbariConfig.config
try:
tmpfile.write("#!/bin/sh\n\necho 'test.example.com'")
tmpfile.close()
- config = AmbariConfig().getConfig()
config.set('agent', 'hostname_script', tmpname)
self.assertEquals(hostname.hostname(), 'test.example.com', "expected
hostname 'test.example.com'")
finally:
os.remove(tmpname)
+ config.remove_option('agent', 'hostname_script')
pass
Modified: incubator/ambari/trunk/ambari-project/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-project/pom.xml?rev=1440776&r1=1440775&r2=1440776&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-project/pom.xml (original)
+++ incubator/ambari/trunk/ambari-project/pom.xml Thu Jan 31 01:07:57 2013
@@ -25,6 +25,9 @@
<description>Apache Ambari Project POM</description>
<name>Apache Ambari Project POM</name>
<packaging>pom</packaging>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
<pluginRepositories>
<pluginRepository>
<id>maven2-repository.dev.java.net</id>
@@ -361,6 +364,10 @@
</pluginManagement>
<plugins>
<plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.0</version>
+ </plugin>
+ <plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<configuration combine.self="override"/>
Modified: incubator/ambari/trunk/ambari-server/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/pom.xml?rev=1440776&r1=1440775&r2=1440776&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/pom.xml (original)
+++ incubator/ambari/trunk/ambari-server/pom.xml Thu Jan 31 01:07:57 2013
@@ -27,11 +27,16 @@
<version>1.2.0-SNAPSHOT</version>
<description>Ambari Server</description>
<properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<python.ver>python >= 2.6</python.ver>
</properties>
<build>
<plugins>
<plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.0</version>
+ </plugin>
+ <plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
Modified:
incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/controller/ganglia/GangliaPropertyProvider.java
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/controller/ganglia/GangliaPropertyProvider.java?rev=1440776&r1=1440775&r2=1440776&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/controller/ganglia/GangliaPropertyProvider.java
(original)
+++
incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/controller/ganglia/GangliaPropertyProvider.java
Thu Jan 31 01:07:57 2013
@@ -133,6 +133,7 @@ public abstract class GangliaPropertyPro
/**
* Get the ganglia cluster name for the given resource.
*
+ *
* @param resource the resource
*
* @return the ganglia cluster name
Modified: incubator/ambari/trunk/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/pom.xml?rev=1440776&r1=1440775&r2=1440776&view=diff
==============================================================================
--- incubator/ambari/trunk/pom.xml (original)
+++ incubator/ambari/trunk/pom.xml Thu Jan 31 01:07:57 2013
@@ -23,6 +23,9 @@
<name>Ambari Main</name>
<version>1.2.0-SNAPSHOT</version>
<description>Ambari</description>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
<pluginRepositories>
<pluginRepository>
<id>maven2-repository.dev.java.net</id>
@@ -66,6 +69,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
+ <version>3.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>