You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2016/12/07 21:50:41 UTC
[06/14] ambari git commit: Merge branch 'trunk' into
branch-feature-AMBARI-18456
Merge branch 'trunk' into branch-feature-AMBARI-18456
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/936626bd
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/936626bd
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/936626bd
Branch: refs/heads/trunk
Commit: 936626bdba424d3972704a68f98b34cc542f8a64
Parents: ab1c100 c9a4881
Author: Jonathan Hurley <jh...@hortonworks.com>
Authored: Mon Nov 21 11:03:42 2016 -0500
Committer: Jonathan Hurley <jh...@hortonworks.com>
Committed: Mon Nov 21 11:08:19 2016 -0500
----------------------------------------------------------------------
.../src/main/python/ambari_agent/AmbariAgent.py | 19 +-
.../ambari_agent/StatusCommandsExecutor.py | 4 +-
.../test/python/ambari_agent/TestAmbariAgent.py | 7 +-
.../timeline/AbstractTimelineMetricsSink.java | 5 +-
.../availability/MetricCollectorHAHelper.java | 6 +
.../availability/MetricCollectorHATest.java | 10 +-
.../apache/ambari/server/state/ConfigImpl.java | 13 +-
.../alerts/alert_segment_registration_status.py | 10 +-
.../package/scripts/hive_server_interactive.py | 22 +-
.../0.12.0.2.0/package/scripts/params_linux.py | 1 +
.../MAHOUT/1.0.0.2.3/metainfo.xml | 2 +-
.../OOZIE/4.0.0.2.0/metainfo.xml | 2 +-
.../OOZIE/4.2.0.2.3/metainfo.xml | 2 +-
.../common-services/PIG/0.12.0.2.0/metainfo.xml | 2 +-
.../common-services/TEZ/0.4.0.2.1/metainfo.xml | 2 +-
.../common-services/YARN/2.1.0.2.0/metainfo.xml | 2 +-
.../stacks/HDP/2.5/services/SPARK/kerberos.json | 60 +-
.../stacks/HDP/2.6/services/SPARK/kerberos.json | 62 +-
.../GRUMPY/configuration/grumpy-site.xml | 36 +
.../PERF/1.0/services/GRUMPY/metainfo.xml | 57 +
.../services/GRUMPY/package/scripts/dwarf.py | 38 +
.../GRUMPY/package/scripts/service_check.py | 30 +
.../PERF/1.0/services/GRUMPY/themes/theme.json | 65 +
.../stacks/PERF/1.0/services/HBASE/alerts.json | 127 +
.../services/HBASE/configuration/hbase-env.xml | 292 +
.../HBASE/configuration/hbase-log4j.xml | 146 +
.../configuration/hbase-logsearch-conf.xml | 111 +
.../HBASE/configuration/hbase-policy.xml | 53 +
.../services/HBASE/configuration/hbase-site.xml | 573 ++
.../HBASE/configuration/ranger-hbase-audit.xml | 122 +
.../ranger-hbase-policymgr-ssl.xml | 66 +
.../configuration/ranger-hbase-security.xml | 68 +
.../PERF/1.0/services/HBASE/kerberos.json | 159 +
.../stacks/PERF/1.0/services/HBASE/metainfo.xml | 196 +
.../stacks/PERF/1.0/services/HBASE/metrics.json | 9374 ++++++++++++++++++
.../HBASE/package/scripts/hbase_client.py | 38 +
.../HBASE/package/scripts/hbase_master.py | 41 +
.../HBASE/package/scripts/hbase_regionserver.py | 41 +
.../package/scripts/phoenix_queryserver.py | 38 +
.../HBASE/package/scripts/service_check.py | 30 +
.../services/HBASE/quicklinks/quicklinks.json | 97 +
.../PERF/1.0/services/HBASE/themes/theme.json | 411 +
.../stacks/PERF/1.0/services/HBASE/widgets.json | 510 +
.../stacks/PERF/1.0/services/HDFS/alerts.json | 1786 ++++
.../services/HDFS/configuration/core-site.xml | 225 +
.../services/HDFS/configuration/hadoop-env.xml | 419 +
.../hadoop-metrics2.properties.xml | 125 +
.../HDFS/configuration/hadoop-policy.xml | 130 +
.../services/HDFS/configuration/hdfs-log4j.xml | 225 +
.../HDFS/configuration/hdfs-logsearch-conf.xml | 248 +
.../services/HDFS/configuration/hdfs-site.xml | 633 ++
.../HDFS/configuration/ranger-hdfs-audit.xml | 124 +
.../ranger-hdfs-plugin-properties.xml | 88 +
.../configuration/ranger-hdfs-policymgr-ssl.xml | 67 +
.../HDFS/configuration/ranger-hdfs-security.xml | 65 +
.../services/HDFS/configuration/ssl-client.xml | 70 +
.../services/HDFS/configuration/ssl-server.xml | 80 +
.../stacks/PERF/1.0/services/HDFS/kerberos.json | 246 +
.../stacks/PERF/1.0/services/HDFS/metainfo.xml | 265 +
.../stacks/PERF/1.0/services/HDFS/metrics.json | 7905 +++++++++++++++
.../package/alerts/alert_checkpoint_time.py | 69 +
.../alerts/alert_datanode_unmounted_data_dir.py | 74 +
.../package/alerts/alert_ha_namenode_health.py | 75 +
.../package/alerts/alert_metrics_deviation.py | 85 +
.../package/alerts/alert_upgrade_finalized.py | 74 +
.../services/HDFS/package/scripts/datanode.py | 38 +
.../HDFS/package/scripts/hdfs_client.py | 38 +
.../HDFS/package/scripts/journalnode.py | 38 +
.../services/HDFS/package/scripts/namenode.py | 54 +
.../services/HDFS/package/scripts/nfsgateway.py | 38 +
.../HDFS/package/scripts/service_check.py | 30 +
.../services/HDFS/package/scripts/snamenode.py | 38 +
.../services/HDFS/package/scripts/zkfc_slave.py | 38 +
.../services/HDFS/quicklinks/quicklinks.json | 76 +
.../PERF/1.0/services/HDFS/themes/theme.json | 179 +
.../stacks/PERF/1.0/services/HDFS/widgets.json | 649 ++
.../SLEEPY/configuration/sleepy-site.xml | 36 +
.../PERF/1.0/services/SLEEPY/metainfo.xml | 57 +
.../services/SLEEPY/package/scripts/dwarf.py | 38 +
.../SLEEPY/package/scripts/service_check.py | 30 +
.../PERF/1.0/services/SLEEPY/themes/theme.json | 65 +
.../PERF/1.0/services/YARN/YARN_metrics.json | 3486 +++++++
.../PERF/1.0/services/YARN/YARN_widgets.json | 611 ++
.../stacks/PERF/1.0/services/YARN/alerts.json | 392 +
.../YARN/configuration-mapred/mapred-env.xml | 50 +
.../YARN/configuration-mapred/mapred-site.xml | 134 +
.../YARN/configuration/capacity-scheduler.xml | 69 +
.../YARN/configuration/ranger-yarn-audit.xml | 121 +
.../ranger-yarn-plugin-properties.xml | 82 +
.../configuration/ranger-yarn-policymgr-ssl.xml | 66 +
.../YARN/configuration/ranger-yarn-security.xml | 58 +
.../services/YARN/configuration/yarn-env.xml | 201 +
.../services/YARN/configuration/yarn-log4j.xml | 103 +
.../services/YARN/configuration/yarn-site.xml | 796 ++
.../stacks/PERF/1.0/services/YARN/kerberos.json | 279 +
.../stacks/PERF/1.0/services/YARN/metainfo.xml | 352 +
.../package/alerts/alert_nodemanager_health.py | 67 +
.../alerts/alert_nodemanagers_summary.py | 68 +
.../scripts/application_timeline_server.py | 38 +
.../YARN/package/scripts/historyserver.py | 38 +
.../package/scripts/mapred_service_check.py | 30 +
.../YARN/package/scripts/mapreduce2_client.py | 38 +
.../YARN/package/scripts/nodemanager.py | 38 +
.../YARN/package/scripts/resourcemanager.py | 44 +
.../YARN/package/scripts/service_check.py | 30 +
.../YARN/package/scripts/yarn_client.py | 38 +
.../YARN/quicklinks-mapred/quicklinks.json | 76 +
.../services/YARN/quicklinks/quicklinks.json | 76 +
.../1.0/services/YARN/themes-mapred/theme.json | 132 +
.../PERF/1.0/services/YARN/themes/theme.json | 250 +
.../PERF/1.0/services/ZOOKEEPER/metainfo.xml | 50 +
.../ZOOKEEPER/package/scripts/service_check.py | 30 +
.../package/scripts/zookeeper_client.py | 38 +
.../package/scripts/zookeeper_server.py | 38 +
.../svccomphost/ServiceComponentHostTest.java | 30 +-
.../test_alert_segment_registration_status.py | 6 +-
.../stacks/2.5/HIVE/test_hive_server_int.py | 112 +
.../test/python/stacks/2.5/configs/hsi_ha.json | 1254 +++
.../main/admin/service_auto_start.js | 6 +-
.../controllers/main/service/add_controller.js | 17 +-
ambari-web/app/controllers/wizard.js | 45 +-
.../app/controllers/wizard/step6_controller.js | 41 +
ambari-web/app/mappers/stack_service_mapper.js | 2 +-
.../configs/config_recommendation_parser.js | 20 +-
.../common/configs/config_recommendations.js | 2 +-
.../mixins/common/configs/enhanced_configs.js | 30 +-
ambari-web/app/styles/alerts.less | 55 +-
ambari-web/app/styles/application.less | 2531 +----
ambari-web/app/styles/bootstrap_overrides.less | 294 +
ambari-web/app/styles/common.less | 17 -
ambari-web/app/styles/dashboard.less | 350 +
ambari-web/app/styles/hosts.less | 494 +
ambari-web/app/styles/modal_popups.less | 190 +-
ambari-web/app/styles/timepicker-overrides.less | 59 +
ambari-web/app/styles/top-nav.less | 212 +
ambari-web/app/styles/wizard.less | 611 ++
ambari-web/app/templates/application.hbs | 6 +-
.../templates/common/host_progress_popup.hbs | 1 +
.../common/modal_popups/select_groups_popup.hbs | 6 +-
ambari-web/app/templates/installer.hbs | 2 +-
ambari-web/app/templates/main.hbs | 4 +-
ambari-web/app/templates/main/admin.hbs | 8 +-
.../app/templates/main/admin/kerberos.hbs | 3 +-
.../templates/main/admin/serviceAccounts.hbs | 6 +-
.../templates/main/admin/service_auto_start.hbs | 102 +-
.../stack_upgrade/stack_upgrade_wizard.hbs | 2 +-
.../main/alerts/definition_details.hbs | 2 +-
ambari-web/app/templates/main/dashboard.hbs | 2 +-
.../main/dashboard/edit_widget_popup.hbs | 30 +-
.../edit_widget_popup_single_threshold.hbs | 27 +-
ambari-web/app/templates/main/host/configs.hbs | 4 +-
.../app/templates/main/host/host_alerts.hbs | 10 +-
ambari-web/app/templates/main/service.hbs | 2 +-
.../main/service/all_services_actions.hbs | 18 +-
.../public_option_disabled_window_body.hbs | 4 +-
.../wizard/step9/step9HostTasksLogPopup.hbs | 1 +
ambari-web/app/utils/ajax/ajax.js | 2 +-
ambari-web/app/utils/host_progress_popup.js | 6 +-
.../configs/service_configs_by_category_view.js | 2 +-
ambari-web/app/views/common/controls_view.js | 11 +-
.../views/common/helpers/status_icon_view.js | 2 +-
ambari-web/app/views/common/table_view.js | 6 +-
.../views/main/admin/stack_and_upgrade_view.js | 4 +-
.../views/wizard/step9/hostLogPopupBody_view.js | 2 +-
.../main/service/add_controller_test.js | 81 +
.../test/controllers/wizard/step6_test.js | 85 +
.../wizard/step9/hostLogPopupBody_view_test.js | 2 +-
ambari-web/vendor/styles/bootstrap.css | 34 +-
.../resources/ui/hive-web/app/routes/splash.js | 56 +-
.../ambari/view/zeppelin/ZeppelinServlet.java | 103 +-
.../src/main/resources/WEB-INF/index.jsp | 63 -
docs/pom.xml | 2 +-
172 files changed, 39665 insertions(+), 2803 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/936626bd/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigImpl.java
----------------------------------------------------------------------
diff --cc ambari-server/src/main/java/org/apache/ambari/server/state/ConfigImpl.java
index 052ee28,28bcd5f..0a861d8
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigImpl.java
@@@ -51,54 -50,35 +51,59 @@@ public class ConfigImpl implements Conf
*/
private final static Logger LOG = LoggerFactory.getLogger(ConfigImpl.class);
++ /**
++ * A label for {@link #hostLock} to use with the {@link LockFactory}.
++ */
++ private static final String PROPERTY_LOCK_LABEL = "configurationPropertyLock";
++
public static final String GENERATED_TAG_PREFIX = "generatedTag_";
- private final ReadWriteLock readWriteLock = new ReentrantReadWriteLock();
+ private final long configId;
+ private final Cluster cluster;
+ private final StackId stackId;
+ private final String type;
+ private final String tag;
+ private final Long version;
- private Cluster cluster;
- private StackId stackId;
- private String type;
- private volatile String tag;
- private volatile Long version;
- private volatile Map<String, String> properties;
- private volatile Map<String, Map<String, String>> propertiesAttributes;
- private ClusterConfigEntity entity;
- private volatile Map<PropertyInfo.PropertyType, Set<String>> propertiesTypes;
+ /**
+ * The properties of this configuration. This cannot be a
+ * {@link ConcurrentMap} since we allow null values. Therefore, it must be
+ * synchronized externally.
+ */
+ private Map<String, String> properties;
- @Inject
- private ClusterDAO clusterDAO;
+ /**
+ * A lock for reading/writing of {@link #properties} concurrently.
+ *
+ * @see #properties
+ */
+ private final ReadWriteLock propertyLock;
- @Inject
- private Gson gson;
+ /**
+ * The property attributes for this configuration.
+ */
+ private Map<String, Map<String, String>> propertiesAttributes;
+
+ private Map<PropertyInfo.PropertyType, Set<String>> propertiesTypes;
+
+ private final ClusterDAO clusterDAO;
+
+ private final Gson gson;
@Inject
private ServiceConfigDAO serviceConfigDAO;
- @Inject
- private AmbariEventPublisher eventPublisher;
+ private final AmbariEventPublisher eventPublisher;
@AssistedInject
- public ConfigImpl(@Assisted Cluster cluster, @Assisted String type, @Assisted Map<String, String> properties,
- @Assisted Map<String, Map<String, String>> propertiesAttributes, Injector injector) {
+ ConfigImpl(@Assisted Cluster cluster, @Assisted("type") String type,
+ @Assisted("tag") @Nullable String tag,
+ @Assisted Map<String, String> properties,
+ @Assisted @Nullable Map<String, Map<String, String>> propertiesAttributes, ClusterDAO clusterDAO,
+ Gson gson, AmbariEventPublisher eventPublisher, LockFactory lockFactory) {
+
- propertyLock = lockFactory.newReadWriteLock("configurationPropertyLock");
++ propertyLock = lockFactory.newReadWriteLock(PROPERTY_LOCK_LABEL);
+
this.cluster = cluster;
this.type = type;
this.properties = properties;
@@@ -135,22 -87,15 +140,24 @@@
// when creating a brand new config without a backing entity, use the
// cluster's desired stack as the config's stack
stackId = cluster.getDesiredStackVersion();
-
- injector.injectMembers(this);
propertiesTypes = cluster.getConfigPropertiesTypes(type);
- }
+ persist(entity);
+ configId = entity.getConfigId();
+ }
@AssistedInject
- public ConfigImpl(@Assisted Cluster cluster, @Assisted ClusterConfigEntity entity, Injector injector) {
+ ConfigImpl(@Assisted Cluster cluster, @Assisted ClusterConfigEntity entity,
+ ClusterDAO clusterDAO, Gson gson, AmbariEventPublisher eventPublisher,
+ LockFactory lockFactory) {
++ propertyLock = lockFactory.newReadWriteLock(PROPERTY_LOCK_LABEL);
++
this.cluster = cluster;
+ this.clusterDAO = clusterDAO;
+ this.gson = gson;
+ this.eventPublisher = eventPublisher;
+ configId = entity.getConfigId();
+
type = entity.getType();
tag = entity.getTag();
version = entity.getVersion();
@@@ -190,37 -109,10 +197,39 @@@
}
/**
- * Constructor for clients not using factory.
+ * Constructor. This will create an instance suitable only for
+ * representation/serialization as it is incomplete.
+ *
+ * @param type
+ * @param tag
+ * @param properties
+ * @param propertiesAttributes
+ * @param clusterDAO
+ * @param gson
+ * @param eventPublisher
*/
- public ConfigImpl(String type) {
+ @AssistedInject
+ ConfigImpl(@Assisted("type") String type,
+ @Assisted("tag") @Nullable String tag,
+ @Assisted Map<String, String> properties,
+ @Assisted @Nullable Map<String, Map<String, String>> propertiesAttributes, ClusterDAO clusterDAO,
- Gson gson, AmbariEventPublisher eventPublisher) {
++ Gson gson, AmbariEventPublisher eventPublisher, LockFactory lockFactory) {
++
++ propertyLock = lockFactory.newReadWriteLock(PROPERTY_LOCK_LABEL);
+
+ this.tag = tag;
this.type = type;
+ this.properties = new HashMap<>(properties);
+ this.propertiesAttributes = null == propertiesAttributes ? null
+ : new HashMap<>(propertiesAttributes);
+ this.clusterDAO = clusterDAO;
+ this.gson = gson;
+ this.eventPublisher = eventPublisher;
+
+ cluster = null;
+ configId = 0;
+ version = 0L;
+ stackId = null;
}
/**
http://git-wip-us.apache.org/repos/asf/ambari/blob/936626bd/ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java
----------------------------------------------------------------------