You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@reef.apache.org by we...@apache.org on 2015/09/08 19:53:42 UTC
incubator-reef git commit: [REEF-660] Remove obsolete APIs from
o.a.r.Driver (.NET)
Repository: incubator-reef
Updated Branches:
refs/heads/master d5cbc52d2 -> ac20da654
[REEF-660] Remove obsolete APIs from o.a.r.Driver (.NET)
JIRA:
[REEF-660](https://issues.apache.org/jira/browse/REEF-660)
Pull Request:
Closes #466
Project: http://git-wip-us.apache.org/repos/asf/incubator-reef/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-reef/commit/ac20da65
Tree: http://git-wip-us.apache.org/repos/asf/incubator-reef/tree/ac20da65
Diff: http://git-wip-us.apache.org/repos/asf/incubator-reef/diff/ac20da65
Branch: refs/heads/master
Commit: ac20da654398c90d953f8a6e81f20711d00a2e4e
Parents: d5cbc52
Author: Mariia Mykhailova <ma...@apache.org>
Authored: Fri Sep 4 12:15:32 2015 -0700
Committer: Markus Weimer <we...@apache.org>
Committed: Tue Sep 8 10:51:05 2015 -0700
----------------------------------------------------------------------
.../Bridge/ClrSystemHandlerWrapper.cs | 4 --
.../Bridge/DriverBridge.cs | 10 ----
.../Bridge/DriverBridgeConfigurationOptions.cs | 3 +-
.../Contract/IBridgeContract.cs | 29 -----------
.../Defaults/DefaultDriverStartedHandler.cs | 52 --------------------
.../DefaultObsoleteDriverStartHandler.cs | 41 ---------------
lang/cs/Org.Apache.REEF.Driver/IStartHandler.cs | 34 -------------
.../Org.Apache.REEF.Driver.csproj | 4 --
8 files changed, 1 insertion(+), 176 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/ac20da65/lang/cs/Org.Apache.REEF.Driver/Bridge/ClrSystemHandlerWrapper.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Bridge/ClrSystemHandlerWrapper.cs b/lang/cs/Org.Apache.REEF.Driver/Bridge/ClrSystemHandlerWrapper.cs
index 6b370a1..b7f9f2e 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Bridge/ClrSystemHandlerWrapper.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/Bridge/ClrSystemHandlerWrapper.cs
@@ -255,7 +255,6 @@ namespace Org.Apache.REEF.Driver.Bridge
LOGGER.Log(Level.Info, "*** httpServerPort: " + httpServerPort);
var handlers = GetHandlers(httpServerPort, evaluatorRequestor);
_driverBridge.StartHandlersOnNext(startTime);
- _driverBridge.ObsoleteEvaluatorRequestorOnNext(evaluatorRequestor);
return handlers;
}
@@ -289,9 +288,6 @@ namespace Org.Apache.REEF.Driver.Bridge
? 0
: int.Parse(httpServerPortNumber, CultureInfo.InvariantCulture);
- //TODO: Remove next 2 lines after Obsolete period
- var startHandler = injector.GetInstance<IStartHandler>();
- LOGGER.Log(Level.Info, "Start handler set to be " + startHandler.Identifier);
_driverBridge = injector.GetInstance<DriverBridge>();
}
catch (Exception e)
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/ac20da65/lang/cs/Org.Apache.REEF.Driver/Bridge/DriverBridge.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Bridge/DriverBridge.cs b/lang/cs/Org.Apache.REEF.Driver/Bridge/DriverBridge.cs
index 27d342a..ef71c79 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Bridge/DriverBridge.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/Bridge/DriverBridge.cs
@@ -343,16 +343,6 @@ namespace Org.Apache.REEF.Driver.Bridge
return handlers;
}
- [Obsolete(@"Obsoleted at versioin 0.12 and will be removed at version 0.13. See https://issues.apache.org/jira/browse/REEF-168")]
- internal void ObsoleteEvaluatorRequestorOnNext(IEvaluatorRequestor evaluatorRequestor)
- {
- foreach (var handler in _evaluatorRequestHandlers)
- {
- handler.OnNext(evaluatorRequestor);
- _logger.Log(Level.Info, "called IEvaluatorRequestor handler: " + handler);
- }
- }
-
/// <summary>
/// Call start handlers
/// </summary>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/ac20da65/lang/cs/Org.Apache.REEF.Driver/Bridge/DriverBridgeConfigurationOptions.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Bridge/DriverBridgeConfigurationOptions.cs b/lang/cs/Org.Apache.REEF.Driver/Bridge/DriverBridgeConfigurationOptions.cs
index dc96538..d48a6ce 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Bridge/DriverBridgeConfigurationOptions.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/Bridge/DriverBridgeConfigurationOptions.cs
@@ -41,8 +41,7 @@ namespace Org.Apache.REEF.Driver.Bridge
// Level.Verbose (since enum is not suppoted for TANG, we use a string here)
private const string _verboseLevel = "Verbose";
- // TODO: Remove the default value in 0.13 when the DriverStartedHandler becomes mandatory
- [NamedParameter(documentation:"The start point for application logic. Event fired after the Driver is done initializing.", defaultClasses: new []{typeof(DefaultDriverStartedHandler)})]
+ [NamedParameter(documentation:"The start point for application logic. Event fired after the Driver is done initializing.")]
public class DriverStartedHandlers : Name<ISet<IObserver<IDriverStarted>>>
{
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/ac20da65/lang/cs/Org.Apache.REEF.Driver/Contract/IBridgeContract.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Contract/IBridgeContract.cs b/lang/cs/Org.Apache.REEF.Driver/Contract/IBridgeContract.cs
deleted file mode 100644
index 1d96e4d..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/Contract/IBridgeContract.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 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.
- */
-
-using System;
-
-namespace Org.Apache.REEF.Driver.Contract
-{
- [Obsolete("Tmp code never used")]
- public interface IBridgeContract
- {
- string InstanceId { get; set; }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/ac20da65/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultDriverStartedHandler.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultDriverStartedHandler.cs b/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultDriverStartedHandler.cs
deleted file mode 100644
index b32106e..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultDriverStartedHandler.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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.
- */
-
-using System;
-using Org.Apache.REEF.Tang.Annotations;
-using Org.Apache.REEF.Utilities.Logging;
-
-namespace Org.Apache.REEF.Driver.Defaults
-{
- // This class should be removed in 0.13, when the DriverStartedHandler becomes mandatory.
- [Obsolete("This class will be removed in 0.13.", false)]
- internal sealed class DefaultDriverStartedHandler : IObserver<IDriverStarted>
- {
- private static readonly Logger LOGGER = Logger.GetLogger(typeof(DefaultDriverStartedHandler));
-
- [Inject]
- private DefaultDriverStartedHandler()
- {
- }
-
- public void OnNext(IDriverStarted value)
- {
- LOGGER.Log(Level.Info, "Driver started at {0}", value.StartTime);
- }
-
- public void OnError(Exception error)
- {
- throw new NotImplementedException();
- }
-
- public void OnCompleted()
- {
- throw new NotImplementedException();
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/ac20da65/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultObsoleteDriverStartHandler.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultObsoleteDriverStartHandler.cs b/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultObsoleteDriverStartHandler.cs
deleted file mode 100644
index 1f1d49c..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultObsoleteDriverStartHandler.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * 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.
- */
-
-using System;
-using Org.Apache.REEF.Tang.Annotations;
-
-namespace Org.Apache.REEF.Driver.Defaults
-{
- /// <summary>
- /// Default event handler for driver start: Logging it.
- /// </summary>
- [Obsolete(
- "Implement IObserver<DateTime> instead. Please see Jira REEF-336. Obsoleted v0.12 and will be removed v0.13",
- false)]
- public class DefaultObsoleteDriverStartHandler : IStartHandler
- {
- [Inject]
- public DefaultObsoleteDriverStartHandler()
- {
- Identifier = "DefaultObsoleteDriverStartHandler";
- }
-
- public string Identifier { get; set; }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/ac20da65/lang/cs/Org.Apache.REEF.Driver/IStartHandler.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/IStartHandler.cs b/lang/cs/Org.Apache.REEF.Driver/IStartHandler.cs
deleted file mode 100644
index 5dd7bea..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/IStartHandler.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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.
- */
-
-using System;
-using Org.Apache.REEF.Driver.Defaults;
-using Org.Apache.REEF.Tang.Annotations;
-
-namespace Org.Apache.REEF.Driver
-{
- [DefaultImplementation(typeof(DefaultObsoleteDriverStartHandler))]
- [Obsolete(
- "Implement IObserver<DateTime> instead. Please see Jira REEF-336. Obsoleted v0.12 and will be removed v0.13",
- false)]
- public interface IStartHandler
- {
- string Identifier { get; set; }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/ac20da65/lang/cs/Org.Apache.REEF.Driver/Org.Apache.REEF.Driver.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Org.Apache.REEF.Driver.csproj b/lang/cs/Org.Apache.REEF.Driver/Org.Apache.REEF.Driver.csproj
index 329ad86..6fc2426 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Org.Apache.REEF.Driver.csproj
+++ b/lang/cs/Org.Apache.REEF.Driver/Org.Apache.REEF.Driver.csproj
@@ -101,7 +101,6 @@ under the License.
<Compile Include="Context\IClosedContext.cs" />
<Compile Include="Context\IContext.cs" />
<Compile Include="Context\IFailedContext.cs" />
- <Compile Include="Contract\IBridgeContract.cs" />
<Compile Include="Defaults\DefaultClientCloseHandler.cs" />
<Compile Include="Defaults\DefaultClientCloseWithMessageHandler.cs" />
<Compile Include="Defaults\DefaultClientMessageHandler.cs" />
@@ -115,13 +114,11 @@ under the License.
<Compile Include="Defaults\DefaultDriverRestartedHandler.cs" />
<Compile Include="Defaults\DefaultDriverRestartHandler.cs" />
<Compile Include="Defaults\DefaultDriverRestartTaskRunningHandler.cs" />
- <Compile Include="Defaults\DefaultDriverStartedHandler.cs" />
<Compile Include="Defaults\DefaultEvaluatorAllocationHandler.cs" />
<Compile Include="Defaults\DefaultEvaluatorCompletionHandler.cs" />
<Compile Include="Defaults\DefaultEvaluatorFailureHandler.cs" />
<Compile Include="Defaults\DefaultEvaluatorRequestorHandler.cs" />
<Compile Include="Defaults\DefaultHttpHandler.cs" />
- <Compile Include="Defaults\DefaultObsoleteDriverStartHandler.cs" />
<Compile Include="Defaults\DefaultTaskCompletionHandler.cs" />
<Compile Include="Defaults\DefaultTaskFailureHandler.cs" />
<Compile Include="Defaults\DefaultTaskMessageHandler.cs" />
@@ -144,7 +141,6 @@ under the License.
<Compile Include="IDriverRestarted.cs" />
<Compile Include="IDriverStarted.cs" />
<Compile Include="IDriverRestartCompleted.cs" />
- <Compile Include="IStartHandler.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Task\ICompletedTask.cs" />
<Compile Include="Task\IFailedTask.cs" />