http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/ReefDotNet.sln ---------------------------------------------------------------------- diff --git a/lang/cs/ReefDotNet.sln b/lang/cs/ReefDotNet.sln index 962149a..10258b3 100644 --- a/lang/cs/ReefDotNet.sln +++ b/lang/cs/ReefDotNet.sln @@ -10,14 +10,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{2B7EE9 .nuget\NuGet.targets = .nuget\NuGet.targets EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Network", "Source\REEF\reef-io\Network\Network.csproj", "{883CE800-6A6A-4E0A-B7FE-C054F4F2C1DC}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tasks", "Source\REEF\reef-tasks\Tasks\Tasks.csproj", "{75503F90-7B82-4762-9997-94B5C68F15DB}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CLRBridgeClient", "Source\REEF\reef-applications\CLRBridgeClient\CLRBridgeClient.csproj", "{5094C35B-4FDB-4322-AC05-45D684501CBF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Evaluator", "Source\REEF\reef-applications\Evaluator\Evaluator.csproj", "{1B983182-9C30-464C-948D-F87EB93A8240}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloCLRBridge", "Source\REEF\reef-examples\HelloCLRBridge\HelloCLRBridge.csproj", "{A78DD8E8-31D0-4506-8738-DAA9DA86D55B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RetainedEvalCLRBridge", "Source\REEF\reef-examples\RetainedEvalCLRBridge\RetainedEvalCLRBridge.csproj", "{A33C20FB-A76E-494C-80C5-BCE4BAD876D3}" @@ -44,6 +40,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Common", "O EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Driver", "Org.Apache.REEF.Driver\Org.Apache.REEF.Driver.csproj", "{A6BAA2A7-F52F-4329-884E-1BCF711D6805}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Evaluator", "Org.Apache.REEF.Evaluator\Org.Apache.REEF.Evaluator.csproj", "{1B983182-9C30-464C-948D-F87EB93A8240}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Network", "Org.Apache.REEF.Network\Org.Apache.REEF.Network.csproj", "{883CE800-6A6A-4E0A-B7FE-C054F4F2C1DC}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -52,14 +52,6 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {883CE800-6A6A-4E0A-B7FE-C054F4F2C1DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {883CE800-6A6A-4E0A-B7FE-C054F4F2C1DC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {883CE800-6A6A-4E0A-B7FE-C054F4F2C1DC}.Debug|x64.ActiveCfg = Debug|x64 - {883CE800-6A6A-4E0A-B7FE-C054F4F2C1DC}.Debug|x64.Build.0 = Debug|x64 - {883CE800-6A6A-4E0A-B7FE-C054F4F2C1DC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {883CE800-6A6A-4E0A-B7FE-C054F4F2C1DC}.Release|Any CPU.Build.0 = Release|Any CPU - {883CE800-6A6A-4E0A-B7FE-C054F4F2C1DC}.Release|x64.ActiveCfg = Release|x64 - {883CE800-6A6A-4E0A-B7FE-C054F4F2C1DC}.Release|x64.Build.0 = Release|x64 {75503F90-7B82-4762-9997-94B5C68F15DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {75503F90-7B82-4762-9997-94B5C68F15DB}.Debug|Any CPU.Build.0 = Debug|Any CPU {75503F90-7B82-4762-9997-94B5C68F15DB}.Debug|x64.ActiveCfg = Debug|x64 @@ -76,14 +68,6 @@ Global {5094C35B-4FDB-4322-AC05-45D684501CBF}.Release|Any CPU.Build.0 = Release|Any CPU {5094C35B-4FDB-4322-AC05-45D684501CBF}.Release|x64.ActiveCfg = Release|x64 {5094C35B-4FDB-4322-AC05-45D684501CBF}.Release|x64.Build.0 = Release|x64 - {1B983182-9C30-464C-948D-F87EB93A8240}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1B983182-9C30-464C-948D-F87EB93A8240}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1B983182-9C30-464C-948D-F87EB93A8240}.Debug|x64.ActiveCfg = Debug|x64 - {1B983182-9C30-464C-948D-F87EB93A8240}.Debug|x64.Build.0 = Debug|x64 - {1B983182-9C30-464C-948D-F87EB93A8240}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1B983182-9C30-464C-948D-F87EB93A8240}.Release|Any CPU.Build.0 = Release|Any CPU - {1B983182-9C30-464C-948D-F87EB93A8240}.Release|x64.ActiveCfg = Release|x64 - {1B983182-9C30-464C-948D-F87EB93A8240}.Release|x64.Build.0 = Release|x64 {A78DD8E8-31D0-4506-8738-DAA9DA86D55B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A78DD8E8-31D0-4506-8738-DAA9DA86D55B}.Debug|Any CPU.Build.0 = Debug|Any CPU {A78DD8E8-31D0-4506-8738-DAA9DA86D55B}.Debug|x64.ActiveCfg = Debug|x64 @@ -188,6 +172,22 @@ Global {A6BAA2A7-F52F-4329-884E-1BCF711D6805}.Release|Any CPU.Build.0 = Release|Any CPU {A6BAA2A7-F52F-4329-884E-1BCF711D6805}.Release|x64.ActiveCfg = Release|x64 {A6BAA2A7-F52F-4329-884E-1BCF711D6805}.Release|x64.Build.0 = Release|x64 + {1B983182-9C30-464C-948D-F87EB93A8240}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1B983182-9C30-464C-948D-F87EB93A8240}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1B983182-9C30-464C-948D-F87EB93A8240}.Debug|x64.ActiveCfg = Debug|x64 + {1B983182-9C30-464C-948D-F87EB93A8240}.Debug|x64.Build.0 = Debug|x64 + {1B983182-9C30-464C-948D-F87EB93A8240}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1B983182-9C30-464C-948D-F87EB93A8240}.Release|Any CPU.Build.0 = Release|Any CPU + {1B983182-9C30-464C-948D-F87EB93A8240}.Release|x64.ActiveCfg = Release|x64 + {1B983182-9C30-464C-948D-F87EB93A8240}.Release|x64.Build.0 = Release|x64 + {883CE800-6A6A-4E0A-B7FE-C054F4F2C1DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {883CE800-6A6A-4E0A-B7FE-C054F4F2C1DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {883CE800-6A6A-4E0A-B7FE-C054F4F2C1DC}.Debug|x64.ActiveCfg = Debug|x64 + {883CE800-6A6A-4E0A-B7FE-C054F4F2C1DC}.Debug|x64.Build.0 = Debug|x64 + {883CE800-6A6A-4E0A-B7FE-C054F4F2C1DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {883CE800-6A6A-4E0A-B7FE-C054F4F2C1DC}.Release|Any CPU.Build.0 = Release|Any CPU + {883CE800-6A6A-4E0A-B7FE-C054F4F2C1DC}.Release|x64.ActiveCfg = Release|x64 + {883CE800-6A6A-4E0A-B7FE-C054F4F2C1DC}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-applications/CLRBridgeClient/CLRBridgeClient.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-applications/CLRBridgeClient/CLRBridgeClient.cs b/lang/cs/Source/REEF/reef-applications/CLRBridgeClient/CLRBridgeClient.cs index da64eff..ce2857f 100644 --- a/lang/cs/Source/REEF/reef-applications/CLRBridgeClient/CLRBridgeClient.cs +++ b/lang/cs/Source/REEF/reef-applications/CLRBridgeClient/CLRBridgeClient.cs @@ -24,7 +24,7 @@ using Org.Apache.REEF.Driver.Bridge; using Org.Apache.REEF.Driver.Defaults; using Org.Apache.REEF.Examples.HelloCLRBridge; using Org.Apache.REEF.Examples.HelloCLRBridge.Handlers; -using Org.Apache.REEF.IO.Network.Naming; +using Org.Apache.REEF.Network.Naming; using Org.Apache.REEF.Tasks; using Org.Apache.REEF.Utilities.Logging; using Org.Apache.REEF.Tang.Interface; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-applications/CLRBridgeClient/CLRBridgeClient.csproj ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-applications/CLRBridgeClient/CLRBridgeClient.csproj b/lang/cs/Source/REEF/reef-applications/CLRBridgeClient/CLRBridgeClient.csproj index 20c8f97..8b732ba 100644 --- a/lang/cs/Source/REEF/reef-applications/CLRBridgeClient/CLRBridgeClient.csproj +++ b/lang/cs/Source/REEF/reef-applications/CLRBridgeClient/CLRBridgeClient.csproj @@ -98,10 +98,6 @@ under the License. <Project>{a33c20fb-a76e-494c-80c5-bce4bad876d3}</Project> <Name>RetainedEvalCLRBridge</Name> </ProjectReference> - <ProjectReference Include="$(SourceDir)\Reef\reef-io\NetWork\NetWork.csproj"> - <Project>{883ce800-6a6a-4e0a-b7fe-c054f4f2c1dc}</Project> - <Name>NetWork</Name> - </ProjectReference> <ProjectReference Include="$(SourceDir)\Reef\reef-tasks\Tasks\Tasks.csproj"> <Project>{75503f90-7b82-4762-9997-94b5c68f15db}</Project> <Name>Tasks</Name> @@ -118,6 +114,10 @@ under the License. <Project>{a6baa2a7-f52f-4329-884e-1bcf711d6805}</Project> <Name>Org.Apache.Reef.Driver</Name> </ProjectReference> + <ProjectReference Include="..\..\..\..\Org.Apache.REEF.Network\Org.Apache.REEF.Network.csproj"> + <Project>{883ce800-6a6a-4e0a-b7fe-c054f4f2c1dc}</Project> + <Name>Org.Apache.REEF.Network</Name> + </ProjectReference> <ProjectReference Include="..\..\..\..\Org.Apache.Reef.Wake\Org.Apache.Reef.Wake.csproj"> <Project>{cdfb3464-4041-42b1-9271-83af24cd5008}</Project> <Name>Org.Apache.Reef.Wake</Name> http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-applications/Evaluator/Evaluator.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-applications/Evaluator/Evaluator.cs b/lang/cs/Source/REEF/reef-applications/Evaluator/Evaluator.cs deleted file mode 100644 index 39ebfc3..0000000 --- a/lang/cs/Source/REEF/reef-applications/Evaluator/Evaluator.cs +++ /dev/null @@ -1,261 +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 Org.Apache.REEF.Common; -using Org.Apache.REEF.Common.Context; -using Org.Apache.REEF.Common.Evaluator.Context; -using Org.Apache.REEF.Common.ProtoBuf.ReefProtocol; -using Org.Apache.REEF.Driver.Bridge; -using Org.Apache.REEF.Services; -using Org.Apache.REEF.Tang.Formats; -using Org.Apache.REEF.Tang.Implementations.InjectionPlan; -using Org.Apache.REEF.Tang.Implementations.Tang; -using Org.Apache.REEF.Tang.Interface; -using Org.Apache.REEF.Tasks; -using Org.Apache.REEF.Utilities; -using Org.Apache.REEF.Utilities.Diagnostics; -using Org.Apache.REEF.Utilities.Logging; -using Org.Apache.REEF.Wake.Remote; -using Org.Apache.REEF.Wake.Remote.Impl; -using Org.Apache.REEF.Wake.Time.Runtime.Event; -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Diagnostics; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; - -namespace Org.Apache.REEF.Evaluator -{ - public class Evaluator - { - private static Logger _logger; - - private static int _heartbeatPeriodInMs = Constants.DefaultEvaluatorHeartbeatPeriodInMs; - - private static int _heartbeatMaxRetry = Constants.DefaultEvaluatorHeartbeatMaxRetry; - - private static IInjector _injector; - - private static EvaluatorConfigurations _evaluatorConfig; - - public static void Main(string[] args) - { - Console.WriteLine(string.Format(CultureInfo.InvariantCulture, "START: {0} Evaluator::InitInjector.", DateTime.Now)); - Stopwatch timer = new Stopwatch(); - InitInjector(); - SetCustomTraceListners(); - timer.Stop(); - Console.WriteLine(string.Format(CultureInfo.InvariantCulture, "EXIT: {0} Evaluator::InitInjector. Duration: [{1}].", DateTime.Now, timer.Elapsed)); - - RuntimeClock clock; - - using (_logger.LogScope("Evaluator::Main")) - { - string debugEnabledString = Environment.GetEnvironmentVariable("Org.Apache.REEF.EvaluatorDebug"); - if (!string.IsNullOrWhiteSpace(debugEnabledString) && - debugEnabledString.Equals("enabled", StringComparison.OrdinalIgnoreCase)) - { - while (true) - { - if (Debugger.IsAttached) - { - break; - } - else - { - _logger.Log(Level.Info, "Evaluator in debug mode, waiting for debugger to be attached..."); - Thread.Sleep(2000); - } - } - } - - AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionHandler; - - string heartbeatPeriodFromConfig = ConfigurationManager.AppSettings["EvaluatorHeartbeatPeriodInMs"]; - - int heartbeatPeriod = 0; - - if (!string.IsNullOrWhiteSpace(heartbeatPeriodFromConfig) && - int.TryParse(heartbeatPeriodFromConfig, out heartbeatPeriod)) - { - _heartbeatPeriodInMs = heartbeatPeriod; - } - _logger.Log(Level.Verbose, - "Evaluator heartbeat period set to be " + _heartbeatPeriodInMs + " milliSeconds."); - - int maxHeartbeatRetry = 0; - string heartbeatMaxRetryFromConfig = ConfigurationManager.AppSettings["EvaluatorHeartbeatRetryMaxTimes"]; - - if (!string.IsNullOrWhiteSpace(heartbeatMaxRetryFromConfig) && - int.TryParse(heartbeatMaxRetryFromConfig, out maxHeartbeatRetry)) - { - _heartbeatMaxRetry = maxHeartbeatRetry; - } - _logger.Log(Level.Verbose, "Evaluator heatrbeat max retry set to be " + _heartbeatMaxRetry + " times."); - - if (args.Count() < 2) - { - var e = new InvalidOperationException("must supply at least the rId and evaluator config file"); - Exceptions.Throw(e, _logger); - } - - // remote driver Id - string rId = args[0]; - - // evaluator configuraiton file - string evaluatorConfigurationPath = args[1]; - - ICodec<REEFMessage> reefMessageCodec = new REEFMessageCodec(); - - _evaluatorConfig = new EvaluatorConfigurations(evaluatorConfigurationPath); - - string rootContextConfigString = _evaluatorConfig.RootContextConfiguration; - if (string.IsNullOrWhiteSpace(rootContextConfigString)) - { - Exceptions.Throw(new ArgumentException("empty or null rootContextConfigString"), _logger); - } - ContextConfiguration rootContextConfiguration = new ContextConfiguration(rootContextConfigString); - - string taskConfig = _evaluatorConfig.TaskConfiguration; - Optional<TaskConfiguration> rootTaskConfig = string.IsNullOrEmpty(taskConfig) - ? Optional<TaskConfiguration>.Empty() - : Optional<TaskConfiguration>.Of( - new TaskConfiguration(taskConfig)); - string rootServiceConfigString = _evaluatorConfig.RootServiceConfiguration; - Optional<ServiceConfiguration> rootServiceConfig = string.IsNullOrEmpty(rootServiceConfigString) - ? Optional<ServiceConfiguration>.Empty() - : Optional<ServiceConfiguration>.Of( - new ServiceConfiguration( - rootServiceConfigString)); - - // remoteManager used as client-only in evaluator - IRemoteManager<REEFMessage> remoteManager = new DefaultRemoteManager<REEFMessage>(reefMessageCodec); - IRemoteIdentifier remoteId = new SocketRemoteIdentifier(NetUtilities.ParseIpEndpoint(rId)); - - ConfigurationModule module = new ConfigurationModuleBuilder().Build(); - IConfiguration clockConfiguraiton = module.Build(); - - clock = - TangFactory.GetTang().NewInjector(clockConfiguraiton).GetInstance<RuntimeClock>(); - _logger.Log(Level.Info, "Application Id: " + _evaluatorConfig.ApplicationId); - - EvaluatorSettings evaluatorSettings = new EvaluatorSettings( - _evaluatorConfig.ApplicationId, - _evaluatorConfig.EvaluatorId, - _heartbeatPeriodInMs, - _heartbeatMaxRetry, - rootContextConfiguration, - clock, - remoteManager, - _injector); - - HeartBeatManager heartBeatManager = new HeartBeatManager(evaluatorSettings, remoteId); - ContextManager contextManager = new ContextManager(heartBeatManager, rootServiceConfig, rootTaskConfig); - EvaluatorRuntime evaluatorRuntime = new EvaluatorRuntime(contextManager, heartBeatManager); - - // TODO: repalce with injectionFuture - heartBeatManager._evaluatorRuntime = evaluatorRuntime; - heartBeatManager._contextManager = contextManager; - - SetRuntimeHanlders(evaluatorRuntime, clock); - } - - Task evaluatorTask = Task.Run(new Action(clock.Run)); - evaluatorTask.Wait(); - } - - private static void InitInjector() - { - string clrRuntimeConfigurationFile = Path.Combine(Directory.GetCurrentDirectory(), "reef", "global", - Common.Constants.ClrBridgeRuntimeConfiguration); - if (!File.Exists(clrRuntimeConfigurationFile)) - { - var e = - new InvalidOperationException("Cannot find clrRuntimeConfiguration from " + - clrRuntimeConfigurationFile); - Exceptions.Throw(e, _logger); - } - - try - { - IConfiguration clrBridgeConfiguration = - new AvroConfigurationSerializer().FromFile(clrRuntimeConfigurationFile); - _injector = TangFactory.GetTang().NewInjector(clrBridgeConfiguration); - } - catch (Exception e) - { - Exceptions.Caught(e, Level.Error, "Cannot obtain injector from clr bridge configuration.", _logger); - Exceptions.Throw( - new InvalidOperationException("Cannot obtain injector from clr bridge configuration.", e), - _logger); - } - } - - private static void SetCustomTraceListners() - { - ISet<TraceListener> customTraceListeners; - CustomTraceListeners listeners = null; - try - { - listeners = _injector.GetInstance<CustomTraceListeners>(); - customTraceListeners = listeners.Listeners; - } - catch (Exception e) - { - Exceptions.Caught(e, Level.Error, _logger); - // custom trace listner not set properly, use empty set - customTraceListeners = new HashSet<TraceListener>(); - } - foreach (TraceListener listener in customTraceListeners) - { - Logger.AddTraceListner(listener); - } - _logger = Logger.GetLogger(typeof(Evaluator)); - CustomTraceLevel traceLevel = _injector.GetInstance<CustomTraceLevel>(); - Logger.SetCustomLevel(traceLevel.TraceLevel); - } - - private static void UnhandledExceptionHandler(object sender, UnhandledExceptionEventArgs e) - { - Exception ex = default(Exception); - ex = (Exception)e.ExceptionObject; - _logger.Log(Level.Error, "Unhandled exception caught in Evaluator.", ex); - Exceptions.Throw(new InvalidOperationException("Unhandled exception caught in Evaluator.", ex), _logger); - } - - // set the handlers for runtimeclock manually - // we only need runtimestart and runtimestop handlers now - private static void SetRuntimeHanlders(EvaluatorRuntime evaluatorRuntime, RuntimeClock clock) - { - HashSet<IObserver<RuntimeStart>> runtimeStarts = new HashSet<IObserver<RuntimeStart>>(); - runtimeStarts.Add(evaluatorRuntime); - InjectionFutureImpl<ISet<IObserver<RuntimeStart>>> injectRuntimeStart = new InjectionFutureImpl<ISet<IObserver<RuntimeStart>>>(runtimeStarts); - clock.InjectedRuntimeStartHandler = injectRuntimeStart; - - HashSet<IObserver<RuntimeStop>> runtimeStops = new HashSet<IObserver<RuntimeStop>>(); - runtimeStops.Add(evaluatorRuntime); - InjectionFutureImpl<ISet<IObserver<RuntimeStop>>> injectRuntimeStop = new InjectionFutureImpl<ISet<IObserver<RuntimeStop>>>(runtimeStops); - clock.InjectedRuntimeStopHandler = injectRuntimeStop; - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-applications/Evaluator/Evaluator.csproj ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-applications/Evaluator/Evaluator.csproj b/lang/cs/Source/REEF/reef-applications/Evaluator/Evaluator.csproj deleted file mode 100644 index f64b15f..0000000 --- a/lang/cs/Source/REEF/reef-applications/Evaluator/Evaluator.csproj +++ /dev/null @@ -1,124 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -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. ---> -<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProjectGuid>{1B983182-9C30-464C-948D-F87EB93A8240}</ProjectGuid> - <OutputType>Exe</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Org.Apache.Reef.Evaluator</RootNamespace> - <AssemblyName>Org.Apache.Reef.Evaluator</AssemblyName> - <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <RestorePackages>true</RestorePackages> - <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\..</SolutionDir> - <RestorePackages>true</RestorePackages> - </PropertyGroup> - <Import Project="$(SolutionDir)\Source\build.props" /> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <PlatformTarget>AnyCPU</PlatformTarget> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>$(BinDir)\$(Platform)\$(Configuration)\$(RootNamespace)</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> - <PlatformTarget>AnyCPU</PlatformTarget> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>$(BinDir)\$(Platform)\$(Configuration)\$(RootNamespace)</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <PlatformTarget>AnyCPU</PlatformTarget> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>$(BinDir)\$(Platform)\$(Configuration)\$(RootNamespace)</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> - <PlatformTarget>AnyCPU</PlatformTarget> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>$(BinDir)\$(Platform)\$(Configuration)\$(RootNamespace)</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <ItemGroup> - <Reference Include="protobuf-net"> - <HintPath>$(PackagesDir)\protobuf-net.$(ProtobufVersion)\lib\net40\protobuf-net.dll</HintPath> - </Reference> - <Reference Include="System" /> - <Reference Include="System.Configuration" /> - <Reference Include="System.Core" /> - <Reference Include="System.Xml.Linq" /> - <Reference Include="System.Data.DataSetExtensions" /> - <Reference Include="Microsoft.CSharp" /> - <Reference Include="System.Data" /> - <Reference Include="System.Xml" /> - </ItemGroup> - <ItemGroup> - <Compile Include="Evaluator.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - </ItemGroup> - <ItemGroup> - <None Include="packages.config" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="$(SolutionDir)\Org.Apache.Reef.Tang\Org.Apache.Reef.Tang.csproj"> - <Project>{97dbb573-3994-417a-9f69-ffa25f00d2a6}</Project> - <Name>Org.Apache.Reef.Tang</Name> - </ProjectReference> - <ProjectReference Include="$(SolutionDir)\Org.Apache.Reef.Utilities\Org.Apache.Reef.Utilities.csproj"> - <Project>{79e7f89a-1dfb-45e1-8d43-d71a954aeb98}</Project> - <Name>Org.Apache.Reef.Utilities</Name> - </ProjectReference> - <ProjectReference Include="..\..\..\..\Org.Apache.Reef.Common\Org.Apache.Reef.Common.csproj"> - <Project>{545a0582-4105-44ce-b99c-b1379514a630}</Project> - <Name>Org.Apache.Reef.Common</Name> - </ProjectReference> - <ProjectReference Include="..\..\..\..\Org.Apache.Reef.Driver\Org.Apache.Reef.Driver.csproj"> - <Project>{a6baa2a7-f52f-4329-884e-1bcf711d6805}</Project> - <Name>Org.Apache.Reef.Driver</Name> - </ProjectReference> - <ProjectReference Include="..\..\..\..\Org.Apache.Reef.Wake\Org.Apache.Reef.Wake.csproj"> - <Project>{cdfb3464-4041-42b1-9271-83af24cd5008}</Project> - <Name>Org.Apache.Reef.Wake</Name> - </ProjectReference> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-applications/Evaluator/Properties/AssemblyInfo.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-applications/Evaluator/Properties/AssemblyInfo.cs b/lang/cs/Source/REEF/reef-applications/Evaluator/Properties/AssemblyInfo.cs deleted file mode 100644 index 51ff356..0000000 --- a/lang/cs/Source/REEF/reef-applications/Evaluator/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,55 +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.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Evaluator")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Evaluator")] -[assembly: AssemblyCopyright("Copyright © 2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("a64dc535-9b1e-41a4-8303-117f8b28c8c0")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-applications/Evaluator/packages.config ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-applications/Evaluator/packages.config b/lang/cs/Source/REEF/reef-applications/Evaluator/packages.config deleted file mode 100644 index 81b0ef5..0000000 --- a/lang/cs/Source/REEF/reef-applications/Evaluator/packages.config +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -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. ---> -<packages> - <package id="protobuf-net" version="2.0.0.668" targetFramework="net45" /> -</packages> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-examples/HelloCLRBridge/HelloCLRBridge.csproj ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-examples/HelloCLRBridge/HelloCLRBridge.csproj b/lang/cs/Source/REEF/reef-examples/HelloCLRBridge/HelloCLRBridge.csproj index 604943e..29f173b 100644 --- a/lang/cs/Source/REEF/reef-examples/HelloCLRBridge/HelloCLRBridge.csproj +++ b/lang/cs/Source/REEF/reef-examples/HelloCLRBridge/HelloCLRBridge.csproj @@ -98,10 +98,6 @@ under the License. <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="$(SourceDir)\Reef\reef-io\NetWork\NetWork.csproj"> - <Project>{883ce800-6a6a-4e0a-b7fe-c054f4f2c1dc}</Project> - <Name>NetWork</Name> - </ProjectReference> <ProjectReference Include="$(SourceDir)\Reef\reef-tasks\Tasks\Tasks.csproj"> <Project>{75503f90-7b82-4762-9997-94b5c68f15db}</Project> <Name>Tasks</Name> @@ -122,6 +118,10 @@ under the License. <Project>{a6baa2a7-f52f-4329-884e-1bcf711d6805}</Project> <Name>Org.Apache.Reef.Driver</Name> </ProjectReference> + <ProjectReference Include="..\..\..\..\Org.Apache.REEF.Network\Org.Apache.REEF.Network.csproj"> + <Project>{883ce800-6a6a-4e0a-b7fe-c054f4f2c1dc}</Project> + <Name>Org.Apache.REEF.Network</Name> + </ProjectReference> <ProjectReference Include="..\..\..\..\Org.Apache.Reef.Wake\Org.Apache.Reef.Wake.csproj"> <Project>{cdfb3464-4041-42b1-9271-83af24cd5008}</Project> <Name>Org.Apache.Reef.Wake</Name> http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-examples/HelloCLRBridge/handlers/HelloAllocatedEvaluatorHandler.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-examples/HelloCLRBridge/handlers/HelloAllocatedEvaluatorHandler.cs b/lang/cs/Source/REEF/reef-examples/HelloCLRBridge/handlers/HelloAllocatedEvaluatorHandler.cs index 5d8438c..bdf04cf 100644 --- a/lang/cs/Source/REEF/reef-examples/HelloCLRBridge/handlers/HelloAllocatedEvaluatorHandler.cs +++ b/lang/cs/Source/REEF/reef-examples/HelloCLRBridge/handlers/HelloAllocatedEvaluatorHandler.cs @@ -21,7 +21,7 @@ using Org.Apache.REEF.Common.io; using Org.Apache.REEF.Driver.Bridge; using Org.Apache.REEF.Driver.Context; using Org.Apache.REEF.Driver.Evaluator; -using Org.Apache.REEF.IO.Network.Naming; +using Org.Apache.REEF.Network.Naming; using Org.Apache.REEF.Services; using Org.Apache.REEF.Tang.Annotations; using Org.Apache.REEF.Tang.Implementations.Configuration; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-examples/HelloCLRBridge/handlers/HelloSimpleEventHandlers.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-examples/HelloCLRBridge/handlers/HelloSimpleEventHandlers.cs b/lang/cs/Source/REEF/reef-examples/HelloCLRBridge/handlers/HelloSimpleEventHandlers.cs index 8fa18da..43962cb 100644 --- a/lang/cs/Source/REEF/reef-examples/HelloCLRBridge/handlers/HelloSimpleEventHandlers.cs +++ b/lang/cs/Source/REEF/reef-examples/HelloCLRBridge/handlers/HelloSimpleEventHandlers.cs @@ -30,7 +30,7 @@ using Org.Apache.REEF.Driver.Bridge; using Org.Apache.REEF.Driver.Context; using Org.Apache.REEF.Driver.Evaluator; using Org.Apache.REEF.Driver.Task; -using Org.Apache.REEF.IO.Network.Naming; +using Org.Apache.REEF.Network.Naming; using Org.Apache.REEF.Tasks; using Org.Apache.REEF.Utilities; using Org.Apache.REEF.Utilities.Logging; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-examples/HelloCLRBridge/handlers/HelloStartHandler.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-examples/HelloCLRBridge/handlers/HelloStartHandler.cs b/lang/cs/Source/REEF/reef-examples/HelloCLRBridge/handlers/HelloStartHandler.cs index 37cdca4..8d10471 100644 --- a/lang/cs/Source/REEF/reef-examples/HelloCLRBridge/handlers/HelloStartHandler.cs +++ b/lang/cs/Source/REEF/reef-examples/HelloCLRBridge/handlers/HelloStartHandler.cs @@ -22,7 +22,7 @@ using Org.Apache.REEF.Common.io; using Org.Apache.REEF.Driver; using Org.Apache.REEF.Driver.bridge; using Org.Apache.REEF.Driver.Bridge; -using Org.Apache.REEF.IO.Network.Naming; +using Org.Apache.REEF.Network.Naming; using Org.Apache.REEF.Tasks; using Org.Apache.REEF.Utilities.Logging; using Org.Apache.REEF.Tang.Annotations; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-io/Network/Naming/Codec/NamingLookupRequestCodec.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-io/Network/Naming/Codec/NamingLookupRequestCodec.cs b/lang/cs/Source/REEF/reef-io/Network/Naming/Codec/NamingLookupRequestCodec.cs deleted file mode 100644 index dd08079..0000000 --- a/lang/cs/Source/REEF/reef-io/Network/Naming/Codec/NamingLookupRequestCodec.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 Org.Apache.REEF.IO.Network.Naming.Events; -using Org.Apache.REEF.Utilities; -using Org.Apache.REEF.Wake.Remote; -using org.apache.reef.io.network.naming.avro; - -namespace Org.Apache.REEF.IO.Network.Naming.Codec -{ - internal class NamingLookupRequestCodec : ICodec<NamingLookupRequest> - { - public byte[] Encode(NamingLookupRequest obj) - { - var request = new AvroNamingLookupRequest { ids = obj.Identifiers }; - return AvroUtils.AvroSerialize(request); - } - - public NamingLookupRequest Decode(byte[] data) - { - AvroNamingLookupRequest request = AvroUtils.AvroDeserialize<AvroNamingLookupRequest>(data); - return new NamingLookupRequest(request.ids); - } - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-io/Network/Naming/Codec/NamingLookupResponseCodec.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-io/Network/Naming/Codec/NamingLookupResponseCodec.cs b/lang/cs/Source/REEF/reef-io/Network/Naming/Codec/NamingLookupResponseCodec.cs deleted file mode 100644 index 9e391ae..0000000 --- a/lang/cs/Source/REEF/reef-io/Network/Naming/Codec/NamingLookupResponseCodec.cs +++ /dev/null @@ -1,55 +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 Org.Apache.REEF.Common.io; -using Org.Apache.REEF.IO.Network.Naming.Events; -using Org.Apache.REEF.Utilities; -using Org.Apache.REEF.Wake.Remote; -using System.Collections.Generic; -using System.Linq; -using org.apache.reef.io.network.naming.avro; - -namespace Org.Apache.REEF.IO.Network.Naming.Codec -{ - internal class NamingLookupResponseCodec : ICodec<NamingLookupResponse> - { - public byte[] Encode(NamingLookupResponse obj) - { - List<AvroNamingAssignment> tuples = obj.NameAssignments - .Select(assignment => new AvroNamingAssignment() - { - id = assignment.Identifier, - host = assignment.Endpoint.Address.ToString(), - port = assignment.Endpoint.Port - }).ToList(); - - AvroNamingLookupResponse response = new AvroNamingLookupResponse { tuples = tuples }; - return AvroUtils.AvroSerialize(response); - } - - public NamingLookupResponse Decode(byte[] data) - { - AvroNamingLookupResponse response = AvroUtils.AvroDeserialize<AvroNamingLookupResponse>(data); - List<NameAssignment> assignments = - response.tuples.Select(x => new NameAssignment(x.id, x.host, x.port)).ToList(); - - return new NamingLookupResponse(assignments); - } - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-io/Network/Naming/Codec/NamingRegisterRequestCodec.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-io/Network/Naming/Codec/NamingRegisterRequestCodec.cs b/lang/cs/Source/REEF/reef-io/Network/Naming/Codec/NamingRegisterRequestCodec.cs deleted file mode 100644 index dcf2928..0000000 --- a/lang/cs/Source/REEF/reef-io/Network/Naming/Codec/NamingRegisterRequestCodec.cs +++ /dev/null @@ -1,47 +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 Org.Apache.REEF.Common.io; -using Org.Apache.REEF.IO.Network.Naming.Events; -using Org.Apache.REEF.Utilities; -using Org.Apache.REEF.Wake.Remote; -using org.apache.reef.io.network.naming.avro; - -namespace Org.Apache.REEF.IO.Network.Naming.Codec -{ - internal class NamingRegisterRequestCodec : ICodec<NamingRegisterRequest> - { - public byte[] Encode(NamingRegisterRequest obj) - { - AvroNamingRegisterRequest request = new AvroNamingRegisterRequest - { - id = obj.NameAssignment.Identifier, - host = obj.NameAssignment.Endpoint.Address.ToString(), - port = obj.NameAssignment.Endpoint.Port - }; - return AvroUtils.AvroSerialize(request); - } - - public NamingRegisterRequest Decode(byte[] data) - { - AvroNamingRegisterRequest request = AvroUtils.AvroDeserialize<AvroNamingRegisterRequest>(data); - return new NamingRegisterRequest(new NameAssignment(request.id, request.host, request.port)); - } - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-io/Network/Naming/Codec/NamingRegisterResponseCodec.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-io/Network/Naming/Codec/NamingRegisterResponseCodec.cs b/lang/cs/Source/REEF/reef-io/Network/Naming/Codec/NamingRegisterResponseCodec.cs deleted file mode 100644 index b851718..0000000 --- a/lang/cs/Source/REEF/reef-io/Network/Naming/Codec/NamingRegisterResponseCodec.cs +++ /dev/null @@ -1,44 +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 Org.Apache.REEF.IO.Network.Naming.Events; -using Org.Apache.REEF.Wake.Remote; - -namespace Org.Apache.REEF.IO.Network.Naming.Codec -{ - internal class NamingRegisterResponseCodec : ICodec<NamingRegisterResponse> - { - private NamingRegisterRequestCodec _codec; - - public NamingRegisterResponseCodec(NamingRegisterRequestCodec codec) - { - _codec = codec; - } - - public byte[] Encode(NamingRegisterResponse obj) - { - return _codec.Encode(obj.Request); - } - - public NamingRegisterResponse Decode(byte[] data) - { - return new NamingRegisterResponse(_codec.Decode(data)); - } - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-io/Network/Naming/Codec/NamingUnregisterRequestCodec.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-io/Network/Naming/Codec/NamingUnregisterRequestCodec.cs b/lang/cs/Source/REEF/reef-io/Network/Naming/Codec/NamingUnregisterRequestCodec.cs deleted file mode 100644 index 94b3b1f..0000000 --- a/lang/cs/Source/REEF/reef-io/Network/Naming/Codec/NamingUnregisterRequestCodec.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 Org.Apache.REEF.IO.Network.Naming.Events; -using Org.Apache.REEF.Utilities; -using Org.Apache.REEF.Wake.Remote; -using org.apache.reef.io.network.naming.avro; - -namespace Org.Apache.REEF.IO.Network.Naming.Codec -{ - internal class NamingUnregisterRequestCodec : ICodec<NamingUnregisterRequest> - { - public byte[] Encode(NamingUnregisterRequest obj) - { - AvroNamingUnRegisterRequest request = new AvroNamingUnRegisterRequest { id = obj.Identifier }; - return AvroUtils.AvroSerialize(request); - } - - public NamingUnregisterRequest Decode(byte[] data) - { - AvroNamingUnRegisterRequest request = AvroUtils.AvroDeserialize<AvroNamingUnRegisterRequest>(data); - return new NamingUnregisterRequest(request.id); - } - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-io/Network/Naming/Contracts/AvroNamingAssignment.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-io/Network/Naming/Contracts/AvroNamingAssignment.cs b/lang/cs/Source/REEF/reef-io/Network/Naming/Contracts/AvroNamingAssignment.cs deleted file mode 100644 index 5cfd5ab..0000000 --- a/lang/cs/Source/REEF/reef-io/Network/Naming/Contracts/AvroNamingAssignment.cs +++ /dev/null @@ -1,62 +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.Runtime.Serialization; - -//---------- Auto-generated ------------ -namespace org.apache.reef.io.network.naming.avro -{ - /// <summary> - /// Used to serialize and deserialize Avro record org.apache.reef.io.network.naming.avro.AvroNamingAssignment. - /// </summary> - [DataContract] - public class AvroNamingAssignment - { - private const string JsonSchema = @"{""type"":""record"",""name"":""org.apache.reef.io.network.naming.avro.AvroNamingAssignment"",""fields"":[{""name"":""id"",""type"":""string""},{""name"":""host"",""type"":""string""},{""name"":""port"",""type"":""int""}]}"; - - /// <summary> - /// Gets the schema. - /// </summary> - public static string Schema - { - get - { - return JsonSchema; - } - } - - /// <summary> - /// Gets or sets the id field. - /// </summary> - [DataMember] - public string id { get; set; } - - /// <summary> - /// Gets or sets the host field. - /// </summary> - [DataMember] - public string host { get; set; } - - /// <summary> - /// Gets or sets the port field. - /// </summary> - [DataMember] - public int port { get; set; } - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-io/Network/Naming/Contracts/AvroNamingLookupRequest.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-io/Network/Naming/Contracts/AvroNamingLookupRequest.cs b/lang/cs/Source/REEF/reef-io/Network/Naming/Contracts/AvroNamingLookupRequest.cs deleted file mode 100644 index 0698fd6..0000000 --- a/lang/cs/Source/REEF/reef-io/Network/Naming/Contracts/AvroNamingLookupRequest.cs +++ /dev/null @@ -1,51 +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.Collections.Generic; -using System.Runtime.Serialization; - -//---------- Auto-generated ------------ -namespace org.apache.reef.io.network.naming.avro -{ - /// <summary> - /// Used to serialize and deserialize Avro record org.apache.reef.io.network.naming.avro.AvroNamingLookupRequest. - /// </summary> - [DataContract] - public class AvroNamingLookupRequest - { - private const string JsonSchema = @"{""type"":""record"",""name"":""org.apache.reef.io.network.naming.avro.AvroNamingLookupRequest"",""fields"":[{""name"":""ids"",""type"":{""type"":""array"",""items"":""string""}}]}"; - - /// <summary> - /// Gets the schema. - /// </summary> - public static string Schema - { - get - { - return JsonSchema; - } - } - - /// <summary> - /// Gets or sets the ids field. - /// </summary> - [DataMember] - public List<string> ids { get; set; } - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-io/Network/Naming/Contracts/AvroNamingLookupResponse.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-io/Network/Naming/Contracts/AvroNamingLookupResponse.cs b/lang/cs/Source/REEF/reef-io/Network/Naming/Contracts/AvroNamingLookupResponse.cs deleted file mode 100644 index 4599faa..0000000 --- a/lang/cs/Source/REEF/reef-io/Network/Naming/Contracts/AvroNamingLookupResponse.cs +++ /dev/null @@ -1,51 +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.Collections.Generic; -using System.Runtime.Serialization; - -//---------- Auto-generated ------------ -namespace org.apache.reef.io.network.naming.avro -{ - /// <summary> - /// Used to serialize and deserialize Avro record org.apache.reef.io.network.naming.avro.AvroNamingLookupResponse. - /// </summary> - [DataContract] - public class AvroNamingLookupResponse - { - private const string JsonSchema = @"{""type"":""record"",""name"":""org.apache.reef.io.network.naming.avro.AvroNamingLookupResponse"",""fields"":[{""name"":""tuples"",""type"":{""type"":""array"",""items"":{""type"":""record"",""name"":""org.apache.reef.io.network.naming.avro.AvroNamingAssignment"",""fields"":[{""name"":""id"",""type"":""string""},{""name"":""host"",""type"":""string""},{""name"":""port"",""type"":""int""}]}}}]}"; - - /// <summary> - /// Gets the schema. - /// </summary> - public static string Schema - { - get - { - return JsonSchema; - } - } - - /// <summary> - /// Gets or sets the tuples field. - /// </summary> - [DataMember] - public List<AvroNamingAssignment> tuples { get; set; } - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-io/Network/Naming/Contracts/AvroNamingRegisterRequest.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-io/Network/Naming/Contracts/AvroNamingRegisterRequest.cs b/lang/cs/Source/REEF/reef-io/Network/Naming/Contracts/AvroNamingRegisterRequest.cs deleted file mode 100644 index 76f14be..0000000 --- a/lang/cs/Source/REEF/reef-io/Network/Naming/Contracts/AvroNamingRegisterRequest.cs +++ /dev/null @@ -1,62 +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.Runtime.Serialization; - -//---------- Auto-generated ------------ -namespace org.apache.reef.io.network.naming.avro -{ - /// <summary> - /// Used to serialize and deserialize Avro record org.apache.reef.io.network.naming.avro.AvroNamingRegisterRequest. - /// </summary> - [DataContract] - public class AvroNamingRegisterRequest - { - private const string JsonSchema = @"{""type"":""record"",""name"":""org.apache.reef.io.network.naming.avro.AvroNamingRegisterRequest"",""fields"":[{""name"":""id"",""type"":""string""},{""name"":""host"",""type"":""string""},{""name"":""port"",""type"":""int""}]}"; - - /// <summary> - /// Gets the schema. - /// </summary> - public static string Schema - { - get - { - return JsonSchema; - } - } - - /// <summary> - /// Gets or sets the id field. - /// </summary> - [DataMember] - public string id { get; set; } - - /// <summary> - /// Gets or sets the host field. - /// </summary> - [DataMember] - public string host { get; set; } - - /// <summary> - /// Gets or sets the port field. - /// </summary> - [DataMember] - public int port { get; set; } - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-io/Network/Naming/Contracts/AvroNamingUnRegisterRequest.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-io/Network/Naming/Contracts/AvroNamingUnRegisterRequest.cs b/lang/cs/Source/REEF/reef-io/Network/Naming/Contracts/AvroNamingUnRegisterRequest.cs deleted file mode 100644 index 299e940..0000000 --- a/lang/cs/Source/REEF/reef-io/Network/Naming/Contracts/AvroNamingUnRegisterRequest.cs +++ /dev/null @@ -1,50 +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.Runtime.Serialization; - -//---------- Auto-generated ------------ -namespace org.apache.reef.io.network.naming.avro -{ - /// <summary> - /// Used to serialize and deserialize Avro record org.apache.reef.io.network.naming.avro.AvroNamingUnRegisterRequest. - /// </summary> - [DataContract] - public class AvroNamingUnRegisterRequest - { - private const string JsonSchema = @"{""type"":""record"",""name"":""org.apache.reef.io.network.naming.avro.AvroNamingUnRegisterRequest"",""fields"":[{""name"":""id"",""type"":""string""}]}"; - - /// <summary> - /// Gets the schema. - /// </summary> - public static string Schema - { - get - { - return JsonSchema; - } - } - - /// <summary> - /// Gets or sets the id field. - /// </summary> - [DataMember] - public string id { get; set; } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingEvent.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingEvent.cs b/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingEvent.cs deleted file mode 100644 index 8264322..0000000 --- a/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingEvent.cs +++ /dev/null @@ -1,35 +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 Org.Apache.REEF.Wake.Remote; - -namespace Org.Apache.REEF.IO.Network.Naming.Events -{ - /// <summary> - /// Event representing a lookup, registering, or unregistering of - /// an identifier with the Name Service. - /// </summary> - internal class NamingEvent - { - /// <summary> - /// The link for communication between the NameClient and NameServer - /// </summary> - public ILink<NamingEvent> Link { get; set; } - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingGetAllRequest.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingGetAllRequest.cs b/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingGetAllRequest.cs deleted file mode 100644 index 11068d4..0000000 --- a/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingGetAllRequest.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. - */ - -namespace Org.Apache.REEF.IO.Network.Naming.Events -{ - /// <summary> - /// Event to request all registered identifiers and their mapped - /// IPEndpoints - /// </summary> - internal class NamingGetAllRequest : NamingEvent - { - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingGetAllResponse.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingGetAllResponse.cs b/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingGetAllResponse.cs deleted file mode 100644 index c1ece31..0000000 --- a/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingGetAllResponse.cs +++ /dev/null @@ -1,38 +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.Collections.Generic; -using Org.Apache.REEF.Common.io; - -namespace Org.Apache.REEF.IO.Network.Naming.Events -{ - /// <summary> - /// Response event for looking up all registered identifiers and their - /// mapped IPEndpoints - /// </summary> - internal class NamingGetAllResponse : NamingEvent - { - public NamingGetAllResponse(List<NameAssignment> assignments) - { - Assignments = assignments; - } - - public List<NameAssignment> Assignments { get; set; } - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingLookupRequest.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingLookupRequest.cs b/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingLookupRequest.cs deleted file mode 100644 index 09e82dd..0000000 --- a/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingLookupRequest.cs +++ /dev/null @@ -1,36 +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.Collections.Generic; - -namespace Org.Apache.REEF.IO.Network.Naming.Events -{ - /// <summary> - /// Event to request look up of IPEndpoints in the Name Service - /// </summary> - internal class NamingLookupRequest : NamingEvent - { - public NamingLookupRequest(List<string> ids) - { - Identifiers = ids; - } - - public List<string> Identifiers { get; set; } - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingLookupResponse.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingLookupResponse.cs b/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingLookupResponse.cs deleted file mode 100644 index 337f433..0000000 --- a/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingLookupResponse.cs +++ /dev/null @@ -1,39 +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.Collections.Generic; -using Microsoft.Hadoop.Avro; -using Org.Apache.REEF.Common.io; - -namespace Org.Apache.REEF.IO.Network.Naming.Events -{ - /// <summary> - /// Event for lookup response in Name Service. - /// </summary> - internal class NamingLookupResponse : NamingEvent - { - public NamingLookupResponse(List<NameAssignment> nameAssignments) - { - NameAssignments = nameAssignments; - } - - [NullableSchema] - public List<NameAssignment> NameAssignments { get; set; } - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingRegisterRequest.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingRegisterRequest.cs b/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingRegisterRequest.cs deleted file mode 100644 index 365ac04..0000000 --- a/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingRegisterRequest.cs +++ /dev/null @@ -1,36 +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 Org.Apache.REEF.Common.io; - -namespace Org.Apache.REEF.IO.Network.Naming.Events -{ - /// <summary> - /// Event to request registering an identifier and endpoint with the Name Service - /// </summary> - internal class NamingRegisterRequest : NamingEvent - { - public NamingRegisterRequest(NameAssignment nameAssignment) - { - NameAssignment = nameAssignment; - } - - public NameAssignment NameAssignment { get; set; } - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingRegisterResponse.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingRegisterResponse.cs b/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingRegisterResponse.cs deleted file mode 100644 index d8e49be..0000000 --- a/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingRegisterResponse.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. - */ - -namespace Org.Apache.REEF.IO.Network.Naming.Events -{ - /// <summary> - /// Response event for registering an IPEndpoint with the Name Service - /// </summary> - internal class NamingRegisterResponse : NamingEvent - { - public NamingRegisterResponse(NamingRegisterRequest request) - { - Request = request; - } - - public NamingRegisterRequest Request { get; set; } - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingUnregisterRequest.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingUnregisterRequest.cs b/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingUnregisterRequest.cs deleted file mode 100644 index 0698de2..0000000 --- a/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingUnregisterRequest.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. - */ - -namespace Org.Apache.REEF.IO.Network.Naming.Events -{ - /// <summary> - /// Event to request unregistering of an IPEndpoint with the Name Service - /// </summary> - internal class NamingUnregisterRequest : NamingEvent - { - public NamingUnregisterRequest(string identifier) - { - Identifier = identifier; - } - - public string Identifier { get; set; } - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingUnregisterResponse.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingUnregisterResponse.cs b/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingUnregisterResponse.cs deleted file mode 100644 index 56268d8..0000000 --- a/lang/cs/Source/REEF/reef-io/Network/Naming/Events/NamingUnregisterResponse.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. - */ - -namespace Org.Apache.REEF.IO.Network.Naming.Events -{ - /// <summary> - /// Response event for unregistering of an IPEndpoint with the Name Service - /// </summary> - internal class NamingUnregisterResponse : NamingEvent - { - public NamingUnregisterResponse(NamingUnregisterRequest request) - { - Request = request; - } - - public NamingUnregisterRequest Request { get; set; } - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/b6c4e983/lang/cs/Source/REEF/reef-io/Network/Naming/INameServer.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Source/REEF/reef-io/Network/Naming/INameServer.cs b/lang/cs/Source/REEF/reef-io/Network/Naming/INameServer.cs deleted file mode 100644 index 5e7cffc..0000000 --- a/lang/cs/Source/REEF/reef-io/Network/Naming/INameServer.cs +++ /dev/null @@ -1,69 +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 System.Collections.Generic; -using System.Net; -using Org.Apache.REEF.Common.io; -using Org.Apache.REEF.IO.Network.Naming.Events; -using Org.Apache.REEF.Tang.Annotations; - -namespace Org.Apache.REEF.IO.Network.Naming -{ - /// <summary> - /// Service that manages names and IPEndpoints for well known hosts. - /// Can register, unregister, and look up IPAddresses using a string identifier. - /// </summary> - [DefaultImplementation(typeof(NameServer))] - public interface INameServer : IDisposable - { - /// <summary> - /// Listening endpoint for the NameServer - /// </summary> - IPEndPoint LocalEndpoint { get; } - - /// <summary> - /// Looks up the IPEndpoints for each string identifier - /// </summary> - /// <param name="ids">The IDs to look up</param> - /// <returns>A list of Name assignments representing the identifier - /// that was searched for and the mapped IPEndpoint</returns> - List<NameAssignment> Lookup(List<string> ids); - - /// <summary> - /// Gets all of the registered identifier/endpoint pairs. - /// </summary> - /// <returns>A list of all of the registered identifiers and their - /// mapped IPEndpoints</returns> - List<NameAssignment> GetAll(); - - /// <summary> - /// Registers the string identifier with the given IPEndpoint - /// </summary> - /// <param name="id">The string ident</param> - /// <param name="endpoint">The mapped endpoint</param> - void Register(string id, IPEndPoint endpoint); - - /// <summary> - /// Unregister the given identifier with the NameServer - /// </summary> - /// <param name="id">The identifier to unregister</param> - void Unregister(string id); - } -}
