ambari git commit: AMBARI-21814. On installation of new services on Ambari, Zeppelin should configure new interpreters.(Prabhjyot Singh via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.6 f6c83fb62 -> 0d4df5a7e AMBARI-21814. On installation of new services on Ambari, Zeppelin should configure new interpreters.(Prabhjyot Singh via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0d4df5a7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0d4df5a7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0d4df5a7 Branch: refs/heads/branch-2.6 Commit: 0d4df5a7e79e84ccc031af4d1fa98f8117593910 Parents: f6c83fb Author: Gaurav NagarAuthored: Wed Aug 30 11:38:38 2017 +0530 Committer: Gaurav Nagar Committed: Wed Aug 30 11:38:38 2017 +0530 -- .../0.6.0.2.5/configuration/zeppelin-config.xml | 6 ++ .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py | 19 ++- .../ZEPPELIN/0.6.0.2.5/package/scripts/params.py | 4 3 files changed, 28 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0d4df5a7/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml -- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml index 6f16a98..03ad5f7 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml @@ -199,4 +199,10 @@ Size in characters of the maximum text message to be received by websocket. Defaults to 1024000 + +zeppelin.interpreter.config.upgrade +true +If this is set to true, on every restart of Zeppelin server default interpreter parameters will be reset + + http://git-wip-us.apache.org/repos/asf/ambari/blob/0d4df5a7/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py -- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py index 7f506c5..2142bb4 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py @@ -216,7 +216,9 @@ class Master(Script): self.create_interpreter_json() self.update_zeppelin_interpreter() -self.update_kerberos_properties() +if params.zeppelin_interpreter_config_upgrade == True: + self.reset_interpreter_settings() + self.update_zeppelin_interpreter() Execute(params.zeppelin_dir + '/bin/zeppelin-daemon.sh restart >> ' + params.zeppelin_log_file, user=params.zeppelin_user) @@ -235,6 +237,20 @@ class Master(Script): pid_file = '' check_process_status(pid_file) + def reset_interpreter_settings(self): +import json +import interpreter_json_template +interpreter_json_template = json.loads(interpreter_json_template.template)['interpreterSettings'] +config_data = self.get_interpreter_settings() +interpreter_settings = config_data['interpreterSettings'] + +for setting_key in interpreter_json_template.keys(): + if setting_key not in interpreter_settings: +interpreter_settings[setting_key] = interpreter_json_template[ + setting_key] + +self.set_interpreter_settings(config_data) + def get_interpreter_settings(self): import params import json @@ -433,6 +449,7 @@ class Master(Script): del interpreter_settings[setting_key] self.set_interpreter_settings(config_data) +self.update_kerberos_properties() def create_interpreter_json(self): import interpreter_json_template http://git-wip-us.apache.org/repos/asf/ambari/blob/0d4df5a7/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py index 0ac6dd4..d6d68b9 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py @@ -194,6 +194,10 @@ else: zeppelin_kerberos_keytab =
ambari git commit: AMBARI-21814. On installation of new services on Ambari, Zeppelin should configure new interpreters.(Prabhjyot Singh via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk 58c6848a7 -> 4b04a325e AMBARI-21814. On installation of new services on Ambari, Zeppelin should configure new interpreters.(Prabhjyot Singh via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4b04a325 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4b04a325 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4b04a325 Branch: refs/heads/trunk Commit: 4b04a325eea0f7fa0193a375a10bb168546aa63d Parents: 58c6848 Author: Gaurav NagarAuthored: Wed Aug 30 11:37:48 2017 +0530 Committer: Gaurav Nagar Committed: Wed Aug 30 11:37:48 2017 +0530 -- .../0.6.0.2.5/configuration/zeppelin-config.xml | 6 ++ .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py | 19 ++- .../ZEPPELIN/0.6.0.2.5/package/scripts/params.py | 4 .../0.6.0.3.0/configuration/zeppelin-config.xml | 13 + 4 files changed, 41 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4b04a325/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml -- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml index 6f16a98..03ad5f7 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml @@ -199,4 +199,10 @@ Size in characters of the maximum text message to be received by websocket. Defaults to 1024000 + +zeppelin.interpreter.config.upgrade +true +If this is set to true, on every restart of Zeppelin server default interpreter parameters will be reset + + http://git-wip-us.apache.org/repos/asf/ambari/blob/4b04a325/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py -- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py index 7f506c5..2142bb4 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py @@ -216,7 +216,9 @@ class Master(Script): self.create_interpreter_json() self.update_zeppelin_interpreter() -self.update_kerberos_properties() +if params.zeppelin_interpreter_config_upgrade == True: + self.reset_interpreter_settings() + self.update_zeppelin_interpreter() Execute(params.zeppelin_dir + '/bin/zeppelin-daemon.sh restart >> ' + params.zeppelin_log_file, user=params.zeppelin_user) @@ -235,6 +237,20 @@ class Master(Script): pid_file = '' check_process_status(pid_file) + def reset_interpreter_settings(self): +import json +import interpreter_json_template +interpreter_json_template = json.loads(interpreter_json_template.template)['interpreterSettings'] +config_data = self.get_interpreter_settings() +interpreter_settings = config_data['interpreterSettings'] + +for setting_key in interpreter_json_template.keys(): + if setting_key not in interpreter_settings: +interpreter_settings[setting_key] = interpreter_json_template[ + setting_key] + +self.set_interpreter_settings(config_data) + def get_interpreter_settings(self): import params import json @@ -433,6 +449,7 @@ class Master(Script): del interpreter_settings[setting_key] self.set_interpreter_settings(config_data) +self.update_kerberos_properties() def create_interpreter_json(self): import interpreter_json_template http://git-wip-us.apache.org/repos/asf/ambari/blob/4b04a325/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py index 6912c3d..f5a2a37 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
ambari git commit: Revert "AMBARI-21814. On installation of new services on Ambari, Zeppelin should configure new interpreters.(Prabhjyot Singh via gauravn7)"
Repository: ambari Updated Branches: refs/heads/trunk 6b052390c -> 58c6848a7 Revert "AMBARI-21814. On installation of new services on Ambari, Zeppelin should configure new interpreters.(Prabhjyot Singh via gauravn7)" This reverts commit 6b052390c3398c6f7fa1a706c3802ce7adf28cb9. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/58c6848a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/58c6848a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/58c6848a Branch: refs/heads/trunk Commit: 58c6848a78e0ce59e79d4f6924c8ceb925ccee91 Parents: 6b05239 Author: Gaurav NagarAuthored: Wed Aug 30 11:36:57 2017 +0530 Committer: Gaurav Nagar Committed: Wed Aug 30 11:36:57 2017 +0530 -- .../0.6.0.2.5/configuration/zeppelin-config.xml | 6 -- .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py | 18 +- .../ZEPPELIN/0.6.0.2.5/package/scripts/params.py | 4 .../0.6.0.3.0/configuration/zeppelin-config.xml | 13 - 4 files changed, 1 insertion(+), 40 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/58c6848a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml -- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml index 03ad5f7..6f16a98 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml @@ -199,10 +199,4 @@ Size in characters of the maximum text message to be received by websocket. Defaults to 1024000 - -zeppelin.interpreter.config.upgrade -true -If this is set to true, on every restart of Zeppelin server default interpreter parameters will be reset - - http://git-wip-us.apache.org/repos/asf/ambari/blob/58c6848a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py -- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py index 62ed825..7f506c5 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py @@ -214,8 +214,8 @@ class Master(Script): if not glob.glob(params.conf_dir + "/interpreter.json") and \ not os.path.exists(params.conf_dir + "/interpreter.json"): self.create_interpreter_json() + self.update_zeppelin_interpreter() -self.update_zeppelin_interpreter() self.update_kerberos_properties() Execute(params.zeppelin_dir + '/bin/zeppelin-daemon.sh restart >> ' @@ -235,20 +235,6 @@ class Master(Script): pid_file = '' check_process_status(pid_file) - def reset_interpreter_settings(self): -import json -import interpreter_json_template -interpreter_json_template = json.loads(interpreter_json_template.template)['interpreterSettings'] -config_data = self.get_interpreter_settings() -interpreter_settings = config_data['interpreterSettings'] - -for setting_key in interpreter_json_template.keys(): - if setting_key not in interpreter_settings: -interpreter_settings[setting_key] = interpreter_json_template[ - setting_key] - -self.set_interpreter_settings(config_data) - def get_interpreter_settings(self): import params import json @@ -327,8 +313,6 @@ class Master(Script): def update_zeppelin_interpreter(self): import params -if params.zeppelin_interpreter_config_upgrade == True: - self.reset_interpreter_settings() config_data = self.get_interpreter_settings() interpreter_settings = config_data['interpreterSettings'] http://git-wip-us.apache.org/repos/asf/ambari/blob/58c6848a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py index f5a2a37..6912c3d 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
ambari git commit: AMBARI-21814. On installation of new services on Ambari, Zeppelin should configure new interpreters.(Prabhjyot Singh via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk ae80b6e7c -> 6b052390c AMBARI-21814. On installation of new services on Ambari, Zeppelin should configure new interpreters.(Prabhjyot Singh via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6b052390 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6b052390 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6b052390 Branch: refs/heads/trunk Commit: 6b052390c3398c6f7fa1a706c3802ce7adf28cb9 Parents: ae80b6e Author: Gaurav NagarAuthored: Wed Aug 30 11:23:31 2017 +0530 Committer: Gaurav Nagar Committed: Wed Aug 30 11:23:31 2017 +0530 -- .../0.6.0.2.5/configuration/zeppelin-config.xml | 6 ++ .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py | 18 +- .../ZEPPELIN/0.6.0.2.5/package/scripts/params.py | 4 .../0.6.0.3.0/configuration/zeppelin-config.xml | 13 + 4 files changed, 40 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6b052390/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml -- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml index 6f16a98..03ad5f7 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml @@ -199,4 +199,10 @@ Size in characters of the maximum text message to be received by websocket. Defaults to 1024000 + +zeppelin.interpreter.config.upgrade +true +If this is set to true, on every restart of Zeppelin server default interpreter parameters will be reset + + http://git-wip-us.apache.org/repos/asf/ambari/blob/6b052390/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py -- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py index 7f506c5..62ed825 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py @@ -214,8 +214,8 @@ class Master(Script): if not glob.glob(params.conf_dir + "/interpreter.json") and \ not os.path.exists(params.conf_dir + "/interpreter.json"): self.create_interpreter_json() - self.update_zeppelin_interpreter() +self.update_zeppelin_interpreter() self.update_kerberos_properties() Execute(params.zeppelin_dir + '/bin/zeppelin-daemon.sh restart >> ' @@ -235,6 +235,20 @@ class Master(Script): pid_file = '' check_process_status(pid_file) + def reset_interpreter_settings(self): +import json +import interpreter_json_template +interpreter_json_template = json.loads(interpreter_json_template.template)['interpreterSettings'] +config_data = self.get_interpreter_settings() +interpreter_settings = config_data['interpreterSettings'] + +for setting_key in interpreter_json_template.keys(): + if setting_key not in interpreter_settings: +interpreter_settings[setting_key] = interpreter_json_template[ + setting_key] + +self.set_interpreter_settings(config_data) + def get_interpreter_settings(self): import params import json @@ -313,6 +327,8 @@ class Master(Script): def update_zeppelin_interpreter(self): import params +if params.zeppelin_interpreter_config_upgrade == True: + self.reset_interpreter_settings() config_data = self.get_interpreter_settings() interpreter_settings = config_data['interpreterSettings'] http://git-wip-us.apache.org/repos/asf/ambari/blob/6b052390/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py index 6912c3d..f5a2a37 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py +++
ambari git commit: AMBARI-21787. By Default Zeppelin notes should be visible only to Owner (note creator). (Prabhjyot Singh via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.6 43432ae30 -> f6c83fb62 AMBARI-21787. By Default Zeppelin notes should be visible only to Owner (note creator). (Prabhjyot Singh via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f6c83fb6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f6c83fb6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f6c83fb6 Branch: refs/heads/branch-2.6 Commit: f6c83fb62f84a8a1d25d4becfc38f32ebe82018d Parents: 43432ae Author: Gaurav NagarAuthored: Wed Aug 30 11:20:06 2017 +0530 Committer: Gaurav Nagar Committed: Wed Aug 30 11:20:06 2017 +0530 -- .../ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f6c83fb6/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml -- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml index 13d726b..6f16a98 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml @@ -183,11 +183,17 @@ zeppelin.anonymous.allowed -true +false Anonymous user allowed by default +zeppelin.notebook.public +false +Make notebook public by default when created, private otherwise + + + zeppelin.websocket.max.text.message.size 1024000 Size in characters of the maximum text message to be received by websocket. Defaults to 1024000
ambari git commit: AMBARI-21802. Zeppelin's secure cookie should only be set when zeppelin is running in HTTPS mode.(Prabhjyot Singh via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.6 a21dc6d89 -> 919f2e16b AMBARI-21802. Zeppelin's secure cookie should only be set when zeppelin is running in HTTPS mode.(Prabhjyot Singh via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/919f2e16 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/919f2e16 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/919f2e16 Branch: refs/heads/branch-2.6 Commit: 919f2e16b2e8d8b20a2172985793869613e23866 Parents: a21dc6d Author: Gaurav NagarAuthored: Fri Aug 25 12:23:19 2017 +0530 Committer: Gaurav Nagar Committed: Fri Aug 25 12:23:19 2017 +0530 -- .../ZEPPELIN/0.6.0.2.5/configuration/zeppelin-shiro-ini.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/919f2e16/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-shiro-ini.xml -- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-shiro-ini.xml b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-shiro-ini.xml index 742f5be..b46d9ff 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-shiro-ini.xml +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-shiro-ini.xml @@ -63,7 +63,8 @@ securityManager.cacheManager = $cacheManager cookie = org.apache.shiro.web.servlet.SimpleCookie cookie.name = JSESSIONID -cookie.secure = true +#Uncomment the line below when running Zeppelin-Server in HTTPS mode +#cookie.secure = true cookie.httpOnly = true sessionManager.sessionIdCookie = $cookie
ambari git commit: AMBARI-21802. Zeppelin's secure cookie should only be set when zeppelin is running in HTTPS mode.(Prabhjyot Singh via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk 787fe0f7e -> 68b95cf81 AMBARI-21802. Zeppelin's secure cookie should only be set when zeppelin is running in HTTPS mode.(Prabhjyot Singh via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/68b95cf8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/68b95cf8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/68b95cf8 Branch: refs/heads/trunk Commit: 68b95cf818fb0d0f24d6e66873ab081e9165048d Parents: 787fe0f Author: Gaurav NagarAuthored: Fri Aug 25 12:22:37 2017 +0530 Committer: Gaurav Nagar Committed: Fri Aug 25 12:22:37 2017 +0530 -- .../ZEPPELIN/0.6.0.2.5/configuration/zeppelin-shiro-ini.xml | 3 ++- .../ZEPPELIN/0.6.0.3.0/configuration/zeppelin-shiro-ini.xml | 7 +++ 2 files changed, 9 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/68b95cf8/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-shiro-ini.xml -- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-shiro-ini.xml b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-shiro-ini.xml index 742f5be..b46d9ff 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-shiro-ini.xml +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-shiro-ini.xml @@ -63,7 +63,8 @@ securityManager.cacheManager = $cacheManager cookie = org.apache.shiro.web.servlet.SimpleCookie cookie.name = JSESSIONID -cookie.secure = true +#Uncomment the line below when running Zeppelin-Server in HTTPS mode +#cookie.secure = true cookie.httpOnly = true sessionManager.sessionIdCookie = $cookie http://git-wip-us.apache.org/repos/asf/ambari/blob/68b95cf8/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.3.0/configuration/zeppelin-shiro-ini.xml -- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.3.0/configuration/zeppelin-shiro-ini.xml b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.3.0/configuration/zeppelin-shiro-ini.xml index 25ea3d0..1ff3d9e 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.3.0/configuration/zeppelin-shiro-ini.xml +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.3.0/configuration/zeppelin-shiro-ini.xml @@ -61,6 +61,13 @@ sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager cacheManager = org.apache.shiro.cache.MemoryConstrainedCacheManager securityManager.cacheManager = $cacheManager +cookie = org.apache.shiro.web.servlet.SimpleCookie +cookie.name = JSESSIONID +#Uncomment the line below when running Zeppelin-Server in HTTPS mode +#cookie.secure = true +cookie.httpOnly = true +sessionManager.sessionIdCookie = $cookie + securityManager.sessionManager = $sessionManager # 86,400,000 milliseconds = 24 hour securityManager.sessionManager.globalSessionTimeout = 8640
ambari git commit: AMBARI-20888. wrong ZK parent node (hbase-unsecure) getting configured as part of the jdbc(phoenix) URL on ubuntu secured cluster. (Prabhjyot Singh via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk 05cf0dd72 -> 4134bbfb0 AMBARI-20888. wrong ZK parent node (hbase-unsecure) getting configured as part of the jdbc(phoenix) URL on ubuntu secured cluster. (Prabhjyot Singh via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4134bbfb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4134bbfb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4134bbfb Branch: refs/heads/trunk Commit: 4134bbfb0a2c02b81f66dbed954fb9495ef969f2 Parents: 05cf0dd Author: Gaurav NagarAuthored: Wed May 3 11:48:31 2017 +0530 Committer: Gaurav Nagar Committed: Wed May 3 11:49:23 2017 +0530 -- .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py | 6 ++ 1 file changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4134bbfb/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py -- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py index fbf2246..c2f81639 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py @@ -295,6 +295,12 @@ class Master(Script): interpreter['properties']['zeppelin.jdbc.auth.type'] = "KERBEROS" interpreter['properties']['zeppelin.jdbc.principal'] = params.zeppelin_kerberos_principal interpreter['properties']['zeppelin.jdbc.keytab.location'] = params.zeppelin_kerberos_keytab + if params.zookeeper_znode_parent \ + and params.hbase_zookeeper_quorum \ + and params.zookeeper_znode_parent not in interpreter['properties']['phoenix.url']: +interpreter['properties']['phoenix.url'] = "jdbc:phoenix:" + \ + params.hbase_zookeeper_quorum + ':' + \ + params.zookeeper_znode_parent else: interpreter['properties']['zeppelin.jdbc.auth.type'] = "" interpreter['properties']['zeppelin.jdbc.principal'] = ""
ambari git commit: AMBARI-20888. wrong ZK parent node (hbase-unsecure) getting configured as part of the jdbc(phoenix) URL on ubuntu secured cluster. (Prabhjyot Singh via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 42c73f02e -> aa34023e5 AMBARI-20888. wrong ZK parent node (hbase-unsecure) getting configured as part of the jdbc(phoenix) URL on ubuntu secured cluster. (Prabhjyot Singh via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/aa34023e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/aa34023e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/aa34023e Branch: refs/heads/branch-2.5 Commit: aa34023e5490e9dc77b6f7a646dc635bbf5c8fb1 Parents: 42c73f0 Author: Gaurav NagarAuthored: Wed May 3 11:48:31 2017 +0530 Committer: Gaurav Nagar Committed: Wed May 3 11:48:31 2017 +0530 -- .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py | 6 ++ 1 file changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/aa34023e/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py -- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py index fbf2246..c2f81639 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py @@ -295,6 +295,12 @@ class Master(Script): interpreter['properties']['zeppelin.jdbc.auth.type'] = "KERBEROS" interpreter['properties']['zeppelin.jdbc.principal'] = params.zeppelin_kerberos_principal interpreter['properties']['zeppelin.jdbc.keytab.location'] = params.zeppelin_kerberos_keytab + if params.zookeeper_znode_parent \ + and params.hbase_zookeeper_quorum \ + and params.zookeeper_znode_parent not in interpreter['properties']['phoenix.url']: +interpreter['properties']['phoenix.url'] = "jdbc:phoenix:" + \ + params.hbase_zookeeper_quorum + ':' + \ + params.zookeeper_znode_parent else: interpreter['properties']['zeppelin.jdbc.auth.type'] = "" interpreter['properties']['zeppelin.jdbc.principal'] = ""
ambari git commit: AMBARI-18387. Unable to delete Hive view. (Dipayan Bhowmick via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.4 ad40cd526 -> 60a6805d7 AMBARI-18387. Unable to delete Hive view. (Dipayan Bhowmick via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/60a6805d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/60a6805d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/60a6805d Branch: refs/heads/branch-2.4 Commit: 60a6805d7ad9807d66bcecd895d0e4290b8e6b07 Parents: ad40cd5 Author: Gaurav NagarAuthored: Tue Apr 25 12:03:01 2017 +0530 Committer: Gaurav Nagar Committed: Tue Apr 25 12:03:14 2017 +0530 -- .../ambari/view/hive2/ConnectionSystem.java | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/60a6805d/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/ConnectionSystem.java -- diff --git a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/ConnectionSystem.java b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/ConnectionSystem.java index e6e533f..d1a9eea 100644 --- a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/ConnectionSystem.java +++ b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/ConnectionSystem.java @@ -23,6 +23,8 @@ import akka.actor.ActorSystem; import akka.actor.Inbox; import akka.actor.PoisonPill; import akka.actor.Props; +import com.typesafe.config.Config; +import com.typesafe.config.ConfigFactory; import com.google.common.base.Optional; import org.apache.ambari.view.ViewContext; import org.apache.ambari.view.hive2.actor.DeathWatch; @@ -49,8 +51,9 @@ public class ConnectionSystem { private static Map credentialsMap = new ConcurrentHashMap<>(); private ConnectionSystem() { -this.actorSystem = ActorSystem.create(ACTOR_SYSTEM_NAME); -; +ClassLoader classLoader = getClass().getClassLoader(); +Config config = ConfigFactory.load(classLoader); +this.actorSystem = ActorSystem.create(ACTOR_SYSTEM_NAME, config, classLoader); } public static ConnectionSystem getInstance() { @@ -86,12 +89,12 @@ public class ConnectionSystem { String instanceName = context.getInstanceName(); ActorRef ref = null; Map stringActorRefMap = operationControllerMap.get(instanceName); -if(stringActorRefMap != null) { +if (stringActorRefMap != null) { ref = stringActorRefMap.get(context.getUsername()); } if (ref == null) { ref = createOperationController(context); - if(stringActorRefMap == null) { + if (stringActorRefMap == null) { stringActorRefMap = new HashMap<>(); stringActorRefMap.put(context.getUsername(), ref); operationControllerMap.put(instanceName, stringActorRefMap); @@ -116,9 +119,11 @@ public class ConnectionSystem { public void removeOperationControllerFromCache(String viewInstanceName) { Map refs = operationControllerMap.remove(viewInstanceName); -for (ActorRef ref : refs.values()) { - Inbox inbox = Inbox.create(getActorSystem()); - inbox.send(ref, PoisonPill.getInstance()); +if (refs != null) { + for (ActorRef ref : refs.values()) { +Inbox inbox = Inbox.create(getActorSystem()); +inbox.send(ref, PoisonPill.getInstance()); + } } }
ambari git commit: AMBARI-20641. Pig view fails to load when using ambari thru KNOX. (gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 a5b2b5e35 -> ecd504c92 AMBARI-20641. Pig view fails to load when using ambari thru KNOX. (gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ecd504c9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ecd504c9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ecd504c9 Branch: refs/heads/branch-2.5 Commit: ecd504c92c0d028637c32d335c4424ca5fb342f5 Parents: a5b2b5e Author: Gaurav NagarAuthored: Sat Apr 1 08:59:53 2017 +0530 Committer: Gaurav Nagar Committed: Sat Apr 1 09:01:09 2017 +0530 -- .../pig/src/main/resources/ui/pig-web/app/app.js | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ecd504c9/contrib/views/pig/src/main/resources/ui/pig-web/app/app.js -- diff --git a/contrib/views/pig/src/main/resources/ui/pig-web/app/app.js b/contrib/views/pig/src/main/resources/ui/pig-web/app/app.js index c683f72..35cce9d 100644 --- a/contrib/views/pig/src/main/resources/ui/pig-web/app/app.js +++ b/contrib/views/pig/src/main/resources/ui/pig-web/app/app.js @@ -25,16 +25,19 @@ module.exports = Em.Application.create({ errorLog: "", getNamespaceUrl: function() { -var parts = window.location.pathname.match(/\/[^\/]*/g); -var view = parts[1]; -var version = '/versions' + parts[2]; -var instance = parts[3]; -if (parts.length == 4) { // version is not present - instance = parts[2]; +var parts = window.location.pathname.split('/').filter(function (i) { + return i !== ""; +}); +var view = parts[parts.length - 3]; +var version = '/versions/' + parts[parts.length - 2]; +var instance = parts[parts.length - 1]; + +if (!/^(\d+\.){2,3}\d+$/.test(parts[parts.length - 2])) { // version is not present + instance = parts[parts.length - 2]; version = ''; } -var namespaceUrl = 'api/v1/views' + view + version + '/instances' + instance; -return namespaceUrl; +var namespaceUrl = 'api/v1/views/' + view + version + '/instances/' + instance; +return namespaceUrl.replace(/^\/|\/$/g, ''); //remove starting slash if proxied through knox }, Resolver: Ember.DefaultResolver.extend({
ambari git commit: AMBARI-20641. Pig view fails to load when using ambari thru KNOX. (gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk 1a08c4980 -> b88512e71 AMBARI-20641. Pig view fails to load when using ambari thru KNOX. (gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b88512e7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b88512e7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b88512e7 Branch: refs/heads/trunk Commit: b88512e719f894d9ab3d5cb956a29f21e44fc29a Parents: 1a08c49 Author: Gaurav NagarAuthored: Sat Apr 1 08:59:53 2017 +0530 Committer: Gaurav Nagar Committed: Sat Apr 1 08:59:53 2017 +0530 -- .../pig/src/main/resources/ui/pig-web/app/app.js | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b88512e7/contrib/views/pig/src/main/resources/ui/pig-web/app/app.js -- diff --git a/contrib/views/pig/src/main/resources/ui/pig-web/app/app.js b/contrib/views/pig/src/main/resources/ui/pig-web/app/app.js index c683f72..35cce9d 100644 --- a/contrib/views/pig/src/main/resources/ui/pig-web/app/app.js +++ b/contrib/views/pig/src/main/resources/ui/pig-web/app/app.js @@ -25,16 +25,19 @@ module.exports = Em.Application.create({ errorLog: "", getNamespaceUrl: function() { -var parts = window.location.pathname.match(/\/[^\/]*/g); -var view = parts[1]; -var version = '/versions' + parts[2]; -var instance = parts[3]; -if (parts.length == 4) { // version is not present - instance = parts[2]; +var parts = window.location.pathname.split('/').filter(function (i) { + return i !== ""; +}); +var view = parts[parts.length - 3]; +var version = '/versions/' + parts[parts.length - 2]; +var instance = parts[parts.length - 1]; + +if (!/^(\d+\.){2,3}\d+$/.test(parts[parts.length - 2])) { // version is not present + instance = parts[parts.length - 2]; version = ''; } -var namespaceUrl = 'api/v1/views' + view + version + '/instances' + instance; -return namespaceUrl; +var namespaceUrl = 'api/v1/views/' + view + version + '/instances/' + instance; +return namespaceUrl.replace(/^\/|\/$/g, ''); //remove starting slash if proxied through knox }, Resolver: Ember.DefaultResolver.extend({
ambari git commit: AMBARI-20574. Hive View 2.0 On SLES12-Table created on Upload throws error. (gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk 87e6c2c06 -> deff9f419 AMBARI-20574. Hive View 2.0 On SLES12-Table created on Upload throws error. (gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/deff9f41 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/deff9f41 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/deff9f41 Branch: refs/heads/trunk Commit: deff9f41906488e74fae9ba4d952ef38da53dbe9 Parents: 87e6c2c Author: Gaurav NagarAuthored: Sun Mar 26 22:05:18 2017 +0530 Committer: Gaurav Nagar Committed: Sun Mar 26 22:05:18 2017 +0530 -- .../ui/app/routes/databases/database/tables/upload-table.js| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/deff9f41/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/upload-table.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/upload-table.js b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/upload-table.js index bfd603b..5fee140 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/upload-table.js +++ b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/upload-table.js @@ -295,7 +295,7 @@ export default NewTable.extend(UILoggerMixin, { tableMeta.settings.rowFormat = {}; } tableMeta.settings.rowFormat.fieldTerminatedBy = this.getCharOptionByCharCode(1); -tableMeta.settings.rowFormat.escapeDefinedAs = this.getCharOptionByCharCode(0); +tableMeta.settings.rowFormat.escapeDefinedAs = this.getCharOptionByCharCode(2); return this.createTable(tableMeta); },
ambari git commit: AMBARI-20549.upgrade frontend-maven-plugin to latest >= 1.3 to make use of ignore proxy feature. (Venkata Sairam via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk 800aea713 -> 69779be78 AMBARI-20549.upgrade frontend-maven-plugin to latest >= 1.3 to make use of ignore proxy feature. (Venkata Sairam via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/69779be7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/69779be7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/69779be7 Branch: refs/heads/trunk Commit: 69779be78af3379a1a03e59e201c7f8eee4d4fbd Parents: 800aea7 Author: Gaurav NagarAuthored: Sun Mar 26 01:27:03 2017 +0530 Committer: Gaurav Nagar Committed: Sun Mar 26 01:27:03 2017 +0530 -- contrib/views/capacity-scheduler/pom.xml | 2 +- contrib/views/files/src/main/resources/ui/package.json | 4 ++-- .../views/hive-next/src/main/resources/ui/hive-web/package.json | 2 +- contrib/views/hive20/src/main/resources/ui/package.json | 2 +- .../src/main/resources/ui/hueambarimigration-view/package.json | 4 ++-- contrib/views/pig/pom.xml| 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/69779be7/contrib/views/capacity-scheduler/pom.xml -- diff --git a/contrib/views/capacity-scheduler/pom.xml b/contrib/views/capacity-scheduler/pom.xml index c9de4d9..b8c4dae 100644 --- a/contrib/views/capacity-scheduler/pom.xml +++ b/contrib/views/capacity-scheduler/pom.xml @@ -166,7 +166,7 @@ chmod +x - ${ui.directory}/node/npm/bin/node-gyp-bin/node-gyp + ${ui.directory}/node/node_modules/npm/bin/node-gyp-bin/node-gyp http://git-wip-us.apache.org/repos/asf/ambari/blob/69779be7/contrib/views/files/src/main/resources/ui/package.json -- diff --git a/contrib/views/files/src/main/resources/ui/package.json b/contrib/views/files/src/main/resources/ui/package.json index d15c5c9..3f27897 100644 --- a/contrib/views/files/src/main/resources/ui/package.json +++ b/contrib/views/files/src/main/resources/ui/package.json @@ -11,8 +11,8 @@ "build": "ember build", "start": "ember server", "test": "ember test", -"preinstall": "chmod +x node/npm/bin/node-gyp-bin/node-gyp", -"postinstall": "bash node/with_new_path.sh node node_modules/.bin/bower --allow-root install" +"preinstall": "chmod +x node/node_modules/npm/bin/node-gyp-bin/node-gyp", +"postinstall": "node node_modules/.bin/bower --allow-root install" }, "repository": "", "engines": { http://git-wip-us.apache.org/repos/asf/ambari/blob/69779be7/contrib/views/hive-next/src/main/resources/ui/hive-web/package.json -- diff --git a/contrib/views/hive-next/src/main/resources/ui/hive-web/package.json b/contrib/views/hive-next/src/main/resources/ui/hive-web/package.json index 6fe68e2..5c5435e 100644 --- a/contrib/views/hive-next/src/main/resources/ui/hive-web/package.json +++ b/contrib/views/hive-next/src/main/resources/ui/hive-web/package.json @@ -10,7 +10,7 @@ "start": "ember server", "build": "ember build", "test": "ember test", -"preinstall": "chmod +x node/npm/bin/node-gyp-bin/node-gyp", +"preinstall": "chmod +x node/node_modules/npm/bin/node-gyp-bin/node-gyp", "postinstall": "bash node/with_new_path.sh node node_modules/.bin/bower --allow-root install" }, "repository": "https://github.com/stefanpenner/ember-cli;, http://git-wip-us.apache.org/repos/asf/ambari/blob/69779be7/contrib/views/hive20/src/main/resources/ui/package.json -- diff --git a/contrib/views/hive20/src/main/resources/ui/package.json b/contrib/views/hive20/src/main/resources/ui/package.json index 5c0da36..98c465f 100644 --- a/contrib/views/hive20/src/main/resources/ui/package.json +++ b/contrib/views/hive20/src/main/resources/ui/package.json @@ -11,7 +11,7 @@ "build": "ember build", "start": "ember server", "test": "ember test", -"preinstall": "chmod +x node/npm/bin/node-gyp-bin/node-gyp", +"preinstall": "chmod +x node/node_modules/npm/bin/node-gyp-bin/node-gyp", "postinstall": "bash node/with_new_path.sh node node_modules/.bin/bower --allow-root install" }, "repository": "", http://git-wip-us.apache.org/repos/asf/ambari/blob/69779be7/contrib/views/hueambarimigration/src/main/resources/ui/hueambarimigration-view/package.json -- diff --git
ambari git commit: AMBARI-20563. Zeppelin : livy2 interpreter is not getting created by default.(Renjith Kamath via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk b96b81525 -> 800aea713 AMBARI-20563. Zeppelin : livy2 interpreter is not getting created by default.(Renjith Kamath via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/800aea71 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/800aea71 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/800aea71 Branch: refs/heads/trunk Commit: 800aea7136a8ba6ef9eb4d95592a837f6e6c4ed1 Parents: b96b815 Author: Gaurav NagarAuthored: Sun Mar 26 01:04:56 2017 +0530 Committer: Gaurav Nagar Committed: Sun Mar 26 01:05:05 2017 +0530 -- .../common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/800aea71/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py -- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py index eb6ec01..db601d2 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py @@ -311,7 +311,7 @@ class Master(Script): config_id = spark2_config["id"] interpreter_settings[config_id] = spark2_config -if 'livy2-defaults' in params.config['configurations']: +if params.livy2_livyserver_host: livy2_config = self.get_livy2_interpreter_config() config_id = livy2_config["id"] interpreter_settings[config_id] = livy2_config
ambari git commit: AMBARI-20539. Interpreters that are not listed under zeppelin.interpreter.group.order in zeppelin-site.xml should not get installed. (Prabhjyot Singh via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk 7fc539ffd -> b54eba9eb AMBARI-20539. Interpreters that are not listed under zeppelin.interpreter.group.order in zeppelin-site.xml should not get installed. (Prabhjyot Singh via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b54eba9e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b54eba9e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b54eba9e Branch: refs/heads/trunk Commit: b54eba9eb306a0b45fe75dd0b8d80626f240ce6a Parents: 7fc539f Author: Gaurav NagarAuthored: Fri Mar 24 19:50:59 2017 +0530 Committer: Gaurav Nagar Committed: Fri Mar 24 19:50:59 2017 +0530 -- .../ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml | 7 +++ .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py | 5 + .../ZEPPELIN/0.6.0.2.5/package/scripts/params.py | 1 + ambari-server/src/test/python/stacks/2.6/configs/default.json | 3 ++- 4 files changed, 15 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b54eba9e/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml -- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml index 039c701..85f1859 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml @@ -93,6 +93,13 @@ +zeppelin.interpreter.group.order +spark,angular,jdbc,livy,md,sh +Comma separated interpreter configurations. First interpreter become default + + + + zeppelin.interpreter.connect.timeout 3 Interpreter process connect timeout in msec. http://git-wip-us.apache.org/repos/asf/ambari/blob/b54eba9e/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py -- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py index 575f7bc..eb6ec01 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py @@ -301,6 +301,11 @@ class Master(Script): config_data = self.get_interpreter_settings() interpreter_settings = config_data['interpreterSettings'] +for setting_key in interpreter_settings.keys(): + interpreter = interpreter_settings[setting_key] + if not (interpreter['group'] in params.zeppelin_interpreter): +del interpreter_settings[setting_key] + if 'spark2-defaults' in params.config['configurations']: spark2_config = self.get_spark2_interpreter_config() config_id = spark2_config["id"] http://git-wip-us.apache.org/repos/asf/ambari/blob/b54eba9e/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py index 0a0acdb..6ba2a87 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py @@ -84,6 +84,7 @@ stack_name = default("/hostLevelParams/stack_name", None) # params from zeppelin-config zeppelin_port = str(config['configurations']['zeppelin-config']['zeppelin.server.port']) +zeppelin_interpreter = str(config['configurations']['zeppelin-config']['zeppelin.interpreter.group.order']).split(",") # params from zeppelin-env zeppelin_user = config['configurations']['zeppelin-env']['zeppelin_user'] http://git-wip-us.apache.org/repos/asf/ambari/blob/b54eba9e/ambari-server/src/test/python/stacks/2.6/configs/default.json -- diff --git a/ambari-server/src/test/python/stacks/2.6/configs/default.json b/ambari-server/src/test/python/stacks/2.6/configs/default.json index a1f89ce..54000e6 100644 --- a/ambari-server/src/test/python/stacks/2.6/configs/default.json
ambari git commit: AMBARI-20492. Knox Proxy - Ambari HIVE2.0 view doesn't showup due to Servicecheck issues. (gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk b24836681 -> 044c5eb29 AMBARI-20492. Knox Proxy - Ambari HIVE2.0 view doesn't showup due to Servicecheck issues. (gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/044c5eb2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/044c5eb2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/044c5eb2 Branch: refs/heads/trunk Commit: 044c5eb29f5670cf8a3e8a8d1847bb5a3d090816 Parents: b248366 Author: Gaurav NagarAuthored: Mon Mar 20 11:50:17 2017 +0530 Committer: Gaurav Nagar Committed: Mon Mar 20 11:50:17 2017 +0530 -- contrib/views/hive20/src/main/resources/ui/app/index.html | 2 +- .../hive20/src/main/resources/ui/app/services/tez-view-info.js| 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/044c5eb2/contrib/views/hive20/src/main/resources/ui/app/index.html -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/index.html b/contrib/views/hive20/src/main/resources/ui/app/index.html index cc9141f..57179d8 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/index.html +++ b/contrib/views/hive20/src/main/resources/ui/app/index.html @@ -36,7 +36,7 @@ {{content-for "body"}} - + {{content-for "body-footer"}} http://git-wip-us.apache.org/repos/asf/ambari/blob/044c5eb2/contrib/views/hive20/src/main/resources/ui/app/services/tez-view-info.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/services/tez-view-info.js b/contrib/views/hive20/src/main/resources/ui/app/services/tez-view-info.js index 02cc5af..2c0493e 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/services/tez-view-info.js +++ b/contrib/views/hive20/src/main/resources/ui/app/services/tez-view-info.js @@ -20,7 +20,8 @@ import Ember from 'ember'; export default Ember.Service.extend({ tezViewURL: null, - tezApiURL: '/api/v1/views/TEZ', + // replace used to avoid slash duplication by proxy + tezApiURL: '/api/v1/views/TEZ'.replace(/^\/\//, '/'), tezURLPrefix: '/views/TEZ', tezDagPath: '?viewPath=/#/dag/', getTezViewInfo: function () {
ambari git commit: AMBARI-20337.Need to show timer while loading coordinator name while bundle creation.(Madhan Mohan Reddy via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk 78e038a80 -> 17323e0d7 AMBARI-20337.Need to show timer while loading coordinator name while bundle creation.(Madhan Mohan Reddy via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/17323e0d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/17323e0d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/17323e0d Branch: refs/heads/trunk Commit: 17323e0d73d11eb27f3203ae6f2319e43e6ef9cd Parents: 78e038a Author: Gaurav NagarAuthored: Wed Mar 8 17:24:45 2017 +0530 Committer: Gaurav Nagar Committed: Wed Mar 8 17:25:25 2017 +0530 -- .../ui/app/components/bundle-coord-config.js| 28 +--- .../app/templates/components/bundle-config.hbs | 4 +-- .../components/bundle-coord-config.hbs | 5 +++- 3 files changed, 30 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/17323e0d/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-coord-config.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-coord-config.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-coord-config.js index 2280f82..c2ac96b 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-coord-config.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-coord-config.js @@ -26,6 +26,7 @@ const Validations = buildValidations({ }) }); export default Ember.Component.extend(Validations, { + propertyExtractor : Ember.inject.service('property-extractor'), initialize : function(){ this.on('fileSelected',function(fileName){ this.set(this.get('filePathModel'), fileName); @@ -52,8 +53,8 @@ export default Ember.Component.extend(Validations, { } }).done(function(data){ deferred.resolve(data); -}).fail(function(){ - deferred.reject(); +}).fail(function(data){ + deferred.reject(data); }); return deferred; }, @@ -95,13 +96,32 @@ export default Ember.Component.extend(Validations, { }, showCoordinatorName(){ this.set('coordinatorName', null); - var deferred = this.readFromHdfs(this.get('coordinator.appPath')); + this.set('errorMsg', ''); + if (this.get('coordinator.appPath') === '') { +return; + } + var path = this.get('appendFileName')(this.get('coordinator.appPath'), 'coord'); + if (this.get('propertyExtractor').containsParameters(path)) { +this.set('containsParameteriedPaths', true); +this.set('parameterizedPathWarning', 'Coordinator path contains variables'); +return; + } else { +this.set('containsParameteriedPaths', false); +this.set('parameterizedPathWarning', ''); + } + this.set('coordNameFetchingInProgress', true); + var deferred = this.readFromHdfs(path); deferred.promise.then(function(data){ var x2js = new X2JS(); var coordJson = x2js.xml_str2json(data); this.set('coordinator.name', coordJson["coordinator-app"]._name); - }.bind(this)).catch(function(){ +this.set('coordNameFetchingInProgress', false); + }.bind(this)).catch(function(data){ +console.error(data); this.set('coordinatorName', null); +this.set('errorMsg', 'There is some problem while fetching coordinator name.'); +this.set('data', data); +this.set('coordNameFetchingInProgress', false); }.bind(this)); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/17323e0d/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-config.hbs -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-config.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-config.hbs index 2d374a5..39ab06d 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-config.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-config.hbs @@ -103,10 +103,10 @@ {{#field-error model=this field='bundle.coordinators' showErrorMessage=showErrorMessage}}{{/field-error}} {{#if coordinatorCreateMode}} - {{#bundle-coord-config coordinator=currentCoordinator openTab="openTab" openFileBrowser="openFileBrowser" add="addCoordinator" cancel="cancelCoordinatorOperation" createMode=coordinatorCreateMode}}{{/bundle-coord-config}} + {{#bundle-coord-config coordinator=currentCoordinator
ambari git commit: AMBARI-20337.Need to show timer while loading coordinator name while bundle creation.(Madhan Mohan Reddy via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 ba04d2211 -> 934f3f182 AMBARI-20337.Need to show timer while loading coordinator name while bundle creation.(Madhan Mohan Reddy via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/934f3f18 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/934f3f18 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/934f3f18 Branch: refs/heads/branch-2.5 Commit: 934f3f18277b3cb48e1e8c9a16836aebdec1d1b0 Parents: ba04d22 Author: Gaurav NagarAuthored: Wed Mar 8 17:24:45 2017 +0530 Committer: Gaurav Nagar Committed: Wed Mar 8 17:24:45 2017 +0530 -- .../ui/app/components/bundle-coord-config.js| 28 +--- .../app/templates/components/bundle-config.hbs | 4 +-- .../components/bundle-coord-config.hbs | 5 +++- 3 files changed, 30 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/934f3f18/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-coord-config.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-coord-config.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-coord-config.js index 2280f82..c2ac96b 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-coord-config.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-coord-config.js @@ -26,6 +26,7 @@ const Validations = buildValidations({ }) }); export default Ember.Component.extend(Validations, { + propertyExtractor : Ember.inject.service('property-extractor'), initialize : function(){ this.on('fileSelected',function(fileName){ this.set(this.get('filePathModel'), fileName); @@ -52,8 +53,8 @@ export default Ember.Component.extend(Validations, { } }).done(function(data){ deferred.resolve(data); -}).fail(function(){ - deferred.reject(); +}).fail(function(data){ + deferred.reject(data); }); return deferred; }, @@ -95,13 +96,32 @@ export default Ember.Component.extend(Validations, { }, showCoordinatorName(){ this.set('coordinatorName', null); - var deferred = this.readFromHdfs(this.get('coordinator.appPath')); + this.set('errorMsg', ''); + if (this.get('coordinator.appPath') === '') { +return; + } + var path = this.get('appendFileName')(this.get('coordinator.appPath'), 'coord'); + if (this.get('propertyExtractor').containsParameters(path)) { +this.set('containsParameteriedPaths', true); +this.set('parameterizedPathWarning', 'Coordinator path contains variables'); +return; + } else { +this.set('containsParameteriedPaths', false); +this.set('parameterizedPathWarning', ''); + } + this.set('coordNameFetchingInProgress', true); + var deferred = this.readFromHdfs(path); deferred.promise.then(function(data){ var x2js = new X2JS(); var coordJson = x2js.xml_str2json(data); this.set('coordinator.name', coordJson["coordinator-app"]._name); - }.bind(this)).catch(function(){ +this.set('coordNameFetchingInProgress', false); + }.bind(this)).catch(function(data){ +console.error(data); this.set('coordinatorName', null); +this.set('errorMsg', 'There is some problem while fetching coordinator name.'); +this.set('data', data); +this.set('coordNameFetchingInProgress', false); }.bind(this)); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/934f3f18/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-config.hbs -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-config.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-config.hbs index 2d374a5..39ab06d 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-config.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-config.hbs @@ -103,10 +103,10 @@ {{#field-error model=this field='bundle.coordinators' showErrorMessage=showErrorMessage}}{{/field-error}} {{#if coordinatorCreateMode}} - {{#bundle-coord-config coordinator=currentCoordinator openTab="openTab" openFileBrowser="openFileBrowser" add="addCoordinator" cancel="cancelCoordinatorOperation" createMode=coordinatorCreateMode}}{{/bundle-coord-config}} + {{#bundle-coord-config coordinator=currentCoordinator
ambari git commit: AMBARI-20353. Log error while importing the workflow from encrypted path. (Madhan Mohan Reddy via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 3fd1c2444 -> ba04d2211 AMBARI-20353. Log error while importing the workflow from encrypted path. (Madhan Mohan Reddy via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ba04d221 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ba04d221 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ba04d221 Branch: refs/heads/branch-2.5 Commit: ba04d2211c1db5f6f7ca2feeede1b5667410344d Parents: 3fd1c24 Author: Gaurav NagarAuthored: Wed Mar 8 17:00:23 2017 +0530 Committer: Gaurav Nagar Committed: Wed Mar 8 17:01:00 2017 +0530 -- .../ambari/view/OozieProxyImpersonator.java | 42 ++-- .../org/apache/oozie/ambari/view/Utils.java | 30 ++ 2 files changed, 34 insertions(+), 38 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ba04d221/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java -- diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java index 9bf2f90..d82f928 100644 --- a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java +++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java @@ -23,7 +23,6 @@ import static org.apache.oozie.ambari.view.Constants.STATUS_OK; import java.io.IOException; import java.io.InputStream; -import java.io.OutputStream; import java.util.HashMap; import java.util.Map; @@ -37,7 +36,6 @@ import javax.ws.rs.POST; import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.QueryParam; -import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.Context; import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.MediaType; @@ -335,15 +333,7 @@ public class OozieProxyImpersonator { } try { final InputStream is = workflowFilesService.readAssset(assetPath); - StreamingOutput streamer = new StreamingOutput() { -@Override -public void write(OutputStream os) throws IOException, -WebApplicationException { - IOUtils.copy(is, os); - is.close(); - os.close(); -} - }; + StreamingOutput streamer = utils.streamResponse(is); return Response.ok(streamer).status(200).build(); } catch (IOException ex) { LOGGER.error(ex.getMessage(),ex); @@ -359,15 +349,7 @@ public class OozieProxyImpersonator { } try { final InputStream is = workflowFilesService.readDraft(workflowPath); - StreamingOutput streamer = new StreamingOutput() { -@Override -public void write(OutputStream os) throws IOException, - WebApplicationException { - IOUtils.copy(is, os); - is.close(); - os.close(); -} - }; + StreamingOutput streamer = utils.streamResponse(is); return Response.ok(streamer).status(200).build(); } catch (IOException ex) { LOGGER.error(ex.getMessage(),ex); @@ -426,15 +408,7 @@ public class OozieProxyImpersonator { private Response getWorkflowResponse(String filePath, String responseType, boolean olderFormatDraftIngored) throws IOException { final InputStream is = workflowFilesService.readWorkflowXml(filePath); -StreamingOutput streamer = new StreamingOutput() { - @Override - public void write(OutputStream os) throws IOException, -WebApplicationException { -IOUtils.copy(is, os); -is.close(); -os.close(); - } -}; +StreamingOutput streamer = utils.streamResponse(is); Response.ResponseBuilder responseBuilder = Response.ok(streamer).header(RESPONSE_TYPE, responseType); if (olderFormatDraftIngored) { responseBuilder.header(OLDER_FORMAT_DRAFT_INGORED, Boolean.TRUE.toString()); @@ -455,15 +429,7 @@ public class OozieProxyImpersonator { throw new WfmWebException(ErrorCode.WORKFLOW_XML_DOES_NOT_EXIST); } final InputStream is = workflowFilesService.readWorkflowXml(workflowPath); - StreamingOutput streamer = new StreamingOutput() { -@Override -public void write(OutputStream os) throws IOException, - WebApplicationException { - IOUtils.copy(is, os); - is.close(); - os.close(); -} - }; + StreamingOutput streamer = utils.streamResponse(is); return Response.ok(streamer).status(200).build(); } catch (WfmWebException ex) {
ambari git commit: AMBARI-20353. Log error while importing the workflow from encrypted path. (Madhan Mohan Reddy via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk fdb12d480 -> 78e038a80 AMBARI-20353. Log error while importing the workflow from encrypted path. (Madhan Mohan Reddy via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/78e038a8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/78e038a8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/78e038a8 Branch: refs/heads/trunk Commit: 78e038a8098200c58b425c7cd6b5e87e75da0ea8 Parents: fdb12d4 Author: Gaurav NagarAuthored: Wed Mar 8 17:00:23 2017 +0530 Committer: Gaurav Nagar Committed: Wed Mar 8 17:00:23 2017 +0530 -- .../ambari/view/OozieProxyImpersonator.java | 42 ++-- .../org/apache/oozie/ambari/view/Utils.java | 30 ++ 2 files changed, 34 insertions(+), 38 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/78e038a8/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java -- diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java index 9bf2f90..d82f928 100644 --- a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java +++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java @@ -23,7 +23,6 @@ import static org.apache.oozie.ambari.view.Constants.STATUS_OK; import java.io.IOException; import java.io.InputStream; -import java.io.OutputStream; import java.util.HashMap; import java.util.Map; @@ -37,7 +36,6 @@ import javax.ws.rs.POST; import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.QueryParam; -import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.Context; import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.MediaType; @@ -335,15 +333,7 @@ public class OozieProxyImpersonator { } try { final InputStream is = workflowFilesService.readAssset(assetPath); - StreamingOutput streamer = new StreamingOutput() { -@Override -public void write(OutputStream os) throws IOException, -WebApplicationException { - IOUtils.copy(is, os); - is.close(); - os.close(); -} - }; + StreamingOutput streamer = utils.streamResponse(is); return Response.ok(streamer).status(200).build(); } catch (IOException ex) { LOGGER.error(ex.getMessage(),ex); @@ -359,15 +349,7 @@ public class OozieProxyImpersonator { } try { final InputStream is = workflowFilesService.readDraft(workflowPath); - StreamingOutput streamer = new StreamingOutput() { -@Override -public void write(OutputStream os) throws IOException, - WebApplicationException { - IOUtils.copy(is, os); - is.close(); - os.close(); -} - }; + StreamingOutput streamer = utils.streamResponse(is); return Response.ok(streamer).status(200).build(); } catch (IOException ex) { LOGGER.error(ex.getMessage(),ex); @@ -426,15 +408,7 @@ public class OozieProxyImpersonator { private Response getWorkflowResponse(String filePath, String responseType, boolean olderFormatDraftIngored) throws IOException { final InputStream is = workflowFilesService.readWorkflowXml(filePath); -StreamingOutput streamer = new StreamingOutput() { - @Override - public void write(OutputStream os) throws IOException, -WebApplicationException { -IOUtils.copy(is, os); -is.close(); -os.close(); - } -}; +StreamingOutput streamer = utils.streamResponse(is); Response.ResponseBuilder responseBuilder = Response.ok(streamer).header(RESPONSE_TYPE, responseType); if (olderFormatDraftIngored) { responseBuilder.header(OLDER_FORMAT_DRAFT_INGORED, Boolean.TRUE.toString()); @@ -455,15 +429,7 @@ public class OozieProxyImpersonator { throw new WfmWebException(ErrorCode.WORKFLOW_XML_DOES_NOT_EXIST); } final InputStream is = workflowFilesService.readWorkflowXml(workflowPath); - StreamingOutput streamer = new StreamingOutput() { -@Override -public void write(OutputStream os) throws IOException, - WebApplicationException { - IOUtils.copy(is, os); - is.close(); - os.close(); -} - }; + StreamingOutput streamer = utils.streamResponse(is); return Response.ok(streamer).status(200).build(); } catch (WfmWebException ex) {
ambari git commit: AMBARI-20342. WFM:Performance improvement for adding node on a decision node in large workflow.(Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 267c98fb8 -> 3fd1c2444 AMBARI-20342. WFM:Performance improvement for adding node on a decision node in large workflow.(Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3fd1c244 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3fd1c244 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3fd1c244 Branch: refs/heads/branch-2.5 Commit: 3fd1c24442f4c90becff35c004290e829f136318 Parents: 267c98f Author: Gaurav NagarAuthored: Wed Mar 8 16:57:21 2017 +0530 Committer: Gaurav Nagar Committed: Wed Mar 8 16:57:21 2017 +0530 -- .../ui/app/components/flow-designer.js | 73 .../ui/app/domain/cytoscape-flow-renderer.js| 8 ++- .../src/main/resources/ui/app/styles/app.less | 4 ++ .../app/templates/components/flow-designer.hbs | 5 ++ 4 files changed, 59 insertions(+), 31 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3fd1c244/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js index 01f8fe6..37992be 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js @@ -275,15 +275,23 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { this.doValidation(); this.renderTransitions(); }, - rerender(){ -this.flowRenderer.cleanup(); -this.renderWorkflow(this.get("workflow")); + rerender(callback){ +this.set('showStatus', true); +Ember.run.later(() => { + this.flowRenderer.cleanup(); + this.renderWorkflow(this.get("workflow")); + this.set('showStatus', false); + if(callback){ +callback(); + } +}.bind(this)); }, setCurrentTransition(transitionInfo){ this.set("currentTransition", { transition : transitionInfo.transition, source : transitionInfo.source, - target : transitionInfo.target + target : transitionInfo.target, + originalSource : transitionInfo.originalSource }); }, actionInfo(node){ @@ -292,8 +300,9 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { deleteTransition(transition,sourceNode){ this.createSnapshot(); this.get("workflow").deleteTransition(transition); -this.showUndo('transition'); -this.rerender(); +this.rerender(function(){ + this.showUndo('transition'); +}.bind(this)); }, showWorkflowActionSelect(element){ var self=this; @@ -422,12 +431,9 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { var x2js = new X2JS(); var actionNodeXml = x2js.xml_str2json(actionNodeXmlString); var actionNodeType = Object.keys(actionNodeXml)[0]; -var currentTransition = this.get("currentTransition.transition"); this.createSnapshot(); -var transition = this.get("currentTransition").source.transitions.findBy('targetNode.id',currentTransition.targetNode.id); -transition.source=this.get("currentTransition").source; this.generateUniqueNodeId(actionNodeType); -var actionNode = this.get("workflow").addNode(transition,actionNodeType, {}, ""); +var actionNode = this.get("workflow").addNode(this.getTransitionInfo(),actionNodeType, {}, ""); this.rerender(); this.doValidation(); this.scrollToNewPosition(); @@ -635,9 +641,10 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { } else { this.get("workflow").deleteNode(node,transitionslist); } -this.rerender(); -this.doValidation(); -this.showUndo('nodeDeleted'); +this.rerender(function(){ + this.doValidation(); + this.showUndo('nodeDeleted'); +}.bind(this)); }, addWorkflowBranch(node){ this.createSnapshot(); @@ -749,6 +756,18 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { return 1; } }, + getTransitionInfo(){ +var currentTransition=this.get("currentTransition.transition"); +var transition = {}; +if(this.get("currentTransition").source.type === 'placeholder'){ + transition = this.get("currentTransition").originalSource.transitions.findBy('targetNode.id',this.get("currentTransition").source.id); + transition.source=this.get("currentTransition").originalSource; +}else{ + transition =
ambari git commit: AMBARI-20340.Issue with toggling of Execute/Stop button in query page while successful and failure execution of query.(Venkata Sairam)
Repository: ambari Updated Branches: refs/heads/branch-2.5 f66a663ad -> 267c98fb8 AMBARI-20340.Issue with toggling of Execute/Stop button in query page while successful and failure execution of query.(Venkata Sairam) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/267c98fb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/267c98fb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/267c98fb Branch: refs/heads/branch-2.5 Commit: 267c98fb8afdb32dae3ae192f12324b040e55880 Parents: f66a663 Author: Gaurav NagarAuthored: Wed Mar 8 16:26:45 2017 +0530 Committer: Gaurav Nagar Committed: Wed Mar 8 16:27:46 2017 +0530 -- .../resources/ui/app/routes/queries/query.js| 73 +++- .../src/main/resources/ui/app/styles/app.scss | 4 +- 2 files changed, 45 insertions(+), 32 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/267c98fb/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js b/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js index 08af7d4..80116da 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js +++ b/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js @@ -133,9 +133,9 @@ export default Ember.Route.extend(UILoggerMixin, { controller.set('currentQuery', model.get('query')); controller.set('currentJobId', null); controller.set('queryResult', model.get('queryResult')); -controller.set('isJobSuccess', false); -controller.set('isJobCancelled', false); -controller.set('isJobCreated', false); +controller.set('isJobSuccess', model.get('isJobSuccess')); +controller.set('isJobCancelled', model.get('isJobCancelled')); +controller.set('isJobCreated', model.get('isJobCreated')); controller.set('isExportResultSuccessMessege', false); controller.set('isExportResultFailureMessege', false); @@ -181,19 +181,22 @@ export default Ember.Route.extend(UILoggerMixin, { }, actions: { -resetDefaultWorksheet(){ - this.get('controller.model').set('queryResult',{'schema' :[], 'rows' :[]}); - this.get('controller.model').set('currentPage',0); - this.get('controller.model').set('previousPage',-1); - this.get('controller.model').set('nextPage',1); +resetDefaultWorksheet(currModel){ + if(!currModel) { +currModel = this.get('controller.model'); + } + currModel.set('queryResult',{'schema' :[], 'rows' :[]}); + currModel.set('currentPage',0); + currModel.set('previousPage',-1); + currModel.set('nextPage',1); //this.get('controller.model').set('selected',false); - this.get('controller.model').set('jobData',[]); - this.get('controller.model').set('currentJobData',null); - this.get('controller.model').set('queryFile',""); - this.get('controller.model').set('logFile',""); - this.get('controller.model').set('logResults',""); - this.get('controller.model').set('isQueryRunning',false); - this.get('controller.model').set('isQueryResultContainer',false); + currModel.set('jobData',[]); + currModel.set('currentJobData',null); + currModel.set('queryFile',""); + currModel.set('logFile',""); + currModel.set('logResults',""); + currModel.set('isQueryRunning',false); + currModel.set('isQueryResultContainer',false); }, changeDbHandler(selectedDBs){ @@ -244,9 +247,8 @@ export default Ember.Route.extend(UILoggerMixin, { executeQuery(isVisualExplainQuery){ - let self = this; + let self = this, ctrlr = self.get('controller'), ctrlrModel = self.get('controller.model'); this.get('controller').set('currentJobId', null); - if(!Ember.isEmpty(isVisualExplainQuery)){ isVisualExplainQuery = true; this.get('controller').set('isVisualExplainQuery', true); @@ -258,7 +260,7 @@ export default Ember.Route.extend(UILoggerMixin, { let originalQuery = this.get('controller').get('currentQuery'); if(Ember.isBlank(originalQuery)) { this.get('logger').danger('Query cannot be empty.'); -this.send('resetDefaultWorksheet'); +this.send('resetDefaultWorksheet', ctrlrModel); return; } let queryInput = originalQuery; @@ -299,7 +301,8 @@ export default Ember.Route.extend(UILoggerMixin, { this.get('controller.model').set('isQueryRunning', true); - this.get('controller.model').set('isJobCreated',false); + ctrlrModel.set('isJobCreated',false); + ctrlr.set('isJobCreated',false);
ambari git commit: AMBARI-20340.Issue with toggling of Execute/Stop button in query page while successful and failure execution of query.(Venkata Sairam)
Repository: ambari Updated Branches: refs/heads/trunk 769fb723a -> 0e56ae78e AMBARI-20340.Issue with toggling of Execute/Stop button in query page while successful and failure execution of query.(Venkata Sairam) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0e56ae78 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0e56ae78 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0e56ae78 Branch: refs/heads/trunk Commit: 0e56ae78e768a6d54392fc9d8c91f4c46c4645ea Parents: 769fb72 Author: Gaurav NagarAuthored: Wed Mar 8 16:26:45 2017 +0530 Committer: Gaurav Nagar Committed: Wed Mar 8 16:26:45 2017 +0530 -- .../resources/ui/app/routes/queries/query.js| 73 +++- .../src/main/resources/ui/app/styles/app.scss | 4 +- 2 files changed, 45 insertions(+), 32 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0e56ae78/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js b/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js index 08af7d4..80116da 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js +++ b/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js @@ -133,9 +133,9 @@ export default Ember.Route.extend(UILoggerMixin, { controller.set('currentQuery', model.get('query')); controller.set('currentJobId', null); controller.set('queryResult', model.get('queryResult')); -controller.set('isJobSuccess', false); -controller.set('isJobCancelled', false); -controller.set('isJobCreated', false); +controller.set('isJobSuccess', model.get('isJobSuccess')); +controller.set('isJobCancelled', model.get('isJobCancelled')); +controller.set('isJobCreated', model.get('isJobCreated')); controller.set('isExportResultSuccessMessege', false); controller.set('isExportResultFailureMessege', false); @@ -181,19 +181,22 @@ export default Ember.Route.extend(UILoggerMixin, { }, actions: { -resetDefaultWorksheet(){ - this.get('controller.model').set('queryResult',{'schema' :[], 'rows' :[]}); - this.get('controller.model').set('currentPage',0); - this.get('controller.model').set('previousPage',-1); - this.get('controller.model').set('nextPage',1); +resetDefaultWorksheet(currModel){ + if(!currModel) { +currModel = this.get('controller.model'); + } + currModel.set('queryResult',{'schema' :[], 'rows' :[]}); + currModel.set('currentPage',0); + currModel.set('previousPage',-1); + currModel.set('nextPage',1); //this.get('controller.model').set('selected',false); - this.get('controller.model').set('jobData',[]); - this.get('controller.model').set('currentJobData',null); - this.get('controller.model').set('queryFile',""); - this.get('controller.model').set('logFile',""); - this.get('controller.model').set('logResults',""); - this.get('controller.model').set('isQueryRunning',false); - this.get('controller.model').set('isQueryResultContainer',false); + currModel.set('jobData',[]); + currModel.set('currentJobData',null); + currModel.set('queryFile',""); + currModel.set('logFile',""); + currModel.set('logResults',""); + currModel.set('isQueryRunning',false); + currModel.set('isQueryResultContainer',false); }, changeDbHandler(selectedDBs){ @@ -244,9 +247,8 @@ export default Ember.Route.extend(UILoggerMixin, { executeQuery(isVisualExplainQuery){ - let self = this; + let self = this, ctrlr = self.get('controller'), ctrlrModel = self.get('controller.model'); this.get('controller').set('currentJobId', null); - if(!Ember.isEmpty(isVisualExplainQuery)){ isVisualExplainQuery = true; this.get('controller').set('isVisualExplainQuery', true); @@ -258,7 +260,7 @@ export default Ember.Route.extend(UILoggerMixin, { let originalQuery = this.get('controller').get('currentQuery'); if(Ember.isBlank(originalQuery)) { this.get('logger').danger('Query cannot be empty.'); -this.send('resetDefaultWorksheet'); +this.send('resetDefaultWorksheet', ctrlrModel); return; } let queryInput = originalQuery; @@ -299,7 +301,8 @@ export default Ember.Route.extend(UILoggerMixin, { this.get('controller.model').set('isQueryRunning', true); - this.get('controller.model').set('isJobCreated',false); + ctrlrModel.set('isJobCreated',false); + ctrlr.set('isJobCreated',false);
ambari git commit: AMBARI-20293. WFM FS editor needs to maintain order of FS operations. (Belliraj HB via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk f7472a09a -> 135c0cbfb AMBARI-20293. WFM FS editor needs to maintain order of FS operations. (Belliraj HB via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/135c0cbf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/135c0cbf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/135c0cbf Branch: refs/heads/trunk Commit: 135c0cbfbe7eb976926f8b30db36493bca94fa1c Parents: f7472a0 Author: Gaurav NagarAuthored: Fri Mar 3 21:07:06 2017 +0530 Committer: Gaurav Nagar Committed: Fri Mar 3 21:07:35 2017 +0530 -- .../ui/app/domain/actionjob_hanlder.js | 330 +-- .../resources/ui/app/domain/node-handler.js | 4 +- .../ui/app/domain/workflow-importer.js | 10 +- .../ui/app/domain/workflow-xml-generator.js | 2 +- 4 files changed, 172 insertions(+), 174 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/135c0cbf/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js index 3058610..c9dc751 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js @@ -356,10 +356,10 @@ var CustomActionJobHandler=ActionJobHandler.extend({ nodeObj[this.get("actionType")] = customDomain; } }); - var FSActionJobHandler=ActionJobHandler.extend({ actionType:"fs", mapping:null, + x2js : new X2JS({escapeMode:false}), init(){ this.mapping=[ {xml:"name-node",domain:"nameNode"}, @@ -368,7 +368,7 @@ var FSActionJobHandler=ActionJobHandler.extend({ {xml:"delete"}, {xml:"mkdir"}, {xml:"move"}, - {xml:"chmod"}, + {xml:"chmod"}, {xml:"touchz"}, {xml:"chgrp"} ]; @@ -378,192 +378,186 @@ var FSActionJobHandler=ActionJobHandler.extend({ if (!nodeDomain.fsOps){ return; } +var $root = Ember.$(''); nodeDomain.fsOps.forEach(function(fsop){ - if (!nodeObj.fs[fsop.type]){ -nodeObj.fs[fsop.type]=[]; - } switch (fsop.type) { -case "delete": -nodeObj.fs["delete"].push({"_path":fsop.path}); -break; -case "mkdir": -nodeObj.fs["mkdir"].push({"_path":fsop.path}); -break; -case "move": -nodeObj.fs["move"].push({"_source":fsop.source,"_target":fsop.target}); -break; -case "touchz": -nodeObj.fs["touchz"].push({"_path":fsop.path}); -break; -case "chmod": -var permissions, ownerPerm = 0, groupPerm = 0, othersPerm = 0, dirFiles = fsop.dirfiles; +case 'delete': + $root.append(Ember.$('').attr("path",fsop.path)); + break; +case 'mkdir': + $root.append(Ember.$('').attr("path",fsop.path)); + break; +case 'move': + $root.append(Ember.$('').attr("source",fsop.source).attr("target",fsop.target)); + break; +case 'touchz': + $root.append(Ember.$('').attr("path",fsop.path)); + break; +case 'chmod': + var permissions, ownerPerm = 0, groupPerm = 0, othersPerm = 0, dirFiles = fsop.dirfiles; -if(fsop){ - if(fsop.oread){ -ownerPerm = 1; - } - if(fsop.owrite){ -ownerPerm = ownerPerm + 2; - } - if(fsop.oexecute){ -ownerPerm = ownerPerm + 4; - } - if(fsop.gread){ -groupPerm = 1; - } - if(fsop.gwrite){ -groupPerm = groupPerm + 2; + if(fsop){ +if(fsop.oread){ + ownerPerm = 1; +} +if(fsop.owrite){ + ownerPerm = ownerPerm + 2; +} +if(fsop.oexecute){ + ownerPerm = ownerPerm + 4; +} +if(fsop.gread){ + groupPerm = 1; +} +if(fsop.gwrite){ + groupPerm = groupPerm + 2; +} +if(fsop.gexecute){ + groupPerm = groupPerm + 4; +} +if(fsop.rread){ + othersPerm = 1; +} +if(fsop.rwrite){ + othersPerm = othersPerm + 2; +} +if(fsop.rexecute){ + othersPerm = othersPerm + 4; +} } - if(fsop.gexecute){ -groupPerm = groupPerm + 4; + permissions =
ambari git commit: AMBARI-20293. WFM FS editor needs to maintain order of FS operations. (Belliraj HB via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 4e81cc733 -> 671c5eef7 AMBARI-20293. WFM FS editor needs to maintain order of FS operations. (Belliraj HB via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/671c5eef Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/671c5eef Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/671c5eef Branch: refs/heads/branch-2.5 Commit: 671c5eef717cf6ba6e5b856204a6cb78a21e985e Parents: 4e81cc7 Author: Gaurav NagarAuthored: Fri Mar 3 21:07:06 2017 +0530 Committer: Gaurav Nagar Committed: Fri Mar 3 21:07:06 2017 +0530 -- .../ui/app/domain/actionjob_hanlder.js | 330 +-- .../resources/ui/app/domain/node-handler.js | 4 +- .../ui/app/domain/workflow-importer.js | 10 +- .../ui/app/domain/workflow-xml-generator.js | 2 +- 4 files changed, 172 insertions(+), 174 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/671c5eef/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js index 3058610..c9dc751 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js @@ -356,10 +356,10 @@ var CustomActionJobHandler=ActionJobHandler.extend({ nodeObj[this.get("actionType")] = customDomain; } }); - var FSActionJobHandler=ActionJobHandler.extend({ actionType:"fs", mapping:null, + x2js : new X2JS({escapeMode:false}), init(){ this.mapping=[ {xml:"name-node",domain:"nameNode"}, @@ -368,7 +368,7 @@ var FSActionJobHandler=ActionJobHandler.extend({ {xml:"delete"}, {xml:"mkdir"}, {xml:"move"}, - {xml:"chmod"}, + {xml:"chmod"}, {xml:"touchz"}, {xml:"chgrp"} ]; @@ -378,192 +378,186 @@ var FSActionJobHandler=ActionJobHandler.extend({ if (!nodeDomain.fsOps){ return; } +var $root = Ember.$(''); nodeDomain.fsOps.forEach(function(fsop){ - if (!nodeObj.fs[fsop.type]){ -nodeObj.fs[fsop.type]=[]; - } switch (fsop.type) { -case "delete": -nodeObj.fs["delete"].push({"_path":fsop.path}); -break; -case "mkdir": -nodeObj.fs["mkdir"].push({"_path":fsop.path}); -break; -case "move": -nodeObj.fs["move"].push({"_source":fsop.source,"_target":fsop.target}); -break; -case "touchz": -nodeObj.fs["touchz"].push({"_path":fsop.path}); -break; -case "chmod": -var permissions, ownerPerm = 0, groupPerm = 0, othersPerm = 0, dirFiles = fsop.dirfiles; +case 'delete': + $root.append(Ember.$('').attr("path",fsop.path)); + break; +case 'mkdir': + $root.append(Ember.$('').attr("path",fsop.path)); + break; +case 'move': + $root.append(Ember.$('').attr("source",fsop.source).attr("target",fsop.target)); + break; +case 'touchz': + $root.append(Ember.$('').attr("path",fsop.path)); + break; +case 'chmod': + var permissions, ownerPerm = 0, groupPerm = 0, othersPerm = 0, dirFiles = fsop.dirfiles; -if(fsop){ - if(fsop.oread){ -ownerPerm = 1; - } - if(fsop.owrite){ -ownerPerm = ownerPerm + 2; - } - if(fsop.oexecute){ -ownerPerm = ownerPerm + 4; - } - if(fsop.gread){ -groupPerm = 1; - } - if(fsop.gwrite){ -groupPerm = groupPerm + 2; + if(fsop){ +if(fsop.oread){ + ownerPerm = 1; +} +if(fsop.owrite){ + ownerPerm = ownerPerm + 2; +} +if(fsop.oexecute){ + ownerPerm = ownerPerm + 4; +} +if(fsop.gread){ + groupPerm = 1; +} +if(fsop.gwrite){ + groupPerm = groupPerm + 2; +} +if(fsop.gexecute){ + groupPerm = groupPerm + 4; +} +if(fsop.rread){ + othersPerm = 1; +} +if(fsop.rwrite){ + othersPerm = othersPerm + 2; +} +if(fsop.rexecute){ + othersPerm = othersPerm + 4; +} } - if(fsop.gexecute){ -groupPerm = groupPerm + 4; + permissions =
ambari git commit: AMBARI-20296. Workflow Manger support for pointing to kill node in decision editor.(Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 e152b3f43 -> 4e81cc733 AMBARI-20296. Workflow Manger support for pointing to kill node in decision editor.(Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4e81cc73 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4e81cc73 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4e81cc73 Branch: refs/heads/branch-2.5 Commit: 4e81cc733e0fda6e696cec08c00b79ccf777bc93 Parents: e152b3f Author: Gaurav NagarAuthored: Fri Mar 3 21:02:56 2017 +0530 Committer: Gaurav Nagar Committed: Fri Mar 3 21:03:45 2017 +0530 -- .../ui/app/components/decision-add-branch.js| 5 ++- .../ui/app/components/decision-config.js| 10 - .../ui/app/components/flow-designer.js | 33 +-- .../ui/app/components/transition-config.js | 3 ++ .../ui/app/components/workflow-action-editor.js | 35 +--- .../ui/app/domain/cytoscape-flow-renderer.js| 7 +++- .../src/main/resources/ui/app/domain/node.js| 7 +++- .../main/resources/ui/app/domain/workflow.js| 2 +- .../templates/components/decision-config.hbs| 8 +++- .../app/templates/components/flow-designer.hbs | 4 +- .../templates/components/transition-config.hbs | 5 +++ .../components/workflow-action-editor.hbs | 2 +- .../resources/ui/app/validators/workflow-dag.js | 43 13 files changed, 126 insertions(+), 38 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4e81cc73/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-add-branch.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-add-branch.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-add-branch.js index 41bb1e5..4066c79 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-add-branch.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-add-branch.js @@ -55,7 +55,8 @@ export default Ember.Component.extend(Validations, FindNodeMixin,{ self.set("isInsertAction",false); this.set("newNodeType",null); this.get('flowRenderer').populateOkToandErrorTONodes(node); -var descendantNodes= this.get('node.validOkToNodes'); +var descendantNodes= Ember.A([]); +descendantNodes.pushObjects(this.get('node.validOkToNodes')); this.set('descendantNodes',descendantNodes); self.$("#selector-content").show(); } @@ -69,7 +70,7 @@ export default Ember.Component.extend(Validations, FindNodeMixin,{ this.set("newNodeType",type); }, onTargetNodeChange(value){ - var node = this.get('descendantNodes').findBy('id',value); + var node = this.get('descendantNodes').findBy('id',value) || this.get('killNodes').findBy('id',value); this.set('targetNode', node); }, save(){ http://git-wip-us.apache.org/repos/asf/ambari/blob/4e81cc73/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-config.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-config.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-config.js index 419be37..0df3f96 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-config.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-config.js @@ -32,6 +32,14 @@ export default Ember.Component.extend(Validations,{ initialize : function(){ this.sendAction('register','decision',this); this.set('targetNodes', Ember.A([])); + this.get('targetNodes').pushObjects(this.get('currentNode.validOkToNodes')); this.get('targetNodes').pushObjects(this.get('killNodes')); - }.on('init') + }.on('init'), + actions : { +onTargetNodeChange(index){ + var node = this.get('targetNodes').findBy('id', this.$(`#target-node-select-${index}`).find(":selected").val()); + var config = this.get('actionModel').objectAt(index); + Ember.set(config, 'node', node); +} + } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/4e81cc73/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js index 2f8455f..6af82ba 100644 ---
ambari git commit: AMBARI-20296. Workflow Manger support for pointing to kill node in decision editor.(Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk 1766ebfc4 -> f7472a09a AMBARI-20296. Workflow Manger support for pointing to kill node in decision editor.(Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f7472a09 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f7472a09 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f7472a09 Branch: refs/heads/trunk Commit: f7472a09a650c76ea84c4e98492e7aa081887443 Parents: 1766ebf Author: Gaurav NagarAuthored: Fri Mar 3 21:02:56 2017 +0530 Committer: Gaurav Nagar Committed: Fri Mar 3 21:02:56 2017 +0530 -- .../ui/app/components/decision-add-branch.js| 5 ++- .../ui/app/components/decision-config.js| 10 - .../ui/app/components/flow-designer.js | 33 +-- .../ui/app/components/transition-config.js | 3 ++ .../ui/app/components/workflow-action-editor.js | 35 +--- .../ui/app/domain/cytoscape-flow-renderer.js| 7 +++- .../src/main/resources/ui/app/domain/node.js| 7 +++- .../main/resources/ui/app/domain/workflow.js| 2 +- .../templates/components/decision-config.hbs| 8 +++- .../app/templates/components/flow-designer.hbs | 4 +- .../templates/components/transition-config.hbs | 5 +++ .../components/workflow-action-editor.hbs | 2 +- .../resources/ui/app/validators/workflow-dag.js | 43 13 files changed, 126 insertions(+), 38 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f7472a09/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-add-branch.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-add-branch.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-add-branch.js index 41bb1e5..4066c79 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-add-branch.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-add-branch.js @@ -55,7 +55,8 @@ export default Ember.Component.extend(Validations, FindNodeMixin,{ self.set("isInsertAction",false); this.set("newNodeType",null); this.get('flowRenderer').populateOkToandErrorTONodes(node); -var descendantNodes= this.get('node.validOkToNodes'); +var descendantNodes= Ember.A([]); +descendantNodes.pushObjects(this.get('node.validOkToNodes')); this.set('descendantNodes',descendantNodes); self.$("#selector-content").show(); } @@ -69,7 +70,7 @@ export default Ember.Component.extend(Validations, FindNodeMixin,{ this.set("newNodeType",type); }, onTargetNodeChange(value){ - var node = this.get('descendantNodes').findBy('id',value); + var node = this.get('descendantNodes').findBy('id',value) || this.get('killNodes').findBy('id',value); this.set('targetNode', node); }, save(){ http://git-wip-us.apache.org/repos/asf/ambari/blob/f7472a09/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-config.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-config.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-config.js index 419be37..0df3f96 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-config.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-config.js @@ -32,6 +32,14 @@ export default Ember.Component.extend(Validations,{ initialize : function(){ this.sendAction('register','decision',this); this.set('targetNodes', Ember.A([])); + this.get('targetNodes').pushObjects(this.get('currentNode.validOkToNodes')); this.get('targetNodes').pushObjects(this.get('killNodes')); - }.on('init') + }.on('init'), + actions : { +onTargetNodeChange(index){ + var node = this.get('targetNodes').findBy('id', this.$(`#target-node-select-${index}`).find(":selected").val()); + var config = this.get('actionModel').objectAt(index); + Ember.set(config, 'node', node); +} + } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/f7472a09/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js index 2f8455f..6af82ba 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js +++
ambari git commit: AMBARI-20247. Show full error while importing the workflow from encrypted file. (Madan Mohan Reddy via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 105de909d -> e152b3f43 AMBARI-20247. Show full error while importing the workflow from encrypted file. (Madan Mohan Reddy via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e152b3f4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e152b3f4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e152b3f4 Branch: refs/heads/branch-2.5 Commit: e152b3f43fad72ab561a16d878e24b0d2e909cc1 Parents: 105de90 Author: Gaurav NagarAuthored: Fri Mar 3 20:58:43 2017 +0530 Committer: Gaurav Nagar Committed: Fri Mar 3 20:58:58 2017 +0530 -- .../ambari/view/OozieProxyImpersonator.java | 26 ++--- .../oozie/ambari/view/assets/AssetResource.java | 41 +--- .../ambari/view/exception/WfmWebException.java | 12 +- .../WorkflowsManagerResource.java | 11 +- 4 files changed, 67 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e152b3f4/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java -- diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java index c4e5bbd..9bf2f90 100644 --- a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java +++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java @@ -120,8 +120,9 @@ public class OozieProxyImpersonator { try { hdfsFileUtils.hdfsCheck(); return Response.ok().build(); -}catch (Exception e){ - throw new WfmWebException(e); +}catch (Exception ex){ + LOGGER.error(ex.getMessage(),ex); + throw new WfmWebException(ex); } } @@ -131,8 +132,9 @@ public class OozieProxyImpersonator { try{ hdfsFileUtils.homeDirCheck(); return Response.ok().build(); -}catch (Exception e){ - throw new WfmWebException(e); +}catch (Exception ex){ + LOGGER.error(ex.getMessage(),ex); + throw new WfmWebException(ex); } } @@ -203,10 +205,13 @@ public class OozieProxyImpersonator { appPath, ui.getQueryParameters(), jobType); return Response.status(Status.OK).entity(response).build(); } catch (WfmWebException ex) { + LOGGER.error(ex.getMessage(),ex); throw ex; } catch(WfmException ex){ + LOGGER.error(ex.getMessage(),ex); throw new WfmWebException(ex,ex.getErrorCode()); } catch(Exception ex) { + LOGGER.error(ex.getMessage(),ex); throw new WfmWebException(ex); } } @@ -241,9 +246,11 @@ public class OozieProxyImpersonator { viewContext.getUsername(), getWorkflowName(postBody)); } } catch (WfmWebException ex) { + LOGGER.error(ex.getMessage(),ex); throw ex; } catch (Exception ex) { - throw new WfmWebException(ex); + LOGGER.error(ex.getMessage(),ex); + throw new WfmWebException(ex); } return Response.ok().build(); } @@ -298,8 +305,10 @@ public class OozieProxyImpersonator { } return saveAsset(postBody, uploadPath, overwrite); } catch (WfmWebException ex) { + LOGGER.error(ex.getMessage(),ex); throw ex; } catch (Exception ex) { + LOGGER.error(ex.getMessage(),ex); throw new WfmWebException(ex); } } @@ -337,6 +346,7 @@ public class OozieProxyImpersonator { }; return Response.ok(streamer).status(200).build(); } catch (IOException ex) { + LOGGER.error(ex.getMessage(),ex); throw new WfmWebException(ex); } } @@ -360,6 +370,7 @@ public class OozieProxyImpersonator { }; return Response.ok(streamer).status(200).build(); } catch (IOException ex) { + LOGGER.error(ex.getMessage(),ex); throw new WfmWebException(ex); } } @@ -372,6 +383,7 @@ public class OozieProxyImpersonator { workflowFilesService.discardDraft(workflowPath); return Response.ok().build(); } catch (IOException ex) { + LOGGER.error(ex.getMessage(),ex); throw new WfmWebException(ex); } } @@ -403,8 +415,10 @@ public class OozieProxyImpersonator { return getWorkflowResponse(filePath, WorkflowFormat.XML.getValue(), false); } } catch (WfmWebException ex) { + LOGGER.error(ex.getMessage(),ex); throw ex; } catch (Exception ex) { + LOGGER.error(ex.getMessage(),ex); throw new WfmWebException(ex); } } @@ -452,8 +466,10 @@ public class OozieProxyImpersonator {
ambari git commit: AMBARI-20121. Hue Migration Tool: param values getting cached. (Ishan Bhatt via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 7fefbb45a -> b70bc7180 AMBARI-20121. Hue Migration Tool: param values getting cached. (Ishan Bhatt via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b70bc718 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b70bc718 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b70bc718 Branch: refs/heads/branch-2.5 Commit: b70bc7180289e2b5027c283c91c07d69c0881c69 Parents: 7fefbb4 Author: Gaurav NagarAuthored: Fri Mar 3 20:53:52 2017 +0530 Committer: Gaurav Nagar Committed: Fri Mar 3 20:54:28 2017 +0530 -- .../app/routes/home-page/hive-history.js | 15 ++- .../app/routes/home-page/hive-saved-query.js | 14 ++ .../app/routes/home-page/pig-job.js | 15 ++- .../app/routes/home-page/pig-script.js | 14 ++ .../app/routes/home-page/pig-udf.js | 15 ++- .../app/templates/home-page/hive-saved-query.hbs | 2 +- .../app/templates/home-page/pig-job.hbs | 2 +- .../app/templates/home-page/pig-script.hbs | 2 +- .../app/templates/home-page/pig-udf.hbs | 2 +- 9 files changed, 74 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b70bc718/contrib/views/hueambarimigration/src/main/resources/ui/hueambarimigration-view/app/routes/home-page/hive-history.js -- diff --git a/contrib/views/hueambarimigration/src/main/resources/ui/hueambarimigration-view/app/routes/home-page/hive-history.js b/contrib/views/hueambarimigration/src/main/resources/ui/hueambarimigration-view/app/routes/home-page/hive-history.js index 746049d..a2cac91 100644 --- a/contrib/views/hueambarimigration/src/main/resources/ui/hueambarimigration-view/app/routes/home-page/hive-history.js +++ b/contrib/views/hueambarimigration/src/main/resources/ui/hueambarimigration-view/app/routes/home-page/hive-history.js @@ -21,6 +21,20 @@ import Ember from 'ember'; export default Ember.Route.extend({ + resetController: function(controller, isExiting, transition) { +if (isExiting) { + this.usernames = []; + this.controller.set('username', null); + this.controller.set('instancename', null); + this.controller.set('startdate', null); + this.controller.set('enddate', null); + this.controller.set('jobstatus', null); + this.controller.set('progressBar', null); + this.controller.set('completionStatus', null); + this.controller.set('error', null); +} + }, + usernames: [], model: function() { @@ -29,7 +43,6 @@ export default Ember.Route.extend({ usersdetail: store.findAll('usersdetail'), hiveinstancedetail: store.findAll('hiveinstancedetail'), selections: [] - }); }, http://git-wip-us.apache.org/repos/asf/ambari/blob/b70bc718/contrib/views/hueambarimigration/src/main/resources/ui/hueambarimigration-view/app/routes/home-page/hive-saved-query.js -- diff --git a/contrib/views/hueambarimigration/src/main/resources/ui/hueambarimigration-view/app/routes/home-page/hive-saved-query.js b/contrib/views/hueambarimigration/src/main/resources/ui/hueambarimigration-view/app/routes/home-page/hive-saved-query.js index 43653e7..d4e2ef3 100644 --- a/contrib/views/hueambarimigration/src/main/resources/ui/hueambarimigration-view/app/routes/home-page/hive-saved-query.js +++ b/contrib/views/hueambarimigration/src/main/resources/ui/hueambarimigration-view/app/routes/home-page/hive-saved-query.js @@ -19,6 +19,20 @@ import Ember from 'ember'; export default Ember.Route.extend({ + resetController: function(controller, isExiting, transition) { +if (isExiting) { + this.usernames = []; + this.controller.set('username', null); + this.controller.set('instancename', null); + this.controller.set('startdate', null); + this.controller.set('enddate', null); + this.controller.set('jobstatus', null); + this.controller.set('progressBar', null); + this.controller.set('completionStatus', null); + this.controller.set('error', null); +} + }, + usernames: [], model: function() { http://git-wip-us.apache.org/repos/asf/ambari/blob/b70bc718/contrib/views/hueambarimigration/src/main/resources/ui/hueambarimigration-view/app/routes/home-page/pig-job.js -- diff --git a/contrib/views/hueambarimigration/src/main/resources/ui/hueambarimigration-view/app/routes/home-page/pig-job.js
ambari git commit: AMBARI-20299. The Migrated Query Status UNKNOWN is to be replaced by original status as per hue query execution(Ishan Bhatt via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk d51150d02 -> 4d92ae8c5 AMBARI-20299. The Migrated Query Status UNKNOWN is to be replaced by original status as per hue query execution(Ishan Bhatt via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4d92ae8c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4d92ae8c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4d92ae8c Branch: refs/heads/trunk Commit: 4d92ae8c5e6b9a0876fa9fe2c7210d65f9fee264 Parents: d51150d Author: Gaurav NagarAuthored: Fri Mar 3 20:51:30 2017 +0530 Committer: Gaurav Nagar Committed: Fri Mar 3 20:52:11 2017 +0530 -- .../historyqueryset/MysqlQuerySetAmbariDB.java | 4 +-- .../historyqueryset/OracleQuerySetAmbariDB.java | 4 +-- .../hive/historyqueryset/QuerySetAmbariDB.java | 14 + .../historyqueryset/OracleQuerySetHueDB.java| 16 +- .../hive/historyqueryset/QuerySetHueDB.java | 16 +- .../HiveHistoryMigrationUtility.java| 2 +- ...HiveHistoryQueryMigrationImplementation.java | 10 +++--- .../resources/scripts/models/HiveModel.java | 33 8 files changed, 68 insertions(+), 31 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4d92ae8c/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/MysqlQuerySetAmbariDB.java -- diff --git a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/MysqlQuerySetAmbariDB.java b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/MysqlQuerySetAmbariDB.java index 4c6bffa..d99d799 100644 --- a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/MysqlQuerySetAmbariDB.java +++ b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/MysqlQuerySetAmbariDB.java @@ -34,11 +34,11 @@ public class MysqlQuerySetAmbariDB extends QuerySetAmbariDB { } @Override protected String getSqlInsertHiveHistoryForHive(int id) { -return "INSERT INTO DS_JOBIMPL_" + id + " values (?,'','','','','default',?,0,'','','',?,?,?,'','job','','','UNKNOWN',?,'','Worksheet');"; +return "INSERT INTO DS_JOBIMPL_" + id + " values (?,'','','','','default',?,0,'','','',?,?,?,'','job','','',?,?,'','Worksheet');"; } @Override protected String getSqlInsertHiveHistoryForHiveNext(int id) { -return "INSERT INTO DS_JOBIMPL_" + id + " values (?,'','','','','default',?,0,'','','','',?,?,?,'','job','','','UNKNOWN',?,'','Worksheet');"; +return "INSERT INTO DS_JOBIMPL_" + id + " values (?,'','','','','default',?,0,'','','','',?,?,?,'','job','','',?,?,'','Worksheet');"; } @Override http://git-wip-us.apache.org/repos/asf/ambari/blob/4d92ae8c/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/OracleQuerySetAmbariDB.java -- diff --git a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/OracleQuerySetAmbariDB.java b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/OracleQuerySetAmbariDB.java index eaf8c10..05435aa 100644 --- a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/OracleQuerySetAmbariDB.java +++ b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/OracleQuerySetAmbariDB.java @@ -40,11 +40,11 @@ public class OracleQuerySetAmbariDB extends QuerySetAmbariDB { @Override protected String getSqlInsertHiveHistoryForHive(int id) { -return "INSERT INTO ds_jobimpl_" + id + " values (?,'','','','','default',?,0,'','','',?,?,?,'','job','','','UNKNOWN',?,'','Worksheet')"; +return "INSERT INTO ds_jobimpl_" + id + " values (?,'','','','','default',?,0,'','','',?,?,?,'','job','','',?,?,'','Worksheet')"; } @Override protected String getSqlInsertHiveHistoryForHiveNext(int id) { -return "INSERT INTO ds_jobimpl_" + id + " values
ambari git commit: AMBARI-20299. The Migrated Query Status UNKNOWN is to be replaced by original status as per hue query execution(Ishan Bhatt via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 d485a0a19 -> 7fefbb45a AMBARI-20299. The Migrated Query Status UNKNOWN is to be replaced by original status as per hue query execution(Ishan Bhatt via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7fefbb45 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7fefbb45 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7fefbb45 Branch: refs/heads/branch-2.5 Commit: 7fefbb45af8e50a2a1cbd3173951384ecee8d69a Parents: d485a0a Author: Gaurav NagarAuthored: Fri Mar 3 20:51:30 2017 +0530 Committer: Gaurav Nagar Committed: Fri Mar 3 20:51:30 2017 +0530 -- .../historyqueryset/MysqlQuerySetAmbariDB.java | 4 +-- .../historyqueryset/OracleQuerySetAmbariDB.java | 4 +-- .../hive/historyqueryset/QuerySetAmbariDB.java | 14 + .../historyqueryset/OracleQuerySetHueDB.java| 16 +- .../hive/historyqueryset/QuerySetHueDB.java | 16 +- .../HiveHistoryMigrationUtility.java| 2 +- ...HiveHistoryQueryMigrationImplementation.java | 10 +++--- .../resources/scripts/models/HiveModel.java | 33 8 files changed, 68 insertions(+), 31 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7fefbb45/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/MysqlQuerySetAmbariDB.java -- diff --git a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/MysqlQuerySetAmbariDB.java b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/MysqlQuerySetAmbariDB.java index 4c6bffa..d99d799 100644 --- a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/MysqlQuerySetAmbariDB.java +++ b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/MysqlQuerySetAmbariDB.java @@ -34,11 +34,11 @@ public class MysqlQuerySetAmbariDB extends QuerySetAmbariDB { } @Override protected String getSqlInsertHiveHistoryForHive(int id) { -return "INSERT INTO DS_JOBIMPL_" + id + " values (?,'','','','','default',?,0,'','','',?,?,?,'','job','','','UNKNOWN',?,'','Worksheet');"; +return "INSERT INTO DS_JOBIMPL_" + id + " values (?,'','','','','default',?,0,'','','',?,?,?,'','job','','',?,?,'','Worksheet');"; } @Override protected String getSqlInsertHiveHistoryForHiveNext(int id) { -return "INSERT INTO DS_JOBIMPL_" + id + " values (?,'','','','','default',?,0,'','','','',?,?,?,'','job','','','UNKNOWN',?,'','Worksheet');"; +return "INSERT INTO DS_JOBIMPL_" + id + " values (?,'','','','','default',?,0,'','','','',?,?,?,'','job','','',?,?,'','Worksheet');"; } @Override http://git-wip-us.apache.org/repos/asf/ambari/blob/7fefbb45/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/OracleQuerySetAmbariDB.java -- diff --git a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/OracleQuerySetAmbariDB.java b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/OracleQuerySetAmbariDB.java index eaf8c10..05435aa 100644 --- a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/OracleQuerySetAmbariDB.java +++ b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/OracleQuerySetAmbariDB.java @@ -40,11 +40,11 @@ public class OracleQuerySetAmbariDB extends QuerySetAmbariDB { @Override protected String getSqlInsertHiveHistoryForHive(int id) { -return "INSERT INTO ds_jobimpl_" + id + " values (?,'','','','','default',?,0,'','','',?,?,?,'','job','','','UNKNOWN',?,'','Worksheet')"; +return "INSERT INTO ds_jobimpl_" + id + " values (?,'','','','','default',?,0,'','','',?,?,?,'','job','','',?,?,'','Worksheet')"; } @Override protected String getSqlInsertHiveHistoryForHiveNext(int id) { -return "INSERT INTO ds_jobimpl_" + id + " values
ambari git commit: AMBARI-20266. Duplicate node error is shown if kill node transition exists from decision node in WFM.(Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 bbd9948fe -> 4d4362668 AMBARI-20266. Duplicate node error is shown if kill node transition exists from decision node in WFM.(Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4d436266 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4d436266 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4d436266 Branch: refs/heads/branch-2.5 Commit: 4d43626687df5ae0525e75013572443917ee7572 Parents: bbd9948 Author: Gaurav NagarAuthored: Thu Mar 2 19:25:53 2017 +0530 Committer: Gaurav Nagar Committed: Thu Mar 2 19:26:35 2017 +0530 -- .../main/resources/ui/app/validators/duplicate-data-node-name.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4d436266/contrib/views/wfmanager/src/main/resources/ui/app/validators/duplicate-data-node-name.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/validators/duplicate-data-node-name.js b/contrib/views/wfmanager/src/main/resources/ui/app/validators/duplicate-data-node-name.js index 7336d6e..86da02b 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/validators/duplicate-data-node-name.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/validators/duplicate-data-node-name.js @@ -29,7 +29,7 @@ const DuplicateDataNodeName = BaseValidator.extend({ return "Node name should not be blank"; } Ember.set(item.data.node, "errors", false); - if(nodeNames.get(item.data.node.name)){ + if(nodeNames.get(item.data.node.name) && item.data.node.type !== 'kill'){ Ember.set(item.data.node, "errors", true); return `${item.data.node.name} : Node name should be unique`; }else{
ambari git commit: AMBARI-20266. Duplicate node error is shown if kill node transition exists from decision node in WFM.(Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk ac323d0dc -> 453a594f0 AMBARI-20266. Duplicate node error is shown if kill node transition exists from decision node in WFM.(Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/453a594f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/453a594f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/453a594f Branch: refs/heads/trunk Commit: 453a594f0140e62dee338ad87bce3e81ba25c8bf Parents: ac323d0 Author: Gaurav NagarAuthored: Thu Mar 2 19:25:53 2017 +0530 Committer: Gaurav Nagar Committed: Thu Mar 2 19:25:53 2017 +0530 -- .../main/resources/ui/app/validators/duplicate-data-node-name.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/453a594f/contrib/views/wfmanager/src/main/resources/ui/app/validators/duplicate-data-node-name.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/validators/duplicate-data-node-name.js b/contrib/views/wfmanager/src/main/resources/ui/app/validators/duplicate-data-node-name.js index 7336d6e..86da02b 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/validators/duplicate-data-node-name.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/validators/duplicate-data-node-name.js @@ -29,7 +29,7 @@ const DuplicateDataNodeName = BaseValidator.extend({ return "Node name should not be blank"; } Ember.set(item.data.node, "errors", false); - if(nodeNames.get(item.data.node.name)){ + if(nodeNames.get(item.data.node.name) && item.data.node.type !== 'kill'){ Ember.set(item.data.node, "errors", true); return `${item.data.node.name} : Node name should be unique`; }else{
ambari git commit: AMBARI-20268. WFM generates duplicate kill nodes in XML if decision paths have multiple transition to kill node.(Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk 7cf7fcf55 -> ac323d0dc AMBARI-20268. WFM generates duplicate kill nodes in XML if decision paths have multiple transition to kill node.(Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ac323d0d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ac323d0d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ac323d0d Branch: refs/heads/trunk Commit: ac323d0dc742cf5b0abd60ab3d66a8cab29d848e Parents: 7cf7fcf Author: Gaurav NagarAuthored: Thu Mar 2 19:23:48 2017 +0530 Committer: Gaurav Nagar Committed: Thu Mar 2 19:24:44 2017 +0530 -- .../src/main/resources/ui/app/domain/workflow-xml-generator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ac323d0d/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-xml-generator.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-xml-generator.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-xml-generator.js index eb8534b..7223581 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-xml-generator.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-xml-generator.js @@ -98,10 +98,10 @@ var WorkflowGenerator= Ember.Object.extend({ if (!visitedNodes){ visitedNodes=[]; } -if (visitedNodes.contains(node.get("id"))){ +if (visitedNodes.contains(node.get("name"))){ return; } -visitedNodes.push(node.get("id")); +visitedNodes.push(node.get("name")); var self=this; var workflowApp=workflowObj["workflow-app"]; if (node.isPlaceholder()){
ambari git commit: AMBARI-20268. WFM generates duplicate kill nodes in XML if decision paths have multiple transition to kill node.(Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 eb8526d5f -> bbd9948fe AMBARI-20268. WFM generates duplicate kill nodes in XML if decision paths have multiple transition to kill node.(Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bbd9948f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bbd9948f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bbd9948f Branch: refs/heads/branch-2.5 Commit: bbd9948fe8234039b5c1d49f018cec13388405b2 Parents: eb8526d Author: Gaurav NagarAuthored: Thu Mar 2 19:23:48 2017 +0530 Committer: Gaurav Nagar Committed: Thu Mar 2 19:23:48 2017 +0530 -- .../src/main/resources/ui/app/domain/workflow-xml-generator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/bbd9948f/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-xml-generator.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-xml-generator.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-xml-generator.js index eb8534b..7223581 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-xml-generator.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-xml-generator.js @@ -98,10 +98,10 @@ var WorkflowGenerator= Ember.Object.extend({ if (!visitedNodes){ visitedNodes=[]; } -if (visitedNodes.contains(node.get("id"))){ +if (visitedNodes.contains(node.get("name"))){ return; } -visitedNodes.push(node.get("id")); +visitedNodes.push(node.get("name")); var self=this; var workflowApp=workflowObj["workflow-app"]; if (node.isPlaceholder()){
ambari git commit: AMBARI-20246.Not able to preview the xml for coordinator. (Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk 99df82fa4 -> f79a48b2e AMBARI-20246.Not able to preview the xml for coordinator. (Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f79a48b2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f79a48b2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f79a48b2 Branch: refs/heads/trunk Commit: f79a48b2e02e4c5bdfb771bb3fbe32b4fc9e82d5 Parents: 99df82f Author: Gaurav NagarAuthored: Wed Mar 1 17:22:16 2017 +0530 Committer: Gaurav Nagar Committed: Wed Mar 1 17:22:16 2017 +0530 -- .../src/main/resources/ui/app/components/coord-config.js | 2 +- .../src/main/resources/ui/app/components/sla-info.js | 11 +++ .../app/domain/coordinator/coordinator-xml-importer.js | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f79a48b2/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js index b5592a6..2d0a23c 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js @@ -220,7 +220,7 @@ export default Ember.Component.extend(Validations, Ember.Evented, { }, timezone : 'UTC', dataInputType : 'simple', - slainfo : SlaInfo.create({}), + slaInfo : SlaInfo.create({}), schemaVersions : { coordinatorVersion : this.get('schemaVersions').getDefaultVersion('coordinator') }, http://git-wip-us.apache.org/repos/asf/ambari/blob/f79a48b2/contrib/views/wfmanager/src/main/resources/ui/app/components/sla-info.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/sla-info.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/sla-info.js index be5d6f9..b9b594a 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/sla-info.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/sla-info.js @@ -19,6 +19,17 @@ import { validator, buildValidations } from 'ember-cp-validations'; import { v1, v4 } from "ember-uuid"; const Validations = buildValidations({ + 'slaInfo.nominalTime.value': { + validators: [ + validator('presence', { + presence : true, + disabled(model, attribute) { + return !model.get('slaEnabled'); + }, + dependentKeys : ['slaEnabled'] + }) + ] + }, 'slaInfo.shouldEnd.time': { validators: [ validator('presence', { http://git-wip-us.apache.org/repos/asf/ambari/blob/f79a48b2/contrib/views/wfmanager/src/main/resources/ui/app/domain/coordinator/coordinator-xml-importer.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/coordinator/coordinator-xml-importer.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/coordinator/coordinator-xml-importer.js index 5101181..12d923c 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/coordinator/coordinator-xml-importer.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/coordinator/coordinator-xml-importer.js @@ -63,7 +63,7 @@ var CoordinatorXmlImporter= Ember.Object.extend({ }, timezone : 'UTC', dataInputType : 'simple', - slainfo : SlaInfo.create({}), + slaInfo : SlaInfo.create({}), schemaVersions : { coordinatorVersion : this.get('schemaVersions').getDefaultVersion('coordinator') }
ambari git commit: AMBARI-20206.Workflow manager is allowing to have empty action node.(Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 ab34af591 -> 75bd3d4ab AMBARI-20206.Workflow manager is allowing to have empty action node.(Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/75bd3d4a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/75bd3d4a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/75bd3d4a Branch: refs/heads/branch-2.5 Commit: 75bd3d4ab2fb60b828510bb597901b98441d3e43 Parents: ab34af5 Author: Gaurav NagarAuthored: Wed Mar 1 17:19:11 2017 +0530 Committer: Gaurav Nagar Committed: Wed Mar 1 17:19:11 2017 +0530 -- .../ui/app/components/flow-designer.js | 37 ++-- .../src/main/resources/ui/app/routes/index.js | 7 .../templates/components/designer-errors.hbs| 2 +- .../main/resources/ui/app/templates/index.hbs | 5 ++- .../app/validators/duplicate-data-node-name.js | 20 +-- .../app/validators/duplicate-kill-node-name.js | 28 ++- 6 files changed, 59 insertions(+), 40 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/75bd3d4a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js index 2d326d1..2f8455f 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js @@ -44,13 +44,6 @@ const Validations = buildValidations({ dependentKeys: ['workflow.killnod...@each.name'] }) ] - }, - 'flattenedNodes': { -validators: [ - validator('duplicate-flattened-node-name', { -dependentKeys: ['flattenednod...@each.name'] - }) -] } }); @@ -88,7 +81,23 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { parameters : {}, clonedDomain : {}, clonedErrorNode : {}, - validationErrors : [], + validationErrors : Ember.computed('validations.attrs.dataNodes.message', 'validations.attrs.workflow.killNodes.message', { +get(key){ + var errors = []; + if(this.get('validations.attrs.dataNodes.message')){ +errors.pushObject({message : this.get('validations.attrs.dataNodes.message')}); + } + if(this.get('validations.attrs.workflow.killNodes.message')){ +errors.pushObject(this.get('validations.attrs.dataNodes.message')); + } + return errors; +}, +set(key, value){ + if(!value){ +this.set(key, Ember.A([])); + } +} + }), showingFileBrowser : false, killNode : {}, isWorkflowImporting: false, @@ -112,6 +121,8 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { this.set('flowRenderer',CytoscapeRenderer.create()); this.set('workflow',Workflow.create({})); CommonUtils.setTestContext(this); +this.set('dataNodes', Ember.A([])); +this.set('validationErrors', Ember.A([])); }.on('init'), elementsInserted :function(){ this.setConentWidth(); @@ -830,9 +841,9 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { createKillNode(killNode){ this.set("killNode", killNode); this.set("createKillnodeError",null); - var existingKillNode=this.get('workflow').get("killNodes").findBy("name",this.get('killNode.name')); + var existingKillNode= this.get('workflow').get("killNodes").findBy("name",this.get('killNode.name')) || this.get('dataNodes').findBy("dataNodeName", this.get('killNode.name')); if (existingKillNode){ -this.set("createKillnodeError","The kill node already exists"); +this.set("createKillnodeError","Node with same name already exists"); return; } if (Ember.isBlank(this.get('killNode.name'))){ @@ -919,6 +930,9 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { }, this); }, submitWorkflow(){ + if(this.get('validationErrors') && this.get('validationErrors').length > 0){ +return; + } this.set('dryrun', false); this.openJobConfig(); }, @@ -926,6 +940,9 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { this.openSaveWorkflow(); }, previewWorkflow(){ + if(this.get('validationErrors') && this.get('validationErrors').length > 0){ +return; + } this.set("showingPreview",false); this.get('workflowContext').clearErrors(); var workflowGenerator=WorkflowGenerator.create({workflow:this.get("workflow"),
ambari git commit: AMBARI-20131.Workflow details are lost upon refreshing the browser.(Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 20cef01cd -> ab34af591 AMBARI-20131.Workflow details are lost upon refreshing the browser.(Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ab34af59 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ab34af59 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ab34af59 Branch: refs/heads/branch-2.5 Commit: ab34af591e8c8ac27379829e0c26e75e5fd69273 Parents: 20cef01 Author: Gaurav NagarAuthored: Wed Mar 1 17:17:09 2017 +0530 Committer: Gaurav Nagar Committed: Wed Mar 1 17:17:47 2017 +0530 -- .../ui/app/components/designer-workspace.js | 48 .../ui/app/domain/workflow-json-importer.js | 5 ++ .../main/resources/ui/app/domain/workflow.js| 2 +- .../main/resources/ui/app/services/user-info.js | 2 +- .../ui/app/services/workspace-manager.js| 17 --- 5 files changed, 43 insertions(+), 31 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ab34af59/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js index 74de3b7..0e49d70 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js @@ -32,10 +32,10 @@ export default Ember.Component.extend({ currentIndex : Ember.computed('tabs.[]', function() { return this.get('tabs').length > 0 ? this.get('tabs').length - 1 : 0; }), - tabsObserver : Ember.observer('tabs.[]', 'ta...@each.name', 'tabs.@each.filePath', function(){ + tabsObserver : function(){ this.get('workspaceManager').saveTabs(this.get('tabs')); this.tabManager(); - }), + }, initialize : function(){ if (Constants.isProjectManagerEnabled) { this.set("isProjectManagerEnabled", "true"); @@ -47,24 +47,29 @@ export default Ember.Component.extend({ this.get('tabCounter').set('bundle', 0); var tabsData = this.get('workspaceManager').restoreTabs(); tabsData.promise.then(function(tabs){ -if(tabs){ - this.set('tabs', tabs); -} -this.get('tabs').forEach((tab)=>{ - this.get('tabCounter').set(tab.type, (this.get('tabCounter').get(tab.type)) + 1); -}, this); -Ember.getOwner(this).lookup('route:design').on('openNewTab', function(path, type, isImportedFromDesigner, configuration){ - if(type === 'COORDINATOR'){ -this.createNewTab('coord', path); - }else if(type === 'BUNDLE'){ -this.createNewTab('bundle', path); - }else{ -this.createNewTab('wf', path, isImportedFromDesigner, configuration); - } -}.bind(this)); - - }.bind(this)).catch(function(data){ - }); + if(tabs){ +this.set('tabs', tabs); + } + this.get('tabs').forEach((tab)=>{ +this.get('tabCounter').set(tab.type, (this.get('tabCounter').get(tab.type)) + 1); + }, this); + Ember.addObserver(this, 'tabs.[]',this, this.tabsObserver); + Ember.addObserver(this, 'ta...@each.name',this, this.tabsObserver); + Ember.addObserver(this, 'tabs.@each.filePath',this, this.tabsObserver); +}.bind(this)).catch(function(data){ + Ember.addObserver(this, 'tabs.[]',this, this.tabsObserver); + Ember.addObserver(this, 'ta...@each.name',this, this.tabsObserver); + Ember.addObserver(this, 'tabs.@each.filePath',this, this.tabsObserver); +}); +Ember.getOwner(this).lookup('route:design').on('openNewTab', function(path, type, isImportedFromDesigner, configuration){ + if(type === 'COORDINATOR'){ +this.createNewTab('coord', path); + }else if(type === 'BUNDLE'){ +this.createNewTab('bundle', path); + }else{ +this.createNewTab('wf', path, isImportedFromDesigner, configuration); + } +}.bind(this)); }.on('init'), elementsInserted : function(){ this.tabManager(); @@ -84,6 +89,9 @@ export default Ember.Component.extend({ } }.on('didInsertElement'), onDestroy : function(){ +Ember.removeObserver(this, 'tabs.[]',this, this.tabsObserver); +Ember.removeObserver(this, 'ta...@each.name',this, this.tabsObserver); +Ember.removeObserver(this, 'tabs.@each.filePath',this, this.tabsObserver); this.get('tabs').clear(); }.on('willDestroyElement'), tabManager(){
ambari git commit: AMBARI-20131.Workflow details are lost upon refreshing the browser.(Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk bcbc597b7 -> 0e3ced141 AMBARI-20131.Workflow details are lost upon refreshing the browser.(Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0e3ced14 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0e3ced14 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0e3ced14 Branch: refs/heads/trunk Commit: 0e3ced141ff9969d0da33c53827b72cfff543f65 Parents: bcbc597 Author: Gaurav NagarAuthored: Wed Mar 1 17:17:09 2017 +0530 Committer: Gaurav Nagar Committed: Wed Mar 1 17:17:09 2017 +0530 -- .../ui/app/components/designer-workspace.js | 48 .../ui/app/domain/workflow-json-importer.js | 5 ++ .../main/resources/ui/app/domain/workflow.js| 2 +- .../main/resources/ui/app/services/user-info.js | 2 +- .../ui/app/services/workspace-manager.js| 17 --- 5 files changed, 43 insertions(+), 31 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0e3ced14/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js index 74de3b7..0e49d70 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js @@ -32,10 +32,10 @@ export default Ember.Component.extend({ currentIndex : Ember.computed('tabs.[]', function() { return this.get('tabs').length > 0 ? this.get('tabs').length - 1 : 0; }), - tabsObserver : Ember.observer('tabs.[]', 'ta...@each.name', 'tabs.@each.filePath', function(){ + tabsObserver : function(){ this.get('workspaceManager').saveTabs(this.get('tabs')); this.tabManager(); - }), + }, initialize : function(){ if (Constants.isProjectManagerEnabled) { this.set("isProjectManagerEnabled", "true"); @@ -47,24 +47,29 @@ export default Ember.Component.extend({ this.get('tabCounter').set('bundle', 0); var tabsData = this.get('workspaceManager').restoreTabs(); tabsData.promise.then(function(tabs){ -if(tabs){ - this.set('tabs', tabs); -} -this.get('tabs').forEach((tab)=>{ - this.get('tabCounter').set(tab.type, (this.get('tabCounter').get(tab.type)) + 1); -}, this); -Ember.getOwner(this).lookup('route:design').on('openNewTab', function(path, type, isImportedFromDesigner, configuration){ - if(type === 'COORDINATOR'){ -this.createNewTab('coord', path); - }else if(type === 'BUNDLE'){ -this.createNewTab('bundle', path); - }else{ -this.createNewTab('wf', path, isImportedFromDesigner, configuration); - } -}.bind(this)); - - }.bind(this)).catch(function(data){ - }); + if(tabs){ +this.set('tabs', tabs); + } + this.get('tabs').forEach((tab)=>{ +this.get('tabCounter').set(tab.type, (this.get('tabCounter').get(tab.type)) + 1); + }, this); + Ember.addObserver(this, 'tabs.[]',this, this.tabsObserver); + Ember.addObserver(this, 'ta...@each.name',this, this.tabsObserver); + Ember.addObserver(this, 'tabs.@each.filePath',this, this.tabsObserver); +}.bind(this)).catch(function(data){ + Ember.addObserver(this, 'tabs.[]',this, this.tabsObserver); + Ember.addObserver(this, 'ta...@each.name',this, this.tabsObserver); + Ember.addObserver(this, 'tabs.@each.filePath',this, this.tabsObserver); +}); +Ember.getOwner(this).lookup('route:design').on('openNewTab', function(path, type, isImportedFromDesigner, configuration){ + if(type === 'COORDINATOR'){ +this.createNewTab('coord', path); + }else if(type === 'BUNDLE'){ +this.createNewTab('bundle', path); + }else{ +this.createNewTab('wf', path, isImportedFromDesigner, configuration); + } +}.bind(this)); }.on('init'), elementsInserted : function(){ this.tabManager(); @@ -84,6 +89,9 @@ export default Ember.Component.extend({ } }.on('didInsertElement'), onDestroy : function(){ +Ember.removeObserver(this, 'tabs.[]',this, this.tabsObserver); +Ember.removeObserver(this, 'ta...@each.name',this, this.tabsObserver); +Ember.removeObserver(this, 'tabs.@each.filePath',this, this.tabsObserver); this.get('tabs').clear(); }.on('willDestroyElement'), tabManager(){
ambari git commit: AMBARI-20236. HiveView 2.0: save as HDFS shows success message on error. (gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk aaec58b73 -> 728c0daa6 AMBARI-20236. HiveView 2.0: save as HDFS shows success message on error. (gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/728c0daa Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/728c0daa Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/728c0daa Branch: refs/heads/trunk Commit: 728c0daa656a976b9e16985280fb0d822380342e Parents: aaec58b Author: Gaurav NagarAuthored: Wed Mar 1 14:07:38 2017 +0530 Committer: Gaurav Nagar Committed: Wed Mar 1 14:08:21 2017 +0530 -- .../backgroundjobs/BackgroundJobController.java | 45 +++ .../backgroundjobs/BackgroundJobException.java | 30 + .../view/hive2/resources/jobs/JobService.java | 5 ++- .../backgroundjobs/BackgroundJobController.java | 47 .../backgroundjobs/BackgroundJobException.java | 30 + .../view/hive20/resources/jobs/JobService.java | 7 +-- 6 files changed, 143 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/728c0daa/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/backgroundjobs/BackgroundJobController.java -- diff --git a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/backgroundjobs/BackgroundJobController.java b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/backgroundjobs/BackgroundJobController.java index bd3bb23..72fb6b3 100644 --- a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/backgroundjobs/BackgroundJobController.java +++ b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/backgroundjobs/BackgroundJobController.java @@ -37,17 +37,26 @@ public class BackgroundJobController { return viewSingletonObjects.get(context.getInstanceName()); } - private Map jobs = new HashMap (); - public void startJob(String key, Runnable runnable) { + private Map jobs = new HashMap (); + public void startJob(final String key, Runnable runnable) { if (jobs.containsKey(key)) { - interrupt(key); try { -jobs.get(key).join(); +interrupt(key); +jobs.get(key).getJobThread().join(); } catch (InterruptedException ignored) { + } catch (BackgroundJobException e) { } } Thread t = new Thread(runnable); -jobs.put(key, t); +t.setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() { + @Override + public void uncaughtException(Thread t, Throwable e) { +if (e instanceof BackgroundJobException) { + jobs.get(key).setJobException((BackgroundJobException) e); +} + } +}); +jobs.put(key, new BackgroundJob(t)); t.start(); } @@ -56,7 +65,7 @@ public class BackgroundJobController { return Thread.State.TERMINATED; } -Thread.State state = jobs.get(key).getState(); +Thread.State state = jobs.get(key).getJobThread().getState(); if (state == Thread.State.TERMINATED) { jobs.remove(key); @@ -70,7 +79,7 @@ public class BackgroundJobController { return false; } -jobs.get(key).interrupt(); +jobs.get(key).getJobThread().interrupt(); return true; } @@ -79,6 +88,26 @@ public class BackgroundJobController { return true; } -return jobs.get(key).isInterrupted(); +return jobs.get(key).getJobThread().isInterrupted(); } + + class BackgroundJob { + +private Thread jobThread; +private BackgroundJobException jobException; + +public BackgroundJob(Thread jobThread) { + this.jobThread = jobThread; +} + +public Thread getJobThread() { + if(jobException != null) throw jobException; + return jobThread; +} + +public void setJobException(BackgroundJobException exception) { + this.jobException = exception; +} + } + } http://git-wip-us.apache.org/repos/asf/ambari/blob/728c0daa/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/backgroundjobs/BackgroundJobException.java -- diff --git a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/backgroundjobs/BackgroundJobException.java b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/backgroundjobs/BackgroundJobException.java new file mode 100644 index 000..3830dda --- /dev/null +++ b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/backgroundjobs/BackgroundJobException.java @@ -0,0 +1,30 @@ +/** + * Licensed to the Apache Software
ambari git commit: AMBARI-20236. HiveView 2.0: save as HDFS shows success message on error. (gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 01984da60 -> 1df9a82ac AMBARI-20236. HiveView 2.0: save as HDFS shows success message on error. (gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1df9a82a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1df9a82a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1df9a82a Branch: refs/heads/branch-2.5 Commit: 1df9a82acbe25ecd58e2fec83fc33ce8a2f4ccd4 Parents: 01984da Author: Gaurav NagarAuthored: Wed Mar 1 14:07:38 2017 +0530 Committer: Gaurav Nagar Committed: Wed Mar 1 14:07:38 2017 +0530 -- .../backgroundjobs/BackgroundJobController.java | 45 +++ .../backgroundjobs/BackgroundJobException.java | 30 + .../view/hive2/resources/jobs/JobService.java | 5 ++- .../backgroundjobs/BackgroundJobController.java | 47 .../backgroundjobs/BackgroundJobException.java | 30 + .../view/hive20/resources/jobs/JobService.java | 7 +-- 6 files changed, 143 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1df9a82a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/backgroundjobs/BackgroundJobController.java -- diff --git a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/backgroundjobs/BackgroundJobController.java b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/backgroundjobs/BackgroundJobController.java index bd3bb23..72fb6b3 100644 --- a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/backgroundjobs/BackgroundJobController.java +++ b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/backgroundjobs/BackgroundJobController.java @@ -37,17 +37,26 @@ public class BackgroundJobController { return viewSingletonObjects.get(context.getInstanceName()); } - private Map jobs = new HashMap (); - public void startJob(String key, Runnable runnable) { + private Map jobs = new HashMap (); + public void startJob(final String key, Runnable runnable) { if (jobs.containsKey(key)) { - interrupt(key); try { -jobs.get(key).join(); +interrupt(key); +jobs.get(key).getJobThread().join(); } catch (InterruptedException ignored) { + } catch (BackgroundJobException e) { } } Thread t = new Thread(runnable); -jobs.put(key, t); +t.setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() { + @Override + public void uncaughtException(Thread t, Throwable e) { +if (e instanceof BackgroundJobException) { + jobs.get(key).setJobException((BackgroundJobException) e); +} + } +}); +jobs.put(key, new BackgroundJob(t)); t.start(); } @@ -56,7 +65,7 @@ public class BackgroundJobController { return Thread.State.TERMINATED; } -Thread.State state = jobs.get(key).getState(); +Thread.State state = jobs.get(key).getJobThread().getState(); if (state == Thread.State.TERMINATED) { jobs.remove(key); @@ -70,7 +79,7 @@ public class BackgroundJobController { return false; } -jobs.get(key).interrupt(); +jobs.get(key).getJobThread().interrupt(); return true; } @@ -79,6 +88,26 @@ public class BackgroundJobController { return true; } -return jobs.get(key).isInterrupted(); +return jobs.get(key).getJobThread().isInterrupted(); } + + class BackgroundJob { + +private Thread jobThread; +private BackgroundJobException jobException; + +public BackgroundJob(Thread jobThread) { + this.jobThread = jobThread; +} + +public Thread getJobThread() { + if(jobException != null) throw jobException; + return jobThread; +} + +public void setJobException(BackgroundJobException exception) { + this.jobException = exception; +} + } + } http://git-wip-us.apache.org/repos/asf/ambari/blob/1df9a82a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/backgroundjobs/BackgroundJobException.java -- diff --git a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/backgroundjobs/BackgroundJobException.java b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/backgroundjobs/BackgroundJobException.java new file mode 100644 index 000..3830dda --- /dev/null +++ b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/backgroundjobs/BackgroundJobException.java @@ -0,0 +1,30 @@ +/** + * Licensed to the Apache
ambari git commit: AMBARI-20204. Huemigration View not working with Oracle Db(Single cluster). (Ishan Bhatt via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 3bcc30a51 -> e83f63bf1 AMBARI-20204. Huemigration View not working with Oracle Db(Single cluster). (Ishan Bhatt via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e83f63bf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e83f63bf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e83f63bf Branch: refs/heads/branch-2.5 Commit: e83f63bf176d2d59a99c055c078675c0e1a6c814 Parents: 3bcc30a Author: Gaurav NagarAuthored: Wed Mar 1 13:02:22 2017 +0530 Committer: Gaurav Nagar Committed: Wed Mar 1 13:03:49 2017 +0530 -- .../historyqueryset/OracleQuerySetAmbariDB.java | 7 ++- .../instancedetail/OracleQuerySetAmbariDB.java| 4 ++-- .../savedqueryset/OracleQuerySetAmbariDB.java | 8 .../instancedetail/OracleQuerySetAmbariDB.java| 2 +- .../pig/jobqueryset/OracleQuerySetAmbariDB.java | 2 +- .../pig/jobqueryset/QuerySetAmbariDB.java | 2 +- .../OracleQuerySetAmbariDB.java | 2 +- .../pig/savedscriptqueryset/QuerySetAmbariDB.java | 2 +- .../hive/historyqueryset/OracleQuerySetHueDB.java | 16 .../hive/savedqueryset/OracleQuerySetHueDb.java | 12 ++-- .../pig/jobqueryset/OracleQuerySetHueDb.java | 12 ++-- .../savedscriptqueryset/OracleQuerySetHueDb.java | 18 +- 12 files changed, 46 insertions(+), 41 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e83f63bf/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/OracleQuerySetAmbariDB.java -- diff --git a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/OracleQuerySetAmbariDB.java b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/OracleQuerySetAmbariDB.java index 7a197d3..eaf8c10 100644 --- a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/OracleQuerySetAmbariDB.java +++ b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/OracleQuerySetAmbariDB.java @@ -25,12 +25,17 @@ package org.apache.ambari.view.huetoambarimigration.datasource.queryset.ambariqu public class OracleQuerySetAmbariDB extends QuerySetAmbariDB { @Override + protected String getHiveVersionDetailSql(){ +return "select distinct(view_name) as viewname from viewentity where view_instance_name =?"; + } + + @Override protected String getSqlMaxDSidFromTableId(int id) { return "select MAX(cast(ds_id as integer)) as max from ds_jobimpl_" + id + ""; } @Override protected String getTableIdSqlFromInstanceName() { -return "select id from viewentity where class_name LIKE 'org.apache.ambari.view.hive.resources.jobs.viewJobs.JobImpl' and view_instance_name=?"; +return "select id from viewentity where class_name LIKE 'org.apache.ambari.view.%hive%.resources.jobs.viewJobs.JobImpl' and view_instance_name=?"; } @Override http://git-wip-us.apache.org/repos/asf/ambari/blob/e83f63bf/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/instancedetail/OracleQuerySetAmbariDB.java -- diff --git a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/instancedetail/OracleQuerySetAmbariDB.java b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/instancedetail/OracleQuerySetAmbariDB.java index bc41bf7..31379dd 100644 --- a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/instancedetail/OracleQuerySetAmbariDB.java +++ b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/instancedetail/OracleQuerySetAmbariDB.java @@ -22,10 +22,10 @@ public class OracleQuerySetAmbariDB extends QuerySetAmbariDB { @Override protected String getHiveInstanceSql(){ -return "select distinct(view_instance_name) as instancename from viewentity where view_name='HIVE{1.0.0}'"; +return "select
ambari git commit: AMBARI-20204. Huemigration View not working with Oracle Db(Single cluster). (Ishan Bhatt via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk df60905a5 -> 5f5762c6b AMBARI-20204. Huemigration View not working with Oracle Db(Single cluster). (Ishan Bhatt via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5f5762c6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5f5762c6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5f5762c6 Branch: refs/heads/trunk Commit: 5f5762c6b57b125868e885c2ce59ca815b6ae44d Parents: df60905 Author: Gaurav NagarAuthored: Wed Mar 1 13:02:22 2017 +0530 Committer: Gaurav Nagar Committed: Wed Mar 1 13:02:44 2017 +0530 -- .../historyqueryset/OracleQuerySetAmbariDB.java | 7 ++- .../instancedetail/OracleQuerySetAmbariDB.java| 4 ++-- .../savedqueryset/OracleQuerySetAmbariDB.java | 8 .../instancedetail/OracleQuerySetAmbariDB.java| 2 +- .../pig/jobqueryset/OracleQuerySetAmbariDB.java | 2 +- .../pig/jobqueryset/QuerySetAmbariDB.java | 2 +- .../OracleQuerySetAmbariDB.java | 2 +- .../pig/savedscriptqueryset/QuerySetAmbariDB.java | 2 +- .../hive/historyqueryset/OracleQuerySetHueDB.java | 16 .../hive/savedqueryset/OracleQuerySetHueDb.java | 12 ++-- .../pig/jobqueryset/OracleQuerySetHueDb.java | 12 ++-- .../savedscriptqueryset/OracleQuerySetHueDb.java | 18 +- 12 files changed, 46 insertions(+), 41 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5f5762c6/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/OracleQuerySetAmbariDB.java -- diff --git a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/OracleQuerySetAmbariDB.java b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/OracleQuerySetAmbariDB.java index 7a197d3..eaf8c10 100644 --- a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/OracleQuerySetAmbariDB.java +++ b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/OracleQuerySetAmbariDB.java @@ -25,12 +25,17 @@ package org.apache.ambari.view.huetoambarimigration.datasource.queryset.ambariqu public class OracleQuerySetAmbariDB extends QuerySetAmbariDB { @Override + protected String getHiveVersionDetailSql(){ +return "select distinct(view_name) as viewname from viewentity where view_instance_name =?"; + } + + @Override protected String getSqlMaxDSidFromTableId(int id) { return "select MAX(cast(ds_id as integer)) as max from ds_jobimpl_" + id + ""; } @Override protected String getTableIdSqlFromInstanceName() { -return "select id from viewentity where class_name LIKE 'org.apache.ambari.view.hive.resources.jobs.viewJobs.JobImpl' and view_instance_name=?"; +return "select id from viewentity where class_name LIKE 'org.apache.ambari.view.%hive%.resources.jobs.viewJobs.JobImpl' and view_instance_name=?"; } @Override http://git-wip-us.apache.org/repos/asf/ambari/blob/5f5762c6/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/instancedetail/OracleQuerySetAmbariDB.java -- diff --git a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/instancedetail/OracleQuerySetAmbariDB.java b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/instancedetail/OracleQuerySetAmbariDB.java index bc41bf7..31379dd 100644 --- a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/instancedetail/OracleQuerySetAmbariDB.java +++ b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/instancedetail/OracleQuerySetAmbariDB.java @@ -22,10 +22,10 @@ public class OracleQuerySetAmbariDB extends QuerySetAmbariDB { @Override protected String getHiveInstanceSql(){ -return "select distinct(view_instance_name) as instancename from viewentity where view_name='HIVE{1.0.0}'"; +return "select distinct(view_instance_name) as
ambari git commit: AMBARI-20222. Hive View 2.0 LogAggregator prints lots of warning logs.(gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk ba786d7f0 -> c405aacf5 AMBARI-20222. Hive View 2.0 LogAggregator prints lots of warning logs.(gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c405aacf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c405aacf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c405aacf Branch: refs/heads/trunk Commit: c405aacf59e242faa3d3941448aeef7da6f94bbc Parents: ba786d7 Author: Gaurav NagarAuthored: Tue Feb 28 18:59:37 2017 +0530 Committer: Gaurav Nagar Committed: Tue Feb 28 19:00:13 2017 +0530 -- .../org/apache/ambari/view/hive2/actor/JdbcConnector.java | 9 + .../java/org/apache/ambari/view/hive20/HiveViewImpl.java | 5 + .../apache/ambari/view/hive20/actor/JdbcConnector.java| 10 ++ 3 files changed, 24 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c405aacf/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/JdbcConnector.java -- diff --git a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/JdbcConnector.java b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/JdbcConnector.java index d6d5d51..997c28a 100644 --- a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/JdbcConnector.java +++ b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/JdbcConnector.java @@ -269,6 +269,7 @@ public class JdbcConnector extends HiveActor { isFailure = true; this.failure = failure; if (isAsync() && jobId.isPresent()) { + stopStatementExecutor(); if(isCancelCalled) { processCancel(); return; @@ -281,8 +282,16 @@ public class JdbcConnector extends HiveActor { } } + private void stopStatementExecutor() { +if (statementExecutor != null) { + statementExecutor.tell(PoisonPill.getInstance(), ActorRef.noSender()); + statementExecutor = null; +} + } + private void processResult(Optional resultSetOptional) { executing = false; +stopStatementExecutor(); LOG.info("Finished processing SQL statements for Job id : {}", jobId.or("SYNC JOB")); if (isAsync() && jobId.isPresent()) { http://git-wip-us.apache.org/repos/asf/ambari/blob/c405aacf/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/HiveViewImpl.java -- diff --git a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/HiveViewImpl.java b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/HiveViewImpl.java index aee7d03..4cadfac 100644 --- a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/HiveViewImpl.java +++ b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/HiveViewImpl.java @@ -23,9 +23,13 @@ import org.apache.ambari.view.ViewDefinition; import org.apache.ambari.view.ViewInstanceDefinition; import org.apache.ambari.view.hive20.utils.SharedObjectsFactory; import org.apache.ambari.view.utils.UserLocal; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class HiveViewImpl implements View { + private final Logger LOG = LoggerFactory.getLogger(getClass()); + @Override public void onDeploy(ViewDefinition definition) { @@ -45,6 +49,7 @@ public class HiveViewImpl implements View { @Override public void onUpdate(ViewInstanceDefinition definition) { //drop all cached connection for instance +LOG.info("Settings updated for instance '" + definition.getInstanceName() + "'"); UserLocal.dropInstanceCache(definition.getInstanceName()); SharedObjectsFactory.dropInstanceCache(definition.getInstanceName()); ConnectionSystem.getInstance().removeOperationControllerFromCache(definition.getInstanceName()); http://git-wip-us.apache.org/repos/asf/ambari/blob/c405aacf/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/JdbcConnector.java -- diff --git a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/JdbcConnector.java b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/JdbcConnector.java index 61f0b66..45fc786 100644 --- a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/JdbcConnector.java +++ b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/JdbcConnector.java @@ -272,6 +272,7 @@ public class JdbcConnector extends HiveActor { isFailure = true; this.failure = failure; if (isAsync() && jobId.isPresent()) { + stopStatementExecutor();
ambari git commit: AMBARI-20222. Hive View 2.0 LogAggregator prints lots of warning logs.(gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 55cdfff65 -> 0a5e2b429 AMBARI-20222. Hive View 2.0 LogAggregator prints lots of warning logs.(gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0a5e2b42 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0a5e2b42 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0a5e2b42 Branch: refs/heads/branch-2.5 Commit: 0a5e2b429f86f194c7b8f4cd835df7e9736b063f Parents: 55cdfff Author: Gaurav NagarAuthored: Tue Feb 28 18:59:37 2017 +0530 Committer: Gaurav Nagar Committed: Tue Feb 28 18:59:37 2017 +0530 -- .../org/apache/ambari/view/hive2/actor/JdbcConnector.java | 9 + .../java/org/apache/ambari/view/hive20/HiveViewImpl.java | 5 + .../apache/ambari/view/hive20/actor/JdbcConnector.java| 10 ++ 3 files changed, 24 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0a5e2b42/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/JdbcConnector.java -- diff --git a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/JdbcConnector.java b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/JdbcConnector.java index d6d5d51..997c28a 100644 --- a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/JdbcConnector.java +++ b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/JdbcConnector.java @@ -269,6 +269,7 @@ public class JdbcConnector extends HiveActor { isFailure = true; this.failure = failure; if (isAsync() && jobId.isPresent()) { + stopStatementExecutor(); if(isCancelCalled) { processCancel(); return; @@ -281,8 +282,16 @@ public class JdbcConnector extends HiveActor { } } + private void stopStatementExecutor() { +if (statementExecutor != null) { + statementExecutor.tell(PoisonPill.getInstance(), ActorRef.noSender()); + statementExecutor = null; +} + } + private void processResult(Optional resultSetOptional) { executing = false; +stopStatementExecutor(); LOG.info("Finished processing SQL statements for Job id : {}", jobId.or("SYNC JOB")); if (isAsync() && jobId.isPresent()) { http://git-wip-us.apache.org/repos/asf/ambari/blob/0a5e2b42/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/HiveViewImpl.java -- diff --git a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/HiveViewImpl.java b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/HiveViewImpl.java index aee7d03..4cadfac 100644 --- a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/HiveViewImpl.java +++ b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/HiveViewImpl.java @@ -23,9 +23,13 @@ import org.apache.ambari.view.ViewDefinition; import org.apache.ambari.view.ViewInstanceDefinition; import org.apache.ambari.view.hive20.utils.SharedObjectsFactory; import org.apache.ambari.view.utils.UserLocal; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class HiveViewImpl implements View { + private final Logger LOG = LoggerFactory.getLogger(getClass()); + @Override public void onDeploy(ViewDefinition definition) { @@ -45,6 +49,7 @@ public class HiveViewImpl implements View { @Override public void onUpdate(ViewInstanceDefinition definition) { //drop all cached connection for instance +LOG.info("Settings updated for instance '" + definition.getInstanceName() + "'"); UserLocal.dropInstanceCache(definition.getInstanceName()); SharedObjectsFactory.dropInstanceCache(definition.getInstanceName()); ConnectionSystem.getInstance().removeOperationControllerFromCache(definition.getInstanceName()); http://git-wip-us.apache.org/repos/asf/ambari/blob/0a5e2b42/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/JdbcConnector.java -- diff --git a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/JdbcConnector.java b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/JdbcConnector.java index 61f0b66..45fc786 100644 --- a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/JdbcConnector.java +++ b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/JdbcConnector.java @@ -272,6 +272,7 @@ public class JdbcConnector extends HiveActor { isFailure = true; this.failure = failure; if (isAsync() && jobId.isPresent()) { + stopStatementExecutor();
ambari git commit: AMBARI-20224. HiveView2.0: Logs tab is always empty.(gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 982b88153 -> 55cdfff65 AMBARI-20224. HiveView2.0: Logs tab is always empty.(gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/55cdfff6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/55cdfff6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/55cdfff6 Branch: refs/heads/branch-2.5 Commit: 55cdfff65aeb5aea5b970cfb6cec805b47b22466 Parents: 982b881 Author: Gaurav NagarAuthored: Tue Feb 28 18:57:50 2017 +0530 Committer: Gaurav Nagar Committed: Tue Feb 28 18:58:34 2017 +0530 -- contrib/views/hive20/src/main/resources/ui/app/adapters/query.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/55cdfff6/contrib/views/hive20/src/main/resources/ui/app/adapters/query.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/adapters/query.js b/contrib/views/hive20/src/main/resources/ui/app/adapters/query.js index f878230..4913fe2 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/adapters/query.js +++ b/contrib/views/hive20/src/main/resources/ui/app/adapters/query.js @@ -48,7 +48,7 @@ export default ApplicationAdapter.extend({ retrieveQueryLog(logFile){ let url = ''; -url = this.buildURL().replace('/jobs','') + '/files' + logFile; +url = this.buildURL().replace('/jobs','') + 'files' + logFile; return this.ajax(url, 'GET') }
ambari git commit: AMBARI-20224. HiveView2.0: Logs tab is always empty.(gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk 2a4bc9d2e -> ba786d7f0 AMBARI-20224. HiveView2.0: Logs tab is always empty.(gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ba786d7f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ba786d7f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ba786d7f Branch: refs/heads/trunk Commit: ba786d7f07d4b056ffa74b0071eb061c1f7fef5c Parents: 2a4bc9d Author: Gaurav NagarAuthored: Tue Feb 28 18:57:50 2017 +0530 Committer: Gaurav Nagar Committed: Tue Feb 28 18:57:50 2017 +0530 -- contrib/views/hive20/src/main/resources/ui/app/adapters/query.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ba786d7f/contrib/views/hive20/src/main/resources/ui/app/adapters/query.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/adapters/query.js b/contrib/views/hive20/src/main/resources/ui/app/adapters/query.js index f878230..4913fe2 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/adapters/query.js +++ b/contrib/views/hive20/src/main/resources/ui/app/adapters/query.js @@ -48,7 +48,7 @@ export default ApplicationAdapter.extend({ retrieveQueryLog(logFile){ let url = ''; -url = this.buildURL().replace('/jobs','') + '/files' + logFile; +url = this.buildURL().replace('/jobs','') + 'files' + logFile; return this.ajax(url, 'GET') }
ambari git commit: AMBARI-20223. Hive view 2.0 Fetch stats doesn't work when you point against LLAP. (gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk 910da3d5d -> 2a4bc9d2e AMBARI-20223. Hive view 2.0 Fetch stats doesn't work when you point against LLAP. (gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2a4bc9d2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2a4bc9d2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2a4bc9d2 Branch: refs/heads/trunk Commit: 2a4bc9d2e1053c91be732c913bc3020be9a871e7 Parents: 910da3d Author: Gaurav NagarAuthored: Tue Feb 28 18:54:59 2017 +0530 Committer: Gaurav Nagar Committed: Tue Feb 28 18:56:22 2017 +0530 -- .../internal/query/generators/AlterTableQueryGenerator.java | 2 +- .../internal/query/generators/AnalyzeTableQueryGenerator.java| 2 +- .../query/generators/FetchColumnStatsQueryGenerator.java | 2 +- .../internal/query/generators/InsertFromQueryGenerator.java | 2 +- .../internal/query/generators/RenameTableQueryGenerator.java | 4 ++-- .../internal/query/generators/AlterTableQueryGeneratorTest.java | 4 ++-- .../query/generators/RenameTableQueryGeneratorSpecTest.groovy| 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2a4bc9d2/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/AlterTableQueryGenerator.java -- diff --git a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/AlterTableQueryGenerator.java b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/AlterTableQueryGenerator.java index b119f6a..eece538 100644 --- a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/AlterTableQueryGenerator.java +++ b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/AlterTableQueryGenerator.java @@ -58,7 +58,7 @@ public class AlterTableQueryGenerator implements QueryGenerator { public String getQueryPerfix() { return new StringBuffer(" ALTER TABLE ") - .append("`").append(this.getOldMeta().getDatabase()).append(".").append(this.getOldMeta().getTable().trim()).append("` ").toString(); + .append("`").append(this.getOldMeta().getDatabase()).append("`.`").append(this.getOldMeta().getTable().trim()).append("` ").toString(); } public Optional getQuery() { http://git-wip-us.apache.org/repos/asf/ambari/blob/2a4bc9d2/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/AnalyzeTableQueryGenerator.java -- diff --git a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/AnalyzeTableQueryGenerator.java b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/AnalyzeTableQueryGenerator.java index 902d959..1d68407 100644 --- a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/AnalyzeTableQueryGenerator.java +++ b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/AnalyzeTableQueryGenerator.java @@ -34,7 +34,7 @@ public class AnalyzeTableQueryGenerator implements QueryGenerator { @Override public Optional getQuery() throws ServiceException { -return Optional.of("ANALYZE TABLE " + "`" + databaseName + "." + tableName + "`" + " COMPUTE STATISTICS " + +return Optional.of("ANALYZE TABLE " + "`" + databaseName + "`.`" + tableName + "`" + " COMPUTE STATISTICS " + (shouldAnalyzeColumns? " FOR COLUMNS ": "") + ";"); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/2a4bc9d2/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/FetchColumnStatsQueryGenerator.java -- diff --git a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/FetchColumnStatsQueryGenerator.java b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/FetchColumnStatsQueryGenerator.java index 73b3698..9c815cf 100644 --- a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/FetchColumnStatsQueryGenerator.java +++ b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/FetchColumnStatsQueryGenerator.java @@ -34,7 +34,7 @@ public class FetchColumnStatsQueryGenerator implements QueryGenerator{ @Override public Optional getQuery() throws ServiceException { -return Optional.of("DESCRIBE
ambari git commit: AMBARI-20223. Hive view 2.0 Fetch stats doesn't work when you point against LLAP. (gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 b3bb57c6a -> 982b88153 AMBARI-20223. Hive view 2.0 Fetch stats doesn't work when you point against LLAP. (gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/982b8815 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/982b8815 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/982b8815 Branch: refs/heads/branch-2.5 Commit: 982b8815373502b3b97cec90b36e1ff13e1e9fd9 Parents: b3bb57c Author: Gaurav NagarAuthored: Tue Feb 28 18:54:59 2017 +0530 Committer: Gaurav Nagar Committed: Tue Feb 28 18:55:29 2017 +0530 -- .../internal/query/generators/AlterTableQueryGenerator.java | 2 +- .../internal/query/generators/AnalyzeTableQueryGenerator.java| 2 +- .../query/generators/FetchColumnStatsQueryGenerator.java | 2 +- .../internal/query/generators/InsertFromQueryGenerator.java | 2 +- .../internal/query/generators/RenameTableQueryGenerator.java | 4 ++-- .../internal/query/generators/AlterTableQueryGeneratorTest.java | 4 ++-- .../query/generators/RenameTableQueryGeneratorSpecTest.groovy| 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/982b8815/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/AlterTableQueryGenerator.java -- diff --git a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/AlterTableQueryGenerator.java b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/AlterTableQueryGenerator.java index b119f6a..eece538 100644 --- a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/AlterTableQueryGenerator.java +++ b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/AlterTableQueryGenerator.java @@ -58,7 +58,7 @@ public class AlterTableQueryGenerator implements QueryGenerator { public String getQueryPerfix() { return new StringBuffer(" ALTER TABLE ") - .append("`").append(this.getOldMeta().getDatabase()).append(".").append(this.getOldMeta().getTable().trim()).append("` ").toString(); + .append("`").append(this.getOldMeta().getDatabase()).append("`.`").append(this.getOldMeta().getTable().trim()).append("` ").toString(); } public Optional getQuery() { http://git-wip-us.apache.org/repos/asf/ambari/blob/982b8815/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/AnalyzeTableQueryGenerator.java -- diff --git a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/AnalyzeTableQueryGenerator.java b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/AnalyzeTableQueryGenerator.java index 902d959..1d68407 100644 --- a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/AnalyzeTableQueryGenerator.java +++ b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/AnalyzeTableQueryGenerator.java @@ -34,7 +34,7 @@ public class AnalyzeTableQueryGenerator implements QueryGenerator { @Override public Optional getQuery() throws ServiceException { -return Optional.of("ANALYZE TABLE " + "`" + databaseName + "." + tableName + "`" + " COMPUTE STATISTICS " + +return Optional.of("ANALYZE TABLE " + "`" + databaseName + "`.`" + tableName + "`" + " COMPUTE STATISTICS " + (shouldAnalyzeColumns? " FOR COLUMNS ": "") + ";"); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/982b8815/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/FetchColumnStatsQueryGenerator.java -- diff --git a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/FetchColumnStatsQueryGenerator.java b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/FetchColumnStatsQueryGenerator.java index 73b3698..9c815cf 100644 --- a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/FetchColumnStatsQueryGenerator.java +++ b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/FetchColumnStatsQueryGenerator.java @@ -34,7 +34,7 @@ public class FetchColumnStatsQueryGenerator implements QueryGenerator{ @Override public Optional getQuery() throws ServiceException { -return
ambari git commit: AMBARI-20173. DB selected is not persisted while switching between tabs, SavedQuery tab does not show preview, if the query is not executed before saving. (Venkata Sairam via gaurav
Repository: ambari Updated Branches: refs/heads/branch-2.5 8f9b557c1 -> 255d1890a AMBARI-20173. DB selected is not persisted while switching between tabs,SavedQuery tab does not show preview, if the query is not executed before saving. (Venkata Sairam via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/255d1890 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/255d1890 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/255d1890 Branch: refs/heads/branch-2.5 Commit: 255d1890a3bdf72cab4101a526a5a03907648280 Parents: 8f9b557 Author: Gaurav NagarAuthored: Tue Feb 28 11:37:20 2017 +0530 Committer: Gaurav Nagar Committed: Tue Feb 28 11:37:55 2017 +0530 -- .../savedQueries/SavedQueryResourceManager.java | 44 .../resources/ui/app/routes/queries/query.js| 3 ++ .../resources/ui/app/routes/savedqueries.js | 33 --- .../resources/ui/app/services/saved-queries.js | 10 + 4 files changed, 41 insertions(+), 49 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/255d1890/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/savedQueries/SavedQueryResourceManager.java -- diff --git a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/savedQueries/SavedQueryResourceManager.java b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/savedQueries/SavedQueryResourceManager.java index ef497ce..3690683 100644 --- a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/savedQueries/SavedQueryResourceManager.java +++ b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/savedQueries/SavedQueryResourceManager.java @@ -6,9 +6,9 @@ * 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 - * + * + * 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. @@ -53,12 +53,11 @@ public class SavedQueryResourceManager extends PersonalCRUDResourceManager 42)?42:query.length()); +return query.substring(0, (query.length() > 42) ? 42 : query.length()); } @Override @@ -146,12 +126,6 @@ public class SavedQueryResourceManager extends PersonalCRUDResourceManager readAll(FilteringStrategy filteringStrategy) { List queries = super.readAll(filteringStrategy); -for(SavedQuery query : queries) { - String shortQuery = query.getShortQuery(); - if(shortQuery == null || shortQuery.isEmpty()) { -fillShortQueryField(query); - } -} return queries; } http://git-wip-us.apache.org/repos/asf/ambari/blob/255d1890/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js b/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js index efab0ad..8f0085c 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js +++ b/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js @@ -156,6 +156,9 @@ export default Ember.Route.extend(UILoggerMixin, { }, checkIfDeafultDatabaseExists(alldatabases){ +if(this.get('controller.model').get('selectedDb')) { + return this.get('controller.model').get('selectedDb'); +} let defaultDB = alldatabases.findBy('name', 'default'), selectedDb; if(defaultDB) { selectedDb = defaultDB.get("name"); http://git-wip-us.apache.org/repos/asf/ambari/blob/255d1890/contrib/views/hive20/src/main/resources/ui/app/routes/savedqueries.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/savedqueries.js b/contrib/views/hive20/src/main/resources/ui/app/routes/savedqueries.js index 7b18424..5369f8e 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/routes/savedqueries.js +++ b/contrib/views/hive20/src/main/resources/ui/app/routes/savedqueries.js @@ -17,6 +17,7 @@ */ import Ember from 'ember'; +import UILoggerMixin from '../mixins/ui-logger'; export default Ember.Route.extend({ @@ -84,7 +85,7 @@ export default Ember.Route.extend({ openAsWorksheet(savedQuery){ - let hasWorksheetModel = this.modelFor('queries'); + let
ambari git commit: AMBARI-20173. DB selected is not persisted while switching between tabs, SavedQuery tab does not show preview, if the query is not executed before saving. (Venkata Sairam via gaurav
Repository: ambari Updated Branches: refs/heads/trunk cbfd78cdb -> d7c8aeaab AMBARI-20173. DB selected is not persisted while switching between tabs,SavedQuery tab does not show preview, if the query is not executed before saving. (Venkata Sairam via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d7c8aeaa Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d7c8aeaa Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d7c8aeaa Branch: refs/heads/trunk Commit: d7c8aeaab81a8a9cad5911ef0e859f0b5d681e8e Parents: cbfd78c Author: Gaurav NagarAuthored: Tue Feb 28 11:37:20 2017 +0530 Committer: Gaurav Nagar Committed: Tue Feb 28 11:37:20 2017 +0530 -- .../savedQueries/SavedQueryResourceManager.java | 44 .../resources/ui/app/routes/queries/query.js| 3 ++ .../resources/ui/app/routes/savedqueries.js | 33 --- .../resources/ui/app/services/saved-queries.js | 10 + 4 files changed, 41 insertions(+), 49 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d7c8aeaa/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/savedQueries/SavedQueryResourceManager.java -- diff --git a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/savedQueries/SavedQueryResourceManager.java b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/savedQueries/SavedQueryResourceManager.java index ef497ce..3690683 100644 --- a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/savedQueries/SavedQueryResourceManager.java +++ b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/savedQueries/SavedQueryResourceManager.java @@ -6,9 +6,9 @@ * 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 - * + * + * 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. @@ -53,12 +53,11 @@ public class SavedQueryResourceManager extends PersonalCRUDResourceManager 42)?42:query.length()); +return query.substring(0, (query.length() > 42) ? 42 : query.length()); } @Override @@ -146,12 +126,6 @@ public class SavedQueryResourceManager extends PersonalCRUDResourceManager readAll(FilteringStrategy filteringStrategy) { List queries = super.readAll(filteringStrategy); -for(SavedQuery query : queries) { - String shortQuery = query.getShortQuery(); - if(shortQuery == null || shortQuery.isEmpty()) { -fillShortQueryField(query); - } -} return queries; } http://git-wip-us.apache.org/repos/asf/ambari/blob/d7c8aeaa/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js b/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js index efab0ad..8f0085c 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js +++ b/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js @@ -156,6 +156,9 @@ export default Ember.Route.extend(UILoggerMixin, { }, checkIfDeafultDatabaseExists(alldatabases){ +if(this.get('controller.model').get('selectedDb')) { + return this.get('controller.model').get('selectedDb'); +} let defaultDB = alldatabases.findBy('name', 'default'), selectedDb; if(defaultDB) { selectedDb = defaultDB.get("name"); http://git-wip-us.apache.org/repos/asf/ambari/blob/d7c8aeaa/contrib/views/hive20/src/main/resources/ui/app/routes/savedqueries.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/savedqueries.js b/contrib/views/hive20/src/main/resources/ui/app/routes/savedqueries.js index 7b18424..5369f8e 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/routes/savedqueries.js +++ b/contrib/views/hive20/src/main/resources/ui/app/routes/savedqueries.js @@ -17,6 +17,7 @@ */ import Ember from 'ember'; +import UILoggerMixin from '../mixins/ui-logger'; export default Ember.Route.extend({ @@ -84,7 +85,7 @@ export default Ember.Route.extend({ openAsWorksheet(savedQuery){ - let hasWorksheetModel = this.modelFor('queries'); + let
ambari git commit: AMBARI-20132. All the workflow details are getting logged in UI console log.(Belliraj HB via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk d4c668c7b -> 336e8e0a7 AMBARI-20132. All the workflow details are getting logged in UI console log.(Belliraj HB via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/336e8e0a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/336e8e0a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/336e8e0a Branch: refs/heads/trunk Commit: 336e8e0a705f8c36219c3dc03ff255a677c17601 Parents: d4c668c Author: Gaurav NagarAuthored: Mon Feb 27 18:33:22 2017 +0530 Committer: Gaurav Nagar Committed: Mon Feb 27 18:34:08 2017 +0530 -- .../resources/ui/app/components/coord-config.js | 3 +-- .../ui/app/components/flow-designer.js | 27 +++- .../resources/ui/app/components/job-config.js | 4 +-- .../resources/ui/app/components/job-details.js | 1 - .../main/resources/ui/app/components/save-wf.js | 1 - .../resources/ui/app/components/sqoop-action.js | 1 - .../ui/app/components/workflow-action-editor.js | 2 +- .../ui/app/domain/action-type-resolver.js | 5 ++-- .../app/domain/bundle/bundle-xml-generator.js | 1 - .../coordinator/coordinator-xml-generator.js| 1 - .../coordinator/coordinator-xml-importer.js | 4 +-- .../ui/app/domain/cytoscape-flow-renderer.js| 17 ++-- .../resources/ui/app/domain/cytoscape-style.js | 10 +++- .../resources/ui/app/domain/schema-versions.js | 4 +-- .../ui/app/domain/workflow-importer.js | 2 +- .../ui/app/domain/workflow-json-importer.js | 4 +-- .../main/resources/ui/app/domain/workflow.js| 9 +++ .../ui/app/routes/design/proj-manager-tab.js| 2 +- .../src/main/resources/ui/app/routes/index.js | 2 +- .../ui/app/services/workspace-manager.js| 6 + .../main/resources/ui/app/utils/common-utils.js | 14 ++ 21 files changed, 59 insertions(+), 61 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/336e8e0a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js index 61d9f35..f6e11b6 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js @@ -599,7 +599,6 @@ export default Ember.Component.extend(Validations, Ember.Evented, { deferred.promise.then(function(data){ this.sendAction('openTab', type, path); }.bind(this)).catch(function(data){ -console.log(data); this.set('errorMsg', 'There is some problem while importing.'); this.set('data', data); }.bind(this)); @@ -661,7 +660,7 @@ export default Ember.Component.extend(Validations, Ember.Evented, { var workflowJson = x2js.xml_str2json(data); this.set('workflowName', workflowJson["workflow-app"]._name); }.bind(this)).catch(function(data){ -console.log(data); +console.error(data); this.set('workflowName', null); this.set('errorMsg', "There is some problem while fetching workflow name."); this.set("data", data); http://git-wip-us.apache.org/repos/asf/ambari/blob/336e8e0a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js index 8597d72..9eb20aa 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js @@ -392,24 +392,7 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { }); return deferred; }, - getAssetFromHdfs(filePath){ -var url = Ember.ENV.API_URL + "/readAsset?assetPath="+filePath; -var deferred = Ember.RSVP.defer(); -Ember.$.ajax({ - url: url, - method: 'GET', - dataType: "text", - beforeSend: function (xhr) { -xhr.setRequestHeader("X-XSRF-HEADER", Math.round(Math.random()*10)); -xhr.setRequestHeader("X-Requested-By", "Ambari"); - } -}).done(function(data){ - deferred.resolve(data); -}).fail(function(data){ - deferred.reject(data); -}); -return deferred; - }, + importActionSettingsFromString(actionSettings) { var x2js = new X2JS(); var actionSettingsObj =
ambari git commit: AMBARI-20132. All the workflow details are getting logged in UI console log.(Belliraj HB via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 8ade5a6b4 -> f849d527e AMBARI-20132. All the workflow details are getting logged in UI console log.(Belliraj HB via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f849d527 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f849d527 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f849d527 Branch: refs/heads/branch-2.5 Commit: f849d527e1c9c75ce2d95f20fb36262cbce891af Parents: 8ade5a6 Author: Gaurav NagarAuthored: Mon Feb 27 18:33:22 2017 +0530 Committer: Gaurav Nagar Committed: Mon Feb 27 18:33:22 2017 +0530 -- .../resources/ui/app/components/coord-config.js | 3 +-- .../ui/app/components/flow-designer.js | 27 +++- .../resources/ui/app/components/job-config.js | 4 +-- .../resources/ui/app/components/job-details.js | 1 - .../main/resources/ui/app/components/save-wf.js | 1 - .../resources/ui/app/components/sqoop-action.js | 1 - .../ui/app/components/workflow-action-editor.js | 2 +- .../ui/app/domain/action-type-resolver.js | 5 ++-- .../app/domain/bundle/bundle-xml-generator.js | 1 - .../coordinator/coordinator-xml-generator.js| 1 - .../coordinator/coordinator-xml-importer.js | 4 +-- .../ui/app/domain/cytoscape-flow-renderer.js| 17 ++-- .../resources/ui/app/domain/cytoscape-style.js | 10 +++- .../resources/ui/app/domain/schema-versions.js | 4 +-- .../ui/app/domain/workflow-importer.js | 2 +- .../ui/app/domain/workflow-json-importer.js | 4 +-- .../main/resources/ui/app/domain/workflow.js| 9 +++ .../ui/app/routes/design/proj-manager-tab.js| 2 +- .../src/main/resources/ui/app/routes/index.js | 2 +- .../ui/app/services/workspace-manager.js| 6 + .../main/resources/ui/app/utils/common-utils.js | 14 ++ 21 files changed, 59 insertions(+), 61 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f849d527/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js index 61d9f35..f6e11b6 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js @@ -599,7 +599,6 @@ export default Ember.Component.extend(Validations, Ember.Evented, { deferred.promise.then(function(data){ this.sendAction('openTab', type, path); }.bind(this)).catch(function(data){ -console.log(data); this.set('errorMsg', 'There is some problem while importing.'); this.set('data', data); }.bind(this)); @@ -661,7 +660,7 @@ export default Ember.Component.extend(Validations, Ember.Evented, { var workflowJson = x2js.xml_str2json(data); this.set('workflowName', workflowJson["workflow-app"]._name); }.bind(this)).catch(function(data){ -console.log(data); +console.error(data); this.set('workflowName', null); this.set('errorMsg', "There is some problem while fetching workflow name."); this.set("data", data); http://git-wip-us.apache.org/repos/asf/ambari/blob/f849d527/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js index 8597d72..9eb20aa 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js @@ -392,24 +392,7 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { }); return deferred; }, - getAssetFromHdfs(filePath){ -var url = Ember.ENV.API_URL + "/readAsset?assetPath="+filePath; -var deferred = Ember.RSVP.defer(); -Ember.$.ajax({ - url: url, - method: 'GET', - dataType: "text", - beforeSend: function (xhr) { -xhr.setRequestHeader("X-XSRF-HEADER", Math.round(Math.random()*10)); -xhr.setRequestHeader("X-Requested-By", "Ambari"); - } -}).done(function(data){ - deferred.resolve(data); -}).fail(function(data){ - deferred.reject(data); -}); -return deferred; - }, + importActionSettingsFromString(actionSettings) { var x2js = new X2JS(); var actionSettingsObj =
ambari git commit: AMBARI-20142. Job Link URL not working.(Madhan Mohan Reddy via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 5f0d00a6c -> 259768314 AMBARI-20142. Job Link URL not working.(Madhan Mohan Reddy via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/25976831 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/25976831 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/25976831 Branch: refs/heads/branch-2.5 Commit: 259768314fbb6829623d096a632a919e94e29566 Parents: 5f0d00a Author: Gaurav NagarAuthored: Fri Feb 24 22:47:46 2017 +0530 Committer: Gaurav Nagar Committed: Mon Feb 27 12:02:12 2017 +0530 -- .../ui/app/components/workflow-job-action.js| 35 + .../ui/app/components/workflow-job-details.js | 12 -- .../components/workflow-job-action.hbs | 30 +++ .../components/workflow-job-details.hbs | 24 +--- .../main/resources/ui/app/utils/common-utils.js | 4 ++ .../components/workflow-job-action-test.js | 40 6 files changed, 127 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/25976831/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-job-action.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-job-action.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-job-action.js new file mode 100644 index 000..23a03c7 --- /dev/null +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-job-action.js @@ -0,0 +1,35 @@ +/* +*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. +*/ +import Ember from 'ember'; +import CommonUtils from "../utils/common-utils"; + +export default Ember.Component.extend({ + tagName: 'tr', + validTrackerUrl:Ember.computed('actionInfo.consoleUrl',function(){ +var trackerUrl = this.get("actionInfo.consoleUrl"); +if (trackerUrl && CommonUtils.startsWith(trackerUrl.trim(), "http")) { + return true; +} +return false; + }), + + actions: { +getActionDetails(actionInfo) { + this.sendAction('getActionDetails', actionInfo) +} + } +}); http://git-wip-us.apache.org/repos/asf/ambari/blob/25976831/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-job-details.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-job-details.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-job-details.js index 7a868fa..dcbbab9 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-job-details.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-job-details.js @@ -16,19 +16,25 @@ */ import Ember from 'ember'; +import CommonUtils from "../utils/common-utils"; + export default Ember.Component.extend({ dagUrl:Ember.computed('model.id',function(){ return Ember.ENV.API_URL+'/getDag?jobid='+this.get('model.id'); }), + validTrackerUrl:Ember.computed('model.actionInfo.consoleUrl',function(){ +var trackerUrl = this.get("model.actionInfo.consoleUrl"); +if (trackerUrl && CommonUtils.startsWith(trackerUrl.trim(), "http")) { + return true; +} +return false; + }), actions :{ getJobLog (params) { this.sendAction('getJobLog', params); }, getActionDetails(action){ this.sendAction('getActionDetails',action); -}, -openConsoleUrl(url){ - window.open(url, '_blank'); } } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/25976831/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-action.hbs -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-action.hbs
ambari git commit: AMBARI-20142. Job Link URL not working.(Madhan Mohan Reddy via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk f3877c132 -> 1d7ae2430 AMBARI-20142. Job Link URL not working.(Madhan Mohan Reddy via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1d7ae243 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1d7ae243 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1d7ae243 Branch: refs/heads/trunk Commit: 1d7ae2430a4ca9735336fb86318c23d1584d8f1c Parents: f3877c1 Author: Gaurav NagarAuthored: Fri Feb 24 22:47:46 2017 +0530 Committer: Gaurav Nagar Committed: Fri Feb 24 22:47:46 2017 +0530 -- .../ui/app/components/workflow-job-action.js| 35 + .../ui/app/components/workflow-job-details.js | 12 -- .../components/workflow-job-action.hbs | 30 +++ .../components/workflow-job-details.hbs | 24 +--- .../main/resources/ui/app/utils/common-utils.js | 4 ++ .../components/workflow-job-action-test.js | 40 6 files changed, 127 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1d7ae243/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-job-action.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-job-action.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-job-action.js new file mode 100644 index 000..23a03c7 --- /dev/null +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-job-action.js @@ -0,0 +1,35 @@ +/* +*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. +*/ +import Ember from 'ember'; +import CommonUtils from "../utils/common-utils"; + +export default Ember.Component.extend({ + tagName: 'tr', + validTrackerUrl:Ember.computed('actionInfo.consoleUrl',function(){ +var trackerUrl = this.get("actionInfo.consoleUrl"); +if (trackerUrl && CommonUtils.startsWith(trackerUrl.trim(), "http")) { + return true; +} +return false; + }), + + actions: { +getActionDetails(actionInfo) { + this.sendAction('getActionDetails', actionInfo) +} + } +}); http://git-wip-us.apache.org/repos/asf/ambari/blob/1d7ae243/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-job-details.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-job-details.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-job-details.js index 7a868fa..dcbbab9 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-job-details.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-job-details.js @@ -16,19 +16,25 @@ */ import Ember from 'ember'; +import CommonUtils from "../utils/common-utils"; + export default Ember.Component.extend({ dagUrl:Ember.computed('model.id',function(){ return Ember.ENV.API_URL+'/getDag?jobid='+this.get('model.id'); }), + validTrackerUrl:Ember.computed('model.actionInfo.consoleUrl',function(){ +var trackerUrl = this.get("model.actionInfo.consoleUrl"); +if (trackerUrl && CommonUtils.startsWith(trackerUrl.trim(), "http")) { + return true; +} +return false; + }), actions :{ getJobLog (params) { this.sendAction('getJobLog', params); }, getActionDetails(action){ this.sendAction('getActionDetails',action); -}, -openConsoleUrl(url){ - window.open(url, '_blank'); } } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/1d7ae243/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-action.hbs -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-action.hbs
ambari git commit: AMBARI-20167. importing from workflow from the coordinator setup hangs. (Madhan Mohan Reddy via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk 378a49e33 -> f3877c132 AMBARI-20167. importing from workflow from the coordinator setup hangs. (Madhan Mohan Reddy via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f3877c13 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f3877c13 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f3877c13 Branch: refs/heads/trunk Commit: f3877c13200e9f8000fe70d0b799112e205715bc Parents: 378a49e Author: Gaurav NagarAuthored: Fri Feb 24 22:44:09 2017 +0530 Committer: Gaurav Nagar Committed: Fri Feb 24 22:45:30 2017 +0530 -- .../resources/ui/app/components/coord-config.js | 26 +--- .../app/templates/components/coord-config.hbs | 2 +- 2 files changed, 24 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f3877c13/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js index 4a57e37..61d9f35 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js @@ -593,7 +593,16 @@ export default Ember.Component.extend(Validations, Ember.Evented, { }); }, openTab(type, path){ - this.sendAction('openTab', type, path); + this.set('errorMsg', ''); + var path = this.appendFileName(path, type); + var deferred = this.readFromHdfs(path); + deferred.promise.then(function(data){ +this.sendAction('openTab', type, path); + }.bind(this)).catch(function(data){ +console.log(data); +this.set('errorMsg', 'There is some problem while importing.'); +this.set('data', data); + }.bind(this)); }, showParameterSettings(value){ if(this.get('coordinator.parameters') !== null){ @@ -636,15 +645,26 @@ export default Ember.Component.extend(Validations, Ember.Evented, { }, showWorkflowName(){ this.set('workflowName', null); + this.set('errorMsg', ""); var path = this.appendFileName(this.get('coordinator.workflow.appPath'), 'wf'); + if (this.get('propertyExtractor').containsParameters(path)) { +this.set('containsParameteriedPaths', true); +this.set('parameterizedPathWarning', 'Workflow path contains variables'); +return; + } else { +this.set('containsParameteriedPaths', false); +this.set('parameterizedPathWarning', ''); + } var deferred = this.readFromHdfs(path); deferred.promise.then(function(data){ var x2js = new X2JS(); var workflowJson = x2js.xml_str2json(data); this.set('workflowName', workflowJson["workflow-app"]._name); - }.bind(this)).catch(function(e){ + }.bind(this)).catch(function(data){ +console.log(data); this.set('workflowName', null); -throw new Error(e); +this.set('errorMsg', "There is some problem while fetching workflow name."); +this.set("data", data); }.bind(this)); }, showVersionSettings(value){ http://git-wip-us.apache.org/repos/asf/ambari/blob/f3877c13/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-config.hbs -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-config.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-config.hbs index 7db5ce2..0e35d0e 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-config.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-config.hbs @@ -106,7 +106,7 @@ {{input type="text" class="form-control" name="appPath" focus-out="showWorkflowName" value=coordinator.workflow.appPath placeholder="Path of the workflow file"}} Browse - + {{#if workflowName}}
ambari git commit: AMBARI-20167. importing from workflow from the coordinator setup hangs. (Madhan Mohan Reddy via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 bffd2644c -> 65888b0a9 AMBARI-20167. importing from workflow from the coordinator setup hangs. (Madhan Mohan Reddy via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/65888b0a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/65888b0a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/65888b0a Branch: refs/heads/branch-2.5 Commit: 65888b0a9cc7f0cc77a243089af97cbefdd3f18c Parents: bffd264 Author: Gaurav NagarAuthored: Fri Feb 24 22:44:09 2017 +0530 Committer: Gaurav Nagar Committed: Fri Feb 24 22:44:09 2017 +0530 -- .../resources/ui/app/components/coord-config.js | 26 +--- .../app/templates/components/coord-config.hbs | 2 +- 2 files changed, 24 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/65888b0a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js index 4a57e37..61d9f35 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js @@ -593,7 +593,16 @@ export default Ember.Component.extend(Validations, Ember.Evented, { }); }, openTab(type, path){ - this.sendAction('openTab', type, path); + this.set('errorMsg', ''); + var path = this.appendFileName(path, type); + var deferred = this.readFromHdfs(path); + deferred.promise.then(function(data){ +this.sendAction('openTab', type, path); + }.bind(this)).catch(function(data){ +console.log(data); +this.set('errorMsg', 'There is some problem while importing.'); +this.set('data', data); + }.bind(this)); }, showParameterSettings(value){ if(this.get('coordinator.parameters') !== null){ @@ -636,15 +645,26 @@ export default Ember.Component.extend(Validations, Ember.Evented, { }, showWorkflowName(){ this.set('workflowName', null); + this.set('errorMsg', ""); var path = this.appendFileName(this.get('coordinator.workflow.appPath'), 'wf'); + if (this.get('propertyExtractor').containsParameters(path)) { +this.set('containsParameteriedPaths', true); +this.set('parameterizedPathWarning', 'Workflow path contains variables'); +return; + } else { +this.set('containsParameteriedPaths', false); +this.set('parameterizedPathWarning', ''); + } var deferred = this.readFromHdfs(path); deferred.promise.then(function(data){ var x2js = new X2JS(); var workflowJson = x2js.xml_str2json(data); this.set('workflowName', workflowJson["workflow-app"]._name); - }.bind(this)).catch(function(e){ + }.bind(this)).catch(function(data){ +console.log(data); this.set('workflowName', null); -throw new Error(e); +this.set('errorMsg', "There is some problem while fetching workflow name."); +this.set("data", data); }.bind(this)); }, showVersionSettings(value){ http://git-wip-us.apache.org/repos/asf/ambari/blob/65888b0a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-config.hbs -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-config.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-config.hbs index 7db5ce2..0e35d0e 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-config.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-config.hbs @@ -106,7 +106,7 @@ {{input type="text" class="form-control" name="appPath" focus-out="showWorkflowName" value=coordinator.workflow.appPath placeholder="Path of the workflow file"}} Browse - + {{#if workflowName}}
ambari git commit: AMBARI-20166. Workflow Manager. Nominal time should accept variables.(Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 ae3719754 -> bffd2644c AMBARI-20166. Workflow Manager. Nominal time should accept variables.(Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bffd2644 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bffd2644 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bffd2644 Branch: refs/heads/branch-2.5 Commit: bffd2644cc7647564cbe3bdbb8a2831b37c6bfb5 Parents: ae37197 Author: Gaurav NagarAuthored: Fri Feb 24 22:39:13 2017 +0530 Committer: Gaurav Nagar Committed: Fri Feb 24 22:39:51 2017 +0530 -- .../resources/ui/app/components/sla-info.js | 37 .../resources/ui/app/domain/mapping-utils.js| 20 +-- .../main/resources/ui/app/domain/sla-info.js| 12 +-- .../ui/app/templates/components/sla-info.hbs| 12 ++- 4 files changed, 30 insertions(+), 51 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/bffd2644/contrib/views/wfmanager/src/main/resources/ui/app/components/sla-info.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/sla-info.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/sla-info.js index bcc209b..be5d6f9 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/sla-info.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/sla-info.js @@ -19,24 +19,6 @@ import { validator, buildValidations } from 'ember-cp-validations'; import { v1, v4 } from "ember-uuid"; const Validations = buildValidations({ - 'nominalTime': { -validators: [ - validator('presence', { -presence : true, -disabled(model, attribute) { - return !model.get('slaEnabled'); -}, -dependentKeys : ['slaEnabled'] - }), - validator('date', { -disabled(model, attribute) { - return !model.get('slaEnabled'); -}, -format: 'MM/DD/ hh:mm A', -dependentKeys : ['slaEnabled'] - }), -] - }, 'slaInfo.shouldEnd.time': { validators: [ validator('presence', { @@ -125,14 +107,6 @@ export default Ember.Component.extend(Validations, { this.set('slaEnabled', false); } Ember.addObserver(this, 'slaEnabled', this, this.slaObserver); -if(this.get('slaInfo.nominalTime')){ - var date = new Date(this.get('slaInfo.nominalTime')); - if(date && !isNaN(date.getTime())){ -var utcDate = new Date(date.getTime() + date.getTimezoneOffset()*60*1000); -this.set('nominalTime', moment(utcDate).format("MM/DD/ hh:mm A")); - } -} -Ember.addObserver(this, 'nominalTime', this, this.nominalTimeObserver); this.set('collapseId', v1()); }.on('init'), alertEventsObserver : function(){ @@ -142,24 +116,13 @@ export default Ember.Component.extend(Validations, { onDestroy : function(){ Ember.removeObserver(this, 'alertEvents.@each.alertEnabled', this, this.alertEventsObserver); Ember.removeObserver(this, 'slaEnabled', this, this.slaObserver); -Ember.removeObserver(this, 'nominalTime', this, this.nominalTimeObserver); }.on('willDestroyElement'), elementsInserted : function() { -this.$('input[name="nominalTime"]').datetimepicker({ - useCurrent: false, - showClose : true, - format: 'MM/DD/ hh:mm A', - defaultDate : this.get('slaInfo.nominalTime') -}); this.sendAction('register','slaInfo', this); if(this.get('slaEnabled')){ this.$('#slaCollapse').collapse('show'); } }.on('didInsertElement'), - nominalTimeObserver : function(){ -var date = new Date(this.get('nominalTime')); - this.set('slaInfo.nominalTime',moment(date).format("-MM-DDTHH:mm")+'Z'); - }, slaObserver : function(){ if(this.get('slaEnabled')){ this.$('#slaCollapse').collapse('show'); http://git-wip-us.apache.org/repos/asf/ambari/blob/bffd2644/contrib/views/wfmanager/src/main/resources/ui/app/domain/mapping-utils.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/mapping-utils.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/mapping-utils.js index 153b538..2b45c9e 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/mapping-utils.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/mapping-utils.js @@ -216,7 +216,7 @@ var SLAMapper= Ember.Object.extend({ var slaPrefix="sla"; slaInfo["__prefix"]=slaPrefix; if (sla.nominalTime){ -slaInfo[slaPrefix+":"+"nominal-time"]=sla.nominalTime; +
ambari git commit: AMBARI-20166. Workflow Manager. Nominal time should accept variables.(Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk 2cd4a3f33 -> dfdd00fd0 AMBARI-20166. Workflow Manager. Nominal time should accept variables.(Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dfdd00fd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dfdd00fd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dfdd00fd Branch: refs/heads/trunk Commit: dfdd00fd0b073de7b7de6556a120ddc7f4103be3 Parents: 2cd4a3f Author: Gaurav NagarAuthored: Fri Feb 24 22:39:13 2017 +0530 Committer: Gaurav Nagar Committed: Fri Feb 24 22:39:13 2017 +0530 -- .../resources/ui/app/components/sla-info.js | 37 .../resources/ui/app/domain/mapping-utils.js| 20 +-- .../main/resources/ui/app/domain/sla-info.js| 12 +-- .../ui/app/templates/components/sla-info.hbs| 12 ++- 4 files changed, 30 insertions(+), 51 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/dfdd00fd/contrib/views/wfmanager/src/main/resources/ui/app/components/sla-info.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/sla-info.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/sla-info.js index bcc209b..be5d6f9 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/sla-info.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/sla-info.js @@ -19,24 +19,6 @@ import { validator, buildValidations } from 'ember-cp-validations'; import { v1, v4 } from "ember-uuid"; const Validations = buildValidations({ - 'nominalTime': { -validators: [ - validator('presence', { -presence : true, -disabled(model, attribute) { - return !model.get('slaEnabled'); -}, -dependentKeys : ['slaEnabled'] - }), - validator('date', { -disabled(model, attribute) { - return !model.get('slaEnabled'); -}, -format: 'MM/DD/ hh:mm A', -dependentKeys : ['slaEnabled'] - }), -] - }, 'slaInfo.shouldEnd.time': { validators: [ validator('presence', { @@ -125,14 +107,6 @@ export default Ember.Component.extend(Validations, { this.set('slaEnabled', false); } Ember.addObserver(this, 'slaEnabled', this, this.slaObserver); -if(this.get('slaInfo.nominalTime')){ - var date = new Date(this.get('slaInfo.nominalTime')); - if(date && !isNaN(date.getTime())){ -var utcDate = new Date(date.getTime() + date.getTimezoneOffset()*60*1000); -this.set('nominalTime', moment(utcDate).format("MM/DD/ hh:mm A")); - } -} -Ember.addObserver(this, 'nominalTime', this, this.nominalTimeObserver); this.set('collapseId', v1()); }.on('init'), alertEventsObserver : function(){ @@ -142,24 +116,13 @@ export default Ember.Component.extend(Validations, { onDestroy : function(){ Ember.removeObserver(this, 'alertEvents.@each.alertEnabled', this, this.alertEventsObserver); Ember.removeObserver(this, 'slaEnabled', this, this.slaObserver); -Ember.removeObserver(this, 'nominalTime', this, this.nominalTimeObserver); }.on('willDestroyElement'), elementsInserted : function() { -this.$('input[name="nominalTime"]').datetimepicker({ - useCurrent: false, - showClose : true, - format: 'MM/DD/ hh:mm A', - defaultDate : this.get('slaInfo.nominalTime') -}); this.sendAction('register','slaInfo', this); if(this.get('slaEnabled')){ this.$('#slaCollapse').collapse('show'); } }.on('didInsertElement'), - nominalTimeObserver : function(){ -var date = new Date(this.get('nominalTime')); - this.set('slaInfo.nominalTime',moment(date).format("-MM-DDTHH:mm")+'Z'); - }, slaObserver : function(){ if(this.get('slaEnabled')){ this.$('#slaCollapse').collapse('show'); http://git-wip-us.apache.org/repos/asf/ambari/blob/dfdd00fd/contrib/views/wfmanager/src/main/resources/ui/app/domain/mapping-utils.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/mapping-utils.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/mapping-utils.js index 153b538..2b45c9e 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/mapping-utils.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/mapping-utils.js @@ -216,7 +216,7 @@ var SLAMapper= Ember.Object.extend({ var slaPrefix="sla"; slaInfo["__prefix"]=slaPrefix; if (sla.nominalTime){ -slaInfo[slaPrefix+":"+"nominal-time"]=sla.nominalTime; +
ambari git commit: AMBARI-20164. Kill a workflow jumps to another tab in WFM. (Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 ab8b821e2 -> ae3719754 AMBARI-20164. Kill a workflow jumps to another tab in WFM. (Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ae371975 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ae371975 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ae371975 Branch: refs/heads/branch-2.5 Commit: ae37197548bc1f4bc9111d2a51d95616a91aa0de Parents: ab8b821 Author: Gaurav NagarAuthored: Fri Feb 24 22:36:43 2017 +0530 Committer: Gaurav Nagar Committed: Fri Feb 24 22:36:54 2017 +0530 -- .../main/resources/ui/app/components/job-row.js | 2 +- .../resources/ui/app/components/search-table.js | 47 +++- .../ui/app/domain/actionjob_hanlder.js | 2 +- .../app/templates/components/search-table.hbs | 15 --- 4 files changed, 48 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ae371975/contrib/views/wfmanager/src/main/resources/ui/app/components/job-row.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/job-row.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/job-row.js index 2b40392..ab32868 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/job-row.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/job-row.js @@ -72,7 +72,7 @@ export default Ember.Component.extend({ }else if(action === 'kill'){ this.set('job.status','KILLED'); } -this.sendAction('showMessage', {type:'success', message:`${action.toUpperCase()} action complete. Job is ${this.get('job.status')}`}); +this.sendAction('showMessage', {type:'success', message:`${action.toUpperCase()} action request complete. Job is ${this.get('job.status')}`}); }.bind(this)).catch(function(e){ this.set('showError', true); this.set('showLoader', false); http://git-wip-us.apache.org/repos/asf/ambari/blob/ae371975/contrib/views/wfmanager/src/main/resources/ui/app/components/search-table.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/search-table.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/search-table.js index c8df452..5f92d6f 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/search-table.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/search-table.js @@ -44,6 +44,24 @@ export default Ember.Component.extend({ }); } }.on('didUpdate'), + handleBulkActionResponse(response){ +if (typeof response === "string") { + response = JSON.parse(response); +} +if(response.workflows){ + this.updateJobs(response.workflows, 'id'); +}else if(response.coordinatorjobs){ + this.updateJobs(response.coordinatorjobs, 'coordJobId'); +}else if(response.bundlejobs){ + this.updateJobs(response.bundlejobs, 'bundleJobId'); +} + }, + updateJobs(jobsToUpdate, queryField){ +jobsToUpdate.forEach(job =>{ + var existing = this.get('jobs.jobs').findBy('id', job[queryField]); + Ember.set(existing, 'status', job.status); +}); + }, actions: { selectAll() { this.$(".cbox").click(); @@ -56,25 +74,27 @@ export default Ember.Component.extend({ this.sendAction("doRefresh"); }, doBulkAction(action){ + this.set('showBulkActionLoader', true); var filter = ''; var deferred = Ember.RSVP.defer(); this.$('.cbox:checked').each(function(index, element){ -filter = filter + "name=" + this.$(element).attr('name')+ ";"; +filter = filter + "id=" + this.$(element).attr('id')+ ";"; }.bind(this)); var params = {}; - this.$('#bulk-action-loader').removeClass('hidden'); params.action = action; params.filter = filter; params.jobType = this.get('jobs.jobTypeValue'); params.start = this.get('jobs.start'); params.len = this.get('jobs.pageSize'); this.sendAction('onBulkAction', params, deferred); - deferred.promise.then(function(){ -this.sendAction("doRefresh"); -this.$('#bulk-action-loader').addClass('hidden'); + deferred.promise.then(function(response){ +this.set('showBulkActionLoader', false); +this.handleBulkActionResponse(response); this.set('showBulkAction', false); +this.send('showMessage', {type:'success', message:`${action.toUpperCase()} action request complete`}); }.bind(this), function(){ -
ambari git commit: AMBARI-20161. Workflow Manager-mapred action contains duplicates in editor if user saves and reopens editor.(Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 c21009a6b -> 30b333774 AMBARI-20161. Workflow Manager-mapred action contains duplicates in editor if user saves and reopens editor.(Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/30b33377 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/30b33377 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/30b33377 Branch: refs/heads/branch-2.5 Commit: 30b333774576eb06c9ce751233874f7b34d1 Parents: c21009a Author: Gaurav NagarAuthored: Fri Feb 24 16:55:46 2017 +0530 Committer: Gaurav Nagar Committed: Fri Feb 24 16:56:31 2017 +0530 -- .../src/main/resources/ui/app/components/flow-designer.js| 4 ++-- .../src/main/resources/ui/app/components/map-red-action.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/30b33377/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js index de72c6d..8597d72 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js @@ -658,7 +658,7 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { this.set('showActionEditor', true); this.set('currentAction', node.actionType); var domain = node.getNodeDetail(); -this.set('clonedDomain',Ember.copy(domain)); +this.set('clonedDomain', JSOG.stringify(domain)); this.set('clonedErrorNode', node.errorNode); this.set('clonedKillMessage',node.get('killMessage')); node.set("domain", domain); @@ -1095,7 +1095,7 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { this.currentNode.onSave(); this.doValidation(); }else { -this.set('currentNode.domain',Ember.copy(this.get('clonedDomain'))); +this.set('currentNode.domain',JSOG.parse(this.get('clonedDomain'))); this.set('currentNode.errorNode', this.get('clonedErrorNode')); if(this.currentNode.type === 'kill'){ this.set('currentNode.killMessage', this.get('clonedKillMessage')); http://git-wip-us.apache.org/repos/asf/ambari/blob/30b33377/contrib/views/wfmanager/src/main/resources/ui/app/components/map-red-action.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/map-red-action.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/map-red-action.js index 3eb8545..44ac7e7 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/map-red-action.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/map-red-action.js @@ -53,6 +53,7 @@ export default Ember.Component.extend({ } var existingStaticProp = this.get(property.belongsTo).findBy('name',property.name); if(existingStaticProp){ +this.get(property.belongsTo).removeObject(existingStaticProp); Ember.set(property,'value',existingStaticProp.value); Ember.set(existingStaticProp,'static', true); }
ambari git commit: AMBARI-20161. Workflow Manager-mapred action contains duplicates in editor if user saves and reopens editor.(Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk b82d59359 -> a2ea1f976 AMBARI-20161. Workflow Manager-mapred action contains duplicates in editor if user saves and reopens editor.(Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a2ea1f97 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a2ea1f97 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a2ea1f97 Branch: refs/heads/trunk Commit: a2ea1f9769f3c49652064b54b3e71084606a3bcd Parents: b82d593 Author: Gaurav NagarAuthored: Fri Feb 24 16:55:46 2017 +0530 Committer: Gaurav Nagar Committed: Fri Feb 24 16:55:46 2017 +0530 -- .../src/main/resources/ui/app/components/flow-designer.js| 4 ++-- .../src/main/resources/ui/app/components/map-red-action.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a2ea1f97/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js index de72c6d..8597d72 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js @@ -658,7 +658,7 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { this.set('showActionEditor', true); this.set('currentAction', node.actionType); var domain = node.getNodeDetail(); -this.set('clonedDomain',Ember.copy(domain)); +this.set('clonedDomain', JSOG.stringify(domain)); this.set('clonedErrorNode', node.errorNode); this.set('clonedKillMessage',node.get('killMessage')); node.set("domain", domain); @@ -1095,7 +1095,7 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { this.currentNode.onSave(); this.doValidation(); }else { -this.set('currentNode.domain',Ember.copy(this.get('clonedDomain'))); +this.set('currentNode.domain',JSOG.parse(this.get('clonedDomain'))); this.set('currentNode.errorNode', this.get('clonedErrorNode')); if(this.currentNode.type === 'kill'){ this.set('currentNode.killMessage', this.get('clonedKillMessage')); http://git-wip-us.apache.org/repos/asf/ambari/blob/a2ea1f97/contrib/views/wfmanager/src/main/resources/ui/app/components/map-red-action.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/map-red-action.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/map-red-action.js index 3eb8545..44ac7e7 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/map-red-action.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/map-red-action.js @@ -53,6 +53,7 @@ export default Ember.Component.extend({ } var existingStaticProp = this.get(property.belongsTo).findBy('name',property.name); if(existingStaticProp){ +this.get(property.belongsTo).removeObject(existingStaticProp); Ember.set(property,'value',existingStaticProp.value); Ember.set(existingStaticProp,'static', true); }
ambari git commit: AMBARI-20141. Workflow Manager-mapred action contains duplicates in editor if user saves and reopens editor. (Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk daf876665 -> b82d59359 AMBARI-20141. Workflow Manager-mapred action contains duplicates in editor if user saves and reopens editor. (Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b82d5935 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b82d5935 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b82d5935 Branch: refs/heads/trunk Commit: b82d5935957b975ffc301d0a11b1b992691a5db4 Parents: daf8766 Author: Gaurav NagarAuthored: Fri Feb 24 16:51:59 2017 +0530 Committer: Gaurav Nagar Committed: Fri Feb 24 16:54:28 2017 +0530 -- .../resources/ui/app/components/hive-action.js | 26 .../resources/ui/app/components/hive2-action.js | 26 .../resources/ui/app/components/java-action.js | 24 --- .../resources/ui/app/components/sqoop-action.js | 66 .../resources/ui/app/components/ssh-action.js | 14 - .../ui/app/templates/components/hive-action.hbs | 23 +++ .../app/templates/components/hive2-action.hbs | 41 ++-- .../ui/app/templates/components/java-action.hbs | 19 +++--- .../app/templates/components/sqoop-action.hbs | 40 +--- .../ui/app/templates/components/ssh-action.hbs | 7 ++- .../resources/ui/app/validators/arg-length.js | 46 ++ 11 files changed, 237 insertions(+), 95 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b82d5935/contrib/views/wfmanager/src/main/resources/ui/app/components/hive-action.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/hive-action.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/hive-action.js index ac85a9a..3c9ee63 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/hive-action.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/hive-action.js @@ -35,13 +35,6 @@ const Validations = buildValidations({ }) }); export default Ember.Component.extend(Validations, { - hiveOptionObserver : Ember.observer('isScript',function(){ -if(this.get('isScript')){ - this.set("actionModel.query", undefined); -}else{ - this.set("actionModel.script", undefined); -} - }), setUp : function(){ if(this.get('actionModel.script')){ this.set('isScript', true); @@ -78,12 +71,20 @@ export default Ember.Component.extend(Validations, { this.on('fileSelected',function(fileName){ this.set(this.get('filePathModel'), fileName); }.bind(this)); +this.send('setIsScript', this.get('isScript')); }.on('didInsertElement'), observeError :function(){ if(this.$('#collapseOne label.text-danger').length > 0 && !this.$('#collapseOne').hasClass("in")){ this.$('#collapseOne').collapse('show'); } }.on('didUpdate'), + onDestroy : function(){ +if(this.get('isScript')){ + this.set('actionModel.query', undefined); +}else{ + this.set("actionModel.script", undefined); +} + }.on('willDestroyElement'), actions : { openFileBrowser(model, context){ if(undefined === context){ @@ -95,11 +96,14 @@ export default Ember.Component.extend(Validations, { register (name, context){ this.sendAction('register',name , context); }, -onHiveOptionChange(value){ - if(value === "script"){ -this.set('isScript', true); +setIsScript(value){ + this.set('isScript', value); + if(value){ +this.$('#query-option').hide(); +this.$('#script-option').show(); }else{ -this.set('isScript', false); +this.$('#script-option').hide(); +this.$('#query-option').show(); } } } http://git-wip-us.apache.org/repos/asf/ambari/blob/b82d5935/contrib/views/wfmanager/src/main/resources/ui/app/components/hive2-action.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/hive2-action.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/hive2-action.js index f23cca7..b4c6409 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/hive2-action.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/hive2-action.js @@ -40,13 +40,6 @@ const Validations = buildValidations({ }); export default Ember.Component.extend(Validations,{ - hiveOptionObserver : Ember.observer('isScript',function(){ -if(this.get('isScript')){ - this.set("actionModel.query", undefined); -}else{ - this.set("actionModel.script", undefined); -} - }), setUp : function(){
ambari git commit: AMBARI-20141. Workflow Manager-mapred action contains duplicates in editor if user saves and reopens editor. (Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 e1a354b7d -> c21009a6b AMBARI-20141. Workflow Manager-mapred action contains duplicates in editor if user saves and reopens editor. (Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c21009a6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c21009a6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c21009a6 Branch: refs/heads/branch-2.5 Commit: c21009a6b5daa1bfbea0812f02c340df468d9e44 Parents: e1a354b Author: Gaurav NagarAuthored: Fri Feb 24 16:51:59 2017 +0530 Committer: Gaurav Nagar Committed: Fri Feb 24 16:51:59 2017 +0530 -- .../resources/ui/app/components/hive-action.js | 26 .../resources/ui/app/components/hive2-action.js | 26 .../resources/ui/app/components/java-action.js | 24 --- .../resources/ui/app/components/sqoop-action.js | 66 .../resources/ui/app/components/ssh-action.js | 14 - .../ui/app/templates/components/hive-action.hbs | 23 +++ .../app/templates/components/hive2-action.hbs | 41 ++-- .../ui/app/templates/components/java-action.hbs | 19 +++--- .../app/templates/components/sqoop-action.hbs | 40 +--- .../ui/app/templates/components/ssh-action.hbs | 7 ++- .../resources/ui/app/validators/arg-length.js | 46 ++ 11 files changed, 237 insertions(+), 95 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c21009a6/contrib/views/wfmanager/src/main/resources/ui/app/components/hive-action.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/hive-action.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/hive-action.js index ac85a9a..3c9ee63 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/hive-action.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/hive-action.js @@ -35,13 +35,6 @@ const Validations = buildValidations({ }) }); export default Ember.Component.extend(Validations, { - hiveOptionObserver : Ember.observer('isScript',function(){ -if(this.get('isScript')){ - this.set("actionModel.query", undefined); -}else{ - this.set("actionModel.script", undefined); -} - }), setUp : function(){ if(this.get('actionModel.script')){ this.set('isScript', true); @@ -78,12 +71,20 @@ export default Ember.Component.extend(Validations, { this.on('fileSelected',function(fileName){ this.set(this.get('filePathModel'), fileName); }.bind(this)); +this.send('setIsScript', this.get('isScript')); }.on('didInsertElement'), observeError :function(){ if(this.$('#collapseOne label.text-danger').length > 0 && !this.$('#collapseOne').hasClass("in")){ this.$('#collapseOne').collapse('show'); } }.on('didUpdate'), + onDestroy : function(){ +if(this.get('isScript')){ + this.set('actionModel.query', undefined); +}else{ + this.set("actionModel.script", undefined); +} + }.on('willDestroyElement'), actions : { openFileBrowser(model, context){ if(undefined === context){ @@ -95,11 +96,14 @@ export default Ember.Component.extend(Validations, { register (name, context){ this.sendAction('register',name , context); }, -onHiveOptionChange(value){ - if(value === "script"){ -this.set('isScript', true); +setIsScript(value){ + this.set('isScript', value); + if(value){ +this.$('#query-option').hide(); +this.$('#script-option').show(); }else{ -this.set('isScript', false); +this.$('#script-option').hide(); +this.$('#query-option').show(); } } } http://git-wip-us.apache.org/repos/asf/ambari/blob/c21009a6/contrib/views/wfmanager/src/main/resources/ui/app/components/hive2-action.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/hive2-action.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/hive2-action.js index f23cca7..b4c6409 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/hive2-action.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/hive2-action.js @@ -40,13 +40,6 @@ const Validations = buildValidations({ }); export default Ember.Component.extend(Validations,{ - hiveOptionObserver : Ember.observer('isScript',function(){ -if(this.get('isScript')){ - this.set("actionModel.query", undefined); -}else{ - this.set("actionModel.script", undefined); -} - }), setUp : function(){
ambari git commit: AMBARI-20050. Issue while importing workflow with insufficient permissions.(Madhan Mohan Reddy via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 53cb66ad6 -> 447fe8723 AMBARI-20050. Issue while importing workflow with insufficient permissions.(Madhan Mohan Reddy via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/447fe872 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/447fe872 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/447fe872 Branch: refs/heads/branch-2.5 Commit: 447fe87230f872ae108e1d2b476d858e45928707 Parents: 53cb66a Author: Gaurav NagarAuthored: Thu Feb 23 19:24:00 2017 +0530 Committer: Gaurav Nagar Committed: Thu Feb 23 19:25:35 2017 +0530 -- .../apache/oozie/ambari/view/OozieDelegate.java | 12 +- .../ambari/view/OozieProxyImpersonator.java | 381 +++ .../oozie/ambari/view/assets/AssetResource.java | 93 +++-- .../oozie/ambari/view/exception/ErrorCode.java | 58 +++ .../ambari/view/exception/WfmException.java | 46 +++ .../ambari/view/exception/WfmWebException.java | 115 ++ .../WorkflowsManagerResource.java | 36 +- .../ui/app/components/bundle-config.js | 8 +- .../resources/ui/app/components/coord-config.js | 6 +- .../ui/app/components/designer-errors.js| 49 +++ .../ui/app/components/flow-designer.js | 69 +--- .../ui/app/components/stack-trace-dialog.js | 26 ++ .../src/main/resources/ui/app/styles/app.less | 13 +- .../app/templates/components/bundle-config.hbs | 4 +- .../app/templates/components/coord-config.hbs | 2 +- .../templates/components/designer-errors.hbs| 17 + .../app/templates/components/flow-designer.hbs | 18 +- .../templates/components/stack-trace-dialog.hbs | 33 ++ .../components/stack-trace-dialog-test.js | 40 ++ 19 files changed, 648 insertions(+), 378 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/447fe872/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java -- diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java index 55c4312..6f3c4d2 100644 --- a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java +++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java @@ -32,6 +32,8 @@ import javax.ws.rs.core.Response; import org.apache.ambari.view.ViewContext; import org.apache.commons.io.IOUtils; +import org.apache.oozie.ambari.view.exception.ErrorCode; +import org.apache.oozie.ambari.view.exception.WfmException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -90,10 +92,16 @@ public class OozieDelegate { LOGGER.info("Resp from oozie status entity==" + serviceResponse.getEntity()); +String oozieResp=null; if (serviceResponse.getEntity() instanceof String) { - return (String) serviceResponse.getEntity(); + oozieResp= (String) serviceResponse.getEntity(); } else { - return "success"; + oozieResp= serviceResponse.getEntity().toString(); +} +if (oozieResp != null && oozieResp.trim().startsWith("{")) { + return oozieResp; +}else{ + throw new WfmException(oozieResp,ErrorCode.OOZIE_SUBMIT_ERROR); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/447fe872/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java -- diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java index 6603a9c..c4e5bbd 100644 --- a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java +++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java @@ -49,9 +49,10 @@ import javax.ws.rs.core.UriInfo; import org.apache.ambari.view.ViewContext; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.StringUtils; -import org.apache.commons.lang.exception.ExceptionUtils; -import org.apache.hadoop.security.AccessControlException; import org.apache.oozie.ambari.view.assets.AssetResource; +import org.apache.oozie.ambari.view.exception.ErrorCode; +import org.apache.oozie.ambari.view.exception.WfmException; +import org.apache.oozie.ambari.view.exception.WfmWebException; import org.apache.oozie.ambari.view.workflowmanager.WorkflowManagerService; import org.apache.oozie.ambari.view.workflowmanager.WorkflowsManagerResource; import
ambari git commit: AMBARI-20050. Issue while importing workflow with insufficient permissions.(Madhan Mohan Reddy via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk bb7b83f2b -> 9fdeec1af AMBARI-20050. Issue while importing workflow with insufficient permissions.(Madhan Mohan Reddy via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9fdeec1a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9fdeec1a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9fdeec1a Branch: refs/heads/trunk Commit: 9fdeec1afecf1983dfdb633bca0ab07b15c6d24c Parents: bb7b83f Author: Gaurav NagarAuthored: Thu Feb 23 19:24:00 2017 +0530 Committer: Gaurav Nagar Committed: Thu Feb 23 19:24:31 2017 +0530 -- .../apache/oozie/ambari/view/OozieDelegate.java | 12 +- .../ambari/view/OozieProxyImpersonator.java | 381 +++ .../oozie/ambari/view/assets/AssetResource.java | 93 +++-- .../oozie/ambari/view/exception/ErrorCode.java | 58 +++ .../ambari/view/exception/WfmException.java | 46 +++ .../ambari/view/exception/WfmWebException.java | 115 ++ .../WorkflowsManagerResource.java | 36 +- .../ui/app/components/bundle-config.js | 8 +- .../resources/ui/app/components/coord-config.js | 6 +- .../ui/app/components/designer-errors.js| 49 +++ .../ui/app/components/flow-designer.js | 69 +--- .../ui/app/components/stack-trace-dialog.js | 26 ++ .../src/main/resources/ui/app/styles/app.less | 13 +- .../app/templates/components/bundle-config.hbs | 4 +- .../app/templates/components/coord-config.hbs | 2 +- .../templates/components/designer-errors.hbs| 17 + .../app/templates/components/flow-designer.hbs | 18 +- .../templates/components/stack-trace-dialog.hbs | 33 ++ .../components/stack-trace-dialog-test.js | 40 ++ 19 files changed, 648 insertions(+), 378 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9fdeec1a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java -- diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java index 55c4312..6f3c4d2 100644 --- a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java +++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java @@ -32,6 +32,8 @@ import javax.ws.rs.core.Response; import org.apache.ambari.view.ViewContext; import org.apache.commons.io.IOUtils; +import org.apache.oozie.ambari.view.exception.ErrorCode; +import org.apache.oozie.ambari.view.exception.WfmException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -90,10 +92,16 @@ public class OozieDelegate { LOGGER.info("Resp from oozie status entity==" + serviceResponse.getEntity()); +String oozieResp=null; if (serviceResponse.getEntity() instanceof String) { - return (String) serviceResponse.getEntity(); + oozieResp= (String) serviceResponse.getEntity(); } else { - return "success"; + oozieResp= serviceResponse.getEntity().toString(); +} +if (oozieResp != null && oozieResp.trim().startsWith("{")) { + return oozieResp; +}else{ + throw new WfmException(oozieResp,ErrorCode.OOZIE_SUBMIT_ERROR); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/9fdeec1a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java -- diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java index 6603a9c..c4e5bbd 100644 --- a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java +++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java @@ -49,9 +49,10 @@ import javax.ws.rs.core.UriInfo; import org.apache.ambari.view.ViewContext; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.StringUtils; -import org.apache.commons.lang.exception.ExceptionUtils; -import org.apache.hadoop.security.AccessControlException; import org.apache.oozie.ambari.view.assets.AssetResource; +import org.apache.oozie.ambari.view.exception.ErrorCode; +import org.apache.oozie.ambari.view.exception.WfmException; +import org.apache.oozie.ambari.view.exception.WfmWebException; import org.apache.oozie.ambari.view.workflowmanager.WorkflowManagerService; import org.apache.oozie.ambari.view.workflowmanager.WorkflowsManagerResource; import
ambari git commit: Revert "AMBARI-20050. Issue while importing workflow with insufficient permissions.(Madhan Mohan Reddy via gauravn7)"
Repository: ambari Updated Branches: refs/heads/trunk 5efa6531d -> 986e7a9be Revert "AMBARI-20050. Issue while importing workflow with insufficient permissions.(Madhan Mohan Reddy via gauravn7)" This reverts commit 890ad905df0ae35c4f3d7ea6c4335fefdb05190b. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/986e7a9b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/986e7a9b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/986e7a9b Branch: refs/heads/trunk Commit: 986e7a9be5302ae557c0fc0e82027de4bad6fd43 Parents: 5efa653 Author: Gaurav NagarAuthored: Thu Feb 23 19:20:56 2017 +0530 Committer: Gaurav Nagar Committed: Thu Feb 23 19:20:56 2017 +0530 -- .../apache/oozie/ambari/view/OozieDelegate.java | 12 +- .../ambari/view/OozieProxyImpersonator.java | 381 --- .../oozie/ambari/view/assets/AssetResource.java | 93 ++--- .../WorkflowsManagerResource.java | 36 +- .../ui/app/components/bundle-config.js | 8 +- .../resources/ui/app/components/coord-config.js | 6 +- .../ui/app/components/designer-errors.js| 49 --- .../ui/app/components/flow-designer.js | 69 +++- .../src/main/resources/ui/app/styles/app.less | 13 +- .../app/templates/components/bundle-config.hbs | 4 +- .../app/templates/components/coord-config.hbs | 2 +- .../templates/components/designer-errors.hbs| 17 - .../app/templates/components/flow-designer.hbs | 18 +- 13 files changed, 378 insertions(+), 330 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/986e7a9b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java -- diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java index 6f3c4d2..55c4312 100644 --- a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java +++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java @@ -32,8 +32,6 @@ import javax.ws.rs.core.Response; import org.apache.ambari.view.ViewContext; import org.apache.commons.io.IOUtils; -import org.apache.oozie.ambari.view.exception.ErrorCode; -import org.apache.oozie.ambari.view.exception.WfmException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -92,16 +90,10 @@ public class OozieDelegate { LOGGER.info("Resp from oozie status entity==" + serviceResponse.getEntity()); -String oozieResp=null; if (serviceResponse.getEntity() instanceof String) { - oozieResp= (String) serviceResponse.getEntity(); + return (String) serviceResponse.getEntity(); } else { - oozieResp= serviceResponse.getEntity().toString(); -} -if (oozieResp != null && oozieResp.trim().startsWith("{")) { - return oozieResp; -}else{ - throw new WfmException(oozieResp,ErrorCode.OOZIE_SUBMIT_ERROR); + return "success"; } } http://git-wip-us.apache.org/repos/asf/ambari/blob/986e7a9b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java -- diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java index c4e5bbd..6603a9c 100644 --- a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java +++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java @@ -49,10 +49,9 @@ import javax.ws.rs.core.UriInfo; import org.apache.ambari.view.ViewContext; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.exception.ExceptionUtils; +import org.apache.hadoop.security.AccessControlException; import org.apache.oozie.ambari.view.assets.AssetResource; -import org.apache.oozie.ambari.view.exception.ErrorCode; -import org.apache.oozie.ambari.view.exception.WfmException; -import org.apache.oozie.ambari.view.exception.WfmWebException; import org.apache.oozie.ambari.view.workflowmanager.WorkflowManagerService; import org.apache.oozie.ambari.view.workflowmanager.WorkflowsManagerResource; import org.slf4j.Logger; @@ -84,7 +83,30 @@ public class OozieProxyImpersonator { private final OozieUtils oozieUtils = new OozieUtils(); private final AssetResource assetResource; + private enum ErrorCodes { +OOZIE_SUBMIT_ERROR("error.oozie.submit", "Oozie Submit error"), OOZIE_IO_ERROR(
ambari git commit: Revert "AMBARI-20050. Issue while importing workflow with insufficient permissions.(Madhan Mohan Reddy via gauravn7)"
Repository: ambari Updated Branches: refs/heads/branch-2.5 ab5749a99 -> 523247aaf Revert "AMBARI-20050. Issue while importing workflow with insufficient permissions.(Madhan Mohan Reddy via gauravn7)" This reverts commit ab5749a99e02643dd0808f6baf0c6c3c91e88fa9. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/523247aa Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/523247aa Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/523247aa Branch: refs/heads/branch-2.5 Commit: 523247aaf24b9b766927e97e35cb2f9e5e790fbf Parents: ab5749a Author: Gaurav NagarAuthored: Thu Feb 23 19:19:34 2017 +0530 Committer: Gaurav Nagar Committed: Thu Feb 23 19:19:34 2017 +0530 -- .../apache/oozie/ambari/view/OozieDelegate.java | 12 +- .../ambari/view/OozieProxyImpersonator.java | 381 --- .../oozie/ambari/view/assets/AssetResource.java | 93 ++--- .../WorkflowsManagerResource.java | 36 +- .../ui/app/components/bundle-config.js | 8 +- .../resources/ui/app/components/coord-config.js | 6 +- .../ui/app/components/designer-errors.js| 49 --- .../ui/app/components/flow-designer.js | 69 +++- .../src/main/resources/ui/app/styles/app.less | 13 +- .../app/templates/components/bundle-config.hbs | 4 +- .../app/templates/components/coord-config.hbs | 2 +- .../templates/components/designer-errors.hbs| 17 - .../app/templates/components/flow-designer.hbs | 18 +- 13 files changed, 378 insertions(+), 330 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/523247aa/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java -- diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java index 6f3c4d2..55c4312 100644 --- a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java +++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java @@ -32,8 +32,6 @@ import javax.ws.rs.core.Response; import org.apache.ambari.view.ViewContext; import org.apache.commons.io.IOUtils; -import org.apache.oozie.ambari.view.exception.ErrorCode; -import org.apache.oozie.ambari.view.exception.WfmException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -92,16 +90,10 @@ public class OozieDelegate { LOGGER.info("Resp from oozie status entity==" + serviceResponse.getEntity()); -String oozieResp=null; if (serviceResponse.getEntity() instanceof String) { - oozieResp= (String) serviceResponse.getEntity(); + return (String) serviceResponse.getEntity(); } else { - oozieResp= serviceResponse.getEntity().toString(); -} -if (oozieResp != null && oozieResp.trim().startsWith("{")) { - return oozieResp; -}else{ - throw new WfmException(oozieResp,ErrorCode.OOZIE_SUBMIT_ERROR); + return "success"; } } http://git-wip-us.apache.org/repos/asf/ambari/blob/523247aa/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java -- diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java index c4e5bbd..6603a9c 100644 --- a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java +++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java @@ -49,10 +49,9 @@ import javax.ws.rs.core.UriInfo; import org.apache.ambari.view.ViewContext; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.exception.ExceptionUtils; +import org.apache.hadoop.security.AccessControlException; import org.apache.oozie.ambari.view.assets.AssetResource; -import org.apache.oozie.ambari.view.exception.ErrorCode; -import org.apache.oozie.ambari.view.exception.WfmException; -import org.apache.oozie.ambari.view.exception.WfmWebException; import org.apache.oozie.ambari.view.workflowmanager.WorkflowManagerService; import org.apache.oozie.ambari.view.workflowmanager.WorkflowsManagerResource; import org.slf4j.Logger; @@ -84,7 +83,30 @@ public class OozieProxyImpersonator { private final OozieUtils oozieUtils = new OozieUtils(); private final AssetResource assetResource; + private enum ErrorCodes { +OOZIE_SUBMIT_ERROR("error.oozie.submit", "Oozie Submit error"),
ambari git commit: AMBARI-20050. Issue while importing workflow with insufficient permissions.(Madhan Mohan Reddy via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 df0793801 -> ab5749a99 AMBARI-20050. Issue while importing workflow with insufficient permissions.(Madhan Mohan Reddy via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ab5749a9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ab5749a9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ab5749a9 Branch: refs/heads/branch-2.5 Commit: ab5749a99e02643dd0808f6baf0c6c3c91e88fa9 Parents: df07938 Author: Gaurav NagarAuthored: Thu Feb 23 19:14:35 2017 +0530 Committer: Gaurav Nagar Committed: Thu Feb 23 19:15:26 2017 +0530 -- .../apache/oozie/ambari/view/OozieDelegate.java | 12 +- .../ambari/view/OozieProxyImpersonator.java | 381 +++ .../oozie/ambari/view/assets/AssetResource.java | 93 +++-- .../WorkflowsManagerResource.java | 36 +- .../ui/app/components/bundle-config.js | 8 +- .../resources/ui/app/components/coord-config.js | 6 +- .../ui/app/components/designer-errors.js| 49 +++ .../ui/app/components/flow-designer.js | 69 +--- .../src/main/resources/ui/app/styles/app.less | 13 +- .../app/templates/components/bundle-config.hbs | 4 +- .../app/templates/components/coord-config.hbs | 2 +- .../templates/components/designer-errors.hbs| 17 + .../app/templates/components/flow-designer.hbs | 18 +- 13 files changed, 330 insertions(+), 378 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ab5749a9/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java -- diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java index 55c4312..6f3c4d2 100644 --- a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java +++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java @@ -32,6 +32,8 @@ import javax.ws.rs.core.Response; import org.apache.ambari.view.ViewContext; import org.apache.commons.io.IOUtils; +import org.apache.oozie.ambari.view.exception.ErrorCode; +import org.apache.oozie.ambari.view.exception.WfmException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -90,10 +92,16 @@ public class OozieDelegate { LOGGER.info("Resp from oozie status entity==" + serviceResponse.getEntity()); +String oozieResp=null; if (serviceResponse.getEntity() instanceof String) { - return (String) serviceResponse.getEntity(); + oozieResp= (String) serviceResponse.getEntity(); } else { - return "success"; + oozieResp= serviceResponse.getEntity().toString(); +} +if (oozieResp != null && oozieResp.trim().startsWith("{")) { + return oozieResp; +}else{ + throw new WfmException(oozieResp,ErrorCode.OOZIE_SUBMIT_ERROR); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/ab5749a9/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java -- diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java index 6603a9c..c4e5bbd 100644 --- a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java +++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java @@ -49,9 +49,10 @@ import javax.ws.rs.core.UriInfo; import org.apache.ambari.view.ViewContext; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.StringUtils; -import org.apache.commons.lang.exception.ExceptionUtils; -import org.apache.hadoop.security.AccessControlException; import org.apache.oozie.ambari.view.assets.AssetResource; +import org.apache.oozie.ambari.view.exception.ErrorCode; +import org.apache.oozie.ambari.view.exception.WfmException; +import org.apache.oozie.ambari.view.exception.WfmWebException; import org.apache.oozie.ambari.view.workflowmanager.WorkflowManagerService; import org.apache.oozie.ambari.view.workflowmanager.WorkflowsManagerResource; import org.slf4j.Logger; @@ -83,30 +84,7 @@ public class OozieProxyImpersonator { private final OozieUtils oozieUtils = new OozieUtils(); private final AssetResource assetResource; - private enum ErrorCodes { -OOZIE_SUBMIT_ERROR("error.oozie.submit", "Oozie Submit error"), OOZIE_IO_ERROR( - "error.oozie.io", "Oozie I/O error"),
ambari git commit: AMBARI-20050. Issue while importing workflow with insufficient permissions.(Madhan Mohan Reddy via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk e1cb3b1e2 -> 890ad905d AMBARI-20050. Issue while importing workflow with insufficient permissions.(Madhan Mohan Reddy via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/890ad905 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/890ad905 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/890ad905 Branch: refs/heads/trunk Commit: 890ad905df0ae35c4f3d7ea6c4335fefdb05190b Parents: e1cb3b1 Author: Gaurav NagarAuthored: Thu Feb 23 19:14:35 2017 +0530 Committer: Gaurav Nagar Committed: Thu Feb 23 19:14:35 2017 +0530 -- .../apache/oozie/ambari/view/OozieDelegate.java | 12 +- .../ambari/view/OozieProxyImpersonator.java | 381 +++ .../oozie/ambari/view/assets/AssetResource.java | 93 +++-- .../WorkflowsManagerResource.java | 36 +- .../ui/app/components/bundle-config.js | 8 +- .../resources/ui/app/components/coord-config.js | 6 +- .../ui/app/components/designer-errors.js| 49 +++ .../ui/app/components/flow-designer.js | 69 +--- .../src/main/resources/ui/app/styles/app.less | 13 +- .../app/templates/components/bundle-config.hbs | 4 +- .../app/templates/components/coord-config.hbs | 2 +- .../templates/components/designer-errors.hbs| 17 + .../app/templates/components/flow-designer.hbs | 18 +- 13 files changed, 330 insertions(+), 378 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/890ad905/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java -- diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java index 55c4312..6f3c4d2 100644 --- a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java +++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java @@ -32,6 +32,8 @@ import javax.ws.rs.core.Response; import org.apache.ambari.view.ViewContext; import org.apache.commons.io.IOUtils; +import org.apache.oozie.ambari.view.exception.ErrorCode; +import org.apache.oozie.ambari.view.exception.WfmException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -90,10 +92,16 @@ public class OozieDelegate { LOGGER.info("Resp from oozie status entity==" + serviceResponse.getEntity()); +String oozieResp=null; if (serviceResponse.getEntity() instanceof String) { - return (String) serviceResponse.getEntity(); + oozieResp= (String) serviceResponse.getEntity(); } else { - return "success"; + oozieResp= serviceResponse.getEntity().toString(); +} +if (oozieResp != null && oozieResp.trim().startsWith("{")) { + return oozieResp; +}else{ + throw new WfmException(oozieResp,ErrorCode.OOZIE_SUBMIT_ERROR); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/890ad905/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java -- diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java index 6603a9c..c4e5bbd 100644 --- a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java +++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java @@ -49,9 +49,10 @@ import javax.ws.rs.core.UriInfo; import org.apache.ambari.view.ViewContext; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.StringUtils; -import org.apache.commons.lang.exception.ExceptionUtils; -import org.apache.hadoop.security.AccessControlException; import org.apache.oozie.ambari.view.assets.AssetResource; +import org.apache.oozie.ambari.view.exception.ErrorCode; +import org.apache.oozie.ambari.view.exception.WfmException; +import org.apache.oozie.ambari.view.exception.WfmWebException; import org.apache.oozie.ambari.view.workflowmanager.WorkflowManagerService; import org.apache.oozie.ambari.view.workflowmanager.WorkflowsManagerResource; import org.slf4j.Logger; @@ -83,30 +84,7 @@ public class OozieProxyImpersonator { private final OozieUtils oozieUtils = new OozieUtils(); private final AssetResource assetResource; - private enum ErrorCodes { -OOZIE_SUBMIT_ERROR("error.oozie.submit", "Oozie Submit error"), OOZIE_IO_ERROR( - "error.oozie.io", "Oozie I/O error"), FILE_ACCESS_ACL_ERROR( -
ambari git commit: AMBARI-20137. File upload from Ambari File View does not work in Chrome 56.0.2924.87 and IE 11.(gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk 98f40e324 -> e1cb3b1e2 AMBARI-20137. File upload from Ambari File View does not work in Chrome 56.0.2924.87 and IE 11.(gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e1cb3b1e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e1cb3b1e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e1cb3b1e Branch: refs/heads/trunk Commit: e1cb3b1e2a01c04bac96ea3b5b5957848eec721a Parents: 98f40e3 Author: Gaurav NagarAuthored: Thu Feb 23 19:09:10 2017 +0530 Committer: Gaurav Nagar Committed: Thu Feb 23 19:12:34 2017 +0530 -- .../ambari/view/commons/hdfs/UploadService.java | 2 +- .../resources/ui/app/adapters/application.js | 6 ++ .../resources/ui/app/components/upload-file.js | 19 +++ 3 files changed, 22 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e1cb3b1e/contrib/views/commons/src/main/java/org/apache/ambari/view/commons/hdfs/UploadService.java -- diff --git a/contrib/views/commons/src/main/java/org/apache/ambari/view/commons/hdfs/UploadService.java b/contrib/views/commons/src/main/java/org/apache/ambari/view/commons/hdfs/UploadService.java index 26a4873..a2fe7eb 100644 --- a/contrib/views/commons/src/main/java/org/apache/ambari/view/commons/hdfs/UploadService.java +++ b/contrib/views/commons/src/main/java/org/apache/ambari/view/commons/hdfs/UploadService.java @@ -94,7 +94,7 @@ public class UploadService extends HdfsService { try { if (!path.endsWith("/")) path = path + "/"; - String filePath = path + contentDisposition.getFileName(); + String filePath = path + new String(contentDisposition.getFileName().getBytes("ISO8859-1"),"UTF-8"); uploadFile(filePath, uploadedInputStream); return Response.ok( getApi().fileStatusToJSON(getApi().getFileStatus(filePath))) http://git-wip-us.apache.org/repos/asf/ambari/blob/e1cb3b1e/contrib/views/files/src/main/resources/ui/app/adapters/application.js -- diff --git a/contrib/views/files/src/main/resources/ui/app/adapters/application.js b/contrib/views/files/src/main/resources/ui/app/adapters/application.js index 4042851..059d379 100644 --- a/contrib/views/files/src/main/resources/ui/app/adapters/application.js +++ b/contrib/views/files/src/main/resources/ui/app/adapters/application.js @@ -20,6 +20,12 @@ import DS from 'ember-data'; import Ember from 'ember'; export default DS.RESTAdapter.extend({ + init: function () { +Ember.$.ajaxSetup({ + cache: false +}); + }, + namespace: Ember.computed(function() { var parts = window.location.pathname.split('/').filter(function(i) { return i !== ""; http://git-wip-us.apache.org/repos/asf/ambari/blob/e1cb3b1e/contrib/views/files/src/main/resources/ui/app/components/upload-file.js -- diff --git a/contrib/views/files/src/main/resources/ui/app/components/upload-file.js b/contrib/views/files/src/main/resources/ui/app/components/upload-file.js index 96686db..8a14272 100644 --- a/contrib/views/files/src/main/resources/ui/app/components/upload-file.js +++ b/contrib/views/files/src/main/resources/ui/app/components/upload-file.js @@ -58,13 +58,19 @@ export default Ember.Component.extend(OperationModal, { _checkIfFileIsNotDirectory: function(file) { return new Ember.RSVP.Promise((resolve, reject) => { + let isSuccess = false; + if (!Ember.isNone(file.size) && file.size <= 4096) { // Directories generally have less equal to 4096 bytes as size var reader = new FileReader(); reader.onerror = function() { - return reject(); + if(isSuccess) { +return; + } + return reject(reader.error); }; reader.onloadstart = function() { + isSuccess = true; reader.abort(); return resolve(); }; @@ -92,7 +98,6 @@ export default Ember.Component.extend(OperationModal, { }, fileLoaded: function(file) { - this._checkIfFileIsNotDirectory(file).then(() => { var url = this.get('fileOperationService').getUploadUrl(); var uploader = FileUploader.create({ @@ -118,8 +123,14 @@ export default Ember.Component.extend(OperationModal, { return false; }); } - }, () => { -console.error("Cannot add a directory."); + }, (error) => { +console.error("Cannot add a directory.", error); +this.send('close'); +let message = "Cannot add a directory ";
ambari git commit: AMBARI-20137. File upload from Ambari File View does not work in Chrome 56.0.2924.87 and IE 11.(gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 01b0080cb -> df0793801 AMBARI-20137. File upload from Ambari File View does not work in Chrome 56.0.2924.87 and IE 11.(gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/df079380 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/df079380 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/df079380 Branch: refs/heads/branch-2.5 Commit: df0793801d7dae03d526fd3daecd4e500597d7bd Parents: 01b0080 Author: Gaurav NagarAuthored: Thu Feb 23 19:09:10 2017 +0530 Committer: Gaurav Nagar Committed: Thu Feb 23 19:09:10 2017 +0530 -- .../ambari/view/commons/hdfs/UploadService.java | 2 +- .../resources/ui/app/adapters/application.js | 6 ++ .../resources/ui/app/components/upload-file.js | 19 +++ 3 files changed, 22 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/df079380/contrib/views/commons/src/main/java/org/apache/ambari/view/commons/hdfs/UploadService.java -- diff --git a/contrib/views/commons/src/main/java/org/apache/ambari/view/commons/hdfs/UploadService.java b/contrib/views/commons/src/main/java/org/apache/ambari/view/commons/hdfs/UploadService.java index 26a4873..a2fe7eb 100644 --- a/contrib/views/commons/src/main/java/org/apache/ambari/view/commons/hdfs/UploadService.java +++ b/contrib/views/commons/src/main/java/org/apache/ambari/view/commons/hdfs/UploadService.java @@ -94,7 +94,7 @@ public class UploadService extends HdfsService { try { if (!path.endsWith("/")) path = path + "/"; - String filePath = path + contentDisposition.getFileName(); + String filePath = path + new String(contentDisposition.getFileName().getBytes("ISO8859-1"),"UTF-8"); uploadFile(filePath, uploadedInputStream); return Response.ok( getApi().fileStatusToJSON(getApi().getFileStatus(filePath))) http://git-wip-us.apache.org/repos/asf/ambari/blob/df079380/contrib/views/files/src/main/resources/ui/app/adapters/application.js -- diff --git a/contrib/views/files/src/main/resources/ui/app/adapters/application.js b/contrib/views/files/src/main/resources/ui/app/adapters/application.js index 4042851..059d379 100644 --- a/contrib/views/files/src/main/resources/ui/app/adapters/application.js +++ b/contrib/views/files/src/main/resources/ui/app/adapters/application.js @@ -20,6 +20,12 @@ import DS from 'ember-data'; import Ember from 'ember'; export default DS.RESTAdapter.extend({ + init: function () { +Ember.$.ajaxSetup({ + cache: false +}); + }, + namespace: Ember.computed(function() { var parts = window.location.pathname.split('/').filter(function(i) { return i !== ""; http://git-wip-us.apache.org/repos/asf/ambari/blob/df079380/contrib/views/files/src/main/resources/ui/app/components/upload-file.js -- diff --git a/contrib/views/files/src/main/resources/ui/app/components/upload-file.js b/contrib/views/files/src/main/resources/ui/app/components/upload-file.js index 96686db..8a14272 100644 --- a/contrib/views/files/src/main/resources/ui/app/components/upload-file.js +++ b/contrib/views/files/src/main/resources/ui/app/components/upload-file.js @@ -58,13 +58,19 @@ export default Ember.Component.extend(OperationModal, { _checkIfFileIsNotDirectory: function(file) { return new Ember.RSVP.Promise((resolve, reject) => { + let isSuccess = false; + if (!Ember.isNone(file.size) && file.size <= 4096) { // Directories generally have less equal to 4096 bytes as size var reader = new FileReader(); reader.onerror = function() { - return reject(); + if(isSuccess) { +return; + } + return reject(reader.error); }; reader.onloadstart = function() { + isSuccess = true; reader.abort(); return resolve(); }; @@ -92,7 +98,6 @@ export default Ember.Component.extend(OperationModal, { }, fileLoaded: function(file) { - this._checkIfFileIsNotDirectory(file).then(() => { var url = this.get('fileOperationService').getUploadUrl(); var uploader = FileUploader.create({ @@ -118,8 +123,14 @@ export default Ember.Component.extend(OperationModal, { return false; }); } - }, () => { -console.error("Cannot add a directory."); + }, (error) => { +console.error("Cannot add a directory.", error); +this.send('close'); +let message = "Cannot add a
ambari git commit: AMBARI-20135. Hive view 2.0 : Hanging query - no cancel available.(gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 304bd0605 -> 01b0080cb AMBARI-20135. Hive view 2.0 : Hanging query - no cancel available.(gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/01b0080c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/01b0080c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/01b0080c Branch: refs/heads/branch-2.5 Commit: 01b0080cbe859271fd2a79cc316e4bf7d6c2a82f Parents: 304bd06 Author: Gaurav NagarAuthored: Thu Feb 23 19:02:13 2017 +0530 Committer: Gaurav Nagar Committed: Thu Feb 23 19:03:03 2017 +0530 -- .../ambari/view/hive20/actor/JdbcConnector.java | 1 + .../resources/ui/app/routes/queries/query.js | 19 +-- .../src/main/resources/ui/app/services/jobs.js | 5 + .../resources/ui/app/templates/queries/query.hbs | 10 +- 4 files changed, 32 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/01b0080c/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/JdbcConnector.java -- diff --git a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/JdbcConnector.java b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/JdbcConnector.java index 1d9744b..61f0b66 100644 --- a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/JdbcConnector.java +++ b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/JdbcConnector.java @@ -238,6 +238,7 @@ public class JdbcConnector extends HiveActor { try { isCancelCalled = true; connectionDelegate.cancel(); + LOG.info("Cancelled JobId:"+ jobId); } catch (SQLException e) { LOG.error("Failed to cancel job. JobId: {}. {}", message.getJobId(), e); } http://git-wip-us.apache.org/repos/asf/ambari/blob/01b0080c/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js b/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js index 5bed2c6..16103b7 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js +++ b/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js @@ -137,6 +137,8 @@ export default Ember.Route.extend(UILoggerMixin, { controller.set('currentJobId', null); controller.set('queryResult', model.get('queryResult')); controller.set('isJobSuccess', false); +controller.set('isJobCancelled', false); +controller.set('isJobCreated', false); controller.set('isExportResultSuccessMessege', false); controller.set('isExportResultFailureMessege', false); @@ -236,10 +238,10 @@ export default Ember.Route.extend(UILoggerMixin, { this.get('controller').set('currentJobId', null); if(!Ember.isEmpty(isVisualExplainQuery)){ -var isVisualExplainQuery = true; +isVisualExplainQuery = true; this.get('controller').set('isVisualExplainQuery', true); } else { -var isVisualExplainQuery = false; +isVisualExplainQuery = false; this.get('controller').set('isVisualExplainQuery', false); } @@ -285,6 +287,7 @@ export default Ember.Route.extend(UILoggerMixin, { this.get('controller.model').set('isQueryRunning', true); + this.get('controller.model').set('isJobCreated',false); //this.get('controller').set('queryResult', self.get('controller').get('queryResult')); //this.get('controller.model').set('queryResult', self.get('controller').get('queryResult')); @@ -306,10 +309,13 @@ export default Ember.Route.extend(UILoggerMixin, { self.get('controller.model').set('queryFile', data.job.queryFile); self.get('controller.model').set('logFile', data.job.logFile); self.get('controller').set('currentJobId', data.job.id); +self.get('controller').set('isJobCreated',true); self.get('jobs').waitForJobToComplete(data.job.id, 2 * 1000, false) .then((status) => { self.get('controller').set('isJobSuccess', true); +self.get('controller').set('isJobCancelled', false); +self.get('controller').set('isJobCreated', false); let jobDetails = self.store.peekRecord('job', data.job.id); console.log(jobDetails); self.send('getJobResult', data, payload.title, jobDetails); @@ -317,6 +323,9 @@ export default Ember.Route.extend(UILoggerMixin, { }, (error) => { console.log('error', error); +
ambari git commit: AMBARI-20135. Hive view 2.0 : Hanging query - no cancel available.(gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk 70f23c070 -> 6572b16e8 AMBARI-20135. Hive view 2.0 : Hanging query - no cancel available.(gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6572b16e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6572b16e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6572b16e Branch: refs/heads/trunk Commit: 6572b16e8f721cfabba4b6cdb10d52e6f4f9e382 Parents: 70f23c0 Author: Gaurav NagarAuthored: Thu Feb 23 19:02:13 2017 +0530 Committer: Gaurav Nagar Committed: Thu Feb 23 19:02:13 2017 +0530 -- .../ambari/view/hive20/actor/JdbcConnector.java | 1 + .../resources/ui/app/routes/queries/query.js | 19 +-- .../src/main/resources/ui/app/services/jobs.js | 5 + .../resources/ui/app/templates/queries/query.hbs | 10 +- 4 files changed, 32 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6572b16e/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/JdbcConnector.java -- diff --git a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/JdbcConnector.java b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/JdbcConnector.java index 1d9744b..61f0b66 100644 --- a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/JdbcConnector.java +++ b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/JdbcConnector.java @@ -238,6 +238,7 @@ public class JdbcConnector extends HiveActor { try { isCancelCalled = true; connectionDelegate.cancel(); + LOG.info("Cancelled JobId:"+ jobId); } catch (SQLException e) { LOG.error("Failed to cancel job. JobId: {}. {}", message.getJobId(), e); } http://git-wip-us.apache.org/repos/asf/ambari/blob/6572b16e/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js b/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js index 5bed2c6..16103b7 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js +++ b/contrib/views/hive20/src/main/resources/ui/app/routes/queries/query.js @@ -137,6 +137,8 @@ export default Ember.Route.extend(UILoggerMixin, { controller.set('currentJobId', null); controller.set('queryResult', model.get('queryResult')); controller.set('isJobSuccess', false); +controller.set('isJobCancelled', false); +controller.set('isJobCreated', false); controller.set('isExportResultSuccessMessege', false); controller.set('isExportResultFailureMessege', false); @@ -236,10 +238,10 @@ export default Ember.Route.extend(UILoggerMixin, { this.get('controller').set('currentJobId', null); if(!Ember.isEmpty(isVisualExplainQuery)){ -var isVisualExplainQuery = true; +isVisualExplainQuery = true; this.get('controller').set('isVisualExplainQuery', true); } else { -var isVisualExplainQuery = false; +isVisualExplainQuery = false; this.get('controller').set('isVisualExplainQuery', false); } @@ -285,6 +287,7 @@ export default Ember.Route.extend(UILoggerMixin, { this.get('controller.model').set('isQueryRunning', true); + this.get('controller.model').set('isJobCreated',false); //this.get('controller').set('queryResult', self.get('controller').get('queryResult')); //this.get('controller.model').set('queryResult', self.get('controller').get('queryResult')); @@ -306,10 +309,13 @@ export default Ember.Route.extend(UILoggerMixin, { self.get('controller.model').set('queryFile', data.job.queryFile); self.get('controller.model').set('logFile', data.job.logFile); self.get('controller').set('currentJobId', data.job.id); +self.get('controller').set('isJobCreated',true); self.get('jobs').waitForJobToComplete(data.job.id, 2 * 1000, false) .then((status) => { self.get('controller').set('isJobSuccess', true); +self.get('controller').set('isJobCancelled', false); +self.get('controller').set('isJobCreated', false); let jobDetails = self.store.peekRecord('job', data.job.id); console.log(jobDetails); self.send('getJobResult', data, payload.title, jobDetails); @@ -317,6 +323,9 @@ export default Ember.Route.extend(UILoggerMixin, { }, (error) => { console.log('error', error); +
ambari git commit: AMBARI-20093. Cannot edit join node name in Workflow Manager.(Belliraj HB via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk ba470c186 -> 5186db066 AMBARI-20093. Cannot edit join node name in Workflow Manager.(Belliraj HB via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5186db06 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5186db06 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5186db06 Branch: refs/heads/trunk Commit: 5186db06659916148229fbd02aa742b7caeaa2f9 Parents: ba470c1 Author: Gaurav NagarAuthored: Thu Feb 23 11:18:44 2017 +0530 Committer: Gaurav Nagar Committed: Thu Feb 23 11:19:36 2017 +0530 -- .../main/resources/ui/app/domain/cytoscape-flow-renderer.js | 2 +- .../src/main/resources/ui/app/domain/cytoscape-style.js | 8 .../resources/ui/app/templates/components/flow-designer.hbs | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5186db06/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js index 51e0461..75ceecb 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js @@ -19,7 +19,7 @@ import Ember from 'ember'; import CytoscapeStyles from '../domain/cytoscape-style'; var CytoscapeRenderer= Ember.Object.extend({ currentCyNode: null, - staticNodes: ['start', 'end', 'join', 'placeholder'], + staticNodes: ['start', 'end', 'placeholder'], dataNodes: [], cyOverflow: {}, cy: null, http://git-wip-us.apache.org/repos/asf/ambari/blob/5186db06/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-style.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-style.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-style.js index 2eb01d1..e05b782 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-style.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-style.js @@ -18,6 +18,7 @@ import Ember from 'ember'; var defaultNodeColor = '#fff'; var actionNodeColor = '#f5f5f5'; +var killNodeColor='#d43f3a' var labelFunction=function(target) { if (!target.data().node.name) { return ""; @@ -114,6 +115,13 @@ export default Ember.Object.create({ return "none"; } }, +'color': function(target){ + if (!target.data().transition || !target.data().transition.isOnError()) { +return "black" + }else{ +return killNodeColor; + } +}, width: 1, 'font-size': 12, label: function(target) { http://git-wip-us.apache.org/repos/asf/ambari/blob/5186db06/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs index 0356e9c..1a73421 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs @@ -197,7 +197,7 @@ {{#each dataNodes as |dataNode|}} -{{#if (or (eq dataNode.data.type 'action') (eq dataNode.data.type 'decision') (eq dataNode.data.type 'fork'))}} +{{#if (or (eq dataNode.data.type 'action') (eq dataNode.data.type 'decision') (eq dataNode.data.type 'fork') (eq dataNode.data.type 'join'))}} {{input required pattern="([a-zA-Z_]([\-_a-zA-Z0-9])*){1,39}" name="actionName" data-toggle="tooltip" title=dataNode.name classBinding="dataNode.data.node.errors:error:editable" class="editableNode overlay_node_editor" value=dataNode.dataNodeName placeholder="Action Name"}}
ambari git commit: AMBARI-20093. Cannot edit join node name in Workflow Manager.(Belliraj HB via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 a0cfe6a7f -> 7152be6e5 AMBARI-20093. Cannot edit join node name in Workflow Manager.(Belliraj HB via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7152be6e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7152be6e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7152be6e Branch: refs/heads/branch-2.5 Commit: 7152be6e5b7f59eddb98fb5bd250aa0f54331178 Parents: a0cfe6a Author: Gaurav NagarAuthored: Thu Feb 23 11:18:44 2017 +0530 Committer: Gaurav Nagar Committed: Thu Feb 23 11:18:44 2017 +0530 -- .../main/resources/ui/app/domain/cytoscape-flow-renderer.js | 2 +- .../src/main/resources/ui/app/domain/cytoscape-style.js | 8 .../resources/ui/app/templates/components/flow-designer.hbs | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7152be6e/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js index 51e0461..75ceecb 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js @@ -19,7 +19,7 @@ import Ember from 'ember'; import CytoscapeStyles from '../domain/cytoscape-style'; var CytoscapeRenderer= Ember.Object.extend({ currentCyNode: null, - staticNodes: ['start', 'end', 'join', 'placeholder'], + staticNodes: ['start', 'end', 'placeholder'], dataNodes: [], cyOverflow: {}, cy: null, http://git-wip-us.apache.org/repos/asf/ambari/blob/7152be6e/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-style.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-style.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-style.js index 2eb01d1..e05b782 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-style.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-style.js @@ -18,6 +18,7 @@ import Ember from 'ember'; var defaultNodeColor = '#fff'; var actionNodeColor = '#f5f5f5'; +var killNodeColor='#d43f3a' var labelFunction=function(target) { if (!target.data().node.name) { return ""; @@ -114,6 +115,13 @@ export default Ember.Object.create({ return "none"; } }, +'color': function(target){ + if (!target.data().transition || !target.data().transition.isOnError()) { +return "black" + }else{ +return killNodeColor; + } +}, width: 1, 'font-size': 12, label: function(target) { http://git-wip-us.apache.org/repos/asf/ambari/blob/7152be6e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs index 0356e9c..1a73421 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs @@ -197,7 +197,7 @@ {{#each dataNodes as |dataNode|}} -{{#if (or (eq dataNode.data.type 'action') (eq dataNode.data.type 'decision') (eq dataNode.data.type 'fork'))}} +{{#if (or (eq dataNode.data.type 'action') (eq dataNode.data.type 'decision') (eq dataNode.data.type 'fork') (eq dataNode.data.type 'join'))}} {{input required pattern="([a-zA-Z_]([\-_a-zA-Z0-9])*){1,39}" name="actionName" data-toggle="tooltip" title=dataNode.name classBinding="dataNode.data.node.errors:error:editable" class="editableNode overlay_node_editor" value=dataNode.dataNodeName placeholder="Action Name"}}
ambari git commit: AMBARI-20107. Action node shows unsupported properties even though there are none in workflow manager.(Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 602e0a3e2 -> a0cfe6a7f AMBARI-20107. Action node shows unsupported properties even though there are none in workflow manager.(Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a0cfe6a7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a0cfe6a7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a0cfe6a7 Branch: refs/heads/branch-2.5 Commit: a0cfe6a7f0d57daa6c96feb90a1ea6ef362e74a6 Parents: 602e0a3 Author: Gaurav NagarAuthored: Thu Feb 23 10:58:02 2017 +0530 Committer: Gaurav Nagar Committed: Thu Feb 23 10:59:01 2017 +0530 -- .../ui/app/components/workflow-action-editor.js | 40 .../components/workflow-action-editor.hbs | 5 ++- 2 files changed, 36 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a0cfe6a7/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-action-editor.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-action-editor.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-action-editor.js index d09de7d..e19646d 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-action-editor.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-action-editor.js @@ -62,8 +62,18 @@ export default Ember.Component.extend( Ember.Evented,{ saveClicked : false, unsupportedPropertiesXml : Ember.computed('actionModel.unsupportedProperties', { get(key){ + let unsupportedPropertiesXml; + if(!this.get('actionModel.unsupportedProperties')){ +return unsupportedPropertiesXml; + } let x2js = new X2JS(); - return vkbeautify.xml(x2js.json2xml_str(this.get('actionModel.unsupportedProperties'))); + let unsupportedProperties = Ember.copy(this.get('actionModel.unsupportedProperties')); + delete unsupportedProperties['@id']; + delete unsupportedProperties.__jsogObjectId; + if(!Ember.isEmpty(Object.keys(unsupportedProperties))){ +unsupportedPropertiesXml = vkbeautify.xml(x2js.json2xml_str(this.get('actionModel.unsupportedProperties'))); + } + return unsupportedPropertiesXml; }, set(key, value) { let x2js = new X2JS(); @@ -75,12 +85,15 @@ export default Ember.Component.extend( Ember.Evented,{ return value; } }), + containsUnsupportedProperties : Ember.computed('unsupportedPropertiesXml', function(){ +return this.get('unsupportedPropertiesXml') && this.get('unsupportedPropertiesXml').length > 0; + }), actionXml : Ember.computed('actionModel', { get(key) { let x2js = new X2JS(); var startTag = `<${this.get('actionType')}`; Object.keys(this.get('actionModel')).forEach(key => { -if(key.startsWith('_')){ +if(key.startsWith('_') && key !== '__jsogObjectId'){ startTag = `${startTag} ${key.substr(1)}="${this.get('actionModel')[key]}"`; } }); @@ -150,11 +163,6 @@ export default Ember.Component.extend( Ember.Evented,{ delete this.get('actionModel').slaInfo; delete this.get('actionModel').slaEnabled; } -if(this.get('actionModel.unsupportedProperties') && !Ember.isEmpty(Object.keys(this.get('actionModel.unsupportedProperties'{ - this.set('containsUnsupportedProperties', true); -}else{ - this.set('containsUnsupportedProperties', false); -} }.on('init'), initialize : function(){ this.$('#action_properties_dialog').modal({ @@ -203,6 +211,19 @@ export default Ember.Component.extend( Ember.Evented,{ } }); }, + validateDecisionNode(){ +let containsOtherNodes = false; +this.get('actionModel').forEach((model)=>{ + if(model.node.type !== 'kill'){ +containsOtherNodes = true; + } +}); +if(!containsOtherNodes){ + this.get('errors').pushObject({message:'Atleast one of the decision branches should transition to a node other than a kill node.'}); +}else{ + this.get('errors').clear(); +} + }, actions : { closeEditor (){ this.sendAction('close'); @@ -237,6 +258,11 @@ export default Ember.Component.extend( Ember.Evented,{ }, registerChild (name, context){ this.get('childComponents').set(name, context); +}, +showUnsupportedProperties(){ + this.$('#action_properties_dialog .modal-body').animate({ +scrollTop: this.$("#unsupported-props").offset().top + }, 'fast'); } } });
ambari git commit: AMBARI-20107. Action node shows unsupported properties even though there are none in workflow manager.(Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk f936bcfdb -> ba470c186 AMBARI-20107. Action node shows unsupported properties even though there are none in workflow manager.(Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ba470c18 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ba470c18 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ba470c18 Branch: refs/heads/trunk Commit: ba470c186875be371152e2a3ce37fb3c9a383f5a Parents: f936bcf Author: Gaurav NagarAuthored: Thu Feb 23 10:58:02 2017 +0530 Committer: Gaurav Nagar Committed: Thu Feb 23 10:58:02 2017 +0530 -- .../ui/app/components/workflow-action-editor.js | 40 .../components/workflow-action-editor.hbs | 5 ++- 2 files changed, 36 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ba470c18/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-action-editor.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-action-editor.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-action-editor.js index d09de7d..e19646d 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-action-editor.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/workflow-action-editor.js @@ -62,8 +62,18 @@ export default Ember.Component.extend( Ember.Evented,{ saveClicked : false, unsupportedPropertiesXml : Ember.computed('actionModel.unsupportedProperties', { get(key){ + let unsupportedPropertiesXml; + if(!this.get('actionModel.unsupportedProperties')){ +return unsupportedPropertiesXml; + } let x2js = new X2JS(); - return vkbeautify.xml(x2js.json2xml_str(this.get('actionModel.unsupportedProperties'))); + let unsupportedProperties = Ember.copy(this.get('actionModel.unsupportedProperties')); + delete unsupportedProperties['@id']; + delete unsupportedProperties.__jsogObjectId; + if(!Ember.isEmpty(Object.keys(unsupportedProperties))){ +unsupportedPropertiesXml = vkbeautify.xml(x2js.json2xml_str(this.get('actionModel.unsupportedProperties'))); + } + return unsupportedPropertiesXml; }, set(key, value) { let x2js = new X2JS(); @@ -75,12 +85,15 @@ export default Ember.Component.extend( Ember.Evented,{ return value; } }), + containsUnsupportedProperties : Ember.computed('unsupportedPropertiesXml', function(){ +return this.get('unsupportedPropertiesXml') && this.get('unsupportedPropertiesXml').length > 0; + }), actionXml : Ember.computed('actionModel', { get(key) { let x2js = new X2JS(); var startTag = `<${this.get('actionType')}`; Object.keys(this.get('actionModel')).forEach(key => { -if(key.startsWith('_')){ +if(key.startsWith('_') && key !== '__jsogObjectId'){ startTag = `${startTag} ${key.substr(1)}="${this.get('actionModel')[key]}"`; } }); @@ -150,11 +163,6 @@ export default Ember.Component.extend( Ember.Evented,{ delete this.get('actionModel').slaInfo; delete this.get('actionModel').slaEnabled; } -if(this.get('actionModel.unsupportedProperties') && !Ember.isEmpty(Object.keys(this.get('actionModel.unsupportedProperties'{ - this.set('containsUnsupportedProperties', true); -}else{ - this.set('containsUnsupportedProperties', false); -} }.on('init'), initialize : function(){ this.$('#action_properties_dialog').modal({ @@ -203,6 +211,19 @@ export default Ember.Component.extend( Ember.Evented,{ } }); }, + validateDecisionNode(){ +let containsOtherNodes = false; +this.get('actionModel').forEach((model)=>{ + if(model.node.type !== 'kill'){ +containsOtherNodes = true; + } +}); +if(!containsOtherNodes){ + this.get('errors').pushObject({message:'Atleast one of the decision branches should transition to a node other than a kill node.'}); +}else{ + this.get('errors').clear(); +} + }, actions : { closeEditor (){ this.sendAction('close'); @@ -237,6 +258,11 @@ export default Ember.Component.extend( Ember.Evented,{ }, registerChild (name, context){ this.get('childComponents').set(name, context); +}, +showUnsupportedProperties(){ + this.$('#action_properties_dialog .modal-body').animate({ +scrollTop: this.$("#unsupported-props").offset().top + }, 'fast'); } } });
ambari git commit: AMBARI-20090. On submit of bundle, if any coordinator path contains variables, user should be notified about custom variables.(Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk 4719b2425 -> 818a64092 AMBARI-20090. On submit of bundle, if any coordinator path contains variables, user should be notified about custom variables.(Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/818a6409 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/818a6409 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/818a6409 Branch: refs/heads/trunk Commit: 818a64092b6d8fed6d233a2fd6fbda07c5f6800b Parents: 4719b24 Author: Gaurav NagarAuthored: Tue Feb 21 16:14:05 2017 +0530 Committer: Gaurav Nagar Committed: Tue Feb 21 16:14:40 2017 +0530 -- .../ui/app/components/bundle-config.js | 14 .../resources/ui/app/components/coord-config.js | 2 +- .../ui/app/domain/workflow-xml-generator.js | 4 --- .../app/templates/components/bundle-config.hbs | 2 +- .../ui/app/templates/components/job-config.hbs | 37 +--- 5 files changed, 19 insertions(+), 40 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/818a6409/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js index 9201d5c..3ccbc07 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js @@ -42,13 +42,13 @@ const Validations = buildValidations({ export default Ember.Component.extend(Ember.Evented, Validations, { bundle : null, - errors: Ember.A([]), schemaVersions : SchemaVersions.create({}), propertyExtractor : Ember.inject.service('property-extractor'), fileBrowser : Ember.inject.service('file-browser'), workspaceManager : Ember.inject.service('workspace-manager'), initialize : function(){ var self = this; +this.set('errors', Ember.A([])); this.get('workspaceManager').restoreWorkInProgress(this.get('tabInfo.id')).promise.then(function(draftBundle){ self.loadBundle(draftBundle); }.bind(this)).catch(function(data){ @@ -98,7 +98,7 @@ export default Ember.Component.extend(Ember.Evented, Validations, { this.set('bundle.name', Ember.copy(this.get('tabInfo.name'))); } this.schedulePersistWorkInProgress(); - }, + }, schedulePersistWorkInProgress (){ Ember.run.later(function(){ this.persistWorkInProgress(); @@ -181,7 +181,7 @@ export default Ember.Component.extend(Ember.Evented, Validations, { deferred.resolve({data : data, type : type}); }).fail(function(e){ console.error(e); - deferred.reject(); + deferred.reject(e); }); return deferred; }, @@ -200,7 +200,7 @@ export default Ember.Component.extend(Ember.Evented, Validations, { deferred.resolve(data); }).fail(function(e){ console.error(e); - deferred.reject(); + deferred.reject(e); }); return deferred; }, @@ -220,6 +220,7 @@ export default Ember.Component.extend(Ember.Evented, Validations, { var coordinatorJson = x2js.xml_str2json(coordinatorXml); var workflowPath = coordinatorJson['coordinator-app']['action']['workflow']['app-path']; if(this.get('propertyExtractor').containsParameters(workflowPath)){ +this.set('containsParameteriedPaths', true); deferred.resolve(Array.from(coordProps.values())); }else{ workflowPath = this.appendFileName(workflowPath, 'wf'); @@ -250,7 +251,7 @@ export default Ember.Component.extend(Ember.Evented, Validations, { closeFileBrowser(){ this.set("showingFileBrowser", false); this.get('fileBrowser').getContext().trigger('fileSelected', this.get('filePath')); - if(this.get('bundleFilePath')){ + if(this.get('filePathModel') === 'bundleFilePath'){ this.importBundle(Ember.copy(this.get('bundleFilePath'))); this.set('bundleFilePath', null); } @@ -327,6 +328,7 @@ export default Ember.Component.extend(Ember.Evented, Validations, { this.$('#loading').show(); this.get('bundle.coordinators').forEach((coordinator) =>{ if(this.get('propertyExtractor').containsParameters(coordinator.appPath)){ + this.set('containsParameteriedPaths', true); return; } var deferred = this.getJobProperties(coordinator.appPath); @@ -336,7 +338,7 @@ export default Ember.Component.extend(Ember.Evented, Validations, { var combinedProps = []; var excludedProps = [];
ambari git commit: AMBARI-20090. On submit of bundle, if any coordinator path contains variables, user should be notified about custom variables.(Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 3f3667193 -> d7ff046a5 AMBARI-20090. On submit of bundle, if any coordinator path contains variables, user should be notified about custom variables.(Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d7ff046a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d7ff046a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d7ff046a Branch: refs/heads/branch-2.5 Commit: d7ff046a51f4ce7f5abbba1c59bd655b1ddcb1d8 Parents: 3f36671 Author: Gaurav NagarAuthored: Tue Feb 21 16:14:05 2017 +0530 Committer: Gaurav Nagar Committed: Tue Feb 21 16:14:05 2017 +0530 -- .../ui/app/components/bundle-config.js | 14 .../resources/ui/app/components/coord-config.js | 2 +- .../ui/app/domain/workflow-xml-generator.js | 4 --- .../app/templates/components/bundle-config.hbs | 2 +- .../ui/app/templates/components/job-config.hbs | 37 +--- 5 files changed, 19 insertions(+), 40 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d7ff046a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js index 9201d5c..3ccbc07 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js @@ -42,13 +42,13 @@ const Validations = buildValidations({ export default Ember.Component.extend(Ember.Evented, Validations, { bundle : null, - errors: Ember.A([]), schemaVersions : SchemaVersions.create({}), propertyExtractor : Ember.inject.service('property-extractor'), fileBrowser : Ember.inject.service('file-browser'), workspaceManager : Ember.inject.service('workspace-manager'), initialize : function(){ var self = this; +this.set('errors', Ember.A([])); this.get('workspaceManager').restoreWorkInProgress(this.get('tabInfo.id')).promise.then(function(draftBundle){ self.loadBundle(draftBundle); }.bind(this)).catch(function(data){ @@ -98,7 +98,7 @@ export default Ember.Component.extend(Ember.Evented, Validations, { this.set('bundle.name', Ember.copy(this.get('tabInfo.name'))); } this.schedulePersistWorkInProgress(); - }, + }, schedulePersistWorkInProgress (){ Ember.run.later(function(){ this.persistWorkInProgress(); @@ -181,7 +181,7 @@ export default Ember.Component.extend(Ember.Evented, Validations, { deferred.resolve({data : data, type : type}); }).fail(function(e){ console.error(e); - deferred.reject(); + deferred.reject(e); }); return deferred; }, @@ -200,7 +200,7 @@ export default Ember.Component.extend(Ember.Evented, Validations, { deferred.resolve(data); }).fail(function(e){ console.error(e); - deferred.reject(); + deferred.reject(e); }); return deferred; }, @@ -220,6 +220,7 @@ export default Ember.Component.extend(Ember.Evented, Validations, { var coordinatorJson = x2js.xml_str2json(coordinatorXml); var workflowPath = coordinatorJson['coordinator-app']['action']['workflow']['app-path']; if(this.get('propertyExtractor').containsParameters(workflowPath)){ +this.set('containsParameteriedPaths', true); deferred.resolve(Array.from(coordProps.values())); }else{ workflowPath = this.appendFileName(workflowPath, 'wf'); @@ -250,7 +251,7 @@ export default Ember.Component.extend(Ember.Evented, Validations, { closeFileBrowser(){ this.set("showingFileBrowser", false); this.get('fileBrowser').getContext().trigger('fileSelected', this.get('filePath')); - if(this.get('bundleFilePath')){ + if(this.get('filePathModel') === 'bundleFilePath'){ this.importBundle(Ember.copy(this.get('bundleFilePath'))); this.set('bundleFilePath', null); } @@ -327,6 +328,7 @@ export default Ember.Component.extend(Ember.Evented, Validations, { this.$('#loading').show(); this.get('bundle.coordinators').forEach((coordinator) =>{ if(this.get('propertyExtractor').containsParameters(coordinator.appPath)){ + this.set('containsParameteriedPaths', true); return; } var deferred = this.getJobProperties(coordinator.appPath); @@ -336,7 +338,7 @@ export default Ember.Component.extend(Ember.Evented, Validations, { var combinedProps = []; var excludedProps = [];
ambari git commit: AMBARI-20084. Cut Node feature is broken in workflow manager.(Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 3ba9b3553 -> 3f3667193 AMBARI-20084. Cut Node feature is broken in workflow manager.(Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3f366719 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3f366719 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3f366719 Branch: refs/heads/branch-2.5 Commit: 3f36671936e07743020b2b349e877afe5a096951 Parents: 3ba9b35 Author: Gaurav NagarAuthored: Tue Feb 21 16:12:08 2017 +0530 Committer: Gaurav Nagar Committed: Tue Feb 21 16:12:38 2017 +0530 -- .../ui/app/components/flow-designer.js | 4 +-- .../ui/app/domain/cytoscape-flow-renderer.js| 34 2 files changed, 22 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3f366719/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js index c1bd4be..190bb1a 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js @@ -670,9 +670,9 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { copyNode(node){ this.get('clipboardService').setContent(node, 'copy'); }, - cutNode(node){ + cutNode(node, transitionsList){ this.get('clipboardService').setContent(node, 'cut'); -this.deleteWorkflowNode(node); +this.deleteWorkflowNode(node, transitionsList); }, replaceNode(node){ var clipboardContent = this.get('clipboardService').getContent(); http://git-wip-us.apache.org/repos/asf/ambari/blob/3f366719/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js index 6f46fdc..51e0461 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js @@ -287,18 +287,7 @@ var CytoscapeRenderer= Ember.Object.extend({ this.get("context").$('.overlay-trash-icon i').off('click'); this.get("context").$('.overlay-trash-icon i').on('click',function(){ - var incomingNodes=this.get("currentCyNode").incomers("node").jsons().mapBy("data.node"); - var transitionList=[]; - var currentNodeId=this.get("currentCyNode").json().data.id; - for (var incomingNode of incomingNodes) { -for (var incomingTran of incomingNode.transitions ){ - if (incomingTran.targetNode.id===currentNodeId){ -incomingTran.sourceNode=incomingNode; -transitionList=transitionList.concat(incomingTran); - } -} - } - this.get("context").deleteWorkflowNode(this.get("context").$(".overlay-trash-icon").data("node"),transitionList); + this.get("context").deleteWorkflowNode(this.get("context").$(".overlay-trash-icon").data("node"), this.getIncomingTransitions(this.get("currentCyNode"))); this.get("context").$('.overlay-node-actions').hide(); }.bind(this)); @@ -316,7 +305,7 @@ var CytoscapeRenderer= Ember.Object.extend({ this.get("context").$('.overlay-cut-icon i').off('click'); this.get("context").$('.overlay-cut-icon i').on('click',function(){ - this.get("context").cutNode(this.get("context").$(".overlay-cut-icon").data("node")); + this.get("context").cutNode(this.get("context").$(".overlay-cut-icon").data("node"), this.getIncomingTransitions(this.get("currentCyNode"))); this.get("context").$('.overlay-node-actions').hide(); }.bind(this)); @@ -344,8 +333,22 @@ var CytoscapeRenderer= Ember.Object.extend({ this.get("context").$('.overlay-node-actions').hide(); }.bind(this)); }, + getIncomingTransitions(node){ +var incomingNodes=node.incomers("node").jsons().mapBy("data.node"); +var transitionList=[]; +var currentNodeId=this.get("currentCyNode").json().data.id; +for (var incomingNode of incomingNodes) { + for (var incomingTran of incomingNode.transitions ){ +if (incomingTran.targetNode.id===currentNodeId){ + incomingTran.sourceNode=incomingNode; + transitionList=transitionList.concat(incomingTran); +} + } +} +return
ambari git commit: AMBARI-20084. Cut Node feature is broken in workflow manager.(Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk 6a7d91939 -> 4719b2425 AMBARI-20084. Cut Node feature is broken in workflow manager.(Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4719b242 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4719b242 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4719b242 Branch: refs/heads/trunk Commit: 4719b242560326230dc1e10473ddcd535e29c0af Parents: 6a7d919 Author: Gaurav NagarAuthored: Tue Feb 21 16:12:08 2017 +0530 Committer: Gaurav Nagar Committed: Tue Feb 21 16:12:08 2017 +0530 -- .../ui/app/components/flow-designer.js | 4 +-- .../ui/app/domain/cytoscape-flow-renderer.js| 34 2 files changed, 22 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4719b242/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js index c1bd4be..190bb1a 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js @@ -670,9 +670,9 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { copyNode(node){ this.get('clipboardService').setContent(node, 'copy'); }, - cutNode(node){ + cutNode(node, transitionsList){ this.get('clipboardService').setContent(node, 'cut'); -this.deleteWorkflowNode(node); +this.deleteWorkflowNode(node, transitionsList); }, replaceNode(node){ var clipboardContent = this.get('clipboardService').getContent(); http://git-wip-us.apache.org/repos/asf/ambari/blob/4719b242/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js index 6f46fdc..51e0461 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js @@ -287,18 +287,7 @@ var CytoscapeRenderer= Ember.Object.extend({ this.get("context").$('.overlay-trash-icon i').off('click'); this.get("context").$('.overlay-trash-icon i').on('click',function(){ - var incomingNodes=this.get("currentCyNode").incomers("node").jsons().mapBy("data.node"); - var transitionList=[]; - var currentNodeId=this.get("currentCyNode").json().data.id; - for (var incomingNode of incomingNodes) { -for (var incomingTran of incomingNode.transitions ){ - if (incomingTran.targetNode.id===currentNodeId){ -incomingTran.sourceNode=incomingNode; -transitionList=transitionList.concat(incomingTran); - } -} - } - this.get("context").deleteWorkflowNode(this.get("context").$(".overlay-trash-icon").data("node"),transitionList); + this.get("context").deleteWorkflowNode(this.get("context").$(".overlay-trash-icon").data("node"), this.getIncomingTransitions(this.get("currentCyNode"))); this.get("context").$('.overlay-node-actions').hide(); }.bind(this)); @@ -316,7 +305,7 @@ var CytoscapeRenderer= Ember.Object.extend({ this.get("context").$('.overlay-cut-icon i').off('click'); this.get("context").$('.overlay-cut-icon i').on('click',function(){ - this.get("context").cutNode(this.get("context").$(".overlay-cut-icon").data("node")); + this.get("context").cutNode(this.get("context").$(".overlay-cut-icon").data("node"), this.getIncomingTransitions(this.get("currentCyNode"))); this.get("context").$('.overlay-node-actions').hide(); }.bind(this)); @@ -344,8 +333,22 @@ var CytoscapeRenderer= Ember.Object.extend({ this.get("context").$('.overlay-node-actions').hide(); }.bind(this)); }, + getIncomingTransitions(node){ +var incomingNodes=node.incomers("node").jsons().mapBy("data.node"); +var transitionList=[]; +var currentNodeId=this.get("currentCyNode").json().data.id; +for (var incomingNode of incomingNodes) { + for (var incomingTran of incomingNode.transitions ){ +if (incomingTran.targetNode.id===currentNodeId){ + incomingTran.sourceNode=incomingNode; + transitionList=transitionList.concat(incomingTran); +} + } +} +return
ambari git commit: AMBARI-20080. WFM does not issue confirmation message when workflow is suspended or killed.(Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 fa13f66c8 -> 3ba9b3553 AMBARI-20080. WFM does not issue confirmation message when workflow is suspended or killed.(Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3ba9b355 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3ba9b355 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3ba9b355 Branch: refs/heads/branch-2.5 Commit: 3ba9b3553cfafcdaad4350d92aca867468d2e7cf Parents: fa13f66 Author: Gaurav NagarAuthored: Tue Feb 21 16:10:19 2017 +0530 Committer: Gaurav Nagar Committed: Tue Feb 21 16:10:19 2017 +0530 -- .../main/resources/ui/app/components/job-row.js| 6 ++ .../resources/ui/app/components/search-table.js| 17 - .../ui/app/templates/components/search-table.hbs | 11 --- 3 files changed, 30 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3ba9b355/contrib/views/wfmanager/src/main/resources/ui/app/components/job-row.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/job-row.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/job-row.js index 1dd580e..2b40392 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/job-row.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/job-row.js @@ -72,9 +72,15 @@ export default Ember.Component.extend({ }else if(action === 'kill'){ this.set('job.status','KILLED'); } +this.sendAction('showMessage', {type:'success', message:`${action.toUpperCase()} action complete. Job is ${this.get('job.status')}`}); }.bind(this)).catch(function(e){ this.set('showError', true); this.set('showLoader', false); +var message = `${action.toUpperCase()} action for could not be completed`; +if(this.get('userName') !== this.get('job.user')){ + message = `${message}. ${this.get('userName')} is not the job owner.` +} +this.sendAction('showMessage', {type:'error', message:message}); console.error(e); }.bind(this)); if(action === 'rerun' && this.get('job').bundleJobId){ http://git-wip-us.apache.org/repos/asf/ambari/blob/3ba9b355/contrib/views/wfmanager/src/main/resources/ui/app/components/search-table.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/search-table.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/search-table.js index b2f2a57..c8df452 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/search-table.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/search-table.js @@ -28,15 +28,21 @@ export default Ember.Component.extend({ var roundedStart = this.get('jobs.start') - this.get('jobs.start') % 10; return (roundedStart / this.get('jobs.pageSize'))+1; }), + userName : Ember.computed.alias('userInfo.userName'), rendered : function(){ this.sendAction('onSearch', this.get('history').getSearchParams()); }.on('didInsertElement'), isUpdated : function(){ if(this.get('showActionError')){ - this.$('#alert').fadeOut(2500, ()=>{ + this.$('#error-alert').fadeOut(5000, ()=>{ this.set("showActionError", false); }); } +if(this.get('showActionSuccess')){ + this.$('#success-alert').fadeOut(5000, ()=>{ +this.set("showActionSuccess", false); + }); +} }.on('didUpdate'), actions: { selectAll() { @@ -131,6 +137,15 @@ export default Ember.Component.extend({ }else{ this.set('showBulkAction', false); } +}, +showMessage(messageInfo){ + if(messageInfo.type === 'error'){ +this.set('showActionError', true); +this.set('errorMessage', messageInfo.message); + }else{ +this.set('showActionSuccess', true); +this.set('successMessage', messageInfo.message); + } } } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/3ba9b355/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/search-table.hbs -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/search-table.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/search-table.hbs index 5c15493..d28a497 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/search-table.hbs +++
ambari git commit: AMBARI-20079. Unable to filter by job id.(Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 be823bed5 -> fa13f66c8 AMBARI-20079. Unable to filter by job id.(Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fa13f66c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fa13f66c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fa13f66c Branch: refs/heads/branch-2.5 Commit: fa13f66c8bc393b9b3fd6e84f31ffa2deaa379fa Parents: be823be Author: Gaurav NagarAuthored: Tue Feb 21 16:08:30 2017 +0530 Committer: Gaurav Nagar Committed: Tue Feb 21 16:09:20 2017 +0530 -- .../src/main/resources/ui/app/components/search-create-new-bar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fa13f66c/contrib/views/wfmanager/src/main/resources/ui/app/components/search-create-new-bar.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/search-create-new-bar.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/search-create-new-bar.js index e6f7ec8..96ee230 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/search-create-new-bar.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/search-create-new-bar.js @@ -147,7 +147,7 @@ export default Ember.Component.extend(Ember.Evented,{ }.on('didInsertElement'), mapSearchItems(key){ key = key.replace(" ", "_").toLowerCase(); - var keys = {"job_id":"id"}; + var keys = {"job_id":"id","jobid":"id"}; if(keys[key]){ return keys[key]; }
ambari git commit: AMBARI-20079. Unable to filter by job id.(Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk 6a3d8fd75 -> 74293edfe AMBARI-20079. Unable to filter by job id.(Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/74293edf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/74293edf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/74293edf Branch: refs/heads/trunk Commit: 74293edfe1d1903f8e96d5a7a3eac47c48d63061 Parents: 6a3d8fd Author: Gaurav NagarAuthored: Tue Feb 21 16:08:30 2017 +0530 Committer: Gaurav Nagar Committed: Tue Feb 21 16:08:30 2017 +0530 -- .../src/main/resources/ui/app/components/search-create-new-bar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/74293edf/contrib/views/wfmanager/src/main/resources/ui/app/components/search-create-new-bar.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/search-create-new-bar.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/search-create-new-bar.js index e6f7ec8..96ee230 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/search-create-new-bar.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/search-create-new-bar.js @@ -147,7 +147,7 @@ export default Ember.Component.extend(Ember.Evented,{ }.on('didInsertElement'), mapSearchItems(key){ key = key.replace(" ", "_").toLowerCase(); - var keys = {"job_id":"id"}; + var keys = {"job_id":"id","jobid":"id"}; if(keys[key]){ return keys[key]; }
ambari git commit: AMBARI-20078. When uploading a file using the WFM, need a message to say that either the file upload succeeded or failed. (Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk e585eb6ee -> 6a3d8fd75 AMBARI-20078. When uploading a file using the WFM, need a message to say that either the file upload succeeded or failed. (Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6a3d8fd7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6a3d8fd7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6a3d8fd7 Branch: refs/heads/trunk Commit: 6a3d8fd75f9b5a15f9a27d2c1948e07691d16a98 Parents: e585eb6 Author: Gaurav NagarAuthored: Tue Feb 21 16:04:17 2017 +0530 Committer: Gaurav Nagar Committed: Tue Feb 21 16:06:08 2017 +0530 -- .../src/main/resources/ui/app/components/hdfs-browser.js| 9 + .../resources/ui/app/templates/components/hdfs-browser.hbs | 5 + 2 files changed, 14 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6a3d8fd7/contrib/views/wfmanager/src/main/resources/ui/app/components/hdfs-browser.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/hdfs-browser.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/hdfs-browser.js index 1af9f4d..0194f13 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/hdfs-browser.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/hdfs-browser.js @@ -53,6 +53,13 @@ export default Ember.Component.extend({ this.set("alertDetails",data.details); this.set("alertMessage",data.message); }, + isUpdated : function(){ +if(this.get('showUploadSuccess')){ + this.$('#success-alert').fadeOut(5000, ()=>{ +this.set("showUploadSuccess", false); + }); +} + }.on('didUpdate'), actions: { viewerError(error) { if (error.responseJSON && error.responseJSON.message && error.responseJSON.message.includes("Permission")) { @@ -98,6 +105,8 @@ export default Ember.Component.extend({ }, uploadSuccess(e){ this.get('uploaderService').trigger('uploadSuccess'); + this.set('uploadSelected', false); + this.set('showUploadSuccess', true); }, uploadFailure(textStatus,errorThrown){ this.showNotification({ http://git-wip-us.apache.org/repos/asf/ambari/blob/6a3d8fd7/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hdfs-browser.hbs -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hdfs-browser.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hdfs-browser.hbs index b8da4a0..44f25c8 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hdfs-browser.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hdfs-browser.hbs @@ -51,6 +51,11 @@ +{{#if showUploadSuccess}} + +File uploaded + +{{/if}} {{#if alertMessage}} {{alertMessage}}
ambari git commit: AMBARI-20078. When uploading a file using the WFM, need a message to say that either the file upload succeeded or failed. (Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 1e56124be -> be823bed5 AMBARI-20078. When uploading a file using the WFM, need a message to say that either the file upload succeeded or failed. (Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/be823bed Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/be823bed Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/be823bed Branch: refs/heads/branch-2.5 Commit: be823bed5c3a2aa87764edf78313ce4b0db2ab91 Parents: 1e56124 Author: Gaurav NagarAuthored: Tue Feb 21 16:04:17 2017 +0530 Committer: Gaurav Nagar Committed: Tue Feb 21 16:04:17 2017 +0530 -- .../src/main/resources/ui/app/components/hdfs-browser.js| 9 + .../resources/ui/app/templates/components/hdfs-browser.hbs | 5 + 2 files changed, 14 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/be823bed/contrib/views/wfmanager/src/main/resources/ui/app/components/hdfs-browser.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/hdfs-browser.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/hdfs-browser.js index 1af9f4d..0194f13 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/hdfs-browser.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/hdfs-browser.js @@ -53,6 +53,13 @@ export default Ember.Component.extend({ this.set("alertDetails",data.details); this.set("alertMessage",data.message); }, + isUpdated : function(){ +if(this.get('showUploadSuccess')){ + this.$('#success-alert').fadeOut(5000, ()=>{ +this.set("showUploadSuccess", false); + }); +} + }.on('didUpdate'), actions: { viewerError(error) { if (error.responseJSON && error.responseJSON.message && error.responseJSON.message.includes("Permission")) { @@ -98,6 +105,8 @@ export default Ember.Component.extend({ }, uploadSuccess(e){ this.get('uploaderService').trigger('uploadSuccess'); + this.set('uploadSelected', false); + this.set('showUploadSuccess', true); }, uploadFailure(textStatus,errorThrown){ this.showNotification({ http://git-wip-us.apache.org/repos/asf/ambari/blob/be823bed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hdfs-browser.hbs -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hdfs-browser.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hdfs-browser.hbs index b8da4a0..44f25c8 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hdfs-browser.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hdfs-browser.hbs @@ -51,6 +51,11 @@ +{{#if showUploadSuccess}} + +File uploaded + +{{/if}} {{#if alertMessage}} {{alertMessage}}
ambari git commit: AMBARI-20077. Server Error when trying to save and not overwrite. (Madhan Mohan Reddy via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 a9951bad1 -> a4fb9ec11 AMBARI-20077. Server Error when trying to save and not overwrite. (Madhan Mohan Reddy via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a4fb9ec1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a4fb9ec1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a4fb9ec1 Branch: refs/heads/branch-2.5 Commit: a4fb9ec11c2dfcd1d10eea2e67a87a71a7a9c321 Parents: a9951ba Author: Gaurav NagarAuthored: Mon Feb 20 15:40:41 2017 +0530 Committer: Gaurav Nagar Committed: Mon Feb 20 15:41:55 2017 +0530 -- .../ambari/view/OozieProxyImpersonator.java | 192 ++- .../apache/oozie/ambari/view/OozieUtils.java| 18 ++ .../org/apache/oozie/ambari/view/Utils.java | 14 +- .../oozie/ambari/view/WorkflowFilesService.java | 22 ++- .../workflowmanager/WorkflowManagerService.java | 6 +- .../WorkflowsManagerResource.java | 7 +- .../view/workflowmanager/WorkflowsRepo.java | 40 +++- .../ui/app/components/bundle-config.js | 4 +- .../resources/ui/app/components/coord-config.js | 4 +- .../ui/app/components/flow-designer.js | 32 +--- .../main/resources/ui/app/components/save-wf.js | 11 +- .../main/resources/ui/app/domain/workflow.js| 1 + 12 files changed, 213 insertions(+), 138 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a4fb9ec1/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java -- diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java index a119a7e..6603a9c 100644 --- a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java +++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java @@ -36,7 +36,6 @@ import javax.ws.rs.HttpMethod; import javax.ws.rs.POST; import javax.ws.rs.PUT; import javax.ws.rs.Path; -import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.Context; @@ -68,26 +67,30 @@ import com.google.inject.Singleton; public class OozieProxyImpersonator { private final static Logger LOGGER = LoggerFactory .getLogger(OozieProxyImpersonator.class); + private static final boolean PROJ_MANAGER_ENABLED = true; + public static final String RESPONSE_TYPE = "response-type"; + public static final String OLDER_FORMAT_DRAFT_INGORED = "olderFormatDraftIngored"; - private ViewContext viewContext; + private final ViewContext viewContext; private final Utils utils = new Utils(); private final HDFSFileUtils hdfsFileUtils; private final WorkflowFilesService workflowFilesService; private WorkflowManagerService workflowManagerService; - private static final boolean PROJ_MANAGER_ENABLED = true; + private final OozieDelegate oozieDelegate; private final OozieUtils oozieUtils = new OozieUtils(); private final AssetResource assetResource; - private final AmbariIOUtil ambariIOUtil; - private static enum ErrorCodes { + + private enum ErrorCodes { OOZIE_SUBMIT_ERROR("error.oozie.submit", "Oozie Submit error"), OOZIE_IO_ERROR( "error.oozie.io", "Oozie I/O error"), FILE_ACCESS_ACL_ERROR( "error.file.access.control", "Access Error to file due to access control"), FILE_ACCESS_UNKNOWN_ERROR( "error.file.access", "Error accessing file"), WORKFLOW_PATH_EXISTS( - "error.workflow.path.exists", "Worfklow path exists"); + "error.workflow.path.exists", "Workflow Path exists"), WORKFLOW_XML_DOES_NOT_EXIST( + "error.workflow.xml.not.exists", "Workflow Xml does not exist"); private String errorCode; private String description; @@ -104,7 +107,18 @@ public class OozieProxyImpersonator { return description; } } + private static enum WorkflowFormat{ +XML("xml"), +DRAFT("draft"); +String value; +WorkflowFormat(String value) { + this.value=value; +} +public String getValue() { + return value; +} + } @Inject public OozieProxyImpersonator(ViewContext viewContext) { this.viewContext = viewContext; @@ -115,7 +129,6 @@ public class OozieProxyImpersonator { if (PROJ_MANAGER_ENABLED) { workflowManagerService = new WorkflowManagerService(viewContext); } -ambariIOUtil=new AmbariIOUtil(viewContext); LOGGER.info(String.format( "OozieProxyImpersonator initialized for instance: %s", @@ -158,6
ambari git commit: AMBARI-20077. Server Error when trying to save and not overwrite. (Madhan Mohan Reddy via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk ac4f3d11f -> 07342bc6e AMBARI-20077. Server Error when trying to save and not overwrite. (Madhan Mohan Reddy via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/07342bc6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/07342bc6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/07342bc6 Branch: refs/heads/trunk Commit: 07342bc6e4a0e9ba2b2f850f5d8cbf38a948b50c Parents: ac4f3d1 Author: Gaurav NagarAuthored: Mon Feb 20 15:40:41 2017 +0530 Committer: Gaurav Nagar Committed: Mon Feb 20 15:40:41 2017 +0530 -- .../ambari/view/OozieProxyImpersonator.java | 192 ++- .../apache/oozie/ambari/view/OozieUtils.java| 18 ++ .../org/apache/oozie/ambari/view/Utils.java | 14 +- .../oozie/ambari/view/WorkflowFilesService.java | 22 ++- .../workflowmanager/WorkflowManagerService.java | 6 +- .../WorkflowsManagerResource.java | 7 +- .../view/workflowmanager/WorkflowsRepo.java | 40 +++- .../ui/app/components/bundle-config.js | 4 +- .../resources/ui/app/components/coord-config.js | 4 +- .../ui/app/components/flow-designer.js | 32 +--- .../main/resources/ui/app/components/save-wf.js | 11 +- .../main/resources/ui/app/domain/workflow.js| 1 + 12 files changed, 213 insertions(+), 138 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/07342bc6/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java -- diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java index a119a7e..6603a9c 100644 --- a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java +++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java @@ -36,7 +36,6 @@ import javax.ws.rs.HttpMethod; import javax.ws.rs.POST; import javax.ws.rs.PUT; import javax.ws.rs.Path; -import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.Context; @@ -68,26 +67,30 @@ import com.google.inject.Singleton; public class OozieProxyImpersonator { private final static Logger LOGGER = LoggerFactory .getLogger(OozieProxyImpersonator.class); + private static final boolean PROJ_MANAGER_ENABLED = true; + public static final String RESPONSE_TYPE = "response-type"; + public static final String OLDER_FORMAT_DRAFT_INGORED = "olderFormatDraftIngored"; - private ViewContext viewContext; + private final ViewContext viewContext; private final Utils utils = new Utils(); private final HDFSFileUtils hdfsFileUtils; private final WorkflowFilesService workflowFilesService; private WorkflowManagerService workflowManagerService; - private static final boolean PROJ_MANAGER_ENABLED = true; + private final OozieDelegate oozieDelegate; private final OozieUtils oozieUtils = new OozieUtils(); private final AssetResource assetResource; - private final AmbariIOUtil ambariIOUtil; - private static enum ErrorCodes { + + private enum ErrorCodes { OOZIE_SUBMIT_ERROR("error.oozie.submit", "Oozie Submit error"), OOZIE_IO_ERROR( "error.oozie.io", "Oozie I/O error"), FILE_ACCESS_ACL_ERROR( "error.file.access.control", "Access Error to file due to access control"), FILE_ACCESS_UNKNOWN_ERROR( "error.file.access", "Error accessing file"), WORKFLOW_PATH_EXISTS( - "error.workflow.path.exists", "Worfklow path exists"); + "error.workflow.path.exists", "Workflow Path exists"), WORKFLOW_XML_DOES_NOT_EXIST( + "error.workflow.xml.not.exists", "Workflow Xml does not exist"); private String errorCode; private String description; @@ -104,7 +107,18 @@ public class OozieProxyImpersonator { return description; } } + private static enum WorkflowFormat{ +XML("xml"), +DRAFT("draft"); +String value; +WorkflowFormat(String value) { + this.value=value; +} +public String getValue() { + return value; +} + } @Inject public OozieProxyImpersonator(ViewContext viewContext) { this.viewContext = viewContext; @@ -115,7 +129,6 @@ public class OozieProxyImpersonator { if (PROJ_MANAGER_ENABLED) { workflowManagerService = new WorkflowManagerService(viewContext); } -ambariIOUtil=new AmbariIOUtil(viewContext); LOGGER.info(String.format( "OozieProxyImpersonator initialized for instance: %s", @@ -158,6 +171,16 @@
ambari git commit: AMBARI-20041. Custom job.properties are not retained in the workflow designer.(Venkata Sairam via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk fb322e276 -> ea82a59de AMBARI-20041. Custom job.properties are not retained in the workflow designer.(Venkata Sairam via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ea82a59d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ea82a59d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ea82a59d Branch: refs/heads/trunk Commit: ea82a59de4b170a10178eb1cc6385a8010e774fc Parents: fb322e2 Author: Gaurav NagarAuthored: Thu Feb 16 18:33:24 2017 +0530 Committer: Gaurav Nagar Committed: Thu Feb 16 18:33:54 2017 +0530 -- .../ui/app/components/designer-workspace.js | 15 --- .../main/resources/ui/app/components/job-config.js | 11 +-- .../main/resources/ui/app/components/job-details.js | 4 +++- .../src/main/resources/ui/app/routes/design.js | 6 +++--- .../ui/app/templates/components/flow-designer.hbs| 2 +- 5 files changed, 28 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ea82a59d/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js index f93e1b8..74de3b7 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js @@ -53,13 +53,13 @@ export default Ember.Component.extend({ this.get('tabs').forEach((tab)=>{ this.get('tabCounter').set(tab.type, (this.get('tabCounter').get(tab.type)) + 1); }, this); -Ember.getOwner(this).lookup('route:design').on('openNewTab', function(path, type){ +Ember.getOwner(this).lookup('route:design').on('openNewTab', function(path, type, isImportedFromDesigner, configuration){ if(type === 'COORDINATOR'){ this.createNewTab('coord', path); }else if(type === 'BUNDLE'){ this.createNewTab('bundle', path); }else{ -this.createNewTab('wf', path); +this.createNewTab('wf', path, isImportedFromDesigner, configuration); } }.bind(this)); @@ -103,9 +103,17 @@ export default Ember.Component.extend({ }.bind(this)); }, 1000); }, - createNewTab : function(type, path){ + setWFConfigProperties(tab ,isImportedFromDesigner, configuration){ +if(isImportedFromDesigner) { + tab.isImportedFromDesigner = true; + tab.configuration = configuration; +} +return tab; + }, + createNewTab : function(type, path, isImportedFromDesigner, configuration){ var existingTab = this.get('tabs').findBy("filePath", path); if(existingTab && path){ + existingTab = this.setWFConfigProperties(existingTab, isImportedFromDesigner, configuration); this.$('.nav-tabs a[href="#' + existingTab.id + '"]').tab("show"); return; } @@ -117,6 +125,7 @@ export default Ember.Component.extend({ if(path){ tab.path = path; } +tab = this.setWFConfigProperties(tab, isImportedFromDesigner, configuration); this.$('.nav-tabs li').removeClass('active'); this.$('.tab-content .tab-pane').removeClass('active'); this.get('tabs').pushObject(tab); http://git-wip-us.apache.org/repos/asf/ambari/blob/ea82a59d/contrib/views/wfmanager/src/main/resources/ui/app/components/job-config.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/job-config.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/job-config.js index f364e30..00dedbb 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/job-config.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/job-config.js @@ -112,7 +112,7 @@ export default Ember.Component.extend(Validations, { extractJobProperties(){ var jobProperties = []; -var jobParams = this.get("jobConfigs").params; +var jobParams = this.get("jobConfigs").params, self = this; this.get("jobProps").forEach(function(value) { if (value!== Constants.defaultNameNodeValue && value!==Constants.rmDefaultValue){ var propName = value.trim().substring(2, value.length-1); @@ -125,9 +125,16 @@ export default Ember.Component.extend(Validations, { isRequired = true; } } +let val = null, tabData = self.get("tabInfo"); +if(tabData && tabData.isImportedFromDesigner &&
ambari git commit: AMBARI-20041. Custom job.properties are not retained in the workflow designer.(Venkata Sairam via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 c69e7607c -> 2a5064d0a AMBARI-20041. Custom job.properties are not retained in the workflow designer.(Venkata Sairam via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2a5064d0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2a5064d0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2a5064d0 Branch: refs/heads/branch-2.5 Commit: 2a5064d0a8cbfc030020440df5420ff5f22b3939 Parents: c69e760 Author: Gaurav NagarAuthored: Thu Feb 16 18:33:24 2017 +0530 Committer: Gaurav Nagar Committed: Thu Feb 16 18:33:24 2017 +0530 -- .../ui/app/components/designer-workspace.js | 15 --- .../main/resources/ui/app/components/job-config.js | 11 +-- .../main/resources/ui/app/components/job-details.js | 4 +++- .../src/main/resources/ui/app/routes/design.js | 6 +++--- .../ui/app/templates/components/flow-designer.hbs| 2 +- 5 files changed, 28 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2a5064d0/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js index f93e1b8..74de3b7 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js @@ -53,13 +53,13 @@ export default Ember.Component.extend({ this.get('tabs').forEach((tab)=>{ this.get('tabCounter').set(tab.type, (this.get('tabCounter').get(tab.type)) + 1); }, this); -Ember.getOwner(this).lookup('route:design').on('openNewTab', function(path, type){ +Ember.getOwner(this).lookup('route:design').on('openNewTab', function(path, type, isImportedFromDesigner, configuration){ if(type === 'COORDINATOR'){ this.createNewTab('coord', path); }else if(type === 'BUNDLE'){ this.createNewTab('bundle', path); }else{ -this.createNewTab('wf', path); +this.createNewTab('wf', path, isImportedFromDesigner, configuration); } }.bind(this)); @@ -103,9 +103,17 @@ export default Ember.Component.extend({ }.bind(this)); }, 1000); }, - createNewTab : function(type, path){ + setWFConfigProperties(tab ,isImportedFromDesigner, configuration){ +if(isImportedFromDesigner) { + tab.isImportedFromDesigner = true; + tab.configuration = configuration; +} +return tab; + }, + createNewTab : function(type, path, isImportedFromDesigner, configuration){ var existingTab = this.get('tabs').findBy("filePath", path); if(existingTab && path){ + existingTab = this.setWFConfigProperties(existingTab, isImportedFromDesigner, configuration); this.$('.nav-tabs a[href="#' + existingTab.id + '"]').tab("show"); return; } @@ -117,6 +125,7 @@ export default Ember.Component.extend({ if(path){ tab.path = path; } +tab = this.setWFConfigProperties(tab, isImportedFromDesigner, configuration); this.$('.nav-tabs li').removeClass('active'); this.$('.tab-content .tab-pane').removeClass('active'); this.get('tabs').pushObject(tab); http://git-wip-us.apache.org/repos/asf/ambari/blob/2a5064d0/contrib/views/wfmanager/src/main/resources/ui/app/components/job-config.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/job-config.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/job-config.js index f364e30..00dedbb 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/job-config.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/job-config.js @@ -112,7 +112,7 @@ export default Ember.Component.extend(Validations, { extractJobProperties(){ var jobProperties = []; -var jobParams = this.get("jobConfigs").params; +var jobParams = this.get("jobConfigs").params, self = this; this.get("jobProps").forEach(function(value) { if (value!== Constants.defaultNameNodeValue && value!==Constants.rmDefaultValue){ var propName = value.trim().substring(2, value.length-1); @@ -125,9 +125,16 @@ export default Ember.Component.extend(Validations, { isRequired = true; } } +let val = null, tabData = self.get("tabInfo"); +if(tabData &&
ambari git commit: AMBARI-20040. Workflow Manager workflow rendering is broken in designer page. (Belliraj HB via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 0a1b628a2 -> c69e7607c AMBARI-20040. Workflow Manager workflow rendering is broken in designer page. (Belliraj HB via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c69e7607 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c69e7607 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c69e7607 Branch: refs/heads/branch-2.5 Commit: c69e7607c2bff78afad25d65ffaabff127e56aea Parents: 0a1b628 Author: Gaurav NagarAuthored: Thu Feb 16 18:31:00 2017 +0530 Committer: Gaurav Nagar Committed: Thu Feb 16 18:31:32 2017 +0530 -- .../ui/app/domain/cytoscape-flow-renderer.js| 43 ++-- .../resources/ui/app/domain/cytoscape-style.js | 6 +++ .../app/validators/duplicate-data-node-name.js | 2 +- 3 files changed, 38 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c69e7607/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js index 4194d5e..6f46fdc 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js @@ -75,26 +75,28 @@ var CytoscapeRenderer= Ember.Object.extend({ case 'end' : case 'kill' : case 'placeholder' : -return 'ellipse'; + return 'ellipse'; case 'action' : -return 'roundrectangle'; + return 'roundrectangle'; case 'fork' : case 'join' : -return 'roundrectangle'; + return 'roundrectangle'; case 'decision' : -return 'diamond'; + return 'diamond'; default : -return 'star'; + return 'star'; } }, _getCyDataNodes(workflow){ this.get('dataNodes').clear(); var self=this; +var errorNodeCounter=1; workflow.nodeVisitor.process(workflow.startNode, function(node) { if (node.type === 'kill') { return; } + self.get('dataNodes').pushObject({ data: { id: node.id, name: node.name, type: node.type, @@ -106,20 +108,37 @@ var CytoscapeRenderer= Ember.Object.extend({ }); if (node.transitions.length > 0) { node.transitions.forEach(function(transition){ - if (transition.isOnError()|| transition.targetNode.isKillNode()){ + //if (transition.isOnError()|| transition.targetNode.isKillNode()){ + if ((transition.isOnError() && transition.getTargetNode().isKillNode())){ return; } + var targetNodeId=transition.targetNode.id; + if (transition.targetNode.isKillNode()){ +errorNodeCounter++; +var errorNode=transition.targetNode; +targetNodeId=errorNode.id+errorNodeCounter; +self.get('dataNodes').pushObject({ + data: { +id: targetNodeId, name: errorNode.name, type: errorNode.type, +shape: self._getShape(errorNode.type), +type : errorNode.type, +node: errorNode + }, + dataNodeName: Ember.computed.alias('errorNode.node.name') +}); + } self.get('dataNodes').pushObject( { data: { -id: transition.sourceNodeId + '_to_' + transition.targetNode.id, +id: transition.sourceNodeId + '_to_' + targetNodeId, source:transition.sourceNodeId, -target: transition.targetNode.id, +target: targetNodeId, transition: transition, transitionCount: node.getOkTransitionCount() } } ); + }); } }); @@ -192,7 +211,7 @@ var CytoscapeRenderer= Ember.Object.extend({ var node = event.cyTarget; var nodeObj = cy.$('#' + node.id()); this._showNodeEditor(node, nodeObj); - if (!(node.data().type === 'start' || node.data().type === 'end' || node.data().type === 'placeholder')) { + if (!(node.data().type === 'start' || node.data().type === 'end' || node.data().type === 'placeholder' || node.data().type === 'kill')) { this.get("context").$(".overlay-node-actions, .overlay-trash-icon").show(); } if (node.data().type === 'action' || node.data().type === 'decision') { @@ -226,9 +245,9 @@ var CytoscapeRenderer= Ember.Object.extend({ left:
ambari git commit: AMBARI-20040. Workflow Manager workflow rendering is broken in designer page. (Belliraj HB via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk fa527360b -> fb322e276 AMBARI-20040. Workflow Manager workflow rendering is broken in designer page. (Belliraj HB via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fb322e27 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fb322e27 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fb322e27 Branch: refs/heads/trunk Commit: fb322e2763382eb7aa6ed54fabb508482dcaebb0 Parents: fa52736 Author: Gaurav NagarAuthored: Thu Feb 16 18:31:00 2017 +0530 Committer: Gaurav Nagar Committed: Thu Feb 16 18:31:00 2017 +0530 -- .../ui/app/domain/cytoscape-flow-renderer.js| 43 ++-- .../resources/ui/app/domain/cytoscape-style.js | 6 +++ .../app/validators/duplicate-data-node-name.js | 2 +- 3 files changed, 38 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fb322e27/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js index 4194d5e..6f46fdc 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js @@ -75,26 +75,28 @@ var CytoscapeRenderer= Ember.Object.extend({ case 'end' : case 'kill' : case 'placeholder' : -return 'ellipse'; + return 'ellipse'; case 'action' : -return 'roundrectangle'; + return 'roundrectangle'; case 'fork' : case 'join' : -return 'roundrectangle'; + return 'roundrectangle'; case 'decision' : -return 'diamond'; + return 'diamond'; default : -return 'star'; + return 'star'; } }, _getCyDataNodes(workflow){ this.get('dataNodes').clear(); var self=this; +var errorNodeCounter=1; workflow.nodeVisitor.process(workflow.startNode, function(node) { if (node.type === 'kill') { return; } + self.get('dataNodes').pushObject({ data: { id: node.id, name: node.name, type: node.type, @@ -106,20 +108,37 @@ var CytoscapeRenderer= Ember.Object.extend({ }); if (node.transitions.length > 0) { node.transitions.forEach(function(transition){ - if (transition.isOnError()|| transition.targetNode.isKillNode()){ + //if (transition.isOnError()|| transition.targetNode.isKillNode()){ + if ((transition.isOnError() && transition.getTargetNode().isKillNode())){ return; } + var targetNodeId=transition.targetNode.id; + if (transition.targetNode.isKillNode()){ +errorNodeCounter++; +var errorNode=transition.targetNode; +targetNodeId=errorNode.id+errorNodeCounter; +self.get('dataNodes').pushObject({ + data: { +id: targetNodeId, name: errorNode.name, type: errorNode.type, +shape: self._getShape(errorNode.type), +type : errorNode.type, +node: errorNode + }, + dataNodeName: Ember.computed.alias('errorNode.node.name') +}); + } self.get('dataNodes').pushObject( { data: { -id: transition.sourceNodeId + '_to_' + transition.targetNode.id, +id: transition.sourceNodeId + '_to_' + targetNodeId, source:transition.sourceNodeId, -target: transition.targetNode.id, +target: targetNodeId, transition: transition, transitionCount: node.getOkTransitionCount() } } ); + }); } }); @@ -192,7 +211,7 @@ var CytoscapeRenderer= Ember.Object.extend({ var node = event.cyTarget; var nodeObj = cy.$('#' + node.id()); this._showNodeEditor(node, nodeObj); - if (!(node.data().type === 'start' || node.data().type === 'end' || node.data().type === 'placeholder')) { + if (!(node.data().type === 'start' || node.data().type === 'end' || node.data().type === 'placeholder' || node.data().type === 'kill')) { this.get("context").$(".overlay-node-actions, .overlay-trash-icon").show(); } if (node.data().type === 'action' || node.data().type === 'decision') { @@ -226,9 +245,9 @@ var CytoscapeRenderer= Ember.Object.extend({ left: event.originalEvent.offsetX
ambari git commit: AMBARI-19979. Issue while resetting the coordinator.(Venkata Sairam via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk f75eebadf -> 8448d5a18 AMBARI-19979. Issue while resetting the coordinator.(Venkata Sairam via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8448d5a1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8448d5a1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8448d5a1 Branch: refs/heads/trunk Commit: 8448d5a18512565895fcf79f675437d9652a0d1d Parents: f75eeba Author: Gaurav NagarAuthored: Thu Feb 16 16:16:51 2017 +0530 Committer: Gaurav Nagar Committed: Thu Feb 16 16:18:09 2017 +0530 -- .../src/main/resources/ui/app/components/designer-workspace.js | 2 +- contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8448d5a1/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js index aa2e791..f93e1b8 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js @@ -234,7 +234,7 @@ export default Ember.Component.extend({ this.createOrShowProjManager(); }, showWarning(index){ - this.$('#ConfirmDialog').remove(); + this.set('showingWarning', false); var tab = this.get('tabs').objectAt(index); this.set('indexToClose', index); if(tab && tab.type ==='dashboard'){ http://git-wip-us.apache.org/repos/asf/ambari/blob/8448d5a1/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less b/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less index f4869e4..86c1dd3 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less +++ b/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less @@ -80,7 +80,7 @@ a { margin-right: 10px !important; } .padding15pcnt { - padding:15%; + padding:8px; } #arrow{ top: 24%;
ambari git commit: AMBARI-19979. Issue while resetting the coordinator.(Venkata Sairam via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 04be57aa8 -> 0a1b628a2 AMBARI-19979. Issue while resetting the coordinator.(Venkata Sairam via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0a1b628a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0a1b628a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0a1b628a Branch: refs/heads/branch-2.5 Commit: 0a1b628a2866c05e2577dec3899714bae4f0a5c4 Parents: 04be57a Author: Gaurav NagarAuthored: Thu Feb 16 16:16:51 2017 +0530 Committer: Gaurav Nagar Committed: Thu Feb 16 16:16:59 2017 +0530 -- .../src/main/resources/ui/app/components/designer-workspace.js | 2 +- contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1b628a/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js index aa2e791..f93e1b8 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/designer-workspace.js @@ -234,7 +234,7 @@ export default Ember.Component.extend({ this.createOrShowProjManager(); }, showWarning(index){ - this.$('#ConfirmDialog').remove(); + this.set('showingWarning', false); var tab = this.get('tabs').objectAt(index); this.set('indexToClose', index); if(tab && tab.type ==='dashboard'){ http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1b628a/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less b/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less index f4869e4..86c1dd3 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less +++ b/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less @@ -80,7 +80,7 @@ a { margin-right: 10px !important; } .padding15pcnt { - padding:15%; + padding:8px; } #arrow{ top: 24%;
[1/2] ambari git commit: AMBARI-19823. If by any case Migration Is hampered Then No message is shown in UI Hue-Ambari Migration view. (Ishan Bhatt via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 1b6d1937a -> 0255354df http://git-wip-us.apache.org/repos/asf/ambari/blob/0255354d/contrib/views/hueambarimigration/src/main/resources/ui/hueambarimigration-view/app/templates/home-page/pig-udf.hbs -- diff --git a/contrib/views/hueambarimigration/src/main/resources/ui/hueambarimigration-view/app/templates/home-page/pig-udf.hbs b/contrib/views/hueambarimigration/src/main/resources/ui/hueambarimigration-view/app/templates/home-page/pig-udf.hbs index 74b1cca..b2112c8 100644 --- a/contrib/views/hueambarimigration/src/main/resources/ui/hueambarimigration-view/app/templates/home-page/pig-udf.hbs +++ b/contrib/views/hueambarimigration/src/main/resources/ui/hueambarimigration-view/app/templates/home-page/pig-udf.hbs @@ -14,96 +14,105 @@ See the License for the specific language governing permissions and limitations under the License. }} - -Pig UDFs Migration - + +Pig UDFs Migration + + + + + +User Name + * + + + +{{ember-selectize content=model.usersdetail selection=model.selections optionValuePath="content.username" optionLabelPath="content.username" multiple=true add-value="addSelection" remove-value="removeSelection" placeholder="Select an userName" }} + - - - -User Name - * - - - -{{ember-selectize content=model.usersdetail selection=model.selections optionValuePath="content.username" optionLabelPath="content.username" multiple=true add-value="addSelection" remove-value="removeSelection" placeholder="Select an userName" }} - - - - - -Instance Name - * - - - -{{ember-selectize content=model.piginstancedetail optionValuePath="content.instanceName" optionLabelPath="content.instanceName" value=instancename placeholder="Select an Instance name" }} - - - - - -Submit - - - -{{#if jobstatus}} - -Job has been Submitted. - - -{{/if}} - - - - - -{{#if jobstatus}} - - - - - -{{/if}} - - - - -{{#if completionStatus}} -Migration Report - - - - -Parameters -Status - - - - -Number of UDFs Transferred -{{numberOfQueryTransfered}} - - -Total Number of UDFs -{{totalNoQuery}} - - -Total Time Taken -{{totalTimeTaken}}ms - - -Hue Users -{{Username}} - - -Ambari Instance Name(Target) -{{instanceName}} - - - -{{/if}} + + + +Instance Name + * + + + +{{ember-selectize content=model.piginstancedetail optionValuePath="content.instanceName" optionLabelPath="content.instanceName" value=instancename placeholder="Select an Instance name" }} + + + + + +Submit + + + +{{#if jobstatus}} + +Job has been Submitted. + + +{{/if}} + + + + + +{{#if jobstatus}} + + + - + +{{/if}} + + + + +{{#if error}} + Error Occured during migration + {{error}} +{{/if}} + + + + +{{#if completionStatus}} + Migration Report + + + + + Parameters + Status + + + + + Number of UDFs Transferred +
[2/2] ambari git commit: AMBARI-19823. If by any case Migration Is hampered Then No message is shown in UI Hue-Ambari Migration view. (Ishan Bhatt via gauravn7)
AMBARI-19823. If by any case Migration Is hampered Then No message is shown in UI Hue-Ambari Migration view. (Ishan Bhatt via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0255354d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0255354d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0255354d Branch: refs/heads/branch-2.5 Commit: 0255354df9f5b9a8959bd42b5e38026ae466b143 Parents: 1b6d193 Author: Gaurav NagarAuthored: Thu Feb 16 10:47:22 2017 +0530 Committer: Gaurav Nagar Committed: Thu Feb 16 10:48:30 2017 +0530 -- .../HiveHistoryMigrationUtility.java| 26 +- ...HiveHistoryQueryMigrationImplementation.java | 2 +- .../HiveSavedQueryMigrationImplementation.java | 4 +- .../HiveSavedQueryMigrationUtility.java | 29 +- .../pigjob/PigJobMigrationImplementation.java | 5 +- .../pig/pigjob/PigJobMigrationUtility.java | 377 ++- .../PigScriptMigrationImplementation.java | 5 +- .../pigscript/PigScriptMigrationUtility.java| 27 +- .../pigudf/PigUdfMigrationImplementation.java | 5 +- .../pig/pigudf/PigUdfMigrationUtility.java | 286 +++--- .../scripts/models/MigrationResponse.java | 6 + .../app/models/checkprogress.js | 3 +- .../app/routes/home-page/hive-history.js| 7 +- .../app/routes/home-page/hive-saved-query.js| 8 +- .../app/routes/home-page/pig-job.js | 7 +- .../app/routes/home-page/pig-script.js | 8 +- .../app/routes/home-page/pig-udf.js | 8 +- .../app/templates/home-page/hive-history.hbs| 8 + .../templates/home-page/hive-saved-query.hbs| 8 + .../app/templates/home-page/pig-job.hbs | 8 + .../app/templates/home-page/pig-script.hbs | 8 + .../app/templates/home-page/pig-udf.hbs | 187 - 22 files changed, 578 insertions(+), 454 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0255354d/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/migration/hive/historyquery/HiveHistoryMigrationUtility.java -- diff --git a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/migration/hive/historyquery/HiveHistoryMigrationUtility.java b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/migration/hive/historyquery/HiveHistoryMigrationUtility.java index bab2084..7c3b2c2 100755 --- a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/migration/hive/historyquery/HiveHistoryMigrationUtility.java +++ b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/migration/hive/historyquery/HiveHistoryMigrationUtility.java @@ -69,6 +69,7 @@ public class HiveHistoryMigrationUtility { Connection connectionHuedb = null; Connection connectionAmbaridb = null; + logger.info(System.getProperty("java.class.path")); logger.info("--"); @@ -121,7 +122,7 @@ public class HiveHistoryMigrationUtility { try { String[] usernames = username.split(","); int totalQueries = 0; - for(int k=0; k
[2/2] ambari git commit: AMBARI-19823. If by any case Migration Is hampered Then No message is shown in UI Hue-Ambari Migration view. (Ishan Bhatt via gauravn7)
AMBARI-19823. If by any case Migration Is hampered Then No message is shown in UI Hue-Ambari Migration view. (Ishan Bhatt via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4aa0f623 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4aa0f623 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4aa0f623 Branch: refs/heads/trunk Commit: 4aa0f6234e42b2328e2b0b3f435a1b13d27412a9 Parents: d4c1ace Author: Gaurav NagarAuthored: Thu Feb 16 10:47:22 2017 +0530 Committer: Gaurav Nagar Committed: Thu Feb 16 10:47:22 2017 +0530 -- .../HiveHistoryMigrationUtility.java| 26 +- ...HiveHistoryQueryMigrationImplementation.java | 2 +- .../HiveSavedQueryMigrationImplementation.java | 4 +- .../HiveSavedQueryMigrationUtility.java | 29 +- .../pigjob/PigJobMigrationImplementation.java | 5 +- .../pig/pigjob/PigJobMigrationUtility.java | 377 ++- .../PigScriptMigrationImplementation.java | 5 +- .../pigscript/PigScriptMigrationUtility.java| 27 +- .../pigudf/PigUdfMigrationImplementation.java | 5 +- .../pig/pigudf/PigUdfMigrationUtility.java | 286 +++--- .../scripts/models/MigrationResponse.java | 6 + .../app/models/checkprogress.js | 3 +- .../app/routes/home-page/hive-history.js| 7 +- .../app/routes/home-page/hive-saved-query.js| 8 +- .../app/routes/home-page/pig-job.js | 7 +- .../app/routes/home-page/pig-script.js | 8 +- .../app/routes/home-page/pig-udf.js | 8 +- .../app/templates/home-page/hive-history.hbs| 8 + .../templates/home-page/hive-saved-query.hbs| 8 + .../app/templates/home-page/pig-job.hbs | 8 + .../app/templates/home-page/pig-script.hbs | 8 + .../app/templates/home-page/pig-udf.hbs | 187 - 22 files changed, 578 insertions(+), 454 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4aa0f623/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/migration/hive/historyquery/HiveHistoryMigrationUtility.java -- diff --git a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/migration/hive/historyquery/HiveHistoryMigrationUtility.java b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/migration/hive/historyquery/HiveHistoryMigrationUtility.java index bab2084..7c3b2c2 100755 --- a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/migration/hive/historyquery/HiveHistoryMigrationUtility.java +++ b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/migration/hive/historyquery/HiveHistoryMigrationUtility.java @@ -69,6 +69,7 @@ public class HiveHistoryMigrationUtility { Connection connectionHuedb = null; Connection connectionAmbaridb = null; + logger.info(System.getProperty("java.class.path")); logger.info("--"); @@ -121,7 +122,7 @@ public class HiveHistoryMigrationUtility { try { String[] usernames = username.split(","); int totalQueries = 0; - for(int k=0; k
[1/2] ambari git commit: AMBARI-19823. If by any case Migration Is hampered Then No message is shown in UI Hue-Ambari Migration view. (Ishan Bhatt via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk d4c1ace80 -> 4aa0f6234 http://git-wip-us.apache.org/repos/asf/ambari/blob/4aa0f623/contrib/views/hueambarimigration/src/main/resources/ui/hueambarimigration-view/app/templates/home-page/pig-udf.hbs -- diff --git a/contrib/views/hueambarimigration/src/main/resources/ui/hueambarimigration-view/app/templates/home-page/pig-udf.hbs b/contrib/views/hueambarimigration/src/main/resources/ui/hueambarimigration-view/app/templates/home-page/pig-udf.hbs index 74b1cca..b2112c8 100644 --- a/contrib/views/hueambarimigration/src/main/resources/ui/hueambarimigration-view/app/templates/home-page/pig-udf.hbs +++ b/contrib/views/hueambarimigration/src/main/resources/ui/hueambarimigration-view/app/templates/home-page/pig-udf.hbs @@ -14,96 +14,105 @@ See the License for the specific language governing permissions and limitations under the License. }} - -Pig UDFs Migration - + +Pig UDFs Migration + + + + + +User Name + * + + + +{{ember-selectize content=model.usersdetail selection=model.selections optionValuePath="content.username" optionLabelPath="content.username" multiple=true add-value="addSelection" remove-value="removeSelection" placeholder="Select an userName" }} + - - - -User Name - * - - - -{{ember-selectize content=model.usersdetail selection=model.selections optionValuePath="content.username" optionLabelPath="content.username" multiple=true add-value="addSelection" remove-value="removeSelection" placeholder="Select an userName" }} - - - - - -Instance Name - * - - - -{{ember-selectize content=model.piginstancedetail optionValuePath="content.instanceName" optionLabelPath="content.instanceName" value=instancename placeholder="Select an Instance name" }} - - - - - -Submit - - - -{{#if jobstatus}} - -Job has been Submitted. - - -{{/if}} - - - - - -{{#if jobstatus}} - - - - - -{{/if}} - - - - -{{#if completionStatus}} -Migration Report - - - - -Parameters -Status - - - - -Number of UDFs Transferred -{{numberOfQueryTransfered}} - - -Total Number of UDFs -{{totalNoQuery}} - - -Total Time Taken -{{totalTimeTaken}}ms - - -Hue Users -{{Username}} - - -Ambari Instance Name(Target) -{{instanceName}} - - - -{{/if}} + + + +Instance Name + * + + + +{{ember-selectize content=model.piginstancedetail optionValuePath="content.instanceName" optionLabelPath="content.instanceName" value=instancename placeholder="Select an Instance name" }} + + + + + +Submit + + + +{{#if jobstatus}} + +Job has been Submitted. + + +{{/if}} + + + + + +{{#if jobstatus}} + + + - + +{{/if}} + + + + +{{#if error}} + Error Occured during migration + {{error}} +{{/if}} + + + + +{{#if completionStatus}} + Migration Report + + + + + Parameters + Status + + + + + Number of UDFs Transferred + {{numberOfQueryTransfered}}