[jira] [Updated] (AMBARI-25909) modify Attribute isAlive from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25909?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25909:
-
Labels: Thread isAlive python2 python3  (was: )

> modify Attribute isAlive from python2 to python3
> 
>
> Key: AMBARI-25909
> URL: https://issues.apache.org/jira/browse/AMBARI-25909
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-agent
>Affects Versions: 2.7.5
>Reporter: Charming Wu
>Priority: Major
>  Labels: Thread, isAlive, python2, python3
>
> After python3.9 , attribute "isAlive" in module Thread has been renamed 
> "is_alive".



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25910) modify Function hasattr from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25910:
-
Environment: 
{*}Ambari:{*}Ambari-2.7.5

*OS:*        OpenEuler-22.03

*Python:* Python 3.9.9

> modify Function hasattr from python2 to python3
> ---
>
> Key: AMBARI-25910
> URL: https://issues.apache.org/jira/browse/AMBARI-25910
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-client
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
>  Labels: hasattr, python2, python3
> Attachments: image-2023-03-22-12-02-53-173.png
>
>
> In python2, hasattr() function catched all attributes lookup exceptions and 
> return False.
> But in python3, it only catch AttributeError and return False, when it comes 
> to other exceptions, the call stack will be bubbled up.
>  
> In order to adapt from python2 to python3, I would like to  add a try-catch 
> block and catch all exceptions and return False:
> !image-2023-03-22-12-02-53-173.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25910) modify Function hasattr from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25910:
-
Labels: hasattr python2 python3  (was: )

> modify Function hasattr from python2 to python3
> ---
>
> Key: AMBARI-25910
> URL: https://issues.apache.org/jira/browse/AMBARI-25910
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-client
>Affects Versions: 2.7.5
>Reporter: Charming Wu
>Priority: Major
>  Labels: hasattr, python2, python3
> Attachments: image-2023-03-22-12-02-53-173.png
>
>
> In python2, hasattr() function catched all attributes lookup exceptions and 
> return False.
> But in python3, it only catch AttributeError and return False, when it comes 
> to other exceptions, the call stack will be bubbled up.
>  
> In order to adapt from python2 to python3, I would like to  add a try-catch 
> block and catch all exceptions and return False:
> !image-2023-03-22-12-02-53-173.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Created] (AMBARI-25910) modify Function hasattr from python2 to python3

2023-03-21 Thread Charming Wu (Jira)
Charming Wu created AMBARI-25910:


 Summary: modify Function hasattr from python2 to python3
 Key: AMBARI-25910
 URL: https://issues.apache.org/jira/browse/AMBARI-25910
 Project: Ambari
  Issue Type: Sub-task
  Components: ambari-client
Affects Versions: 2.7.5
Reporter: Charming Wu
 Attachments: image-2023-03-22-12-02-53-173.png

In python2, hasattr() function catched all attributes lookup exceptions and 
return False.

But in python3, it only catch AttributeError and return False, when it comes to 
other exceptions, the call stack will be bubbled up.

 

In order to adapt from python2 to python3, I would like to  add a try-catch 
block and catch all exceptions and return False:

!image-2023-03-22-12-02-53-173.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Created] (AMBARI-25911) Ambari fails to capture Hive Metastore alerts when HMS is critical or goes OOM

2023-03-21 Thread Vishal Suvagia (Jira)
Vishal Suvagia created AMBARI-25911:
---

 Summary: Ambari fails to capture Hive Metastore alerts when HMS is 
critical or goes OOM
 Key: AMBARI-25911
 URL: https://issues.apache.org/jira/browse/AMBARI-25911
 Project: Ambari
  Issue Type: Improvement
  Components: alerts
Affects Versions: 2.7.7
Reporter: Vishal Suvagia
Assignee: Vishal Suvagia
 Fix For: 2.7.8


Ambari fails to capture Hive Metastore alerts when HMS is critical or goes OOM. 
Thus rendering the alert check ineffective.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25909) modify Attribute isAlive from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25909?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25909:
-
Environment: 
{*}Ambari:{*}Ambari-2.7.5

*OS:*        OpenEuler-22.03

*Python:* Python 3.9.9

> modify Attribute isAlive from python2 to python3
> 
>
> Key: AMBARI-25909
> URL: https://issues.apache.org/jira/browse/AMBARI-25909
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-agent
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
>  Labels: Thread, isAlive, python2, python3
>
> After python3.9 , attribute "isAlive" in module Thread has been renamed 
> "is_alive".



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25909) modify Attribute isAlive from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25909?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25909:
-
Description: 
!image-2023-03-22-10-50-39-348.png!

After python3.9 , attribute "isAlive" in module Thread has been renamed 
"is_alive".

  was:After python3.9 , attribute "isAlive" in module Thread has been renamed 
"is_alive".


> modify Attribute isAlive from python2 to python3
> 
>
> Key: AMBARI-25909
> URL: https://issues.apache.org/jira/browse/AMBARI-25909
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-agent
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
>  Labels: Thread, isAlive, python2, python3
>
> !image-2023-03-22-10-50-39-348.png!
> After python3.9 , attribute "isAlive" in module Thread has been renamed 
> "is_alive".



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25909) modify Attribute isAlive from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25909?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25909:
-
Description: 
!image-2023-03-22-10-51-17-902.png!

