You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by lp...@apache.org on 2017/10/30 15:21:23 UTC
[03/13] ambari git commit: AMBARI-22326. String formatting problems
AMBARI-22326. String formatting problems
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e455a642
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e455a642
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e455a642
Branch: refs/heads/feature-branch-AMBARI-21307
Commit: e455a642dd6f3b54354482b9b9cdef6f59af11b7
Parents: 4103b87
Author: Attila Doroszlai <ad...@hortonworks.com>
Authored: Fri Oct 27 14:28:44 2017 +0200
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Fri Oct 27 16:40:00 2017 +0200
----------------------------------------------------------------------
.../ambari/server/controller/internal/ServiceResourceProvider.java | 2 +-
.../java/org/apache/ambari/server/stack/MasterHostResolver.java | 2 +-
.../main/java/org/apache/ambari/server/state/UpgradeContext.java | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/e455a642/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java
index e65693b..e55a380 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java
@@ -435,7 +435,7 @@ public class ServiceResourceProvider extends AbstractControllerResourceProvider
if (repositoryVersion.getType() != RepositoryType.STANDARD
&& cluster.getProvisioningState() == State.INIT) {
throw new AmbariException(String.format(
- "Unable to add %s to %s because the cluster is still being provisioned and the repository for the service is not %s: $s",
+ "Unable to add %s to %s because the cluster is still being provisioned and the repository for the service is not %s: %s",
request.getServiceName(), cluster.getClusterName(), RepositoryType.STANDARD,
repositoryVersion));
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/e455a642/ambari-server/src/main/java/org/apache/ambari/server/stack/MasterHostResolver.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/stack/MasterHostResolver.java b/ambari-server/src/main/java/org/apache/ambari/server/stack/MasterHostResolver.java
index fc657c1..99211cb 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/stack/MasterHostResolver.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/stack/MasterHostResolver.java
@@ -310,7 +310,7 @@ public class MasterHostResolver {
if (!componentHosts.contains(hp.host)){
//This may happen when NN HA is configured on dual network card machines with public/private FQDNs.
LOG.error(
- String.format(
+ MessageFormat.format(
"Hadoop NameNode HA configuration {0} contains host {1} that does not exist in the NameNode hosts list {3}",
key, hp.host, componentHosts.toString()));
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/e455a642/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeContext.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeContext.java b/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeContext.java
index cb44adb..2b91bac 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeContext.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeContext.java
@@ -1197,7 +1197,7 @@ public class UpgradeContext {
} catch (NoSuchResourceException|SystemException|UnsupportedPropertyException|NoSuchParentResourceException e) {
throw new AmbariException(
String.format("Unable to perform %s. Prerequisite checks could not be run",
- direction.getText(false), e));
+ direction.getText(false)), e);
}
List<Resource> failedResources = new LinkedList<>();