Skip to content

Commit

Permalink
[REEF-763] Remove automatic creation of the class hierarchy
Browse files Browse the repository at this point in the history
JIRA:
  [REEF-763](https://issues.apache.org/jira/browse/REEF-763)

Pull request:
  This closes apache#514
  • Loading branch information
tcNickolas authored and Julia Wang committed Sep 23, 2015
1 parent c538cb7 commit 0d9dc4f
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 188 deletions.

This file was deleted.

5 changes: 1 addition & 4 deletions lang/cs/Org.Apache.REEF.Driver/DriverConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,7 @@ public static ConfigurationModule ConfigurationModule
MaxApplicationSubmissions)
.BindNamedParameter(GenericType<DriverBridgeConfigurationOptions.DriverRestartEvaluatorRecoverySeconds>.Class,
DriverRestartEvaluatorRecoverySeconds)
.Build()
// TODO: Move this up
.Set(OnDriverStarted, GenericType<ClassHierarchyGeneratingDriverStartObserver>.Class)
.Set(OnDriverRestarted, GenericType<ClassHierarchyGeneratingDriverStartObserver>.Class);
.Build();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ under the License.
<Compile Include="Bridge\ILogger.cs" />
<Compile Include="Bridge\ReefHttpRequest.cs" />
<Compile Include="Bridge\ReefHttpResponse.cs" />
<Compile Include="ClassHierarchyGeneratingDriverStartObserver.cs" />
<Compile Include="Constants.cs" />
<Compile Include="Context\ContextConfiguration.cs" />
<Compile Include="Context\ContextConfigurationOptions.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ public class KMeansDriverHandlers :
.Build();

_groupCommTaskStarter = new TaskStarter(_groupCommDriver, _totalEvaluators);

CreateClassHierarchy();
}

public void OnNext(IAllocatedEvaluator allocatedEvaluator)
Expand Down Expand Up @@ -204,18 +202,6 @@ public void OnCompleted()
{
throw new NotImplementedException();
}

private void CreateClassHierarchy()
{
HashSet<string> clrDlls = new HashSet<string>();
clrDlls.Add(typeof(IDriver).Assembly.GetName().Name);
clrDlls.Add(typeof(ITask).Assembly.GetName().Name);
clrDlls.Add(typeof(LegacyKMeansTask).Assembly.GetName().Name);
clrDlls.Add(typeof(INameClient).Assembly.GetName().Name);
clrDlls.Add(typeof(INetworkService<>).Assembly.GetName().Name);

ClrHandlerHelper.GenerateClassHierarchy(clrDlls);
}
}

[NamedParameter("Number of partitions")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ public class BroadcastReduceDriver :
.Build();

_groupCommTaskStarter = new TaskStarter(_groupCommDriver, numEvaluators);

CreateClassHierarchy();
}

public void OnNext(IAllocatedEvaluator allocatedEvaluator)
Expand Down Expand Up @@ -197,17 +195,6 @@ public void OnCompleted()
{
}

private void CreateClassHierarchy()
{
HashSet<string> clrDlls = new HashSet<string>();
clrDlls.Add(typeof(IDriver).Assembly.GetName().Name);
clrDlls.Add(typeof(ITask).Assembly.GetName().Name);
clrDlls.Add(typeof(BroadcastReduceDriver).Assembly.GetName().Name);
clrDlls.Add(typeof(INameClient).Assembly.GetName().Name);
clrDlls.Add(typeof(INetworkService<>).Assembly.GetName().Name);
ClrHandlerHelper.GenerateClassHierarchy(clrDlls);
}

private class SumFunction : IReduceFunction<int>
{
[Inject]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ public class PipelinedBroadcastReduceDriver :
.Build();

_groupCommTaskStarter = new TaskStarter(_groupCommDriver, numEvaluators);

CreateClassHierarchy();
}

public void OnNext(IAllocatedEvaluator allocatedEvaluator)
Expand Down Expand Up @@ -211,18 +209,6 @@ public void OnNext(IDriverStarted value)
_evaluatorRequestor.Submit(request);
}

private void CreateClassHierarchy()
{
var clrDlls = new HashSet<string>();
clrDlls.Add(typeof(IDriver).Assembly.GetName().Name);
clrDlls.Add(typeof(ITask).Assembly.GetName().Name);
clrDlls.Add(typeof(PipelinedBroadcastReduceDriver).Assembly.GetName().Name);
clrDlls.Add(typeof(INameClient).Assembly.GetName().Name);
clrDlls.Add(typeof(INetworkService<>).Assembly.GetName().Name);

ClrHandlerHelper.GenerateClassHierarchy(clrDlls);
}

private class SumFunction : IReduceFunction<int>
{
[Inject]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ public class ScatterReduceDriver :
.Build();

_groupCommTaskStarter = new TaskStarter(_groupCommDriver, numEvaluators);

CreateClassHierarchy();
}

public void OnNext(IAllocatedEvaluator allocatedEvaluator)
Expand Down Expand Up @@ -167,18 +165,6 @@ public void OnCompleted()
{
}

private void CreateClassHierarchy()
{
HashSet<string> clrDlls = new HashSet<string>();
clrDlls.Add(typeof(IDriver).Assembly.GetName().Name);
clrDlls.Add(typeof(ITask).Assembly.GetName().Name);
clrDlls.Add(typeof(ScatterReduceDriver).Assembly.GetName().Name);
clrDlls.Add(typeof(INameClient).Assembly.GetName().Name);
clrDlls.Add(typeof(INetworkService<>).Assembly.GetName().Name);

ClrHandlerHelper.GenerateClassHierarchy(clrDlls);
}

private class SumFunction : IReduceFunction<int>
{
[Inject]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ public class MessageDriver :
[Inject]
public MessageDriver(IEvaluatorRequestor evaluatorRequestor)
{
CreateClassHierarchy();
_evaluatorRequestor = evaluatorRequestor;
}
public void OnNext(IAllocatedEvaluator eval)
Expand Down Expand Up @@ -113,15 +112,5 @@ public void OnError(Exception error)
{
throw new NotImplementedException();
}

private void CreateClassHierarchy()
{
HashSet<string> clrDlls = new HashSet<string>();
clrDlls.Add(typeof(IDriver).Assembly.GetName().Name);
clrDlls.Add(typeof(ITask).Assembly.GetName().Name);
clrDlls.Add(typeof(MessageTask).Assembly.GetName().Name);

ClrHandlerHelper.GenerateClassHierarchy(clrDlls);
}
}
}

0 comments on commit 0d9dc4f

Please sign in to comment.