After python3.9 , attribute "isAlive" in module Thread has been renamed 
"is_alive".

  was:
!image-2023-03-22-10-50-57-103.png!

After python3.9 , attribute "isAlive" in module Thread has been renamed 
"is_alive".


> modify Attribute isAlive from python2 to python3
> 
>
> Key: AMBARI-25909
> URL: https://issues.apache.org/jira/browse/AMBARI-25909
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-agent
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
>  Labels: Thread, isAlive, python2, python3
> Attachments: image-2023-03-22-10-51-17-902.png
>
>
> !image-2023-03-22-10-51-17-902.png!
> After python3.9 , attribute "isAlive" in module Thread has been renamed 
> "is_alive".



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25909) modify Attribute isAlive from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25909?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25909:
-
Description: 
!image-2023-03-22-10-50-57-103.png!

After python3.9 , attribute "isAlive" in module Thread has been renamed 
"is_alive".

  was:
!image-2023-03-22-10-50-39-348.png!

After python3.9 , attribute "isAlive" in module Thread has been renamed 
"is_alive".


> modify Attribute isAlive from python2 to python3
> 
>
> Key: AMBARI-25909
> URL: https://issues.apache.org/jira/browse/AMBARI-25909
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-agent
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
>  Labels: Thread, isAlive, python2, python3
> Attachments: image-2023-03-22-10-51-17-902.png
>
>
> !image-2023-03-22-10-50-57-103.png!
> After python3.9 , attribute "isAlive" in module Thread has been renamed 
> "is_alive".



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25909) modify Attribute isAlive from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25909?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25909:
-
Attachment: image-2023-03-22-10-51-17-902.png

> modify Attribute isAlive from python2 to python3
> 
>
> Key: AMBARI-25909
> URL: https://issues.apache.org/jira/browse/AMBARI-25909
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-agent
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
>  Labels: Thread, isAlive, python2, python3
> Attachments: image-2023-03-22-10-51-17-902.png
>
>
> !image-2023-03-22-10-50-57-103.png!
> After python3.9 , attribute "isAlive" in module Thread has been renamed 
> "is_alive".



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Created] (AMBARI-25898) modify Divide Operator from python2 to python3

2023-03-21 Thread Charming Wu (Jira)
Charming Wu created AMBARI-25898:


 Summary: modify Divide Operator  from python2 to python3
 Key: AMBARI-25898
 URL: https://issues.apache.org/jira/browse/AMBARI-25898
 Project: Ambari
  Issue Type: Sub-task
  Components: ambari-server
Affects Versions: 2.7.5
Reporter: Charming Wu
 Attachments: image-2023-03-21-14-43-53-490.png

in python2, divide operator function as follows:

    5 / 2 = 2

    5.0 / 2.0 = 2.5

in python3, divide operator function as follows:

    5 / 2 = 2.5

    5.0 / 2.0 = 2.5

 

which means that in python2, the function of divide operator is depended on the 
data type.

If inputs are Integers,  it becomes integer division.

If inputs are floating point number, it becomes float division.

 

in order to perform the same function of python2 divide in python3, I would 
like to define a util funtion named "py2Divide(val1, val2)" to do this:

!image-2023-03-21-14-43-53-490.png!

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25901) modify Round Function from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25901:
-
Labels: python2 python3 round  (was: )

> modify Round Function from python2 to python3
> -
>
> Key: AMBARI-25901
> URL: https://issues.apache.org/jira/browse/AMBARI-25901
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-client, ambari-server
>Affects Versions: 2.7.5
>Reporter: Charming Wu
>Priority: Major
>  Labels: python2, python3, round
> Attachments: image-2023-03-21-17-15-24-593.png
>
>
> In pytthon2, round() function work as follows:
>      round(2.5) => 3.0
> In python3, round() function work as follows:
>      round(2.5) => 2
>  
> in python2 it return a rounding number 3.0.
> in python3 it return a Integer 2, which is the closest even number to 2.5.
> this different will cause some problem, to aovid failure, I would like to add 
> this function to make round() function work as python2 in python3.
>  
> !image-2023-03-21-17-15-24-593.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25901) modify Round Function from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25901:
-
 Attachment: image-2023-03-21-17-15-24-593.png
Description: 
In pytthon2, round() function work as follows:

     round(2.5) => 3.0

In python3, round() function work as follows:

     round(2.5) => 2

 

in python2 it return a rounding number 3.0.

in python3 it return a Integer 2, which is the closest even number to 2.5.

this different will cause some problem, to aovid failure, I would like to add 
this function to make round() function work as python2 in python3.

 

!image-2023-03-21-17-15-24-593.png!

