[2/2] ambari git commit: AMBARI-9102. Refactor rolling upgrades prerequisite checks to expose and repackage utility classes (rlevas)

2015-01-19 Thread rlevas
AMBARI-9102. Refactor rolling upgrades prerequisite checks to expose and 
repackage utility classes (rlevas)


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

Branch: refs/heads/trunk
Commit: 7e691292ad2323341e77a5399db388ca0128387c
Parents: a902c53
Author: Robert Levas rle...@hortonworks.com
Authored: Mon Jan 19 19:04:57 2015 -0500
Committer: Robert Levas rle...@hortonworks.com
Committed: Mon Jan 19 19:04:57 2015 -0500

--
 .../server/checks/AbstractCheckDescriptor.java  |  86 
 .../server/checks/HostsHeartbeatCheck.java  |  60 +++
 .../checks/HostsMasterMaintenanceCheck.java |  73 +++
 .../checks/HostsRepositoryVersionCheck.java |  72 +++
 .../checks/ServicesDecommissionCheck.java   |  62 +++
 .../ServicesJobsDistributedCacheCheck.java  |  72 +++
 .../checks/ServicesMaintenanceModeCheck.java|  59 +++
 .../ServicesNamenodeHighAvailabilityCheck.java  |  63 +++
 .../ambari/server/checks/ServicesUpCheck.java   |  62 +++
 .../checks/ServicesYarnWorkPreservingCheck.java |  70 +++
 .../controller/PreUpgradeCheckRequest.java  |  43 --
 .../server/controller/PrereqCheckRequest.java   |  43 ++
 .../PreUpgradeCheckResourceProvider.java|  68 ++-
 .../apache/ambari/server/state/CheckHelper.java |  72 +++
 .../ambari/server/state/UpgradeCheckHelper.java | 497 ---
 .../server/state/stack/PrereqCheckStatus.java   |  26 +
 .../server/state/stack/PrereqCheckType.java |  27 +
 .../server/state/stack/PrerequisiteCheck.java   |  82 +++
 .../state/stack/upgrade/UpgradeCheck.java   |  82 ---
 .../state/stack/upgrade/UpgradeCheckStatus.java |  26 -
 .../state/stack/upgrade/UpgradeCheckType.java   |  27 -
 .../ambari/server/state/CheckHelperTest.java| 134 +
 .../server/state/UpgradeCheckHelperTest.java| 135 -
 23 files changed, 1117 insertions(+), 824 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7e691292/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java
