Repository: ambari
Updated Branches:
  refs/heads/trunk 3feae3d62 -> 295e8de48


AMBARI-17935. EU to HDP 2.5 failed since config type 
'sqoop-atlas-application.properties' has not been created (alejandro)


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

Branch: refs/heads/trunk
Commit: 295e8de48390a4c7f0d28dea732f3ebaacaaa750
Parents: 3feae3d
Author: Alejandro Fernandez <[email protected]>
Authored: Thu Jul 28 14:06:30 2016 -0700
Committer: Alejandro Fernandez <[email protected]>
Committed: Thu Jul 28 14:06:30 2016 -0700

----------------------------------------------------------------------
 .../serveraction/upgrades/ConfigureAction.java  |  3 ++
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml |  4 +-
 .../HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml | 10 +++--
 .../sqoop-atlas-application.properties.xml      | 47 ++++++++++++++++++++
 4 files changed, 59 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/295e8de4/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
index f7de8a9..ab6614d 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
@@ -237,6 +237,9 @@ public class ConfigureAction extends AbstractServerAction {
     Map<String, DesiredConfig> desiredConfigs = cluster.getDesiredConfigs();
     DesiredConfig desiredConfig = desiredConfigs.get(configType);
     Config config = cluster.getConfig(configType, desiredConfig.getTag());
+    if (config == null) {
+      throw new AmbariException("Could not find desired config type with name 
" + configType);
+    }
 
     StackId currentStack = cluster.getCurrentStackVersion();
     StackId targetStack = cluster.getDesiredStackVersion();

http://git-wip-us.apache.org/repos/asf/ambari/blob/295e8de4/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml
index c7a9920..5d2cc54 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml
@@ -309,10 +309,12 @@
       </execute-stage>
 
       <!-- SQOOP -->
-      <execute-stage service="SQOOP" component="SQOOP" title="Apply config 
changes for Sqoop">
+      <execute-stage service="SQOOP" component="SQOOP" title="Apply config 
changes for Sqoop to remove Atlas Configs">
         <!-- Remove Atlas configs that were incorrectly added to sqoop-site 
instead of Atlas' application.properties. -->
         <task xsi:type="configure" 
id="hdp_2_5_0_0_remove_sqoop_atlas_configs"/>
+      </execute-stage>
 
+      <execute-stage service="SQOOP" component="SQOOP" title="Apply config 
changes for Sqoop if the cluster is Kerberized">
         <!-- If cluster is Kerberized, add configs to 
sqoop-atlas-application.properties,
         which will be written to the local file system if Atlas is present. -->
         <task xsi:type="configure" 
id="hdp_2_5_0_0_add_sqoop_atlas_security_configs" />

http://git-wip-us.apache.org/repos/asf/ambari/blob/295e8de4/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml
index d78a554..7bfc438 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml
@@ -36,7 +36,7 @@
     <group xsi:type="cluster" name="PRE_CLUSTER" title="Prepare Upgrade">
       <direction>UPGRADE</direction>
 
-      <skippable>true</skippable>
+    <skippable>true</skippable>
       <supports-auto-skip-failure>false</supports-auto-skip-failure>
 
       <execute-stage service="YARN" component="RESOURCEMANAGER" title="Stop 
YARN Queues">
@@ -74,7 +74,7 @@
       <service name="FLUME">
         <component>FLUME_HANDLER</component>
       </service>
-      
+
       <service name="ACCUMULO">
         <component>ACCUMULO_TRACER</component>
         <component>ACCUMULO_GC</component>
@@ -82,7 +82,7 @@
         <component>ACCUMULO_MONITOR</component>
         <component>ACCUMULO_MASTER</component>
       </service>
-
+      
       <service name="STORM">
         <component>DRPC_SERVER</component>
         <component>STORM_UI_SERVER</component>
@@ -330,10 +330,12 @@
       </execute-stage>
 
       <!-- SQOOP -->
-      <execute-stage service="SQOOP" component="SQOOP" title="Apply config 
changes for Sqoop">
+      <execute-stage service="SQOOP" component="SQOOP" title="Apply config 
changes for Sqoop to remove Atlas Configs">
         <!-- Remove Atlas configs that were incorrectly added to sqoop-site 
instead of Atlas' application.properties. -->
         <task xsi:type="configure" 
id="hdp_2_5_0_0_remove_sqoop_atlas_configs"/>
+      </execute-stage>
 
+      <execute-stage service="SQOOP" component="SQOOP" title="Apply config 
changes for Sqoop if the cluster is Kerberized">
         <!-- If cluster is Kerberized, add configs to 
sqoop-atlas-application.properties,
         which will be written to the local file system if Atlas is present. -->
         <task xsi:type="configure" 
id="hdp_2_5_0_0_add_sqoop_atlas_security_configs" />

http://git-wip-us.apache.org/repos/asf/ambari/blob/295e8de4/ambari-server/src/main/resources/stacks/HDP/2.5/services/SQOOP/configuration/sqoop-atlas-application.properties.xml
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/SQOOP/configuration/sqoop-atlas-application.properties.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/SQOOP/configuration/sqoop-atlas-application.properties.xml
new file mode 100644
index 0000000..1364776
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/SQOOP/configuration/sqoop-atlas-application.properties.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * 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>
+  <!--
+  These two security properties will only be read if the cluster is 
Kerberized, but ok to add them even without Kerberos.
+  It's important to have at least one property in this config file so it gets 
added while merging configs during EU/RU
+  from an earlier stack to HDP 2.5+.
+  Also, it allows a fresh install with Sqoop to expose this config type in the 
UI.
+  -->
+  <property>
+    <name>atlas.jaas.KafkaClient.option.useTicketCache</name>
+    <value>true</value>
+    <description>
+      Set this to "true" if you want the TGT to be obtained from the ticket 
cache.
+      Set this option to "false" if you do not want this module to use the 
ticket cache.
+    </description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>atlas.jaas.KafkaClient.option.renewTicket</name>
+    <value>true</value>
+    <description>
+      Set this to "true" if you want the TGT to renew the ticket when it 
expires.
+      Set this option to "false" if you do not want this module to renew 
tickets.
+    </description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+</configuration>

Reply via email to