> modify Round Function from python2 to python3
> -
>
> Key: AMBARI-25901
> URL: https://issues.apache.org/jira/browse/AMBARI-25901
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-client, ambari-server
>Affects Versions: 2.7.5
>Reporter: Charming Wu
>Priority: Major
> Attachments: image-2023-03-21-17-15-24-593.png
>
>
> In pytthon2, round() function work as follows:
>      round(2.5) => 3.0
> In python3, round() function work as follows:
>      round(2.5) => 2
>  
> in python2 it return a rounding number 3.0.
> in python3 it return a Integer 2, which is the closest even number to 2.5.
> this different will cause some problem, to aovid failure, I would like to add 
> this function to make round() function work as python2 in python3.
>  
> !image-2023-03-21-17-15-24-593.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25901) modify Round Function from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25901:
-
Environment: 
{*}Ambari:{*}Ambari-2.7.5

*OS:*        OpenEuler-22.03

*Python:* Python 3.9.9
 Labels:   (was: python2 python3 round)

> modify Round Function from python2 to python3
> -
>
> Key: AMBARI-25901
> URL: https://issues.apache.org/jira/browse/AMBARI-25901
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-client, ambari-server
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
> Attachments: image-2023-03-21-17-15-24-593.png
>
>
> In pytthon2, round() function work as follows:
>      round(2.5) => 3.0
> In python3, round() function work as follows:
>      round(2.5) => 2
>  
> in python2 it return a rounding number 3.0.
> in python3 it return a Integer 2, which is the closest even number to 2.5.
> this different will cause some problem, to aovid failure, I would like to add 
> this function to make round() function work as python2 in python3.
>  
> !image-2023-03-21-17-15-24-593.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25903) modify attribute raw_input from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25903:
-
Labels: input python2 python3 raw_input  (was: )

> modify attribute raw_input from python2 to python3
> --
>
> Key: AMBARI-25903
> URL: https://issues.apache.org/jira/browse/AMBARI-25903
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-client, ambari-server
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
>  Labels: input, python2, python3, raw_input
>
> In python3, attribute “raw_input" had been deleted. I would like to use 
> "input" instead.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Created] (AMBARI-25907) modify Atribute _Event from python2 to python3

2023-03-21 Thread Charming Wu (Jira)
Charming Wu created AMBARI-25907:


 Summary: modify Atribute _Event from python2 to python3
 Key: AMBARI-25907
 URL: https://issues.apache.org/jira/browse/AMBARI-25907
 Project: Ambari
  Issue Type: Sub-task
  Components: ambari-agent
Affects Versions: 2.7.5
Reporter: Charming Wu
 Attachments: image-2023-03-21-18-08-23-868.png

!image-2023-03-21-18-08-23-868.png!

In python3, module threading own attribute "Event", not "_Event"



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25907) modify Atribute _Event from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25907:
-
Environment: 
{*}Ambari:{*}Ambari-2.7.5

*OS:*        OpenEuler-22.03

*Python:* Python 3.9.9

> modify Atribute _Event from python2 to python3
> --
>
> Key: AMBARI-25907
> URL: https://issues.apache.org/jira/browse/AMBARI-25907
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-agent
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
> Attachments: image-2023-03-21-18-08-23-868.png
>
>
> !image-2023-03-21-18-08-23-868.png!
> In python3, module threading own attribute "Event", not "_Event"



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Created] (AMBARI-25899) Using Python Official Script "2to3" to Upgreade

2023-03-21 Thread Charming Wu (Jira)
Charming Wu created AMBARI-25899:


 Summary: Using Python Official Script "2to3" to Upgreade 
 Key: AMBARI-25899
 URL: https://issues.apache.org/jira/browse/AMBARI-25899
 Project: Ambari
  Issue Type: Sub-task
  Components: ambari-admin, ambari-client, ambari-server
Affects Versions: 2.7.5
Reporter: Charming Wu


First of all, this first subtask is the basis of  Ambari python3 adaption.

 

1. Dowload Ambari source code here:

[https://github.com/apache/ambari/releases/tag/release-2.7.5]

 

2. Install 2to3 in your environment( if you had install it, skip this step):

_pip install 2to3_

 

3. Upgrade Ambari Python Files:

   _cd apache-ambari-2.7.5-src_

   _python3 /usr/bin/2to3 -w ._

 

Attention: this upgrade will overwrite the src code.

   __   

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Created] (AMBARI-25903) modify attribute raw_input from python2 to python3

2023-03-21 Thread Charming Wu (Jira)
Charming Wu created AMBARI-25903:


 Summary: modify attribute raw_input from python2 to python3
 Key: AMBARI-25903
 URL: https://issues.apache.org/jira/browse/AMBARI-25903
 Project: Ambari
  Issue Type: Sub-task
  Components: ambari-client, ambari-server
Affects Versions: 2.7.5
Reporter: Charming Wu


In python3, attribute “raw_input" had been deleted. I would like to use "input" 
instead.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25905) modify linux_distribution Function from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25905:
-
Attachment: image-2023-03-21-17-59-58-644.png

> modify linux_distribution Function from python2 to python3
> --
>
> Key: AMBARI-25905
> URL: https://issues.apache.org/jira/browse/AMBARI-25905
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-client, ambari-server
>Affects Versions: 2.7.5
>Reporter: Charming Wu
>Priority: Major
> Attachments: image-2023-03-21-17-59-58-644.png
>
>
> !image-2023-03-21-17-59-22-734.png!
> After python 3.7, function : platform.linux_distribution() had been removed. 
> use distro.linux_distribution() instead.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25902) modify Function Cmp from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25902:
-
Summary: modify Function Cmp from python2 to python3  (was: modify Cmp 
Function from python2 to python3)

