http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/evaluator/IEvaluatorRequest .cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Driver/evaluator/IEvaluatorRequest .cs b/lang/cs/Org.Apache.REEF.Driver/evaluator/IEvaluatorRequest .cs deleted file mode 100644 index ded8db6..0000000 --- a/lang/cs/Org.Apache.REEF.Driver/evaluator/IEvaluatorRequest .cs +++ /dev/null @@ -1,42 +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.Capabilities; -using Org.Apache.REEF.Common.Catalog; -using System.Collections.Generic; - -namespace Org.Apache.REEF.Driver.Evaluator -{ - public interface IEvaluatorRequest - { - int MemoryMegaBytes { get; set; } - - int Number { get; set; } - - int VirtualCore { get; set; } - - string Rack { get; set; } - - string EvaluatorBatchId { get; set; } - - List<ICapability> Capabilities { get; set; } - - IResourceCatalog Catalog { get; set; } - } -}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/evaluator/IEvaluatorRequestor.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Driver/evaluator/IEvaluatorRequestor.cs b/lang/cs/Org.Apache.REEF.Driver/evaluator/IEvaluatorRequestor.cs deleted file mode 100644 index ac374ce..0000000 --- a/lang/cs/Org.Apache.REEF.Driver/evaluator/IEvaluatorRequestor.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 System.Collections.Generic; - -using Org.Apache.REEF.Common.Catalog; - -namespace Org.Apache.REEF.Driver.Evaluator -{ - /// <summary> - /// Interface through which Evaluators can be requested. - /// </summary> - public interface IEvaluatorRequestor - { - /// <summary> - /// Access to the {@link ResourceCatalog} for the cluster this Factory has access to - /// </summary> - IResourceCatalog ResourceCatalog { get; set; } - - /// <summary> - /// Map between user evaluator id and evaluator information - /// </summary> - //IDictionary<string, IEvaluatorDescriptor> Evaluators { get; } - - /// <summary> - /// Submit the request for new evaluator. The response will surface in the AllocatedEvaluator message handler. - /// </summary> - /// <param name="request"></param> - void Submit(IEvaluatorRequest request); - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/evaluator/IFailedEvaluator.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Driver/evaluator/IFailedEvaluator.cs b/lang/cs/Org.Apache.REEF.Driver/evaluator/IFailedEvaluator.cs deleted file mode 100644 index cd2ae2c..0000000 --- a/lang/cs/Org.Apache.REEF.Driver/evaluator/IFailedEvaluator.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.Common.Exceptions; -using Org.Apache.REEF.Driver.Bridge; -using Org.Apache.REEF.Driver.Task; -using Org.Apache.REEF.Utilities; -using System.Collections.Generic; - -namespace Org.Apache.REEF.Driver.Evaluator -{ - /// <summary> - /// Represents an Evaluator that became unavailable. - /// </summary> - public interface IFailedEvaluator : IIdentifiable - { - EvaluatorException EvaluatorException { get; set; } - - List<FailedContext> FailedContexts { get; set; } - - Optional<IFailedTask> FailedTask { get; set; } - - IEvaluatorRequestor GetEvaluatorRequetor(); - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/task/ICompletedTask.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Driver/task/ICompletedTask.cs b/lang/cs/Org.Apache.REEF.Driver/task/ICompletedTask.cs deleted file mode 100644 index bfd15c7..0000000 --- a/lang/cs/Org.Apache.REEF.Driver/task/ICompletedTask.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 Org.Apache.REEF.Driver.Context; -using Org.Apache.REEF.Utilities; - -namespace Org.Apache.REEF.Driver.Task -{ - public interface ICompletedTask : IMessage, IIdentifiable - { - IActiveContext ActiveContext { get; set; } - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/task/IFailedTask.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Driver/task/IFailedTask.cs b/lang/cs/Org.Apache.REEF.Driver/task/IFailedTask.cs deleted file mode 100644 index 6d12993..0000000 --- a/lang/cs/Org.Apache.REEF.Driver/task/IFailedTask.cs +++ /dev/null @@ -1,30 +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.Api; -using Org.Apache.REEF.Driver.Context; -using Org.Apache.REEF.Utilities; - -namespace Org.Apache.REEF.Driver.Task -{ - public interface IFailedTask : IAbstractFailure - { - Optional<IActiveContext> GetActiveContext(); - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/task/IRunningTask.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Driver/task/IRunningTask.cs b/lang/cs/Org.Apache.REEF.Driver/task/IRunningTask.cs deleted file mode 100644 index f1c4ea0..0000000 --- a/lang/cs/Org.Apache.REEF.Driver/task/IRunningTask.cs +++ /dev/null @@ -1,65 +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.Driver.Context; -using Org.Apache.REEF.Utilities; -using System; - -namespace Org.Apache.REEF.Driver.Task -{ - /// <summary> - /// Represents a running Task - /// </summary> - public interface IRunningTask : IIdentifiable, IDisposable - { - /// <summary> - /// the context the task is running on. - /// </summary> - IActiveContext ActiveContext { get; set; } - - /// <summary> - /// Sends the message to the running task. - /// </summary> - /// <param name="message"></param> - void OnNext(byte[] message); - - /// <summary> - /// Sends the message - /// </summary> - /// <param name="message"></param> - void Send(byte[] message); - - /// <summary> - /// Signal the task to suspend. - /// </summary> - /// <param name="message">a message that is sent to the Task.</param> - void Suspend(byte[] message); - - /// <summary> - /// Sends the message to the running task. - /// </summary> - void Suspend(); - - /// <summary> - /// Signal the task to shut down. - /// </summary> - /// <param name="message">a message that is sent to the Task.</param> - void Dispose(byte[] message); - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/task/ISuspendedTask.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Driver/task/ISuspendedTask.cs b/lang/cs/Org.Apache.REEF.Driver/task/ISuspendedTask.cs deleted file mode 100644 index 80f7976..0000000 --- a/lang/cs/Org.Apache.REEF.Driver/task/ISuspendedTask.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 Org.Apache.REEF.Driver.Context; -using Org.Apache.REEF.Utilities; - -namespace Org.Apache.REEF.Driver -{ - public interface ISuspendedTask : IMessage, IIdentifiable - { - IActiveContext ActiveContext { get; set; } - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/task/ITaskMessage.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Driver/task/ITaskMessage.cs b/lang/cs/Org.Apache.REEF.Driver/task/ITaskMessage.cs deleted file mode 100644 index e06c8f3..0000000 --- a/lang/cs/Org.Apache.REEF.Driver/task/ITaskMessage.cs +++ /dev/null @@ -1,28 +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.Driver.Task -{ - public interface ITaskMessage - { - byte[] Message { get; set; } - - string TaskId { get; set; } - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/task/RunningTaskImpl.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Driver/task/RunningTaskImpl.cs b/lang/cs/Org.Apache.REEF.Driver/task/RunningTaskImpl.cs deleted file mode 100644 index 94a4435..0000000 --- a/lang/cs/Org.Apache.REEF.Driver/task/RunningTaskImpl.cs +++ /dev/null @@ -1,127 +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.ProtoBuf.EvaluatorRunTimeProto; -using Org.Apache.REEF.Driver.Context; -using Org.Apache.REEF.Utilities.Logging; -using System.Globalization; - -namespace Org.Apache.REEF.Driver.Task -{ - public class RunningTaskImpl : IRunningTask - { - private static readonly Logger LOGGER = Logger.GetLogger(typeof(RunningTaskImpl)); - - private string _id; - - private EvaluatorManager _evaluatorManager; - - private EvaluatorContext _evaluatorContext; - - public RunningTaskImpl(EvaluatorManager evaluatorManager, string taskId, EvaluatorContext evaluatorContext) - { - LOGGER.Log(Level.Info, string.Format(CultureInfo.InvariantCulture, "INIT: TaskRuntime id [{0}] on evaluator id [{1}]", taskId, evaluatorManager.Id)); - _id = taskId; - _evaluatorManager = evaluatorManager; - _evaluatorContext = evaluatorContext; - } - - public string Id - { - get - { - return _id; - } - - set - { - } - } - - public IActiveContext ActiveContext - { - get - { - return _evaluatorContext; - } - - set - { - } - } - - public void Dispose() - { - LOGGER.Log(Level.Info, string.Format(CultureInfo.InvariantCulture, "DISPOSE: TaskRuntime id [{0}] on evaluator id [{1}]", _id, _evaluatorManager.Id)); - ContextControlProto contextControlProto = new ContextControlProto(); - contextControlProto.stop_task = new StopTaskProto(); - _evaluatorManager.Handle(contextControlProto); - } - - public void Dispose(byte[] message) - { - LOGGER.Log(Level.Info, string.Format(CultureInfo.InvariantCulture, "DISPOSE: TaskRuntime id [{0}] on evaluator id [{1}] with message", _id, _evaluatorManager.Id)); - ContextControlProto contextControlProto = new ContextControlProto(); - contextControlProto.stop_task = new StopTaskProto(); - contextControlProto.task_message = message; - _evaluatorManager.Handle(contextControlProto); - } - - public void OnNext(byte[] message) - { - LOGGER.Log(Level.Info, string.Format(CultureInfo.InvariantCulture, "MESSAGE: TaskRuntime id [{0}] on evaluator id [{1}]", _id, _evaluatorManager.Id)); - ContextControlProto contextControlProto = new ContextControlProto(); - contextControlProto.task_message = message; - _evaluatorManager.Handle(contextControlProto); - } - - public void Suspend(byte[] message) - { - LOGGER.Log(Level.Info, string.Format(CultureInfo.InvariantCulture, "SUSPEND: TaskRuntime id [{0}] on evaluator id [{1}] with message", _id, _evaluatorManager.Id)); - ContextControlProto contextControlProto = new ContextControlProto(); - contextControlProto.suspend_task = new SuspendTaskProto(); - contextControlProto.task_message = message; - _evaluatorManager.Handle(contextControlProto); - } - - public void Suspend() - { - LOGGER.Log(Level.Info, string.Format(CultureInfo.InvariantCulture, "SUSPEND: TaskRuntime id [{0}] on evaluator id [{1}]", _id, _evaluatorManager.Id)); - ContextControlProto contextControlProto = new ContextControlProto(); - contextControlProto.suspend_task = new SuspendTaskProto(); - _evaluatorManager.Handle(contextControlProto); - } - - public override string ToString() - { - return "TaskRuntime with taskId = " + _id; - } - - public override int GetHashCode() - { - return _id.GetHashCode(); - } - - public void Send(byte[] message) - { - LOGGER.Log(Level.Info, "RunningTaskImpl.Send() is called"); - } - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Evaluator/Evaluator.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Evaluator/Evaluator.cs b/lang/cs/Org.Apache.REEF.Evaluator/Evaluator.cs index 39ebfc3..2709be0 100644 --- a/lang/cs/Org.Apache.REEF.Evaluator/Evaluator.cs +++ b/lang/cs/Org.Apache.REEF.Evaluator/Evaluator.cs @@ -19,15 +19,11 @@ 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; @@ -43,6 +39,14 @@ using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; +using Org.Apache.REEF.Common.Protobuf.ReefProtocol; +using Org.Apache.REEF.Common.Runtime.Evaluator; +using Org.Apache.REEF.Common.Runtime.Evaluator.Context; +using Org.Apache.REEF.Common.Runtime.Evaluator.Utils; +using Org.Apache.REEF.Common.Services; +using Org.Apache.REEF.Common.Tasks; +using Org.Apache.REEF.Wake.Time.Runtime; +using Constants = Org.Apache.REEF.Common.Runtime.Evaluator.Constants; namespace Org.Apache.REEF.Evaluator { http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Examples/HelloCLRBridge/Handlers/HelloActiveContextHandler.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Examples/HelloCLRBridge/Handlers/HelloActiveContextHandler.cs b/lang/cs/Org.Apache.REEF.Examples/HelloCLRBridge/Handlers/HelloActiveContextHandler.cs index d18ae44..c6c96e5 100644 --- a/lang/cs/Org.Apache.REEF.Examples/HelloCLRBridge/Handlers/HelloActiveContextHandler.cs +++ b/lang/cs/Org.Apache.REEF.Examples/HelloCLRBridge/Handlers/HelloActiveContextHandler.cs @@ -19,7 +19,6 @@ using Org.Apache.REEF.Driver.Context; using Org.Apache.REEF.Driver.Evaluator; -using Org.Apache.REEF.Tasks; using Org.Apache.REEF.Tang.Annotations; using Org.Apache.REEF.Tang.Formats; using Org.Apache.REEF.Tang.Interface; @@ -27,6 +26,7 @@ using Org.Apache.REEF.Tang.Util; using System; using System.Globalization; using Org.Apache.REEF.Examples.Tasks.HelloTask; +using Org.Apache.REEF.Common.Tasks; namespace Org.Apache.REEF.Examples.HelloCLRBridge.Handlers { http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Examples/HelloCLRBridge/Handlers/HelloAllocatedEvaluatorHandler.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Examples/HelloCLRBridge/Handlers/HelloAllocatedEvaluatorHandler.cs b/lang/cs/Org.Apache.REEF.Examples/HelloCLRBridge/Handlers/HelloAllocatedEvaluatorHandler.cs index c07f809..9172b33 100644 --- a/lang/cs/Org.Apache.REEF.Examples/HelloCLRBridge/Handlers/HelloAllocatedEvaluatorHandler.cs +++ b/lang/cs/Org.Apache.REEF.Examples/HelloCLRBridge/Handlers/HelloAllocatedEvaluatorHandler.cs @@ -17,24 +17,24 @@ * under the License. */ -using Org.Apache.REEF.Common.io; +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.Network.Naming; -using Org.Apache.REEF.Services; using Org.Apache.REEF.Tang.Annotations; using Org.Apache.REEF.Tang.Implementations.Configuration; using Org.Apache.REEF.Tang.Implementations.Tang; using Org.Apache.REEF.Tang.Interface; using Org.Apache.REEF.Tang.Util; -using Org.Apache.REEF.Tasks; using Org.Apache.REEF.Utilities; using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Net; +using Org.Apache.REEF.Common.Services; +using Org.Apache.REEF.Common.Tasks; using Org.Apache.REEF.Examples.Tasks.HelloTask; namespace Org.Apache.REEF.Examples.HelloCLRBridge.Handlers http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Examples/HelloCLRBridge/Handlers/HelloRestartHandler.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Examples/HelloCLRBridge/Handlers/HelloRestartHandler.cs b/lang/cs/Org.Apache.REEF.Examples/HelloCLRBridge/Handlers/HelloRestartHandler.cs index 6e72147..a5ad24b 100644 --- a/lang/cs/Org.Apache.REEF.Examples/HelloCLRBridge/Handlers/HelloRestartHandler.cs +++ b/lang/cs/Org.Apache.REEF.Examples/HelloCLRBridge/Handlers/HelloRestartHandler.cs @@ -20,6 +20,7 @@ using Org.Apache.REEF.Tang.Annotations; using Org.Apache.REEF.Wake.Time; using System; +using Org.Apache.REEF.Wake.Time.Event; namespace Org.Apache.REEF.Examples.HelloCLRBridge.Handlers { http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Examples/HelloCLRBridge/Handlers/HelloSimpleEventHandlers.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Examples/HelloCLRBridge/Handlers/HelloSimpleEventHandlers.cs b/lang/cs/Org.Apache.REEF.Examples/HelloCLRBridge/Handlers/HelloSimpleEventHandlers.cs index 1e61c61..bab6898 100644 --- a/lang/cs/Org.Apache.REEF.Examples/HelloCLRBridge/Handlers/HelloSimpleEventHandlers.cs +++ b/lang/cs/Org.Apache.REEF.Examples/HelloCLRBridge/Handlers/HelloSimpleEventHandlers.cs @@ -24,7 +24,8 @@ using System.Linq; using System.Net; using System.Text; using System.Threading.Tasks; -using Org.Apache.REEF.Common.io; +using Org.Apache.REEF.Common.Io; +using Org.Apache.REEF.Common.Tasks; using Org.Apache.REEF.Driver; using Org.Apache.REEF.Driver.Bridge; using Org.Apache.REEF.Driver.Context; @@ -32,12 +33,12 @@ using Org.Apache.REEF.Driver.Evaluator; using Org.Apache.REEF.Driver.Task; using Org.Apache.REEF.Examples.Tasks.HelloTask; using Org.Apache.REEF.Network.Naming; -using Org.Apache.REEF.Tasks; using Org.Apache.REEF.Utilities; using Org.Apache.REEF.Utilities.Logging; using Org.Apache.REEF.Tang.Annotations; using Org.Apache.REEF.Tang.Interface; using Org.Apache.REEF.Tang.Util; +using IRunningTask = Org.Apache.REEF.Driver.Task.IRunningTask; namespace Org.Apache.REEF.Examples.HelloCLRBridge.Handlers { http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Examples/HelloCLRBridge/Handlers/HelloStartHandler.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Examples/HelloCLRBridge/Handlers/HelloStartHandler.cs b/lang/cs/Org.Apache.REEF.Examples/HelloCLRBridge/Handlers/HelloStartHandler.cs index 6234fec..04f0a79 100644 --- a/lang/cs/Org.Apache.REEF.Examples/HelloCLRBridge/Handlers/HelloStartHandler.cs +++ b/lang/cs/Org.Apache.REEF.Examples/HelloCLRBridge/Handlers/HelloStartHandler.cs @@ -18,13 +18,12 @@ */ using System.Collections.Generic; -using Org.Apache.REEF.Common.io; +using Org.Apache.REEF.Common.Io; +using Org.Apache.REEF.Common.Tasks; using Org.Apache.REEF.Driver; -using Org.Apache.REEF.Driver.bridge; using Org.Apache.REEF.Driver.Bridge; using Org.Apache.REEF.Examples.Tasks.HelloTask; 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/7edb8570/lang/cs/Org.Apache.REEF.Examples/RetainedEvalCLRBridge/Handlers/RetainedEvalActiveContextHandler.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Examples/RetainedEvalCLRBridge/Handlers/RetainedEvalActiveContextHandler.cs b/lang/cs/Org.Apache.REEF.Examples/RetainedEvalCLRBridge/Handlers/RetainedEvalActiveContextHandler.cs index 8a6be9d..5961e85 100644 --- a/lang/cs/Org.Apache.REEF.Examples/RetainedEvalCLRBridge/Handlers/RetainedEvalActiveContextHandler.cs +++ b/lang/cs/Org.Apache.REEF.Examples/RetainedEvalCLRBridge/Handlers/RetainedEvalActiveContextHandler.cs @@ -18,12 +18,12 @@ */ using System; +using Org.Apache.REEF.Common.Tasks; using Org.Apache.REEF.Driver.Context; using Org.Apache.REEF.Examples.Tasks.ShellTask; using Org.Apache.REEF.Tang.Implementations.Tang; using Org.Apache.REEF.Tang.Interface; using Org.Apache.REEF.Tang.Util; -using Org.Apache.REEF.Tasks; namespace Org.Apache.REEF.Examples.RetainedEvalCLRBridge.Handlers { http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Examples/RetainedEvalCLRBridge/Handlers/RetainedEvalStartHandler.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Examples/RetainedEvalCLRBridge/Handlers/RetainedEvalStartHandler.cs b/lang/cs/Org.Apache.REEF.Examples/RetainedEvalCLRBridge/Handlers/RetainedEvalStartHandler.cs index f077831..cc2448e 100644 --- a/lang/cs/Org.Apache.REEF.Examples/RetainedEvalCLRBridge/Handlers/RetainedEvalStartHandler.cs +++ b/lang/cs/Org.Apache.REEF.Examples/RetainedEvalCLRBridge/Handlers/RetainedEvalStartHandler.cs @@ -20,13 +20,13 @@ using System; using System.Collections.Generic; using System.Linq; +using Org.Apache.REEF.Common.Tasks; using Org.Apache.REEF.Driver; using Org.Apache.REEF.Driver.Bridge; using Org.Apache.REEF.Driver.Context; using Org.Apache.REEF.Driver.Evaluator; using Org.Apache.REEF.Examples.Tasks.ShellTask; using Org.Apache.REEF.Tang.Annotations; -using Org.Apache.REEF.Tasks; namespace Org.Apache.REEF.Examples.RetainedEvalCLRBridge.Handlers { http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Examples/Tasks/FailedTask/FailedTask.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Examples/Tasks/FailedTask/FailedTask.cs b/lang/cs/Org.Apache.REEF.Examples/Tasks/FailedTask/FailedTask.cs index aa489ce..a9f7707 100644 --- a/lang/cs/Org.Apache.REEF.Examples/Tasks/FailedTask/FailedTask.cs +++ b/lang/cs/Org.Apache.REEF.Examples/Tasks/FailedTask/FailedTask.cs @@ -19,8 +19,8 @@ using System; using System.Threading; +using Org.Apache.REEF.Common.Tasks; using Org.Apache.REEF.Tang.Annotations; -using Org.Apache.REEF.Tasks; namespace Org.Apache.REEF.Examples.Tasks.FailedTask { http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Examples/Tasks/HelloTask/HelloService.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Examples/Tasks/HelloTask/HelloService.cs b/lang/cs/Org.Apache.REEF.Examples/Tasks/HelloTask/HelloService.cs index e7734c1..e12bf40 100644 --- a/lang/cs/Org.Apache.REEF.Examples/Tasks/HelloTask/HelloService.cs +++ b/lang/cs/Org.Apache.REEF.Examples/Tasks/HelloTask/HelloService.cs @@ -19,7 +19,7 @@ using System; using System.Collections.Generic; -using Org.Apache.REEF.Services; +using Org.Apache.REEF.Common.Services; using Org.Apache.REEF.Tang.Annotations; namespace Org.Apache.REEF.Examples.Tasks.HelloTask http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Examples/Tasks/HelloTask/HelloTask.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Examples/Tasks/HelloTask/HelloTask.cs b/lang/cs/Org.Apache.REEF.Examples/Tasks/HelloTask/HelloTask.cs index f832d50..217d22e 100644 --- a/lang/cs/Org.Apache.REEF.Examples/Tasks/HelloTask/HelloTask.cs +++ b/lang/cs/Org.Apache.REEF.Examples/Tasks/HelloTask/HelloTask.cs @@ -21,10 +21,10 @@ using System; using System.Linq; using System.Net; using System.Threading; -using Org.Apache.REEF.Common.io; +using Org.Apache.REEF.Common.Io; +using Org.Apache.REEF.Common.Tasks; +using Org.Apache.REEF.Common.Tasks.Events; using Org.Apache.REEF.Tang.Annotations; -using Org.Apache.REEF.Tasks; -using Org.Apache.REEF.Tasks.Events; using Org.Apache.REEF.Utilities; using Org.Apache.REEF.Utilities.Logging; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Examples/Tasks/HelloTask/HelloTaskMessage.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Examples/Tasks/HelloTask/HelloTaskMessage.cs b/lang/cs/Org.Apache.REEF.Examples/Tasks/HelloTask/HelloTaskMessage.cs index 4814e0e..92ee7e2 100644 --- a/lang/cs/Org.Apache.REEF.Examples/Tasks/HelloTask/HelloTaskMessage.cs +++ b/lang/cs/Org.Apache.REEF.Examples/Tasks/HelloTask/HelloTaskMessage.cs @@ -19,8 +19,8 @@ using System; using System.Globalization; +using Org.Apache.REEF.Common.Tasks; using Org.Apache.REEF.Tang.Annotations; -using Org.Apache.REEF.Tasks; using Org.Apache.REEF.Utilities; namespace Org.Apache.REEF.Examples.Tasks.HelloTask http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Examples/Tasks/ShellTask/ShellTask.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Examples/Tasks/ShellTask/ShellTask.cs b/lang/cs/Org.Apache.REEF.Examples/Tasks/ShellTask/ShellTask.cs index 7bc90d5..45509d4 100644 --- a/lang/cs/Org.Apache.REEF.Examples/Tasks/ShellTask/ShellTask.cs +++ b/lang/cs/Org.Apache.REEF.Examples/Tasks/ShellTask/ShellTask.cs @@ -22,8 +22,8 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Text; +using Org.Apache.REEF.Common.Tasks; using Org.Apache.REEF.Tang.Annotations; -using Org.Apache.REEF.Tasks; using Org.Apache.REEF.Utilities.Diagnostics; using Org.Apache.REEF.Utilities.Logging; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Examples/Tasks/StreamingTasks/StreamTask1.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Examples/Tasks/StreamingTasks/StreamTask1.cs b/lang/cs/Org.Apache.REEF.Examples/Tasks/StreamingTasks/StreamTask1.cs index f35bf91..def85dc 100644 --- a/lang/cs/Org.Apache.REEF.Examples/Tasks/StreamingTasks/StreamTask1.cs +++ b/lang/cs/Org.Apache.REEF.Examples/Tasks/StreamingTasks/StreamTask1.cs @@ -18,8 +18,8 @@ */ using System.Threading; +using Org.Apache.REEF.Common.Tasks; using Org.Apache.REEF.Tang.Annotations; -using Org.Apache.REEF.Tasks; namespace Org.Apache.REEF.Examples.Tasks.StreamingTasks { http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Examples/Tasks/StreamingTasks/StreamTask2.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Examples/Tasks/StreamingTasks/StreamTask2.cs b/lang/cs/Org.Apache.REEF.Examples/Tasks/StreamingTasks/StreamTask2.cs index 16ccfcc..db043d4 100644 --- a/lang/cs/Org.Apache.REEF.Examples/Tasks/StreamingTasks/StreamTask2.cs +++ b/lang/cs/Org.Apache.REEF.Examples/Tasks/StreamingTasks/StreamTask2.cs @@ -17,8 +17,8 @@ * under the License. */ +using Org.Apache.REEF.Common.Tasks; using Org.Apache.REEF.Tang.Annotations; -using Org.Apache.REEF.Tasks; namespace Org.Apache.REEF.Examples.Tasks.StreamingTasks { http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Network/Naming/Codec/NamingLookupResponseCodec.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Naming/Codec/NamingLookupResponseCodec.cs b/lang/cs/Org.Apache.REEF.Network/Naming/Codec/NamingLookupResponseCodec.cs index 0ee44f2..8b44ded 100644 --- a/lang/cs/Org.Apache.REEF.Network/Naming/Codec/NamingLookupResponseCodec.cs +++ b/lang/cs/Org.Apache.REEF.Network/Naming/Codec/NamingLookupResponseCodec.cs @@ -17,7 +17,7 @@ * under the License. */ -using Org.Apache.REEF.Common.io; +using Org.Apache.REEF.Common.Io; using Org.Apache.REEF.Network.Naming.Events; using Org.Apache.REEF.Utilities; using Org.Apache.REEF.Wake.Remote; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Network/Naming/Codec/NamingRegisterRequestCodec.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Naming/Codec/NamingRegisterRequestCodec.cs b/lang/cs/Org.Apache.REEF.Network/Naming/Codec/NamingRegisterRequestCodec.cs index ae07bac..966b884 100644 --- a/lang/cs/Org.Apache.REEF.Network/Naming/Codec/NamingRegisterRequestCodec.cs +++ b/lang/cs/Org.Apache.REEF.Network/Naming/Codec/NamingRegisterRequestCodec.cs @@ -17,7 +17,7 @@ * under the License. */ -using Org.Apache.REEF.Common.io; +using Org.Apache.REEF.Common.Io; using Org.Apache.REEF.Network.Naming.Events; using Org.Apache.REEF.Utilities; using Org.Apache.REEF.Wake.Remote; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Network/Naming/Events/NamingGetAllResponse.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Naming/Events/NamingGetAllResponse.cs b/lang/cs/Org.Apache.REEF.Network/Naming/Events/NamingGetAllResponse.cs index fa89afc..00e7d16 100644 --- a/lang/cs/Org.Apache.REEF.Network/Naming/Events/NamingGetAllResponse.cs +++ b/lang/cs/Org.Apache.REEF.Network/Naming/Events/NamingGetAllResponse.cs @@ -18,7 +18,7 @@ */ using System.Collections.Generic; -using Org.Apache.REEF.Common.io; +using Org.Apache.REEF.Common.Io; namespace Org.Apache.REEF.Network.Naming.Events { http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Network/Naming/Events/NamingLookupResponse.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Naming/Events/NamingLookupResponse.cs b/lang/cs/Org.Apache.REEF.Network/Naming/Events/NamingLookupResponse.cs index 8f9a05b..236ef58 100644 --- a/lang/cs/Org.Apache.REEF.Network/Naming/Events/NamingLookupResponse.cs +++ b/lang/cs/Org.Apache.REEF.Network/Naming/Events/NamingLookupResponse.cs @@ -19,7 +19,7 @@ using System.Collections.Generic; using Microsoft.Hadoop.Avro; -using Org.Apache.REEF.Common.io; +using Org.Apache.REEF.Common.Io; namespace Org.Apache.REEF.Network.Naming.Events { http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Network/Naming/Events/NamingRegisterRequest.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Naming/Events/NamingRegisterRequest.cs b/lang/cs/Org.Apache.REEF.Network/Naming/Events/NamingRegisterRequest.cs index 49cbeb6..248265c 100644 --- a/lang/cs/Org.Apache.REEF.Network/Naming/Events/NamingRegisterRequest.cs +++ b/lang/cs/Org.Apache.REEF.Network/Naming/Events/NamingRegisterRequest.cs @@ -17,7 +17,7 @@ * under the License. */ -using Org.Apache.REEF.Common.io; +using Org.Apache.REEF.Common.Io; namespace Org.Apache.REEF.Network.Naming.Events { http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Network/Naming/INameServer.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Naming/INameServer.cs b/lang/cs/Org.Apache.REEF.Network/Naming/INameServer.cs index c27abe6..984e919 100644 --- a/lang/cs/Org.Apache.REEF.Network/Naming/INameServer.cs +++ b/lang/cs/Org.Apache.REEF.Network/Naming/INameServer.cs @@ -20,7 +20,7 @@ using System; using System.Collections.Generic; using System.Net; -using Org.Apache.REEF.Common.io; +using Org.Apache.REEF.Common.Io; using Org.Apache.REEF.Network.Naming.Events; using Org.Apache.REEF.Tang.Annotations; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Network/Naming/NameClient.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Naming/NameClient.cs b/lang/cs/Org.Apache.REEF.Network/Naming/NameClient.cs index 9b69cec..9e0acac 100644 --- a/lang/cs/Org.Apache.REEF.Network/Naming/NameClient.cs +++ b/lang/cs/Org.Apache.REEF.Network/Naming/NameClient.cs @@ -17,7 +17,7 @@ * under the License. */ -using Org.Apache.REEF.Common.io; +using Org.Apache.REEF.Common.Io; using Org.Apache.REEF.Network.Naming.Codec; using Org.Apache.REEF.Network.Naming.Events; using Org.Apache.REEF.Utilities.Diagnostics; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Network/Naming/NameLookupClient.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Naming/NameLookupClient.cs b/lang/cs/Org.Apache.REEF.Network/Naming/NameLookupClient.cs index b8c4018..7ca29c5 100644 --- a/lang/cs/Org.Apache.REEF.Network/Naming/NameLookupClient.cs +++ b/lang/cs/Org.Apache.REEF.Network/Naming/NameLookupClient.cs @@ -22,7 +22,7 @@ using System.Collections.Generic; using System.Linq; using System.Net; using System.Threading; -using Org.Apache.REEF.Common.io; +using Org.Apache.REEF.Common.Io; using Org.Apache.REEF.Network.Naming.Events; using Org.Apache.REEF.Wake.Remote.Impl; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Network/Naming/NameRegisterClient.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Naming/NameRegisterClient.cs b/lang/cs/Org.Apache.REEF.Network/Naming/NameRegisterClient.cs index a18cb31..2709819 100644 --- a/lang/cs/Org.Apache.REEF.Network/Naming/NameRegisterClient.cs +++ b/lang/cs/Org.Apache.REEF.Network/Naming/NameRegisterClient.cs @@ -19,7 +19,7 @@ using System.Collections.Concurrent; using System.Net; -using Org.Apache.REEF.Common.io; +using Org.Apache.REEF.Common.Io; using Org.Apache.REEF.Network.Naming.Events; using Org.Apache.REEF.Wake.Remote.Impl; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Network/Naming/NameServer.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Naming/NameServer.cs b/lang/cs/Org.Apache.REEF.Network/Naming/NameServer.cs index 26207e0..c42de7e 100644 --- a/lang/cs/Org.Apache.REEF.Network/Naming/NameServer.cs +++ b/lang/cs/Org.Apache.REEF.Network/Naming/NameServer.cs @@ -17,7 +17,7 @@ * under the License. */ -using Org.Apache.REEF.Common.io; +using Org.Apache.REEF.Common.Io; using Org.Apache.REEF.Network.Naming.Codec; using Org.Apache.REEF.Network.Naming.Events; using Org.Apache.REEF.Network.Naming.Observers; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Network/Naming/NamingConfiguration.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Naming/NamingConfiguration.cs b/lang/cs/Org.Apache.REEF.Network/Naming/NamingConfiguration.cs deleted file mode 100644 index 3daac70..0000000 --- a/lang/cs/Org.Apache.REEF.Network/Naming/NamingConfiguration.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; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Org.Apache.REEF.Tang.Formats; -using Org.Apache.REEF.Tang.Util; - -namespace Org.Apache.REEF.Naming -{ - public class NamingConfiguration : ConfigurationModuleBuilder - { - [SuppressMessage("Microsoft.Security", "CA2104:Do not declare read only mutable reference types", Justification = "not applicable")] - public static readonly RequiredParameter<string> NameServerAddress = new RequiredParameter<string>(); - - [SuppressMessage("Microsoft.Security", "CA2104:Do not declare read only mutable reference types", Justification = "not applicable")] - public static readonly RequiredParameter<int> NameServerPort = new RequiredParameter<int>(); - - public static ConfigurationModule ConfigurationModule - { - get - { - return new NamingConfiguration() - .BindNamedParameter(GenericType<NamingConfigurationOptions.NameServerAddress>.Class, NameServerAddress) - .BindNamedParameter(GenericType<NamingConfigurationOptions.NameServerPort>.Class, NameServerPort) - .Build(); - } - } - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Network/Naming/NamingConfigurationOptions.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Naming/NamingConfigurationOptions.cs b/lang/cs/Org.Apache.REEF.Network/Naming/NamingConfigurationOptions.cs deleted file mode 100644 index aa9b6e6..0000000 --- a/lang/cs/Org.Apache.REEF.Network/Naming/NamingConfigurationOptions.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 System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Org.Apache.REEF.Tang.Annotations; - -namespace Org.Apache.REEF.Naming -{ - public class NamingConfigurationOptions - { - [NamedParameter("IP address of NameServer")] - public class NameServerAddress : Name<string> - { - } - - [NamedParameter("Port of NameServer")] - public class NameServerPort : Name<int> - { - } - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Network/Naming/Observers/NamingGetAllRequestObserver.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Naming/Observers/NamingGetAllRequestObserver.cs b/lang/cs/Org.Apache.REEF.Network/Naming/Observers/NamingGetAllRequestObserver.cs index df3a4a9..dfc8db0 100644 --- a/lang/cs/Org.Apache.REEF.Network/Naming/Observers/NamingGetAllRequestObserver.cs +++ b/lang/cs/Org.Apache.REEF.Network/Naming/Observers/NamingGetAllRequestObserver.cs @@ -18,7 +18,7 @@ */ using System.Collections.Generic; -using Org.Apache.REEF.Common.io; +using Org.Apache.REEF.Common.Io; using Org.Apache.REEF.Network.Naming.Events; using Org.Apache.REEF.Wake.RX; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Network/Naming/Observers/NamingLookupRequestObserver.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Naming/Observers/NamingLookupRequestObserver.cs b/lang/cs/Org.Apache.REEF.Network/Naming/Observers/NamingLookupRequestObserver.cs index 21c602d..c31db7f 100644 --- a/lang/cs/Org.Apache.REEF.Network/Naming/Observers/NamingLookupRequestObserver.cs +++ b/lang/cs/Org.Apache.REEF.Network/Naming/Observers/NamingLookupRequestObserver.cs @@ -17,7 +17,7 @@ * under the License. */ -using Org.Apache.REEF.Common.io; +using Org.Apache.REEF.Common.Io; using Org.Apache.REEF.Network.Naming.Events; using Org.Apache.REEF.Wake.RX; using System.Collections.Generic; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Network/Naming/Observers/NamingRegisterRequestObserver.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Naming/Observers/NamingRegisterRequestObserver.cs b/lang/cs/Org.Apache.REEF.Network/Naming/Observers/NamingRegisterRequestObserver.cs index 8ab8f6c..5add16b 100644 --- a/lang/cs/Org.Apache.REEF.Network/Naming/Observers/NamingRegisterRequestObserver.cs +++ b/lang/cs/Org.Apache.REEF.Network/Naming/Observers/NamingRegisterRequestObserver.cs @@ -17,7 +17,7 @@ * under the License. */ -using Org.Apache.REEF.Common.io; +using Org.Apache.REEF.Common.Io; using Org.Apache.REEF.Network.Naming.Events; using Org.Apache.REEF.Wake.RX; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Network/NetworkService/INetworkService.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/NetworkService/INetworkService.cs b/lang/cs/Org.Apache.REEF.Network/NetworkService/INetworkService.cs index a4b845a..b34f94c 100644 --- a/lang/cs/Org.Apache.REEF.Network/NetworkService/INetworkService.cs +++ b/lang/cs/Org.Apache.REEF.Network/NetworkService/INetworkService.cs @@ -18,8 +18,8 @@ */ using System; -using Org.Apache.REEF.Common.io; -using Org.Apache.REEF.Services; +using Org.Apache.REEF.Common.Io; +using Org.Apache.REEF.Common.Services; using Org.Apache.REEF.Tang.Annotations; using Org.Apache.REEF.Wake; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Network/NetworkService/NetworkService.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/NetworkService/NetworkService.cs b/lang/cs/Org.Apache.REEF.Network/NetworkService/NetworkService.cs index 57eae81..aa365c5 100644 --- a/lang/cs/Org.Apache.REEF.Network/NetworkService/NetworkService.cs +++ b/lang/cs/Org.Apache.REEF.Network/NetworkService/NetworkService.cs @@ -22,7 +22,7 @@ using System.Collections.Generic; using System.Linq; using System.Net; using System.Reactive; -using Org.Apache.REEF.Common.io; +using Org.Apache.REEF.Common.Io; using Org.Apache.REEF.Network.Naming; using Org.Apache.REEF.Network.NetworkService.Codec; using Org.Apache.REEF.Utilities.Logging; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Network/NetworkService/NetworkServiceConfiguration.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/NetworkService/NetworkServiceConfiguration.cs b/lang/cs/Org.Apache.REEF.Network/NetworkService/NetworkServiceConfiguration.cs index 003260c..9c26913 100644 --- a/lang/cs/Org.Apache.REEF.Network/NetworkService/NetworkServiceConfiguration.cs +++ b/lang/cs/Org.Apache.REEF.Network/NetworkService/NetworkServiceConfiguration.cs @@ -23,7 +23,7 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Text; using System.Threading.Tasks; -using Org.Apache.REEF.Common.io; +using Org.Apache.REEF.Common.Io; using Org.Apache.REEF.Network.Naming; using Org.Apache.REEF.Tang.Formats; using Org.Apache.REEF.Tang.Util; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Network/NetworkService/NsConnection.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/NetworkService/NsConnection.cs b/lang/cs/Org.Apache.REEF.Network/NetworkService/NsConnection.cs index 5465faa..bbf27d7 100644 --- a/lang/cs/Org.Apache.REEF.Network/NetworkService/NsConnection.cs +++ b/lang/cs/Org.Apache.REEF.Network/NetworkService/NsConnection.cs @@ -25,7 +25,7 @@ using System.IO; using System.Net; using System.Net.Sockets; using System.Runtime.Remoting; -using Org.Apache.REEF.Common.io; +using Org.Apache.REEF.Common.Io; using Org.Apache.REEF.Utilities.Logging; using Org.Apache.REEF.Tang.Exceptions; using Org.Apache.REEF.Wake; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Network/Org.Apache.REEF.Network.csproj ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Org.Apache.REEF.Network.csproj b/lang/cs/Org.Apache.REEF.Network/Org.Apache.REEF.Network.csproj index 6797c1d..b759c24 100644 --- a/lang/cs/Org.Apache.REEF.Network/Org.Apache.REEF.Network.csproj +++ b/lang/cs/Org.Apache.REEF.Network/Org.Apache.REEF.Network.csproj @@ -119,12 +119,6 @@ under the License. <Compile Include="Naming\NameLookupClient.cs" /> <Compile Include="Naming\NameRegisterClient.cs" /> <Compile Include="Naming\NameServer.cs" /> - <Compile Include="Naming\NamingConfiguration.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="Naming\NamingConfigurationOptions.cs"> - <SubType>Code</SubType> - </Compile> <Compile Include="Naming\Observers\NamingGetAllRequestObserver.cs" /> <Compile Include="Naming\Observers\NamingLookupRequestObserver.cs" /> <Compile Include="Naming\Observers\NamingRegisterRequestObserver.cs" /> http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Network/Utilities/Utils.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Utilities/Utils.cs b/lang/cs/Org.Apache.REEF.Network/Utilities/Utils.cs index bc02b89..cfa61b0 100644 --- a/lang/cs/Org.Apache.REEF.Network/Utilities/Utils.cs +++ b/lang/cs/Org.Apache.REEF.Network/Utilities/Utils.cs @@ -19,8 +19,8 @@ using System.IO; using Microsoft.Hadoop.Avro; +using Org.Apache.REEF.Common.Tasks; using Org.Apache.REEF.Driver.Context; -using Org.Apache.REEF.Tasks; using Org.Apache.REEF.Utilities.Logging; using Org.Apache.REEF.Tang.Exceptions; using Org.Apache.REEF.Tang.Interface; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestClassHierarchy.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestClassHierarchy.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestClassHierarchy.cs index 1c5a505..a71b973 100644 --- a/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestClassHierarchy.cs +++ b/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestClassHierarchy.cs @@ -28,6 +28,7 @@ using Org.Apache.REEF.Tang.Types; using Org.Apache.REEF.Tang.Util; using System; using System.Collections.Generic; +using Org.Apache.REEF.Common.Tasks; using Org.Apache.REEF.Examples.Tasks.HelloTask; namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy @@ -410,15 +411,15 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy [TestMethod] public void TestITackNode() { - var node = ns.GetNode(typeof(Org.Apache.REEF.Tasks.ITask).AssemblyQualifiedName); - Assert.AreEqual(node.GetFullName(), ReflectionUtilities.GetAssemblyQualifiedName(typeof(Org.Apache.REEF.Tasks.ITask))); + var node = ns.GetNode(typeof(ITask).AssemblyQualifiedName); + Assert.AreEqual(node.GetFullName(), ReflectionUtilities.GetAssemblyQualifiedName(typeof(ITask))); } [TestMethod] public void TestNamedParameterIdentifier() { - var node = ns.GetNode(typeof(Org.Apache.REEF.Tasks.TaskConfigurationOptions.Identifier).AssemblyQualifiedName); - Assert.AreEqual(node.GetFullName(), ReflectionUtilities.GetAssemblyQualifiedName(typeof(Org.Apache.REEF.Tasks.TaskConfigurationOptions.Identifier))); + var node = ns.GetNode(typeof(TaskConfigurationOptions.Identifier).AssemblyQualifiedName); + Assert.AreEqual(node.GetFullName(), ReflectionUtilities.GetAssemblyQualifiedName(typeof(TaskConfigurationOptions.Identifier))); } [TestMethod] public void TestInterface() http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestSerilization.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestSerilization.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestSerilization.cs index 1ae038f..15e6beb 100644 --- a/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestSerilization.cs +++ b/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestSerilization.cs @@ -19,13 +19,13 @@ using System; using System.Collections.Generic; using System.Reflection; -using Org.Apache.REEF.Tasks; -using Org.Apache.REEF.Tang.Implementations; + using Org.Apache.REEF.Tang.Implementations; using Org.Apache.REEF.Tang.Interface; using Org.Apache.REEF.Tang.Protobuf; using Org.Apache.REEF.Tang.Types; using Org.Apache.REEF.Tang.Util; using Microsoft.VisualStudio.TestTools.UnitTesting; + using Org.Apache.REEF.Common.Tasks; using Org.Apache.REEF.Examples.Tasks.HelloTask; using Org.Apache.REEF.Examples.Tasks.StreamingTasks; using Org.Apache.REEF.Tang.Examples; @@ -176,7 +176,7 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy cb.BindNamedParameter<Timer.Seconds, Int32>(GenericType < Timer.Seconds>.Class, "2"); IConfiguration conf = cb.Build(); IInjector injector = tang.NewInjector(conf); - InjectionPlan ip = injector.GetInjectionPlan(timerType); + Org.Apache.REEF.Tang.Implementations.InjectionPlan.InjectionPlan ip = injector.GetInjectionPlan(timerType); ProtocolBufferInjectionPlan.Serialize("timerplan.bin", ip); var ch = conf.GetClassHierarchy(); var ip1 = ProtocolBufferInjectionPlan.DeSerialize("timerplan.bin", ch); @@ -192,7 +192,7 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy ICsConfigurationBuilder cb = tang.NewConfigurationBuilder(new string[] { FileNames.Examples }); IConfiguration conf = cb.Build(); IInjector injector = tang.NewInjector(conf); - InjectionPlan ip = injector.GetInjectionPlan(simpleConstructorType); + Org.Apache.REEF.Tang.Implementations.InjectionPlan.InjectionPlan ip = injector.GetInjectionPlan(simpleConstructorType); ProtocolBufferInjectionPlan.Serialize("plan.bin", ip); var ch = conf.GetClassHierarchy(); http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestAvroConfiguration.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestAvroConfiguration.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestAvroConfiguration.cs index 630eef0..00900af 100644 --- a/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestAvroConfiguration.cs +++ b/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestAvroConfiguration.cs @@ -18,13 +18,14 @@ */ using System.Collections.Generic; -using Org.Apache.REEF.Tasks; using Org.Apache.REEF.Tang.Formats; using Org.Apache.REEF.Tang.Implementations; using Org.Apache.REEF.Tang.Interface; using Org.Apache.REEF.Tang.Util; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Org.Apache.REEF.Common.Tasks; using Org.Apache.REEF.Examples.Tasks.HelloTask; +using Org.Apache.REEF.Tang.Formats.AvroConfigurationDataContract; using Org.Apache.REEF.Tang.Implementations.Tang; namespace Org.Apache.REEF.Tang.Tests.Configuration http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestAvroSerializerRoundTrip.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestAvroSerializerRoundTrip.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestAvroSerializerRoundTrip.cs index 4551a52..64547d7 100644 --- a/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestAvroSerializerRoundTrip.cs +++ b/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestAvroSerializerRoundTrip.cs @@ -21,6 +21,7 @@ using Org.Apache.REEF.Tang.Formats; using Org.Apache.REEF.Tang.Interface; using Org.Apache.REEF.Tang.Tests.SmokeTest; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Org.Apache.REEF.Tang.Formats.AvroConfigurationDataContract; namespace Org.Apache.REEF.Tang.Tests.Configuration { http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestConfiguration.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestConfiguration.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestConfiguration.cs index 28e244f..6517e2a 100644 --- a/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestConfiguration.cs +++ b/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestConfiguration.cs @@ -19,8 +19,7 @@ using System; using System.Collections.Generic; using System.Reflection; -using Org.Apache.REEF.Tasks; -using Org.Apache.REEF.Tang.Annotations; + using Org.Apache.REEF.Tang.Annotations; using Org.Apache.REEF.Tang.Examples; using Org.Apache.REEF.Tang.Exceptions; using Org.Apache.REEF.Tang.Formats; @@ -31,7 +30,9 @@ using Org.Apache.REEF.Tang.Protobuf; using Org.Apache.REEF.Tang.Util; using Org.Apache.REEF.Tang.Tests.ScenarioTest; using Microsoft.VisualStudio.TestTools.UnitTesting; + using Org.Apache.REEF.Common.Tasks; using Org.Apache.REEF.Examples.Tasks.HelloTask; + using Org.Apache.REEF.Tang.Formats.AvroConfigurationDataContract; using Org.Apache.REEF.Tang.Implementations.ClassHierarchy; using Org.Apache.REEF.Tang.Implementations.Tang; @@ -153,7 +154,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration [TestMethod] public void TestGetConfgiFromProtoBufClassHierarchy() { - Type iTaskType = typeof(Org.Apache.REEF.Tasks.ITask); + Type iTaskType = typeof(ITask); Type helloTaskType = typeof(HelloTask); Type identifierType = typeof (TaskConfigurationOptions.Identifier); http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Tang.Tests/Format/TestTaskConfiguration.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/Format/TestTaskConfiguration.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/Format/TestTaskConfiguration.cs index 7384fde..ee50e20 100644 --- a/lang/cs/Org.Apache.REEF.Tang.Tests/Format/TestTaskConfiguration.cs +++ b/lang/cs/Org.Apache.REEF.Tang.Tests/Format/TestTaskConfiguration.cs @@ -19,13 +19,13 @@ using System; using System.Collections.Generic; -using Org.Apache.REEF.Tasks; using Org.Apache.REEF.Tang.Annotations; using Org.Apache.REEF.Tang.Formats; using Org.Apache.REEF.Tang.Implementations; using Org.Apache.REEF.Tang.Interface; using Org.Apache.REEF.Tang.Util; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Org.Apache.REEF.Common.Tasks; using Org.Apache.REEF.Examples.Tasks.HelloTask; using Org.Apache.REEF.Tang.Implementations.Tang; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestInjection.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestInjection.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestInjection.cs index 40b9a96..bb57ad1 100644 --- a/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestInjection.cs +++ b/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestInjection.cs @@ -25,9 +25,9 @@ using Org.Apache.REEF.Tang.Implementations.ClassHierarchy; using Org.Apache.REEF.Tang.Implementations.Tang; using Org.Apache.REEF.Tang.Interface; using Org.Apache.REEF.Tang.Util; -using Org.Apache.REEF.Tasks; using System; using System.Reflection; +using Org.Apache.REEF.Common.Tasks; using Org.Apache.REEF.Examples.Tasks.HelloTask; using Org.Apache.REEF.Examples.Tasks.StreamingTasks; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestListInjection.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestListInjection.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestListInjection.cs index 2af4b1b..aa37c72 100644 --- a/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestListInjection.cs +++ b/lang/cs/Org.Apache.REEF.Tang.Tests/Injection/TestListInjection.cs @@ -19,12 +19,7 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using ClassHierarchyProto; using Org.Apache.REEF.Tang.Annotations; -using Org.Apache.REEF.Tang.Implementations; using Org.Apache.REEF.Tang.Interface; using Org.Apache.REEF.Tang.Types; using Org.Apache.REEF.Tang.Util; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Tang.Tools/Program.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tang.Tools/Program.cs b/lang/cs/Org.Apache.REEF.Tang.Tools/Program.cs index 1fec395..c340b1f 100644 --- a/lang/cs/Org.Apache.REEF.Tang.Tools/Program.cs +++ b/lang/cs/Org.Apache.REEF.Tang.Tools/Program.cs @@ -17,7 +17,6 @@ * under the License. */ -using Org.Apache.REEF.Tasks; using Org.Apache.REEF.Tang.Implementations; using Org.Apache.REEF.Tang.Interface; using Org.Apache.REEF.Tang.Protobuf; @@ -26,6 +25,7 @@ using System; using System.Collections.Generic; using System.Globalization; using System.IO; +using Org.Apache.REEF.Common.Tasks; using Org.Apache.REEF.Examples.Tasks.HelloTask; using Org.Apache.REEF.Examples.Tasks.ShellTask; using Org.Apache.REEF.Examples.Tasks.StreamingTasks; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Tang/Formats/AvroConfigurationDataContract/AvroConfiguration.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tang/Formats/AvroConfigurationDataContract/AvroConfiguration.cs b/lang/cs/Org.Apache.REEF.Tang/Formats/AvroConfigurationDataContract/AvroConfiguration.cs index 9bf473c..7c8dc0a 100644 --- a/lang/cs/Org.Apache.REEF.Tang/Formats/AvroConfigurationDataContract/AvroConfiguration.cs +++ b/lang/cs/Org.Apache.REEF.Tang/Formats/AvroConfigurationDataContract/AvroConfiguration.cs @@ -21,7 +21,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace Org.Apache.REEF.Tang.Formats +namespace Org.Apache.REEF.Tang.Formats.AvroConfigurationDataContract { [KnownType(typeof(HashSet<ConfigurationEntry>))] [DataContract(Name = "AvroConfiguration", Namespace = "org.apache.reef.tang.formats.avro")] http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Tang/Formats/AvroConfigurationDataContract/ConfigurationEntry.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tang/Formats/AvroConfigurationDataContract/ConfigurationEntry.cs b/lang/cs/Org.Apache.REEF.Tang/Formats/AvroConfigurationDataContract/ConfigurationEntry.cs index de111e9..e8f72d0 100644 --- a/lang/cs/Org.Apache.REEF.Tang/Formats/AvroConfigurationDataContract/ConfigurationEntry.cs +++ b/lang/cs/Org.Apache.REEF.Tang/Formats/AvroConfigurationDataContract/ConfigurationEntry.cs @@ -19,7 +19,7 @@ using System.Runtime.Serialization; -namespace Org.Apache.REEF.Tang.Formats +namespace Org.Apache.REEF.Tang.Formats.AvroConfigurationDataContract { [DataContract(Name = "ConfigurationEntry", Namespace = "org.apache.reef.tang.formats.avro")] [KnownType(typeof(string))] http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Tang/Formats/AvroConfigurationSerializer.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tang/Formats/AvroConfigurationSerializer.cs b/lang/cs/Org.Apache.REEF.Tang/Formats/AvroConfigurationSerializer.cs index 19822e1..cbb8a29 100644 --- a/lang/cs/Org.Apache.REEF.Tang/Formats/AvroConfigurationSerializer.cs +++ b/lang/cs/Org.Apache.REEF.Tang/Formats/AvroConfigurationSerializer.cs @@ -33,6 +33,7 @@ using Org.Apache.REEF.Tang.Implementations; using Org.Apache.REEF.Tang.Interface; using Org.Apache.REEF.Tang.Types; using Newtonsoft.Json; +using Org.Apache.REEF.Tang.Formats.AvroConfigurationDataContract; using Org.Apache.REEF.Tang.Implementations.Configuration; using Org.Apache.REEF.Tang.Implementations.Tang; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Tang/Protobuf/ProtocolBufferClassHierarchy.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tang/Protobuf/ProtocolBufferClassHierarchy.cs b/lang/cs/Org.Apache.REEF.Tang/Protobuf/ProtocolBufferClassHierarchy.cs index 14a77cf..e47fac7 100644 --- a/lang/cs/Org.Apache.REEF.Tang/Protobuf/ProtocolBufferClassHierarchy.cs +++ b/lang/cs/Org.Apache.REEF.Tang/Protobuf/ProtocolBufferClassHierarchy.cs @@ -41,22 +41,22 @@ namespace Org.Apache.REEF.Tang.Protobuf public static void Serialize(string fileName, IClassHierarchy classHierarchy) { - ClassHierarchyProto.Node node = Serialize(classHierarchy); + Org.Apache.REEF.Tang.Protobuf.Node node = Serialize(classHierarchy); using (var file = File.Create(fileName)) { - Serializer.Serialize<ClassHierarchyProto.Node>(file, node); + Serializer.Serialize<Org.Apache.REEF.Tang.Protobuf.Node>(file, node); } } - public static ClassHierarchyProto.Node Serialize(IClassHierarchy classHierarchy) + public static Org.Apache.REEF.Tang.Protobuf.Node Serialize(IClassHierarchy classHierarchy) { return SerializeNode(classHierarchy.GetNamespace()); } - private static ClassHierarchyProto.Node SerializeNode(INode n) + private static Org.Apache.REEF.Tang.Protobuf.Node SerializeNode(INode n) { - IList<ClassHierarchyProto.Node> children = new List<ClassHierarchyProto.Node>(); + IList<Org.Apache.REEF.Tang.Protobuf.Node> children = new List<Org.Apache.REEF.Tang.Protobuf.Node>(); foreach (INode child in n.GetChildren()) { @@ -75,13 +75,13 @@ namespace Org.Apache.REEF.Tang.Protobuf others.Remove(c); } - IList<ClassHierarchyProto.ConstructorDef> injectableConstructors = new List<ClassHierarchyProto.ConstructorDef>(); + IList<Org.Apache.REEF.Tang.Protobuf.ConstructorDef> injectableConstructors = new List<Org.Apache.REEF.Tang.Protobuf.ConstructorDef>(); foreach (IConstructorDef inj in injectable) { injectableConstructors.Add(SerializeConstructorDef(inj)); } - IList<ClassHierarchyProto.ConstructorDef> otherConstructors = new List<ClassHierarchyProto.ConstructorDef>(); + IList<Org.Apache.REEF.Tang.Protobuf.ConstructorDef> otherConstructors = new List<Org.Apache.REEF.Tang.Protobuf.ConstructorDef>(); foreach (IConstructorDef other in others) { otherConstructors.Add(SerializeConstructorDef(other)); @@ -112,9 +112,9 @@ namespace Org.Apache.REEF.Tang.Protobuf return null; } - private static ClassHierarchyProto.ConstructorDef SerializeConstructorDef(IConstructorDef def) + private static Org.Apache.REEF.Tang.Protobuf.ConstructorDef SerializeConstructorDef(IConstructorDef def) { - IList<ClassHierarchyProto.ConstructorArg> args = new List<ClassHierarchyProto.ConstructorArg>(); + IList<Org.Apache.REEF.Tang.Protobuf.ConstructorArg> args = new List<Org.Apache.REEF.Tang.Protobuf.ConstructorArg>(); foreach (IConstructorArg arg in def.GetArgs()) { args.Add(NewConstructorArg(arg.Gettype(), arg.GetNamedParameterName(), arg.IsInjectionFuture())); @@ -122,22 +122,22 @@ namespace Org.Apache.REEF.Tang.Protobuf return newConstructorDef(def.GetClassName(), args); } - private static ClassHierarchyProto.ConstructorArg NewConstructorArg( + private static Org.Apache.REEF.Tang.Protobuf.ConstructorArg NewConstructorArg( string fullArgClassName, string namedParameterName, bool isFuture) { - ClassHierarchyProto.ConstructorArg constArg = new ClassHierarchyProto.ConstructorArg(); + Org.Apache.REEF.Tang.Protobuf.ConstructorArg constArg = new Org.Apache.REEF.Tang.Protobuf.ConstructorArg(); constArg.full_arg_class_name = fullArgClassName; constArg.named_parameter_name = namedParameterName; constArg.is_injection_future = isFuture; return constArg; } - private static ClassHierarchyProto.ConstructorDef newConstructorDef( - String fullClassName, IList<ClassHierarchyProto.ConstructorArg> args) + private static Org.Apache.REEF.Tang.Protobuf.ConstructorDef newConstructorDef( + String fullClassName, IList<Org.Apache.REEF.Tang.Protobuf.ConstructorArg> args) { - ClassHierarchyProto.ConstructorDef constDef = new ClassHierarchyProto.ConstructorDef(); + Org.Apache.REEF.Tang.Protobuf.ConstructorDef constDef = new Org.Apache.REEF.Tang.Protobuf.ConstructorDef(); constDef.full_class_name = fullClassName; - foreach (ClassHierarchyProto.ConstructorArg arg in args) + foreach (Org.Apache.REEF.Tang.Protobuf.ConstructorArg arg in args) { constDef.args.Add(arg); } @@ -145,14 +145,14 @@ namespace Org.Apache.REEF.Tang.Protobuf return constDef; } - private static ClassHierarchyProto.Node NewClassNode(String name, + private static Org.Apache.REEF.Tang.Protobuf.Node NewClassNode(String name, String fullName, bool isInjectionCandidate, bool isExternalConstructor, bool isUnit, - IList<ClassHierarchyProto.ConstructorDef> injectableConstructors, - IList<ClassHierarchyProto.ConstructorDef> otherConstructors, - IList<String> implFullNames, IList<ClassHierarchyProto.Node> children) + IList<Org.Apache.REEF.Tang.Protobuf.ConstructorDef> injectableConstructors, + IList<Org.Apache.REEF.Tang.Protobuf.ConstructorDef> otherConstructors, + IList<String> implFullNames, IList<Org.Apache.REEF.Tang.Protobuf.Node> children) { - ClassHierarchyProto.ClassNode classNode = new ClassHierarchyProto.ClassNode(); + Org.Apache.REEF.Tang.Protobuf.ClassNode classNode = new Org.Apache.REEF.Tang.Protobuf.ClassNode(); classNode.is_injection_candidate = isInjectionCandidate; foreach (var ic in injectableConstructors) { @@ -168,7 +168,7 @@ namespace Org.Apache.REEF.Tang.Protobuf classNode.impl_full_names.Add(implFullName); } - ClassHierarchyProto.Node n = new ClassHierarchyProto.Node(); + Org.Apache.REEF.Tang.Protobuf.Node n = new Org.Apache.REEF.Tang.Protobuf.Node(); n.name = name; n.full_name = fullName; n.class_node = classNode; @@ -181,14 +181,14 @@ namespace Org.Apache.REEF.Tang.Protobuf return n; } - private static ClassHierarchyProto.Node NewNamedParameterNode(string name, + private static Org.Apache.REEF.Tang.Protobuf.Node NewNamedParameterNode(string name, string fullName, string simpleArgClassName, string fullArgClassName, bool isSet, bool isList, string documentation, // can be null string shortName, // can be null string[] instanceDefault, // can be null - IList<ClassHierarchyProto.Node> children) + IList<Org.Apache.REEF.Tang.Protobuf.Node> children) { - ClassHierarchyProto.NamedParameterNode namedParameterNode = new ClassHierarchyProto.NamedParameterNode(); + Org.Apache.REEF.Tang.Protobuf.NamedParameterNode namedParameterNode = new Org.Apache.REEF.Tang.Protobuf.NamedParameterNode(); namedParameterNode.simple_arg_class_name = simpleArgClassName; namedParameterNode.full_arg_class_name = fullArgClassName; namedParameterNode.is_set = isSet; @@ -209,7 +209,7 @@ namespace Org.Apache.REEF.Tang.Protobuf namedParameterNode.instance_default.Add(id); } - ClassHierarchyProto.Node n = new ClassHierarchyProto.Node(); + Org.Apache.REEF.Tang.Protobuf.Node n = new Org.Apache.REEF.Tang.Protobuf.Node(); n.name = name; n.full_name = fullName; n.named_parameter_node = namedParameterNode; @@ -222,11 +222,11 @@ namespace Org.Apache.REEF.Tang.Protobuf return n; } - private static ClassHierarchyProto.Node NewPackageNode(string name, - string fullName, IList<ClassHierarchyProto.Node> children) + private static Org.Apache.REEF.Tang.Protobuf.Node NewPackageNode(string name, + string fullName, IList<Org.Apache.REEF.Tang.Protobuf.Node> children) { - ClassHierarchyProto.PackageNode packageNode = new ClassHierarchyProto.PackageNode(); - ClassHierarchyProto.Node n = new ClassHierarchyProto.Node(); + Org.Apache.REEF.Tang.Protobuf.PackageNode packageNode = new Org.Apache.REEF.Tang.Protobuf.PackageNode(); + Org.Apache.REEF.Tang.Protobuf.Node n = new Org.Apache.REEF.Tang.Protobuf.Node(); n.name = name; n.full_name = fullName; n.package_node = packageNode; @@ -241,11 +241,11 @@ namespace Org.Apache.REEF.Tang.Protobuf public static IClassHierarchy DeSerialize(string fileName) { - ClassHierarchyProto.Node root; + Org.Apache.REEF.Tang.Protobuf.Node root; using (var file = File.OpenRead(fileName)) { - root = Serializer.Deserialize<ClassHierarchyProto.Node>(file); + root = Serializer.Deserialize<Org.Apache.REEF.Tang.Protobuf.Node>(file); } return new ProtocolBufferClassHierarchy(root); @@ -256,7 +256,7 @@ namespace Org.Apache.REEF.Tang.Protobuf this.rootNode = new PackageNodeImpl(); } - public ProtocolBufferClassHierarchy(ClassHierarchyProto.Node root) + public ProtocolBufferClassHierarchy(Org.Apache.REEF.Tang.Protobuf.Node root) { this.rootNode = new PackageNodeImpl(); if (root.package_node == null) @@ -264,14 +264,14 @@ namespace Org.Apache.REEF.Tang.Protobuf Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(new ArgumentException("Expected a package node. Got: " + root), LOGGER); } // Register all the classes. - foreach (ClassHierarchyProto.Node child in root.children) + foreach (Org.Apache.REEF.Tang.Protobuf.Node child in root.children) { ParseSubHierarchy(rootNode, child); } BuildHashTable(rootNode); - foreach (ClassHierarchyProto.Node child in root.children) + foreach (Org.Apache.REEF.Tang.Protobuf.Node child in root.children) { WireUpInheritanceRelationships(child); } @@ -286,7 +286,7 @@ namespace Org.Apache.REEF.Tang.Protobuf } } - private static void ParseSubHierarchy(INode parent, ClassHierarchyProto.Node n) + private static void ParseSubHierarchy(INode parent, Org.Apache.REEF.Tang.Protobuf.Node n) { INode parsed = null; if (n.package_node != null) @@ -295,7 +295,7 @@ namespace Org.Apache.REEF.Tang.Protobuf } else if (n.named_parameter_node != null) { - ClassHierarchyProto.NamedParameterNode np = n.named_parameter_node; + Org.Apache.REEF.Tang.Protobuf.NamedParameterNode np = n.named_parameter_node; parsed = new NamedParameterNodeImpl(parent, n.name, n.full_name, np.full_arg_class_name, np.simple_arg_class_name, np.is_set, np.is_list, np.documentation, np.short_name, @@ -303,17 +303,17 @@ namespace Org.Apache.REEF.Tang.Protobuf } else if (n.class_node != null) { - ClassHierarchyProto.ClassNode cn = n.class_node; + Org.Apache.REEF.Tang.Protobuf.ClassNode cn = n.class_node; IList<IConstructorDef> injectableConstructors = new List<IConstructorDef>(); IList<IConstructorDef> allConstructors = new List<IConstructorDef>(); - foreach (ClassHierarchyProto.ConstructorDef injectable in cn.InjectableConstructors) + foreach (Org.Apache.REEF.Tang.Protobuf.ConstructorDef injectable in cn.InjectableConstructors) { IConstructorDef def = ParseConstructorDef(injectable, true); injectableConstructors.Add(def); allConstructors.Add(def); } - foreach (ClassHierarchyProto.ConstructorDef other in cn.OtherConstructors) + foreach (Org.Apache.REEF.Tang.Protobuf.ConstructorDef other in cn.OtherConstructors) { IConstructorDef def = ParseConstructorDef(other, false); allConstructors.Add(def); @@ -331,27 +331,27 @@ namespace Org.Apache.REEF.Tang.Protobuf Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(new IllegalStateException("Bad protocol buffer: got abstract node" + n), LOGGER); } - foreach (ClassHierarchyProto.Node child in n.children) + foreach (Org.Apache.REEF.Tang.Protobuf.Node child in n.children) { ParseSubHierarchy(parsed, child); } } - private static IConstructorDef ParseConstructorDef(ClassHierarchyProto.ConstructorDef def, bool isInjectable) + private static IConstructorDef ParseConstructorDef(Org.Apache.REEF.Tang.Protobuf.ConstructorDef def, bool isInjectable) { IList<IConstructorArg> args = new List<IConstructorArg>(); - foreach (ClassHierarchyProto.ConstructorArg arg in def.args) + foreach (Org.Apache.REEF.Tang.Protobuf.ConstructorArg arg in def.args) { args.Add(new ConstructorArgImpl(arg.full_arg_class_name, arg.named_parameter_name, arg.is_injection_future)); } return new ConstructorDefImpl(def.full_class_name, args.ToArray(), isInjectable); } - private void WireUpInheritanceRelationships(ClassHierarchyProto.Node n) + private void WireUpInheritanceRelationships(Org.Apache.REEF.Tang.Protobuf.Node n) { if (n.class_node != null) { - ClassHierarchyProto.ClassNode cn = n.class_node; + Org.Apache.REEF.Tang.Protobuf.ClassNode cn = n.class_node; IClassNode iface = null; try {
