ambari git commit: AMBARI-9698. Publish contrib/views artifacts to Maven repository. (yusaku)

2015-02-18 Thread yusaku
Repository: ambari
Updated Branches:
  refs/heads/trunk ab1c91993 -> 0c6ca6bb4


AMBARI-9698. Publish contrib/views artifacts to Maven repository. (yusaku)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0c6ca6bb
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0c6ca6bb
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0c6ca6bb

Branch: refs/heads/trunk
Commit: 0c6ca6bb462980860742a4837d7c4a3e74b30de4
Parents: ab1c919
Author: Yusaku Sako 
Authored: Wed Feb 18 23:37:07 2015 -0800
Committer: Yusaku Sako 
Committed: Wed Feb 18 23:37:07 2015 -0800

--
 ambari-project/pom.xml   | 126 +++
 ambari-views/pom.xml | 138 --
 contrib/views/capacity-scheduler/pom.xml |   1 +
 contrib/views/files/pom.xml  |   9 +-
 contrib/views/jobs/pom.xml   |  13 +--
 contrib/views/pig/pom.xml|   1 +
 contrib/views/pom.xml|  34 ++-
 contrib/views/slider/pom.xml |   1 +
 contrib/views/tez/pom.xml|   1 +
 9 files changed, 171 insertions(+), 153 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0c6ca6bb/ambari-project/pom.xml
--
diff --git a/ambari-project/pom.xml b/ambari-project/pom.xml
index bce8c5a..41655ba 100644
--- a/ambari-project/pom.xml
+++ b/ambari-project/pom.xml
@@ -25,6 +25,11 @@
   2.0.0-SNAPSHOT
   Apache Ambari Project POM
   Apache Ambari Project POM
+  http://ambari.apache.org/
+  
+https://github.com/apache/ambari
+https://git-wip-us.apache.org/repos/asf/ambari.git
+  
   
 
   The Apache Software License, Version 2.0
@@ -32,13 +37,24 @@
   repo
 
   
+  
+Apache Software Foundation
+http://www.apache.org
+  
   
 jira
 https://issues.apache.org/jira/browse/AMBARI
   
   pom
   
+${project.parent.basedir}
 UTF-8
+apache.snapshots.https
+Apache Development Snapshot 
Repository
+
https://repository.apache.org/content/repositories/snapshots
+apache.staging.https
+Apache Release Distribution 
Repository
+
https://repository.apache.org/service/local/staging/deploy/maven2
   
   
 
@@ -52,7 +68,33 @@
   Java.net Repository for Maven
   http://download.java.net/maven/glassfish/
 
+
+  maven2-repository.atlassian
+  Atlassian Maven Repository
+  https://maven.atlassian.com/repository/public
+  default
+
+
+  ${distMgmtSnapshotsId}
+  ${distMgmtSnapshotsName}
+  ${distMgmtSnapshotsUrl}
+  default
+
   
+
+  
+
+  ${distMgmtStagingId}
+  ${distMgmtStagingName}
+  ${distMgmtStagingUrl}
+
+
+  ${distMgmtSnapshotsId}
+  ${distMgmtSnapshotsName}
+  ${distMgmtSnapshotsUrl}
+
+  
+
   
 
   oss.sonatype.org
@@ -67,6 +109,20 @@
 false
   
 
+
+  ASF Staging
+  https://repository.apache.org/content/groups/staging/
+
+
+  ASF Snapshots
+  https://repository.apache.org/content/repositories/snapshots/
+  
+true
+  
+  
+false
+  
+
   
   
 
@@ -105,6 +161,76 @@
 
   
 
+
+  sources
+  
+
+  
+org.apache.maven.plugins
+maven-source-plugin
+
+  
+attach-sources
+
+  jar
+
+  
+
+  
+
+  
+
+
+  javadoc
+  
+
+  
+org.apache.maven.plugins
+maven-javadoc-plugin
+
+  true
+
+
+  
+attach-javadocs
+
+  jar
+
+  
+
+  
+
+  
+
+
+
+  sign-artifacts
+  
+
+  performRelease
+  true
+
+  
+  
+
+  
+org.apache.maven.plugins
+maven-gpg-plugin
+1.6
+
+  
+sign-artifacts
+deploy
+
+  sign
+
+  
+
+  
+
+  
+
   
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/0c6ca6bb/ambari-views/pom.xml
--
diff --git a/ambari-views/pom.xml b/ambari-views/pom.xml
index 292382b..8fcb5ae 100644
--- a/ambari-views/pom.xml
+++ b/ambari-views/pom.xml
@@ -30,70 +30,6 @@
 Ambari Views
 2.0.0-SNAPSHOT
 Ambari View interfaces.
-http://ambari.apache.org/
-
-

ambari git commit: AMBARI-9695 - Oozie Server Process Alert Does Not Work After Enabling Kerberos (jonathanhurley)

2015-02-18 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/trunk cd3ae1e62 -> ab1c91993


AMBARI-9695 - Oozie Server Process Alert Does Not Work After Enabling Kerberos 
(jonathanhurley)


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

Branch: refs/heads/trunk
Commit: ab1c91993514f11fa610a9d99573d549fb1ee1f3
Parents: cd3ae1e
Author: Jonathan Hurley 
Authored: Wed Feb 18 15:50:54 2015 -0500
Committer: Jonathan Hurley 
Committed: Wed Feb 18 15:51:11 2015 -0500

--
 .../package/alerts/alert_check_oozie_server.py  | 59 +---
 .../package/files/alert_check_oozie_server.py   | 73 +---
 2 files changed, 81 insertions(+), 51 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ab1c9199/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py
 
b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py
index cd4d3ed..a5a066b 100644
--- 
a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py
+++ 
b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py
@@ -17,12 +17,11 @@ 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.
 """
-
-from resource_management import *
+from resource_management.core.resources import Execute
 from resource_management.libraries.functions import format
 from resource_management.libraries.functions import get_kinit_path
-from resource_management.core.environment import Environment
 from ambari_commons.os_check import OSConst, OSCheck
+
 from urlparse import urlparse
 
 RESULT_CODE_OK = 'OK'
@@ -31,15 +30,15 @@ RESULT_CODE_UNKNOWN = 'UNKNOWN'
 
 OOZIE_URL_KEY = '{{oozie-site/oozie.base.url}}'
 SECURITY_ENABLED = '{{cluster-env/security_enabled}}'
-SMOKEUSER_KEY = '{{cluster-env/smokeuser}}'
-SMOKEUSER_KEYTAB_KEY = '{{cluster-env/smokeuser_keytab}}'
+OOZIE_PRINCIPAL = '{{oozie-site/oozie.authentication.kerberos.principal}}'
+OOZIE_KEYTAB = '{{oozie-site/oozie.authentication.kerberos.keytab}}'
 
 def get_tokens():
   """
   Returns a tuple of tokens in the format {{site/property}} that will be used
   to build the dictionary passed into execute
   """
-  return (OOZIE_URL_KEY, SMOKEUSER_KEY, SECURITY_ENABLED, SMOKEUSER_KEYTAB_KEY)
+  return (OOZIE_URL_KEY, OOZIE_PRINCIPAL, SECURITY_ENABLED, OOZIE_KEYTAB)
 
 def execute(parameters=None, host_name=None):
   """