> modify Function Cmp from python2 to python3
> ---
>
> Key: AMBARI-25902
> URL: https://issues.apache.org/jira/browse/AMBARI-25902
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-agent, ambari-server
>Affects Versions: 2.7.5, 2.7.6
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
> Attachments: image-2023-03-21-17-46-50-821.png
>
>
> Since cmp() function is deleted in python3, so to implement same function, I 
> would like to use module "opreator" to do this:
> !image-2023-03-21-17-46-50-821.png!
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25905) modify Function linux_distribution from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25905:
-
Summary: modify Function linux_distribution from python2 to python3  (was: 
modify linux_distribution Function from python2 to python3)

> modify Function linux_distribution from python2 to python3
> --
>
> Key: AMBARI-25905
> URL: https://issues.apache.org/jira/browse/AMBARI-25905
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-client, ambari-server
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
>  Labels: linux_dstribut, platform, python2, python3
> Attachments: image-2023-03-21-17-59-58-644.png
>
>
> !image-2023-03-21-17-59-58-644.png!
> After python 3.7, function : platform.linux_distribution() had been removed. 
> use distro.linux_distribution() instead.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25898) modify Function Divide from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25898:
-
Summary: modify Function Divide from python2 to python3  (was: modify 
Divide Function  from python2 to python3)

> modify Function Divide from python2 to python3
> --
>
> Key: AMBARI-25898
> URL: https://issues.apache.org/jira/browse/AMBARI-25898
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-server
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
>  Labels: DivideOperator, python2, python3
> Attachments: image-2023-03-21-14-43-53-490.png
>
>
> in python2, divide operator function as follows:
>     5 / 2 = 2
>     5.0 / 2.0 = 2.5
> in python3, divide operator function as follows:
>     5 / 2 = 2.5
>     5.0 / 2.0 = 2.5
>  
> which means that in python2, the function of divide operator is depended on 
> the data type.
> If inputs are Integers,  it becomes integer division.
> If inputs are floating point number, it becomes float division.
>  
> in order to perform the same function of python2 divide in python3, I would 
> like to define a util funtion named "py2Divide(val1, val2)" to do this:
> !image-2023-03-21-14-43-53-490.png!
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25901) modify Function Round from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25901:
-
Summary: modify Function Round from python2 to python3  (was: modify Round 
Function from python2 to python3)

> modify Function Round from python2 to python3
> -
>
> Key: AMBARI-25901
> URL: https://issues.apache.org/jira/browse/AMBARI-25901
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-client, ambari-server
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
> Attachments: image-2023-03-21-17-15-24-593.png
>
>
> In pytthon2, round() function work as follows:
>      round(2.5) => 3.0
> In python3, round() function work as follows:
>      round(2.5) => 2
>  
> in python2 it return a rounding number 3.0.
> in python3 it return a Integer 2, which is the closest even number to 2.5.
> this different will cause some problem, to aovid failure, I would like to add 
> this function to make round() function work as python2 in python3.
>  
> !image-2023-03-21-17-15-24-593.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25899) Using Python Official Script "2to3" to Upgreade

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25899:
-
Environment: 
{*}Ambari:{*}Ambari-2.7.5

*OS:*        OpenEuler-22.03

*Python:* Python 3.9.9

> Using Python Official Script "2to3" to Upgreade 
> 
>
> Key: AMBARI-25899
> URL: https://issues.apache.org/jira/browse/AMBARI-25899
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-admin, ambari-client, ambari-server
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
>  Labels: Ambari, autoUpgrade, python2, python3
>
> First of all, this first subtask is the basis of  Ambari python3 adaption.
>  
> 1. Dowload Ambari source code here:
> [https://github.com/apache/ambari/releases/tag/release-2.7.5]
>  
> 2. Install 2to3 in your environment( if you had install it, skip this step):
> _pip install 2to3_
>  
> 3. Upgrade Ambari Python Files:
>    _cd apache-ambari-2.7.5-src_
>    _python3 /usr/bin/2to3 -w ._
>  
> Attention: this upgrade will overwrite the src code.
>    __   
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25899) Using Python Official Script "2to3" to Upgreade

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25899:
-
Labels: Ambari autoUpgrade python2 python3  (was: )

> Using Python Official Script "2to3" to Upgreade 
> 
>
> Key: AMBARI-25899
> URL: https://issues.apache.org/jira/browse/AMBARI-25899
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-admin, ambari-client, ambari-server
>Affects Versions: 2.7.5
>Reporter: Charming Wu
>Priority: Major
>  Labels: Ambari, autoUpgrade, python2, python3
>
> First of all, this first subtask is the basis of  Ambari python3 adaption.
>  
> 1. Dowload Ambari source code here:
> [https://github.com/apache/ambari/releases/tag/release-2.7.5]
>  
> 2. Install 2to3 in your environment( if you had install it, skip this step):
> _pip install 2to3_
>  
> 3. Upgrade Ambari Python Files:
>    _cd apache-ambari-2.7.5-src_
>    _python3 /usr/bin/2to3 -w ._
>  
> Attention: this upgrade will overwrite the src code.
>    __   
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Created] (AMBARI-25902) modify cmp function from python2 to python3

