You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@reef.apache.org by do...@apache.org on 2017/04/27 23:39:57 UTC
reef git commit: [REEF-1785] Remove usage of `Exceptions` class in
O.A.R.Utilities project
Repository: reef
Updated Branches:
refs/heads/master fd4f6d047 -> 3531944f1
[REEF-1785] Remove usage of `Exceptions` class in O.A.R.Utilities project
JIRA:
[REEF-1785](https://issues.apache.org/jira/browse/REEF-1785)
Pull Request:
This closes #1295
Project: http://git-wip-us.apache.org/repos/asf/reef/repo
Commit: http://git-wip-us.apache.org/repos/asf/reef/commit/3531944f
Tree: http://git-wip-us.apache.org/repos/asf/reef/tree/3531944f
Diff: http://git-wip-us.apache.org/repos/asf/reef/diff/3531944f
Branch: refs/heads/master
Commit: 3531944f11cc115b105a6bec4268713766425034
Parents: fd4f6d0
Author: Markus Weimer <we...@apache.org>
Authored: Wed Apr 19 16:58:49 2017 -0700
Committer: Doug Service <do...@apache.org>
Committed: Thu Apr 27 23:32:03 2017 +0000
----------------------------------------------------------------------
lang/cs/Org.Apache.REEF.Utilities/NetUtilities.cs | 2 +-
lang/cs/Org.Apache.REEF.Utilities/Optional.cs | 2 +-
.../Org.Apache.REEF.Utilities/Runtime/Yarn/YarnConfiguration.cs | 5 +----
lang/cs/Org.Apache.REEF.Utilities/ValidationUtilities.cs | 2 +-
4 files changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/reef/blob/3531944f/lang/cs/Org.Apache.REEF.Utilities/NetUtilities.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Utilities/NetUtilities.cs b/lang/cs/Org.Apache.REEF.Utilities/NetUtilities.cs
index bd83b8b..4a0e31c 100644
--- a/lang/cs/Org.Apache.REEF.Utilities/NetUtilities.cs
+++ b/lang/cs/Org.Apache.REEF.Utilities/NetUtilities.cs
@@ -40,7 +40,7 @@ namespace Org.Apache.REEF.Utilities
IPAddress.TryParse(driverAddress, out ipAddress);
if (ipAddress == null)
{
- Exceptions.Throw(new FormatException("invalid format for ip: " + ipWithPort), LOGGER);
+ throw new FormatException("invalid format for ip: " + ipWithPort);
}
return new IPEndPoint(ipAddress, driverCommunicationPort);
http://git-wip-us.apache.org/repos/asf/reef/blob/3531944f/lang/cs/Org.Apache.REEF.Utilities/Optional.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Utilities/Optional.cs b/lang/cs/Org.Apache.REEF.Utilities/Optional.cs
index 1f6d958..3ab4bf4 100644
--- a/lang/cs/Org.Apache.REEF.Utilities/Optional.cs
+++ b/lang/cs/Org.Apache.REEF.Utilities/Optional.cs
@@ -60,7 +60,7 @@ namespace Org.Apache.REEF.Utilities
{
if (value == null)
{
- Diagnostics.Exceptions.Throw(new ArgumentNullException("value", "Passed a null value. Use OfNullable() instead"), Logger.GetLogger(typeof(Optional<T>)));
+ throw new ArgumentNullException("value", "Passed a null value. Use OfNullable() instead");
}
return new Optional<T>(value);
}
http://git-wip-us.apache.org/repos/asf/reef/blob/3531944f/lang/cs/Org.Apache.REEF.Utilities/Runtime/Yarn/YarnConfiguration.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Utilities/Runtime/Yarn/YarnConfiguration.cs b/lang/cs/Org.Apache.REEF.Utilities/Runtime/Yarn/YarnConfiguration.cs
index 82887a5..64b2b03 100644
--- a/lang/cs/Org.Apache.REEF.Utilities/Runtime/Yarn/YarnConfiguration.cs
+++ b/lang/cs/Org.Apache.REEF.Utilities/Runtime/Yarn/YarnConfiguration.cs
@@ -157,10 +157,7 @@ namespace Org.Apache.REEF.Utilities.Runtime.Yarn
}
catch (UriFormatException e)
{
- Exceptions.Caught(e,
- Level.Warning,
- "Unable to format " + rmWebAppAddressNodeText + " to URI",
- Logger);
+ Logger.Log(Level.Warning, "Unable to format " + rmWebAppAddressNodeText + " to URI. Ignoring.", e);
}
}
http://git-wip-us.apache.org/repos/asf/reef/blob/3531944f/lang/cs/Org.Apache.REEF.Utilities/ValidationUtilities.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Utilities/ValidationUtilities.cs b/lang/cs/Org.Apache.REEF.Utilities/ValidationUtilities.cs
index c6ea3b8..dfd248f 100644
--- a/lang/cs/Org.Apache.REEF.Utilities/ValidationUtilities.cs
+++ b/lang/cs/Org.Apache.REEF.Utilities/ValidationUtilities.cs
@@ -32,7 +32,7 @@ namespace Org.Apache.REEF.Utilities
{
Console.WriteLine(string.Format(CultureInfo.InvariantCulture, "{0} not set. Please set the environment variable first. Exiting...", env));
string msg = string.Format(CultureInfo.InvariantCulture, "No {0} found.", env);
- Diagnostics.Exceptions.Throw(new InvalidOperationException(msg), msg, LOGGER);
+ throw new InvalidOperationException(msg);
}
return envVariable;
}
Re: reef git commit: [REEF-1785] Remove usage of `Exceptions` class
in O.A.R.Utilities project
Posted by Mariia Mykhailova <ma...@microsoft.com.INVALID>.
Commit comments say "Closes #XXX", where XXX is the id of pull request on GitHub, so that GitHub knows to close it automatically. For JIRA issues, we "resolve" them if we have done some work to fix them, and "close" them if they are duplicates or unneeded or otherwise don't need to be open but had no work done to fix them.
-Mariia
________________________________
From: Douglas Service <ds...@gmail.com>
Sent: Thursday, April 27, 2017 4:52:00 PM
To: dev@reef.apache.org
Subject: Re: reef git commit: [REEF-1785] Remove usage of `Exceptions` class in O.A.R.Utilities project
Okay so REEF-1785 is in Apache master now. What is not clear from the
documentation at
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2Fdisplay%2FREEF%2FAccepting%2BPull%2BRequests&data=02%7C01%7Cmamykhai%40microsoft.com%7C02e9e0ab8a7d4bda35a308d48dc880d3%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636289339679088305&sdata=lmsngXuN4PJkdnmSTGhKdw0LTAdxILq0bSGfvPzPB9Q%3D&reserved=0 is
whether to resolve or close the issue. All of the commit comments say
"Closes", but the documentation implies resolve. Guidance please.
On Thu, Apr 27, 2017 at 4:39 PM, <do...@apache.org> wrote:
> Repository: reef
> Updated Branches:
> refs/heads/master fd4f6d047 -> 3531944f1
>
>
> [REEF-1785] Remove usage of `Exceptions` class in O.A.R.Utilities project
>
> JIRA:
> [REEF-1785](https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FREEF-1785&data=02%7C01%7Cmamykhai%40microsoft.com%7C02e9e0ab8a7d4bda35a308d48dc880d3%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636289339679088305&sdata=PZIJhExKpKaru4GVmBL8BaxvoLIW5Y3PRC0RcK5u9Y8%3D&reserved=0)
>
> Pull Request:
> This closes #1295
>
>
> Project: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us.apache.org%2Frepos%2Fasf%2Freef%2Frepo&data=02%7C01%7Cmamykhai%40microsoft.com%7C02e9e0ab8a7d4bda35a308d48dc880d3%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636289339679088305&sdata=qomR8smA92UL7z%2B42wbf58uBoP0oQV20Zsw6x3ZIyy0%3D&reserved=0
> Commit: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us.apache.org%2Frepos%2Fasf%2Freef%2Fcommit%2F3531944f&data=02%7C01%7Cmamykhai%40microsoft.com%7C02e9e0ab8a7d4bda35a308d48dc880d3%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636289339679088305&sdata=Hygnhy%2B5AFasFbnTBDqtqjQmNv0soyDDCIbfI9z8gRk%3D&reserved=0
> Tree: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us.apache.org%2Frepos%2Fasf%2Freef%2Ftree%2F3531944f&data=02%7C01%7Cmamykhai%40microsoft.com%7C02e9e0ab8a7d4bda35a308d48dc880d3%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636289339679088305&sdata=tsTaKqRQp2GkSXtcAqUd%2BL%2FXCv2q9I60QkuVSnkcdFg%3D&reserved=0
> Diff: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us.apache.org%2Frepos%2Fasf%2Freef%2Fdiff%2F3531944f&data=02%7C01%7Cmamykhai%40microsoft.com%7C02e9e0ab8a7d4bda35a308d48dc880d3%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636289339679088305&sdata=WLDsh%2FPmOzlHd7yAbcxkCm3Uqob6T6dQtVgL2%2FYJRGg%3D&reserved=0
>
> Branch: refs/heads/master
> Commit: 3531944f11cc115b105a6bec4268713766425034
> Parents: fd4f6d0
> Author: Markus Weimer <we...@apache.org>
> Authored: Wed Apr 19 16:58:49 2017 -0700
> Committer: Doug Service <do...@apache.org>
> Committed: Thu Apr 27 23:32:03 2017 +0000
>
> ----------------------------------------------------------------------
> lang/cs/Org.Apache.REEF.Utilities/NetUtilities.cs | 2 +-
> lang/cs/Org.Apache.REEF.Utilities/Optional.cs | 2 +-
> .../Org.Apache.REEF.Utilities/Runtime/Yarn/YarnConfiguration.cs | 5 +----
> lang/cs/Org.Apache.REEF.Utilities/ValidationUtilities.cs | 2 +-
> 4 files changed, 4 insertions(+), 7 deletions(-)
> ----------------------------------------------------------------------
>
>
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us.apache.org%2Frepos%2Fasf%2Freef%2Fblob%2F3531944f%2F&data=02%7C01%7Cmamykhai%40microsoft.com%7C02e9e0ab8a7d4bda35a308d48dc880d3%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636289339679088305&sdata=hgU7XXBfa1mR579UFCmz8GMchYTCuKz7AM0Wju2ONt0%3D&reserved=0
> lang/cs/Org.Apache.REEF.Utilities/NetUtilities.cs
> ----------------------------------------------------------------------
> diff --git a/lang/cs/Org.Apache.REEF.Utilities/NetUtilities.cs
> b/lang/cs/Org.Apache.REEF.Utilities/NetUtilities.cs
> index bd83b8b..4a0e31c 100644
> --- a/lang/cs/Org.Apache.REEF.Utilities/NetUtilities.cs
> +++ b/lang/cs/Org.Apache.REEF.Utilities/NetUtilities.cs
> @@ -40,7 +40,7 @@ namespace Org.Apache.REEF.Utilities
> IPAddress.TryParse(driverAddress, out ipAddress);
> if (ipAddress == null)
> {
> - Exceptions.Throw(new FormatException("invalid format for
> ip: " + ipWithPort), LOGGER);
> + throw new FormatException("invalid format for ip: " +
> ipWithPort);
> }
>
> return new IPEndPoint(ipAddress, driverCommunicationPort);
>
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us.apache.org%2Frepos%2Fasf%2Freef%2Fblob%2F3531944f%2F&data=02%7C01%7Cmamykhai%40microsoft.com%7C02e9e0ab8a7d4bda35a308d48dc880d3%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636289339679098318&sdata=8X%2Fz6Mz3c1vwiMZUYyuc1lMhVKHU%2FCJiOo2Ssi2l9Kk%3D&reserved=0
> lang/cs/Org.Apache.REEF.Utilities/Optional.cs
> ----------------------------------------------------------------------
> diff --git a/lang/cs/Org.Apache.REEF.Utilities/Optional.cs
> b/lang/cs/Org.Apache.REEF.Utilities/Optional.cs
> index 1f6d958..3ab4bf4 100644
> --- a/lang/cs/Org.Apache.REEF.Utilities/Optional.cs
> +++ b/lang/cs/Org.Apache.REEF.Utilities/Optional.cs
> @@ -60,7 +60,7 @@ namespace Org.Apache.REEF.Utilities
> {
> if (value == null)
> {
> - Diagnostics.Exceptions.Throw(new
> ArgumentNullException("value", "Passed a null value. Use OfNullable()
> instead"), Logger.GetLogger(typeof(Optional<T>)));
> + throw new ArgumentNullException("value", "Passed a null
> value. Use OfNullable() instead");
> }
> return new Optional<T>(value);
> }
>
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us.apache.org%2Frepos%2Fasf%2Freef%2Fblob%2F3531944f%2F&data=02%7C01%7Cmamykhai%40microsoft.com%7C02e9e0ab8a7d4bda35a308d48dc880d3%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636289339679098318&sdata=8X%2Fz6Mz3c1vwiMZUYyuc1lMhVKHU%2FCJiOo2Ssi2l9Kk%3D&reserved=0
> lang/cs/Org.Apache.REEF.Utilities/Runtime/Yarn/YarnConfiguration.cs
> ----------------------------------------------------------------------
> diff --git a/lang/cs/Org.Apache.REEF.Utilities/Runtime/Yarn/YarnConfiguration.cs
> b/lang/cs/Org.Apache.REEF.Utilities/Runtime/Yarn/YarnConfiguration.cs
> index 82887a5..64b2b03 100644
> --- a/lang/cs/Org.Apache.REEF.Utilities/Runtime/Yarn/YarnConfiguration.cs
> +++ b/lang/cs/Org.Apache.REEF.Utilities/Runtime/Yarn/YarnConfiguration.cs
> @@ -157,10 +157,7 @@ namespace Org.Apache.REEF.Utilities.Runtime.Yarn
> }
> catch (UriFormatException e)
> {
> - Exceptions.Caught(e,
> - Level.Warning,
> - "Unable to format " + rmWebAppAddressNodeText
> + " to URI",
> - Logger);
> + Logger.Log(Level.Warning, "Unable to format " +
> rmWebAppAddressNodeText + " to URI. Ignoring.", e);
> }
> }
>
>
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us.apache.org%2Frepos%2Fasf%2Freef%2Fblob%2F3531944f%2F&data=02%7C01%7Cmamykhai%40microsoft.com%7C02e9e0ab8a7d4bda35a308d48dc880d3%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636289339679098318&sdata=8X%2Fz6Mz3c1vwiMZUYyuc1lMhVKHU%2FCJiOo2Ssi2l9Kk%3D&reserved=0
> lang/cs/Org.Apache.REEF.Utilities/ValidationUtilities.cs
> ----------------------------------------------------------------------
> diff --git a/lang/cs/Org.Apache.REEF.Utilities/ValidationUtilities.cs
> b/lang/cs/Org.Apache.REEF.Utilities/ValidationUtilities.cs
> index c6ea3b8..dfd248f 100644
> --- a/lang/cs/Org.Apache.REEF.Utilities/ValidationUtilities.cs
> +++ b/lang/cs/Org.Apache.REEF.Utilities/ValidationUtilities.cs
> @@ -32,7 +32,7 @@ namespace Org.Apache.REEF.Utilities
> {
> Console.WriteLine(string.Format(CultureInfo.InvariantCulture,
> "{0} not set. Please set the environment variable first. Exiting...", env));
> string msg = string.Format(CultureInfo.InvariantCulture,
> "No {0} found.", env);
> - Diagnostics.Exceptions.Throw(new
> InvalidOperationException(msg), msg, LOGGER);
> + throw new InvalidOperationException(msg);
> }
> return envVariable;
> }
>
>
Re: reef git commit: [REEF-1785] Remove usage of `Exceptions` class
in O.A.R.Utilities project
Posted by Douglas Service <ds...@gmail.com>.
Okay so REEF-1785 is in Apache master now. What is not clear from the
documentation at
https://cwiki.apache.org/confluence/display/REEF/Accepting+Pull+Requests is
whether to resolve or close the issue. All of the commit comments say
"Closes", but the documentation implies resolve. Guidance please.
On Thu, Apr 27, 2017 at 4:39 PM, <do...@apache.org> wrote:
> Repository: reef
> Updated Branches:
> refs/heads/master fd4f6d047 -> 3531944f1
>
>
> [REEF-1785] Remove usage of `Exceptions` class in O.A.R.Utilities project
>
> JIRA:
> [REEF-1785](https://issues.apache.org/jira/browse/REEF-1785)
>
> Pull Request:
> This closes #1295
>
>
> Project: http://git-wip-us.apache.org/repos/asf/reef/repo
> Commit: http://git-wip-us.apache.org/repos/asf/reef/commit/3531944f
> Tree: http://git-wip-us.apache.org/repos/asf/reef/tree/3531944f
> Diff: http://git-wip-us.apache.org/repos/asf/reef/diff/3531944f
>
> Branch: refs/heads/master
> Commit: 3531944f11cc115b105a6bec4268713766425034
> Parents: fd4f6d0
> Author: Markus Weimer <we...@apache.org>
> Authored: Wed Apr 19 16:58:49 2017 -0700
> Committer: Doug Service <do...@apache.org>
> Committed: Thu Apr 27 23:32:03 2017 +0000
>
> ----------------------------------------------------------------------
> lang/cs/Org.Apache.REEF.Utilities/NetUtilities.cs | 2 +-
> lang/cs/Org.Apache.REEF.Utilities/Optional.cs | 2 +-
> .../Org.Apache.REEF.Utilities/Runtime/Yarn/YarnConfiguration.cs | 5 +----
> lang/cs/Org.Apache.REEF.Utilities/ValidationUtilities.cs | 2 +-
> 4 files changed, 4 insertions(+), 7 deletions(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/reef/blob/3531944f/
> lang/cs/Org.Apache.REEF.Utilities/NetUtilities.cs
> ----------------------------------------------------------------------
> diff --git a/lang/cs/Org.Apache.REEF.Utilities/NetUtilities.cs
> b/lang/cs/Org.Apache.REEF.Utilities/NetUtilities.cs
> index bd83b8b..4a0e31c 100644
> --- a/lang/cs/Org.Apache.REEF.Utilities/NetUtilities.cs
> +++ b/lang/cs/Org.Apache.REEF.Utilities/NetUtilities.cs
> @@ -40,7 +40,7 @@ namespace Org.Apache.REEF.Utilities
> IPAddress.TryParse(driverAddress, out ipAddress);
> if (ipAddress == null)
> {
> - Exceptions.Throw(new FormatException("invalid format for
> ip: " + ipWithPort), LOGGER);
> + throw new FormatException("invalid format for ip: " +
> ipWithPort);
> }
>
> return new IPEndPoint(ipAddress, driverCommunicationPort);
>
> http://git-wip-us.apache.org/repos/asf/reef/blob/3531944f/
> lang/cs/Org.Apache.REEF.Utilities/Optional.cs
> ----------------------------------------------------------------------
> diff --git a/lang/cs/Org.Apache.REEF.Utilities/Optional.cs
> b/lang/cs/Org.Apache.REEF.Utilities/Optional.cs
> index 1f6d958..3ab4bf4 100644
> --- a/lang/cs/Org.Apache.REEF.Utilities/Optional.cs
> +++ b/lang/cs/Org.Apache.REEF.Utilities/Optional.cs
> @@ -60,7 +60,7 @@ namespace Org.Apache.REEF.Utilities
> {
> if (value == null)
> {
> - Diagnostics.Exceptions.Throw(new
> ArgumentNullException("value", "Passed a null value. Use OfNullable()
> instead"), Logger.GetLogger(typeof(Optional<T>)));
> + throw new ArgumentNullException("value", "Passed a null
> value. Use OfNullable() instead");
> }
> return new Optional<T>(value);
> }
>
> http://git-wip-us.apache.org/repos/asf/reef/blob/3531944f/
> lang/cs/Org.Apache.REEF.Utilities/Runtime/Yarn/YarnConfiguration.cs
> ----------------------------------------------------------------------
> diff --git a/lang/cs/Org.Apache.REEF.Utilities/Runtime/Yarn/YarnConfiguration.cs
> b/lang/cs/Org.Apache.REEF.Utilities/Runtime/Yarn/YarnConfiguration.cs
> index 82887a5..64b2b03 100644
> --- a/lang/cs/Org.Apache.REEF.Utilities/Runtime/Yarn/YarnConfiguration.cs
> +++ b/lang/cs/Org.Apache.REEF.Utilities/Runtime/Yarn/YarnConfiguration.cs
> @@ -157,10 +157,7 @@ namespace Org.Apache.REEF.Utilities.Runtime.Yarn
> }
> catch (UriFormatException e)
> {
> - Exceptions.Caught(e,
> - Level.Warning,
> - "Unable to format " + rmWebAppAddressNodeText
> + " to URI",
> - Logger);
> + Logger.Log(Level.Warning, "Unable to format " +
> rmWebAppAddressNodeText + " to URI. Ignoring.", e);
> }
> }
>
>
> http://git-wip-us.apache.org/repos/asf/reef/blob/3531944f/
> lang/cs/Org.Apache.REEF.Utilities/ValidationUtilities.cs
> ----------------------------------------------------------------------
> diff --git a/lang/cs/Org.Apache.REEF.Utilities/ValidationUtilities.cs
> b/lang/cs/Org.Apache.REEF.Utilities/ValidationUtilities.cs
> index c6ea3b8..dfd248f 100644
> --- a/lang/cs/Org.Apache.REEF.Utilities/ValidationUtilities.cs
> +++ b/lang/cs/Org.Apache.REEF.Utilities/ValidationUtilities.cs
> @@ -32,7 +32,7 @@ namespace Org.Apache.REEF.Utilities
> {
> Console.WriteLine(string.Format(CultureInfo.InvariantCulture,
> "{0} not set. Please set the environment variable first. Exiting...", env));
> string msg = string.Format(CultureInfo.InvariantCulture,
> "No {0} found.", env);
> - Diagnostics.Exceptions.Throw(new
> InvalidOperationException(msg), msg, LOGGER);
> + throw new InvalidOperationException(msg);
> }
> return envVariable;
> }
>
>