You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ol...@apache.org on 2016/12/12 15:59:40 UTC
[1/3] ambari git commit: AMBARI-19158. Plugin configuration ignored
when directly running checkstyle goals (Attila Doroszlai via oleewere)
Repository: ambari
Updated Branches:
refs/heads/trunk baad9b9cd -> 076ed757b
AMBARI-19158. Plugin configuration ignored when directly running checkstyle goals (Attila Doroszlai via oleewere)
Change-Id: Iaf65354eec0adfcf9a2dc7bb0cdb1356f81099b9
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cc564583
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cc564583
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cc564583
Branch: refs/heads/trunk
Commit: cc5645831dfcb59b9318bd29eea5a741ba7097be
Parents: baad9b9
Author: Attila Doroszlai <ad...@hortonworks.com>
Authored: Mon Dec 12 16:55:24 2016 +0100
Committer: oleewere <ol...@gmail.com>
Committed: Mon Dec 12 16:57:31 2016 +0100
----------------------------------------------------------------------
ambari-project/pom.xml | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/cc564583/ambari-project/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-project/pom.xml b/ambari-project/pom.xml
index b00be38..f3476d7 100644
--- a/ambari-project/pom.xml
+++ b/ambari-project/pom.xml
@@ -497,18 +497,18 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
+ <configuration>
+ <configLocation>${project.basedir}/checkstyle.xml</configLocation>
+ <encoding>UTF-8</encoding>
+ <consoleOutput>true</consoleOutput>
+ <failsOnError>true</failsOnError>
+ <linkXRef>false</linkXRef>
+ <skip>${checkstyle.skip}</skip>
+ </configuration>
<executions>
<execution>
<id>checkstyle</id>
<phase>test</phase>
- <configuration>
- <configLocation>${project.basedir}/checkstyle.xml</configLocation>
- <encoding>UTF-8</encoding>
- <consoleOutput>true</consoleOutput>
- <failsOnError>true</failsOnError>
- <linkXRef>false</linkXRef>
- <skip>${checkstyle.skip}</skip>
- </configuration>
<goals>
<goal>check</goal>
</goals>
[3/3] ambari git commit: AMBARI-19149. Code cleanup: fallthrough
(Attila Doroszlai via oleewere)
Posted by ol...@apache.org.
AMBARI-19149. Code cleanup: fallthrough (Attila Doroszlai via oleewere)
Change-Id: I6925a08c0ebe7c12b26691646d3c335342913b2e
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/076ed757
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/076ed757
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/076ed757
Branch: refs/heads/trunk
Commit: 076ed757b83a5d6907f7239f6de1334c81aeecc7
Parents: e990fb8
Author: Attila Doroszlai <ad...@hortonworks.com>
Authored: Mon Dec 12 16:58:54 2016 +0100
Committer: oleewere <ol...@gmail.com>
Committed: Mon Dec 12 16:58:54 2016 +0100
----------------------------------------------------------------------
ambari-server/checkstyle.xml | 2 ++
.../request/eventcreator/UserEventCreator.java | 1 +
.../ambari/server/controller/ControllerModule.java | 1 +
.../apache/ambari/server/orm/DBAccessorImpl.java | 1 +
.../ambari/server/stack/ConfigurationDirectory.java | 15 ++++++++++-----
.../java/org/apache/ambari/server/state/State.java | 3 +++
.../apache/ambari/server/agent/TestActionQueue.java | 16 +++++++++-------
7 files changed, 27 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/076ed757/ambari-server/checkstyle.xml
----------------------------------------------------------------------
diff --git a/ambari-server/checkstyle.xml b/ambari-server/checkstyle.xml
index 81f6380..b1c3c4a 100644
--- a/ambari-server/checkstyle.xml
+++ b/ambari-server/checkstyle.xml
@@ -13,5 +13,7 @@
<module name="Checker">
<module name="TreeWalker">
<module name="AvoidTransactionalOnPrivateMethodsCheck"/>
+
+ <module name="FallThrough"/>
</module>
</module>
http://git-wip-us.apache.org/repos/asf/ambari/blob/076ed757/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/UserEventCreator.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/UserEventCreator.java b/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/UserEventCreator.java
index bc469ac..f8eb670 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/UserEventCreator.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/UserEventCreator.java
@@ -137,6 +137,7 @@ public class UserEventCreator implements RequestAuditEventCreator {
.withAffectedUsername(getUsername(request))
.build();
}
+ break;
default:
break;
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/076ed757/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
index 053031b..8058515 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
@@ -228,6 +228,7 @@ public class ControllerModule extends AbstractModule {
properties.setProperty(JDBC_DRIVER, Configuration.JDBC_IN_MEMORY_DRIVER);
properties.setProperty(DDL_GENERATION, DROP_AND_CREATE);
properties.setProperty(THROW_EXCEPTIONS, "true");
+ break;
case REMOTE:
properties.setProperty(JDBC_URL, configuration.getDatabaseUrl());
properties.setProperty(JDBC_DRIVER, configuration.getDatabaseDriver());
http://git-wip-us.apache.org/repos/asf/ambari/blob/076ed757/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java
index 123fa96..39e8488 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java
@@ -1247,6 +1247,7 @@ public class DBAccessorImpl implements DBAccessor {
case POSTGRES:
case SQL_ANYWHERE:
builder.append(String.format("ALTER %s SET DEFAULT %s", column.getName(), defaultValue));
+ break;
case ORACLE:
builder.append(String.format("MODIFY %s DEFAULT %s", column.getName(), defaultValue));
break;
http://git-wip-us.apache.org/repos/asf/ambari/blob/076ed757/ambari-server/src/main/java/org/apache/ambari/server/stack/ConfigurationDirectory.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/stack/ConfigurationDirectory.java b/ambari-server/src/main/java/org/apache/ambari/server/stack/ConfigurationDirectory.java
index cfdf9fc..0301f13 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/stack/ConfigurationDirectory.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/stack/ConfigurationDirectory.java
@@ -148,24 +148,29 @@ public class ConfigurationDirectory extends StackDefinitionDirectory {
if (propertyFile.exists() && propertyFile.isFile()) {
try {
String propertyValue = FileUtils.readFileToString(propertyFile);
+ boolean valid = true;
switch (propertyFileType.toLowerCase()) {
case "xml" :
if (!XmlUtils.isValidXml(propertyValue)) {
+ valid = false;
LOG.error("Failed to load value from property file. Property file {} is not a valid XML file", propertyFilePath);
- break;
}
- pi.setValue(propertyValue);
break;
case "json":
- if(!JsonUtils.isValidJson(propertyValue)) {
+ if (!JsonUtils.isValidJson(propertyValue)) {
+ valid = false;
LOG.error("Failed to load value from property file. Property file {} is not a valid JSON file", propertyFilePath);
- break;
}
+ break;
case "text":
+ // fallthrough
default:
- pi.setValue(propertyValue);
+ // no validity check
break;
}
+ if (valid) {
+ pi.setValue(propertyValue);
+ }
} catch (IOException e) {
LOG.error("Failed to load value from property file {}. Error Message {}", propertyFilePath, e.getMessage());
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/076ed757/ambari-server/src/main/java/org/apache/ambari/server/state/State.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/State.java b/ambari-server/src/main/java/org/apache/ambari/server/state/State.java
index c3f30c3..7e83f87 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/State.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/State.java
@@ -166,18 +166,21 @@ public enum State {
|| startState == State.UNINSTALLING) {
return true;
}
+ break;
case INIT:
if (startState == State.UNINSTALLED
|| startState == State.INIT
|| startState == State.WIPING_OUT) {
return true;
}
+ break;
case DISABLED:
if (startState == State.INSTALLED
|| startState == State.INSTALL_FAILED
|| startState == State.UNKNOWN) {
return true;
}
+ break;
}
return false;
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/076ed757/ambari-server/src/test/java/org/apache/ambari/server/agent/TestActionQueue.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/agent/TestActionQueue.java b/ambari-server/src/test/java/org/apache/ambari/server/agent/TestActionQueue.java
index 632750b..869f5fd 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/agent/TestActionQueue.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/agent/TestActionQueue.java
@@ -75,19 +75,21 @@ public class TestActionQueue {
public void run() {
try {
switch (operation) {
- case ENQUEUE:
- enqueueOp();
- break;
- case DEQUEUE:
- dequeueOp();
- break;
+ case ENQUEUE:
+ enqueueOp();
+ break;
+ case DEQUEUE:
+ dequeueOp();
+ break;
case DEQUEUEALL:
dequeueAllOp();
+ break;
case CHECKPENDING:
checkPending();
+ break;
case UPDATEHOSTLIST:
updateHostList();
- break;
+ break;
}
} catch (Exception ex) {
LOG.error("Failure", ex);
[2/3] ambari git commit: AMBARI-19160. Add ReviewBoard config file
(Attila Doroszlai via oleewere)
Posted by ol...@apache.org.
AMBARI-19160. Add ReviewBoard config file (Attila Doroszlai via oleewere)
Change-Id: Ifb231bc52531ac95367be7e30834b260b5ff5fc1
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e990fb8f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e990fb8f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e990fb8f
Branch: refs/heads/trunk
Commit: e990fb8fcb6b2678b0c0c32f2689065a3f6616b3
Parents: cc56458
Author: Attila Doroszlai <ad...@hortonworks.com>
Authored: Mon Dec 12 16:56:48 2016 +0100
Committer: oleewere <ol...@gmail.com>
Committed: Mon Dec 12 16:57:56 2016 +0100
----------------------------------------------------------------------
.reviewboardrc | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/e990fb8f/.reviewboardrc
----------------------------------------------------------------------
diff --git a/.reviewboardrc b/.reviewboardrc
new file mode 100644
index 0000000..162eee7
--- /dev/null
+++ b/.reviewboardrc
@@ -0,0 +1,19 @@
+# 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
+
+REVIEWBOARD_URL = 'https://reviews.apache.org'
+REPOSITORY = 'ambari'
+
+# Default value for the request's Reviewers > Groups field
+TARGET_GROUPS = 'Ambari'