2023-03-21 Thread Charming Wu (Jira)
Charming Wu created AMBARI-25902:


 Summary: modify cmp function from python2 to python3
 Key: AMBARI-25902
 URL: https://issues.apache.org/jira/browse/AMBARI-25902
 Project: Ambari
  Issue Type: Sub-task
  Components: ambari-agent, ambari-server
Affects Versions: 2.7.6, 2.7.5
 Environment: {*}Ambari:{*}Ambari-2.7.5

*OS:*        OpenEuler-22.03

*Python:* Python 3.9.9
Reporter: Charming Wu
 Attachments: image-2023-03-21-17-46-50-821.png

Since cmp() function is deleted in python3, so to implement same function, I 
would like to use module "opreator" to do this:

!image-2023-03-21-17-46-50-821.png!

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25902) modify Cmp Function from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25902:
-
Summary: modify Cmp Function from python2 to python3  (was: modify cmp 
function from python2 to python3)

> modify Cmp Function from python2 to python3
> ---
>
> Key: AMBARI-25902
> URL: https://issues.apache.org/jira/browse/AMBARI-25902
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-agent, ambari-server
>Affects Versions: 2.7.5, 2.7.6
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
> Attachments: image-2023-03-21-17-46-50-821.png
>
>
> Since cmp() function is deleted in python3, so to implement same function, I 
> would like to use module "opreator" to do this:
> !image-2023-03-21-17-46-50-821.png!
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Created] (AMBARI-25905) modify linux_distribution Function from python2 to python3

2023-03-21 Thread Charming Wu (Jira)
Charming Wu created AMBARI-25905:


 Summary: modify linux_distribution Function from python2 to python3
 Key: AMBARI-25905
 URL: https://issues.apache.org/jira/browse/AMBARI-25905
 Project: Ambari
  Issue Type: Sub-task
  Components: ambari-client, ambari-server
Affects Versions: 2.7.5
Reporter: Charming Wu


!image-2023-03-21-17-58-45-972.png!

After python 3.7, function : platform.linux_distribution() had been removed. 
use distro.linux_distribution() instead.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Created] (AMBARI-25906) modify Module ConfigParser from python2 to python3

2023-03-21 Thread Charming Wu (Jira)
Charming Wu created AMBARI-25906:


 Summary: modify Module ConfigParser from python2 to python3
 Key: AMBARI-25906
 URL: https://issues.apache.org/jira/browse/AMBARI-25906
 Project: Ambari
  Issue Type: Sub-task
  Components: ambari-agent
Affects Versions: 2.7.5
Reporter: Charming Wu
 Attachments: image-2023-03-21-18-01-20-402.png

!image-2023-03-21-18-01-20-402.png!

In python3, module "ConfigParser" has been renamed to "configparser" .

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25905) modify linux_distribution Function from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25905:
-
Environment: 
{*}Ambari:{*}Ambari-2.7.5

*OS:*        OpenEuler-22.03

*Python:* Python 3.9.9

> modify linux_distribution Function from python2 to python3
> --
>
> Key: AMBARI-25905
> URL: https://issues.apache.org/jira/browse/AMBARI-25905
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-client, ambari-server
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
> Attachments: image-2023-03-21-17-59-58-644.png
>
>
> !image-2023-03-21-17-59-58-644.png!
> After python 3.7, function : platform.linux_distribution() had been removed. 
> use distro.linux_distribution() instead.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25904) modify Module urllib2 from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25904?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25904:
-
Labels: python2 python3 urllib urllib2  (was: )

> modify Module urllib2 from python2 to python3
> -
>
> Key: AMBARI-25904
> URL: https://issues.apache.org/jira/browse/AMBARI-25904
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-server
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
>  Labels: python2, python3, urllib, urllib2
>
> In python3, module urllib2 had been removed, use urllib instead.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25905) modify linux_distribution Function from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25905:
-
Labels: linux_dstribut platform python2 python3  (was: )

> modify linux_distribution Function from python2 to python3
> --
>
> Key: AMBARI-25905
> URL: https://issues.apache.org/jira/browse/AMBARI-25905
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-client, ambari-server
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
>  Labels: linux_dstribut, platform, python2, python3
> Attachments: image-2023-03-21-17-59-58-644.png
>
>
> !image-2023-03-21-17-59-58-644.png!
> After python 3.7, function : platform.linux_distribution() had been removed. 
> use distro.linux_distribution() instead.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25898) modify Divide Operator from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25898:
-
Environment: 
{*}Ambari:{*}Ambari-2.7.5

*OS:*        OpenEuler-22.03

*Python:* Python 3.9.9