new file mode 100644
index 000..f49e666
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java
@@ -0,0 +1,86 @@
+/*
+ * 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.
+ */
+package org.apache.ambari.server.checks;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+import org.apache.ambari.server.AmbariException;
+import org.apache.ambari.server.configuration.Configuration;
+import org.apache.ambari.server.controller.PrereqCheckRequest;
+import org.apache.ambari.server.orm.dao.HostVersionDAO;
+import org.apache.ambari.server.orm.dao.RepositoryVersionDAO;
+import org.apache.ambari.server.state.Clusters;
+import org.apache.ambari.server.state.stack.PrerequisiteCheck;
+import org.apache.ambari.server.state.stack.PrereqCheckType;
+
+/**
+ * Describes prerequisite check.
+ */
+public abstract class AbstractCheckDescriptor {
+
+  public final String id;
+  public final String description;
+  public final PrereqCheckType type;
+
+  @Inject
+  ProviderClusters clustersProvider;
+
+  @Inject
+  ProviderConfiguration configurationProvider;
+
+  @Inject
+  ProviderHostVersionDAO hostVersionDaoProvider;
+
+  @Inject
+  ProviderRepositoryVersionDAO repositoryVersionDaoProvider;
+
+  /**
+   * Constructor.
+   *
+   * @param id unique identifier
+   * @param type type
+   * @param description description
+   */
+  public AbstractCheckDescriptor(String id, PrereqCheckType type, String 
description) {
+this.id = id;
+this.type = type;
+this.description = description;
+  }
+
+  /**
+   * Tests if the prerequisite 

[1/2] ambari git commit: AMBARI-9102. Refactor rolling upgrades prerequisite checks to expose and repackage utility classes (rlevas)

2015-01-19 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/trunk a902c5372 - 7e691292a


http://git-wip-us.apache.org/repos/asf/ambari/blob/7e691292/ambari-server/src/test/java/org/apache/ambari/server/state/CheckHelperTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/state/CheckHelperTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/state/CheckHelperTest.java
new file mode 100644
index 000..e6cc089
--- /dev/null
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/state/CheckHelperTest.java
@@ -0,0 +1,134 @@
+/*
+ * 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.
+ */
+
+package org.apache.ambari.server.state;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.util.Providers;
+import junit.framework.Assert;
+
+import org.apache.ambari.server.AmbariException;
+import org.apache.ambari.server.ClusterNotFoundException;
+import org.apache.ambari.server.checks.AbstractCheckDescriptor;
+import org.apache.ambari.server.checks.ServicesUpCheck;
+import org.apache.ambari.server.configuration.Configuration;
+import org.apache.ambari.server.controller.PrereqCheckRequest;
+import org.apache.ambari.server.orm.dao.HostVersionDAO;
+import org.apache.ambari.server.orm.dao.RepositoryVersionDAO;
+import org.apache.ambari.server.state.stack.PrerequisiteCheck;
+import org.apache.ambari.server.state.stack.PrereqCheckStatus;
+import org.easymock.EasyMock;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+
+
+/**
+ * Tests the {@link CheckHelper} class
+ */
+
+public class CheckHelperTest {
+
+/**
+   * Makes sure that people don't forget to add new checks to registry.
+   */
+
+  @Test
+  public void performPreUpgradeChecksTest_ok() throws Exception {
+final CheckHelper helper = new CheckHelper();
+ListAbstractCheckDescriptor updateChecksRegistry = new 
ArrayListAbstractCheckDescriptor();
+AbstractCheckDescriptor descriptor = 
EasyMock.createNiceMock(AbstractCheckDescriptor.class);
+descriptor.perform(EasyMock.PrerequisiteCheck anyObject(), 
EasyMock.PrereqCheckRequest anyObject());
+EasyMock.expectLastCall().times(1);
+EasyMock.expect(descriptor.isApplicable(EasyMock.PrereqCheckRequest 
anyObject())).andReturn(true);
+EasyMock.replay(descriptor);
+updateChecksRegistry.add(descriptor);
+
+helper.performChecks(new PrereqCheckRequest(cluster), 
updateChecksRegistry);
+EasyMock.verify(descriptor);
+  }
+
+  @Test
+  public void performPreUpgradeChecksTest_notApplicable() throws Exception {
+final CheckHelper helper = new CheckHelper();
+ListAbstractCheckDescriptor updateChecksRegistry = new 
ArrayListAbstractCheckDescriptor();
+AbstractCheckDescriptor descriptor = 
EasyMock.createNiceMock(AbstractCheckDescriptor.class);
+EasyMock.expect(descriptor.isApplicable(EasyMock.PrereqCheckRequest 
anyObject())).andReturn(false);
+EasyMock.replay(descriptor);
+updateChecksRegistry.add(descriptor);
+helper.performChecks(new PrereqCheckRequest(cluster), 
updateChecksRegistry);
+EasyMock.verify(descriptor);
+  }
+
+  @Test
+  public void performPreUpgradeChecksTest_throwsException() throws Exception {
+final CheckHelper helper = new CheckHelper();
+ListAbstractCheckDescriptor updateChecksRegistry = new 
ArrayListAbstractCheckDescriptor();
+AbstractCheckDescriptor descriptor = 
EasyMock.createNiceMock(AbstractCheckDescriptor.class);
+descriptor.perform(EasyMock.PrerequisiteCheck anyObject(), 
EasyMock.PrereqCheckRequest anyObject());
+EasyMock.expectLastCall().andThrow(new AmbariException(error));
+EasyMock.expect(descriptor.isApplicable(EasyMock.PrereqCheckRequest 
anyObject())).andReturn(true);
+EasyMock.replay(descriptor);
+updateChecksRegistry.add(descriptor);
+final ListPrerequisiteCheck upgradeChecks = helper.performChecks(new 
PrereqCheckRequest(cluster), updateChecksRegistry);
+EasyMock.verify(descriptor);
+

ambari git commit: AMBARI-9165. Support querying Metrics System Hbase metrics using Ambari API. (swagle)

2015-01-19 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/trunk 7e691292a - af463646a


AMBARI-9165. Support querying Metrics System Hbase metrics using Ambari API. 
(swagle)


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

Branch: refs/heads/trunk
Commit: af463646ad94c65e768df7720ce28d9de58b2f4c
Parents: 7e69129
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Mon Jan 19 15:52:46 2015 -0800
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Mon Jan 19 16:50:32 2015 -0800

--
 .../internal/AbstractPropertyProvider.java  |   2 +-
 .../metrics/timeline/AMSPropertyProvider.java   |  46 -
 .../controller/utilities/PropertyHelper.java|   2 +-
 .../src/main/resources/ganglia_properties.json  |   6 +-
 .../timeline/AMSPropertyProviderTest.java   |  43 
 .../resources/ams/embedded_host_metric.json | 198 +++
 6 files changed, 286 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/af463646/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractPropertyProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractPropertyProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractPropertyProvider.java
index f13e1ba..abd242e 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractPropertyProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractPropertyProvider.java
@@ -128,7 +128,7 @@ public abstract class AbstractPropertyProvider extends 
BaseProvider implements P
   }
 
   protected void getPropertyInfoMap(String componentName, String propertyId, 
MapString, PropertyInfo propertyInfoMap) {
-MapString, PropertyInfo componentMetricMap = 
componentMetrics.get(componentName);
+MapString, PropertyInfo componentMetricMap = 
getComponentMetrics().get(componentName);
 
 propertyInfoMap.clear();
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/af463646/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java
index 8d29b4e..a2c94f2 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java
@@ -25,6 +25,7 @@ import org.apache.ambari.server.controller.spi.Request;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.controller.spi.SystemException;
 import org.apache.ambari.server.controller.spi.TemporalInfo;
+import org.apache.ambari.server.controller.utilities.PropertyHelper;
 import org.apache.ambari.server.controller.utilities.StreamProvider;
 import org.apache.hadoop.metrics2.sink.timeline.TimelineMetric;
 import org.apache.hadoop.metrics2.sink.timeline.TimelineMetrics;
@@ -33,10 +34,10 @@ import org.codehaus.jackson.map.AnnotationIntrospector;
 import org.codehaus.jackson.map.ObjectMapper;
 import org.codehaus.jackson.map.ObjectReader;
 import org.codehaus.jackson.xc.JaxbAnnotationIntrospector;
+
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
-import java.text.DecimalFormat;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
@@ -47,6 +48,10 @@ import java.util.Map;
 import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+
+import static org.apache.ambari.server.Role.HBASE_MASTER;
+import static org.apache.ambari.server.Role.HBASE_REGIONSERVER;
+import static org.apache.ambari.server.Role.METRIC_COLLECTOR;
 import static 
org.apache.ambari.server.controller.metrics.MetricsServiceProvider.MetricsService.TIMELINE_METRICS;
 import static org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
 
@@ -58,9 +63,9 @@ public abstract class AMSPropertyProvider extends 
MetricsPropertyProvider {
   private static final int COLLECTOR_DEFAULT_PORT = 6188;
 
   static {
-TIMELINE_APPID_MAP.put(HBASE_MASTER, HBASE);
-TIMELINE_APPID_MAP.put(HBASE_REGIONSERVER, HBASE);
-TIMELINE_APPID_MAP.put(METRIC_COLLECTOR, AMS-HBASE);
+

ambari git commit: AMBARI-9167. Enable Running All Service Smoke Tests at various check points in upgrade pack (ncole)

2015-01-19 Thread ncole
Repository: ambari
Updated Branches:
  refs/heads/trunk 6121d56df - a757dcb50


AMBARI-9167. Enable Running All Service Smoke Tests at various check points in 
upgrade pack (ncole)


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

Branch: refs/heads/trunk
Commit: a757dcb501a08b4e5562238bf75c567bced9efbb
Parents: 6121d56
Author: Nate Cole nc...@hortonworks.com
Authored: Thu Jan 15 21:05:25 2015 -0500
Committer: Nate Cole nc...@hortonworks.com
Committed: Mon Jan 19 10:13:29 2015 -0500

--
 .../ambari/server/state/UpgradeHelper.java  |  38 +++-
 .../ambari/server/state/stack/UpgradePack.java  |  77 +++-
 .../state/stack/upgrade/ColocatedGrouping.java  |  18 +-
 .../server/state/stack/upgrade/Grouping.java|  35 ++--
 .../stack/upgrade/ServiceCheckGrouping.java | 153 
 .../stacks/HDP/2.2/upgrades/upgrade-2.2.xml |  93 ++
 .../AmbariManagementControllerTest.java |  10 +-
 .../ambari/server/state/UpgradeHelperTest.java  |  51 --
 .../server/state/stack/UpgradePackTest.java |  42 +
 .../HDP/2.1.1/upgrades/upgrade_test_checks.xml  | 182 +++
 10 files changed, 614 insertions(+), 85 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a757dcb5/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java 
b/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java
index cdecac6..e3d8619 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java
@@ -28,6 +28,7 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import org.apache.ambari.server.AmbariException;
+import org.apache.ambari.server.api.services.AmbariMetaInfo;
 import org.apache.ambari.server.controller.internal.RequestResourceProvider;
 import org.apache.ambari.server.controller.internal.StageResourceProvider;
 import org.apache.ambari.server.controller.predicate.AndPredicate;
@@ -50,6 +51,7 @@ import 
org.apache.ambari.server.state.stack.UpgradePack.ProcessingComponent;
 import org.apache.ambari.server.state.stack.upgrade.ClusterGrouping;
 import org.apache.ambari.server.state.stack.upgrade.Grouping;
 import org.apache.ambari.server.state.stack.upgrade.ManualTask;
+import org.apache.ambari.server.state.stack.upgrade.ServiceCheckGrouping;
 import org.apache.ambari.server.state.stack.upgrade.StageWrapper;
 import org.apache.ambari.server.state.stack.upgrade.StageWrapperBuilder;
 import org.apache.ambari.server.state.stack.upgrade.Task;
@@ -111,6 +113,9 @@ public class UpgradeHelper {
   @Inject
   private ProviderConfigHelper m_configHelper;
 
+  @Inject
+  private ProviderAmbariMetaInfo m_ambariMetaInfo;
+
   /**
* Generates a list of UpgradeGroupHolder items that are used to execute a
* downgrade
@@ -171,21 +176,40 @@ public class UpgradeHelper {
   private ListUpgradeGroupHolder createSequence(MasterHostResolver mhr,
   UpgradePack upgradePack, String version, boolean forUpgrade)
   throws AmbariException {
+
 Cluster cluster = mhr.getCluster();
 MapString, MapString, ProcessingComponent allTasks = 
upgradePack.getTasks();
 ListUpgradeGroupHolder groups = new ArrayListUpgradeGroupHolder();
 
-int idx = 0;
 
-for (Grouping group : upgradePack.getGroups()) {
+for (Grouping group : upgradePack.getGroups(forUpgrade)) {
   if (ClusterGrouping.class.isInstance(group)) {
 UpgradeGroupHolder groupHolder = getClusterGroupHolder(
 cluster, (ClusterGrouping) group, forUpgrade ? null : version);
+
 if (null != groupHolder) {
   groups.add(groupHolder);
-  idx++;
-  continue;
 }
+
+continue;
+  } else if (ServiceCheckGrouping.class.isInstance(group)) {
+ServiceCheckGrouping scg = (ServiceCheckGrouping) group;
+
+scg.getBuilder().setHelpers(cluster, m_ambariMetaInfo.get());
+
+ListStageWrapper wrappers = scg.getBuilder().build();
+
+if (!wrappers.isEmpty()) {
+  UpgradeGroupHolder groupHolder = new UpgradeGroupHolder();
+  groupHolder.name = group.name;
+  groupHolder.title = group.title;
+  groupHolder.skippable = group.skippable;
+  groupHolder.allowRetry = group.allowRetry;
+  groupHolder.items = wrappers;
+  groups.add(groupHolder);
+}
+
+continue;
   }
 
   

ambari git commit: AMBARI-8949. Summary:Patch to fix knox install issue. (Velmurugan Periasamy via yusaku)

2015-01-19 Thread yusaku
Repository: ambari
Updated Branches:
  refs/heads/trunk ea6c4ecaf - 4d71477d1


AMBARI-8949. Summary:Patch to fix knox install issue. (Velmurugan Periasamy via 
yusaku)


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

Branch: refs/heads/trunk
Commit: 4d71477d10193fcc48030093914fa69793297292
Parents: ea6c4ec
Author: Yusaku Sako yus...@hortonworks.com
Authored: Mon Jan 19 09:46:16 2015 -0800
Committer: Yusaku Sako yus...@hortonworks.com
Committed: Mon Jan 19 09:46:16 2015 -0800

--
 .../ranger-knox-plugin-properties.xml   | 156 +++
 1 file changed, 156 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4d71477d/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/ranger-knox-plugin-properties.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/ranger-knox-plugin-properties.xml
 
b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/ranger-knox-plugin-properties.xml
new file mode 100644
index 000..b744658
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/ranger-knox-plugin-properties.xml
@@ -0,0 +1,156 @@
+?xml version=1.0 encoding=UTF-8?
+!--
+/**
+ * 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.
+ */
+--
+configuration supports_final=true
+
+   property
+   namecommon.name.for.certificate/name
+   value-/value
+   descriptionUsed for repository creation on ranger 
admin/description
+   /property
+
+property
+nameranger-knox-plugin-enabled/name
+valueNo/value
+descriptionEnable ranger knox plugin ?/description
+/property
+
+   property
+   nameREPOSITORY_CONFIG_USERNAME/name
+   valueadmin/value
+   descriptionUsed for repository creation on ranger 
admin/description
+   /property 
+
+   property
+   nameREPOSITORY_CONFIG_PASSWORD/name
+   valueadmin-password/value
+   property-typePASSWORD/property-type
+   descriptionUsed for repository creation on ranger 
admin/description
+   /property 
+
+   property
+   nameKNOX_HOME/name
+   value/usr/hdp/current/knox-server/value
+   description/description
+   /property
+
+   property
+   nameXAAUDIT.DB.IS_ENABLED/name
+   valuetrue/value
+   description/description
+   /property
+
+   property
+   nameXAAUDIT.HDFS.IS_ENABLED/name
+   valuefalse/value
+   description/description
+   /property
+
+   property
+   nameXAAUDIT.HDFS.DESTINATION_DIRECTORY/name
+   
valuehdfs://__REPLACE__NAME_NODE_HOST:8020/ranger/audit/%app-type%/%time:MMdd%/value
+   description/description
+   /property
+
+   property
+   nameXAAUDIT.HDFS.LOCAL_BUFFER_DIRECTORY/name
+   value__REPLACE__LOG_DIR/hadoop/%app-type%/audit/value
+   description/description
+   /property
+
+   property
+   nameXAAUDIT.HDFS.LOCAL_ARCHIVE_DIRECTORY/name
+   
value__REPLACE__LOG_DIR/hadoop/%app-type%/audit/archive/value
+   description/description
+   /property
+
+   property
+   nameXAAUDIT.HDFS.DESTINTATION_FILE/name
+   value%hostname%-audit.log/value
+   description/description
+   /property
+
+   property
+   nameXAAUDIT.HDFS.DESTINTATION_FLUSH_INTERVAL_SECONDS/name
+   value900/value
+   description/description
+   /property
+
+   property
+   nameXAAUDIT.HDFS.DESTINTATION_ROLLOVER_INTERVAL_SECONDS/name
+ 

ambari git commit: AMBARI-8973 Add precision option support to Ambari Metrics API (dsen)

2015-01-19 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/trunk a757dcb50 - 7621f9013


AMBARI-8973 Add precision option support to Ambari Metrics API (dsen)


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

Branch: refs/heads/trunk
Commit: 7621f9013391093eeb8dd1aee2524e919e7f
Parents: a757dcb
Author: Dmytro Sen d...@apache.org
Authored: Mon Jan 19 13:25:20 2015 +0200
Committer: Dmytro Sen d...@apache.org
Committed: Mon Jan 19 18:24:26 2015 +0200

--
 .../timeline/HBaseTimelineMetricStore.java  |   8 +-
 .../metrics/timeline/PhoenixHBaseAccessor.java  |  48 +++-
 .../metrics/timeline/PhoenixTransactSQL.java| 119 +++-
 .../metrics/timeline/Precision.java |  47 
 .../timeline/TimelineMetricAggregator.java  |   2 +-
 .../TimelineMetricClusterAggregator.java|   2 +-
 .../TimelineMetricClusterAggregatorHourly.java  |   6 +-
 .../metrics/timeline/TimelineMetricStore.java   |   5 +-
 .../webapp/TimelineWebServices.java |  19 +-
 .../timeline/AbstractMiniHBaseClusterTest.java  |  26 +-
 .../metrics/timeline/ITClusterAggregator.java   | 121 ++---
 .../metrics/timeline/ITMetricAggregator.java|  60 +---
 .../timeline/ITPhoenixHBaseAccessor.java| 271 +++
 .../metrics/timeline/MetricTestHelper.java  |  96 +++
 .../metrics/timeline/TestClusterSuite.java  |   2 +-
 .../timeline/TestPhoenixTransactSQL.java| 133 -
 .../timeline/TestTimelineMetricStore.java   |   4 +-
 .../webapp/TestTimelineWebServices.java |   2 +-
 .../internal/AbstractProviderModule.java|   4 +-
 .../metrics/timeline/AMSPropertyProvider.java   |   3 +-
 20 files changed, 784 insertions(+), 194 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7621f901/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/HBaseTimelineMetricStore.java
--
diff --git 
a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/HBaseTimelineMetricStore.java
 
b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/HBaseTimelineMetricStore.java
index 3238312..1a0f530 100644
--- 
a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/HBaseTimelineMetricStore.java
+++ 
b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/HBaseTimelineMetricStore.java
@@ -113,11 +113,11 @@ public class HBaseTimelineMetricStore extends 
AbstractService
   @Override
   public TimelineMetrics getTimelineMetrics(ListString metricNames,
   String hostname, String applicationId, String instanceId,
-  Long startTime, Long endTime, Integer limit,
+  Long startTime, Long endTime, Precision precision, Integer limit,
   boolean groupedByHosts) throws SQLException, IOException {
 
 Condition condition = new LikeCondition(metricNames, hostname, 
applicationId,
-  instanceId, startTime, endTime, limit, groupedByHosts);
+  instanceId, startTime, endTime, precision, limit, groupedByHosts);
 
 if (hostname == null) {
   return hBaseAccessor.getAggregateMetricRecords(condition);
@@ -129,12 +129,12 @@ public class HBaseTimelineMetricStore extends 
AbstractService
   @Override
   public TimelineMetric getTimelineMetric(String metricName, String hostname,
   String applicationId, String instanceId, Long startTime,
-  Long endTime, Integer limit)
+  Long endTime, Precision precision, Integer limit)
   throws SQLException, IOException {
 
 TimelineMetrics metrics = hBaseAccessor.getMetricRecords(
   new LikeCondition(Collections.singletonList(metricName), hostname,
-applicationId, instanceId, startTime, endTime, limit, true)
+applicationId, instanceId, startTime, endTime, precision, limit, true)
 );
 
 TimelineMetric metric = new TimelineMetric();

http://git-wip-us.apache.org/repos/asf/ambari/blob/7621f901/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java
--
diff --git 

ambari git commit: AMBARI-9180. Move existing (user) custom actions to a new location (dlysnichenko)

2015-01-19 Thread dmitriusan
Repository: ambari
Updated Branches:
  refs/heads/trunk 4d71477d1 - 908e7354c


AMBARI-9180. Move existing (user) custom actions to a new location 
(dlysnichenko)


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

Branch: refs/heads/trunk
Commit: 908e7354cb25c5513dc6104486699c985f27bec7
Parents: 4d71477
Author: Lisnichenko Dmitro dlysniche...@hortonworks.com
Authored: Mon Jan 19 19:15:27 2015 +0200
Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com
Committed: Mon Jan 19 19:54:50 2015 +0200

--
 ambari-server/src/main/python/ambari-server.py  | 41 +++
 .../src/test/python/TestAmbariServer.py | 52 ++--
 2 files changed, 89 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/908e7354/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 ba3d5e7..7c08083 100755
--- a/ambari-server/src/main/python/ambari-server.py
+++ b/ambari-server/src/main/python/ambari-server.py
@@ -2713,11 +2713,52 @@ def upgrade(args):
 os.remove(jdbc_symlink)
   os.symlink(os.path.join(resources_dir,JDBC_DB_DEFAULT_DRIVER[db_name]), 
jdbc_symlink)
 
+  # Move *.py files from custom_actions to custom_actions/scripts
+  # This code exists for historic reasons in which custom action python 
scripts location changed from Ambari 1.7.0 to 2.0.0
+  ambari_version = get_ambari_version(properties)
+  if ambari_version is None:
+args.warnings.append(*.py files were not moved from custom_actions to 
custom_actions/scripts.)
+  elif compare_versions(ambari_version, 2.0.0) == 0:
+move_user_custom_actions()
+
+
   # check if ambari has obsolete LDAP configuration
   if properties.get_property(LDAP_PRIMARY_URL_PROPERTY) and not 
properties.get_property(IS_LDAP_CONFIGURED):
 args.warnings.append(Existing LDAP configuration is detected. You must 
run the \ambari-server setup-ldap\ command to adjust existing LDAP 
configuration.)
 
 
+def move_user_custom_actions():
+  print_info_msg('Moving *.py files from custom_actions to 
custom_actions/scripts')
+  properties = get_ambari_properties()
+  if properties == -1:
+err = Error getting ambari properties
+print_error_msg(err)
+raise FatalException(-1, err)
+
+  try:
+resources_dir = properties[RESOURCES_DIR_PROPERTY]
+  except (KeyError), e:
+conf_file = properties.fileName
+err = 'Property ' + str(e) + ' is not defined at ' + conf_file
+print_error_msg(err)
+raise FatalException(1, err)
+
+  custom_actions_dir_path = os.path.join(resources_dir, 'custom_actions')
+  custom_actions_scripts_dir_path = os.path.join(custom_actions_dir_path, 
'scripts')
+  print_info_msg('Moving *.py files from %s to %s' % (custom_actions_dir_path, 
custom_actions_scripts_dir_path))
+
+  try:
+for custom_action_file_name in os.listdir(custom_actions_dir_path):
+  custom_action_file_path = os.path.join(custom_actions_dir_path, 
custom_action_file_name)
+  if os.path.isfile(custom_action_file_path) and 
custom_action_file_path.endswith('.py'):
+print_info_msg('Moving %s to %s' % (custom_action_file_path, 
custom_actions_scripts_dir_path))
+shutil.move(custom_action_file_path, custom_actions_scripts_dir_path)
+  except (OSError, shutil.Error) as e:
+err = 'Upgrade failed. Can not move *.py files from %s to %s. ' % 
(custom_actions_dir_path, custom_actions_scripts_dir_path) + str(e)
+print_error_msg(err)
+raise FatalException(1, err)
+
+
 #
 # The Ambari Server status.
 #

http://git-wip-us.apache.org/repos/asf/ambari/blob/908e7354/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 a8f4197..cb870b8 100644
--- a/ambari-server/src/test/python/TestAmbariServer.py
+++ b/ambari-server/src/test/python/TestAmbariServer.py
@@ -22,7 +22,7 @@ import os
 import datetime
 import errno
 import json
-from mock.mock import patch, MagicMock, create_autospec
+from mock.mock import patch, MagicMock, create_autospec, call
 import operator
 from optparse import OptionParser
 import platform
@@ -3060,6 +3060,24 @@ 
MIIFHjCCAwYCCQDpHKOBI+Lt0zANBgkqhkiG9w0BAQUFADBRMQswCQYDVQQGEwJV
 self.assertTrue(run_stack_upgrade_mock.called)
 run_stack_upgrade_mock.assert_called_with(HDP, 2.0, None, None)
 
+  @patch.object(_ambari_server_, get_ambari_properties)
+  

ambari git commit: AMBARI-9200 AMS : Metric monitor fails to start (dsen)

2015-01-19 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/trunk 908e7354c - ba98455cc


AMBARI-9200 AMS : Metric monitor fails to start (dsen)


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

Branch: refs/heads/trunk
Commit: ba98455cc6749a1d0980f021c8b6e276c3652040
Parents: 908e735
Author: Dmytro Sen d...@apache.org
Authored: Mon Jan 19 19:21:44 2015 +0200
Committer: Dmytro Sen d...@apache.org
Committed: Mon Jan 19 19:57:32 2015 +0200

--
 ambari-metrics/ambari-metrics-assembly/pom.xml| 3 ++-
 .../conf/unix/ambari-metrics-monitor  | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ba98455c/ambari-metrics/ambari-metrics-assembly/pom.xml
--
diff --git a/ambari-metrics/ambari-metrics-assembly/pom.xml 
b/ambari-metrics/ambari-metrics-assembly/pom.xml
index 1e1ca8c..a193f26 100644
--- a/ambari-metrics/ambari-metrics-assembly/pom.xml
+++ b/ambari-metrics/ambari-metrics-assembly/pom.xml
@@ -37,6 +37,7 @@
 
storm-sink.dir${project.basedir}/../ambari-metrics-storm-sink/storm-sink.dir
 
flume-sink.dir${project.basedir}/../ambari-metrics-flume-sink/flume-sink.dir
 python.verpython gt;= 2.6/python.ver
+python.develpython-devel/python.devel
 deb.python.verpython (gt;= 2.6)/deb.python.ver
 deb.architectureamd64/deb.architecture
 deb.dependency.list${deb.python.ver},python-dev,gcc/deb.dependency.list
@@ -198,7 +199,7 @@
   requires
 require${python.ver}/require
 requiregcc/require
-requirepython-devel/require
+require${python.devel}/require
   /requires
   preremoveScriptlet
 scriptFilesrc/main/package/rpm/preremove.sh/scriptFile

http://git-wip-us.apache.org/repos/asf/ambari/blob/ba98455c/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor
--
diff --git 
a/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor
 
b/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor
index aaa77c4..86c2ac7 100644
--- 
a/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor
+++ 
b/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor
@@ -73,7 +73,7 @@ if [ ! $(ls -A ${RESOURCE_MONITORING_DIR}/psutil/build) ]; 
then
   echo Building psutil...
   dir=$(pwd)
   cd ${RESOURCE_MONITORING_DIR}/psutil
-  ${PYTHON} setup.py install
+  ${PYTHON} setup.py build
   cd ${dir}
 else
   echo psutil build directory is not empty, continuing...



ambari git commit: AMBARI-9133 - Views: min and max version (tbeerbower)

2015-01-19 Thread tbeerbower
Repository: ambari
Updated Branches:
  refs/heads/trunk 7e33ea589 - ddf020dd6


AMBARI-9133 - Views: min and max version (tbeerbower)


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

Branch: refs/heads/trunk
Commit: ddf020dd6102b1918a0d9e1c669f3e54765cd344
Parents: 7e33ea5
Author: tbeerbower tbeerbo...@hortonworks.com
Authored: Mon Jan 19 13:57:48 2015 -0500
Committer: tbeerbower tbeerbo...@hortonworks.com
Committed: Mon Jan 19 13:57:58 2015 -0500

--
 .../internal/ViewVersionResourceProvider.java   |   8 +
 .../ambari/server/orm/entities/ViewEntity.java  |  11 +-
 .../apache/ambari/server/view/ViewRegistry.java |  95 ++--
 .../server/view/configuration/ViewConfig.java   |  30 
 .../AmbariPrivilegeResourceProviderTest.java|   2 +-
 .../ViewPrivilegeResourceProviderTest.java  |   2 +-
 .../server/orm/entities/ViewEntityTest.java |  13 +-
 .../ambari/server/view/ViewRegistryTest.java| 149 +--
 .../view/configuration/ViewConfigTest.java  |  26 
 ambari-views/src/main/resources/view.xsd|  10 ++
 10 files changed, 317 insertions(+), 29 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ddf020dd/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java
index 58cf774..95703fd 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java
@@ -49,6 +49,8 @@ public class ViewVersionResourceProvider extends 
AbstractResourceProvider {
   public static final String LABEL_PROPERTY_ID  = 
ViewVersionInfo/label;
   public static final String DESCRIPTION_PROPERTY_ID= 
ViewVersionInfo/description;
   public static final String VERSION_PROPERTY_ID= 
ViewVersionInfo/version;
+  public static final String MIN_AMBARI_VERSION_PROPERTY_ID = 
ViewVersionInfo/min_ambari_version;
+  public static final String MAX_AMBARI_VERSION_PROPERTY_ID = 
ViewVersionInfo/max_ambari_version;
   public static final String PARAMETERS_PROPERTY_ID = 
ViewVersionInfo/parameters;
   public static final String ARCHIVE_PROPERTY_ID= 
ViewVersionInfo/archive;
   public static final String MASKER_CLASS_PROPERTY_ID   = 
ViewVersionInfo/masker_class;
@@ -75,6 +77,8 @@ public class ViewVersionResourceProvider extends 
AbstractResourceProvider {
 propertyIds.add(LABEL_PROPERTY_ID);
 propertyIds.add(DESCRIPTION_PROPERTY_ID);
 propertyIds.add(VERSION_PROPERTY_ID);
+propertyIds.add(MIN_AMBARI_VERSION_PROPERTY_ID);
+propertyIds.add(MAX_AMBARI_VERSION_PROPERTY_ID);
 propertyIds.add(PARAMETERS_PROPERTY_ID);
 propertyIds.add(ARCHIVE_PROPERTY_ID);
 propertyIds.add(MASKER_CLASS_PROPERTY_ID);
@@ -131,6 +135,10 @@ public class ViewVersionResourceProvider extends 
AbstractResourceProvider {
 setResourceProperty(resource, LABEL_PROPERTY_ID, 
viewDefinition.getLabel(), requestedIds);
 setResourceProperty(resource, DESCRIPTION_PROPERTY_ID, 
viewDefinition.getDescription(), requestedIds);
 setResourceProperty(resource, VERSION_PROPERTY_ID, 
viewDefinition.getVersion(), requestedIds);
+setResourceProperty(resource, MIN_AMBARI_VERSION_PROPERTY_ID,
+viewDefinition.getConfiguration().getMinAmbariVersion(), 
requestedIds);
+setResourceProperty(resource, MAX_AMBARI_VERSION_PROPERTY_ID,
+viewDefinition.getConfiguration().getMaxAmbariVersion(), 
requestedIds);
 setResourceProperty(resource, PARAMETERS_PROPERTY_ID,
 viewDefinition.getConfiguration().getParameters(), 
requestedIds);
 setResourceProperty(resource, ARCHIVE_PROPERTY_ID, 
viewDefinition.getArchive(), requestedIds);

http://git-wip-us.apache.org/repos/asf/ambari/blob/ddf020dd/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java
index 2f83e02..f77c97e 100644
--- 

[2/3] ambari git commit: Revert 968c4b9de36f0c19f7c285dbee8770ad81ae6b3c AMBARI-8949. Support Ranger installation via Ambari. (Gautam Borad via yusaku) and resolve merge conflicts

2015-01-19 Thread jaimin
Revert 968c4b9de36f0c19f7c285dbee8770ad81ae6b3c AMBARI-8949. Support Ranger 
installation via Ambari. (Gautam Borad via yusaku) and resolve merge conflicts


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

Branch: refs/heads/trunk
Commit: a0c5d8f2389f64c4572f212d08c77db171802036
Parents: 3f2a91b
Author: Jaimin Jetly jai...@hortonworks.com
Authored: Mon Jan 19 12:45:31 2015 -0800
Committer: Jaimin Jetly jai...@hortonworks.com
Committed: Mon Jan 19 12:45:51 2015 -0800

--
 .../libraries/functions/ranger_functions.py | 221 ---
 .../HBASE/0.96.0.2.0/metainfo.xml   |   1 -
 .../0.96.0.2.0/package/scripts/hbase_master.py  |   5 +-
 .../HBASE/0.96.0.2.0/package/scripts/params.py  |  13 --
 .../package/scripts/setup_ranger_hbase.py   | 187 
 .../common-services/HDFS/2.1.0.2.0/metainfo.xml |   1 -
 .../HDFS/2.1.0.2.0/package/scripts/namenode.py  |   4 +-
 .../HDFS/2.1.0.2.0/package/scripts/params.py|  13 --
 .../package/scripts/setup_ranger_hdfs.py| 191 
 .../HIVE/0.12.0.2.0/metainfo.xml|   1 -
 .../0.12.0.2.0/package/scripts/hive_server.py   |   4 +-
 .../HIVE/0.12.0.2.0/package/scripts/params.py   |  12 -
 .../package/scripts/setup_ranger_hive.py| 182 ---
 .../common-services/KNOX/0.5.0.2.2/metainfo.xml |   1 -
 .../0.5.0.2.2/package/scripts/knox_gateway.py   |   3 -
 .../KNOX/0.5.0.2.2/package/scripts/params.py|  12 -
 .../package/scripts/setup_ranger_knox.py| 184 ---
 .../0.4.0/configuration/admin-properties.xml| 180 ---
 .../RANGER/0.4.0/configuration/ranger-env.xml   |  49 
 .../0.4.0/configuration/usersync-properties.xml | 103 -
 .../common-services/RANGER/0.4.0/metainfo.xml   |  84 ---
 .../RANGER/0.4.0/package/scripts/params.py  |  43 
 .../0.4.0/package/scripts/ranger_admin.py   |  58 -
 .../0.4.0/package/scripts/ranger_usersync.py|  56 -
 .../0.4.0/package/scripts/service_check.py  |  53 -
 .../0.4.0/package/scripts/setup_ranger.py   | 153 -
 .../stacks/HDP/2.2/role_command_order.json  |  15 --
 .../ranger-hbase-plugin-properties.xml  | 150 -
 .../ranger-hdfs-plugin-properties.xml   | 156 -
 .../ranger-hive-plugin-properties.xml   | 163 --
 .../stacks/HDP/2.2/services/RANGER/metainfo.xml |  29 ---
 .../stacks/HDP/2.2/services/stack_advisor.py| 120 +-
 .../stacks/2.0.6/configs/client-upgrade.json|   6 -
 .../python/stacks/2.0.6/configs/default.json|   6 -
 .../stacks/2.0.6/configs/default_client.json|   3 -
 .../python/stacks/2.0.6/configs/ha_default.json |   3 -
 .../python/stacks/2.0.6/configs/hbase-2.2.json  |   3 -
 .../stacks/2.0.6/configs/hbase-check-2.2.json   |   3 -
 .../stacks/2.0.6/configs/hbase-preupgrade.json  |   3 -
 .../stacks/2.0.6/configs/hbase-rs-2.2.json  |   3 -
 .../python/stacks/2.0.6/configs/secured.json|   6 -
 .../stacks/2.0.6/configs/secured_client.json|   3 -
 .../stacks/2.2/common/test_stack_advisor.py | 163 ++
 .../test/python/stacks/2.2/configs/default.json |  10 +-
 .../python/stacks/2.2/configs/hive-upgrade.json |   3 -
 ambari-web/app/config.js|   1 -
 46 files changed, 30 insertions(+), 2633 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a0c5d8f2/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py
deleted file mode 100644
index 4036611..000
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py
+++ /dev/null
@@ -1,221 +0,0 @@
-#!/usr/bin/env python
-
-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.

[3/3] ambari git commit: Revert AMBARI-8949. Summary:Patch to fix knox install issue. (Velmurugan Periasamy via yusaku)

2015-01-19 Thread jaimin
Revert AMBARI-8949. Summary:Patch to fix knox install issue. (Velmurugan 
Periasamy via yusaku)

This reverts commit 4d71477d10193fcc48030093914fa69793297292.


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

Branch: refs/heads/trunk
Commit: 3f2a91b469048578dafe278bf6bc2f28cc772a83
Parents: fe3f405
Author: Jaimin Jetly jai...@hortonworks.com
Authored: Mon Jan 19 11:59:50 2015 -0800
Committer: Jaimin Jetly jai...@hortonworks.com
Committed: Mon Jan 19 12:45:51 2015 -0800

--
 .../ranger-knox-plugin-properties.xml   | 156 ---
 1 file changed, 156 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3f2a91b4/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/ranger-knox-plugin-properties.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/ranger-knox-plugin-properties.xml
 
b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/ranger-knox-plugin-properties.xml
deleted file mode 100644
index b744658..000
--- 
a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/ranger-knox-plugin-properties.xml
+++ /dev/null
@@ -1,156 +0,0 @@
-?xml version=1.0 encoding=UTF-8?
-!--
-/**
- * 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.
- */
---
-configuration supports_final=true
-
-   property
-   namecommon.name.for.certificate/name
-   value-/value
-   descriptionUsed for repository creation on ranger 
admin/description
-   /property
-
-property
-nameranger-knox-plugin-enabled/name
-valueNo/value
-descriptionEnable ranger knox plugin ?/description
-/property
-
-   property
-   nameREPOSITORY_CONFIG_USERNAME/name
-   valueadmin/value
-   descriptionUsed for repository creation on ranger 
admin/description
-   /property 
-
-   property
-   nameREPOSITORY_CONFIG_PASSWORD/name
-   valueadmin-password/value
-   property-typePASSWORD/property-type
-   descriptionUsed for repository creation on ranger 
admin/description
-   /property 
-
-   property
-   nameKNOX_HOME/name
-   value/usr/hdp/current/knox-server/value
-   description/description
-   /property
-
-   property
-   nameXAAUDIT.DB.IS_ENABLED/name
-   valuetrue/value
-   description/description
-   /property
-
-   property
-   nameXAAUDIT.HDFS.IS_ENABLED/name
-   valuefalse/value
-   description/description
-   /property
-
-   property
-   nameXAAUDIT.HDFS.DESTINATION_DIRECTORY/name
-   
valuehdfs://__REPLACE__NAME_NODE_HOST:8020/ranger/audit/%app-type%/%time:MMdd%/value
-   description/description
-   /property
-
-   property
-   nameXAAUDIT.HDFS.LOCAL_BUFFER_DIRECTORY/name
-   value__REPLACE__LOG_DIR/hadoop/%app-type%/audit/value
-   description/description
-   /property
-
-   property
-   nameXAAUDIT.HDFS.LOCAL_ARCHIVE_DIRECTORY/name
-   
value__REPLACE__LOG_DIR/hadoop/%app-type%/audit/archive/value
-   description/description
-   /property
-
-   property
-   nameXAAUDIT.HDFS.DESTINTATION_FILE/name
-   value%hostname%-audit.log/value
-   description/description
-   /property
-
-   property
-   nameXAAUDIT.HDFS.DESTINTATION_FLUSH_INTERVAL_SECONDS/name
-   value900/value
-   description/description
-   /property
-
-   property
-   nameXAAUDIT.HDFS.DESTINTATION_ROLLOVER_INTERVAL_SECONDS/name
-