@@ -53,34 +52,44 @@ def execute(parameters=None, host_name=None):
   if parameters is None:
 return (RESULT_CODE_UNKNOWN, ['There were no parameters supplied to the 
script.'])
 
+  if not OOZIE_URL_KEY in parameters:
+return (RESULT_CODE_UNKNOWN, ['The Oozie URL is a required parameter.'])
+
+  # use localhost on Windows, 0.0.0.0 on others; 0.0.0.0 means bind to all
+  # interfaces, which doesn't work on Windows
+  localhost_address = 'localhost' if OSCheck.get_os_family() == 
OSConst.WINSRV_FAMILY else '0.0.0.0'
+
+  oozie_url = parameters[OOZIE_URL_KEY]
+  oozie_url = oozie_url.replace(urlparse(oozie_url).hostname,localhost_address)
+
   security_enabled = False
-  if set([OOZIE_URL_KEY, SMOKEUSER_KEY, 
SECURITY_ENABLED]).issubset(parameters):
-oozie_url = parameters[OOZIE_URL_KEY]
-localhost_address = 'localhost' if OSCheck.get_os_family() == 
OSConst.WINSRV_FAMILY else '0.0.0.0'
-oozie_url = 
oozie_url.replace(urlparse(oozie_url).hostname,localhost_address)
-smokeuser = parameters[SMOKEUSER_KEY]
+  if SECURITY_ENABLED in parameters:
 security_enabled = str(parameters[SECURITY_ENABLED]).upper() == 'TRUE'
-  else:
-return (RESULT_CODE_UNKNOWN, ['The Oozie URL and Smokeuser are a required 
parameters.'])
+
+  command = format("source /etc/oozie/conf/oozie-env.sh ; oozie admin -oozie 
{oozie_url} -status")
 
   try:
+# kinit if security is enabled so that oozie-env.sh can make the web 
request
 if security_enabled:
-  if set([SMOKEUSER_KEYTAB_KEY]).issubset(parameters) and 
set([SMOKEUSER_KEY]).issubset(parameters):
-smokeuser_keytab = parameters[SMOKEUSER_KEYTAB_KEY]
-smokeuser_principal = parameters[SMOKEUSER_KEY]
+  if OOZIE_KEYTAB in parameters and OOZIE_PRINCIPAL in parameters:
+oozie_keytab = parameters[OOZIE_KEYTAB]
+oozie_principal = parameters[OOZIE_PRINCIP

ambari git commit: AMBARI-9612 AMS : Kafka Metrics - Log flush status metrics do not show up.

2015-02-18 Thread fbarca
Repository: ambari
Updated Branches:
  refs/heads/trunk 9b176b5ff -> cd3ae1e62


AMBARI-9612 AMS : Kafka Metrics - Log flush status metrics do not show up.

Feeding the data into AMS in legacy format


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

Branch: refs/heads/trunk
Commit: cd3ae1e6229740fb6feba7e64e50fa63570a20a3
Parents: 9b176b5
Author: Florian Barca 
Authored: Wed Feb 18 09:22:53 2015 -0800
Committer: Florian Barca 
Committed: Wed Feb 18 09:22:53 2015 -0800

--
 .../kafka/KafkaTimelineMetricsReporter.java | 237 ---
 1 file changed, 99 insertions(+), 138 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/cd3ae1e6/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java
--
diff --git 
a/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java
 
b/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java
index 762b5f2..63097e5 100644
--- 
a/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java
+++ 
b/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java
@@ -51,6 +51,7 @@ import com.yammer.metrics.core.Metric;
 import com.yammer.metrics.core.MetricName;
 import com.yammer.metrics.core.MetricProcessor;
 import com.yammer.metrics.core.MetricsRegistry;
+import com.yammer.metrics.core.Summarizable;
 import com.yammer.metrics.core.Timer;
 import com.yammer.metrics.stats.Snapshot;
 
@@ -69,7 +70,7 @@ public class KafkaTimelineMetricsReporter extends 
AbstractTimelineMetricsSink im
 
   private boolean initialized = false;
   private boolean running = false;
-  private Object lock = new Object();
+  private final Object lock = new Object();
   private String collectorUri;
   private String hostname;
   private SocketAddress socketAddress;
@@ -242,33 +243,9 @@ public class KafkaTimelineMetricsReporter extends 
AbstractTimelineMetricsSink im
 public void processMeter(MetricName name, Metered meter, Context context) 
throws Exception {
   final long currentTimeMillis = System.currentTimeMillis();
   final String sanitizedName = sanitizeName(name);
-  final String meterCountName = sanitizedName + COUNT_SUFIX;
-  final TimelineMetric countMetric = 
createTimelineMetric(currentTimeMillis, APP_ID, meterCountName, meter.count());
 
-  final String meterOneMinuteRateName = sanitizedName + 
ONE_MINUTE_RATE_SUFIX;
-  final TimelineMetric oneMinuteRateMetric = 
createTimelineMetric(currentTimeMillis, APP_ID,
-  meterOneMinuteRateName, meter.oneMinuteRate());
+  String[] metricNames = cacheKafkaMetered(currentTimeMillis, 
sanitizedName, meter);
 
-  final String meterMeanRateName = sanitizedName + MEAN_RATE_SUFIX;
-  final TimelineMetric meanMetric = 
createTimelineMetric(currentTimeMillis, APP_ID, meterMeanRateName,
-  meter.meanRate());
-
-  final String meterFiveMinuteRateName = sanitizedName + 
FIVE_MINUTE_RATE_SUFIX;
-  final TimelineMetric fiveMinuteRateMetric = 
createTimelineMetric(currentTimeMillis, APP_ID,
-  meterFiveMinuteRateName, meter.fiveMinuteRate());
-
-  final String meterFifteenMinuteRateName = sanitizedName + 
FIFTEEN_MINUTE_RATE_SUFIX;
-  final TimelineMetric fifteenMinuteRateMetric = 
createTimelineMetric(currentTimeMillis, APP_ID,
-  meterFifteenMinuteRateName, meter.fifteenMinuteRate());
-
-  metricsCache.putTimelineMetric(countMetric);
-  metricsCache.putTimelineMetric(oneMinuteRateMetric);
-  metricsCache.putTimelineMetric(meanMetric);
-  metricsCache.putTimelineMetric(fiveMinuteRateMetric);
-  metricsCache.putTimelineMetric(fifteenMinuteRateMetric);
-
-  String[] metricNames = new String[] { meterCountName, 
meterOneMinuteRateName, meterMeanRateName,
-  meterFiveMinuteRateName, meterFifteenMinuteRateName };
   populateMetricsList(context, metricNames);
 }
 
@@ -276,9 +253,10 @@ public class KafkaTimelineMetricsReporter extends 
AbstractTimelineMetricsSink im
 public void processCounter(MetricName name, Counter counter, Context 
context) throws Exception {
   final long currentTimeMillis = System.currentTimeMillis();
   final String sanitizedName = sanitizeName(name);
-  final String metricCountName = sanitizedName + COUNT_SUFIX;
-  final TimelineMetr

ambari git commit: AMBARI-9691. Kerberos Wizard: error in step2 after relogin. (akovalenko)

2015-02-18 Thread akovalenko
Repository: ambari
Updated Branches:
  refs/heads/trunk c82eb0c8b -> 9b176b5ff


AMBARI-9691. Kerberos Wizard: error in step2 after relogin. (akovalenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9b176b5f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9b176b5f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9b176b5f

Branch: refs/heads/trunk
Commit: 9b176b5ff84f7f26188258cd94d5ec41b9b54317
Parents: c82eb0c
Author: Aleksandr Kovalenko 
Authored: Wed Feb 18 16:00:26 2015 +0200
Committer: Aleksandr Kovalenko 
Committed: Wed Feb 18 17:56:52 2015 +0200

--
 .../main/admin/kerberos/step2_controller.js |  7 ++-
 .../main/admin/kerberos/step3_controller.js |  2 +-
 .../main/admin/kerberos/wizard_controller.js|  8 
 ambari-web/app/router.js|  2 +-
 ambari-web/app/routes/add_kerberos_routes.js| 46 
 .../templates/main/admin/kerberos/wizard.hbs|  6 +--
 .../views/main/admin/kerberos/wizard_view.js| 37 +---
 7 files changed, 24 insertions(+), 84 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9b176b5f/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
--
diff --git a/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js 
b/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
index b8f598b..87ba550 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
@@ -58,12 +58,11 @@ App.KerberosWizardStep2Controller = 
App.WizardStep7Controller.extend({
   }.property('stepConfigs.@each.errorCount', 'miscModalVisible', 
'submitButtonClicked', 'testConnectionInProgress'),
 
   hostNames: function () {
-return this.get('content.hosts');
-  }.property('content.hosts'),
+return App.get('allHostNames');
+  }.property('App.allHostNames'),
 
   serviceConfigTags: [],
 
-
   clearStep: function () {
 this._super();
 this.get('serviceConfigTags').clear();
@@ -169,7 +168,7 @@ App.KerberosWizardStep2Controller = 
App.WizardStep7Controller.extend({
   },
 
   createKerberosHostComponents: function () {
-var hostNames = this.get('content.hosts');
+var hostNames = this.get('hostNames');
 var queryStr = '';
 hostNames.forEach(function (hostName) {
   queryStr += 'Hosts/host_name=' + hostName + '|';

http://git-wip-us.apache.org/repos/asf/ambari/blob/9b176b5f/ambari-web/app/controllers/main/admin/kerberos/step3_controller.js
--
diff --git a/ambari-web/app/controllers/main/admin/kerberos/step3_controller.js 
b/ambari-web/app/controllers/main/admin/kerberos/step3_controller.js
index 07b5e4b..3b7bbef 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/step3_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/step3_controller.js
@@ -45,7 +45,7 @@ App.KerberosWizardStep3Controller = 
App.KerberosProgressPageController.extend({
   error: 'onTaskError'
 });
   } else {
-var hostNames = self.get('content.hosts');
+var hostNames = App.get('allHostNames');
 self.updateComponent('KERBEROS_CLIENT', hostNames, "KERBEROS", 
"Install");
   }
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/9b176b5f/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js 
b/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
index 6933536..f3e1584 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
@@ -37,7 +37,6 @@ App.KerberosWizardController = App.WizardController.extend({
   content: Em.Object.create({
 controllerName: 'kerberosWizardController',
 serviceName: 'KERBEROS',
-hosts: '',
 kerberosOption: null,
 cluster: null,
 services: [],
@@ -147,12 +146,6 @@ App.KerberosWizardController = 
App.WizardController.extend({
 this.set('content.kerberosOption', stepController.get('selectedItem'));
   },
 
-  loadConfigTag: function (tag) {
-var tagVal = App.db.getKerberosWizardConfigTag(tag);
-this.set('content.' + tag, tagVal);
-  },
-
-
   loadTasksStatuses: function () {
 var statuses = this.getDBProperty('tasksStatuses');
 this.set('content.tasksStatuses', statuses);
@@ -234,7 +227,6 @@ App.KerberosWizardController = App.WizardController.extend({
   var kerberosStep2controller = 
App.get('router.kerberosWizardStep2Controller')

[1/2] ambari git commit: AMBARI-9690 Install Wizard, step 1: redundant base URL check for unselected OSes. (ababiichuk)

2015-02-18 Thread ababiichuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 8ae21c8b7 -> c82eb0c8b


AMBARI-9690 Install Wizard, step 1: redundant base URL check for unselected 
OSes. (ababiichuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/34b629e3
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/34b629e3
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/34b629e3

Branch: refs/heads/trunk
Commit: 34b629e353d838010201e9a059bdd4048dd1e579
Parents: 8ae21c8
Author: aBabiichuk 
Authored: Wed Feb 18 15:50:12 2015 +0200
Committer: aBabiichuk 
Committed: Wed Feb 18 17:38:30 2015 +0200

--
 ambari-web/app/styles/stack_versions.less   |  6 ++
 ambari-web/app/templates/wizard/step1.hbs   |  2 +-
 ambari-web/app/views/wizard/step1_view.js   |  3 +++
 ambari-web/test/views/wizard/step1_view_test.js | 10 --
 4 files changed, 18 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/34b629e3/ambari-web/app/styles/stack_versions.less
--
diff --git a/ambari-web/app/styles/stack_versions.less 
b/ambari-web/app/styles/stack_versions.less
index 5321a99..5c54ea3 100644
--- a/ambari-web/app/styles/stack_versions.less
+++ b/ambari-web/app/styles/stack_versions.less
@@ -80,6 +80,12 @@
   a {
 cursor: pointer;
 text-decoration: none;
+&.disabled-clear-button {
+  cursor: default;
+  .icon-remove-sign {
+cursor: default;
+  }
+}
   }
   .icon-remove-sign {
 color: #808080;

http://git-wip-us.apache.org/repos/asf/ambari/blob/34b629e3/ambari-web/app/templates/wizard/step1.hbs
--
diff --git a/ambari-web/app/templates/wizard/step1.hbs 
b/ambari-web/app/templates/wizard/step1.hbs
index da33fd2..bf3278e 100644
--- a/ambari-web/app/templates/wizard/step1.hbs
+++ b/ambari-web/app/templates/wizard/step1.hbs
@@ -75,7 +75,7 @@
 
 
   {{#if repository.clearAll}}
-
+
   
 
   {{/if}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/34b629e3/ambari-web/app/views/wizard/step1_view.js
--
diff --git a/ambari-web/app/views/wizard/step1_view.js 
b/ambari-web/app/views/wizard/step1_view.js
index d3d0c4b..1ae9e05 100644
--- a/ambari-web/app/views/wizard/step1_view.js
+++ b/ambari-web/app/views/wizard/step1_view.js
@@ -208,6 +208,9 @@ App.WizardStep1View = Em.View.extend({
* @param {object} event
*/
   clearGroupLocalRepository: function (event) {
+if (!event.context.get('isSelected')) {
+  return;
+}
 event.context.set('baseUrl', '');
 event.context.set('validation', App.Repository.validation['PENDING']);
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/34b629e3/ambari-web/test/views/wizard/step1_view_test.js
--
diff --git a/ambari-web/test/views/wizard/step1_view_test.js 
b/ambari-web/test/views/wizard/step1_view_test.js
index 9e0ed1e..2f6de84 100644
--- a/ambari-web/test/views/wizard/step1_view_test.js
+++ b/ambari-web/test/views/wizard/step1_view_test.js
@@ -590,12 +590,18 @@ describe('App.WizardStep1View', function () {
   });
 
   describe('#clearGroupLocalRepository', function () {
+var context = {'group-number': 0, id: 'HDP-redhat5', repoId: 
'HDP-redhat5', baseUrl: 'baseUrl', validation: 'validation'};
 it('should empty base url and validation', function () {
-  var event = {context: Em.Object.create({'group-number': 0, id: 
'HDP-redhat5', repoId: 'HDP-redhat5', baseUrl: 'baseUrl', validation: 
'validation'})};
+  var event = {context: Em.Object.create(context, {isSelected: true})};
   view.clearGroupLocalRepository(event);
   expect(event.context.get('baseUrl')).to.be.empty;
   expect(event.context.get('validation')).to.be.empty;
-
+});
+it('should do nothing if corresponding OS is not selected', function () {
+  var event = {context: Em.Object.create(context, {isSelected: false})};
+  view.clearGroupLocalRepository(event);
+  expect(event.context.get('baseUrl')).to.equal('baseUrl');
+  expect(event.context.get('validation')).to.equal('validation');
 });
   });
 



[2/2] ambari git commit: AMBARI-9692 Kerberos Wizard tries to delete ATS is it's not installed. (ababiichuk)

2015-02-18 Thread ababiichuk
AMBARI-9692 Kerberos Wizard tries to delete ATS is it's not installed. 
(ababiichuk)


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

Branch: refs/heads/trunk
Commit: c82eb0c8bf692366d38c31697a8160c2f7bf9b9a
Parents: 34b629e
Author: aBabiichuk 
Authored: Wed Feb 18 16:19:44 2015 +0200
Committer: aBabiichuk 
Committed: Wed Feb 18 17:38:31 2015 +0200

--
 .../main/admin/kerberos/step5_controller.js|  3 ++-
 .../main/admin/kerberos/step5_controller_test.js   | 13 -
 2 files changed, 10 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c82eb0c8/ambari-web/app/controllers/main/admin/kerberos/step5_controller.js
--
diff --git a/ambari-web/app/controllers/main/admin/kerberos/step5_controller.js 
b/ambari-web/app/controllers/main/admin/kerberos/step5_controller.js
index 5cc06bd..3b62cfd 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/step5_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/step5_controller.js
@@ -45,7 +45,8 @@ App.KerberosWizardStep5Controller = 
App.KerberosProgressPageController.extend({
* remove Application Timeline Server component if needed.
*/
   checkComponentsRemoval: function() {
-if (App.Service.find().someProperty('serviceName', 'YARN') && 
!App.get('doesATSSupportKerberos') && 
!this.get('commands').contains('deleteATS')) {
+if (App.Service.find().someProperty('serviceName', 'YARN') && 
!App.get('doesATSSupportKerberos')
+  && !this.get('commands').contains('deleteATS') && 
App.HostComponent.find().findProperty('componentName', 'APP_TIMELINE_SERVER')) {
   this.get('commands').pushObject('deleteATS');
 }
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/c82eb0c8/ambari-web/test/controllers/main/admin/kerberos/step5_controller_test.js
--
diff --git 
a/ambari-web/test/controllers/main/admin/kerberos/step5_controller_test.js 
b/ambari-web/test/controllers/main/admin/kerberos/step5_controller_test.js
index 93139fb..c6291a0 100644
--- a/ambari-web/test/controllers/main/admin/kerberos/step5_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/kerberos/step5_controller_test.js
@@ -19,13 +19,14 @@
 var App = require('app');
 
 describe('App.KerberosWizardStep5Controller', function() {
-  describe('checkComponentsRemoval', function() {
+  describe('#checkComponentsRemoval', function() {
 
 var tests = [
-  { yarnInstalled: true, doesATSSupportKerberos: false, commands: 
['stopServices', 'deleteATS']},
-  { yarnInstalled: false, doesATSSupportKerberos: true, commands: 
['stopServices']},
-  { yarnInstalled: false, doesATSSupportKerberos: false, commands: 
['stopServices']},
-  { yarnInstalled: true, doesATSSupportKerberos: true, commands: 
['stopServices']},
+  { yarnInstalled: true, doesATSSupportKerberos: false, commands: 
['stopServices', 'deleteATS'], ATSInstalled: true},
+  { yarnInstalled: false, doesATSSupportKerberos: true, commands: 
['stopServices'], ATSInstalled: true},
+  { yarnInstalled: false, doesATSSupportKerberos: false, commands: 
['stopServices'], ATSInstalled: true},
+  { yarnInstalled: true, doesATSSupportKerberos: true, commands: 
['stopServices'], ATSInstalled: false},
+  { yarnInstalled: true, doesATSSupportKerberos: true, commands: 
['stopServices'], ATSInstalled: true}
 ];
 
 tests.forEach(function(test) {
@@ -33,9 +34,11 @@ describe('App.KerberosWizardStep5Controller', function() {
 var controller = App.KerberosWizardStep5Controller.create({ commands: 
['stopServices'] });
 sinon.stub(App, 
'get').withArgs('doesATSSupportKerberos').returns(test.doesATSSupportKerberos);
 sinon.stub(App.Service, 'find').returns(test.yarnInstalled ? 
[Em.Object.create({ serviceName: 'YARN'})] : []);
+sinon.stub(App.HostComponent, 'find').returns(test.ATSInstalled ? 
[Em.Object.create({ componentName: 'APP_TIMELINE_SERVER'})] : []);
 controller.checkComponentsRemoval();
 App.get.restore();
 App.Service.find.restore();
+App.HostComponent.find.restore();
 expect(controller.get('commands').toArray()).to.eql(test.commands);
   });
 });



ambari git commit: AMBARI-9693. Review and update kerberos descriptors for various services.(vbrodetskyi)

2015-02-18 Thread vbrodetskyi
Repository: ambari
Updated Branches:
  refs/heads/trunk 1e37bff5a -> 8ae21c8b7


AMBARI-9693. Review and update kerberos descriptors for various 
services.(vbrodetskyi)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8ae21c8b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8ae21c8b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8ae21c8b

Branch: refs/heads/trunk
Commit: 8ae21c8b72c873a611d0f9a8e352f7ac77280e9a
Parents: 1e37bff
Author: Vitaly Brodetskyi 
Authored: Wed Feb 18 17:31:40 2015 +0200
Committer: Vitaly Brodetskyi 
Committed: Wed Feb 18 17:31:40 2015 +0200

--
 .../server/controller/KerberosHelper.java   | 14 ++
 .../apache/ambari/server/utils/StageUtils.java  | 46 ++--
 .../HBASE/0.96.0.2.0/kerberos.json  |  5 ++-
 .../HDFS/2.1.0.2.0/kerberos.json| 14 +-
 .../YARN/2.1.0.2.0/kerberos.json| 18 +++-
 .../server/controller/KerberosHelperTest.java   | 16 +++
 6 files changed, 80 insertions(+), 33 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8ae21c8b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java
index fa829a4..db19611 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java
@@ -78,6 +78,7 @@ import org.apache.ambari.server.state.PropertyInfo;
 import org.apache.ambari.server.state.SecurityState;
 import org.apache.ambari.server.state.SecurityType;
 import org.apache.ambari.server.state.Service;
+import org.apache.ambari.server.state.ServiceComponent;
 import org.apache.ambari.server.state.ServiceComponentHost;
 import org.apache.ambari.server.state.StackId;
 import org.apache.ambari.server.state.kerberos.KerberosComponentDescriptor;
@@ -91,6 +92,7 @@ import 
org.apache.ambari.server.state.kerberos.KerberosServiceDescriptor;
 import 
org.apache.ambari.server.state.svccomphost.ServiceComponentHostServerActionEvent;
 import org.apache.ambari.server.utils.StageUtils;
 import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -1135,6 +1137,18 @@ public class KerberosHelper {
   configHelper.cloneAttributesMap(attributes, 
configurationAttributes.get(type));
 }
 
+// add clusterHostInfo config
+Map componentHosts = new HashMap();
+for (Map.Entry service : 
cluster.getServices().entrySet()) {
+  for (Map.Entry serviceComponent : 
service.getValue().getServiceComponents().entrySet()) {
+if 
(StageUtils.getComponentToClusterInfoKeyMap().keySet().contains(serviceComponent.getValue().getName()))
 {
+  
componentHosts.put(StageUtils.getComponentToClusterInfoKeyMap().get(serviceComponent.getValue().getName()),
+  
StringUtils.join(serviceComponent.getValue().getServiceComponentHosts().keySet(),
 ","));
+}
+  }
+}
+configurations.put("clusterHostInfo", componentHosts);
+
 return configurations;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/8ae21c8b/ambari-server/src/main/java/org/apache/ambari/server/utils/StageUtils.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/utils/StageUtils.java 
b/ambari-server/src/main/java/org/apache/ambari/server/utils/StageUtils.java
index f6d44d8..de84f35 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/utils/StageUtils.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/utils/StageUtils.java
@@ -17,26 +17,8 @@
  */
 package org.apache.ambari.server.utils;
 
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.SortedSet;
-import java.util.TreeMap;
-import java.util.TreeSet;
-
-import javax.xml.bind.JAXBException;
-
+import com.google.common.base.Joiner;
+import com.google.gson.Gson;
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.Role;
 import org.apache.ambari.server.RoleCommand;
@@ -57,8 +39,24 @@ import org.codehaus.jackson.map.Js

ambari git commit: AMBARI-8396 - Repository Version Management - Create documentation for API (Yurii Shylov via tbeerbower)

2015-02-18 Thread tbeerbower
Repository: ambari
Updated Branches:
  refs/heads/trunk 43f916b90 -> 1e37bff5a


AMBARI-8396 - Repository Version Management - Create documentation for API 
(Yurii Shylov via tbeerbower)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1e37bff5
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1e37bff5
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1e37bff5

Branch: refs/heads/trunk
Commit: 1e37bff5a77bf1fc0c2faf0ebb7d650a296e08de
Parents: 43f916b
Author: tbeerbower 
Authored: Wed Feb 18 09:04:05 2015 -0500
Committer: tbeerbower 
Committed: Wed Feb 18 09:04:05 2015 -0500

--
 ambari-server/docs/api/v1/index.md  |  17 +-
 .../docs/api/v1/repository-version-resources.md | 174 +++
 .../api/v1/rolling-upgrade-check-resources.md   |  80 +
 .../docs/api/v1/stack-version-resources.md  | 168 ++
 4 files changed, 438 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1e37bff5/ambari-server/docs/api/v1/index.md
--
diff --git a/ambari-server/docs/api/v1/index.md 
b/ambari-server/docs/api/v1/index.md
index 3ba09f3..026efbe 100644
--- a/ambari-server/docs/api/v1/index.md
+++ b/ambari-server/docs/api/v1/index.md
@@ -331,10 +331,25 @@ Task attempt resources are individual attempts at map or 
reduce tasks for a job.
 [Task Attempt Resources](taskattempt-resources.md)
 
  views
-Views offer a systematic way to plug-in UI capabilities to surface custom 
visualization, management and monitoring features in Ambari Web..
+Views offer a systematic way to plug-in UI capabilities to surface custom 
visualization, management and monitoring features in Ambari Web.
 
 [View Resources](view-resources.md)
 
+ repository_versions
+Repository version resources contain information about available repositories 
with Hadoop stacks for cluster.
+
+[Repository Version Resources](repository-version-resources.md)
+
+ stack_versions
+Stack version resources contain relationship between some resource and 
repository versions.
+
+[Stack Version Resources](stack-version-resources.md)
+
+ rolling_upgrades_check
+Rolling upgrades check resources store information about 
successful/unsuccessful checks performed before rolling upgrade.
+
+[Rolling Upgrade Check Resources](rolling-upgrade-check-resources.md)
+
 Partial Response
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1e37bff5/ambari-server/docs/api/v1/repository-version-resources.md
--
diff --git a/ambari-server/docs/api/v1/repository-version-resources.md 
b/ambari-server/docs/api/v1/repository-version-resources.md
new file mode 100644
index 000..42c3970
--- /dev/null
+++ b/ambari-server/docs/api/v1/repository-version-resources.md
@@ -0,0 +1,174 @@
+
+
+# Repository Version Resources
+
+#Create Instance
+New repository versions may be created through the API. At least one set of 
base repository URLs should be provided.
+
+POST 
http://:8080/api/v1/stacks//versions//repository_versions/
+{
+  "RepositoryVersions": {
+"repository_version": "2.2.1.1",
+"display_name": "HDP-2.2.1.1"
+  },
+  "operating_systems": [
+{
+  "OperatingSystems": {
+"os_type": "redhat6"
+  },
+  "repositories": [
+{
+  "Repositories": {
+"repo_id": "HDP-2.2",
+"repo_name": "HDP",
+"base_url": "http://...";
+  }
+},
+{
+  "Repositories": {
+"repo_id": "HDP-UTILS-1.1.0.20",
+"repo_name": "HDP-UTILS",
+"base_url": "http://...";
+  }
+}
+  ]
+}
+  ]
+}
+
+#Get Repository Versions
+The user may query for all repository versions of a particular stack.
+
+GET 
http://:8080/api/v1/stacks//versions//repository_versions/
+
+{
+  href: 
"http://:8080/api/v1/stacks//versions//repository_versions/",
+  items: [
+{
+  href: 
"http://:8080/api/v1/stacks//versions//repository_versions/1",
+  RepositoryVersions: {
+id: 1,
+stack_name: "HDP",
+stack_version: "2.2"
+  }
+},
+{
+  href: 
"http://:8080/api/v1/stacks//versions//repository_versions/2",
+  RepositoryVersions: {
+id: 2,
+stack_name: "HDP",
+stack_version: "2.2"
+  }
+}
+  ]
+}
+
+#Get Repository Version
+Returns single repository version.
+
+GET 
http://:8080/api/v1/stacks//versions//repository_versions/1
+
+{
+  hre

ambari git commit: AMBARI-9686 - RU: Author for config change should be something more appropriate than _anonymous (tbeerbower)

2015-02-18 Thread tbeerbower
Repository: ambari
Updated Branches:
  refs/heads/trunk e9c8b2660 -> 43f916b90


AMBARI-9686 - RU: Author for config change should be something more appropriate 
than _anonymous (tbeerbower)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/43f916b9
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/43f916b9
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/43f916b9

Branch: refs/heads/trunk
Commit: 43f916b9056c8cea813cc6b5d514344da194d11a
Parents: e9c8b26
Author: tbeerbower 
Authored: Wed Feb 18 06:07:59 2015 -0500
Committer: tbeerbower 
Committed: Wed Feb 18 08:58:55 2015 -0500

--
 .../ambari/server/actionmanager/Stage.java  | 18 --
 .../internal/UpgradeResourceProvider.java   |  1 +
 .../server/serveraction/ServerAction.java   |  3 +-
 .../serveraction/upgrades/ConfigureAction.java  | 16 -
 .../ambari/server/actionmanager/StageTest.java  | 64 
 .../serveraction/ServerActionExecutorTest.java  |  2 +-
 6 files changed, 95 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/43f916b9/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/Stage.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/Stage.java 
b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/Stage.java
index 097145d..51d5e8a 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/Stage.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/Stage.java
@@ -341,7 +341,7 @@ public class Stage {
   @Nullable Integer timeout,
   boolean retryAllowed) {
 
-addServerActionCommand(actionName, role, command, clusterName, 
StageUtils.getHostName(), event,
+addServerActionCommand(actionName, null, role, command, clusterName, 
StageUtils.getHostName(), event,
 commandParams, commandDetail, configTags, timeout, retryAllowed);
   }
 
@@ -357,26 +357,29 @@ public class Stage {
* instantiated and invoked as needed.
*
* @param actionNamea String declaring the action name (in the form of a 
classname) to execute
+   * @param userName  the name of the user who created this stage; may be 
null for anonymous user
* @param role  the Role for this command
* @param command   the RoleCommand for this command
* @param clusterName   a String identifying the cluster on which to to 
execute this command
* @param hostName  the name of the host
* @param event a ServiceComponentHostServerActionEvent
* @param commandParams a Map of String to String data used to pass to the 
action - this may be
-   *  empty or null if no data is relevant
+*  empty or null if no data is relevant
* @param commandDetail a String declaring a descriptive name to pass to the 
action - null or an
-   *  empty string indicates no value is to be set
+*  empty string indicates no value is to be set
* @param configTagsa Map of configuration tags to set for this command 
- if null, no
-   *  configurations will be available for the command
+*  configurations will be available for the command
* @param timeout   an Integer declaring the timeout for this action - 
if null, a default
* @param retryAllowed  indicates whether retry after failure is allowed
*/
-  public synchronized void addServerActionCommand(String actionName, Role 
role, RoleCommand command,
+  public synchronized void addServerActionCommand(String actionName,
+  @Nullable  String userName,
+  Role role, RoleCommand 
command,
   String clusterName, String 
hostName,
   
ServiceComponentHostServerActionEvent event,
   @Nullable Map commandParams,
   @Nullable String 
commandDetail,
-  @Nullable Map> configTags,
+  @Nullable Map> configTags,
   @Nullable Integer timeout, 
boolean retryAllowed) {
 ExecutionCommandWrapper commandWrapper =
 addGenericExecutionCommand(clusterName, hostName, role, command, 
event, retryAllowed);
@@ -405,6 +408,9 @@ public class Stage {
 
 Map roleParams = new HashMap();
 rolePar

ambari git commit: AMBARI-9689. Vulnerability issue: possible to make code injection with hosts bootstrap request (aonishuk)

2015-02-18 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 2e1d9c6b2 -> e9c8b2660


AMBARI-9689. Vulnerability issue: possible to make code injection with hosts 
bootstrap request (aonishuk)


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

Branch: refs/heads/trunk
Commit: e9c8b2660910c8f07ac78c4e60ef517a7d02f1c7
Parents: 2e1d9c6
Author: Andrew Onishuk 
Authored: Wed Feb 18 15:28:15 2015 +0200
Committer: Andrew Onishuk 
Committed: Wed Feb 18 15:28:15 2015 +0200

--
 .../python/resource_management/core/shell.py|  1 -
 ambari-server/pom.xml   |  5 ++
 .../ambari/server/bootstrap/BSRunner.java   | 74 +++-
 ambari-server/src/main/python/bootstrap.py  |  7 +-
 ambari-server/src/main/python/setupAgent.py |  4 +-
 .../ambari/server/bootstrap/BootStrapTest.java  |  2 +
 6 files changed, 53 insertions(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e9c8b266/ambari-common/src/main/python/resource_management/core/shell.py
--
diff --git a/ambari-common/src/main/python/resource_management/core/shell.py 
b/ambari-common/src/main/python/resource_management/core/shell.py
index 956ba01..f41bdde 100644
--- a/ambari-common/src/main/python/resource_management/core/shell.py
+++ b/ambari-common/src/main/python/resource_management/core/shell.py
@@ -191,7 +191,6 @@ def _call(command, logoutput=None, throw_on_failure=True,
   raise ExecuteTimeoutException()

   code = proc.returncode
-  print code
   
   if throw_on_failure and code:
 err_msg = Logger.filter_text(("Execution of '%s' returned %d. %s") % 
(command_alias, code, out))

http://git-wip-us.apache.org/repos/asf/ambari/blob/e9c8b266/ambari-server/pom.xml
--
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index e287e54..e9d9fac 100644
--- a/ambari-server/pom.xml
+++ b/ambari-server/pom.xml
@@ -1756,6 +1756,11 @@
   snmp4j
   1.10.1
 
+   
+   org.apache.commons
+   commons-io
+   1.3.2
+   
   
 
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/e9c8b266/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSRunner.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSRunner.java 
b/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSRunner.java
index 4790691..8c27934 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSRunner.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSRunner.java
@@ -19,6 +19,8 @@ package org.apache.ambari.server.bootstrap;
 
 import java.io.File;
 import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Arrays;
 import java.util.List;
 import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
@@ -27,6 +29,7 @@ import java.util.concurrent.TimeUnit;
 
 import org.apache.ambari.server.bootstrap.BootStrapStatus.BSStat;
 import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -154,8 +157,7 @@ class BSRunner extends Thread {
 if (user == null || user.isEmpty()) {
   user = DEFAULT_USER;
 }
-String commands[] = new String[12];
-String shellCommand[] = new String[3];
+String command[] = new String[12];
 BSStat stat = BSStat.RUNNING;
 String scriptlog = "";
 try {
@@ -181,23 +183,18 @@ class BSRunner extends Thread {
   /* Running command:
* script hostlist bsdir user sshkeyfile
*/
-  shellCommand[0] = System.getProperty("os.name").contains("Windows") ? 
"cmd" : "sh";
-  shellCommand[1] = System.getProperty("os.name").contains("Windows") ? 
"/C" : "-c";
-
-  commands[0] = this.bsScript;
-  commands[1] = hostString;
-  commands[2] = this.requestIdDir.toString();
-  commands[3] = user;
-  commands[4] = this.sshKeyFile.toString();
-  commands[5] = this.agentSetupScript.toString();
-  commands[6] = this.ambariHostname;
-  commands[7] = this.clusterOsFamily;
-  commands[8] = this.projectVersion;
-  commands[9] = this.serverPort+"";
-  commands[10] = userRunAs;
-  if (this.passwordFile != null) {
-commands[11] = this.passwordFile.toString();
-  }
+  command[0] = this.bsScript;
+  command[1] = hostString;
+  command[2] = this.requestIdDir.toString();

ambari git commit: AMBARI-9682. should not show traceback on exception during setup (dlysnichenko)

2015-02-18 Thread dmitriusan
Repository: ambari
Updated Branches:
  refs/heads/trunk 53241b914 -> 2e1d9c6b2


AMBARI-9682. should not show traceback on exception during setup (dlysnichenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2e1d9c6b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2e1d9c6b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2e1d9c6b

Branch: refs/heads/trunk
Commit: 2e1d9c6b2aeddaa02a59f9b6a5cfc6f0e89c8c52
Parents: 53241b9
Author: Lisnichenko Dmitro 
Authored: Wed Feb 18 14:39:22 2015 +0200
Committer: Lisnichenko Dmitro 
Committed: Wed Feb 18 14:39:22 2015 +0200

--
 ambari-server/src/main/python/ambari-server.py  | 28 ---
 .../src/test/python/TestAmbariServer.py | 77 +++-
 2 files changed, 79 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2e1d9c6b/ambari-server/src/main/python/ambari-server.py
--
diff --git a/ambari-server/src/main/python/ambari-server.py 
b/ambari-server/src/main/python/ambari-server.py
index 5e51a6d..a737b14 100755
--- a/ambari-server/src/main/python/ambari-server.py
+++ b/ambari-server/src/main/python/ambari-server.py
@@ -510,14 +510,7 @@ def create_user_action_map(args, options):
 #
 # Main.
 #
-def main():
-  parser = optparse.OptionParser(usage="usage: %prog [options] action 
[stack_id os]",)
-  init_parser_options(parser)
-  (options, args) = parser.parse_args()
-
-  # set verbose
-  set_verbose(options.verbose)
-
+def main(options, args, parser):
   # set silent
   set_silent(options.silent)
 
@@ -590,10 +583,27 @@ def main():
   if options.exit_message is not None:
 print options.exit_message
 
+def mainBody():
+  parser = optparse.OptionParser(usage="usage: %prog [options] action 
[stack_id os]",)
+  init_parser_options(parser)
+  (options, args) = parser.parse_args()
+
+  # set verbose
+  set_verbose(options.verbose)
+  if options.verbose:
+main(options, args, parser)
+  else:
+try:
+  main(options, args, parser)
+except Exception as e:
+  print_error_msg("Unexpected {0}: {1}".format((e).__class__.__name__, 
str(e)) +\
+  "\nFor more info run ambari-server with -v or --verbose option")
+  sys.exit(1) 
+  
 
 if __name__ == "__main__":
   try:
-main()
+mainBody()
   except (KeyboardInterrupt, EOFError):
 print("\nAborting ... Keyboard Interrupt.")
 sys.exit(1)

http://git-wip-us.apache.org/repos/asf/ambari/blob/2e1d9c6b/ambari-server/src/test/python/TestAmbariServer.py
--
diff --git a/ambari-server/src/test/python/TestAmbariServer.py 
b/ambari-server/src/test/python/TestAmbariServer.py
index 62e462f..8bf7409 100644
--- a/ambari-server/src/test/python/TestAmbariServer.py
+++ b/ambari-server/src/test/python/TestAmbariServer.py
@@ -273,9 +273,9 @@ class TestAmbariServer(TestCase):
 options.sid_or_sname = "sid"
 setup_security_method.return_value = None
 
-_ambari_server_.main()
+_ambari_server_.mainBody()
 
-_ambari_server_.main()
+_ambari_server_.mainBody()
 self.assertTrue(setup_security_method.called)
 self.assertFalse(False, get_verbose())
 self.assertFalse(False, get_silent())
@@ -349,6 +349,7 @@ class TestAmbariServer(TestCase):
  ('pathtokeytab')])
 pass
 
+  @patch("sys.exit")
   @patch.object(OSCheck, "os_distribution", new = MagicMock(return_value = 
os_distro_value))
   @patch.object(_ambari_server_, "setup")
   @patch.object(_ambari_server_, "start")
@@ -356,7 +357,7 @@ class TestAmbariServer(TestCase):
   @patch.object(_ambari_server_, "reset")
   @patch("optparse.OptionParser")
   def test_main_test_setup(self, OptionParserMock, reset_method, stop_method,
-   start_method, setup_method):
+   start_method, setup_method, exit_mock):
 opm = OptionParserMock.return_value
 options = MagicMock()
 args = ["setup"]
@@ -364,7 +365,7 @@ class TestAmbariServer(TestCase):
 
 options.dbms = None
 options.sid_or_sname = "sid"
-_ambari_server_.main()
+_ambari_server_.mainBody()
 
 self.assertTrue(setup_method.called)
 self.assertFalse(start_method.called)
@@ -373,6 +374,48 @@ class TestAmbariServer(TestCase):
 
 self.assertFalse(False, get_verbose())
 self.assertFalse(False, get_silent())
+
+setup_method.reset_mock()
+start_method.reset_mock()
+stop_method.reset_mock()
+reset_method.reset_mock()
+exit_mock.reset_mock()
+args = ["setup", "-v"]
+options = MagicMock()
+opm.parse_args.return_value = (options, args)
+options.dbms = None
+options.sid_or_sname = "sid"
+setup_method.side_effect

ambari git commit: AMBARI-9639. Unit Tests for PreUpgradeChecks (dlysnichenko)

2015-02-18 Thread dmitriusan
Repository: ambari
Updated Branches:
  refs/heads/trunk 45716f162 -> 53241b914


AMBARI-9639. Unit Tests for PreUpgradeChecks (dlysnichenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/53241b91
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/53241b91
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/53241b91

Branch: refs/heads/trunk
Commit: 53241b914dbb2dc6d967f22cc18ee51217bec18c
Parents: 45716f1
Author: Lisnichenko Dmitro 
Authored: Wed Feb 18 14:21:58 2015 +0200
Committer: Lisnichenko Dmitro 
Committed: Wed Feb 18 14:21:58 2015 +0200

--
 .../checks/SecondaryNamenodeDeletedCheck.java   |   9 +-
 .../ServicesJobsDistributedCacheCheck.java  |  72 ---
 .../ServicesMapReduceDistributedCacheCheck.java |  74 
 .../ServicesNamenodeHighAvailabilityCheck.java  |   8 +-
 .../ServicesOozieDistributedCacheCheck.java |  74 
 .../ServicesTezDistributedCacheCheck.java   |  85 +
 .../PreUpgradeCheckResourceProvider.java|  13 +-
 .../server/upgrade/UpgradeCatalog200.java   |   7 ++
 .../2.2/services/TEZ/configuration/tez-site.xml |   6 +
 .../server/checks/HostsHeartbeatCheckTest.java  |  96 +++
 .../checks/HostsMasterMaintenanceCheckTest.java | 120 +++
 .../checks/HostsRepositoryVersionCheckTest.java | 115 ++
 .../SecondaryNamenodeDeletedCheckTest.java  |  97 +++
 .../checks/ServicesDecommissionCheckTest.java   |  90 ++
 .../ServicesMaintenanceModeCheckTest.java   |  74 
 ...vicesMapReduceDistributedCacheCheckTest.java |  98 +++
 ...rvicesNamenodeHighAvailabilityCheckTest.java |  97 +++
 .../ServicesOozieDistributedCacheCheckTest.java | 114 ++
 .../ServicesTezDistributedCacheCheckTest.java   |  98 +++
 .../server/checks/ServicesUpCheckTest.java  |  74 
 .../ServicesYarnWorkPreservingCheckTest.java|  97 +++
 .../server/upgrade/UpgradeCatalog200Test.java   |   5 +
 22 files changed, 1446 insertions(+), 77 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/53241b91/ambari-server/src/main/java/org/apache/ambari/server/checks/SecondaryNamenodeDeletedCheck.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/SecondaryNamenodeDeletedCheck.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/SecondaryNamenodeDeletedCheck.java
index 86ab7fa..6ba28f1 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/SecondaryNamenodeDeletedCheck.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/SecondaryNamenodeDeletedCheck.java
@@ -18,8 +18,10 @@
 package org.apache.ambari.server.checks;
 
 import com.google.inject.Inject;
+
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.ServiceComponentNotFoundException;
+import org.apache.ambari.server.ServiceNotFoundException;
 import org.apache.ambari.server.controller.PrereqCheckRequest;
 import org.apache.ambari.server.orm.dao.HostComponentStateDAO;
 import org.apache.ambari.server.orm.entities.HostComponentStateEntity;
@@ -51,7 +53,12 @@ public class SecondaryNamenodeDeletedCheck extends 
AbstractCheckDescriptor {
   @Override
   public boolean isApplicable(PrereqCheckRequest request) throws 
AmbariException {
 final Cluster cluster = 
clustersProvider.get().getCluster(request.getClusterName());
-return cluster.getService(MasterHostResolver.Service.HDFS.name()) != null;
+try {
+  cluster.getService("HDFS");
+} catch (ServiceNotFoundException ex) {
+  return false;
+}
+return true;
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/53241b91/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesJobsDistributedCacheCheck.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesJobsDistributedCacheCheck.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesJobsDistributedCacheCheck.java
deleted file mode 100644
index d7dec99..000
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesJobsDistributedCacheCheck.java
+++ /dev/null
@@ -1,72 +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 Licen

ambari git commit: AMBARI-9688. Some markup issues when window size is reduced. (onechiporenko)

2015-02-18 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 48a8de158 -> 45716f162


AMBARI-9688. Some markup issues when window size is reduced. (onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/45716f16
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/45716f16
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/45716f16

Branch: refs/heads/trunk
Commit: 45716f1628739dfb12a051fb8f76ea9bf180ed19
Parents: 48a8de1
Author: Oleg Nechiporenko 
Authored: Wed Feb 18 13:42:35 2015 +0200
Committer: Oleg Nechiporenko 
Committed: Wed Feb 18 13:42:35 2015 +0200

--
 ambari-web/app/styles/application.less  | 10 --
 ambari-web/app/templates/main/dashboard.hbs |  4 ++--
 2 files changed, 10 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/45716f16/ambari-web/app/styles/application.less
--
diff --git a/ambari-web/app/styles/application.less 
b/ambari-web/app/styles/application.less
index ad2f0f4..0f7da8c 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -4512,10 +4512,16 @@ ul.inline li {
 }
   }
 
+  .col5,
+  td:first-child + td + td + td + td + td,
+  th:first-child + th + th + th + th + th {
+width: 13%!important;
+  }
+
   .col6,
   td:first-child + td + td + td + td + td + td,
   th:first-child + th + th + th + th + th + th{
-width: 12%!important;
+width: 10%!important;
   }
 
   .col7,
@@ -4527,7 +4533,7 @@ ul.inline li {
   .col8,
   td:first-child + td + td + td + td + td + td + td + td,
   th:first-child + th + th + th + th + th + th + th + th{
-width: 11%!important;
+width: 10%!important;
   }
   .col9,
   td:first-child + td + td + td + td + td + td + td + td + td,

http://git-wip-us.apache.org/repos/asf/ambari/blob/45716f16/ambari-web/app/templates/main/dashboard.hbs
--
diff --git a/ambari-web/app/templates/main/dashboard.hbs 
b/ambari-web/app/templates/main/dashboard.hbs
index 94f9e35..707c5df 100644
--- a/ambari-web/app/templates/main/dashboard.hbs
+++ b/ambari-web/app/templates/main/dashboard.hbs
@@ -17,11 +17,11 @@
 }}
 
 
-  
+  
 {{view App.MainServiceMenuView}}
 {{view App.AllServicesActionView}}
   
-
+
   
 {{#each category in view.categories}}
   {{#view view.NavItemView itemBinding="category.name" }}



ambari git commit: AMBARI-9687. Prepare for publishing Ambari artifacts to Maven repository. (yusaku)

2015-02-18 Thread yusaku
Repository: ambari
Updated Branches:
  refs/heads/trunk 747326a28 -> 48a8de158


AMBARI-9687. Prepare for publishing Ambari artifacts to Maven repository. 
(yusaku)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/48a8de15
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/48a8de15
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/48a8de15

Branch: refs/heads/trunk
Commit: 48a8de15868e9289cb3c71d7ff003f64cabc7d24
Parents: 747326a
Author: Yusaku Sako 
Authored: Wed Feb 18 00:50:51 2015 -0800
Committer: Yusaku Sako 
Committed: Wed Feb 18 00:50:51 2015 -0800

--
 ambari-admin/pom.xml|  4 +-
 ambari-agent/pom.xml|  4 +-
 ambari-client/groovy-client/pom.xml |  4 +-
 ambari-client/pom.xml   |  4 +-
 ambari-client/python-client/pom.xml |  4 +-
 ambari-metrics/ambari-metrics-assembly/pom.xml  |  4 +-
 ambari-metrics/ambari-metrics-common/pom.xml|  2 +-
 .../ambari-metrics-flume-sink/pom.xml   |  4 +-
 .../ambari-metrics-hadoop-sink/pom.xml  |  4 +-
 .../ambari-metrics-host-monitoring/pom.xml  |  4 +-
 .../ambari-metrics-kafka-sink/pom.xml   |  4 +-
 .../ambari-metrics-storm-sink/pom.xml   |  4 +-
 .../ambari-metrics-timelineservice/pom.xml  |  6 +-
 .../src/main/python/embedded_hbase_service.py   |  4 +-
 ambari-metrics/pom.xml  |  2 +-
 ambari-project/pom.xml  |  9 +--
 ambari-server/pom.xml   |  4 +-
 ambari-shell/ambari-groovy-shell/pom.xml|  6 +-
 ambari-shell/ambari-python-shell/pom.xml|  4 +-
 ambari-shell/pom.xml|  4 +-
 ambari-views/pom.xml| 63 +++-
 ambari-web/pom.xml  |  4 +-
 contrib/views/capacity-scheduler/pom.xml|  6 +-
 contrib/views/files/pom.xml |  6 +-
 contrib/views/jobs/pom.xml  |  8 +--
 contrib/views/pig/pom.xml   |  8 +--
 contrib/views/pom.xml   |  8 +--
 contrib/views/slider/pom.xml|  6 +-
 contrib/views/tez/pom.xml   |  4 +-
 pom.xml |  2 +-
 30 files changed, 127 insertions(+), 73 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/48a8de15/ambari-admin/pom.xml
--
diff --git a/ambari-admin/pom.xml b/ambari-admin/pom.xml
index 1222e36..5fa3561 100644
--- a/ambari-admin/pom.xml
+++ b/ambari-admin/pom.xml
@@ -19,7 +19,7 @@
   
 org.apache.ambari
 ambari-project
-2.0.0.0
+2.0.0-SNAPSHOT
 ../ambari-project
   
   4.0.0
@@ -27,7 +27,7 @@
   ambari-admin
   jar
   Ambari Admin View
-  2.0.0.0
+  2.0.0-SNAPSHOT
   Admin control panel
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/48a8de15/ambari-agent/pom.xml
--
diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml
index 8537b28..fbc5029 100644
--- a/ambari-agent/pom.xml
+++ b/ambari-agent/pom.xml
@@ -19,14 +19,14 @@
   
 org.apache.ambari
 ambari-project
-2.0.0.0
+2.0.0-SNAPSHOT
 ../ambari-project
   
   4.0.0
   org.apache.ambari
   ambari-agent
   pom
-  2.0.0.0
+  2.0.0-SNAPSHOT
   Ambari Agent
   Ambari Agent
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/48a8de15/ambari-client/groovy-client/pom.xml
--
diff --git a/ambari-client/groovy-client/pom.xml 
b/ambari-client/groovy-client/pom.xml
index cf7a77f..dc8d888 100644
--- a/ambari-client/groovy-client/pom.xml
+++ b/ambari-client/groovy-client/pom.xml
@@ -12,14 +12,14 @@
   
 ambari-client
 org.apache.ambari
-2.0.0.0
+2.0.0-SNAPSHOT
 ../../ambari-client/
   
   4.0.0
   org.apache.ambari
   groovy-client
   jar
-  2.0.0.0
+  2.0.0-SNAPSHOT
   Ambari Groovy Client
   Ambari Groovy client
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/48a8de15/ambari-client/pom.xml
--
diff --git a/ambari-client/pom.xml b/ambari-client/pom.xml
index 201328c..82fea14 100755
--- a/ambari-client/pom.xml
+++ b/ambari-client/pom.xml
@@ -20,14 +20,14 @@
   
 org.apache.ambari
 ambari-project
-2.0.0.0
+2.0.0-SNAPSHOT
 ../ambari-project
   
   4.0.0
   org.apache.ambari
   ambari-client
   pom
-  2.0.0.0
+  2.0.0-SNAPSHOT
   Ambari Client
   Ambari client
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/48a8de15/ambari-client/python-client/pom.xml
---