> modify Divide Operator  from python2 to python3
> ---
>
> Key: AMBARI-25898
> URL: https://issues.apache.org/jira/browse/AMBARI-25898
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-server
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
>  Labels: DivideOperator, python2, python3
> Attachments: image-2023-03-21-14-43-53-490.png
>
>
> in python2, divide operator function as follows:
>     5 / 2 = 2
>     5.0 / 2.0 = 2.5
> in python3, divide operator function as follows:
>     5 / 2 = 2.5
>     5.0 / 2.0 = 2.5
>  
> which means that in python2, the function of divide operator is depended on 
> the data type.
> If inputs are Integers,  it becomes integer division.
> If inputs are floating point number, it becomes float division.
>  
> in order to perform the same function of python2 divide in python3, I would 
> like to define a util funtion named "py2Divide(val1, val2)" to do this:
> !image-2023-03-21-14-43-53-490.png!
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25898) modify Divide Operator from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25898:
-
Labels: DivideOperator python2 python3  (was: )

> modify Divide Operator  from python2 to python3
> ---
>
> Key: AMBARI-25898
> URL: https://issues.apache.org/jira/browse/AMBARI-25898
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-server
>Affects Versions: 2.7.5
>Reporter: Charming Wu
>Priority: Major
>  Labels: DivideOperator, python2, python3
> Attachments: image-2023-03-21-14-43-53-490.png
>
>
> in python2, divide operator function as follows:
>     5 / 2 = 2
>     5.0 / 2.0 = 2.5
> in python3, divide operator function as follows:
>     5 / 2 = 2.5
>     5.0 / 2.0 = 2.5
>  
> which means that in python2, the function of divide operator is depended on 
> the data type.
> If inputs are Integers,  it becomes integer division.
> If inputs are floating point number, it becomes float division.
>  
> in order to perform the same function of python2 divide in python3, I would 
> like to define a util funtion named "py2Divide(val1, val2)" to do this:
> !image-2023-03-21-14-43-53-490.png!
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25900) modify Ceil/Floor Function from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25900?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25900:
-
Labels: ceil floor python2 python3  (was: )

> modify Ceil/Floor Function from python2 to python3
> --
>
> Key: AMBARI-25900
> URL: https://issues.apache.org/jira/browse/AMBARI-25900
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-agent, ambari-server
>Affects Versions: 2.7.5
>Reporter: Charming Wu
>Priority: Major
>  Labels: ceil, floor, python2, python3
>
> In pytthon2, ceil()/floor() function work as follows:
>      ceil(1.2) => 2.0
>      floor(1.2) => 1.0
> In python3, ceil() function work as follows:
>      ceil(1.2) => 2
>      floor(1.2) => 1
>  
> which means that in python2 it return a float value, in python3 it return a 
> Integer, this feature will casue Unit Test failed. 
>  
> To avoid failed unit test, I would like to make this change:
> python2 :  a = ceil(b)
> python3 :  a = float(ceil(b))
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25900) modify Ceil/Floor Function from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25900?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25900:
-
Environment: 
{*}Ambari:{*}Ambari-2.7.5

*OS:*        OpenEuler-22.03

*Python:* Python 3.9.9

> modify Ceil/Floor Function from python2 to python3
> --
>
> Key: AMBARI-25900
> URL: https://issues.apache.org/jira/browse/AMBARI-25900
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-agent, ambari-server
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
>  Labels: ceil, floor, python2, python3
>
> In pytthon2, ceil()/floor() function work as follows:
>      ceil(1.2) => 2.0
>      floor(1.2) => 1.0
> In python3, ceil() function work as follows:
>      ceil(1.2) => 2
>      floor(1.2) => 1
>  
> which means that in python2 it return a float value, in python3 it return a 
> Integer, this feature will casue Unit Test failed. 
>  
> To avoid failed unit test, I would like to make this change:
> python2 :  a = ceil(b)
> python3 :  a = float(ceil(b))
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Created] (AMBARI-25900) modify Ceil/Floor Function from python2 to python3

2023-03-21 Thread Charming Wu (Jira)
Charming Wu created AMBARI-25900:


 Summary: modify Ceil/Floor Function from python2 to python3
 Key: AMBARI-25900
 URL: https://issues.apache.org/jira/browse/AMBARI-25900
 Project: Ambari
  Issue Type: Sub-task
  Components: ambari-agent, ambari-server
Affects Versions: 2.7.5
Reporter: Charming Wu


In pytthon2, ceil()/floor() function work as follows:

     ceil(1.2) => 2.0

     floor(1.2) => 1.0

In python3, ceil() function work as follows:

     ceil(1.2) => 2

     floor(1.2) => 1

 

which means that in python2 it return a float value, in python3 it return a 
Integer, this feature will casue Unit Test failed. 

 

To avoid failed unit test, I would like to make this change:

python2 :  a = ceil(b)

python3 :  a = float(ceil(b))

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25903) modify Attribute raw_input from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25903:
-
Summary: modify Attribute raw_input from python2 to python3  (was: modify 
attribute raw_input from python2 to python3)

