You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@reef.apache.org by we...@apache.org on 2015/02/07 00:18:29 UTC
[1/4] incubator-reef git commit: [REEF-146] Changing .Net project
structure for Reef tests, reef client and Reef all
Repository: incubator-reef
Updated Branches:
refs/heads/master a7df272d1 -> 05766f9d3
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Tests/ReefTests/Functional.Tests/ReefFunctionalTest.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Tests/ReefTests/Functional.Tests/ReefFunctionalTest.cs b/lang/cs/Tests/ReefTests/Functional.Tests/ReefFunctionalTest.cs
deleted file mode 100644
index adc8448..0000000
--- a/lang/cs/Tests/ReefTests/Functional.Tests/ReefFunctionalTest.cs
+++ /dev/null
@@ -1,200 +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.Globalization;
-using System.IO;
-using System.Linq;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Timers;
-using Org.Apache.REEF.Driver;
-using Org.Apache.REEF.Driver.bridge;
-using Org.Apache.REEF.Utilities;
-using Org.Apache.REEF.Utilities.Logging;
-using Org.Apache.REEF.Tang.Interface;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Microsoft.WindowsAzure.Storage;
-using Microsoft.WindowsAzure.Storage.Blob;
-using Timer = System.Timers.Timer;
-
-namespace Org.Apache.REEF.Test
-{
- public class ReefFunctionalTest
- {
- protected const string _stdout = "driver.stdout";
- protected const string _stderr = "driver.stderr";
- protected const string _cmdFile = "run.cmd";
- protected const string _binFolder = "bin";
- // TODO: we will need a proper way to hide this when we are OSS'ed
- protected const string _blobStorageConnectionString =
- @"DefaultEndpointsProtocol=https;AccountName=reeftestlog;AccountKey=cuUmPRF9DiG56bciNc37O/SfHAoh1jFfJW6AsXAtWLPnjlOzXJGWgXhkyDFOGEHIMscqDU41ElUKnjcsJjWD9w==";
-
- private bool _testSuccess = false;
- private bool _onLocalRuntime = false;
- private string _className = Constants.BridgeLaunchClass;
- private string _clrFolder = ".";
- private string _reefJar = Path.Combine(_binFolder, Constants.BridgeJarFileName);
- private string _runCommand = Path.Combine(_binFolder, _cmdFile);
-
- // TODO: once things stablize, we would like to toggle this to be false and only enable when needed for debugging test failures.
- private bool _enableRealtimeLogUpload = true;
-
- protected string TestId { get; set; }
-
- protected Timer TestTimer { get; set; }
-
- protected Task TimerTask { get; set; }
-
- protected bool TestSuccess
- {
- get { return _testSuccess; }
- set { _testSuccess = value; }
- }
-
- protected bool IsOnLocalRuntiime
- {
- get { return _onLocalRuntime; }
- set { _onLocalRuntime = value; }
- }
-
- public void Init()
- {
- TestId = Guid.NewGuid().ToString("N").Substring(0, 8);
- Console.WriteLine("Running test " + TestId + ". If failed AND log uploaded is enabled, log can be find in " + Path.Combine(DateTime.Now.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), TestId));
- if (_enableRealtimeLogUpload)
- {
- TimerTask = new Task(() =>
- {
- TestTimer = new Timer()
- {
- Interval = 1000,
- Enabled = true,
- AutoReset = true
- };
- TestTimer.Elapsed += PeriodicUploadLog;
- TestTimer.Start();
- });
- TimerTask.Start();
- }
-
- ValidationUtilities.ValidateEnvVariable("JAVA_HOME");
-
- if (!Directory.Exists(_binFolder))
- {
- throw new InvalidOperationException(_binFolder + " not found in current directory, cannot init test");
- }
- }
-
- protected void TestRun(HashSet<string> appDlls, IConfiguration driverBridgeConfig, bool runOnYarn = false, JavaLoggingSetting javaLogSettings = JavaLoggingSetting.INFO)
- {
- ClrClientHelper.Run(appDlls, driverBridgeConfig, new DriverSubmissionSettings() { RunOnYarn = runOnYarn, JavaLogLevel = javaLogSettings }, _reefJar, _runCommand, _clrFolder, _className);
- }
-
- protected void CleanUp()
- {
- Console.WriteLine("Cleaning up test.");
-
- if (TimerTask != null)
- {
- TestTimer.Stop();
- TimerTask.Dispose();
- TimerTask = null;
- }
-
- // Wait for file upload task to complete
- Thread.Sleep(500);
-
- string dir = Path.Combine(Directory.GetCurrentDirectory(), "REEF_LOCAL_RUNTIME");
- try
- {
- if (Directory.Exists(dir))
- {
- Directory.Delete(dir, true);
- }
- }
- catch (IOException)
- {
- // do not fail if clean up is unsuccessful
- }
- }
-
- protected void ValidateSuccessForLocalRuntime(int numberOfEvaluatorsToClose)
- {
- const string successIndication = "EXIT: ActiveContextClr2Java::Close";
- const string failedTaskIndication = "Java_com_microsoft_reef_javabridge_NativeInterop_ClrSystemFailedTaskHandlerOnNext";
- const string failedEvaluatorIndication = "Java_com_microsoft_reef_javabridge_NativeInterop_ClrSystemFailedEvaluatorHandlerOnNext";
- string[] lines = File.ReadAllLines(GetLogFile(_stdout));
- string[] successIndicators = lines.Where(s => s.Contains(successIndication)).ToArray();
- string[] failedTaskIndicators = lines.Where(s => s.Contains(failedTaskIndication)).ToArray();
- string[] failedIndicators = lines.Where(s => s.Contains(failedEvaluatorIndication)).ToArray();
- Assert.IsTrue(successIndicators.Count() == numberOfEvaluatorsToClose);
- Assert.IsFalse(failedTaskIndicators.Any());
- Assert.IsFalse(failedIndicators.Any());
- }
-
- protected void PeriodicUploadLog(object source, ElapsedEventArgs e)
- {
- try
- {
- UploadDriverLog();
- }
- catch (Exception)
- {
- // log not available yet, ignore it
- }
- }
-
- protected string GetLogFile(string logFileName)
- {
- string driverContainerDirectory = Directory.GetDirectories(Path.Combine(Directory.GetCurrentDirectory(), "REEF_LOCAL_RUNTIME"), "driver", SearchOption.AllDirectories).SingleOrDefault();
- if (string.IsNullOrWhiteSpace(driverContainerDirectory))
- {
- throw new InvalidOperationException("Cannot find driver container directory");
- }
- string logFile = Path.Combine(driverContainerDirectory, logFileName);
- if (!File.Exists(logFile))
- {
- throw new InvalidOperationException("Driver stdout file not found");
- }
- return logFile;
- }
-
- private void UploadDriverLog()
- {
- string driverStdout = GetLogFile(_stdout);
- string driverStderr = GetLogFile(_stderr);
- CloudStorageAccount storageAccount = CloudStorageAccount.Parse(_blobStorageConnectionString);
- CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
- CloudBlobContainer container = blobClient.GetContainerReference(DateTime.Now.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture));
- container.CreateIfNotExists();
-
- CloudBlockBlob blob = container.GetBlockBlobReference(Path.Combine(TestId, "driverStdOut"));
- FileStream fs = new FileStream(driverStdout, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
- blob.UploadFromStream(fs);
- fs.Close();
-
- blob = container.GetBlockBlobReference(Path.Combine(TestId, "driverStdErr"));
- fs = new FileStream(driverStderr, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
- blob.UploadFromStream(fs);
- fs.Close();
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Tests/ReefTests/IO.Tests/BlockingCollectionExtensionTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Tests/ReefTests/IO.Tests/BlockingCollectionExtensionTests.cs b/lang/cs/Tests/ReefTests/IO.Tests/BlockingCollectionExtensionTests.cs
deleted file mode 100644
index 4b21b1e..0000000
--- a/lang/cs/Tests/ReefTests/IO.Tests/BlockingCollectionExtensionTests.cs
+++ /dev/null
@@ -1,78 +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.Network.Utilities;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System;
-using System.Collections.Concurrent;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Org.Apache.REEF.Test.IO.Tests
-{
- [TestClass]
- public class BlockingCollectionExtensionTests
- {
- [TestMethod]
- public void TestCollectionContainsElement()
- {
- string item = "abc";
- BlockingCollection<string> collection = new BlockingCollection<string>();
- collection.Add(item);
-
- Assert.AreEqual(item, collection.Take(item));
-
- // Check that item is no longer in collection
- Assert.AreEqual(0, collection.Count);
- }
-
- [TestMethod]
- public void TestCollectionContainsElement2()
- {
- string item = "abc";
- BlockingCollection<string> collection = new BlockingCollection<string>();
- collection.Add("cat");
- collection.Add(item);
- collection.Add("dog");
-
- Assert.AreEqual(item, collection.Take(item));
-
- // Remove remaining items, check that item is not there
- Assert.AreNotEqual(item, collection.Take());
- Assert.AreNotEqual(item, collection.Take());
- Assert.AreEqual(0, collection.Count);
- }
-
- [TestMethod]
- [ExpectedException(typeof(InvalidOperationException))]
- public void TestCollectionDoesNotContainsElement()
- {
- string item1 = "abc";
- string item2 = "def";
-
- BlockingCollection<string> collection = new BlockingCollection<string>();
- collection.Add(item2);
-
- // Should throw InvalidOperationException since item1 is not in collection
- collection.Take(item1);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Tests/ReefTests/IO.Tests/NameServerTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Tests/ReefTests/IO.Tests/NameServerTests.cs b/lang/cs/Tests/ReefTests/IO.Tests/NameServerTests.cs
deleted file mode 100644
index 3ceb21b..0000000
--- a/lang/cs/Tests/ReefTests/IO.Tests/NameServerTests.cs
+++ /dev/null
@@ -1,275 +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.Net;
-using System.Text;
-using System.Threading;
-using System.Threading.Tasks;
-using Org.Apache.REEF.Common.io;
-using Org.Apache.REEF.Network.Naming;
-using Org.Apache.REEF.Network.Naming.Events;
-using Org.Apache.REEF.Tang.Annotations;
-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.Wake.Util;
-using Org.Apache.REEF.Tang.Implementations.Tang;
-
-namespace Org.Apache.REEF.Test
-{
- [TestClass]
- public class NameServerTests
- {
- [TestMethod]
- public void TestNameServerNoRequests()
- {
- using (var server = new NameServer(0))
- {
- }
- }
-
- [TestMethod]
- public void TestNameServerNoRequestsTwoClients()
- {
- using (var server = new NameServer(0))
- {
- var nameClient = new NameClient(server.LocalEndpoint);
- var nameClient2 = new NameClient(server.LocalEndpoint);
- nameClient2.Register("1", new IPEndPoint(IPAddress.Any, 8080));
- nameClient.Lookup("1");
- }
- }
-
- [TestMethod]
- public void TestNameServerNoRequestsTwoClients2()
- {
- using (var server = new NameServer(0))
- {
- var nameClient = new NameClient(server.LocalEndpoint);
- var nameClient2 = new NameClient(server.LocalEndpoint);
- nameClient2.Register("1", new IPEndPoint(IPAddress.Any, 8080));
- nameClient.Lookup("1");
- }
- }
-
- [TestMethod]
- public void TestNameServerMultipleRequestsTwoClients()
- {
- using (var server = new NameServer(0))
- {
- var nameClient = new NameClient(server.LocalEndpoint);
- var nameClient2 = new NameClient(server.LocalEndpoint);
- nameClient.Register("1", new IPEndPoint(IPAddress.Any, 8080));
- nameClient2.Lookup("1");
- }
- }
-
- [TestMethod]
- public void TestRegister()
- {
- using (INameServer server = BuildNameServer())
- {
- using (INameClient client = BuildNameClient(server.LocalEndpoint))
- {
- IPEndPoint endpoint1 = new IPEndPoint(IPAddress.Parse("100.0.0.1"), 100);
- IPEndPoint endpoint2 = new IPEndPoint(IPAddress.Parse("100.0.0.2"), 200);
- IPEndPoint endpoint3 = new IPEndPoint(IPAddress.Parse("100.0.0.3"), 300);
-
- // Check that no endpoints have been registered
- Assert.IsNull(client.Lookup("a"));
- Assert.IsNull(client.Lookup("b"));
- Assert.IsNull(client.Lookup("c"));
-
- // Register endpoints
- client.Register("a", endpoint1);
- client.Register("b", endpoint2);
- client.Register("c", endpoint3);
-
- // Check that they can be looked up correctly
- Assert.AreEqual(endpoint1, client.Lookup("a"));
- Assert.AreEqual(endpoint2, client.Lookup("b"));
- Assert.AreEqual(endpoint3, client.Lookup("c"));
- }
- }
- }
-
- [TestMethod]
- public void TestUnregister()
- {
- using (INameServer server = BuildNameServer())
- {
- using (INameClient client = BuildNameClient(server.LocalEndpoint))
- {
- IPEndPoint endpoint1 = new IPEndPoint(IPAddress.Parse("100.0.0.1"), 100);
-
- // Register endpoint
- client.Register("a", endpoint1);
-
- // Check that it can be looked up correctly
- Assert.AreEqual(endpoint1, client.Lookup("a"));
-
- // Unregister endpoints
- client.Unregister("a");
- Thread.Sleep(1000);
-
- // Make sure they were unregistered correctly
- Assert.IsNull(client.Lookup("a"));
- }
- }
- }
-
- [TestMethod]
- public void TestLookup()
- {
- using (INameServer server = BuildNameServer())
- {
- using (INameClient client = BuildNameClient(server.LocalEndpoint))
- {
- IPEndPoint endpoint1 = new IPEndPoint(IPAddress.Parse("100.0.0.1"), 100);
- IPEndPoint endpoint2 = new IPEndPoint(IPAddress.Parse("100.0.0.2"), 200);
-
- // Register endpoint1
- client.Register("a", endpoint1);
- Assert.AreEqual(endpoint1, client.Lookup("a"));
-
- // Reregister identifer a
- client.Register("a", endpoint2);
- Assert.AreEqual(endpoint2, client.Lookup("a"));
- }
- }
- }
-
- [TestMethod]
- public void TestLookupList()
- {
- using (INameServer server = BuildNameServer())
- {
- using (INameClient client = BuildNameClient(server.LocalEndpoint))
- {
- IPEndPoint endpoint1 = new IPEndPoint(IPAddress.Parse("100.0.0.1"), 100);
- IPEndPoint endpoint2 = new IPEndPoint(IPAddress.Parse("100.0.0.2"), 200);
- IPEndPoint endpoint3 = new IPEndPoint(IPAddress.Parse("100.0.0.3"), 300);
-
- // Register endpoints
- client.Register("a", endpoint1);
- client.Register("b", endpoint2);
- client.Register("c", endpoint3);
-
- // Look up both at the same time
- List<string> ids = new List<string> { "a", "b", "c", "d" };
- List<NameAssignment> assignments = client.Lookup(ids);
-
- // Check that a, b, and c are registered
- Assert.AreEqual("a", assignments[0].Identifier);
- Assert.AreEqual(endpoint1, assignments[0].Endpoint);
- Assert.AreEqual("b", assignments[1].Identifier);
- Assert.AreEqual(endpoint2, assignments[1].Endpoint);
- Assert.AreEqual("c", assignments[2].Identifier);
- Assert.AreEqual(endpoint3, assignments[2].Endpoint);
-
- // Check that d is not registered
- Assert.AreEqual(3, assignments.Count);
- }
- }
- }
-
- [TestMethod]
- public void TestNameClientRestart()
- {
- int oldPort = 6666;
- int newPort = 6662;
- INameServer server = new NameServer(oldPort);
-
- using (INameClient client = BuildNameClient(server.LocalEndpoint))
- {
- IPEndPoint endpoint = new IPEndPoint(IPAddress.Parse("100.0.0.1"), 100);
-
- client.Register("a", endpoint);
- Assert.AreEqual(endpoint, client.Lookup("a"));
-
- server.Dispose();
-
- server = new NameServer(newPort);
- client.Restart(server.LocalEndpoint);
-
- client.Register("b", endpoint);
- Assert.AreEqual(endpoint, client.Lookup("b"));
-
- server.Dispose();
- }
- }
-
- [TestMethod]
- public void TestConstructorInjection()
- {
- int port = 6666;
- using (INameServer server = new NameServer(port))
- {
- IConfiguration nameClientConfiguration = NamingConfiguration.ConfigurationModule
- .Set(NamingConfiguration.NameServerAddress, server.LocalEndpoint.Address.ToString())
- .Set(NamingConfiguration.NameServerPort, port + string.Empty)
- .Build();
-
- ConstructorInjection c = TangFactory.GetTang()
- .NewInjector(nameClientConfiguration)
- .GetInstance<ConstructorInjection>();
-
- Assert.IsNotNull(c);
- }
- }
-
- private INameServer BuildNameServer()
- {
- var builder = TangFactory.GetTang()
- .NewConfigurationBuilder()
- .BindNamedParameter<NamingConfigurationOptions.NameServerPort, int>(
- GenericType<NamingConfigurationOptions.NameServerPort>.Class, "0");
-
- return TangFactory.GetTang().NewInjector(builder.Build()).GetInstance<INameServer>();
- }
-
- private INameClient BuildNameClient(IPEndPoint remoteEndpoint)
- {
- string nameServerAddr = remoteEndpoint.Address.ToString();
- int nameServerPort = remoteEndpoint.Port;
- IConfiguration nameClientConfiguration = NamingConfiguration.ConfigurationModule
- .Set(NamingConfiguration.NameServerAddress, nameServerAddr)
- .Set(NamingConfiguration.NameServerPort, nameServerPort + string.Empty)
- .Build();
-
- return TangFactory.GetTang().NewInjector(nameClientConfiguration).GetInstance<NameClient>();
- }
-
- private class ConstructorInjection
- {
- [Inject]
- public ConstructorInjection(NameClient client)
- {
- if (client == null)
- {
- throw new ArgumentNullException("client");
- }
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Tests/ReefTests/IO.Tests/NetworkServiceTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Tests/ReefTests/IO.Tests/NetworkServiceTests.cs b/lang/cs/Tests/ReefTests/IO.Tests/NetworkServiceTests.cs
deleted file mode 100644
index 3a38621..0000000
--- a/lang/cs/Tests/ReefTests/IO.Tests/NetworkServiceTests.cs
+++ /dev/null
@@ -1,203 +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.Network.Naming;
-using Org.Apache.REEF.Network.NetworkService;
-using Org.Apache.REEF.Tang.Annotations;
-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.Wake;
-using Org.Apache.REEF.Wake.Remote;
-using Org.Apache.REEF.Wake.Remote.Impl;
-using Org.Apache.REEF.Wake.Util;
-using System;
-using System.Collections.Concurrent;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Linq;
-using System.Net;
-using System.Text;
-using System.Threading.Tasks;
-using Org.Apache.REEF.Tang.Implementations.Tang;
-
-namespace Org.Apache.REEF.Test.IO.Tests
-{
- [TestClass]
- public class NetworkServiceTests
- {
- [TestMethod]
- public void TestNetworkServiceOneWayCommunication()
- {
- int networkServicePort1 = NetworkUtils.GenerateRandomPort(6000, 7000);
- int networkServicePort2 = NetworkUtils.GenerateRandomPort(7001, 8000);
-
- BlockingCollection<string> queue = new BlockingCollection<string>();
-
- using (INameServer nameServer = new NameServer(0))
- {
- IPEndPoint endpoint = nameServer.LocalEndpoint;
- int nameServerPort = endpoint.Port;
- string nameServerAddr = endpoint.Address.ToString();
- using (INetworkService<string> networkService1 = BuildNetworkService(networkServicePort1, nameServerPort, nameServerAddr, null))
- using (INetworkService<string> networkService2 = BuildNetworkService(networkServicePort2, nameServerPort, nameServerAddr, new MessageHandler(queue)))
- {
- IIdentifier id1 = new StringIdentifier("service1");
- IIdentifier id2 = new StringIdentifier("service2");
- networkService1.Register(id1);
- networkService2.Register(id2);
-
- using (IConnection<string> connection = networkService1.NewConnection(id2))
- {
- connection.Open();
- connection.Write("abc");
- connection.Write("def");
- connection.Write("ghi");
-
- Assert.AreEqual("abc", queue.Take());
- Assert.AreEqual("def", queue.Take());
- Assert.AreEqual("ghi", queue.Take());
- }
- }
- }
- }
-
- [TestMethod]
- public void TestNetworkServiceTwoWayCommunication()
- {
- int networkServicePort1 = NetworkUtils.GenerateRandomPort(6000, 7000);
- int networkServicePort2 = NetworkUtils.GenerateRandomPort(7001, 8000);
-
- BlockingCollection<string> queue1 = new BlockingCollection<string>();
- BlockingCollection<string> queue2 = new BlockingCollection<string>();
-
- using (INameServer nameServer = new NameServer(0))
- {
- IPEndPoint endpoint = nameServer.LocalEndpoint;
- int nameServerPort = endpoint.Port;
- string nameServerAddr = endpoint.Address.ToString();
- using (INetworkService<string> networkService1 = BuildNetworkService(networkServicePort1, nameServerPort, nameServerAddr, new MessageHandler(queue1)))
- using (INetworkService<string> networkService2 = BuildNetworkService(networkServicePort2, nameServerPort, nameServerAddr, new MessageHandler(queue2)))
- {
- IIdentifier id1 = new StringIdentifier("service1");
- IIdentifier id2 = new StringIdentifier("service2");
- networkService1.Register(id1);
- networkService2.Register(id2);
-
- using (IConnection<string> connection1 = networkService1.NewConnection(id2))
- using (IConnection<string> connection2 = networkService2.NewConnection(id1))
- {
- connection1.Open();
- connection1.Write("abc");
- connection1.Write("def");
- connection1.Write("ghi");
-
- connection2.Open();
- connection2.Write("jkl");
- connection2.Write("mno");
-
- Assert.AreEqual("abc", queue2.Take());
- Assert.AreEqual("def", queue2.Take());
- Assert.AreEqual("ghi", queue2.Take());
-
- Assert.AreEqual("jkl", queue1.Take());
- Assert.AreEqual("mno", queue1.Take());
- }
- }
- }
- }
-
- private INetworkService<string> BuildNetworkService(
- int networkServicePort,
- int nameServicePort,
- string nameServiceAddr,
- IObserver<NsMessage<string>> handler)
- {
- // Test injection
- if (handler == null)
- {
- var networkServiceConf = TangFactory.GetTang().NewConfigurationBuilder()
- .BindNamedParameter<NetworkServiceOptions.NetworkServicePort, int>(
- GenericType<NetworkServiceOptions.NetworkServicePort>.Class,
- networkServicePort.ToString(CultureInfo.CurrentCulture))
- .BindNamedParameter<NamingConfigurationOptions.NameServerPort, int>(
- GenericType<NamingConfigurationOptions.NameServerPort>.Class,
- nameServicePort.ToString(CultureInfo.CurrentCulture))
- .BindNamedParameter<NamingConfigurationOptions.NameServerAddress, string>(
- GenericType<NamingConfigurationOptions.NameServerAddress>.Class,
- nameServiceAddr)
- .BindImplementation(GenericType<ICodec<string>>.Class, GenericType<StringCodec>.Class)
- .BindImplementation(GenericType<IObserver<NsMessage<string>>>.Class, GenericType<NetworkMessageHandler>.Class)
- .Build();
-
- return TangFactory.GetTang().NewInjector(networkServiceConf).GetInstance<NetworkService<string>>();
- }
-
- return new NetworkService<string>(networkServicePort, nameServiceAddr, nameServicePort,
- handler, new StringIdentifierFactory(), new StringCodec());
- }
-
- private class MessageHandler : IObserver<NsMessage<string>>
- {
- private BlockingCollection<string> _queue;
-
- public MessageHandler(BlockingCollection<string> queue)
- {
- _queue = queue;
- }
-
- public void OnNext(NsMessage<string> value)
- {
- _queue.Add(value.Data.First());
- }
-
- public void OnError(Exception error)
- {
- throw new NotImplementedException();
- }
-
- public void OnCompleted()
- {
- throw new NotImplementedException();
- }
- }
-
- private class NetworkMessageHandler : IObserver<NsMessage<string>>
- {
- [Inject]
- public NetworkMessageHandler()
- {
- }
-
- public void OnNext(NsMessage<string> value)
- {
- }
-
- public void OnError(Exception error)
- {
- }
-
- public void OnCompleted()
- {
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Tests/ReefTests/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Tests/ReefTests/Properties/AssemblyInfo.cs b/lang/cs/Tests/ReefTests/Properties/AssemblyInfo.cs
deleted file mode 100644
index 9d92b89..0000000
--- a/lang/cs/Tests/ReefTests/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("ReefTests")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("ReefTests")]
-[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("19ebceb4-3b1f-466b-9127-aa14e636d723")]
-
-// 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/05766f9d/lang/cs/Tests/ReefTests/ReefTests.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Tests/ReefTests/ReefTests.csproj b/lang/cs/Tests/ReefTests/ReefTests.csproj
deleted file mode 100644
index 7d0955b..0000000
--- a/lang/cs/Tests/ReefTests/ReefTests.csproj
+++ /dev/null
@@ -1,213 +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>{988F90CF-A48D-4938-A4D2-FA3B758FB5A7}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Org.Apache.Reef.Test</RootNamespace>
- <AssemblyName>Org.Apache.Reef.Test</AssemblyName>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
- <RestorePackages>true</RestorePackages>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\..\bin\$(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>..\..\bin\$(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>..\..\bin\$(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>..\..\bin\$(Platform)\$(Configuration)\$(RootNamespace)</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Microsoft.Data.Edm, Version=5.6.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\packages\Microsoft.Data.Edm.5.6.3\lib\net40\Microsoft.Data.Edm.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Data.OData, Version=5.6.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\packages\Microsoft.Data.OData.5.6.3\lib\net40\Microsoft.Data.OData.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Data.Services.Client, Version=5.6.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\packages\Microsoft.Data.Services.Client.5.6.3\lib\net40\Microsoft.Data.Services.Client.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Hadoop.Avro">
- <HintPath>..\..\packages\Microsoft.Hadoop.Avro.1.4.0.0\lib\net40\Microsoft.Hadoop.Avro.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
- <Reference Include="Microsoft.WindowsAzure.Configuration">
- <HintPath>..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.WindowsAzure.Storage">
- <HintPath>..\..\packages\WindowsAzure.Storage.4.3.0\lib\net40\Microsoft.WindowsAzure.Storage.dll</HintPath>
- </Reference>
- <Reference Include="Newtonsoft.Json">
- <HintPath>..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
- </Reference>
- <Reference Include="protobuf-net">
- <HintPath>..\..\packages\protobuf-net.2.0.0.668\lib\net40\protobuf-net.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Core" />
- <Reference Include="System.Reactive.Core">
- <HintPath>..\..\packages\Rx-Core.2.2.5\lib\net45\System.Reactive.Core.dll</HintPath>
- </Reference>
- <Reference Include="System.Reactive.Interfaces">
- <HintPath>..\..\packages\Rx-Interfaces.2.2.5\lib\net45\System.Reactive.Interfaces.dll</HintPath>
- </Reference>
- <Reference Include="System.Spatial, Version=5.6.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\packages\System.Spatial.5.6.3\lib\net40\System.Spatial.dll</HintPath>
- </Reference>
- <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.Tests\EvaluatorConfigurationsTests.cs" />
- <Compile Include="Evaluator.Tests\EvaluatorTests.cs" />
- <Compile Include="Functional.Tests\Bridge\TestBridgeClient.cs" />
- <Compile Include="Functional.Tests\Bridge\TestHelloBridgeHandlers.cs" />
- <Compile Include="Functional.Tests\Bridge\TestSimpleEventHandlers.cs" />
- <Compile Include="Functional.Tests\Driver\DriverTestStartHandler.cs" />
- <Compile Include="Functional.Tests\Driver\TestDriver.cs" />
- <Compile Include="Functional.Tests\Messaging\MessageDriver.cs" />
- <Compile Include="Functional.Tests\Messaging\MessageTask.cs" />
- <Compile Include="Functional.Tests\Messaging\TestTaskMessage.cs" />
- <Compile Include="Functional.Tests\ReefFunctionalTest.cs" />
- <Compile Include="IO.Tests\BlockingCollectionExtensionTests.cs" />
- <Compile Include="IO.Tests\NameServerTests.cs" />
- <Compile Include="IO.Tests\NetworkServiceTests.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="Utility.Test\TestDriverConfigGenerator.cs" />
- <Compile Include="Utility.Test\TestExceptions.cs" />
- </ItemGroup>
- <ItemGroup>
- <None Include="bin\run.cmd">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </None>
- <None Include="ConfigFiles\evaluator.conf">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </None>
- <None Include="packages.config" />
- </ItemGroup>
- <ItemGroup>
- <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.Evaluator\Org.Apache.REEF.Evaluator.csproj">
- <Project>{1b983182-9c30-464c-948d-f87eb93a8240}</Project>
- <Name>Org.Apache.REEF.Evaluator</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\Org.Apache.REEF.Examples.HelloCLRBridge\Org.Apache.REEF.Examples.HelloCLRBridge.csproj">
- <Project>{a78dd8e8-31d0-4506-8738-daa9da86d55b}</Project>
- <Name>Org.Apache.REEF.Examples.HelloCLRBridge</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\Org.Apache.REEF.Examples.RetainedEvalCLRBridge\Org.Apache.REEF.Examples.RetainedEvalCLRBridge.csproj">
- <Project>{05ec65cf-848d-49ab-9e67-57c14ea63044}</Project>
- <Name>Org.Apache.REEF.Examples.RetainedEvalCLRBridge</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\Org.Apache.REEF.Examples.Tasks\Org.Apache.REEF.Examples.Tasks.csproj">
- <Project>{75503f90-7b82-4762-9997-94b5c68f15db}</Project>
- <Name>Org.Apache.REEF.Examples.Tasks</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.Tang\Org.Apache.Reef.Tang.csproj">
- <Project>{97dbb573-3994-417a-9f69-ffa25f00d2a6}</Project>
- <Name>Org.Apache.Reef.Tang</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\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.Wake\Org.Apache.Reef.Wake.csproj">
- <Project>{cdfb3464-4041-42b1-9271-83af24cd5008}</Project>
- <Name>Org.Apache.Reef.Wake</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\Source\REEF\reef-applications\CLRBridgeClient\CLRBridgeClient.csproj">
- <Project>{5094c35b-4fdb-4322-ac05-45d684501cbf}</Project>
- <Name>CLRBridgeClient</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Content Include="bin\reef-bridge-0.11.0-incubating-SNAPSHOT-shaded.jar">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="bin\Debug\" />
- <Folder Include="bin\Release\" />
- </ItemGroup>
- <ItemGroup>
- <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
- </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/05766f9d/lang/cs/Tests/ReefTests/Utility.Test/TestDriverConfigGenerator.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Tests/ReefTests/Utility.Test/TestDriverConfigGenerator.cs b/lang/cs/Tests/ReefTests/Utility.Test/TestDriverConfigGenerator.cs
deleted file mode 100644
index c8b2c8f..0000000
--- a/lang/cs/Tests/ReefTests/Utility.Test/TestDriverConfigGenerator.cs
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using System;
-using Org.Apache.REEF.Driver;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-
-namespace Org.Apache.REEF.Test.Utility.Test
-{
- [TestClass]
- public class TestDriverConfigGenerator
- {
- [TestMethod]
- public void TestGeneratingFullDriverConfigFile()
- {
- DriverConfigurationSettings driverSubmissionSettings = new DriverConfigurationSettings()
- {
- DriverMemory = 1024,
- DriverIdentifier = "juliaDriverId",
- SubmissionDirectory = "reefClrBridgeTmp/job_" + Guid.NewGuid().ToString("N").Substring(0, 8),
- IncludingHttpServer = true,
- IncludingNameServer = true,
- //ClrFolder = "C:\\Reef\\ReefApache\\incubator-reef\\reef-bridge-project\\reef-bridge\\dotnetHello",
- ClrFolder = ".",
- JarFileFolder = ".\\bin\\"
- };
-
- DriverConfigGenerator.DriverConfigurationBuilder(driverSubmissionSettings);
- }
-
- [TestMethod]
- public void TestGeneratingDriverConfigFileWithoutHttp()
- {
- DriverConfigurationSettings driverSubmissionSettings = new DriverConfigurationSettings()
- {
- DriverMemory = 1024,
- DriverIdentifier = "juliaDriverId",
- SubmissionDirectory = "reefClrBridgeTmp/job_" + Guid.NewGuid().ToString("N").Substring(0, 8),
- IncludingHttpServer = false,
- IncludingNameServer = true,
-// ClrFolder = "C:\\Reef\\ReefApache\\incubator-reef\\reef-bridge-project\\reef-bridge\\dotnetHello",
- ClrFolder = ".",
- JarFileFolder = ".\\bin\\"
- };
-
- DriverConfigGenerator.DriverConfigurationBuilder(driverSubmissionSettings);
- }
-
- [TestMethod]
- public void TestGeneratingDriverConfigFileWithoutNameServer()
- {
- DriverConfigurationSettings driverSubmissionSettings = new DriverConfigurationSettings()
- {
- DriverMemory = 1024,
- DriverIdentifier = "juliaDriverId",
- SubmissionDirectory = "reefClrBridgeTmp/job_" + Guid.NewGuid().ToString("N").Substring(0, 8),
- IncludingHttpServer = true,
- IncludingNameServer = false,
- //ClrFolder = "C:\\Reef\\ReefApache\\incubator-reef\\reef-bridge-project\\reef-bridge\\dotnetHello",
- ClrFolder = ".",
- JarFileFolder = ".\\bin\\"
- };
-
- DriverConfigGenerator.DriverConfigurationBuilder(driverSubmissionSettings);
- }
-
- [TestMethod]
- public void TestGeneratingDriverConfigFileDriverOnly()
- {
- DriverConfigurationSettings driverSubmissionSettings = new DriverConfigurationSettings()
- {
- DriverMemory = 1024,
- DriverIdentifier = "juliaDriverId",
- SubmissionDirectory = "reefClrBridgeTmp/job_" + Guid.NewGuid().ToString("N").Substring(0, 8),
- IncludingHttpServer = false,
- IncludingNameServer = false,
- //ClrFolder = "C:\\Reef\\ReefApache\\incubator-reef\\reef-bridge-project\\reef-bridge\\dotnetHello",
- ClrFolder = ".",
- JarFileFolder = ".\\bin\\"
- };
-
- DriverConfigGenerator.DriverConfigurationBuilder(driverSubmissionSettings);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Tests/ReefTests/Utility.Test/TestExceptions.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Tests/ReefTests/Utility.Test/TestExceptions.cs b/lang/cs/Tests/ReefTests/Utility.Test/TestExceptions.cs
deleted file mode 100644
index 6dc8120..0000000
--- a/lang/cs/Tests/ReefTests/Utility.Test/TestExceptions.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using System;
-using Org.Apache.REEF.Utilities.Diagnostics;
-using Org.Apache.REEF.Utilities.Logging;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-
-namespace Org.Apache.REEF.Test.Utility.Test
-{
- [TestClass]
- public class TestExceptions
- {
- private static readonly Logger LOGGER = Logger.GetLogger(typeof(TestExceptions));
-
- [TestMethod]
- public void TestThrowCaught()
- {
- string msg = null;
- try
- {
- Exceptions.Throw(new ApplicationException("test"), LOGGER);
- msg = "not supposed to reach here";
- Assert.Fail(msg);
- }
- catch (ApplicationException e)
- {
- Exceptions.Caught(e, Level.Info, LOGGER);
- }
- Assert.IsNull(msg);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Tests/ReefTests/bin/reef-bridge-0.11.0-incubating-SNAPSHOT-shaded.jar
----------------------------------------------------------------------
diff --git a/lang/cs/Tests/ReefTests/bin/reef-bridge-0.11.0-incubating-SNAPSHOT-shaded.jar b/lang/cs/Tests/ReefTests/bin/reef-bridge-0.11.0-incubating-SNAPSHOT-shaded.jar
deleted file mode 100644
index 437d140..0000000
Binary files a/lang/cs/Tests/ReefTests/bin/reef-bridge-0.11.0-incubating-SNAPSHOT-shaded.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Tests/ReefTests/bin/run.cmd
----------------------------------------------------------------------
diff --git a/lang/cs/Tests/ReefTests/bin/run.cmd b/lang/cs/Tests/ReefTests/bin/run.cmd
deleted file mode 100644
index ddff8a7..0000000
--- a/lang/cs/Tests/ReefTests/bin/run.cmd
+++ /dev/null
@@ -1,45 +0,0 @@
-@REM
-@REM Copyright (C) 2013 Microsoft Corporation
-@REM
-@REM Licensed under the Apache License, Version 2.0 (the "License");
-@REM you may not use this file except in compliance with the License.
-@REM You may obtain a copy of the License at
-@REM
-@REM http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM Unless required by applicable law or agreed to in writing, software
-@REM distributed under the License is distributed on an "AS IS" BASIS,
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@REM See the License for the specific language governing permissions and
-@REM limitations under the License.
-@REM
-
-@echo off
-::
-:: Copyright (C) 2013 Microsoft Corporation
-::
-:: Licensed 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.
-::
-
-
-:: RUNTIME
-set SHADED_JAR=bin\reef-bridge-0.11.0-incubating-SNAPSHOT-shaded.jar
-
-set LOGGING_CONFIG=-Djava.util.logging.config.class=org.apache.reef.util.logging.Config
-
-set CLASSPATH=%HADOOP_HOME%\share\hadoop\hdfs\lib\*;%HADOOP_HOME%\share\hadoop\hdfs\*;%HADOOP_HOME%\share\hadoop\common\*;%HADOOP_HOME%\share\hadoop\common\lib\*;%HADOOP_HOME%\share\hadoop\mapreduce\lib\*;%HADOOP_HOME%\share\hadoop\mapreduce\*;%HADOOP_HOME%\share\hadoop\yarn\*;%HADOOP_HOME%\share\hadoop\yarn\lib\*
-
-set CMD=%JAVA_HOME%\bin\java.exe -cp %HADOOP_HOME%\etc\hadoop;%SHADED_JAR%;%CLASSPATH% %*
-::%LOGGING_CONFIG%
-echo %CMD%
-%CMD%
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Tests/ReefTests/packages.config
----------------------------------------------------------------------
diff --git a/lang/cs/Tests/ReefTests/packages.config b/lang/cs/Tests/ReefTests/packages.config
deleted file mode 100644
index ef4860c..0000000
--- a/lang/cs/Tests/ReefTests/packages.config
+++ /dev/null
@@ -1,32 +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="Microsoft.Data.Edm" version="5.6.3" targetFramework="net45" />
- <package id="Microsoft.Data.OData" version="5.6.3" targetFramework="net45" />
- <package id="Microsoft.Data.Services.Client" version="5.6.3" targetFramework="net45" />
- <package id="Microsoft.Hadoop.Avro" version="1.4.0.0" targetFramework="net45" />
- <package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
- <package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
- <package id="protobuf-net" version="2.0.0.668" targetFramework="net45" />
- <package id="Rx-Core" version="2.2.5" targetFramework="net45" />
- <package id="Rx-Interfaces" version="2.2.5" targetFramework="net45" />
- <package id="System.Spatial" version="5.6.3" targetFramework="net45" />
- <package id="WindowsAzure.Storage" version="4.3.0" targetFramework="net45" />
-</packages>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/build.props
----------------------------------------------------------------------
diff --git a/lang/cs/build.props b/lang/cs/build.props
new file mode 100644
index 0000000..a1b8952
--- /dev/null
+++ b/lang/cs/build.props
@@ -0,0 +1,35 @@
+<?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" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+ <!-- Common build paths -->
+ <PropertyGroup>
+ <BinDir Condition="$(BinDir) == '' Or $(BinDir) == '*Undefined*'">$(SolutionDir)\bin</BinDir>
+ <SourceDir Condition="$(SourceDir) == '' Or $(SourceDir) == '*Undefined*'">$(SolutionDir)\Source</SourceDir>
+ <PackagesDir Condition="$(PackagesDir) == '' Or $(PackagesDir) == '*Undefined*'">$(SolutionDir)\packages</PackagesDir>
+ </PropertyGroup>
+
+ <!-- Package versions -->
+ <PropertyGroup>
+ <AvroVersion>1.4.0.0</AvroVersion>
+ <NewtonsoftJsonVersion>6.0.8</NewtonsoftJsonVersion>
+ <ProtobufVersion>2.0.0.668</ProtobufVersion>
+ <RxVersion>2.2.5</RxVersion>
+ </PropertyGroup>
+</Project>
+
[3/4] incubator-reef git commit: [REEF-146] Changing .Net project
structure for Reef tests, reef client and Reef all
Posted by we...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Tests/Functional/ReefFunctionalTest.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Functional/ReefFunctionalTest.cs b/lang/cs/Org.Apache.REEF.Tests/Functional/ReefFunctionalTest.cs
new file mode 100644
index 0000000..deef323
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Tests/Functional/ReefFunctionalTest.cs
@@ -0,0 +1,200 @@
+/**
+ * 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.Globalization;
+using System.IO;
+using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Timers;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Microsoft.WindowsAzure.Storage;
+using Microsoft.WindowsAzure.Storage.Blob;
+using Org.Apache.REEF.Driver;
+using Org.Apache.REEF.Driver.bridge;
+using Org.Apache.REEF.Tang.Interface;
+using Org.Apache.REEF.Utilities;
+using Org.Apache.REEF.Utilities.Logging;
+using Timer = System.Timers.Timer;
+
+namespace Org.Apache.REEF.Tests.Functional
+{
+ public class ReefFunctionalTest
+ {
+ protected const string _stdout = "driver.stdout";
+ protected const string _stderr = "driver.stderr";
+ protected const string _cmdFile = "run.cmd";
+ protected const string _binFolder = "bin";
+ // TODO: we will need a proper way to hide this when we are OSS'ed
+ protected const string _blobStorageConnectionString =
+ @"DefaultEndpointsProtocol=https;AccountName=reeftestlog;AccountKey=cuUmPRF9DiG56bciNc37O/SfHAoh1jFfJW6AsXAtWLPnjlOzXJGWgXhkyDFOGEHIMscqDU41ElUKnjcsJjWD9w==";
+
+ private bool _testSuccess = false;
+ private bool _onLocalRuntime = false;
+ private string _className = Constants.BridgeLaunchClass;
+ private string _clrFolder = ".";
+ private string _reefJar = Path.Combine(_binFolder, Constants.BridgeJarFileName);
+ private string _runCommand = Path.Combine(_binFolder, _cmdFile);
+
+ // TODO: once things stablize, we would like to toggle this to be false and only enable when needed for debugging test failures.
+ private bool _enableRealtimeLogUpload = true;
+
+ protected string TestId { get; set; }
+
+ protected Timer TestTimer { get; set; }
+
+ protected Task TimerTask { get; set; }
+
+ protected bool TestSuccess
+ {
+ get { return _testSuccess; }
+ set { _testSuccess = value; }
+ }
+
+ protected bool IsOnLocalRuntiime
+ {
+ get { return _onLocalRuntime; }
+ set { _onLocalRuntime = value; }
+ }
+
+ public void Init()
+ {
+ TestId = Guid.NewGuid().ToString("N").Substring(0, 8);
+ Console.WriteLine("Running test " + TestId + ". If failed AND log uploaded is enabled, log can be find in " + Path.Combine(DateTime.Now.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), TestId));
+ if (_enableRealtimeLogUpload)
+ {
+ TimerTask = new Task(() =>
+ {
+ TestTimer = new Timer()
+ {
+ Interval = 1000,
+ Enabled = true,
+ AutoReset = true
+ };
+ TestTimer.Elapsed += PeriodicUploadLog;
+ TestTimer.Start();
+ });
+ TimerTask.Start();
+ }
+
+ ValidationUtilities.ValidateEnvVariable("JAVA_HOME");
+
+ if (!Directory.Exists(_binFolder))
+ {
+ throw new InvalidOperationException(_binFolder + " not found in current directory, cannot init test");
+ }
+ }
+
+ protected void TestRun(HashSet<string> appDlls, IConfiguration driverBridgeConfig, bool runOnYarn = false, JavaLoggingSetting javaLogSettings = JavaLoggingSetting.INFO)
+ {
+ ClrClientHelper.Run(appDlls, driverBridgeConfig, new DriverSubmissionSettings() { RunOnYarn = runOnYarn, JavaLogLevel = javaLogSettings }, _reefJar, _runCommand, _clrFolder, _className);
+ }
+
+ protected void CleanUp()
+ {
+ Console.WriteLine("Cleaning up test.");
+
+ if (TimerTask != null)
+ {
+ TestTimer.Stop();
+ TimerTask.Dispose();
+ TimerTask = null;
+ }
+
+ // Wait for file upload task to complete
+ Thread.Sleep(500);
+
+ string dir = Path.Combine(Directory.GetCurrentDirectory(), "REEF_LOCAL_RUNTIME");
+ try
+ {
+ if (Directory.Exists(dir))
+ {
+ Directory.Delete(dir, true);
+ }
+ }
+ catch (IOException)
+ {
+ // do not fail if clean up is unsuccessful
+ }
+ }
+
+ protected void ValidateSuccessForLocalRuntime(int numberOfEvaluatorsToClose)
+ {
+ const string successIndication = "EXIT: ActiveContextClr2Java::Close";
+ const string failedTaskIndication = "Java_com_microsoft_reef_javabridge_NativeInterop_ClrSystemFailedTaskHandlerOnNext";
+ const string failedEvaluatorIndication = "Java_com_microsoft_reef_javabridge_NativeInterop_ClrSystemFailedEvaluatorHandlerOnNext";
+ string[] lines = File.ReadAllLines(GetLogFile(_stdout));
+ string[] successIndicators = lines.Where(s => s.Contains(successIndication)).ToArray();
+ string[] failedTaskIndicators = lines.Where(s => s.Contains(failedTaskIndication)).ToArray();
+ string[] failedIndicators = lines.Where(s => s.Contains(failedEvaluatorIndication)).ToArray();
+ Assert.IsTrue(successIndicators.Count() == numberOfEvaluatorsToClose);
+ Assert.IsFalse(failedTaskIndicators.Any());
+ Assert.IsFalse(failedIndicators.Any());
+ }
+
+ protected void PeriodicUploadLog(object source, ElapsedEventArgs e)
+ {
+ try
+ {
+ UploadDriverLog();
+ }
+ catch (Exception)
+ {
+ // log not available yet, ignore it
+ }
+ }
+
+ protected string GetLogFile(string logFileName)
+ {
+ string driverContainerDirectory = Directory.GetDirectories(Path.Combine(Directory.GetCurrentDirectory(), "REEF_LOCAL_RUNTIME"), "driver", SearchOption.AllDirectories).SingleOrDefault();
+ if (string.IsNullOrWhiteSpace(driverContainerDirectory))
+ {
+ throw new InvalidOperationException("Cannot find driver container directory");
+ }
+ string logFile = Path.Combine(driverContainerDirectory, logFileName);
+ if (!File.Exists(logFile))
+ {
+ throw new InvalidOperationException("Driver stdout file not found");
+ }
+ return logFile;
+ }
+
+ private void UploadDriverLog()
+ {
+ string driverStdout = GetLogFile(_stdout);
+ string driverStderr = GetLogFile(_stderr);
+ CloudStorageAccount storageAccount = CloudStorageAccount.Parse(_blobStorageConnectionString);
+ CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
+ CloudBlobContainer container = blobClient.GetContainerReference(DateTime.Now.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture));
+ container.CreateIfNotExists();
+
+ CloudBlockBlob blob = container.GetBlockBlobReference(Path.Combine(TestId, "driverStdOut"));
+ FileStream fs = new FileStream(driverStdout, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
+ blob.UploadFromStream(fs);
+ fs.Close();
+
+ blob = container.GetBlockBlobReference(Path.Combine(TestId, "driverStdErr"));
+ fs = new FileStream(driverStderr, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
+ blob.UploadFromStream(fs);
+ fs.Close();
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Tests/Network/BlockingCollectionExtensionTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Network/BlockingCollectionExtensionTests.cs b/lang/cs/Org.Apache.REEF.Tests/Network/BlockingCollectionExtensionTests.cs
new file mode 100644
index 0000000..1737888
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Tests/Network/BlockingCollectionExtensionTests.cs
@@ -0,0 +1,74 @@
+/**
+ * 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.Concurrent;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Org.Apache.REEF.Network.Utilities;
+
+namespace Org.Apache.REEF.Tests.Network
+{
+ [TestClass]
+ public class BlockingCollectionExtensionTests
+ {
+ [TestMethod]
+ public void TestCollectionContainsElement()
+ {
+ string item = "abc";
+ BlockingCollection<string> collection = new BlockingCollection<string>();
+ collection.Add(item);
+
+ Assert.AreEqual(item, collection.Take(item));
+
+ // Check that item is no longer in collection
+ Assert.AreEqual(0, collection.Count);
+ }
+
+ [TestMethod]
+ public void TestCollectionContainsElement2()
+ {
+ string item = "abc";
+ BlockingCollection<string> collection = new BlockingCollection<string>();
+ collection.Add("cat");
+ collection.Add(item);
+ collection.Add("dog");
+
+ Assert.AreEqual(item, collection.Take(item));
+
+ // Remove remaining items, check that item is not there
+ Assert.AreNotEqual(item, collection.Take());
+ Assert.AreNotEqual(item, collection.Take());
+ Assert.AreEqual(0, collection.Count);
+ }
+
+ [TestMethod]
+ [ExpectedException(typeof(InvalidOperationException))]
+ public void TestCollectionDoesNotContainsElement()
+ {
+ string item1 = "abc";
+ string item2 = "def";
+
+ BlockingCollection<string> collection = new BlockingCollection<string>();
+ collection.Add(item2);
+
+ // Should throw InvalidOperationException since item1 is not in collection
+ collection.Take(item1);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Tests/Network/NameServerTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Network/NameServerTests.cs b/lang/cs/Org.Apache.REEF.Tests/Network/NameServerTests.cs
new file mode 100644
index 0000000..d6e64f8
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Tests/Network/NameServerTests.cs
@@ -0,0 +1,269 @@
+/**
+ * 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 System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Org.Apache.REEF.Common.io;
+using Org.Apache.REEF.Network.Naming;
+using Org.Apache.REEF.Tang.Annotations;
+using Org.Apache.REEF.Tang.Implementations.Tang;
+using Org.Apache.REEF.Tang.Interface;
+using Org.Apache.REEF.Tang.Util;
+
+namespace Org.Apache.REEF.Tests.Network
+{
+ [TestClass]
+ public class NameServerTests
+ {
+ [TestMethod]
+ public void TestNameServerNoRequests()
+ {
+ using (var server = new NameServer(0))
+ {
+ }
+ }
+
+ [TestMethod]
+ public void TestNameServerNoRequestsTwoClients()
+ {
+ using (var server = new NameServer(0))
+ {
+ var nameClient = new NameClient(server.LocalEndpoint);
+ var nameClient2 = new NameClient(server.LocalEndpoint);
+ nameClient2.Register("1", new IPEndPoint(IPAddress.Any, 8080));
+ nameClient.Lookup("1");
+ }
+ }
+
+ [TestMethod]
+ public void TestNameServerNoRequestsTwoClients2()
+ {
+ using (var server = new NameServer(0))
+ {
+ var nameClient = new NameClient(server.LocalEndpoint);
+ var nameClient2 = new NameClient(server.LocalEndpoint);
+ nameClient2.Register("1", new IPEndPoint(IPAddress.Any, 8080));
+ nameClient.Lookup("1");
+ }
+ }
+
+ [TestMethod]
+ public void TestNameServerMultipleRequestsTwoClients()
+ {
+ using (var server = new NameServer(0))
+ {
+ var nameClient = new NameClient(server.LocalEndpoint);
+ var nameClient2 = new NameClient(server.LocalEndpoint);
+ nameClient.Register("1", new IPEndPoint(IPAddress.Any, 8080));
+ nameClient2.Lookup("1");
+ }
+ }
+
+ [TestMethod]
+ public void TestRegister()
+ {
+ using (INameServer server = BuildNameServer())
+ {
+ using (INameClient client = BuildNameClient(server.LocalEndpoint))
+ {
+ IPEndPoint endpoint1 = new IPEndPoint(IPAddress.Parse("100.0.0.1"), 100);
+ IPEndPoint endpoint2 = new IPEndPoint(IPAddress.Parse("100.0.0.2"), 200);
+ IPEndPoint endpoint3 = new IPEndPoint(IPAddress.Parse("100.0.0.3"), 300);
+
+ // Check that no endpoints have been registered
+ Assert.IsNull(client.Lookup("a"));
+ Assert.IsNull(client.Lookup("b"));
+ Assert.IsNull(client.Lookup("c"));
+
+ // Register endpoints
+ client.Register("a", endpoint1);
+ client.Register("b", endpoint2);
+ client.Register("c", endpoint3);
+
+ // Check that they can be looked up correctly
+ Assert.AreEqual(endpoint1, client.Lookup("a"));
+ Assert.AreEqual(endpoint2, client.Lookup("b"));
+ Assert.AreEqual(endpoint3, client.Lookup("c"));
+ }
+ }
+ }
+
+ [TestMethod]
+ public void TestUnregister()
+ {
+ using (INameServer server = BuildNameServer())
+ {
+ using (INameClient client = BuildNameClient(server.LocalEndpoint))
+ {
+ IPEndPoint endpoint1 = new IPEndPoint(IPAddress.Parse("100.0.0.1"), 100);
+
+ // Register endpoint
+ client.Register("a", endpoint1);
+
+ // Check that it can be looked up correctly
+ Assert.AreEqual(endpoint1, client.Lookup("a"));
+
+ // Unregister endpoints
+ client.Unregister("a");
+ Thread.Sleep(1000);
+
+ // Make sure they were unregistered correctly
+ Assert.IsNull(client.Lookup("a"));
+ }
+ }
+ }
+
+ [TestMethod]
+ public void TestLookup()
+ {
+ using (INameServer server = BuildNameServer())
+ {
+ using (INameClient client = BuildNameClient(server.LocalEndpoint))
+ {
+ IPEndPoint endpoint1 = new IPEndPoint(IPAddress.Parse("100.0.0.1"), 100);
+ IPEndPoint endpoint2 = new IPEndPoint(IPAddress.Parse("100.0.0.2"), 200);
+
+ // Register endpoint1
+ client.Register("a", endpoint1);
+ Assert.AreEqual(endpoint1, client.Lookup("a"));
+
+ // Reregister identifer a
+ client.Register("a", endpoint2);
+ Assert.AreEqual(endpoint2, client.Lookup("a"));
+ }
+ }
+ }
+
+ [TestMethod]
+ public void TestLookupList()
+ {
+ using (INameServer server = BuildNameServer())
+ {
+ using (INameClient client = BuildNameClient(server.LocalEndpoint))
+ {
+ IPEndPoint endpoint1 = new IPEndPoint(IPAddress.Parse("100.0.0.1"), 100);
+ IPEndPoint endpoint2 = new IPEndPoint(IPAddress.Parse("100.0.0.2"), 200);
+ IPEndPoint endpoint3 = new IPEndPoint(IPAddress.Parse("100.0.0.3"), 300);
+
+ // Register endpoints
+ client.Register("a", endpoint1);
+ client.Register("b", endpoint2);
+ client.Register("c", endpoint3);
+
+ // Look up both at the same time
+ List<string> ids = new List<string> { "a", "b", "c", "d" };
+ List<NameAssignment> assignments = client.Lookup(ids);
+
+ // Check that a, b, and c are registered
+ Assert.AreEqual("a", assignments[0].Identifier);
+ Assert.AreEqual(endpoint1, assignments[0].Endpoint);
+ Assert.AreEqual("b", assignments[1].Identifier);
+ Assert.AreEqual(endpoint2, assignments[1].Endpoint);
+ Assert.AreEqual("c", assignments[2].Identifier);
+ Assert.AreEqual(endpoint3, assignments[2].Endpoint);
+
+ // Check that d is not registered
+ Assert.AreEqual(3, assignments.Count);
+ }
+ }
+ }
+
+ [TestMethod]
+ public void TestNameClientRestart()
+ {
+ int oldPort = 6666;
+ int newPort = 6662;
+ INameServer server = new NameServer(oldPort);
+
+ using (INameClient client = BuildNameClient(server.LocalEndpoint))
+ {
+ IPEndPoint endpoint = new IPEndPoint(IPAddress.Parse("100.0.0.1"), 100);
+
+ client.Register("a", endpoint);
+ Assert.AreEqual(endpoint, client.Lookup("a"));
+
+ server.Dispose();
+
+ server = new NameServer(newPort);
+ client.Restart(server.LocalEndpoint);
+
+ client.Register("b", endpoint);
+ Assert.AreEqual(endpoint, client.Lookup("b"));
+
+ server.Dispose();
+ }
+ }
+
+ [TestMethod]
+ public void TestConstructorInjection()
+ {
+ int port = 6666;
+ using (INameServer server = new NameServer(port))
+ {
+ IConfiguration nameClientConfiguration = NamingConfiguration.ConfigurationModule
+ .Set(NamingConfiguration.NameServerAddress, server.LocalEndpoint.Address.ToString())
+ .Set(NamingConfiguration.NameServerPort, port + string.Empty)
+ .Build();
+
+ ConstructorInjection c = TangFactory.GetTang()
+ .NewInjector(nameClientConfiguration)
+ .GetInstance<ConstructorInjection>();
+
+ Assert.IsNotNull(c);
+ }
+ }
+
+ private INameServer BuildNameServer()
+ {
+ var builder = TangFactory.GetTang()
+ .NewConfigurationBuilder()
+ .BindNamedParameter<NamingConfigurationOptions.NameServerPort, int>(
+ GenericType<NamingConfigurationOptions.NameServerPort>.Class, "0");
+
+ return TangFactory.GetTang().NewInjector(builder.Build()).GetInstance<INameServer>();
+ }
+
+ private INameClient BuildNameClient(IPEndPoint remoteEndpoint)
+ {
+ string nameServerAddr = remoteEndpoint.Address.ToString();
+ int nameServerPort = remoteEndpoint.Port;
+ IConfiguration nameClientConfiguration = NamingConfiguration.ConfigurationModule
+ .Set(NamingConfiguration.NameServerAddress, nameServerAddr)
+ .Set(NamingConfiguration.NameServerPort, nameServerPort + string.Empty)
+ .Build();
+
+ return TangFactory.GetTang().NewInjector(nameClientConfiguration).GetInstance<NameClient>();
+ }
+
+ private class ConstructorInjection
+ {
+ [Inject]
+ public ConstructorInjection(NameClient client)
+ {
+ if (client == null)
+ {
+ throw new ArgumentNullException("client");
+ }
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Tests/Network/NetworkServiceTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Network/NetworkServiceTests.cs b/lang/cs/Org.Apache.REEF.Tests/Network/NetworkServiceTests.cs
new file mode 100644
index 0000000..9b94ee3
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Tests/Network/NetworkServiceTests.cs
@@ -0,0 +1,198 @@
+/**
+ * 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.Concurrent;
+using System.Globalization;
+using System.Linq;
+using System.Net;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Org.Apache.REEF.Common.io;
+using Org.Apache.REEF.Network.Naming;
+using Org.Apache.REEF.Network.NetworkService;
+using Org.Apache.REEF.Tang.Annotations;
+using Org.Apache.REEF.Tang.Implementations.Tang;
+using Org.Apache.REEF.Tang.Util;
+using Org.Apache.REEF.Wake;
+using Org.Apache.REEF.Wake.Remote;
+using Org.Apache.REEF.Wake.Remote.Impl;
+using Org.Apache.REEF.Wake.Util;
+
+namespace Org.Apache.REEF.Tests.Network
+{
+ [TestClass]
+ public class NetworkServiceTests
+ {
+ [TestMethod]
+ public void TestNetworkServiceOneWayCommunication()
+ {
+ int networkServicePort1 = NetworkUtils.GenerateRandomPort(6000, 7000);
+ int networkServicePort2 = NetworkUtils.GenerateRandomPort(7001, 8000);
+
+ BlockingCollection<string> queue = new BlockingCollection<string>();
+
+ using (INameServer nameServer = new NameServer(0))
+ {
+ IPEndPoint endpoint = nameServer.LocalEndpoint;
+ int nameServerPort = endpoint.Port;
+ string nameServerAddr = endpoint.Address.ToString();
+ using (INetworkService<string> networkService1 = BuildNetworkService(networkServicePort1, nameServerPort, nameServerAddr, null))
+ using (INetworkService<string> networkService2 = BuildNetworkService(networkServicePort2, nameServerPort, nameServerAddr, new MessageHandler(queue)))
+ {
+ IIdentifier id1 = new StringIdentifier("service1");
+ IIdentifier id2 = new StringIdentifier("service2");
+ networkService1.Register(id1);
+ networkService2.Register(id2);
+
+ using (IConnection<string> connection = networkService1.NewConnection(id2))
+ {
+ connection.Open();
+ connection.Write("abc");
+ connection.Write("def");
+ connection.Write("ghi");
+
+ Assert.AreEqual("abc", queue.Take());
+ Assert.AreEqual("def", queue.Take());
+ Assert.AreEqual("ghi", queue.Take());
+ }
+ }
+ }
+ }
+
+ [TestMethod]
+ public void TestNetworkServiceTwoWayCommunication()
+ {
+ int networkServicePort1 = NetworkUtils.GenerateRandomPort(6000, 7000);
+ int networkServicePort2 = NetworkUtils.GenerateRandomPort(7001, 8000);
+
+ BlockingCollection<string> queue1 = new BlockingCollection<string>();
+ BlockingCollection<string> queue2 = new BlockingCollection<string>();
+
+ using (INameServer nameServer = new NameServer(0))
+ {
+ IPEndPoint endpoint = nameServer.LocalEndpoint;
+ int nameServerPort = endpoint.Port;
+ string nameServerAddr = endpoint.Address.ToString();
+ using (INetworkService<string> networkService1 = BuildNetworkService(networkServicePort1, nameServerPort, nameServerAddr, new MessageHandler(queue1)))
+ using (INetworkService<string> networkService2 = BuildNetworkService(networkServicePort2, nameServerPort, nameServerAddr, new MessageHandler(queue2)))
+ {
+ IIdentifier id1 = new StringIdentifier("service1");
+ IIdentifier id2 = new StringIdentifier("service2");
+ networkService1.Register(id1);
+ networkService2.Register(id2);
+
+ using (IConnection<string> connection1 = networkService1.NewConnection(id2))
+ using (IConnection<string> connection2 = networkService2.NewConnection(id1))
+ {
+ connection1.Open();
+ connection1.Write("abc");
+ connection1.Write("def");
+ connection1.Write("ghi");
+
+ connection2.Open();
+ connection2.Write("jkl");
+ connection2.Write("mno");
+
+ Assert.AreEqual("abc", queue2.Take());
+ Assert.AreEqual("def", queue2.Take());
+ Assert.AreEqual("ghi", queue2.Take());
+
+ Assert.AreEqual("jkl", queue1.Take());
+ Assert.AreEqual("mno", queue1.Take());
+ }
+ }
+ }
+ }
+
+ private INetworkService<string> BuildNetworkService(
+ int networkServicePort,
+ int nameServicePort,
+ string nameServiceAddr,
+ IObserver<NsMessage<string>> handler)
+ {
+ // Test injection
+ if (handler == null)
+ {
+ var networkServiceConf = TangFactory.GetTang().NewConfigurationBuilder()
+ .BindNamedParameter<NetworkServiceOptions.NetworkServicePort, int>(
+ GenericType<NetworkServiceOptions.NetworkServicePort>.Class,
+ networkServicePort.ToString(CultureInfo.CurrentCulture))
+ .BindNamedParameter<NamingConfigurationOptions.NameServerPort, int>(
+ GenericType<NamingConfigurationOptions.NameServerPort>.Class,
+ nameServicePort.ToString(CultureInfo.CurrentCulture))
+ .BindNamedParameter<NamingConfigurationOptions.NameServerAddress, string>(
+ GenericType<NamingConfigurationOptions.NameServerAddress>.Class,
+ nameServiceAddr)
+ .BindImplementation(GenericType<ICodec<string>>.Class, GenericType<StringCodec>.Class)
+ .BindImplementation(GenericType<IObserver<NsMessage<string>>>.Class, GenericType<NetworkMessageHandler>.Class)
+ .Build();
+
+ return TangFactory.GetTang().NewInjector(networkServiceConf).GetInstance<NetworkService<string>>();
+ }
+
+ return new NetworkService<string>(networkServicePort, nameServiceAddr, nameServicePort,
+ handler, new StringIdentifierFactory(), new StringCodec());
+ }
+
+ private class MessageHandler : IObserver<NsMessage<string>>
+ {
+ private BlockingCollection<string> _queue;
+
+ public MessageHandler(BlockingCollection<string> queue)
+ {
+ _queue = queue;
+ }
+
+ public void OnNext(NsMessage<string> value)
+ {
+ _queue.Add(value.Data.First());
+ }
+
+ public void OnError(Exception error)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void OnCompleted()
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ private class NetworkMessageHandler : IObserver<NsMessage<string>>
+ {
+ [Inject]
+ public NetworkMessageHandler()
+ {
+ }
+
+ public void OnNext(NsMessage<string> value)
+ {
+ }
+
+ public void OnError(Exception error)
+ {
+ }
+
+ public void OnCompleted()
+ {
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Tests/Org.Apache.REEF.Tests.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Org.Apache.REEF.Tests.csproj b/lang/cs/Org.Apache.REEF.Tests/Org.Apache.REEF.Tests.csproj
new file mode 100644
index 0000000..83fc29b
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Tests/Org.Apache.REEF.Tests.csproj
@@ -0,0 +1,213 @@
+<?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>{988F90CF-A48D-4938-A4D2-FA3B758FB5A7}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Org.Apache.REEF.Tests</RootNamespace>
+ <AssemblyName>Org.Apache.REEF.Tests</AssemblyName>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
+ <RestorePackages>true</RestorePackages>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\bin\$(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>..\bin\$(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>..\bin\$(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>..\bin\$(Platform)\$(Configuration)\$(RootNamespace)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Microsoft.Data.Edm, Version=5.6.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\Microsoft.Data.Edm.5.6.3\lib\net40\Microsoft.Data.Edm.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.Data.OData, Version=5.6.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\Microsoft.Data.OData.5.6.3\lib\net40\Microsoft.Data.OData.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.Data.Services.Client, Version=5.6.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\Microsoft.Data.Services.Client.5.6.3\lib\net40\Microsoft.Data.Services.Client.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.Hadoop.Avro">
+ <HintPath>..\packages\Microsoft.Hadoop.Avro.1.4.0.0\lib\net40\Microsoft.Hadoop.Avro.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+ <Reference Include="Microsoft.WindowsAzure.Configuration">
+ <HintPath>..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.WindowsAzure.Storage">
+ <HintPath>..\packages\WindowsAzure.Storage.4.3.0\lib\net40\Microsoft.WindowsAzure.Storage.dll</HintPath>
+ </Reference>
+ <Reference Include="Newtonsoft.Json">
+ <HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
+ </Reference>
+ <Reference Include="protobuf-net">
+ <HintPath>..\packages\protobuf-net.2.0.0.668\lib\net40\protobuf-net.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Reactive.Core">
+ <HintPath>..\packages\Rx-Core.2.2.5\lib\net45\System.Reactive.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Reactive.Interfaces">
+ <HintPath>..\packages\Rx-Interfaces.2.2.5\lib\net45\System.Reactive.Interfaces.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Spatial, Version=5.6.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\System.Spatial.5.6.3\lib\net40\System.Spatial.dll</HintPath>
+ </Reference>
+ <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\EvaluatorConfigurationsTests.cs" />
+ <Compile Include="Evaluator\EvaluatorTests.cs" />
+ <Compile Include="Functional\Bridge\TestBridgeClient.cs" />
+ <Compile Include="Functional\Bridge\TestHelloBridgeHandlers.cs" />
+ <Compile Include="Functional\Bridge\TestSimpleEventHandlers.cs" />
+ <Compile Include="Functional\Driver\DriverTestStartHandler.cs" />
+ <Compile Include="Functional\Driver\TestDriver.cs" />
+ <Compile Include="Functional\Messaging\MessageDriver.cs" />
+ <Compile Include="Functional\Messaging\MessageTask.cs" />
+ <Compile Include="Functional\Messaging\TestTaskMessage.cs" />
+ <Compile Include="Functional\ReefFunctionalTest.cs" />
+ <Compile Include="Network\BlockingCollectionExtensionTests.cs" />
+ <Compile Include="Network\NameServerTests.cs" />
+ <Compile Include="Network\NetworkServiceTests.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Utility\TestDriverConfigGenerator.cs" />
+ <Compile Include="Utility\TestExceptions.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="bin\run.cmd">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </None>
+ <None Include="ConfigFiles\evaluator.conf">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </None>
+ <None Include="packages.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Org.Apache.REEF.Client\Org.Apache.REEF.Client.csproj">
+ <Project>{5094c35b-4fdb-4322-ac05-45d684501cbf}</Project>
+ <Name>Org.Apache.REEF.Client</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.Evaluator\Org.Apache.REEF.Evaluator.csproj">
+ <Project>{1b983182-9c30-464c-948d-f87eb93a8240}</Project>
+ <Name>Org.Apache.REEF.Evaluator</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Org.Apache.REEF.Examples.HelloCLRBridge\Org.Apache.REEF.Examples.HelloCLRBridge.csproj">
+ <Project>{a78dd8e8-31d0-4506-8738-daa9da86d55b}</Project>
+ <Name>Org.Apache.REEF.Examples.HelloCLRBridge</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Org.Apache.REEF.Examples.RetainedEvalCLRBridge\Org.Apache.REEF.Examples.RetainedEvalCLRBridge.csproj">
+ <Project>{05ec65cf-848d-49ab-9e67-57c14ea63044}</Project>
+ <Name>Org.Apache.REEF.Examples.RetainedEvalCLRBridge</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Org.Apache.REEF.Examples.Tasks\Org.Apache.REEF.Examples.Tasks.csproj">
+ <Project>{75503f90-7b82-4762-9997-94b5c68f15db}</Project>
+ <Name>Org.Apache.REEF.Examples.Tasks</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.Tang\Org.Apache.REEF.Tang.csproj">
+ <Project>{97dbb573-3994-417a-9f69-ffa25f00d2a6}</Project>
+ <Name>Org.Apache.REEF.Tang</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\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.Wake\Org.Apache.REEF.Wake.csproj">
+ <Project>{cdfb3464-4041-42b1-9271-83af24cd5008}</Project>
+ <Name>Org.Apache.REEF.Wake</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="bin\reef-bridge-0.11.0-incubating-SNAPSHOT-shaded.jar">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="bin\Debug\" />
+ <Folder Include="bin\Release\" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </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/05766f9d/lang/cs/Org.Apache.REEF.Tests/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Properties/AssemblyInfo.cs b/lang/cs/Org.Apache.REEF.Tests/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..ab783f0
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Tests/Properties/AssemblyInfo.cs
@@ -0,0 +1,55 @@
+/**
+ * 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("Org.Apache.REEF.Tests")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Org.Apache.REEF.Tests")]
+[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("19ebceb4-3b1f-466b-9127-aa14e636d723")]
+
+// 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/05766f9d/lang/cs/Org.Apache.REEF.Tests/Utility/TestDriverConfigGenerator.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Utility/TestDriverConfigGenerator.cs b/lang/cs/Org.Apache.REEF.Tests/Utility/TestDriverConfigGenerator.cs
new file mode 100644
index 0000000..f3eac66
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Tests/Utility/TestDriverConfigGenerator.cs
@@ -0,0 +1,101 @@
+/**
+ * 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 Microsoft.VisualStudio.TestTools.UnitTesting;
+using Org.Apache.REEF.Driver;
+
+namespace Org.Apache.REEF.Tests.Utility
+{
+ [TestClass]
+ public class TestDriverConfigGenerator
+ {
+ [TestMethod]
+ public void TestGeneratingFullDriverConfigFile()
+ {
+ DriverConfigurationSettings driverSubmissionSettings = new DriverConfigurationSettings()
+ {
+ DriverMemory = 1024,
+ DriverIdentifier = "juliaDriverId",
+ SubmissionDirectory = "reefClrBridgeTmp/job_" + Guid.NewGuid().ToString("N").Substring(0, 8),
+ IncludingHttpServer = true,
+ IncludingNameServer = true,
+ //ClrFolder = "C:\\Reef\\ReefApache\\incubator-reef\\reef-bridge-project\\reef-bridge\\dotnetHello",
+ ClrFolder = ".",
+ JarFileFolder = ".\\bin\\"
+ };
+
+ DriverConfigGenerator.DriverConfigurationBuilder(driverSubmissionSettings);
+ }
+
+ [TestMethod]
+ public void TestGeneratingDriverConfigFileWithoutHttp()
+ {
+ DriverConfigurationSettings driverSubmissionSettings = new DriverConfigurationSettings()
+ {
+ DriverMemory = 1024,
+ DriverIdentifier = "juliaDriverId",
+ SubmissionDirectory = "reefClrBridgeTmp/job_" + Guid.NewGuid().ToString("N").Substring(0, 8),
+ IncludingHttpServer = false,
+ IncludingNameServer = true,
+// ClrFolder = "C:\\Reef\\ReefApache\\incubator-reef\\reef-bridge-project\\reef-bridge\\dotnetHello",
+ ClrFolder = ".",
+ JarFileFolder = ".\\bin\\"
+ };
+
+ DriverConfigGenerator.DriverConfigurationBuilder(driverSubmissionSettings);
+ }
+
+ [TestMethod]
+ public void TestGeneratingDriverConfigFileWithoutNameServer()
+ {
+ DriverConfigurationSettings driverSubmissionSettings = new DriverConfigurationSettings()
+ {
+ DriverMemory = 1024,
+ DriverIdentifier = "juliaDriverId",
+ SubmissionDirectory = "reefClrBridgeTmp/job_" + Guid.NewGuid().ToString("N").Substring(0, 8),
+ IncludingHttpServer = true,
+ IncludingNameServer = false,
+ //ClrFolder = "C:\\Reef\\ReefApache\\incubator-reef\\reef-bridge-project\\reef-bridge\\dotnetHello",
+ ClrFolder = ".",
+ JarFileFolder = ".\\bin\\"
+ };
+
+ DriverConfigGenerator.DriverConfigurationBuilder(driverSubmissionSettings);
+ }
+
+ [TestMethod]
+ public void TestGeneratingDriverConfigFileDriverOnly()
+ {
+ DriverConfigurationSettings driverSubmissionSettings = new DriverConfigurationSettings()
+ {
+ DriverMemory = 1024,
+ DriverIdentifier = "juliaDriverId",
+ SubmissionDirectory = "reefClrBridgeTmp/job_" + Guid.NewGuid().ToString("N").Substring(0, 8),
+ IncludingHttpServer = false,
+ IncludingNameServer = false,
+ //ClrFolder = "C:\\Reef\\ReefApache\\incubator-reef\\reef-bridge-project\\reef-bridge\\dotnetHello",
+ ClrFolder = ".",
+ JarFileFolder = ".\\bin\\"
+ };
+
+ DriverConfigGenerator.DriverConfigurationBuilder(driverSubmissionSettings);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Tests/Utility/TestExceptions.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Utility/TestExceptions.cs b/lang/cs/Org.Apache.REEF.Tests/Utility/TestExceptions.cs
new file mode 100644
index 0000000..db22873
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Tests/Utility/TestExceptions.cs
@@ -0,0 +1,49 @@
+/**
+ * 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 Microsoft.VisualStudio.TestTools.UnitTesting;
+using Org.Apache.REEF.Utilities.Diagnostics;
+using Org.Apache.REEF.Utilities.Logging;
+
+namespace Org.Apache.REEF.Tests.Utility
+{
+ [TestClass]
+ public class TestExceptions
+ {
+ private static readonly Logger LOGGER = Logger.GetLogger(typeof(TestExceptions));
+
+ [TestMethod]
+ public void TestThrowCaught()
+ {
+ string msg = null;
+ try
+ {
+ Exceptions.Throw(new ApplicationException("test"), LOGGER);
+ msg = "not supposed to reach here";
+ Assert.Fail(msg);
+ }
+ catch (ApplicationException e)
+ {
+ Exceptions.Caught(e, Level.Info, LOGGER);
+ }
+ Assert.IsNull(msg);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Tests/bin/reef-bridge-0.11.0-incubating-SNAPSHOT-shaded.jar
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/bin/reef-bridge-0.11.0-incubating-SNAPSHOT-shaded.jar b/lang/cs/Org.Apache.REEF.Tests/bin/reef-bridge-0.11.0-incubating-SNAPSHOT-shaded.jar
new file mode 100644
index 0000000..437d140
Binary files /dev/null and b/lang/cs/Org.Apache.REEF.Tests/bin/reef-bridge-0.11.0-incubating-SNAPSHOT-shaded.jar differ
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Tests/bin/run.cmd
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/bin/run.cmd b/lang/cs/Org.Apache.REEF.Tests/bin/run.cmd
new file mode 100644
index 0000000..ddff8a7
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Tests/bin/run.cmd
@@ -0,0 +1,45 @@
+@REM
+@REM Copyright (C) 2013 Microsoft Corporation
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+@REM
+
+@echo off
+::
+:: Copyright (C) 2013 Microsoft Corporation
+::
+:: Licensed 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.
+::
+
+
+:: RUNTIME
+set SHADED_JAR=bin\reef-bridge-0.11.0-incubating-SNAPSHOT-shaded.jar
+
+set LOGGING_CONFIG=-Djava.util.logging.config.class=org.apache.reef.util.logging.Config
+
+set CLASSPATH=%HADOOP_HOME%\share\hadoop\hdfs\lib\*;%HADOOP_HOME%\share\hadoop\hdfs\*;%HADOOP_HOME%\share\hadoop\common\*;%HADOOP_HOME%\share\hadoop\common\lib\*;%HADOOP_HOME%\share\hadoop\mapreduce\lib\*;%HADOOP_HOME%\share\hadoop\mapreduce\*;%HADOOP_HOME%\share\hadoop\yarn\*;%HADOOP_HOME%\share\hadoop\yarn\lib\*
+
+set CMD=%JAVA_HOME%\bin\java.exe -cp %HADOOP_HOME%\etc\hadoop;%SHADED_JAR%;%CLASSPATH% %*
+::%LOGGING_CONFIG%
+echo %CMD%
+%CMD%
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Tests/packages.config
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/packages.config b/lang/cs/Org.Apache.REEF.Tests/packages.config
new file mode 100644
index 0000000..ef4860c
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Tests/packages.config
@@ -0,0 +1,32 @@
+<?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="Microsoft.Data.Edm" version="5.6.3" targetFramework="net45" />
+ <package id="Microsoft.Data.OData" version="5.6.3" targetFramework="net45" />
+ <package id="Microsoft.Data.Services.Client" version="5.6.3" targetFramework="net45" />
+ <package id="Microsoft.Hadoop.Avro" version="1.4.0.0" targetFramework="net45" />
+ <package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
+ <package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
+ <package id="protobuf-net" version="2.0.0.668" targetFramework="net45" />
+ <package id="Rx-Core" version="2.2.5" targetFramework="net45" />
+ <package id="Rx-Interfaces" version="2.2.5" targetFramework="net45" />
+ <package id="System.Spatial" version="5.6.3" targetFramework="net45" />
+ <package id="WindowsAzure.Storage" version="4.3.0" targetFramework="net45" />
+</packages>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.Reef.Utilities.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.Reef.Utilities.csproj b/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.Reef.Utilities.csproj
index 27899de..43003f8 100644
--- a/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.Reef.Utilities.csproj
+++ b/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.Reef.Utilities.csproj
@@ -30,7 +30,7 @@ under the License.
<RestorePackages>true</RestorePackages>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
</PropertyGroup>
- <Import Project="$(SolutionDir)\Source\build.props" />
+ <Import Project="$(SolutionDir)\build.props" />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Wake/Org.Apache.REEF.Wake.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Org.Apache.REEF.Wake.csproj b/lang/cs/Org.Apache.REEF.Wake/Org.Apache.REEF.Wake.csproj
index f383707..0657a1c 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Org.Apache.REEF.Wake.csproj
+++ b/lang/cs/Org.Apache.REEF.Wake/Org.Apache.REEF.Wake.csproj
@@ -30,7 +30,7 @@ under the License.
<RestorePackages>true</RestorePackages>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
</PropertyGroup>
- <Import Project="$(SolutionDir)\Source\build.props" />
+ <Import Project="$(SolutionDir)\build.props" />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.sln
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.sln b/lang/cs/Org.Apache.REEF.sln
new file mode 100644
index 0000000..8ab396d
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.sln
@@ -0,0 +1,195 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.21005.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{2B7EE9D5-CA54-4204-B89D-B48A7FC6E3CD}"
+ ProjectSection(SolutionItems) = preProject
+ .nuget\NuGet.Config = .nuget\NuGet.Config
+ .nuget\NuGet.exe = .nuget\NuGet.exe
+ .nuget\NuGet.targets = .nuget\NuGet.targets
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Tang", "Org.Apache.REEF.Tang\Org.Apache.REEF.Tang.csproj", "{97DBB573-3994-417A-9F69-FFA25F00D2A6}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Tang.Examples", "Org.Apache.REEF.Tang.Examples\Org.Apache.REEF.Tang.Examples.csproj", "{711B7F32-196E-4C21-9DBD-AD59C4A7CF77}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Tang.Tests", "Org.Apache.REEF.Tang.Tests\Org.Apache.REEF.Tang.Tests.csproj", "{D5EB94D0-3ABA-4853-9050-E36B196E17D2}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Tang.Tools", "Org.Apache.REEF.Tang.Tools\Org.Apache.REEF.Tang.Tools.csproj", "{34A9CD98-0D15-4CA0-AEA5-E53593A31047}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Utilities", "Org.Apache.REEF.Utilities\Org.Apache.REEF.Utilities.csproj", "{79E7F89A-1DFB-45E1-8D43-D71A954AEB98}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Wake", "Org.Apache.REEF.Wake\Org.Apache.REEF.Wake.csproj", "{CDFB3464-4041-42B1-9271-83AF24CD5008}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Wake.Tests", "Org.Apache.REEF.Wake.Tests\Org.Apache.REEF.Wake.Tests.csproj", "{214C64C6-04E5-4867-B69A-E3502EA50871}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Common", "Org.Apache.REEF.Common\Org.Apache.REEF.Common.csproj", "{545A0582-4105-44CE-B99C-B1379514A630}"
+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
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Examples.RetainedEvalCLRBridge", "Org.Apache.REEF.Examples.RetainedEvalCLRBridge\Org.Apache.REEF.Examples.RetainedEvalCLRBridge.csproj", "{05EC65CF-848D-49AB-9E67-57C14EA63044}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Examples.HelloCLRBridge", "Org.Apache.REEF.Examples.HelloCLRBridge\Org.Apache.REEF.Examples.HelloCLRBridge.csproj", "{A78DD8E8-31D0-4506-8738-DAA9DA86D55B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Examples.Tasks", "Org.Apache.REEF.Examples.Tasks\Org.Apache.REEF.Examples.Tasks.csproj", "{75503F90-7B82-4762-9997-94B5C68F15DB}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Client", "Org.Apache.REEF.Client\Org.Apache.REEF.Client.csproj", "{5094C35B-4FDB-4322-AC05-45D684501CBF}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Tests", "Org.Apache.REEF.Tests\Org.Apache.REEF.Tests.csproj", "{988F90CF-A48D-4938-A4D2-FA3B758FB5A7}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.All", "Org.Apache.REEF.All\Org.Apache.REEF.All.csproj", "{4C137C79-3A28-47D2-BFB9-A3CAB1EEDACE}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {97DBB573-3994-417A-9F69-FFA25F00D2A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {97DBB573-3994-417A-9F69-FFA25F00D2A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {97DBB573-3994-417A-9F69-FFA25F00D2A6}.Debug|x64.ActiveCfg = Debug|x64
+ {97DBB573-3994-417A-9F69-FFA25F00D2A6}.Debug|x64.Build.0 = Debug|x64
+ {97DBB573-3994-417A-9F69-FFA25F00D2A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {97DBB573-3994-417A-9F69-FFA25F00D2A6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {97DBB573-3994-417A-9F69-FFA25F00D2A6}.Release|x64.ActiveCfg = Release|x64
+ {97DBB573-3994-417A-9F69-FFA25F00D2A6}.Release|x64.Build.0 = Release|x64
+ {711B7F32-196E-4C21-9DBD-AD59C4A7CF77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {711B7F32-196E-4C21-9DBD-AD59C4A7CF77}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {711B7F32-196E-4C21-9DBD-AD59C4A7CF77}.Debug|x64.ActiveCfg = Debug|x64
+ {711B7F32-196E-4C21-9DBD-AD59C4A7CF77}.Debug|x64.Build.0 = Debug|x64
+ {711B7F32-196E-4C21-9DBD-AD59C4A7CF77}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {711B7F32-196E-4C21-9DBD-AD59C4A7CF77}.Release|Any CPU.Build.0 = Release|Any CPU
+ {711B7F32-196E-4C21-9DBD-AD59C4A7CF77}.Release|x64.ActiveCfg = Release|x64
+ {711B7F32-196E-4C21-9DBD-AD59C4A7CF77}.Release|x64.Build.0 = Release|x64
+ {D5EB94D0-3ABA-4853-9050-E36B196E17D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D5EB94D0-3ABA-4853-9050-E36B196E17D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D5EB94D0-3ABA-4853-9050-E36B196E17D2}.Debug|x64.ActiveCfg = Debug|x64
+ {D5EB94D0-3ABA-4853-9050-E36B196E17D2}.Debug|x64.Build.0 = Debug|x64
+ {D5EB94D0-3ABA-4853-9050-E36B196E17D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D5EB94D0-3ABA-4853-9050-E36B196E17D2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D5EB94D0-3ABA-4853-9050-E36B196E17D2}.Release|x64.ActiveCfg = Release|x64
+ {D5EB94D0-3ABA-4853-9050-E36B196E17D2}.Release|x64.Build.0 = Release|x64
+ {34A9CD98-0D15-4CA0-AEA5-E53593A31047}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {34A9CD98-0D15-4CA0-AEA5-E53593A31047}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {34A9CD98-0D15-4CA0-AEA5-E53593A31047}.Debug|x64.ActiveCfg = Debug|x64
+ {34A9CD98-0D15-4CA0-AEA5-E53593A31047}.Debug|x64.Build.0 = Debug|x64
+ {34A9CD98-0D15-4CA0-AEA5-E53593A31047}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {34A9CD98-0D15-4CA0-AEA5-E53593A31047}.Release|Any CPU.Build.0 = Release|Any CPU
+ {34A9CD98-0D15-4CA0-AEA5-E53593A31047}.Release|x64.ActiveCfg = Release|x64
+ {34A9CD98-0D15-4CA0-AEA5-E53593A31047}.Release|x64.Build.0 = Release|x64
+ {79E7F89A-1DFB-45E1-8D43-D71A954AEB98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {79E7F89A-1DFB-45E1-8D43-D71A954AEB98}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {79E7F89A-1DFB-45E1-8D43-D71A954AEB98}.Debug|x64.ActiveCfg = Debug|x64
+ {79E7F89A-1DFB-45E1-8D43-D71A954AEB98}.Debug|x64.Build.0 = Debug|x64
+ {79E7F89A-1DFB-45E1-8D43-D71A954AEB98}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {79E7F89A-1DFB-45E1-8D43-D71A954AEB98}.Release|Any CPU.Build.0 = Release|Any CPU
+ {79E7F89A-1DFB-45E1-8D43-D71A954AEB98}.Release|x64.ActiveCfg = Release|x64
+ {79E7F89A-1DFB-45E1-8D43-D71A954AEB98}.Release|x64.Build.0 = Release|x64
+ {CDFB3464-4041-42B1-9271-83AF24CD5008}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CDFB3464-4041-42B1-9271-83AF24CD5008}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CDFB3464-4041-42B1-9271-83AF24CD5008}.Debug|x64.ActiveCfg = Debug|x64
+ {CDFB3464-4041-42B1-9271-83AF24CD5008}.Debug|x64.Build.0 = Debug|x64
+ {CDFB3464-4041-42B1-9271-83AF24CD5008}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CDFB3464-4041-42B1-9271-83AF24CD5008}.Release|Any CPU.Build.0 = Release|Any CPU
+ {CDFB3464-4041-42B1-9271-83AF24CD5008}.Release|x64.ActiveCfg = Release|x64
+ {CDFB3464-4041-42B1-9271-83AF24CD5008}.Release|x64.Build.0 = Release|x64
+ {214C64C6-04E5-4867-B69A-E3502EA50871}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {214C64C6-04E5-4867-B69A-E3502EA50871}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {214C64C6-04E5-4867-B69A-E3502EA50871}.Debug|x64.ActiveCfg = Debug|x64
+ {214C64C6-04E5-4867-B69A-E3502EA50871}.Debug|x64.Build.0 = Debug|x64
+ {214C64C6-04E5-4867-B69A-E3502EA50871}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {214C64C6-04E5-4867-B69A-E3502EA50871}.Release|Any CPU.Build.0 = Release|Any CPU
+ {214C64C6-04E5-4867-B69A-E3502EA50871}.Release|x64.ActiveCfg = Release|x64
+ {214C64C6-04E5-4867-B69A-E3502EA50871}.Release|x64.Build.0 = Release|x64
+ {545A0582-4105-44CE-B99C-B1379514A630}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {545A0582-4105-44CE-B99C-B1379514A630}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {545A0582-4105-44CE-B99C-B1379514A630}.Debug|x64.ActiveCfg = Debug|x64
+ {545A0582-4105-44CE-B99C-B1379514A630}.Debug|x64.Build.0 = Debug|x64
+ {545A0582-4105-44CE-B99C-B1379514A630}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {545A0582-4105-44CE-B99C-B1379514A630}.Release|Any CPU.Build.0 = Release|Any CPU
+ {545A0582-4105-44CE-B99C-B1379514A630}.Release|x64.ActiveCfg = Release|x64
+ {545A0582-4105-44CE-B99C-B1379514A630}.Release|x64.Build.0 = Release|x64
+ {A6BAA2A7-F52F-4329-884E-1BCF711D6805}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A6BAA2A7-F52F-4329-884E-1BCF711D6805}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A6BAA2A7-F52F-4329-884E-1BCF711D6805}.Debug|x64.ActiveCfg = Debug|x64
+ {A6BAA2A7-F52F-4329-884E-1BCF711D6805}.Debug|x64.Build.0 = Debug|x64
+ {A6BAA2A7-F52F-4329-884E-1BCF711D6805}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {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
+ {05EC65CF-848D-49AB-9E67-57C14EA63044}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {05EC65CF-848D-49AB-9E67-57C14EA63044}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {05EC65CF-848D-49AB-9E67-57C14EA63044}.Debug|x64.ActiveCfg = Debug|x64
+ {05EC65CF-848D-49AB-9E67-57C14EA63044}.Debug|x64.Build.0 = Debug|x64
+ {05EC65CF-848D-49AB-9E67-57C14EA63044}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {05EC65CF-848D-49AB-9E67-57C14EA63044}.Release|Any CPU.Build.0 = Release|Any CPU
+ {05EC65CF-848D-49AB-9E67-57C14EA63044}.Release|x64.ActiveCfg = Release|x64
+ {05EC65CF-848D-49AB-9E67-57C14EA63044}.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
+ {A78DD8E8-31D0-4506-8738-DAA9DA86D55B}.Debug|x64.Build.0 = Debug|x64
+ {A78DD8E8-31D0-4506-8738-DAA9DA86D55B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A78DD8E8-31D0-4506-8738-DAA9DA86D55B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A78DD8E8-31D0-4506-8738-DAA9DA86D55B}.Release|x64.ActiveCfg = Release|x64
+ {A78DD8E8-31D0-4506-8738-DAA9DA86D55B}.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
+ {75503F90-7B82-4762-9997-94B5C68F15DB}.Debug|x64.Build.0 = Debug|x64
+ {75503F90-7B82-4762-9997-94B5C68F15DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {75503F90-7B82-4762-9997-94B5C68F15DB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {75503F90-7B82-4762-9997-94B5C68F15DB}.Release|x64.ActiveCfg = Release|x64
+ {75503F90-7B82-4762-9997-94B5C68F15DB}.Release|x64.Build.0 = Release|x64
+ {5094C35B-4FDB-4322-AC05-45D684501CBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5094C35B-4FDB-4322-AC05-45D684501CBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5094C35B-4FDB-4322-AC05-45D684501CBF}.Debug|x64.ActiveCfg = Debug|x64
+ {5094C35B-4FDB-4322-AC05-45D684501CBF}.Debug|x64.Build.0 = Debug|x64
+ {5094C35B-4FDB-4322-AC05-45D684501CBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {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
+ {988F90CF-A48D-4938-A4D2-FA3B758FB5A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {988F90CF-A48D-4938-A4D2-FA3B758FB5A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {988F90CF-A48D-4938-A4D2-FA3B758FB5A7}.Debug|x64.ActiveCfg = Debug|x64
+ {988F90CF-A48D-4938-A4D2-FA3B758FB5A7}.Debug|x64.Build.0 = Debug|x64
+ {988F90CF-A48D-4938-A4D2-FA3B758FB5A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {988F90CF-A48D-4938-A4D2-FA3B758FB5A7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {988F90CF-A48D-4938-A4D2-FA3B758FB5A7}.Release|x64.ActiveCfg = Release|x64
+ {988F90CF-A48D-4938-A4D2-FA3B758FB5A7}.Release|x64.Build.0 = Release|x64
+ {4C137C79-3A28-47D2-BFB9-A3CAB1EEDACE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4C137C79-3A28-47D2-BFB9-A3CAB1EEDACE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4C137C79-3A28-47D2-BFB9-A3CAB1EEDACE}.Debug|x64.ActiveCfg = Debug|x64
+ {4C137C79-3A28-47D2-BFB9-A3CAB1EEDACE}.Debug|x64.Build.0 = Debug|x64
+ {4C137C79-3A28-47D2-BFB9-A3CAB1EEDACE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4C137C79-3A28-47D2-BFB9-A3CAB1EEDACE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4C137C79-3A28-47D2-BFB9-A3CAB1EEDACE}.Release|x64.ActiveCfg = Release|x64
+ {4C137C79-3A28-47D2-BFB9-A3CAB1EEDACE}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
[2/4] incubator-reef git commit: [REEF-146] Changing .Net project
structure for Reef tests, reef client and Reef all
Posted by we...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/ReefDotNet.sln
----------------------------------------------------------------------
diff --git a/lang/cs/ReefDotNet.sln b/lang/cs/ReefDotNet.sln
deleted file mode 100644
index 0f08c22..0000000
--- a/lang/cs/ReefDotNet.sln
+++ /dev/null
@@ -1,195 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-VisualStudioVersion = 12.0.21005.1
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{2B7EE9D5-CA54-4204-B89D-B48A7FC6E3CD}"
- ProjectSection(SolutionItems) = preProject
- .nuget\NuGet.Config = .nuget\NuGet.Config
- .nuget\NuGet.exe = .nuget\NuGet.exe
- .nuget\NuGet.targets = .nuget\NuGet.targets
- EndProjectSection
-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}") = "ReefAll", "Source\Tools\ReefAll\ReefAll.csproj", "{4C137C79-3A28-47D2-BFB9-A3CAB1EEDACE}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReefTests", "Tests\ReefTests\ReefTests.csproj", "{988F90CF-A48D-4938-A4D2-FA3B758FB5A7}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Tang", "Org.Apache.REEF.Tang\Org.Apache.REEF.Tang.csproj", "{97DBB573-3994-417A-9F69-FFA25F00D2A6}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Tang.Examples", "Org.Apache.REEF.Tang.Examples\Org.Apache.REEF.Tang.Examples.csproj", "{711B7F32-196E-4C21-9DBD-AD59C4A7CF77}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Tang.Tests", "Org.Apache.REEF.Tang.Tests\Org.Apache.REEF.Tang.Tests.csproj", "{D5EB94D0-3ABA-4853-9050-E36B196E17D2}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Tang.Tools", "Org.Apache.REEF.Tang.Tools\Org.Apache.REEF.Tang.Tools.csproj", "{34A9CD98-0D15-4CA0-AEA5-E53593A31047}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Utilities", "Org.Apache.REEF.Utilities\Org.Apache.REEF.Utilities.csproj", "{79E7F89A-1DFB-45E1-8D43-D71A954AEB98}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Wake", "Org.Apache.REEF.Wake\Org.Apache.REEF.Wake.csproj", "{CDFB3464-4041-42B1-9271-83AF24CD5008}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Wake.Tests", "Org.Apache.REEF.Wake.Tests\Org.Apache.REEF.Wake.Tests.csproj", "{214C64C6-04E5-4867-B69A-E3502EA50871}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Common", "Org.Apache.REEF.Common\Org.Apache.REEF.Common.csproj", "{545A0582-4105-44CE-B99C-B1379514A630}"
-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
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Examples.RetainedEvalCLRBridge", "Org.Apache.REEF.Examples.RetainedEvalCLRBridge\Org.Apache.REEF.Examples.RetainedEvalCLRBridge.csproj", "{05EC65CF-848D-49AB-9E67-57C14EA63044}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Examples.HelloCLRBridge", "Org.Apache.REEF.Examples.HelloCLRBridge\Org.Apache.REEF.Examples.HelloCLRBridge.csproj", "{A78DD8E8-31D0-4506-8738-DAA9DA86D55B}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.Apache.REEF.Examples.Tasks", "Org.Apache.REEF.Examples.Tasks\Org.Apache.REEF.Examples.Tasks.csproj", "{75503F90-7B82-4762-9997-94B5C68F15DB}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {5094C35B-4FDB-4322-AC05-45D684501CBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {5094C35B-4FDB-4322-AC05-45D684501CBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {5094C35B-4FDB-4322-AC05-45D684501CBF}.Debug|x64.ActiveCfg = Debug|x64
- {5094C35B-4FDB-4322-AC05-45D684501CBF}.Debug|x64.Build.0 = Debug|x64
- {5094C35B-4FDB-4322-AC05-45D684501CBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {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
- {4C137C79-3A28-47D2-BFB9-A3CAB1EEDACE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4C137C79-3A28-47D2-BFB9-A3CAB1EEDACE}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4C137C79-3A28-47D2-BFB9-A3CAB1EEDACE}.Debug|x64.ActiveCfg = Debug|x64
- {4C137C79-3A28-47D2-BFB9-A3CAB1EEDACE}.Debug|x64.Build.0 = Debug|x64
- {4C137C79-3A28-47D2-BFB9-A3CAB1EEDACE}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4C137C79-3A28-47D2-BFB9-A3CAB1EEDACE}.Release|Any CPU.Build.0 = Release|Any CPU
- {4C137C79-3A28-47D2-BFB9-A3CAB1EEDACE}.Release|x64.ActiveCfg = Release|x64
- {4C137C79-3A28-47D2-BFB9-A3CAB1EEDACE}.Release|x64.Build.0 = Release|x64
- {988F90CF-A48D-4938-A4D2-FA3B758FB5A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {988F90CF-A48D-4938-A4D2-FA3B758FB5A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {988F90CF-A48D-4938-A4D2-FA3B758FB5A7}.Debug|x64.ActiveCfg = Debug|x64
- {988F90CF-A48D-4938-A4D2-FA3B758FB5A7}.Debug|x64.Build.0 = Debug|x64
- {988F90CF-A48D-4938-A4D2-FA3B758FB5A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {988F90CF-A48D-4938-A4D2-FA3B758FB5A7}.Release|Any CPU.Build.0 = Release|Any CPU
- {988F90CF-A48D-4938-A4D2-FA3B758FB5A7}.Release|x64.ActiveCfg = Release|x64
- {988F90CF-A48D-4938-A4D2-FA3B758FB5A7}.Release|x64.Build.0 = Release|x64
- {97DBB573-3994-417A-9F69-FFA25F00D2A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {97DBB573-3994-417A-9F69-FFA25F00D2A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {97DBB573-3994-417A-9F69-FFA25F00D2A6}.Debug|x64.ActiveCfg = Debug|x64
- {97DBB573-3994-417A-9F69-FFA25F00D2A6}.Debug|x64.Build.0 = Debug|x64
- {97DBB573-3994-417A-9F69-FFA25F00D2A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {97DBB573-3994-417A-9F69-FFA25F00D2A6}.Release|Any CPU.Build.0 = Release|Any CPU
- {97DBB573-3994-417A-9F69-FFA25F00D2A6}.Release|x64.ActiveCfg = Release|x64
- {97DBB573-3994-417A-9F69-FFA25F00D2A6}.Release|x64.Build.0 = Release|x64
- {711B7F32-196E-4C21-9DBD-AD59C4A7CF77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {711B7F32-196E-4C21-9DBD-AD59C4A7CF77}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {711B7F32-196E-4C21-9DBD-AD59C4A7CF77}.Debug|x64.ActiveCfg = Debug|x64
- {711B7F32-196E-4C21-9DBD-AD59C4A7CF77}.Debug|x64.Build.0 = Debug|x64
- {711B7F32-196E-4C21-9DBD-AD59C4A7CF77}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {711B7F32-196E-4C21-9DBD-AD59C4A7CF77}.Release|Any CPU.Build.0 = Release|Any CPU
- {711B7F32-196E-4C21-9DBD-AD59C4A7CF77}.Release|x64.ActiveCfg = Release|x64
- {711B7F32-196E-4C21-9DBD-AD59C4A7CF77}.Release|x64.Build.0 = Release|x64
- {D5EB94D0-3ABA-4853-9050-E36B196E17D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D5EB94D0-3ABA-4853-9050-E36B196E17D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D5EB94D0-3ABA-4853-9050-E36B196E17D2}.Debug|x64.ActiveCfg = Debug|x64
- {D5EB94D0-3ABA-4853-9050-E36B196E17D2}.Debug|x64.Build.0 = Debug|x64
- {D5EB94D0-3ABA-4853-9050-E36B196E17D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D5EB94D0-3ABA-4853-9050-E36B196E17D2}.Release|Any CPU.Build.0 = Release|Any CPU
- {D5EB94D0-3ABA-4853-9050-E36B196E17D2}.Release|x64.ActiveCfg = Release|x64
- {D5EB94D0-3ABA-4853-9050-E36B196E17D2}.Release|x64.Build.0 = Release|x64
- {34A9CD98-0D15-4CA0-AEA5-E53593A31047}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {34A9CD98-0D15-4CA0-AEA5-E53593A31047}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {34A9CD98-0D15-4CA0-AEA5-E53593A31047}.Debug|x64.ActiveCfg = Debug|x64
- {34A9CD98-0D15-4CA0-AEA5-E53593A31047}.Debug|x64.Build.0 = Debug|x64
- {34A9CD98-0D15-4CA0-AEA5-E53593A31047}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {34A9CD98-0D15-4CA0-AEA5-E53593A31047}.Release|Any CPU.Build.0 = Release|Any CPU
- {34A9CD98-0D15-4CA0-AEA5-E53593A31047}.Release|x64.ActiveCfg = Release|x64
- {34A9CD98-0D15-4CA0-AEA5-E53593A31047}.Release|x64.Build.0 = Release|x64
- {79E7F89A-1DFB-45E1-8D43-D71A954AEB98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {79E7F89A-1DFB-45E1-8D43-D71A954AEB98}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {79E7F89A-1DFB-45E1-8D43-D71A954AEB98}.Debug|x64.ActiveCfg = Debug|x64
- {79E7F89A-1DFB-45E1-8D43-D71A954AEB98}.Debug|x64.Build.0 = Debug|x64
- {79E7F89A-1DFB-45E1-8D43-D71A954AEB98}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {79E7F89A-1DFB-45E1-8D43-D71A954AEB98}.Release|Any CPU.Build.0 = Release|Any CPU
- {79E7F89A-1DFB-45E1-8D43-D71A954AEB98}.Release|x64.ActiveCfg = Release|x64
- {79E7F89A-1DFB-45E1-8D43-D71A954AEB98}.Release|x64.Build.0 = Release|x64
- {CDFB3464-4041-42B1-9271-83AF24CD5008}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {CDFB3464-4041-42B1-9271-83AF24CD5008}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {CDFB3464-4041-42B1-9271-83AF24CD5008}.Debug|x64.ActiveCfg = Debug|x64
- {CDFB3464-4041-42B1-9271-83AF24CD5008}.Debug|x64.Build.0 = Debug|x64
- {CDFB3464-4041-42B1-9271-83AF24CD5008}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {CDFB3464-4041-42B1-9271-83AF24CD5008}.Release|Any CPU.Build.0 = Release|Any CPU
- {CDFB3464-4041-42B1-9271-83AF24CD5008}.Release|x64.ActiveCfg = Release|x64
- {CDFB3464-4041-42B1-9271-83AF24CD5008}.Release|x64.Build.0 = Release|x64
- {214C64C6-04E5-4867-B69A-E3502EA50871}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {214C64C6-04E5-4867-B69A-E3502EA50871}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {214C64C6-04E5-4867-B69A-E3502EA50871}.Debug|x64.ActiveCfg = Debug|x64
- {214C64C6-04E5-4867-B69A-E3502EA50871}.Debug|x64.Build.0 = Debug|x64
- {214C64C6-04E5-4867-B69A-E3502EA50871}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {214C64C6-04E5-4867-B69A-E3502EA50871}.Release|Any CPU.Build.0 = Release|Any CPU
- {214C64C6-04E5-4867-B69A-E3502EA50871}.Release|x64.ActiveCfg = Release|x64
- {214C64C6-04E5-4867-B69A-E3502EA50871}.Release|x64.Build.0 = Release|x64
- {545A0582-4105-44CE-B99C-B1379514A630}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {545A0582-4105-44CE-B99C-B1379514A630}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {545A0582-4105-44CE-B99C-B1379514A630}.Debug|x64.ActiveCfg = Debug|x64
- {545A0582-4105-44CE-B99C-B1379514A630}.Debug|x64.Build.0 = Debug|x64
- {545A0582-4105-44CE-B99C-B1379514A630}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {545A0582-4105-44CE-B99C-B1379514A630}.Release|Any CPU.Build.0 = Release|Any CPU
- {545A0582-4105-44CE-B99C-B1379514A630}.Release|x64.ActiveCfg = Release|x64
- {545A0582-4105-44CE-B99C-B1379514A630}.Release|x64.Build.0 = Release|x64
- {A6BAA2A7-F52F-4329-884E-1BCF711D6805}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A6BAA2A7-F52F-4329-884E-1BCF711D6805}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A6BAA2A7-F52F-4329-884E-1BCF711D6805}.Debug|x64.ActiveCfg = Debug|x64
- {A6BAA2A7-F52F-4329-884E-1BCF711D6805}.Debug|x64.Build.0 = Debug|x64
- {A6BAA2A7-F52F-4329-884E-1BCF711D6805}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {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
- {05EC65CF-848D-49AB-9E67-57C14EA63044}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {05EC65CF-848D-49AB-9E67-57C14EA63044}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {05EC65CF-848D-49AB-9E67-57C14EA63044}.Debug|x64.ActiveCfg = Debug|x64
- {05EC65CF-848D-49AB-9E67-57C14EA63044}.Debug|x64.Build.0 = Debug|x64
- {05EC65CF-848D-49AB-9E67-57C14EA63044}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {05EC65CF-848D-49AB-9E67-57C14EA63044}.Release|Any CPU.Build.0 = Release|Any CPU
- {05EC65CF-848D-49AB-9E67-57C14EA63044}.Release|x64.ActiveCfg = Release|x64
- {05EC65CF-848D-49AB-9E67-57C14EA63044}.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
- {A78DD8E8-31D0-4506-8738-DAA9DA86D55B}.Debug|x64.Build.0 = Debug|x64
- {A78DD8E8-31D0-4506-8738-DAA9DA86D55B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A78DD8E8-31D0-4506-8738-DAA9DA86D55B}.Release|Any CPU.Build.0 = Release|Any CPU
- {A78DD8E8-31D0-4506-8738-DAA9DA86D55B}.Release|x64.ActiveCfg = Release|x64
- {A78DD8E8-31D0-4506-8738-DAA9DA86D55B}.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
- {75503F90-7B82-4762-9997-94B5C68F15DB}.Debug|x64.Build.0 = Debug|x64
- {75503F90-7B82-4762-9997-94B5C68F15DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {75503F90-7B82-4762-9997-94B5C68F15DB}.Release|Any CPU.Build.0 = Release|Any CPU
- {75503F90-7B82-4762-9997-94B5C68F15DB}.Release|x64.ActiveCfg = Release|x64
- {75503F90-7B82-4762-9997-94B5C68F15DB}.Release|x64.Build.0 = Release|x64
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/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
deleted file mode 100644
index 6a9aa3c..0000000
--- a/lang/cs/Source/REEF/reef-applications/CLRBridgeClient/CLRBridgeClient.cs
+++ /dev/null
@@ -1,149 +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.Evaluator;
-using Org.Apache.REEF.Driver;
-using Org.Apache.REEF.Driver.bridge;
-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.Network.Naming;
-using Org.Apache.REEF.Tasks;
-using Org.Apache.REEF.Utilities.Logging;
-using Org.Apache.REEF.Tang.Interface;
-using Org.Apache.REEF.Tang.Util;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using Org.Apache.REEF.Examples.Tasks.HelloTask;
-
-namespace Org.Apache.REEF.CLRBridgeClient
-{
- public class CLRBridgeClient
- {
- public const string ReefHome = "REEF_HOME";
- public const string DefaultClrFolder = @"lang\java\reef-bridge-project\reef-bridge\dotnetHello";
- public const string DefaultReefJar = @"lang\java\reef-bridge-project\reef-bridge\target\" + Constants.BridgeJarFileName;
- public const string DefaultRunCommand = "run.cmd";
-
- private static string _clrFolder = null;
- private static string _reefJar = null;
- private static string _className = Constants.BridgeLaunchClass;
- private static string _runCommand = DefaultRunCommand;
- private static string _submitControlForAllocatedEvaluator = "submitContextAndTask"; // submitContext, submitContextAndTask, submitContextAndServiceAndTask
-
- public static HashSet<string> AppDll
- {
- get
- {
- HashSet<string> appDlls = new HashSet<string>();
- appDlls.Add(typeof(HelloStartHandler).Assembly.GetName().Name);
- appDlls.Add(typeof(HelloTask).Assembly.GetName().Name);
- appDlls.Add(typeof(INameServer).Assembly.GetName().Name);
- return appDlls;
- }
- }
-
- public static IConfiguration ClrConfigurations
- {
- get
- {
- return DriverBridgeConfiguration.ConfigurationModule
- .Set(DriverBridgeConfiguration.OnDriverStarted, GenericType<HelloStartHandler>.Class)
- .Set(DriverBridgeConfiguration.OnEvaluatorAllocated, GenericType<HelloAllocatedEvaluatorHandler>.Class)
- .Set(DriverBridgeConfiguration.OnEvaluatorAllocated, GenericType<AnotherHelloAllocatedEvaluatorHandler>.Class)
- .Set(DriverBridgeConfiguration.OnContextActive, GenericType<HelloActiveContextHandler>.Class)
- .Set(DriverBridgeConfiguration.OnTaskMessage, GenericType<HelloTaskMessageHandler>.Class)
- .Set(DriverBridgeConfiguration.OnEvaluatorFailed, GenericType<HelloFailedEvaluatorHandler>.Class)
- .Set(DriverBridgeConfiguration.OnTaskFailed, GenericType<HelloFailedTaskHandler>.Class)
- .Set(DriverBridgeConfiguration.OnTaskRunning, GenericType<HelloRunningTaskHandler>.Class)
- .Set(DriverBridgeConfiguration.OnEvaluatorRequested, GenericType<HelloEvaluatorRequestorHandler>.Class)
- .Set(DriverBridgeConfiguration.OnHttpEvent, GenericType<HelloHttpHandler>.Class)
- .Set(DriverBridgeConfiguration.OnEvaluatorCompleted, GenericType<HelloCompletedEvaluatorHandler>.Class)
- .Set(DriverBridgeConfiguration.CustomTraceListeners, GenericType<DefaultCustomTraceListener>.Class)
- .Set(DriverBridgeConfiguration.CustomTraceLevel, Level.Info.ToString())
- .Set(DriverBridgeConfiguration.CommandLineArguments, _submitControlForAllocatedEvaluator) // this is for testing purpose only
- .Set(DriverBridgeConfiguration.OnDriverRestarted, GenericType<HelloRestartHandler>.Class)
- .Set(DriverBridgeConfiguration.OnDriverReconnect, GenericType<DefaultLocalHttpDriverConnection>.Class)
- .Set(DriverBridgeConfiguration.OnDirverRestartContextActive, GenericType<HelloDriverRestartActiveContextHandler>.Class)
- .Set(DriverBridgeConfiguration.OnDriverRestartTaskRunning, GenericType<HelloDriverRestartRunningTaskHandler>.Class)
- .Build();
- }
- }
-
- public static void Main(string[] args)
- {
- Console.WriteLine("start running client: " + DateTime.Now);
- bool runOnYarn = false;
- if (args != null)
- {
- if (args.Length > 0)
- {
- runOnYarn = bool.Parse(args[0]);
- }
-
- if (args.Length > 1)
- {
- _className = args[1];
- }
- if (args.Length > 2)
- {
- _clrFolder = args[2];
- }
- if (args.Length > 3)
- {
- _reefJar = args[3];
- }
- if (args.Length > 4)
- {
- _runCommand = args[4];
- }
- }
-
- if (string.IsNullOrWhiteSpace(_reefJar))
- {
- _reefJar = Path.Combine(Environment.GetEnvironmentVariable(ReefHome), DefaultReefJar);
- }
-
- if (string.IsNullOrWhiteSpace(_clrFolder))
- {
- _clrFolder = Path.Combine(Environment.GetEnvironmentVariable(ReefHome), DefaultClrFolder);
- }
-
- // Configurable driver submission settings:
- // DriverMemory, default to 512
- // DriverIdentifer, default to "ReefClrBridge"
- // Submit, default to True. Setting it to false and Java client will construct the driver.config and write to to FS without submitting the job
- // ClientWaitTime, default to -1 which means client will wait till Driver is done
- // SubmissionDirectory, default to a tmp folder on (H)DFS according to the YARN assigned application id, if user sets it, it must be guaranteed to be unique across multiple jobs
- // RunOnYarn, default to false to run on local runtime.
- // UpdateJarBeforeSubmission, default to true. Setting it to false can reduce startup time, but only if the jar file already contains all application dlls.
- // JavaLogLevel, default to INFO.
- DriverSubmissionSettings driverSubmissionSettings = new DriverSubmissionSettings()
- {
- RunOnYarn = runOnYarn,
- SubmissionDirectory = "reefClrBridgeTmp/job_" + Guid.NewGuid().ToString("N").Substring(0, 8)
- };
-
- Console.WriteLine("start calling Run: " + DateTime.Now);
- ClrClientHelper.Run(AppDll, ClrConfigurations, driverSubmissionSettings, _reefJar, _runCommand, _clrFolder, _className);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/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
deleted file mode 100644
index 56990d9..0000000
--- a/lang/cs/Source/REEF/reef-applications/CLRBridgeClient/CLRBridgeClient.csproj
+++ /dev/null
@@ -1,130 +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>{5094C35B-4FDB-4322-AC05-45D684501CBF}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Org.Apache.Reef.CLRBridgeClient</RootNamespace>
- <AssemblyName>Org.Apache.Reef.CLRBridgeClient</AssemblyName>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <RestorePackages>true</RestorePackages>
- <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\..</SolutionDir>
- </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="System" />
- <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="CLRBridgeClient.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <None Include="run.cmd" />
- </ItemGroup>
- <ItemGroup>
- <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="$(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="..\..\..\..\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.Examples.HelloCLRBridge\Org.Apache.REEF.Examples.HelloCLRBridge.csproj">
- <Project>{a78dd8e8-31d0-4506-8738-daa9da86d55b}</Project>
- <Name>Org.Apache.REEF.Examples.HelloCLRBridge</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\..\..\Org.Apache.REEF.Examples.Tasks\Org.Apache.REEF.Examples.Tasks.csproj">
- <Project>{75503f90-7b82-4762-9997-94b5c68f15db}</Project>
- <Name>Org.Apache.REEF.Examples.Tasks</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>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.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/05766f9d/lang/cs/Source/REEF/reef-applications/CLRBridgeClient/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Source/REEF/reef-applications/CLRBridgeClient/Properties/AssemblyInfo.cs b/lang/cs/Source/REEF/reef-applications/CLRBridgeClient/Properties/AssemblyInfo.cs
deleted file mode 100644
index 0cfd271..0000000
--- a/lang/cs/Source/REEF/reef-applications/CLRBridgeClient/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("CLRBridgeClient")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("CLRBridgeClient")]
-[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("8717944c-5e99-4f95-a916-5ca3c3f8e697")]
-
-// 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/05766f9d/lang/cs/Source/REEF/reef-applications/CLRBridgeClient/run.cmd
----------------------------------------------------------------------
diff --git a/lang/cs/Source/REEF/reef-applications/CLRBridgeClient/run.cmd b/lang/cs/Source/REEF/reef-applications/CLRBridgeClient/run.cmd
deleted file mode 100644
index 3dca837..0000000
--- a/lang/cs/Source/REEF/reef-applications/CLRBridgeClient/run.cmd
+++ /dev/null
@@ -1,45 +0,0 @@
-@REM
-@REM Copyright (C) 2013 Microsoft Corporation
-@REM
-@REM Licensed under the Apache License, Version 2.0 (the "License");
-@REM you may not use this file except in compliance with the License.
-@REM You may obtain a copy of the License at
-@REM
-@REM http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM Unless required by applicable law or agreed to in writing, software
-@REM distributed under the License is distributed on an "AS IS" BASIS,
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@REM See the License for the specific language governing permissions and
-@REM limitations under the License.
-@REM
-
-@echo off
-::
-:: Copyright (C) 2013 Microsoft Corporation
-::
-:: Licensed 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.
-::
-
-
-:: RUNTIME
-set SHADED_JAR=%REEF_HOME%\lang\java\reef-bridge-project\reef-bridge\target\reef-bridge-0.11.0-incubating-SNAPSHOT-shaded.jar
-
-set LOGGING_CONFIG=-Djava.util.logging.config.class=org.apache.reef.util.logging.CLRLoggingConfig
-
-set CLASSPATH=%HADOOP_HOME%\share\hadoop\hdfs\lib\*;%HADOOP_HOME%\share\hadoop\hdfs\*;%HADOOP_HOME%\share\hadoop\common\*;%HADOOP_HOME%\share\hadoop\common\lib\*;%HADOOP_HOME%\share\hadoop\mapreduce\lib\*;%HADOOP_HOME%\share\hadoop\mapreduce\*;%HADOOP_HOME%\share\hadoop\yarn\*;%HADOOP_HOME%\share\hadoop\yarn\lib\*
-
-set CMD=%JAVA_HOME%\bin\java.exe -cp %HADOOP_HOME%\etc\hadoop;%SHADED_JAR%;%CLASSPATH% %LOGGING_CONFIG% %*
-::%LOGGING_CONFIG%
-echo %CMD%
-%CMD%
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Source/Tools/ReefAll/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Source/Tools/ReefAll/Properties/AssemblyInfo.cs b/lang/cs/Source/Tools/ReefAll/Properties/AssemblyInfo.cs
deleted file mode 100644
index 2fb7d69..0000000
--- a/lang/cs/Source/Tools/ReefAll/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("ReefAll")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("ReefAll")]
-[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("def59cbf-1539-414c-a518-486d1553077c")]
-
-// 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/05766f9d/lang/cs/Source/Tools/ReefAll/ReefAll.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Source/Tools/ReefAll/ReefAll.csproj b/lang/cs/Source/Tools/ReefAll/ReefAll.csproj
deleted file mode 100644
index abd71e3..0000000
--- a/lang/cs/Source/Tools/ReefAll/ReefAll.csproj
+++ /dev/null
@@ -1,122 +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>{4C137C79-3A28-47D2-BFB9-A3CAB1EEDACE}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Org.Apache.Reef.All</RootNamespace>
- <AssemblyName>Org.Apache.Reef.All</AssemblyName>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <RestorePackages>true</RestorePackages>
- <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..</SolutionDir>
- </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="System" />
- <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="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="$(SolutionDir)\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="$(SolutionDir)\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="$(SolutionDir)\Org.Apache.REEF.Evaluator\Org.Apache.REEF.Evaluator.csproj">
- <Project>{1b983182-9c30-464c-948d-f87eb93a8240}</Project>
- <Name>Org.Apache.REEF.Evaluator</Name>
- </ProjectReference>
- <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.Wake\Org.Apache.REEF.Wake.csproj">
- <Project>{cdfb3464-4041-42b1-9271-83af24cd5008}</Project>
- <Name>Org.Apache.REEF.Wake</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.Utilities\Org.Apache.REEF.Utilities.csproj">
- <Project>{79e7f89a-1dfb-45e1-8d43-d71a954aeb98}</Project>
- <Name>Org.Apache.REEF.Utilities</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.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/05766f9d/lang/cs/Source/build.props
----------------------------------------------------------------------
diff --git a/lang/cs/Source/build.props b/lang/cs/Source/build.props
deleted file mode 100644
index a1b8952..0000000
--- a/lang/cs/Source/build.props
+++ /dev/null
@@ -1,35 +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" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-
- <!-- Common build paths -->
- <PropertyGroup>
- <BinDir Condition="$(BinDir) == '' Or $(BinDir) == '*Undefined*'">$(SolutionDir)\bin</BinDir>
- <SourceDir Condition="$(SourceDir) == '' Or $(SourceDir) == '*Undefined*'">$(SolutionDir)\Source</SourceDir>
- <PackagesDir Condition="$(PackagesDir) == '' Or $(PackagesDir) == '*Undefined*'">$(SolutionDir)\packages</PackagesDir>
- </PropertyGroup>
-
- <!-- Package versions -->
- <PropertyGroup>
- <AvroVersion>1.4.0.0</AvroVersion>
- <NewtonsoftJsonVersion>6.0.8</NewtonsoftJsonVersion>
- <ProtobufVersion>2.0.0.668</ProtobufVersion>
- <RxVersion>2.2.5</RxVersion>
- </PropertyGroup>
-</Project>
-
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Tests/ReefTests/ConfigFiles/evaluator.conf
----------------------------------------------------------------------
diff --git a/lang/cs/Tests/ReefTests/ConfigFiles/evaluator.conf b/lang/cs/Tests/ReefTests/ConfigFiles/evaluator.conf
deleted file mode 100644
index 67256f5..0000000
Binary files a/lang/cs/Tests/ReefTests/ConfigFiles/evaluator.conf and /dev/null differ
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Tests/ReefTests/Evaluator.Tests/EvaluatorConfigurationsTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Tests/ReefTests/Evaluator.Tests/EvaluatorConfigurationsTests.cs b/lang/cs/Tests/ReefTests/Evaluator.Tests/EvaluatorConfigurationsTests.cs
deleted file mode 100644
index f46446a..0000000
--- a/lang/cs/Tests/ReefTests/Evaluator.Tests/EvaluatorConfigurationsTests.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;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-
-namespace Org.Apache.REEF.Test
-{
- [TestClass]
- public class EvaluatorConfigurationsTests
- {
- [TestMethod, Priority(0), TestCategory("Unit")]
- [DeploymentItem(@"ConfigFiles")]
- public void TestEvaluatorConfigurations()
- {
- EvaluatorConfigurations evaluatorConfigurations = new EvaluatorConfigurations("evaluator.conf");
-
- Assert.IsTrue(evaluatorConfigurations.EvaluatorId.Equals("Node-1-1414443998204"));
-
- Assert.IsTrue(evaluatorConfigurations.ApplicationId.Equals("REEF_LOCAL_RUNTIME"));
-
- string rootContextConfigString = evaluatorConfigurations.RootContextConfiguration;
- Assert.IsFalse(string.IsNullOrWhiteSpace(rootContextConfigString));
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Tests/ReefTests/Evaluator.Tests/EvaluatorTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Tests/ReefTests/Evaluator.Tests/EvaluatorTests.cs b/lang/cs/Tests/ReefTests/Evaluator.Tests/EvaluatorTests.cs
deleted file mode 100644
index bde799e..0000000
--- a/lang/cs/Tests/ReefTests/Evaluator.Tests/EvaluatorTests.cs
+++ /dev/null
@@ -1,96 +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.Avro;
-using Org.Apache.REEF.Common.Evaluator;
-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 System;
-using System.IO;
-using Org.Apache.REEF.Examples.Tasks.ShellTask;
-using Org.Apache.REEF.Tang.Implementations.Tang;
-
-namespace Org.Apache.REEF.Test
-{
- [TestClass]
- public class EvaluatorTests
- {
- [TestMethod, Priority(0), TestCategory("Functional")]
- [Description("Parse Evaluator configuration from Java, inject and execute Shell task with DIR command based on the configuration")]
- [DeploymentItem(@"ConfigFiles")]
- public void CanInjectAndExecuteTask()
- {
- //To enforce that shell task dll be copied to output directory.
- ShellTask tmpTask = new ShellTask("invalid");
- Assert.IsNotNull(tmpTask);
-
- string tmp = Directory.GetCurrentDirectory();
- Assert.IsNotNull(tmp);
-
- AvroConfigurationSerializer serializer = new AvroConfigurationSerializer();
- AvroConfiguration avroConfiguration = serializer.AvroDeseriaizeFromFile("evaluator.conf");
- Assert.IsNotNull(avroConfiguration);
-
- ICsConfigurationBuilder cb = TangFactory.GetTang().NewConfigurationBuilder();
- cb.AddConfiguration(TaskConfiguration.ConfigurationModule
- .Set(TaskConfiguration.Identifier, "Test_CLRContext_task")
- .Set(TaskConfiguration.Task, GenericType<ShellTask>.Class)
- .Build());
- cb.BindNamedParameter<ShellTask.Command, string>(GenericType<ShellTask.Command>.Class, "dir");
-
- IConfiguration taskConfiguration = cb.Build();
-
- string taskConfig = serializer.ToString(taskConfiguration);
-
- ITask task = null;
- TaskConfiguration config = new TaskConfiguration(taskConfig);
- Assert.IsNotNull(config);
- try
- {
- IInjector injector = TangFactory.GetTang().NewInjector(config.TangConfig);
- task = (ITask)injector.GetInstance(typeof(ITask));
- }
- catch (Exception e)
- {
- throw new InvalidOperationException("unable to inject task with configuration: " + taskConfig, e);
- }
-
- byte[] bytes = task.Call(null);
- string result = System.Text.Encoding.Default.GetString(bytes);
-
- //a dir command is executed in the container directory, which includes the file "evaluator.conf"
- Assert.IsTrue(result.Contains("evaluator.conf"));
- }
-
- [TestMethod, Priority(0), TestCategory("Unit")]
- [Description("Test driver information extacted from Http server")]
- public void CanExtractDriverInformaiton()
- {
- const string InfoString = "{\"remoteId\":\"socket://10.121.136.231:14272\",\"startTime\":\"2014 08 28 10:50:32\",\"services\":[{\"serviceName\":\"NameServer\",\"serviceInfo\":\"10.121.136.231:16663\"}]}";
- AvroDriverInfo info = AvroJsonSerializer<AvroDriverInfo>.FromString(InfoString);
- Assert.IsTrue(info.remoteId.Equals("socket://10.121.136.231:14272"));
- Assert.IsTrue(info.startTime.Equals("2014 08 28 10:50:32"));
- Assert.IsTrue(new DriverInformation(info.remoteId, info.startTime, info.services).NameServerId.Equals("10.121.136.231:16663"));
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Tests/ReefTests/Functional.Tests/Bridge/TestBridgeClient.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Tests/ReefTests/Functional.Tests/Bridge/TestBridgeClient.cs b/lang/cs/Tests/ReefTests/Functional.Tests/Bridge/TestBridgeClient.cs
deleted file mode 100644
index 3e2cab3..0000000
--- a/lang/cs/Tests/ReefTests/Functional.Tests/Bridge/TestBridgeClient.cs
+++ /dev/null
@@ -1,99 +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;
-using Org.Apache.REEF.Utilities.Logging;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.IO;
-
-namespace Org.Apache.REEF.Test
-{
- [TestClass]
- public class TestBridgeClient : ReefFunctionalTest
- {
- private static readonly Logger LOGGER = Logger.GetLogger(typeof(TestBridgeClient));
-
- [TestInitialize()]
- public void TestSetup()
- {
- CleanUp();
- Init();
- }
-
- [TestCleanup]
- public void TestCleanup()
- {
- Console.WriteLine("Post test check and clean up");
- CleanUp();
- }
-
- [TestMethod, Priority(1), TestCategory("FunctionalGated")]
- [Description("Run CLR Bridge on local runtime")]
- [DeploymentItem(@".")]
- [Ignore] // This is diabled by default on builds
- public void CanRunClrBridgeOnYarn()
- {
- RunClrBridgeClient(runOnYarn: true);
- }
-
- [TestMethod, Priority(1), TestCategory("FunctionalGated")]
- [Description("Run CLR Bridge on local runtime")]
- [DeploymentItem(@".")]
- [Timeout(180 * 1000)]
- public void CanRunClrBridgeOnLocalRuntime()
- {
- IsOnLocalRuntiime = true;
- RunClrBridgeClient(runOnYarn: false);
- ValidateSuccessForLocalRuntime(2);
- }
-
- private void RunClrBridgeClient(bool runOnYarn)
- {
- const string clrBridgeClient = "Org.Apache.REEF.CLRBridgeClient.exe";
- List<string> arguments = new List<string>();
- arguments.Add(runOnYarn.ToString());
- arguments.Add(Constants.BridgeLaunchClass);
- arguments.Add(".");
- arguments.Add(Path.Combine(_binFolder, Constants.BridgeJarFileName));
- arguments.Add(Path.Combine(_binFolder, _cmdFile));
-
- ProcessStartInfo startInfo = new ProcessStartInfo()
- {
- FileName = clrBridgeClient,
- Arguments = string.Join(" ", arguments),
- RedirectStandardOutput = true,
- UseShellExecute = false,
- CreateNoWindow = false
- };
-
- LOGGER.Log(Level.Info, "executing\r\n" + startInfo.FileName + "\r\n" + startInfo.Arguments);
- using (Process process = Process.Start(startInfo))
- {
- process.WaitForExit();
- if (process.ExitCode != 0)
- {
- throw new InvalidOperationException("CLR client exited with error code " + process.ExitCode);
- }
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Tests/ReefTests/Functional.Tests/Bridge/TestHelloBridgeHandlers.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Tests/ReefTests/Functional.Tests/Bridge/TestHelloBridgeHandlers.cs b/lang/cs/Tests/ReefTests/Functional.Tests/Bridge/TestHelloBridgeHandlers.cs
deleted file mode 100644
index 081f383..0000000
--- a/lang/cs/Tests/ReefTests/Functional.Tests/Bridge/TestHelloBridgeHandlers.cs
+++ /dev/null
@@ -1,102 +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.IO;
-using System.Linq;
-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.Tasks;
-using Org.Apache.REEF.Utilities.Logging;
-using Org.Apache.REEF.Tang.Interface;
-using Org.Apache.REEF.Tang.Util;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Org.Apache.REEF.Examples.Tasks.HelloTask;
-
-namespace Org.Apache.REEF.Test
-{
- [TestClass]
- public class TestHelloBridgeHandlers : ReefFunctionalTest
- {
- [TestInitialize()]
- public void TestSetup()
- {
- CleanUp();
- Init();
- }
-
- [TestCleanup]
- public void TestCleanup()
- {
- Console.WriteLine("Post test check and clean up");
- CleanUp();
- }
-
- [TestMethod, Priority(1), TestCategory("FunctionalGated")]
- [Description("Test Hello Handler on local runtime")]
- [DeploymentItem(@".")]
- [Timeout(180 * 1000)]
- public void RunHelloHandlerOnLocalRuntime()
- {
- IsOnLocalRuntiime = true;
- TestRun(AssembliesToCopy(), DriverConfiguration());
- ValidateSuccessForLocalRuntime(2);
- ValidateEvaluatorSetting();
- }
-
- public IConfiguration DriverConfiguration()
- {
- return DriverBridgeConfiguration.ConfigurationModule
- .Set(DriverBridgeConfiguration.OnDriverStarted, GenericType<HelloStartHandler>.Class)
- .Set(DriverBridgeConfiguration.OnEvaluatorAllocated, GenericType<HelloAllocatedEvaluatorHandler>.Class)
- .Set(DriverBridgeConfiguration.OnEvaluatorAllocated, GenericType<AnotherHelloAllocatedEvaluatorHandler>.Class)
- .Set(DriverBridgeConfiguration.OnContextActive, GenericType<HelloActiveContextHandler>.Class)
- .Set(DriverBridgeConfiguration.OnTaskMessage, GenericType<HelloTaskMessageHandler>.Class)
- .Set(DriverBridgeConfiguration.OnEvaluatorFailed, GenericType<HelloFailedEvaluatorHandler>.Class)
- .Set(DriverBridgeConfiguration.OnTaskFailed, GenericType<HelloFailedTaskHandler>.Class)
- .Set(DriverBridgeConfiguration.OnTaskRunning, GenericType<HelloRunningTaskHandler>.Class)
- .Set(DriverBridgeConfiguration.OnEvaluatorRequested, GenericType<HelloEvaluatorRequestorHandler>.Class)
- .Set(DriverBridgeConfiguration.OnHttpEvent, GenericType<HelloHttpHandler>.Class)
- .Set(DriverBridgeConfiguration.OnEvaluatorCompleted, GenericType<HelloCompletedEvaluatorHandler>.Class)
- .Set(DriverBridgeConfiguration.CustomTraceListeners, GenericType<DefaultCustomTraceListener>.Class)
- .Set(DriverBridgeConfiguration.CustomTraceLevel, Level.Info.ToString())
- .Set(DriverBridgeConfiguration.CommandLineArguments, "submitContextAndTask")
- .Build();
- }
-
- public HashSet<string> AssembliesToCopy()
- {
- HashSet<string> appDlls = new HashSet<string>();
- appDlls.Add(typeof(HelloStartHandler).Assembly.GetName().Name);
- appDlls.Add(typeof(HelloTask).Assembly.GetName().Name);
- return appDlls;
- }
-
- private void ValidateEvaluatorSetting()
- {
- const string successIndication = "Evaluator is assigned with 512 MB of memory and 2 cores.";
- string[] lines = File.ReadAllLines(GetLogFile(_stdout));
- string[] successIndicators = lines.Where(s => s.Contains(successIndication)).ToArray();
- Assert.IsTrue(successIndicators.Count() >= 1);
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Tests/ReefTests/Functional.Tests/Bridge/TestSimpleEventHandlers.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Tests/ReefTests/Functional.Tests/Bridge/TestSimpleEventHandlers.cs b/lang/cs/Tests/ReefTests/Functional.Tests/Bridge/TestSimpleEventHandlers.cs
deleted file mode 100644
index f27f3a6..0000000
--- a/lang/cs/Tests/ReefTests/Functional.Tests/Bridge/TestSimpleEventHandlers.cs
+++ /dev/null
@@ -1,110 +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.IO;
-using System.Linq;
-using Org.Apache.REEF.Common.Evaluator;
-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.Network.Naming;
-using Org.Apache.REEF.Tasks;
-using Org.Apache.REEF.Utilities.Logging;
-using Org.Apache.REEF.Tang.Interface;
-using Org.Apache.REEF.Tang.Util;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Org.Apache.REEF.Examples.Tasks.HelloTask;
-
-namespace Org.Apache.REEF.Test
-{
- [TestClass]
- public class TestSimpleEventHandlers : ReefFunctionalTest
- {
- [TestInitialize()]
- public void TestSetup()
- {
- CleanUp();
- Init();
- }
-
- [TestCleanup]
- public void TestCleanup()
- {
- Console.WriteLine("Post test check and clean up");
- CleanUp();
- }
-
- //[TestMethod, Priority(1), TestCategory("FunctionalGated")]
- [Description("Test Hello Handler on local runtime")]
- [DeploymentItem(@".")]
- [Timeout(180 * 1000)]
- public void RunSimpleEventHandlerOnLocalRuntime()
- {
- IsOnLocalRuntiime = true;
- TestRun(AssembliesToCopy(), DriverConfiguration());
- ValidateSuccessForLocalRuntime(2);
- ValidateEvaluatorSetting();
- }
-
- public IConfiguration DriverConfiguration()
- {
- return DriverBridgeConfiguration.ConfigurationModule
- .Set(DriverBridgeConfiguration.OnDriverStarted, GenericType<HelloSimpleEventHandlers>.Class)
- .Set(DriverBridgeConfiguration.OnEvaluatorAllocated, GenericType<HelloSimpleEventHandlers>.Class)
- .Set(DriverBridgeConfiguration.OnEvaluatorAllocated, GenericType<AnotherHelloAllocatedEvaluatorHandler>.Class)
- .Set(DriverBridgeConfiguration.OnContextActive, GenericType<HelloSimpleEventHandlers>.Class)
- .Set(DriverBridgeConfiguration.OnTaskMessage, GenericType<HelloTaskMessageHandler>.Class)
- .Set(DriverBridgeConfiguration.OnEvaluatorFailed, GenericType<HelloSimpleEventHandlers>.Class)
- .Set(DriverBridgeConfiguration.OnTaskCompleted, GenericType<HelloSimpleEventHandlers>.Class)
- .Set(DriverBridgeConfiguration.OnTaskFailed, GenericType<HelloSimpleEventHandlers>.Class)
- .Set(DriverBridgeConfiguration.OnTaskRunning, GenericType<HelloSimpleEventHandlers>.Class)
- .Set(DriverBridgeConfiguration.OnEvaluatorRequested, GenericType<HelloSimpleEventHandlers>.Class)
- .Set(DriverBridgeConfiguration.OnHttpEvent, GenericType<HelloSimpleEventHandlers>.Class)
- .Set(DriverBridgeConfiguration.OnEvaluatorCompleted, GenericType<HelloSimpleEventHandlers>.Class)
- .Set(DriverBridgeConfiguration.CustomTraceListeners, GenericType<DefaultCustomTraceListener>.Class)
- .Set(DriverBridgeConfiguration.CustomTraceLevel, Level.Info.ToString())
- .Set(DriverBridgeConfiguration.CommandLineArguments, "submitContextAndTask")
- .Set(DriverBridgeConfiguration.OnDriverRestarted, GenericType<HelloRestartHandler>.Class)
- .Set(DriverBridgeConfiguration.OnDriverReconnect, GenericType<DefaultLocalHttpDriverConnection>.Class)
- .Set(DriverBridgeConfiguration.OnDirverRestartContextActive, GenericType<HelloDriverRestartActiveContextHandler>.Class)
- .Set(DriverBridgeConfiguration.OnDriverRestartTaskRunning, GenericType<HelloDriverRestartRunningTaskHandler>.Class)
- .Build();
- }
-
- public HashSet<string> AssembliesToCopy()
- {
- HashSet<string> appDlls = new HashSet<string>();
- appDlls.Add(typeof(HelloSimpleEventHandlers).Assembly.GetName().Name);
- appDlls.Add(typeof(HelloTask).Assembly.GetName().Name);
- appDlls.Add(typeof(INameServer).Assembly.GetName().Name);
- return appDlls;
- }
-
- private void ValidateEvaluatorSetting()
- {
- const string successIndication = "Evaluator is assigned with 512 MB of memory and 2 cores.";
- string[] lines = File.ReadAllLines(GetLogFile(_stdout));
- string[] successIndicators = lines.Where(s => s.Contains(successIndication)).ToArray();
- Assert.IsTrue(successIndicators.Count() >= 1);
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Tests/ReefTests/Functional.Tests/Driver/DriverTestStartHandler.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Tests/ReefTests/Functional.Tests/Driver/DriverTestStartHandler.cs b/lang/cs/Tests/ReefTests/Functional.Tests/Driver/DriverTestStartHandler.cs
deleted file mode 100644
index fc4bc15..0000000
--- a/lang/cs/Tests/ReefTests/Functional.Tests/Driver/DriverTestStartHandler.cs
+++ /dev/null
@@ -1,46 +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;
-using Org.Apache.REEF.Driver.bridge;
-using Org.Apache.REEF.Utilities.Logging;
-using Org.Apache.REEF.Tang.Annotations;
-using Org.Apache.REEF.Wake.Time;
-
-namespace Org.Apache.REEF.Test
-{
- public class DriverTestStartHandler : IStartHandler
- {
- private static readonly Logger LOGGER = Logger.GetLogger(typeof(DriverTestStartHandler));
-
- private IClock _clock;
- private HttpServerPort _httpServerPort;
-
- [Inject]
- public DriverTestStartHandler(IClock clock, HttpServerPort httpServerPort)
- {
- _clock = clock;
- _httpServerPort = httpServerPort;
- Identifier = "DriverTestStartHandler";
- LOGGER.Log(Level.Info, "Http Server port number: " + httpServerPort.PortNumber);
- }
-
- public string Identifier { get; set; }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Tests/ReefTests/Functional.Tests/Driver/TestDriver.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Tests/ReefTests/Functional.Tests/Driver/TestDriver.cs b/lang/cs/Tests/ReefTests/Functional.Tests/Driver/TestDriver.cs
deleted file mode 100644
index a771c7c..0000000
--- a/lang/cs/Tests/ReefTests/Functional.Tests/Driver/TestDriver.cs
+++ /dev/null
@@ -1,68 +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.Driver.Bridge;
-using Org.Apache.REEF.Driver.Defaults;
-using Org.Apache.REEF.Utilities.Logging;
-using Org.Apache.REEF.Tang.Interface;
-using Org.Apache.REEF.Tang.Util;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-
-namespace Org.Apache.REEF.Test
-{
- [TestClass]
- public class TestDriver : ReefFunctionalTest
- {
- [TestInitialize()]
- public void TestSetup()
- {
- CleanUp();
- }
-
- [TestCleanup]
- public void TestCleanup()
- {
- CleanUp();
- }
-
- /// <summary>
- /// This is to test DriverTestStartHandler. No evaluator and tasks are involked.
- /// </summary>
- [TestMethod, Priority(1), TestCategory("FunctionalGated")]
- [Description("Test DriverTestStartHandler. No evaluator and tasks are involked")]
- [DeploymentItem(@".")]
- [Timeout(180 * 1000)]
- public void TestDriverStart()
- {
- IConfiguration driverConfig = DriverBridgeConfiguration.ConfigurationModule
- .Set(DriverBridgeConfiguration.OnDriverStarted, GenericType<DriverTestStartHandler>.Class)
- .Set(DriverBridgeConfiguration.CustomTraceListeners, GenericType<DefaultCustomTraceListener>.Class)
- .Set(DriverBridgeConfiguration.CustomTraceLevel, Level.Info.ToString())
- .Build();
-
- HashSet<string> appDlls = new HashSet<string>();
- appDlls.Add(typeof(DriverTestStartHandler).Assembly.GetName().Name);
-
- TestRun(appDlls, driverConfig);
-
- ValidateSuccessForLocalRuntime(0);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Tests/ReefTests/Functional.Tests/Messaging/MessageDriver.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Tests/ReefTests/Functional.Tests/Messaging/MessageDriver.cs b/lang/cs/Tests/ReefTests/Functional.Tests/Messaging/MessageDriver.cs
deleted file mode 100644
index 7a82029..0000000
--- a/lang/cs/Tests/ReefTests/Functional.Tests/Messaging/MessageDriver.cs
+++ /dev/null
@@ -1,122 +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.Globalization;
-using System.Net;
-using System.Text;
-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.Driver.Task;
-using Org.Apache.REEF.Network.Naming;
-using Org.Apache.REEF.Services;
-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.Tang.Annotations;
-using Org.Apache.REEF.Tang.Implementations.Configuration;
-using Org.Apache.REEF.Tang.Interface;
-using Org.Apache.REEF.Tang.Util;
-
-namespace Org.Apache.REEF.Test
-{
- public class MessageDriver : IStartHandler, IObserver<IAllocatedEvaluator>, IObserver<IEvaluatorRequestor>, IObserver<ITaskMessage>, IObserver<IRunningTask>
- {
- public const int NumerOfEvaluator = 1;
-
- public const string Message = "MESSAGE::DRIVER";
-
- private static readonly Logger LOGGER = Logger.GetLogger(typeof(MessageDriver));
-
- [Inject]
- public MessageDriver()
- {
- CreateClassHierarchy();
- Identifier = "TaskMessagingStartHandler";
- }
-
- public string Identifier { get; set; }
-
- public void OnNext(IAllocatedEvaluator eval)
- {
- string taskId = "Task_" + eval.Id;
-
- IConfiguration contextConfiguration = ContextConfiguration.ConfigurationModule
- .Set(ContextConfiguration.Identifier, taskId)
- .Build();
-
- IConfiguration taskConfiguration = TaskConfiguration.ConfigurationModule
- .Set(TaskConfiguration.Identifier, taskId)
- .Set(TaskConfiguration.Task, GenericType<MessageTask>.Class)
- .Set(TaskConfiguration.OnMessage, GenericType<MessageTask.MessagingDriverMessageHandler>.Class)
- .Set(TaskConfiguration.OnSendMessage, GenericType<MessageTask>.Class)
- .Build();
-
- eval.SubmitContextAndTask(contextConfiguration, taskConfiguration);
- }
-
- public void OnNext(IEvaluatorRequestor evalutorRequestor)
- {
- EvaluatorRequest request = new EvaluatorRequest(NumerOfEvaluator, 512, 2, "WonderlandRack", "TaskMessagingEvaluator");
- evalutorRequestor.Submit(request);
- }
-
- public void OnNext(ITaskMessage taskMessage)
- {
- string msgReceived = ByteUtilities.ByteArrarysToString(taskMessage.Message);
-
- LOGGER.Log(Level.Info, string.Format(CultureInfo.InvariantCulture, "CLR TaskMessagingTaskMessageHandler received following message from Task: {0}, Message: {1}.", taskMessage.TaskId, msgReceived));
-
- if (!msgReceived.StartsWith(MessageTask.MessageSend, true, CultureInfo.CurrentCulture))
- {
- Exceptions.Throw(new Exception("Unexpected message: " + msgReceived), "Unexpected task message received: " + msgReceived, LOGGER);
- }
- }
-
- public void OnNext(IRunningTask runningTask)
- {
- LOGGER.Log(Level.Info, string.Format(CultureInfo.InvariantCulture, "TaskMessegingRunningTaskHandler: {0} is to send message {1}.", runningTask.Id, Message));
- runningTask.Send(ByteUtilities.StringToByteArrays(Message));
- }
-
- public void OnCompleted()
- {
- throw new NotImplementedException();
- }
-
- public void OnError(Exception error)
- {
- throw new NotImplementedException();
- }
-
- private void CreateClassHierarchy()
- {
- HashSet<string> clrDlls = new HashSet<string>();
- clrDlls.Add(typeof(IDriver).Assembly.GetName().Name);
- clrDlls.Add(typeof(ITask).Assembly.GetName().Name);
- clrDlls.Add(typeof(MessageTask).Assembly.GetName().Name);
-
- ClrHandlerHelper.GenerateClassHierarchy(clrDlls);
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Tests/ReefTests/Functional.Tests/Messaging/MessageTask.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Tests/ReefTests/Functional.Tests/Messaging/MessageTask.cs b/lang/cs/Tests/ReefTests/Functional.Tests/Messaging/MessageTask.cs
deleted file mode 100644
index ac2ada2..0000000
--- a/lang/cs/Tests/ReefTests/Functional.Tests/Messaging/MessageTask.cs
+++ /dev/null
@@ -1,107 +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.Globalization;
-using System.Linq;
-using System.Net;
-using System.Threading;
-using Org.Apache.REEF.Examples.Tasks.HelloTask;
-using Org.Apache.REEF.Network.Naming;
-using Org.Apache.REEF.Tasks;
-using Org.Apache.REEF.Tasks.Events;
-using Org.Apache.REEF.Utilities;
-using Org.Apache.REEF.Utilities.Diagnostics;
-using Org.Apache.REEF.Utilities.Logging;
-using Org.Apache.REEF.Tang.Annotations;
-
-namespace Org.Apache.REEF.Test
-{
- public class MessageTask : ITask, ITaskMessageSource
- {
- public const string MessageSend = "MESSAGE:TASK";
-
- private static readonly Logger LOGGER = Logger.GetLogger(typeof(MessageTask));
-
- [Inject]
- public MessageTask()
- {
- }
-
- public HelloService Service { get; set; }
-
- public Optional<TaskMessage> Message
- {
- get
- {
- TaskMessage defaultTaskMessage = TaskMessage.From(
- "messagingSourceId",
- ByteUtilities.StringToByteArrays(MessageSend + " generated at " + DateTime.Now.ToString(CultureInfo.InvariantCulture)));
- return Optional<TaskMessage>.Of(defaultTaskMessage);
- }
-
- set
- {
- }
- }
-
- public byte[] Call(byte[] memento)
- {
- Console.WriteLine("Hello, CLR TaskMsg!");
- Thread.Sleep(5 * 1000);
- return null;
- }
-
- public void Dispose()
- {
- LOGGER.Log(Level.Info, "TaskMsg disposed.");
- }
-
- private void DriverMessage(string message)
- {
- LOGGER.Log(Level.Info, "Receieved DriverMessage in TaskMsg: " + message);
- if (!message.Equals(MessageDriver.Message))
- {
- Exceptions.Throw(new Exception("Unexpected driver message: " + message), "Unexpected driver message received: " + message, LOGGER);
- }
- }
-
- public class MessagingDriverMessageHandler : IDriverMessageHandler
- {
- private MessageTask _parentTask;
-
- [Inject]
- public MessagingDriverMessageHandler(MessageTask task)
- {
- _parentTask = task;
- }
-
- public void Handle(IDriverMessage value)
- {
- string message = string.Empty;
- LOGGER.Log(Level.Verbose, "Receieved a message from driver, handling it with MessagingDriverMessageHandler");
- if (value.Message.IsPresent())
- {
- message = ByteUtilities.ByteArrarysToString(value.Message.Value);
- }
- _parentTask.DriverMessage(message);
- }
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Tests/ReefTests/Functional.Tests/Messaging/TestTaskMessage.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Tests/ReefTests/Functional.Tests/Messaging/TestTaskMessage.cs b/lang/cs/Tests/ReefTests/Functional.Tests/Messaging/TestTaskMessage.cs
deleted file mode 100644
index 0aab664..0000000
--- a/lang/cs/Tests/ReefTests/Functional.Tests/Messaging/TestTaskMessage.cs
+++ /dev/null
@@ -1,75 +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.Driver.Bridge;
-using Org.Apache.REEF.Driver.Defaults;
-using Org.Apache.REEF.Tasks;
-using Org.Apache.REEF.Utilities.Logging;
-using Org.Apache.REEF.Tang.Interface;
-using Org.Apache.REEF.Tang.Util;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-
-namespace Org.Apache.REEF.Test
-{
- [TestClass]
- public class TestTaskMessage : ReefFunctionalTest
- {
- [TestInitialize()]
- public void TestSetup()
- {
- CleanUp();
- Init();
- }
-
- [TestCleanup]
- public void TestCleanup()
- {
- CleanUp();
- }
-
- /// <summary>
- /// This test is to test both task message and driver message. The messages are sent
- /// from one side and received in the corresponding handlers and verified in the test
- /// </summary>
- [TestMethod, Priority(1), TestCategory("FunctionalGated")]
- [Description("Test task message and driver message")]
- [DeploymentItem(@".")]
- [Timeout(180 * 1000)]
- public void TestSendTaskMessage()
- {
- IConfiguration driverConfig = DriverBridgeConfiguration.ConfigurationModule
- .Set(DriverBridgeConfiguration.OnDriverStarted, GenericType<MessageDriver>.Class)
- .Set(DriverBridgeConfiguration.OnEvaluatorAllocated, GenericType<MessageDriver>.Class)
- .Set(DriverBridgeConfiguration.OnTaskMessage, GenericType<MessageDriver>.Class)
- .Set(DriverBridgeConfiguration.OnTaskRunning, GenericType<MessageDriver>.Class)
- .Set(DriverBridgeConfiguration.OnEvaluatorRequested, GenericType<MessageDriver>.Class)
- .Set(DriverBridgeConfiguration.CustomTraceListeners, GenericType<DefaultCustomTraceListener>.Class)
- .Set(DriverBridgeConfiguration.CustomTraceLevel, Level.Info.ToString())
- .Build();
-
- HashSet<string> appDlls = new HashSet<string>();
- appDlls.Add(typeof(MessageDriver).Assembly.GetName().Name);
- appDlls.Add(typeof(MessageTask).Assembly.GetName().Name);
-
- TestRun(appDlls, driverConfig);
- ValidateSuccessForLocalRuntime(MessageDriver.NumerOfEvaluator);
- }
- }
-}
\ No newline at end of file
[4/4] incubator-reef git commit: [REEF-146] Changing .Net project
structure for Reef tests, reef client and Reef all
Posted by we...@apache.org.
[REEF-146] Changing .Net project structure for Reef tests, reef client and Reef all
* Move project folders under cs
* Rename projects to follow name convention
* Update namespace for projects
* Update csproj file for the references
* Rename reef test folders and update namespace inside reef tests
* Renamed Solution file
* Moved Source/build.props to build.props
JIRA:
[REEF-146] https://issues.apache.org/jira/browse/REEF-146
Pull Request
This closes #71
Project: http://git-wip-us.apache.org/repos/asf/incubator-reef/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-reef/commit/05766f9d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-reef/tree/05766f9d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-reef/diff/05766f9d
Branch: refs/heads/master
Commit: 05766f9d3615168784f15234d07ae0ce72bcb814
Parents: a7df272
Author: Julia Wang <jw...@yahoo.com>
Authored: Fri Feb 6 14:51:41 2015 -0800
Committer: Markus Weimer <we...@apache.org>
Committed: Fri Feb 6 15:16:18 2015 -0800
----------------------------------------------------------------------
.../Org.Apache.REEF.All.csproj | 122 ++++++++
.../Properties/AssemblyInfo.cs | 55 ++++
.../Org.Apache.REEF.Client/CLRBridgeClient.cs | 147 ++++++++++
.../Org.Apache.REEF.Client.csproj | 134 +++++++++
.../Properties/AssemblyInfo.cs | 55 ++++
lang/cs/Org.Apache.REEF.Client/run.cmd | 45 +++
.../Org.Apache.REEF.Common.csproj | 2 +-
.../Org.Apache.REEF.Driver.csproj | 2 +-
.../Org.Apache.REEF.Evaluator.csproj | 2 +-
...g.Apache.REEF.Examples.HelloCLRBridge.csproj | 2 +-
...e.REEF.Examples.RetainedEvalCLRBridge.csproj | 2 +-
.../Org.Apache.REEF.Examples.Tasks.csproj | 2 +-
.../Org.Apache.REEF.Network.csproj | 2 +-
.../Org.Apache.REEF.Tang.Examples.csproj | 2 +-
.../Org.Apache.REEF.Tang.Tools.csproj | 2 +-
.../Org.Apache.REEF.Tang.csproj | 2 +-
.../ConfigFiles/evaluator.conf | Bin 0 -> 2837 bytes
.../Evaluator/EvaluatorConfigurationsTests.cs | 42 +++
.../Evaluator/EvaluatorTests.cs | 95 +++++++
.../Functional/Bridge/TestBridgeClient.cs | 99 +++++++
.../Bridge/TestHelloBridgeHandlers.cs | 100 +++++++
.../Bridge/TestSimpleEventHandlers.cs | 108 ++++++++
.../Functional/Driver/DriverTestStartHandler.cs | 46 ++++
.../Functional/Driver/TestDriver.cs | 68 +++++
.../Functional/Messaging/MessageDriver.cs | 117 ++++++++
.../Functional/Messaging/MessageTask.cs | 104 +++++++
.../Functional/Messaging/TestTaskMessage.cs | 74 +++++
.../Functional/ReefFunctionalTest.cs | 200 ++++++++++++++
.../Network/BlockingCollectionExtensionTests.cs | 74 +++++
.../Network/NameServerTests.cs | 269 ++++++++++++++++++
.../Network/NetworkServiceTests.cs | 198 +++++++++++++
.../Org.Apache.REEF.Tests.csproj | 213 ++++++++++++++
.../Properties/AssemblyInfo.cs | 55 ++++
.../Utility/TestDriverConfigGenerator.cs | 101 +++++++
.../Utility/TestExceptions.cs | 49 ++++
...bridge-0.11.0-incubating-SNAPSHOT-shaded.jar | Bin 0 -> 13555222 bytes
lang/cs/Org.Apache.REEF.Tests/bin/run.cmd | 45 +++
lang/cs/Org.Apache.REEF.Tests/packages.config | 32 +++
.../Org.Apache.Reef.Utilities.csproj | 2 +-
.../Org.Apache.REEF.Wake.csproj | 2 +-
lang/cs/Org.Apache.REEF.sln | 195 +++++++++++++
lang/cs/ReefDotNet.sln | 195 -------------
.../CLRBridgeClient/CLRBridgeClient.cs | 149 ----------
.../CLRBridgeClient/CLRBridgeClient.csproj | 130 ---------
.../CLRBridgeClient/Properties/AssemblyInfo.cs | 55 ----
.../reef-applications/CLRBridgeClient/run.cmd | 45 ---
.../Tools/ReefAll/Properties/AssemblyInfo.cs | 55 ----
lang/cs/Source/Tools/ReefAll/ReefAll.csproj | 122 --------
lang/cs/Source/build.props | 35 ---
.../Tests/ReefTests/ConfigFiles/evaluator.conf | Bin 2837 -> 0 bytes
.../EvaluatorConfigurationsTests.cs | 42 ---
.../ReefTests/Evaluator.Tests/EvaluatorTests.cs | 96 -------
.../Functional.Tests/Bridge/TestBridgeClient.cs | 99 -------
.../Bridge/TestHelloBridgeHandlers.cs | 102 -------
.../Bridge/TestSimpleEventHandlers.cs | 110 --------
.../Driver/DriverTestStartHandler.cs | 46 ----
.../Functional.Tests/Driver/TestDriver.cs | 68 -----
.../Functional.Tests/Messaging/MessageDriver.cs | 122 --------
.../Functional.Tests/Messaging/MessageTask.cs | 107 --------
.../Messaging/TestTaskMessage.cs | 75 -----
.../Functional.Tests/ReefFunctionalTest.cs | 200 --------------
.../BlockingCollectionExtensionTests.cs | 78 ------
.../Tests/ReefTests/IO.Tests/NameServerTests.cs | 275 -------------------
.../ReefTests/IO.Tests/NetworkServiceTests.cs | 203 --------------
.../Tests/ReefTests/Properties/AssemblyInfo.cs | 55 ----
lang/cs/Tests/ReefTests/ReefTests.csproj | 213 --------------
.../Utility.Test/TestDriverConfigGenerator.cs | 101 -------
.../ReefTests/Utility.Test/TestExceptions.cs | 49 ----
...bridge-0.11.0-incubating-SNAPSHOT-shaded.jar | Bin 13555222 -> 0 bytes
lang/cs/Tests/ReefTests/bin/run.cmd | 45 ---
lang/cs/Tests/ReefTests/packages.config | 32 ---
lang/cs/build.props | 35 +++
72 files changed, 2889 insertions(+), 2916 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.All/Org.Apache.REEF.All.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.All/Org.Apache.REEF.All.csproj b/lang/cs/Org.Apache.REEF.All/Org.Apache.REEF.All.csproj
new file mode 100644
index 0000000..14cc7d0
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.All/Org.Apache.REEF.All.csproj
@@ -0,0 +1,122 @@
+<?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>{4C137C79-3A28-47D2-BFB9-A3CAB1EEDACE}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Org.Apache.REEF.All</RootNamespace>
+ <AssemblyName>Org.Apache.REEF.All</AssemblyName>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <RestorePackages>true</RestorePackages>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
+ </PropertyGroup>
+ <Import Project="$(SolutionDir)\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="System" />
+ <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="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="$(SolutionDir)\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="$(SolutionDir)\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="$(SolutionDir)\Org.Apache.REEF.Evaluator\Org.Apache.REEF.Evaluator.csproj">
+ <Project>{1b983182-9c30-464c-948d-f87eb93a8240}</Project>
+ <Name>Org.Apache.REEF.Evaluator</Name>
+ </ProjectReference>
+ <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.Wake\Org.Apache.REEF.Wake.csproj">
+ <Project>{cdfb3464-4041-42b1-9271-83af24cd5008}</Project>
+ <Name>Org.Apache.REEF.Wake</Name>
+ </ProjectReference>
+ <ProjectReference Include="$(SolutionDir)\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="$(SolutionDir)\Org.Apache.REEF.Utilities\Org.Apache.REEF.Utilities.csproj">
+ <Project>{79e7f89a-1dfb-45e1-8d43-d71a954aeb98}</Project>
+ <Name>Org.Apache.REEF.Utilities</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.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/05766f9d/lang/cs/Org.Apache.REEF.All/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.All/Properties/AssemblyInfo.cs b/lang/cs/Org.Apache.REEF.All/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..66bfd68
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.All/Properties/AssemblyInfo.cs
@@ -0,0 +1,55 @@
+/**
+ * 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("Org.Apache.REEF.All")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Org.Apache.REEF.All")]
+[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("def59cbf-1539-414c-a518-486d1553077c")]
+
+// 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/05766f9d/lang/cs/Org.Apache.REEF.Client/CLRBridgeClient.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Client/CLRBridgeClient.cs b/lang/cs/Org.Apache.REEF.Client/CLRBridgeClient.cs
new file mode 100644
index 0000000..9dbd970
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Client/CLRBridgeClient.cs
@@ -0,0 +1,147 @@
+/**
+ * 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.Evaluator;
+using Org.Apache.REEF.Driver;
+using Org.Apache.REEF.Driver.bridge;
+using Org.Apache.REEF.Driver.Bridge;
+using Org.Apache.REEF.Driver.Defaults;
+using Org.Apache.REEF.Examples.HelloCLRBridge.Handlers;
+using Org.Apache.REEF.Network.Naming;
+using Org.Apache.REEF.Utilities.Logging;
+using Org.Apache.REEF.Tang.Interface;
+using Org.Apache.REEF.Tang.Util;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using Org.Apache.REEF.Examples.Tasks.HelloTask;
+
+namespace Org.Apache.REEF.Client
+{
+ public class CLRBridgeClient
+ {
+ public const string ReefHome = "REEF_HOME";
+ public const string DefaultClrFolder = @"lang\java\reef-bridge-project\reef-bridge\dotnetHello";
+ public const string DefaultReefJar = @"lang\java\reef-bridge-project\reef-bridge\target\" + Constants.BridgeJarFileName;
+ public const string DefaultRunCommand = "run.cmd";
+
+ private static string _clrFolder = null;
+ private static string _reefJar = null;
+ private static string _className = Constants.BridgeLaunchClass;
+ private static string _runCommand = DefaultRunCommand;
+ private static string _submitControlForAllocatedEvaluator = "submitContextAndTask"; // submitContext, submitContextAndTask, submitContextAndServiceAndTask
+
+ public static HashSet<string> AppDll
+ {
+ get
+ {
+ HashSet<string> appDlls = new HashSet<string>();
+ appDlls.Add(typeof(HelloStartHandler).Assembly.GetName().Name);
+ appDlls.Add(typeof(HelloTask).Assembly.GetName().Name);
+ appDlls.Add(typeof(INameServer).Assembly.GetName().Name);
+ return appDlls;
+ }
+ }
+
+ public static IConfiguration ClrConfigurations
+ {
+ get
+ {
+ return DriverBridgeConfiguration.ConfigurationModule
+ .Set(DriverBridgeConfiguration.OnDriverStarted, GenericType<HelloStartHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnEvaluatorAllocated, GenericType<HelloAllocatedEvaluatorHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnEvaluatorAllocated, GenericType<AnotherHelloAllocatedEvaluatorHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnContextActive, GenericType<HelloActiveContextHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnTaskMessage, GenericType<HelloTaskMessageHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnEvaluatorFailed, GenericType<HelloFailedEvaluatorHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnTaskFailed, GenericType<HelloFailedTaskHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnTaskRunning, GenericType<HelloRunningTaskHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnEvaluatorRequested, GenericType<HelloEvaluatorRequestorHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnHttpEvent, GenericType<HelloHttpHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnEvaluatorCompleted, GenericType<HelloCompletedEvaluatorHandler>.Class)
+ .Set(DriverBridgeConfiguration.CustomTraceListeners, GenericType<DefaultCustomTraceListener>.Class)
+ .Set(DriverBridgeConfiguration.CustomTraceLevel, Level.Info.ToString())
+ .Set(DriverBridgeConfiguration.CommandLineArguments, _submitControlForAllocatedEvaluator) // this is for testing purpose only
+ .Set(DriverBridgeConfiguration.OnDriverRestarted, GenericType<HelloRestartHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnDriverReconnect, GenericType<DefaultLocalHttpDriverConnection>.Class)
+ .Set(DriverBridgeConfiguration.OnDirverRestartContextActive, GenericType<HelloDriverRestartActiveContextHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnDriverRestartTaskRunning, GenericType<HelloDriverRestartRunningTaskHandler>.Class)
+ .Build();
+ }
+ }
+
+ public static void Main(string[] args)
+ {
+ Console.WriteLine("start running client: " + DateTime.Now);
+ bool runOnYarn = false;
+ if (args != null)
+ {
+ if (args.Length > 0)
+ {
+ runOnYarn = bool.Parse(args[0]);
+ }
+
+ if (args.Length > 1)
+ {
+ _className = args[1];
+ }
+ if (args.Length > 2)
+ {
+ _clrFolder = args[2];
+ }
+ if (args.Length > 3)
+ {
+ _reefJar = args[3];
+ }
+ if (args.Length > 4)
+ {
+ _runCommand = args[4];
+ }
+ }
+
+ if (string.IsNullOrWhiteSpace(_reefJar))
+ {
+ _reefJar = Path.Combine(Environment.GetEnvironmentVariable(ReefHome), DefaultReefJar);
+ }
+
+ if (string.IsNullOrWhiteSpace(_clrFolder))
+ {
+ _clrFolder = Path.Combine(Environment.GetEnvironmentVariable(ReefHome), DefaultClrFolder);
+ }
+
+ // Configurable driver submission settings:
+ // DriverMemory, default to 512
+ // DriverIdentifer, default to "ReefClrBridge"
+ // Submit, default to True. Setting it to false and Java client will construct the driver.config and write to to FS without submitting the job
+ // ClientWaitTime, default to -1 which means client will wait till Driver is done
+ // SubmissionDirectory, default to a tmp folder on (H)DFS according to the YARN assigned application id, if user sets it, it must be guaranteed to be unique across multiple jobs
+ // RunOnYarn, default to false to run on local runtime.
+ // UpdateJarBeforeSubmission, default to true. Setting it to false can reduce startup time, but only if the jar file already contains all application dlls.
+ // JavaLogLevel, default to INFO.
+ DriverSubmissionSettings driverSubmissionSettings = new DriverSubmissionSettings()
+ {
+ RunOnYarn = runOnYarn,
+ SubmissionDirectory = "reefClrBridgeTmp/job_" + Guid.NewGuid().ToString("N").Substring(0, 8)
+ };
+
+ Console.WriteLine("start calling Run: " + DateTime.Now);
+ ClrClientHelper.Run(AppDll, ClrConfigurations, driverSubmissionSettings, _reefJar, _runCommand, _clrFolder, _className);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Client/Org.Apache.REEF.Client.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Client/Org.Apache.REEF.Client.csproj b/lang/cs/Org.Apache.REEF.Client/Org.Apache.REEF.Client.csproj
new file mode 100644
index 0000000..b173562
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Client/Org.Apache.REEF.Client.csproj
@@ -0,0 +1,134 @@
+<?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>{5094C35B-4FDB-4322-AC05-45D684501CBF}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Org.Apache.REEF.Client</RootNamespace>
+ <AssemblyName>Org.Apache.REEF.Client</AssemblyName>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <RestorePackages>true</RestorePackages>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
+ </PropertyGroup>
+ <Import Project="$(SolutionDir)\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="System" />
+ <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="CLRBridgeClient.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="run.cmd" />
+ </ItemGroup>
+ <ItemGroup>
+ <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="$(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.Common\Org.Apache.REEF.Common.csproj">
+ <Project>{545a0582-4105-44ce-b99c-b1379514a630}</Project>
+ <Name>Org.Apache.REEF.Common</Name>
+ </ProjectReference>
+ <ProjectReference Include="$(SolutionDir)\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="$(SolutionDir)\Org.Apache.REEF.Examples.Tasks\Org.Apache.REEF.Examples.Tasks.csproj">
+ <Project>{75503f90-7b82-4762-9997-94b5c68f15db}</Project>
+ <Name>Org.Apache.REEF.Examples.Tasks</Name>
+ </ProjectReference>
+ <ProjectReference Include="$(SolutionDir)\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="$(SolutionDir)\Org.Apache.REEF.Wake\Org.Apache.REEF.Wake.csproj">
+ <Project>{cdfb3464-4041-42b1-9271-83af24cd5008}</Project>
+ <Name>Org.Apache.REEF.Wake</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Org.Apache.REEF.Examples.HelloCLRBridge\Org.Apache.REEF.Examples.HelloCLRBridge.csproj">
+ <Project>{a78dd8e8-31d0-4506-8738-daa9da86d55b}</Project>
+ <Name>Org.Apache.REEF.Examples.HelloCLRBridge</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Org.Apache.REEF.Examples.RetainedEvalCLRBridge\Org.Apache.REEF.Examples.RetainedEvalCLRBridge.csproj">
+ <Project>{05ec65cf-848d-49ab-9e67-57c14ea63044}</Project>
+ <Name>Org.Apache.REEF.Examples.RetainedEvalCLRBridge</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.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/05766f9d/lang/cs/Org.Apache.REEF.Client/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Client/Properties/AssemblyInfo.cs b/lang/cs/Org.Apache.REEF.Client/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..ca5e1fb
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Client/Properties/AssemblyInfo.cs
@@ -0,0 +1,55 @@
+/**
+ * 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("Org.Apache.REEF.Client")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Org.Apache.REEF.Client")]
+[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("8717944c-5e99-4f95-a916-5ca3c3f8e697")]
+
+// 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/05766f9d/lang/cs/Org.Apache.REEF.Client/run.cmd
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Client/run.cmd b/lang/cs/Org.Apache.REEF.Client/run.cmd
new file mode 100644
index 0000000..3dca837
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Client/run.cmd
@@ -0,0 +1,45 @@
+@REM
+@REM Copyright (C) 2013 Microsoft Corporation
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+@REM
+
+@echo off
+::
+:: Copyright (C) 2013 Microsoft Corporation
+::
+:: Licensed 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.
+::
+
+
+:: RUNTIME
+set SHADED_JAR=%REEF_HOME%\lang\java\reef-bridge-project\reef-bridge\target\reef-bridge-0.11.0-incubating-SNAPSHOT-shaded.jar
+
+set LOGGING_CONFIG=-Djava.util.logging.config.class=org.apache.reef.util.logging.CLRLoggingConfig
+
+set CLASSPATH=%HADOOP_HOME%\share\hadoop\hdfs\lib\*;%HADOOP_HOME%\share\hadoop\hdfs\*;%HADOOP_HOME%\share\hadoop\common\*;%HADOOP_HOME%\share\hadoop\common\lib\*;%HADOOP_HOME%\share\hadoop\mapreduce\lib\*;%HADOOP_HOME%\share\hadoop\mapreduce\*;%HADOOP_HOME%\share\hadoop\yarn\*;%HADOOP_HOME%\share\hadoop\yarn\lib\*
+
+set CMD=%JAVA_HOME%\bin\java.exe -cp %HADOOP_HOME%\etc\hadoop;%SHADED_JAR%;%CLASSPATH% %LOGGING_CONFIG% %*
+::%LOGGING_CONFIG%
+echo %CMD%
+%CMD%
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Common/Org.Apache.REEF.Common.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Common/Org.Apache.REEF.Common.csproj b/lang/cs/Org.Apache.REEF.Common/Org.Apache.REEF.Common.csproj
index d707d48..572af49 100644
--- a/lang/cs/Org.Apache.REEF.Common/Org.Apache.REEF.Common.csproj
+++ b/lang/cs/Org.Apache.REEF.Common/Org.Apache.REEF.Common.csproj
@@ -30,7 +30,7 @@ under the License.
<RestorePackages>true</RestorePackages>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\..</SolutionDir>
</PropertyGroup>
- <Import Project="$(SolutionDir)\Source\build.props" />
+ <Import Project="$(SolutionDir)\build.props" />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Driver/Org.Apache.REEF.Driver.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Org.Apache.REEF.Driver.csproj b/lang/cs/Org.Apache.REEF.Driver/Org.Apache.REEF.Driver.csproj
index ef874e8..8512128 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Org.Apache.REEF.Driver.csproj
+++ b/lang/cs/Org.Apache.REEF.Driver/Org.Apache.REEF.Driver.csproj
@@ -30,7 +30,7 @@ under the License.
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\..</SolutionDir>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
- <Import Project="$(SolutionDir)\Source\build.props" />
+ <Import Project="$(SolutionDir)\build.props" />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Evaluator/Org.Apache.REEF.Evaluator.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Evaluator/Org.Apache.REEF.Evaluator.csproj b/lang/cs/Org.Apache.REEF.Evaluator/Org.Apache.REEF.Evaluator.csproj
index f5fc9de..cf26169 100644
--- a/lang/cs/Org.Apache.REEF.Evaluator/Org.Apache.REEF.Evaluator.csproj
+++ b/lang/cs/Org.Apache.REEF.Evaluator/Org.Apache.REEF.Evaluator.csproj
@@ -31,7 +31,7 @@ under the License.
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
- <Import Project="$(SolutionDir)\Source\build.props" />
+ <Import Project="$(SolutionDir)\build.props" />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Examples.HelloCLRBridge/Org.Apache.REEF.Examples.HelloCLRBridge.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Examples.HelloCLRBridge/Org.Apache.REEF.Examples.HelloCLRBridge.csproj b/lang/cs/Org.Apache.REEF.Examples.HelloCLRBridge/Org.Apache.REEF.Examples.HelloCLRBridge.csproj
index ea4fbf8..a9a0471 100644
--- a/lang/cs/Org.Apache.REEF.Examples.HelloCLRBridge/Org.Apache.REEF.Examples.HelloCLRBridge.csproj
+++ b/lang/cs/Org.Apache.REEF.Examples.HelloCLRBridge/Org.Apache.REEF.Examples.HelloCLRBridge.csproj
@@ -30,7 +30,7 @@ under the License.
<RestorePackages>true</RestorePackages>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
</PropertyGroup>
- <Import Project="$(SolutionDir)\Source\build.props" />
+ <Import Project="$(SolutionDir)\build.props" />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Examples.RetainedEvalCLRBridge/Org.Apache.REEF.Examples.RetainedEvalCLRBridge.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Examples.RetainedEvalCLRBridge/Org.Apache.REEF.Examples.RetainedEvalCLRBridge.csproj b/lang/cs/Org.Apache.REEF.Examples.RetainedEvalCLRBridge/Org.Apache.REEF.Examples.RetainedEvalCLRBridge.csproj
index 3043ba7..a7645b9 100644
--- a/lang/cs/Org.Apache.REEF.Examples.RetainedEvalCLRBridge/Org.Apache.REEF.Examples.RetainedEvalCLRBridge.csproj
+++ b/lang/cs/Org.Apache.REEF.Examples.RetainedEvalCLRBridge/Org.Apache.REEF.Examples.RetainedEvalCLRBridge.csproj
@@ -30,7 +30,7 @@ under the License.
<RestorePackages>true</RestorePackages>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
</PropertyGroup>
- <Import Project="$(SolutionDir)\Source\build.props" />
+ <Import Project="$(SolutionDir)\build.props" />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Examples.Tasks/Org.Apache.REEF.Examples.Tasks.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Examples.Tasks/Org.Apache.REEF.Examples.Tasks.csproj b/lang/cs/Org.Apache.REEF.Examples.Tasks/Org.Apache.REEF.Examples.Tasks.csproj
index 1d0f8d2..333e2b7 100644
--- a/lang/cs/Org.Apache.REEF.Examples.Tasks/Org.Apache.REEF.Examples.Tasks.csproj
+++ b/lang/cs/Org.Apache.REEF.Examples.Tasks/Org.Apache.REEF.Examples.Tasks.csproj
@@ -30,7 +30,7 @@ under the License.
<RestorePackages>true</RestorePackages>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
</PropertyGroup>
- <Import Project="$(SolutionDir)\Source\build.props" />
+ <Import Project="$(SolutionDir)\build.props" />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/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 6824277..6797c1d 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
@@ -30,7 +30,7 @@ under the License.
<RestorePackages>true</RestorePackages>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
</PropertyGroup>
- <Import Project="$(SolutionDir)\Source\build.props" />
+ <Import Project="$(SolutionDir)\build.props" />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Tang.Examples/Org.Apache.REEF.Tang.Examples.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Examples/Org.Apache.REEF.Tang.Examples.csproj b/lang/cs/Org.Apache.REEF.Tang.Examples/Org.Apache.REEF.Tang.Examples.csproj
index 33c9b03..1a95e55 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Examples/Org.Apache.REEF.Tang.Examples.csproj
+++ b/lang/cs/Org.Apache.REEF.Tang.Examples/Org.Apache.REEF.Tang.Examples.csproj
@@ -30,7 +30,7 @@ under the License.
<RestorePackages>true</RestorePackages>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
</PropertyGroup>
- <Import Project="$(SolutionDir)\Source\build.props" />
+ <Import Project="$(SolutionDir)\build.props" />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Tang.Tools/Org.Apache.REEF.Tang.Tools.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tools/Org.Apache.REEF.Tang.Tools.csproj b/lang/cs/Org.Apache.REEF.Tang.Tools/Org.Apache.REEF.Tang.Tools.csproj
index 84d6e09..7e15775 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tools/Org.Apache.REEF.Tang.Tools.csproj
+++ b/lang/cs/Org.Apache.REEF.Tang.Tools/Org.Apache.REEF.Tang.Tools.csproj
@@ -30,7 +30,7 @@ under the License.
<RestorePackages>true</RestorePackages>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
</PropertyGroup>
- <Import Project="$(SolutionDir)\Source\build.props" />
+ <Import Project="$(SolutionDir)\build.props" />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Tang/Org.Apache.REEF.Tang.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Org.Apache.REEF.Tang.csproj b/lang/cs/Org.Apache.REEF.Tang/Org.Apache.REEF.Tang.csproj
index b73bb03..ce59e7c 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Org.Apache.REEF.Tang.csproj
+++ b/lang/cs/Org.Apache.REEF.Tang/Org.Apache.REEF.Tang.csproj
@@ -30,7 +30,7 @@ under the License.
<RestorePackages>true</RestorePackages>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
</PropertyGroup>
- <Import Project="$(SolutionDir)\Source\build.props" />
+ <Import Project="$(SolutionDir)\build.props" />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Tests/ConfigFiles/evaluator.conf
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/ConfigFiles/evaluator.conf b/lang/cs/Org.Apache.REEF.Tests/ConfigFiles/evaluator.conf
new file mode 100644
index 0000000..67256f5
Binary files /dev/null and b/lang/cs/Org.Apache.REEF.Tests/ConfigFiles/evaluator.conf differ
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Tests/Evaluator/EvaluatorConfigurationsTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Evaluator/EvaluatorConfigurationsTests.cs b/lang/cs/Org.Apache.REEF.Tests/Evaluator/EvaluatorConfigurationsTests.cs
new file mode 100644
index 0000000..c6ed210
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Tests/Evaluator/EvaluatorConfigurationsTests.cs
@@ -0,0 +1,42 @@
+/**
+ * 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 Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace Org.Apache.REEF.Tests.Evaluator
+{
+ [TestClass]
+ public class EvaluatorConfigurationsTests
+ {
+ [TestMethod, Priority(0), TestCategory("Unit")]
+ [DeploymentItem(@"ConfigFiles")]
+ public void TestEvaluatorConfigurations()
+ {
+ EvaluatorConfigurations evaluatorConfigurations = new EvaluatorConfigurations("evaluator.conf");
+
+ Assert.IsTrue(evaluatorConfigurations.EvaluatorId.Equals("Node-1-1414443998204"));
+
+ Assert.IsTrue(evaluatorConfigurations.ApplicationId.Equals("REEF_LOCAL_RUNTIME"));
+
+ string rootContextConfigString = evaluatorConfigurations.RootContextConfiguration;
+ Assert.IsFalse(string.IsNullOrWhiteSpace(rootContextConfigString));
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Tests/Evaluator/EvaluatorTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Evaluator/EvaluatorTests.cs b/lang/cs/Org.Apache.REEF.Tests/Evaluator/EvaluatorTests.cs
new file mode 100644
index 0000000..c315d4b
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Tests/Evaluator/EvaluatorTests.cs
@@ -0,0 +1,95 @@
+/**
+ * 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.Avro;
+using Org.Apache.REEF.Common.Evaluator;
+using Org.Apache.REEF.Tasks;
+using Org.Apache.REEF.Tang.Formats;
+using Org.Apache.REEF.Tang.Interface;
+using Org.Apache.REEF.Tang.Util;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using System.IO;
+using Org.Apache.REEF.Examples.Tasks.ShellTask;
+using Org.Apache.REEF.Tang.Implementations.Tang;
+
+namespace Org.Apache.REEF.Tests.Evaluator
+{
+ [TestClass]
+ public class EvaluatorTests
+ {
+ [TestMethod, Priority(0), TestCategory("Functional")]
+ [Description("Parse Evaluator configuration from Java, inject and execute Shell task with DIR command based on the configuration")]
+ [DeploymentItem(@"ConfigFiles")]
+ public void CanInjectAndExecuteTask()
+ {
+ //To enforce that shell task dll be copied to output directory.
+ ShellTask tmpTask = new ShellTask("invalid");
+ Assert.IsNotNull(tmpTask);
+
+ string tmp = Directory.GetCurrentDirectory();
+ Assert.IsNotNull(tmp);
+
+ AvroConfigurationSerializer serializer = new AvroConfigurationSerializer();
+ AvroConfiguration avroConfiguration = serializer.AvroDeseriaizeFromFile("evaluator.conf");
+ Assert.IsNotNull(avroConfiguration);
+
+ ICsConfigurationBuilder cb = TangFactory.GetTang().NewConfigurationBuilder();
+ cb.AddConfiguration(TaskConfiguration.ConfigurationModule
+ .Set(TaskConfiguration.Identifier, "Test_CLRContext_task")
+ .Set(TaskConfiguration.Task, GenericType<ShellTask>.Class)
+ .Build());
+ cb.BindNamedParameter<ShellTask.Command, string>(GenericType<ShellTask.Command>.Class, "dir");
+
+ IConfiguration taskConfiguration = cb.Build();
+
+ string taskConfig = serializer.ToString(taskConfiguration);
+
+ ITask task = null;
+ TaskConfiguration config = new TaskConfiguration(taskConfig);
+ Assert.IsNotNull(config);
+ try
+ {
+ IInjector injector = TangFactory.GetTang().NewInjector(config.TangConfig);
+ task = (ITask)injector.GetInstance(typeof(ITask));
+ }
+ catch (Exception e)
+ {
+ throw new InvalidOperationException("unable to inject task with configuration: " + taskConfig, e);
+ }
+
+ byte[] bytes = task.Call(null);
+ string result = System.Text.Encoding.Default.GetString(bytes);
+
+ //a dir command is executed in the container directory, which includes the file "evaluator.conf"
+ Assert.IsTrue(result.Contains("evaluator.conf"));
+ }
+
+ [TestMethod, Priority(0), TestCategory("Unit")]
+ [Description("Test driver information extacted from Http server")]
+ public void CanExtractDriverInformaiton()
+ {
+ const string InfoString = "{\"remoteId\":\"socket://10.121.136.231:14272\",\"startTime\":\"2014 08 28 10:50:32\",\"services\":[{\"serviceName\":\"NameServer\",\"serviceInfo\":\"10.121.136.231:16663\"}]}";
+ AvroDriverInfo info = AvroJsonSerializer<AvroDriverInfo>.FromString(InfoString);
+ Assert.IsTrue(info.remoteId.Equals("socket://10.121.136.231:14272"));
+ Assert.IsTrue(info.startTime.Equals("2014 08 28 10:50:32"));
+ Assert.IsTrue(new DriverInformation(info.remoteId, info.startTime, info.services).NameServerId.Equals("10.121.136.231:16663"));
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/TestBridgeClient.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/TestBridgeClient.cs b/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/TestBridgeClient.cs
new file mode 100644
index 0000000..58922fe
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/TestBridgeClient.cs
@@ -0,0 +1,99 @@
+/**
+ * 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;
+using System.IO;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Org.Apache.REEF.Driver;
+using Org.Apache.REEF.Utilities.Logging;
+
+namespace Org.Apache.REEF.Tests.Functional.Bridge
+{
+ [TestClass]
+ public class TestBridgeClient : ReefFunctionalTest
+ {
+ private static readonly Logger LOGGER = Logger.GetLogger(typeof(TestBridgeClient));
+
+ [TestInitialize()]
+ public void TestSetup()
+ {
+ CleanUp();
+ Init();
+ }
+
+ [TestCleanup]
+ public void TestCleanup()
+ {
+ Console.WriteLine("Post test check and clean up");
+ CleanUp();
+ }
+
+ [TestMethod, Priority(1), TestCategory("FunctionalGated")]
+ [Description("Run CLR Bridge on local runtime")]
+ [DeploymentItem(@".")]
+ [Ignore] // This is diabled by default on builds
+ public void CanRunClrBridgeOnYarn()
+ {
+ RunClrBridgeClient(runOnYarn: true);
+ }
+
+ [TestMethod, Priority(1), TestCategory("FunctionalGated")]
+ [Description("Run CLR Bridge on local runtime")]
+ [DeploymentItem(@".")]
+ [Timeout(180 * 1000)]
+ public void CanRunClrBridgeOnLocalRuntime()
+ {
+ IsOnLocalRuntiime = true;
+ RunClrBridgeClient(runOnYarn: false);
+ ValidateSuccessForLocalRuntime(2);
+ }
+
+ private void RunClrBridgeClient(bool runOnYarn)
+ {
+ const string clrBridgeClient = "Org.Apache.REEF.Client.exe";
+ List<string> arguments = new List<string>();
+ arguments.Add(runOnYarn.ToString());
+ arguments.Add(Constants.BridgeLaunchClass);
+ arguments.Add(".");
+ arguments.Add(Path.Combine(_binFolder, Constants.BridgeJarFileName));
+ arguments.Add(Path.Combine(_binFolder, _cmdFile));
+
+ ProcessStartInfo startInfo = new ProcessStartInfo()
+ {
+ FileName = clrBridgeClient,
+ Arguments = string.Join(" ", arguments),
+ RedirectStandardOutput = true,
+ UseShellExecute = false,
+ CreateNoWindow = false
+ };
+
+ LOGGER.Log(Level.Info, "executing\r\n" + startInfo.FileName + "\r\n" + startInfo.Arguments);
+ using (Process process = Process.Start(startInfo))
+ {
+ process.WaitForExit();
+ if (process.ExitCode != 0)
+ {
+ throw new InvalidOperationException("CLR client exited with error code " + process.ExitCode);
+ }
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/TestHelloBridgeHandlers.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/TestHelloBridgeHandlers.cs b/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/TestHelloBridgeHandlers.cs
new file mode 100644
index 0000000..3e7c035
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/TestHelloBridgeHandlers.cs
@@ -0,0 +1,100 @@
+/**
+ * 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.IO;
+using System.Linq;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Org.Apache.REEF.Driver.Bridge;
+using Org.Apache.REEF.Driver.Defaults;
+using Org.Apache.REEF.Examples.HelloCLRBridge.Handlers;
+using Org.Apache.REEF.Examples.Tasks.HelloTask;
+using Org.Apache.REEF.Tang.Interface;
+using Org.Apache.REEF.Tang.Util;
+using Org.Apache.REEF.Utilities.Logging;
+
+namespace Org.Apache.REEF.Tests.Functional.Bridge
+{
+ [TestClass]
+ public class TestHelloBridgeHandlers : ReefFunctionalTest
+ {
+ [TestInitialize()]
+ public void TestSetup()
+ {
+ CleanUp();
+ Init();
+ }
+
+ [TestCleanup]
+ public void TestCleanup()
+ {
+ Console.WriteLine("Post test check and clean up");
+ CleanUp();
+ }
+
+ [TestMethod, Priority(1), TestCategory("FunctionalGated")]
+ [Description("Test Hello Handler on local runtime")]
+ [DeploymentItem(@".")]
+ [Timeout(180 * 1000)]
+ public void RunHelloHandlerOnLocalRuntime()
+ {
+ IsOnLocalRuntiime = true;
+ TestRun(AssembliesToCopy(), DriverConfiguration());
+ ValidateSuccessForLocalRuntime(2);
+ ValidateEvaluatorSetting();
+ }
+
+ public IConfiguration DriverConfiguration()
+ {
+ return DriverBridgeConfiguration.ConfigurationModule
+ .Set(DriverBridgeConfiguration.OnDriverStarted, GenericType<HelloStartHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnEvaluatorAllocated, GenericType<HelloAllocatedEvaluatorHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnEvaluatorAllocated, GenericType<AnotherHelloAllocatedEvaluatorHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnContextActive, GenericType<HelloActiveContextHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnTaskMessage, GenericType<HelloTaskMessageHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnEvaluatorFailed, GenericType<HelloFailedEvaluatorHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnTaskFailed, GenericType<HelloFailedTaskHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnTaskRunning, GenericType<HelloRunningTaskHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnEvaluatorRequested, GenericType<HelloEvaluatorRequestorHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnHttpEvent, GenericType<HelloHttpHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnEvaluatorCompleted, GenericType<HelloCompletedEvaluatorHandler>.Class)
+ .Set(DriverBridgeConfiguration.CustomTraceListeners, GenericType<DefaultCustomTraceListener>.Class)
+ .Set(DriverBridgeConfiguration.CustomTraceLevel, Level.Info.ToString())
+ .Set(DriverBridgeConfiguration.CommandLineArguments, "submitContextAndTask")
+ .Build();
+ }
+
+ public HashSet<string> AssembliesToCopy()
+ {
+ HashSet<string> appDlls = new HashSet<string>();
+ appDlls.Add(typeof(HelloStartHandler).Assembly.GetName().Name);
+ appDlls.Add(typeof(HelloTask).Assembly.GetName().Name);
+ return appDlls;
+ }
+
+ private void ValidateEvaluatorSetting()
+ {
+ const string successIndication = "Evaluator is assigned with 512 MB of memory and 2 cores.";
+ string[] lines = File.ReadAllLines(GetLogFile(_stdout));
+ string[] successIndicators = lines.Where(s => s.Contains(successIndication)).ToArray();
+ Assert.IsTrue(successIndicators.Count() >= 1);
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/TestSimpleEventHandlers.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/TestSimpleEventHandlers.cs b/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/TestSimpleEventHandlers.cs
new file mode 100644
index 0000000..71091e7
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/TestSimpleEventHandlers.cs
@@ -0,0 +1,108 @@
+/**
+ * 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.IO;
+using System.Linq;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Org.Apache.REEF.Common.Evaluator;
+using Org.Apache.REEF.Driver.Bridge;
+using Org.Apache.REEF.Driver.Defaults;
+using Org.Apache.REEF.Examples.HelloCLRBridge.Handlers;
+using Org.Apache.REEF.Examples.Tasks.HelloTask;
+using Org.Apache.REEF.Network.Naming;
+using Org.Apache.REEF.Tang.Interface;
+using Org.Apache.REEF.Tang.Util;
+using Org.Apache.REEF.Utilities.Logging;
+
+namespace Org.Apache.REEF.Tests.Functional.Bridge
+{
+ [TestClass]
+ public class TestSimpleEventHandlers : ReefFunctionalTest
+ {
+ [TestInitialize()]
+ public void TestSetup()
+ {
+ CleanUp();
+ Init();
+ }
+
+ [TestCleanup]
+ public void TestCleanup()
+ {
+ Console.WriteLine("Post test check and clean up");
+ CleanUp();
+ }
+
+ //[TestMethod, Priority(1), TestCategory("FunctionalGated")]
+ [Description("Test Hello Handler on local runtime")]
+ [DeploymentItem(@".")]
+ [Timeout(180 * 1000)]
+ public void RunSimpleEventHandlerOnLocalRuntime()
+ {
+ IsOnLocalRuntiime = true;
+ TestRun(AssembliesToCopy(), DriverConfiguration());
+ ValidateSuccessForLocalRuntime(2);
+ ValidateEvaluatorSetting();
+ }
+
+ public IConfiguration DriverConfiguration()
+ {
+ return DriverBridgeConfiguration.ConfigurationModule
+ .Set(DriverBridgeConfiguration.OnDriverStarted, GenericType<HelloSimpleEventHandlers>.Class)
+ .Set(DriverBridgeConfiguration.OnEvaluatorAllocated, GenericType<HelloSimpleEventHandlers>.Class)
+ .Set(DriverBridgeConfiguration.OnEvaluatorAllocated, GenericType<AnotherHelloAllocatedEvaluatorHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnContextActive, GenericType<HelloSimpleEventHandlers>.Class)
+ .Set(DriverBridgeConfiguration.OnTaskMessage, GenericType<HelloTaskMessageHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnEvaluatorFailed, GenericType<HelloSimpleEventHandlers>.Class)
+ .Set(DriverBridgeConfiguration.OnTaskCompleted, GenericType<HelloSimpleEventHandlers>.Class)
+ .Set(DriverBridgeConfiguration.OnTaskFailed, GenericType<HelloSimpleEventHandlers>.Class)
+ .Set(DriverBridgeConfiguration.OnTaskRunning, GenericType<HelloSimpleEventHandlers>.Class)
+ .Set(DriverBridgeConfiguration.OnEvaluatorRequested, GenericType<HelloSimpleEventHandlers>.Class)
+ .Set(DriverBridgeConfiguration.OnHttpEvent, GenericType<HelloSimpleEventHandlers>.Class)
+ .Set(DriverBridgeConfiguration.OnEvaluatorCompleted, GenericType<HelloSimpleEventHandlers>.Class)
+ .Set(DriverBridgeConfiguration.CustomTraceListeners, GenericType<DefaultCustomTraceListener>.Class)
+ .Set(DriverBridgeConfiguration.CustomTraceLevel, Level.Info.ToString())
+ .Set(DriverBridgeConfiguration.CommandLineArguments, "submitContextAndTask")
+ .Set(DriverBridgeConfiguration.OnDriverRestarted, GenericType<HelloRestartHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnDriverReconnect, GenericType<DefaultLocalHttpDriverConnection>.Class)
+ .Set(DriverBridgeConfiguration.OnDirverRestartContextActive, GenericType<HelloDriverRestartActiveContextHandler>.Class)
+ .Set(DriverBridgeConfiguration.OnDriverRestartTaskRunning, GenericType<HelloDriverRestartRunningTaskHandler>.Class)
+ .Build();
+ }
+
+ public HashSet<string> AssembliesToCopy()
+ {
+ HashSet<string> appDlls = new HashSet<string>();
+ appDlls.Add(typeof(HelloSimpleEventHandlers).Assembly.GetName().Name);
+ appDlls.Add(typeof(HelloTask).Assembly.GetName().Name);
+ appDlls.Add(typeof(INameServer).Assembly.GetName().Name);
+ return appDlls;
+ }
+
+ private void ValidateEvaluatorSetting()
+ {
+ const string successIndication = "Evaluator is assigned with 512 MB of memory and 2 cores.";
+ string[] lines = File.ReadAllLines(GetLogFile(_stdout));
+ string[] successIndicators = lines.Where(s => s.Contains(successIndication)).ToArray();
+ Assert.IsTrue(successIndicators.Count() >= 1);
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Tests/Functional/Driver/DriverTestStartHandler.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Functional/Driver/DriverTestStartHandler.cs b/lang/cs/Org.Apache.REEF.Tests/Functional/Driver/DriverTestStartHandler.cs
new file mode 100644
index 0000000..b3f64dd
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Tests/Functional/Driver/DriverTestStartHandler.cs
@@ -0,0 +1,46 @@
+/**
+ * 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;
+using Org.Apache.REEF.Driver.bridge;
+using Org.Apache.REEF.Tang.Annotations;
+using Org.Apache.REEF.Utilities.Logging;
+using Org.Apache.REEF.Wake.Time;
+
+namespace Org.Apache.REEF.Tests.Functional.Driver
+{
+ public class DriverTestStartHandler : IStartHandler
+ {
+ private static readonly Logger LOGGER = Logger.GetLogger(typeof(DriverTestStartHandler));
+
+ private IClock _clock;
+ private HttpServerPort _httpServerPort;
+
+ [Inject]
+ public DriverTestStartHandler(IClock clock, HttpServerPort httpServerPort)
+ {
+ _clock = clock;
+ _httpServerPort = httpServerPort;
+ Identifier = "DriverTestStartHandler";
+ LOGGER.Log(Level.Info, "Http Server port number: " + httpServerPort.PortNumber);
+ }
+
+ public string Identifier { get; set; }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Tests/Functional/Driver/TestDriver.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Functional/Driver/TestDriver.cs b/lang/cs/Org.Apache.REEF.Tests/Functional/Driver/TestDriver.cs
new file mode 100644
index 0000000..18aa59b
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Tests/Functional/Driver/TestDriver.cs
@@ -0,0 +1,68 @@
+/**
+ * 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.VisualStudio.TestTools.UnitTesting;
+using Org.Apache.REEF.Driver.Bridge;
+using Org.Apache.REEF.Driver.Defaults;
+using Org.Apache.REEF.Tang.Interface;
+using Org.Apache.REEF.Tang.Util;
+using Org.Apache.REEF.Utilities.Logging;
+
+namespace Org.Apache.REEF.Tests.Functional.Driver
+{
+ [TestClass]
+ public class TestDriver : ReefFunctionalTest
+ {
+ [TestInitialize()]
+ public void TestSetup()
+ {
+ CleanUp();
+ }
+
+ [TestCleanup]
+ public void TestCleanup()
+ {
+ CleanUp();
+ }
+
+ /// <summary>
+ /// This is to test DriverTestStartHandler. No evaluator and tasks are involked.
+ /// </summary>
+ [TestMethod, Priority(1), TestCategory("FunctionalGated")]
+ [Description("Test DriverTestStartHandler. No evaluator and tasks are involked")]
+ [DeploymentItem(@".")]
+ [Timeout(180 * 1000)]
+ public void TestDriverStart()
+ {
+ IConfiguration driverConfig = DriverBridgeConfiguration.ConfigurationModule
+ .Set(DriverBridgeConfiguration.OnDriverStarted, GenericType<DriverTestStartHandler>.Class)
+ .Set(DriverBridgeConfiguration.CustomTraceListeners, GenericType<DefaultCustomTraceListener>.Class)
+ .Set(DriverBridgeConfiguration.CustomTraceLevel, Level.Info.ToString())
+ .Build();
+
+ HashSet<string> appDlls = new HashSet<string>();
+ appDlls.Add(typeof(DriverTestStartHandler).Assembly.GetName().Name);
+
+ TestRun(appDlls, driverConfig);
+
+ ValidateSuccessForLocalRuntime(0);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Tests/Functional/Messaging/MessageDriver.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Functional/Messaging/MessageDriver.cs b/lang/cs/Org.Apache.REEF.Tests/Functional/Messaging/MessageDriver.cs
new file mode 100644
index 0000000..24141fb
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Tests/Functional/Messaging/MessageDriver.cs
@@ -0,0 +1,117 @@
+/**
+ * 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.Globalization;
+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.Driver.Task;
+using Org.Apache.REEF.Tang.Annotations;
+using Org.Apache.REEF.Tang.Interface;
+using Org.Apache.REEF.Tang.Util;
+using Org.Apache.REEF.Tasks;
+using Org.Apache.REEF.Utilities;
+using Org.Apache.REEF.Utilities.Diagnostics;
+using Org.Apache.REEF.Utilities.Logging;
+
+namespace Org.Apache.REEF.Tests.Functional.Messaging
+{
+ public class MessageDriver : IStartHandler, IObserver<IAllocatedEvaluator>, IObserver<IEvaluatorRequestor>, IObserver<ITaskMessage>, IObserver<IRunningTask>
+ {
+ public const int NumerOfEvaluator = 1;
+
+ public const string Message = "MESSAGE::DRIVER";
+
+ private static readonly Logger LOGGER = Logger.GetLogger(typeof(MessageDriver));
+
+ [Inject]
+ public MessageDriver()
+ {
+ CreateClassHierarchy();
+ Identifier = "TaskMessagingStartHandler";
+ }
+
+ public string Identifier { get; set; }
+
+ public void OnNext(IAllocatedEvaluator eval)
+ {
+ string taskId = "Task_" + eval.Id;
+
+ IConfiguration contextConfiguration = ContextConfiguration.ConfigurationModule
+ .Set(ContextConfiguration.Identifier, taskId)
+ .Build();
+
+ IConfiguration taskConfiguration = TaskConfiguration.ConfigurationModule
+ .Set(TaskConfiguration.Identifier, taskId)
+ .Set(TaskConfiguration.Task, GenericType<MessageTask>.Class)
+ .Set(TaskConfiguration.OnMessage, GenericType<MessageTask.MessagingDriverMessageHandler>.Class)
+ .Set(TaskConfiguration.OnSendMessage, GenericType<MessageTask>.Class)
+ .Build();
+
+ eval.SubmitContextAndTask(contextConfiguration, taskConfiguration);
+ }
+
+ public void OnNext(IEvaluatorRequestor evalutorRequestor)
+ {
+ EvaluatorRequest request = new EvaluatorRequest(NumerOfEvaluator, 512, 2, "WonderlandRack", "TaskMessagingEvaluator");
+ evalutorRequestor.Submit(request);
+ }
+
+ public void OnNext(ITaskMessage taskMessage)
+ {
+ string msgReceived = ByteUtilities.ByteArrarysToString(taskMessage.Message);
+
+ LOGGER.Log(Level.Info, string.Format(CultureInfo.InvariantCulture, "CLR TaskMessagingTaskMessageHandler received following message from Task: {0}, Message: {1}.", taskMessage.TaskId, msgReceived));
+
+ if (!msgReceived.StartsWith(MessageTask.MessageSend, true, CultureInfo.CurrentCulture))
+ {
+ Exceptions.Throw(new Exception("Unexpected message: " + msgReceived), "Unexpected task message received: " + msgReceived, LOGGER);
+ }
+ }
+
+ public void OnNext(IRunningTask runningTask)
+ {
+ LOGGER.Log(Level.Info, string.Format(CultureInfo.InvariantCulture, "TaskMessegingRunningTaskHandler: {0} is to send message {1}.", runningTask.Id, Message));
+ runningTask.Send(ByteUtilities.StringToByteArrays(Message));
+ }
+
+ public void OnCompleted()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void OnError(Exception error)
+ {
+ throw new NotImplementedException();
+ }
+
+ private void CreateClassHierarchy()
+ {
+ HashSet<string> clrDlls = new HashSet<string>();
+ clrDlls.Add(typeof(IDriver).Assembly.GetName().Name);
+ clrDlls.Add(typeof(ITask).Assembly.GetName().Name);
+ clrDlls.Add(typeof(MessageTask).Assembly.GetName().Name);
+
+ ClrHandlerHelper.GenerateClassHierarchy(clrDlls);
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Tests/Functional/Messaging/MessageTask.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Functional/Messaging/MessageTask.cs b/lang/cs/Org.Apache.REEF.Tests/Functional/Messaging/MessageTask.cs
new file mode 100644
index 0000000..0c55983
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Tests/Functional/Messaging/MessageTask.cs
@@ -0,0 +1,104 @@
+/**
+ * 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.Globalization;
+using System.Threading;
+using Org.Apache.REEF.Examples.Tasks.HelloTask;
+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.Diagnostics;
+using Org.Apache.REEF.Utilities.Logging;
+
+namespace Org.Apache.REEF.Tests.Functional.Messaging
+{
+ public class MessageTask : ITask, ITaskMessageSource
+ {
+ public const string MessageSend = "MESSAGE:TASK";
+
+ private static readonly Logger LOGGER = Logger.GetLogger(typeof(MessageTask));
+
+ [Inject]
+ public MessageTask()
+ {
+ }
+
+ public HelloService Service { get; set; }
+
+ public Optional<TaskMessage> Message
+ {
+ get
+ {
+ TaskMessage defaultTaskMessage = TaskMessage.From(
+ "messagingSourceId",
+ ByteUtilities.StringToByteArrays(MessageSend + " generated at " + DateTime.Now.ToString(CultureInfo.InvariantCulture)));
+ return Optional<TaskMessage>.Of(defaultTaskMessage);
+ }
+
+ set
+ {
+ }
+ }
+
+ public byte[] Call(byte[] memento)
+ {
+ Console.WriteLine("Hello, CLR TaskMsg!");
+ Thread.Sleep(5 * 1000);
+ return null;
+ }
+
+ public void Dispose()
+ {
+ LOGGER.Log(Level.Info, "TaskMsg disposed.");
+ }
+
+ private void DriverMessage(string message)
+ {
+ LOGGER.Log(Level.Info, "Receieved DriverMessage in TaskMsg: " + message);
+ if (!message.Equals(MessageDriver.Message))
+ {
+ Exceptions.Throw(new Exception("Unexpected driver message: " + message), "Unexpected driver message received: " + message, LOGGER);
+ }
+ }
+
+ public class MessagingDriverMessageHandler : IDriverMessageHandler
+ {
+ private MessageTask _parentTask;
+
+ [Inject]
+ public MessagingDriverMessageHandler(MessageTask task)
+ {
+ _parentTask = task;
+ }
+
+ public void Handle(IDriverMessage value)
+ {
+ string message = string.Empty;
+ LOGGER.Log(Level.Verbose, "Receieved a message from driver, handling it with MessagingDriverMessageHandler");
+ if (value.Message.IsPresent())
+ {
+ message = ByteUtilities.ByteArrarysToString(value.Message.Value);
+ }
+ _parentTask.DriverMessage(message);
+ }
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/05766f9d/lang/cs/Org.Apache.REEF.Tests/Functional/Messaging/TestTaskMessage.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Functional/Messaging/TestTaskMessage.cs b/lang/cs/Org.Apache.REEF.Tests/Functional/Messaging/TestTaskMessage.cs
new file mode 100644
index 0000000..7a0b59a
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Tests/Functional/Messaging/TestTaskMessage.cs
@@ -0,0 +1,74 @@
+/**
+ * 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.VisualStudio.TestTools.UnitTesting;
+using Org.Apache.REEF.Driver.Bridge;
+using Org.Apache.REEF.Driver.Defaults;
+using Org.Apache.REEF.Tang.Interface;
+using Org.Apache.REEF.Tang.Util;
+using Org.Apache.REEF.Utilities.Logging;
+
+namespace Org.Apache.REEF.Tests.Functional.Messaging
+{
+ [TestClass]
+ public class TestTaskMessage : ReefFunctionalTest
+ {
+ [TestInitialize()]
+ public void TestSetup()
+ {
+ CleanUp();
+ Init();
+ }
+
+ [TestCleanup]
+ public void TestCleanup()
+ {
+ CleanUp();
+ }
+
+ /// <summary>
+ /// This test is to test both task message and driver message. The messages are sent
+ /// from one side and received in the corresponding handlers and verified in the test
+ /// </summary>
+ [TestMethod, Priority(1), TestCategory("FunctionalGated")]
+ [Description("Test task message and driver message")]
+ [DeploymentItem(@".")]
+ [Timeout(180 * 1000)]
+ public void TestSendTaskMessage()
+ {
+ IConfiguration driverConfig = DriverBridgeConfiguration.ConfigurationModule
+ .Set(DriverBridgeConfiguration.OnDriverStarted, GenericType<MessageDriver>.Class)
+ .Set(DriverBridgeConfiguration.OnEvaluatorAllocated, GenericType<MessageDriver>.Class)
+ .Set(DriverBridgeConfiguration.OnTaskMessage, GenericType<MessageDriver>.Class)
+ .Set(DriverBridgeConfiguration.OnTaskRunning, GenericType<MessageDriver>.Class)
+ .Set(DriverBridgeConfiguration.OnEvaluatorRequested, GenericType<MessageDriver>.Class)
+ .Set(DriverBridgeConfiguration.CustomTraceListeners, GenericType<DefaultCustomTraceListener>.Class)
+ .Set(DriverBridgeConfiguration.CustomTraceLevel, Level.Info.ToString())
+ .Build();
+
+ HashSet<string> appDlls = new HashSet<string>();
+ appDlls.Add(typeof(MessageDriver).Assembly.GetName().Name);
+ appDlls.Add(typeof(MessageTask).Assembly.GetName().Name);
+
+ TestRun(appDlls, driverConfig);
+ ValidateSuccessForLocalRuntime(MessageDriver.NumerOfEvaluator);
+ }
+ }
+}
\ No newline at end of file