> modify Attribute raw_input from python2 to python3
> --
>
> Key: AMBARI-25903
> URL: https://issues.apache.org/jira/browse/AMBARI-25903
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-client, ambari-server
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
>  Labels: input, python2, python3, raw_input
>
> In python3, attribute “raw_input" had been deleted. I would like to use 
> "input" instead.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25903) modify attribute raw_input from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25903:
-
Environment: 
{*}Ambari:{*}Ambari-2.7.5

*OS:*        OpenEuler-22.03

*Python:* Python 3.9.9

> modify attribute raw_input from python2 to python3
> --
>
> Key: AMBARI-25903
> URL: https://issues.apache.org/jira/browse/AMBARI-25903
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-client, ambari-server
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
>
> In python3, attribute “raw_input" had been deleted. I would like to use 
> "input" instead.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25905) modify linux_distribution Function from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25905:
-
Description: 
!image-2023-03-21-17-59-58-644.png!

After python 3.7, function : platform.linux_distribution() had been removed. 
use distro.linux_distribution() instead.

  was:
!image-2023-03-21-17-59-22-734.png!

After python 3.7, function : platform.linux_distribution() had been removed. 
use distro.linux_distribution() instead.


> modify linux_distribution Function from python2 to python3
> --
>
> Key: AMBARI-25905
> URL: https://issues.apache.org/jira/browse/AMBARI-25905
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-client, ambari-server
>Affects Versions: 2.7.5
>Reporter: Charming Wu
>Priority: Major
> Attachments: image-2023-03-21-17-59-58-644.png
>
>
> !image-2023-03-21-17-59-58-644.png!
> After python 3.7, function : platform.linux_distribution() had been removed. 
> use distro.linux_distribution() instead.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25905) modify linux_distribution Function from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25905:
-
Description: 
!image-2023-03-21-17-59-22-734.png!

After python 3.7, function : platform.linux_distribution() had been removed. 
use distro.linux_distribution() instead.

  was:
!image-2023-03-21-17-58-45-972.png!

After python 3.7, function : platform.linux_distribution() had been removed. 
use distro.linux_distribution() instead.


> modify linux_distribution Function from python2 to python3
> --
>
> Key: AMBARI-25905
> URL: https://issues.apache.org/jira/browse/AMBARI-25905
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-client, ambari-server
>Affects Versions: 2.7.5
>Reporter: Charming Wu
>Priority: Major
>
> !image-2023-03-21-17-59-22-734.png!
> After python 3.7, function : platform.linux_distribution() had been removed. 
> use distro.linux_distribution() instead.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25906) modify Module ConfigParser from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25906:
-
Labels: configParser python2 python3  (was: )

> modify Module ConfigParser from python2 to python3
> --
>
> Key: AMBARI-25906
> URL: https://issues.apache.org/jira/browse/AMBARI-25906
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-agent
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
>  Labels: configParser, python2, python3
> Attachments: image-2023-03-21-18-01-20-402.png
>
>
> !image-2023-03-21-18-01-20-402.png!
> In python3, module "ConfigParser" has been renamed to "configparser" .
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25906) modify Module ConfigParser from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25906:
-
Environment: 
{*}Ambari:{*}Ambari-2.7.5

*OS:*        OpenEuler-22.03

*Python:* Python 3.9.9

> modify Module ConfigParser from python2 to python3
> --
>
> Key: AMBARI-25906
> URL: https://issues.apache.org/jira/browse/AMBARI-25906
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-agent
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
> Attachments: image-2023-03-21-18-01-20-402.png
>
>
> !image-2023-03-21-18-01-20-402.png!
> In python3, module "ConfigParser" has been renamed to "configparser" .
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Created] (AMBARI-25901) modify Round Function from python2 to python3

2023-03-21 Thread Charming Wu (Jira)
Charming Wu created AMBARI-25901:


 Summary: modify Round Function from python2 to python3
 Key: AMBARI-25901
 URL: https://issues.apache.org/jira/browse/AMBARI-25901
 Project: Ambari
  Issue Type: Sub-task
  Components: ambari-client, ambari-server
Affects Versions: 2.7.5
Reporter: Charming Wu






--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25904) modify Module urllib2 from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25904?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25904:
-
Environment: 
{*}Ambari:{*}Ambari-2.7.5

*OS:*        OpenEuler-22.03

*Python:* Python 3.9.9

> modify Module urllib2 from python2 to python3
> -
>
> Key: AMBARI-25904
> URL: https://issues.apache.org/jira/browse/AMBARI-25904
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-server
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
>
> In python3, module urllib2 had been removed, use urllib instead.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Created] (AMBARI-25904) modify Module urllib2 from python2 to python3

2023-03-21 Thread Charming Wu (Jira)
Charming Wu created AMBARI-25904:


 Summary: modify Module urllib2 from python2 to python3
 Key: AMBARI-25904
 URL: https://issues.apache.org/jira/browse/AMBARI-25904
 Project: Ambari
  Issue Type: Sub-task
  Components: ambari-server
Affects Versions: 2.7.5
Reporter: Charming Wu


In python3, module urllib2 had been removed, use urllib instead.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25898) modify Divide Function from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25898:
-
Summary: modify Divide Function  from python2 to python3  (was: modify 
Divide Operator  from python2 to python3)

> modify Divide Function  from python2 to python3
> ---
>
> Key: AMBARI-25898
> URL: https://issues.apache.org/jira/browse/AMBARI-25898
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-server
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
>  Labels: DivideOperator, python2, python3
> Attachments: image-2023-03-21-14-43-53-490.png
>
>
> in python2, divide operator function as follows:
>     5 / 2 = 2
>     5.0 / 2.0 = 2.5
> in python3, divide operator function as follows:
>     5 / 2 = 2.5
>     5.0 / 2.0 = 2.5
>  
> which means that in python2, the function of divide operator is depended on 
> the data type.
> If inputs are Integers,  it becomes integer division.
> If inputs are floating point number, it becomes float division.
>  
> in order to perform the same function of python2 divide in python3, I would 
> like to define a util funtion named "py2Divide(val1, val2)" to do this:
> !image-2023-03-21-14-43-53-490.png!
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25862) modify Module Subprocess32 to module subprocess

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25862:
-
Summary: modify Module Subprocess32 to module subprocess  (was: modify 
module Subprocess32 to module subprocess)

> modify Module Subprocess32 to module subprocess
> ---
>
> Key: AMBARI-25862
> URL: https://issues.apache.org/jira/browse/AMBARI-25862
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-agent, ambari-client, ambari-server
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
>
> In Ambari 2.7.5, it use a module call "Subprocess32".
> When I try to adapt Ambari from python2 to python3, I found that subprocess 
> is a build-in module in python3. And in my opinion Ambari 2.7.5 import 
> Subprocess32 in order to using the same function as python3's module 
> subprocess. 
> So I would like to change all "import Subprocess32" to "import subprocess" 
> and check whether ambari can still work. 
> The problem is that I am not sure Subprocess32 defined in Ambari 2.7.5 is 
> actuually the same as python3.subprocess, Any suggestions? Welcome to discuss 
> here and contribute to python3 adaption。



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25900) modify Function Ceil/Floor from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25900?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25900:
-
Summary: modify Function Ceil/Floor from python2 to python3  (was: modify 
Ceil/Floor Function from python2 to python3)

> modify Function Ceil/Floor from python2 to python3
> --
>
> Key: AMBARI-25900
> URL: https://issues.apache.org/jira/browse/AMBARI-25900
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-agent, ambari-server
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
>  Labels: ceil, floor, python2, python3
>
> In pytthon2, ceil()/floor() function work as follows:
>      ceil(1.2) => 2.0
>      floor(1.2) => 1.0
> In python3, ceil() function work as follows:
>      ceil(1.2) => 2
>      floor(1.2) => 1
>  
> which means that in python2 it return a float value, in python3 it return a 
> Integer, this feature will casue Unit Test failed. 
>  
> To avoid failed unit test, I would like to make this change:
> python2 :  a = ceil(b)
> python3 :  a = float(ceil(b))
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Created] (AMBARI-25908) modify Module httplib from python2 to python3

2023-03-21 Thread Charming Wu (Jira)
Charming Wu created AMBARI-25908:


 Summary: modify Module httplib from python2 to python3
 Key: AMBARI-25908
 URL: https://issues.apache.org/jira/browse/AMBARI-25908
 Project: Ambari
  Issue Type: Sub-task
  Components: ambari-server
Affects Versions: 2.7.5
 Environment: !image-2023-03-21-18-17-25-865.png!

In python3, module "httplib" had been renamed to "http.client".
Reporter: Charming Wu
 Attachments: image-2023-03-21-18-17-25-865.png

!image-2023-03-21-18-17-16-703.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Updated] (AMBARI-25907) modify Attribute _Event from python2 to python3

2023-03-21 Thread Charming Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/AMBARI-25907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Charming Wu updated AMBARI-25907:
-
Summary: modify Attribute _Event from python2 to python3  (was: modify 
Atribute _Event from python2 to python3)

> modify Attribute _Event from python2 to python3
> ---
>
> Key: AMBARI-25907
> URL: https://issues.apache.org/jira/browse/AMBARI-25907
> Project: Ambari
>  Issue Type: Sub-task
>  Components: ambari-agent
>Affects Versions: 2.7.5
> Environment: {*}Ambari:{*}Ambari-2.7.5
> *OS:*        OpenEuler-22.03
> *Python:* Python 3.9.9
>Reporter: Charming Wu
>Priority: Major
> Attachments: image-2023-03-21-18-08-23-868.png
>
>
> !image-2023-03-21-18-08-23-868.png!
> In python3, module threading own attribute "Event", not "_Event"



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org



[jira] [Created] (AMBARI-25909) modify Attribute isAlive from python2 to python3

2023-03-21 Thread Charming Wu (Jira)
Charming Wu created AMBARI-25909:


 Summary: modify Attribute isAlive from python2 to python3
 Key: AMBARI-25909
 URL: https://issues.apache.org/jira/browse/AMBARI-25909
 Project: Ambari
  Issue Type: Sub-task
  Components: ambari-agent
Affects Versions: 2.7.5
Reporter: Charming Wu


After python3.9 , attribute "isAlive" in module Thread has been renamed 
"is_alive".



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org