You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@reef.apache.org by ma...@apache.org on 2015/10/14 20:57:44 UTC
[1/2] incubator-reef git commit: [REEF-839] Fix typos in REEF.NET
Repository: incubator-reef
Updated Branches:
refs/heads/master e9a17d5ea -> 8b7189bd7
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestAvroSerialization.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestAvroSerialization.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestAvroSerialization.cs
index b671392..ade7479 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestAvroSerialization.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/ClassHierarchy/TestAvroSerialization.cs
@@ -66,20 +66,20 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
{
Type timerType = typeof(Timer);
Type secondType = typeof(Timer.Seconds);
- Type simpleCOnstuctorType = typeof(SimpleConstructors);
+ Type simpleConstructorType = typeof(SimpleConstructors);
IClassHierarchy ns = TangFactory.GetTang().GetClassHierarchy(
new string[] { typeof(Timer).Assembly.GetName().Name, typeof(SimpleConstructors).Assembly.GetName().Name });
IClassNode timerClassNode = (IClassNode)ns.GetNode(timerType.AssemblyQualifiedName);
INode secondNode = ns.GetNode(secondType.AssemblyQualifiedName);
- IClassNode simpleConstructorsClassNode = (IClassNode)ns.GetNode(simpleCOnstuctorType.AssemblyQualifiedName);
+ IClassNode simpleConstructorsClassNode = (IClassNode)ns.GetNode(simpleConstructorType.AssemblyQualifiedName);
AvroNode n =_serializer.ToAvroNode(ns);
IClassHierarchy ns2 = _serializer.FromAvroNode(n);
IClassNode timerClassNode2 = (IClassNode)ns2.GetNode(timerType.AssemblyQualifiedName);
INode secondNode2 = ns2.GetNode(secondType.AssemblyQualifiedName);
- IClassNode simpleConstructorsClassNode2 = (IClassNode)ns2.GetNode(simpleCOnstuctorType.AssemblyQualifiedName);
+ IClassNode simpleConstructorsClassNode2 = (IClassNode)ns2.GetNode(simpleConstructorType.AssemblyQualifiedName);
Assert.AreEqual(timerClassNode, timerClassNode2);
Assert.AreEqual(secondNode, secondNode2);
@@ -89,7 +89,7 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
/// <summary>
/// This is to test AvroSerializer.Create<AvroNode>()
/// Manually changing return type from object into strong type like AvroClassNode in AvroNode class will result in GetSchema() fail.
- /// I have manully synced all the IList into List in auto generated code. Otherswise AvroSerializer.Create<AvroNode>() will throw the following error
+ /// I have manually synced all the IList into List in auto generated code. Otherwise AvroSerializer.Create<AvroNode>() will throw the following error
/// "Could not find any matching known type for 'System.Collections.Generic.IList`1[Org.Apache.REEF.Tang.Implementations.ClassHierarchy.AvroDataContract.AvroConstructorDef]'."
/// </summary>
[TestMethod]
@@ -153,7 +153,7 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
/// <summary>
/// Test serialize a class hierarchy to a Json string then deserialize it
- /// In desrialization, in ParseSubHierarchy(), exception is thrown:
+ /// In deserialization, in ParseSubHierarchy(), exception is thrown:
/// Unable to cast object of type 'Newtonsoft.Json.Linq.JObject' to type 'Org.Apache.REEF.Tang.Implementations.ClassHierarchy.AvroDataContract.AvroClassNode'.
/// This is because auto generated code use object as return type instead of AvroClassNode
/// </summary>
@@ -163,20 +163,20 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
{
Type timerType = typeof(Timer);
Type secondType = typeof(Timer.Seconds);
- Type simpleCOnstuctorType = typeof(SimpleConstructors);
+ Type simpleConstructorType = typeof(SimpleConstructors);
IClassHierarchy ns = TangFactory.GetTang().GetClassHierarchy(
new string[] { typeof(Timer).Assembly.GetName().Name, typeof(SimpleConstructors).Assembly.GetName().Name });
IClassNode timerClassNode = (IClassNode)ns.GetNode(timerType.AssemblyQualifiedName);
INode secondNode = ns.GetNode(secondType.AssemblyQualifiedName);
- IClassNode simpleConstructorsClassNode = (IClassNode)ns.GetNode(simpleCOnstuctorType.AssemblyQualifiedName);
+ IClassNode simpleConstructorsClassNode = (IClassNode)ns.GetNode(simpleConstructorType.AssemblyQualifiedName);
string s = _serializer.ToString(ns);
IClassHierarchy ns2 = _serializer.FromString(s);
IClassNode timerClassNode2 = (IClassNode)ns2.GetNode(timerType.AssemblyQualifiedName);
INode secondNode2 = ns2.GetNode(secondType.AssemblyQualifiedName);
- IClassNode simpleConstructorsClassNode2 = (IClassNode)ns2.GetNode(simpleCOnstuctorType.AssemblyQualifiedName);
+ IClassNode simpleConstructorsClassNode2 = (IClassNode)ns2.GetNode(simpleConstructorType.AssemblyQualifiedName);
Assert.AreEqual(timerClassNode, timerClassNode2);
Assert.AreEqual(secondNode, secondNode2);
@@ -185,7 +185,7 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
/// <summary>
/// Test serialize a class hierarchy to a text file then deserialize it
- /// In desrialization, in ParseSubHierarchy(), exception is thrown:
+ /// In deserialization, in ParseSubHierarchy(), exception is thrown:
/// Unable to cast object of type 'Newtonsoft.Json.Linq.JObject' to type 'Org.Apache.REEF.Tang.Implementations.ClassHierarchy.AvroDataContract.AvroClassNode'.
/// This is because auto generated code use object as return type instead of AvroClassNode
/// </summary>
@@ -195,20 +195,20 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
{
Type timerType = typeof(Timer);
Type secondType = typeof(Timer.Seconds);
- Type simpleCOnstuctorType = typeof(SimpleConstructors);
+ Type simpleConstructorType = typeof(SimpleConstructors);
IClassHierarchy ns = TangFactory.GetTang().GetClassHierarchy(
new string[] { typeof(Timer).Assembly.GetName().Name, typeof(SimpleConstructors).Assembly.GetName().Name });
IClassNode timerClassNode = (IClassNode)ns.GetNode(timerType.AssemblyQualifiedName);
INode secondNode = ns.GetNode(secondType.AssemblyQualifiedName);
- IClassNode simpleConstructorsClassNode = (IClassNode)ns.GetNode(simpleCOnstuctorType.AssemblyQualifiedName);
+ IClassNode simpleConstructorsClassNode = (IClassNode)ns.GetNode(simpleConstructorType.AssemblyQualifiedName);
_serializer.ToTextFile(ns, "avroEven.txt");
IClassHierarchy ns2 = _serializer.FromTextFile("avroEven.txt");
IClassNode timerClassNode2 = (IClassNode)ns2.GetNode(timerType.AssemblyQualifiedName);
INode secondNode2 = ns2.GetNode(secondType.AssemblyQualifiedName);
- IClassNode simpleConstructorsClassNode2 = (IClassNode)ns2.GetNode(simpleCOnstuctorType.AssemblyQualifiedName);
+ IClassNode simpleConstructorsClassNode2 = (IClassNode)ns2.GetNode(simpleConstructorType.AssemblyQualifiedName);
Assert.AreEqual(timerClassNode, timerClassNode2);
Assert.AreEqual(secondNode, secondNode2);
@@ -216,8 +216,8 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
}
/// <summary>
- /// Test serialize a class hierarchy to a fiel and deserialize from the file
- /// Currently, in ToFile() method, writer.Write(avronNodeData) throw exception "Value cannot be null.\r\nParameter name: value".
+ /// Test serialize a class hierarchy to a file and deserialize from the file
+ /// Currently, in ToFile() method, writer.Write(avroNodeData) throw exception "Value cannot be null.\r\nParameter name: value".
/// </summary>
[Ignore] //TODO: after Avro fix the issue. Enable the test
[TestMethod]
@@ -225,20 +225,20 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
{
Type timerType = typeof(Timer);
Type secondType = typeof(Timer.Seconds);
- Type simpleCOnstuctorType = typeof(SimpleConstructors);
+ Type simpleConstructorType = typeof(SimpleConstructors);
IClassHierarchy ns = TangFactory.GetTang().GetClassHierarchy(
new string[] { typeof(Timer).Assembly.GetName().Name, typeof(SimpleConstructors).Assembly.GetName().Name });
IClassNode timerClassNode = (IClassNode)ns.GetNode(timerType.AssemblyQualifiedName);
INode secondNode = ns.GetNode(secondType.AssemblyQualifiedName);
- IClassNode simpleConstructorsClassNode = (IClassNode)ns.GetNode(simpleCOnstuctorType.AssemblyQualifiedName);
+ IClassNode simpleConstructorsClassNode = (IClassNode)ns.GetNode(simpleConstructorType.AssemblyQualifiedName);
_serializer.ToFile(ns, "avroEven.bin");
IClassHierarchy ns2 = _serializer.FromFile("avroEven.bin");
IClassNode timerClassNode2 = (IClassNode)ns2.GetNode(timerType.AssemblyQualifiedName);
INode secondNode2 = ns2.GetNode(secondType.AssemblyQualifiedName);
- IClassNode simpleConstructorsClassNode2 = (IClassNode)ns2.GetNode(simpleCOnstuctorType.AssemblyQualifiedName);
+ IClassNode simpleConstructorsClassNode2 = (IClassNode)ns2.GetNode(simpleConstructorType.AssemblyQualifiedName);
Assert.AreEqual(timerClassNode, timerClassNode2);
Assert.AreEqual(secondNode, secondNode2);
@@ -255,20 +255,20 @@ namespace Org.Apache.REEF.Tang.Tests.ClassHierarchy
{
Type timerType = typeof(Timer);
Type secondType = typeof(Timer.Seconds);
- Type simpleCOnstuctorType = typeof(SimpleConstructors);
+ Type simpleConstructorType = typeof(SimpleConstructors);
IClassHierarchy ns = TangFactory.GetTang().GetClassHierarchy(
new string[] { typeof(Timer).Assembly.GetName().Name, typeof(SimpleConstructors).Assembly.GetName().Name });
IClassNode timerClassNode = (IClassNode)ns.GetNode(timerType.AssemblyQualifiedName);
INode secondNode = ns.GetNode(secondType.AssemblyQualifiedName);
- IClassNode simpleConstructorsClassNode = (IClassNode)ns.GetNode(simpleCOnstuctorType.AssemblyQualifiedName);
+ IClassNode simpleConstructorsClassNode = (IClassNode)ns.GetNode(simpleConstructorType.AssemblyQualifiedName);
byte[] b = _serializer.ToByteArray(ns);
IClassHierarchy ns2 = _serializer.FromByteArray(b);
IClassNode timerClassNode2 = (IClassNode)ns2.GetNode(timerType.AssemblyQualifiedName);
INode secondNode2 = ns2.GetNode(secondType.AssemblyQualifiedName);
- IClassNode simpleConstructorsClassNode2 = (IClassNode)ns2.GetNode(simpleCOnstuctorType.AssemblyQualifiedName);
+ IClassNode simpleConstructorsClassNode2 = (IClassNode)ns2.GetNode(simpleConstructorType.AssemblyQualifiedName);
Assert.AreEqual(timerClassNode, timerClassNode2);
Assert.AreEqual(secondNode, secondNode2);
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestConfiguration.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestConfiguration.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestConfiguration.cs
index 59503bb..89005b2 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestConfiguration.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/Configuration/TestConfiguration.cs
@@ -67,10 +67,10 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
ProtocolBufferClassHierarchy.Serialize("TaskTimer.bin", conf1.GetClassHierarchy());
IClassHierarchy ns = ProtocolBufferClassHierarchy.DeSerialize("TaskTimer.bin");
- AvroConfiguration taskAvroconfiguration = serializer.AvroDeseriaizeFromFile("task.config");
+ AvroConfiguration taskAvroconfiguration = serializer.AvroDeserializeFromFile("task.config");
IConfiguration taskConfiguration = serializer.FromAvro(taskAvroconfiguration, ns);
- AvroConfiguration timerAvroconfiguration = serializer.AvroDeseriaizeFromFile("timer.config");
+ AvroConfiguration timerAvroconfiguration = serializer.AvroDeserializeFromFile("timer.config");
IConfiguration timerConfiguration = serializer.FromAvro(timerAvroconfiguration, ns);
IConfiguration merged = Configurations.MergeDeserializedConfs(taskConfiguration, timerConfiguration);
@@ -128,7 +128,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
}
[TestMethod]
- public void TestActivityConfigWithSeperateAssembly()
+ public void TestActivityConfigWithSeparateAssembly()
{
Type activityInterfaceType = typeof (ITask);
ITang tang = TangFactory.GetTang();
@@ -151,7 +151,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
}
[TestMethod]
- public void TestGetConfgiFromProtoBufClassHierarchy()
+ public void TestGetConfigFromProtoBufClassHierarchy()
{
Type iTaskType = typeof(ITask);
Type helloTaskType = typeof(HelloTask);
@@ -478,13 +478,13 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
}
[TestMethod]
- public void TestNullStringVaue()
+ public void TestNullStringValue()
{
string msg = null;
try
{
TangFactory.GetTang().NewConfigurationBuilder()
- .BindNamedParameter<NamedParamterNoDefault.NamedString, string>(GenericType<NamedParamterNoDefault.NamedString>.Class, null)
+ .BindNamedParameter<NamedParameterNoDefault.NamedString, string>(GenericType<NamedParameterNoDefault.NamedString>.Class, null)
.Build();
}
catch (IllegalStateException e)
@@ -546,7 +546,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
}
}
- class NamedParamterNoDefault
+ class NamedParameterNoDefault
{
private readonly string str;
@@ -556,7 +556,7 @@ namespace Org.Apache.REEF.Tang.Tests.Configuration
}
[Inject]
- NamedParamterNoDefault([Parameter(typeof (NamedString))] string str)
+ NamedParameterNoDefault([Parameter(typeof (NamedString))] string str)
{
this.str = str;
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Tang.Tests/Format/TestConfigurationModule.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/Format/TestConfigurationModule.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/Format/TestConfigurationModule.cs
index 4ac2c85..7a5c117 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/Format/TestConfigurationModule.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/Format/TestConfigurationModule.cs
@@ -111,7 +111,7 @@ namespace Org.Apache.REEF.Tang.Tests.Format
//this is to test the file generated from Java. name,value b=must be recognized by C# class hierarchy
AvroConfigurationSerializer serializer = new AvroConfigurationSerializer();
- var avroConfig = serializer.AvroDeseriaizeFromFile("Evaluator.conf");
+ var avroConfig = serializer.AvroDeserializeFromFile("Evaluator.conf");
Assert.IsNotNull(avroConfig);
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/HttpHandlerConfiguration.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/HttpHandlerConfiguration.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/HttpHandlerConfiguration.cs
index a5c57d0..b9fb14f 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/HttpHandlerConfiguration.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/HttpHandlerConfiguration.cs
@@ -29,7 +29,7 @@ namespace Org.Apache.REEF.Tang.Tests.ScenarioTest
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes", Justification = "Not Applicable")]
public static readonly ConfigurationModule CONF = new HttpHandlerConfiguration().Merge(HttpRuntimeConfiguration.CONF)
- .BindSetEntry<HttpEventHanlders, IHttpHandler>(GenericType<HttpEventHanlders>.Class, HttpHandlerConfiguration.P)
+ .BindSetEntry<HttpEventHandlers, IHttpHandler>(GenericType<HttpEventHandlers>.Class, HttpHandlerConfiguration.P)
.Build();
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/JettyHandler.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/JettyHandler.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/JettyHandler.cs
index 312c46b..d70f289 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/JettyHandler.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/JettyHandler.cs
@@ -23,16 +23,16 @@ using Org.Apache.REEF.Tang.Annotations;
namespace Org.Apache.REEF.Tang.Tests.ScenarioTest
{
[NamedParameter()]
- public class HttpEventHanlders : Name<ISet<IHttpHandler>>
+ public class HttpEventHandlers : Name<ISet<IHttpHandler>>
{
}
public class JettyHandler //: AbstractHandler
{
[Inject]
- public JettyHandler([Parameter(typeof(HttpEventHanlders))] ISet<IHttpHandler> httpeventHanlders)
+ public JettyHandler([Parameter(typeof(HttpEventHandlers))] ISet<IHttpHandler> httpEventHandlers)
{
- HttpeventHanlders = httpeventHanlders;
+ HttpeventHanlders = httpEventHandlers;
}
public ISet<IHttpHandler> HttpeventHanlders { get; set; }
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/TestDefaultConstructor.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/TestDefaultConstructor.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/TestDefaultConstructor.cs
index 1f042b0..f2f0b2e 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/TestDefaultConstructor.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/TestDefaultConstructor.cs
@@ -27,7 +27,7 @@ namespace Org.Apache.REEF.Tang.Tests.ScenarioTest
public class TestDefaultConstructor
{
[TestMethod]
- public void TestDefaultCOnstructorWithoutBinding()
+ public void TestDefaultConstructorWithoutBinding()
{
var r = (A)TangFactory.GetTang().NewInjector().GetInstance(typeof(A));
System.Diagnostics.Debug.WriteLine(r.Instance);
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/TestHttpService.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/TestHttpService.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/TestHttpService.cs
index 98388b3..94a78c7 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/TestHttpService.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/TestHttpService.cs
@@ -31,12 +31,12 @@ namespace Org.Apache.REEF.Tang.Tests.ScenarioTest
public class TestHttpService
{
[TestMethod]
- public void HttpEventHanldersTest()
+ public void HttpEventHandlersTest()
{
ConfigurationModule module =
new ConfigurationModuleBuilder()
- .BindSetEntry<HttpEventHanlders, HttpServerReefEventHandler, IHttpHandler>(GenericType<HttpEventHanlders>.Class, GenericType<HttpServerReefEventHandler>.Class)
- .BindSetEntry<HttpEventHanlders, HttpServerNrtEventHandler, IHttpHandler>(GenericType<HttpEventHanlders>.Class, GenericType<HttpServerNrtEventHandler>.Class)
+ .BindSetEntry<HttpEventHandlers, HttpServerReefEventHandler, IHttpHandler>(GenericType<HttpEventHandlers>.Class, GenericType<HttpServerReefEventHandler>.Class)
+ .BindSetEntry<HttpEventHandlers, HttpServerNrtEventHandler, IHttpHandler>(GenericType<HttpEventHandlers>.Class, GenericType<HttpServerNrtEventHandler>.Class)
.Build();
IConfiguration c = module.Build();
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/TestRuntimeClock.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/TestRuntimeClock.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/TestRuntimeClock.cs
index 6191b22..11daac8 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/TestRuntimeClock.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/ScenarioTest/TestRuntimeClock.cs
@@ -51,7 +51,7 @@ namespace Org.Apache.REEF.Tang.Tests.ScenarioTest
}
[TestClass]
- public class TestSenarios
+ public class TestScenarios
{
[TestMethod]
public void TestRuntimeClock()
@@ -68,9 +68,9 @@ namespace Org.Apache.REEF.Tang.Tests.ScenarioTest
new ConfigurationModuleBuilder()
.BindSetEntry<RuntimeStartHandler, EvaluatorRuntime, IObserver<RuntimeStart>>(GenericType<RuntimeStartHandler>.Class, GenericType<EvaluatorRuntime>.Class)
.Build();
- IConfiguration clockConfiguraiton = module.Build();
+ IConfiguration clockConfiguration = module.Build();
- RuntimeClock clock = TangFactory.GetTang().NewInjector(clockConfiguraiton).GetInstance<RuntimeClock>();
+ RuntimeClock clock = TangFactory.GetTang().NewInjector(clockConfiguration).GetInstance<RuntimeClock>();
var r = clock.ClockRuntimeStartHandler.Get();
Assert.AreEqual(r.Count, 1);
foreach (var e in r)
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Tang.Tests/SmokeTest/ObjectTreeTest.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/SmokeTest/ObjectTreeTest.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/SmokeTest/ObjectTreeTest.cs
index 2852b08..2d89037 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/SmokeTest/ObjectTreeTest.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/SmokeTest/ObjectTreeTest.cs
@@ -29,7 +29,7 @@ namespace Org.Apache.REEF.Tang.Tests.SmokeTest
public static IConfiguration GetConfiguration()
{
return TestConfigurationModuleBuilder.CONF
- .Set(TestConfigurationModuleBuilder.OPTIONALSTRING, TestConfigurationModuleBuilder.OptionaStringValue)
+ .Set(TestConfigurationModuleBuilder.OPTIONALSTRING, TestConfigurationModuleBuilder.OptionalStringValue)
.Set(TestConfigurationModuleBuilder.REQUIREDSTRING, TestConfigurationModuleBuilder.RequiredStringValue)
.Build();
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Tang.Tests/SmokeTest/RootImplementation.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/SmokeTest/RootImplementation.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/SmokeTest/RootImplementation.cs
index a0e2aed..5153eb2 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/SmokeTest/RootImplementation.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/SmokeTest/RootImplementation.cs
@@ -70,7 +70,7 @@ namespace Org.Apache.REEF.Tang.Tests.SmokeTest
return false;
}
- if (!this.optionalString.Equals(TestConfigurationModuleBuilder.OptionaStringValue))
+ if (!this.optionalString.Equals(TestConfigurationModuleBuilder.OptionalStringValue))
{
return false;
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Tang.Tests/SmokeTest/TestConfigurationModuleBuilder.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/SmokeTest/TestConfigurationModuleBuilder.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/SmokeTest/TestConfigurationModuleBuilder.cs
index b8164b8..c553fe1 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/SmokeTest/TestConfigurationModuleBuilder.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/SmokeTest/TestConfigurationModuleBuilder.cs
@@ -29,7 +29,7 @@ namespace Org.Apache.REEF.Tang.Tests.SmokeTest
{
public static readonly string RequiredStringValue = "Required String Value";
- public static readonly string OptionaStringValue = "Optional String Value";
+ public static readonly string OptionalStringValue = "Optional String Value";
public static readonly RequiredParameter<string> REQUIREDSTRING = new RequiredParameter<string>();
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Tang.Tests/Tang/TestDefaultImpementaion.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang.Tests/Tang/TestDefaultImpementaion.cs b/lang/cs/Org.Apache.REEF.Tang.Tests/Tang/TestDefaultImpementaion.cs
index e34230b..b7bf6ff 100644
--- a/lang/cs/Org.Apache.REEF.Tang.Tests/Tang/TestDefaultImpementaion.cs
+++ b/lang/cs/Org.Apache.REEF.Tang.Tests/Tang/TestDefaultImpementaion.cs
@@ -47,7 +47,7 @@ namespace Org.Apache.REEF.Tang.Tests.Tang
}
[TestClass]
- public class TestDefaultImplmentation
+ public class TestDefaultImplementation
{
[TestMethod]
public void TestDefaultConstructor()
@@ -57,7 +57,7 @@ namespace Org.Apache.REEF.Tang.Tests.Tang
}
[TestMethod]
- public void TestDefaultImplementaion()
+ public void TestDefaultImpl()
{
ClassWithDefaultConstructor impl = (ClassWithDefaultConstructor)TangFactory.GetTang().NewInjector().GetInstance(typeof(ClassWithDefaultConstructor));
Assert.IsNotNull(impl);
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Tang/Formats/AvroConfigurationSerializer.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Formats/AvroConfigurationSerializer.cs b/lang/cs/Org.Apache.REEF.Tang/Formats/AvroConfigurationSerializer.cs
index 569538b..9d2aa56 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Formats/AvroConfigurationSerializer.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Formats/AvroConfigurationSerializer.cs
@@ -51,6 +51,7 @@ namespace Org.Apache.REEF.Tang.Formats
}
}
+ // TODO[REEF-842] Act on the obsoletes
public class AvroConfigurationSerializer : IConfigurationSerializer
{
public const string Java = "Java";
@@ -108,26 +109,26 @@ namespace Org.Apache.REEF.Tang.Formats
public IConfiguration FromByteArray(byte[] bytes)
{
- AvroConfiguration avroConf = AvroDeseriaize(bytes);
+ AvroConfiguration avroConf = AvroDeserialize(bytes);
return FromAvro(avroConf);
}
public IConfiguration AddFromByteArray(ICsConfigurationBuilder cb, byte[] bytes)
{
- AvroConfiguration avroConf = AvroDeseriaize(bytes);
+ AvroConfiguration avroConf = AvroDeserialize(bytes);
return AddFromAvro(cb, avroConf);
}
public IConfiguration FromFileStream(string fileName)
{
byte[] bytes = File.ReadAllBytes(fileName);
- AvroConfiguration avroConf = AvroDeseriaize(bytes);
+ AvroConfiguration avroConf = AvroDeserialize(bytes);
return FromAvro(avroConf);
}
public IConfiguration FromFile(string fileName)
{
- AvroConfiguration avroConf = AvroDeseriaizeFromFile(fileName);
+ AvroConfiguration avroConf = AvroDeserializeFromFile(fileName);
return FromAvro(avroConf);
}
@@ -145,19 +146,25 @@ namespace Org.Apache.REEF.Tang.Formats
public string ToString(IConfiguration c)
{
byte[] bytes = ToByteArray(c);
- AvroConfiguration avroConf = AvroDeseriaize(bytes);
+ AvroConfiguration avroConf = AvroDeserialize(bytes);
string s = JsonConvert.SerializeObject(avroConf, Formatting.Indented);
return s;
}
- public IConfiguration FromString(string josonString)
+ public IConfiguration FromString(string jsonString)
{
- AvroConfiguration avroConf = JsonConvert.DeserializeObject<AvroConfiguration>(josonString);
+ AvroConfiguration avroConf = JsonConvert.DeserializeObject<AvroConfiguration>(jsonString);
return FromAvro(avroConf);
}
+ [Obsolete("Deprecated in 0.14, please use AvroDeserializeFromFile instead.")]
public AvroConfiguration AvroDeseriaizeFromFile(string fileName)
{
+ return AvroDeserializeFromFile(fileName);
+ }
+
+ public AvroConfiguration AvroDeserializeFromFile(string fileName)
+ {
AvroConfiguration avroConf = null;
try
{
@@ -268,12 +275,12 @@ namespace Org.Apache.REEF.Tang.Formats
}
}
- private AvroConfiguration AvroDeseriaize(string serializedConfig)
+ private AvroConfiguration AvroDeserialize(string serializedConfig)
{
- return AvroDeseriaize(Convert.FromBase64String(serializedConfig));
+ return AvroDeserialize(Convert.FromBase64String(serializedConfig));
}
- private AvroConfiguration AvroDeseriaize(byte[] serializedBytes)
+ private AvroConfiguration AvroDeserialize(byte[] serializedBytes)
{
var serializer = AvroSerializer.Create<AvroConfiguration>();
using (var stream = new MemoryStream(serializedBytes))
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Tang/Formats/ConfigurationFile.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Formats/ConfigurationFile.cs b/lang/cs/Org.Apache.REEF.Tang/Formats/ConfigurationFile.cs
index 8266417..e61f80a 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Formats/ConfigurationFile.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Formats/ConfigurationFile.cs
@@ -37,73 +37,6 @@ namespace Org.Apache.REEF.Tang.Formats
{
private static readonly Logger LOGGER = Logger.GetLogger(typeof(ConfigurationFile));
- //#region Avro serialization
- //public static string AvroSerialize(IConfiguration c)
- //{
- // var obj = new ConfigurationDataContract(ToConfigurationStringList(c));
- // var serializer = AvroSerializer.Create<ConfigurationDataContract>();
- // var schema = serializer.WriterSchema.ToString();
-
- // var stream = new MemoryStream();
- // serializer.Serialize(stream, obj);
- // return Convert.ToBase64String(stream.GetBuffer());
- //}
-
- //public static void AvroDeseriaize(IConfigurationBuilder conf, string serializedConfig)
- //{
- // var serializer2 = AvroSerializer.Create<ConfigurationDataContract>();
- // ConfigurationDataContract confgDataObj;
- // using (var stream2 = new MemoryStream(Convert.FromBase64String(serializedConfig)))
- // {
- // confgDataObj = serializer2.Deserialize(stream2);
- // }
-
- // IList<KeyValuePair<string, string>> settings = new List<KeyValuePair<string, string>>();
-
- // foreach (string line in confgDataObj.Bindings)
- // {
- // string[] p = line.Split('=');
- // settings.Add(new KeyValuePair<string, string>(p[0], p[1]));
- // }
- // ProcessConfigData(conf, settings);
- //}
-
- //public static IConfiguration AvroDeseriaize(string serializedConfig)
- //{
- // ICsConfigurationBuilder cb = TangFactory.GetTang().NewConfigurationBuilder();
- // AvroDeseriaize(cb, serializedConfig);
- // return cb.Build();
- //}
-
- //public static IConfiguration AvroDeseriaizeFromFile(string configFileName)
- //{
- // ICsConfigurationBuilder cb = TangFactory.GetTang().NewConfigurationBuilder();
- // AddConfigurationFromFileUsingAvro(cb, configFileName);
- // return cb.Build();
- //}
-
- //public static void WriteConfigurationFileUsingAvro(IConfiguration c, string fileName)
- //{
- // using (FileStream aFile = new FileStream(fileName, FileMode.OpenOrCreate))
- // {
- // using (StreamWriter sw = new StreamWriter(aFile))
- // {
- // sw.Write(AvroSerialize(c));
- // }
- // }
- //}
-
- //public static void AddConfigurationFromFileUsingAvro(IConfigurationBuilder conf, string configFileName)
- //{
- // string serializedString;
- // using (StreamReader reader = new StreamReader(configFileName))
- // {
- // serializedString = reader.ReadLine();
- // }
- // AvroDeseriaize(conf, serializedString);
- //}
- //#endregion Avro serialization
-
#region text file serialization
public static void WriteConfigurationFile(IConfiguration c, string fileName)
{
@@ -150,7 +83,7 @@ namespace Org.Apache.REEF.Tang.Formats
}
}
- private static string GetAssemlyName(string s)
+ private static string GetAssemblyName(string s)
{
try
{
@@ -170,18 +103,15 @@ namespace Org.Apache.REEF.Tang.Formats
HashSet<string> l = new HashSet<string>();
foreach (IClassNode opt in conf.GetBoundImplementations())
{
-// l.Add(opt.GetFullName() + '=' + Escape(conf.GetBoundImplementation(opt).GetFullName()));
l.Add(GetFullName(opt) + '=' + Escape(GetFullName(conf.GetBoundImplementation(opt))));
}
foreach (IClassNode opt in conf.GetBoundConstructors())
{
-// l.Add(opt.GetFullName() + '=' + Escape(conf.GetBoundConstructor(opt).GetFullName()));
l.Add(GetFullName(opt) + '=' + Escape(GetFullName(conf.GetBoundConstructor(opt))));
}
foreach (INamedParameterNode opt in conf.GetNamedParameters())
{
-// l.Add(opt.GetFullName() + '=' + Escape(conf.GetNamedParameter(opt)));
l.Add(GetFullName(opt) + '=' + Escape(GetFullName(conf.GetNamedParameter(opt))));
}
foreach (IClassNode cn in conf.GetLegacyConstructors())
@@ -189,9 +119,6 @@ namespace Org.Apache.REEF.Tang.Formats
StringBuilder sb = new StringBuilder();
Join(sb, "-", conf.GetLegacyConstructor(cn).GetArgs().ToArray<IConstructorArg>());
l.Add(GetFullName(cn) + Escape('=' + ConfigurationBuilderImpl.INIT + '(' + sb.ToString() + ')'));
- //l.Add(cn.GetFullName() + Escape('=' + ConfigurationBuilderImpl.INIT + '(' + sb.ToString() + ')'));
- //s.append(cn.getFullName()).append('=').append(ConfigurationBuilderImpl.INIT).append('(');
- // .append(")\n");
}
@@ -200,9 +127,6 @@ namespace Org.Apache.REEF.Tang.Formats
{
KeyValuePair<INamedParameterNode, object> e = (KeyValuePair<INamedParameterNode, object>)bs.Current;
- //}
- //foreach (KeyValuePair<INamedParameterNode, object> e in conf.GetBoundSets())
- //{
string val = null;
if (e.Value is string)
{
@@ -210,7 +134,6 @@ namespace Org.Apache.REEF.Tang.Formats
}
else if (e.Value is INode)
{
-// val = ((INode)e.Value).GetFullName();
val = GetFullName((INode)e.Value);
}
else
@@ -218,12 +141,10 @@ namespace Org.Apache.REEF.Tang.Formats
Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(new IllegalStateException(), LOGGER);
}
-// l.Add(e.Key.GetFullName() + '=' + Escape(val));
l.Add(GetFullName(e.Key) + '=' + Escape(val));
- // s.append(e.getKey().getFullName()).append('=').append(val).append("\n");
}
- return l;//s.toString();
+ return l;
}
public static IConfiguration GetConfiguration(string configString)
@@ -263,7 +184,6 @@ namespace Org.Apache.REEF.Tang.Formats
private static void AddConfiguration(IConfigurationBuilder conf, StreamReader reader)
{
- //IDictionary<string, string> settings = new Dictionary<string, string>();
IList<KeyValuePair<string, string>> settings = new List<KeyValuePair<string, string>>();
while (!reader.EndOfStream)
@@ -272,12 +192,12 @@ namespace Org.Apache.REEF.Tang.Formats
string[] p = line.Split('=');
if (p.Length == 2)
{
- settings.Add(new KeyValuePair<string, string>(GetAssemlyName(p[0]), GetAssemlyName(p[1])));
+ settings.Add(new KeyValuePair<string, string>(GetAssemblyName(p[0]), GetAssemblyName(p[1])));
}
else if (p.Length > 2)
{
string v = line.Substring(p[0].Length + 1, line.Length - p[0].Length - 1);
- settings.Add(new KeyValuePair<string, string>(GetAssemlyName(p[0]), GetAssemlyName(v)));
+ settings.Add(new KeyValuePair<string, string>(GetAssemblyName(p[0]), GetAssemblyName(v)));
}
else
{
@@ -297,7 +217,7 @@ namespace Org.Apache.REEF.Tang.Formats
{
string line = sr.ReadLine();
string[] p = line.Split('=');
- property.Add(ConfigurationFile.GetAssemlyName(p[0]), ConfigurationFile.GetAssemlyName(p[1]));
+ property.Add(ConfigurationFile.GetAssemblyName(p[0]), ConfigurationFile.GetAssemblyName(p[1]));
}
}
return property;
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Tang/Formats/IConfigurationSerializer.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Formats/IConfigurationSerializer.cs b/lang/cs/Org.Apache.REEF.Tang/Formats/IConfigurationSerializer.cs
index efc7c53..e498413 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Formats/IConfigurationSerializer.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Formats/IConfigurationSerializer.cs
@@ -43,6 +43,6 @@ namespace Org.Apache.REEF.Tang.Formats
IConfiguration FromBase64String(string serializedConfig);
- IConfiguration FromString(string josonString);
+ IConfiguration FromString(string jsonString);
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/AvroClassHierarchySerializer.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/AvroClassHierarchySerializer.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/AvroClassHierarchySerializer.cs
index f1f8000..bb16e1c 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/AvroClassHierarchySerializer.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/AvroClassHierarchySerializer.cs
@@ -67,14 +67,14 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
/// <param name="fileName"></param>
public void ToFile(IClassHierarchy c, string fileName)
{
- var avronNodeData = ToAvroNode(c);
+ var avroNodeData = ToAvroNode(c);
using (var buffer = new MemoryStream())
{
using (var w = AvroContainer.CreateWriter<AvroNode>(buffer, Codec.Null))
{
using (var writer = new SequentialWriter<AvroNode>(w, 24))
{
- writer.Write(avronNodeData);
+ writer.Write(avroNodeData);
}
}
@@ -99,7 +99,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
}
/// <summary>
- /// erialize a ClassHierarchy into a byte array
+ /// Serialize a ClassHierarchy into a byte array
/// </summary>
/// <param name="c"></param>
/// <returns></returns>
@@ -122,7 +122,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
}
/// <summary>
- /// Deserailize a ClassHierarchy from a file
+ /// Deserialize a ClassHierarchy from a file
/// </summary>
/// <param name="fileName"></param>
/// <returns></returns>
@@ -133,7 +133,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
}
/// <summary>
- /// Get Json string from the text file, the deserailize it into ClassHierarchy
+ /// Get Json string from the text file, the deserialize it into ClassHierarchy
/// </summary>
/// <param name="fileName"></param>
/// <returns></returns>
@@ -153,7 +153,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
}
/// <summary>
- /// Deserailize a ClassHierarchy from a byte array
+ /// Deserialize a ClassHierarchy from a byte array
/// </summary>
/// <param name="bytes"></param>
/// <returns></returns>
@@ -164,7 +164,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
}
/// <summary>
- /// Deserailize a ClassHierarchy from a Json string
+ /// Deserialize a ClassHierarchy from a Json string
/// </summary>
/// <param name="jsonString"></param>
/// <returns></returns>
@@ -185,7 +185,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
}
/// <summary>
- /// Deserailize ClassHierarchy from an AvroNode into AvroClassHierarchy object
+ /// Deserialize ClassHierarchy from an AvroNode into AvroClassHierarchy object
/// </summary>
/// <param name="n"></param>
/// <returns></returns>
@@ -230,7 +230,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
List<string> implFullNames = new List<string>();
foreach (IClassNode impl in cn.GetKnownImplementations())
{
- implFullNames.Add(impl.GetFullName()); //we use class fully qualifed name
+ implFullNames.Add(impl.GetFullName()); //we use class fully qualified name
}
return NewClassNode(cn.GetName(), cn.GetFullName(),
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ClassHierarchyImpl.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ClassHierarchyImpl.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ClassHierarchyImpl.cs
index 6d866b0..dccc6b2 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ClassHierarchyImpl.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/ClassHierarchy/ClassHierarchyImpl.cs
@@ -120,7 +120,7 @@ namespace Org.Apache.REEF.Tang.Implementations.ClassHierarchy
public INode RegisterType(Type type)
{
- if (ReflectionUtilities.IsAnnonymousType(type))
+ if (ReflectionUtilities.IsAnonymousType(type))
{
// DevNote: Kinda hacky way to indicate the no-op case.
return rootNode;
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Tang/Implementations/Configuration/CsConfigurationBuilderImpl.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/Configuration/CsConfigurationBuilderImpl.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/Configuration/CsConfigurationBuilderImpl.cs
index 2c48d93..ed36b3c 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Implementations/Configuration/CsConfigurationBuilderImpl.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/Configuration/CsConfigurationBuilderImpl.cs
@@ -79,7 +79,7 @@ namespace Org.Apache.REEF.Tang.Implementations.Configuration
{
if (value == null)
{
- var ex = new IllegalStateException(string.Format(CultureInfo.CurrentCulture, "The value null set to the named parameter {0} is illegel.", name));
+ var ex = new IllegalStateException(string.Format(CultureInfo.CurrentCulture, "The value null set to the named parameter {0} is illegal.", name));
Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(ex, LOGGER);
}
INode np = GetNode(name);
@@ -154,7 +154,7 @@ namespace Org.Apache.REEF.Tang.Implementations.Configuration
}
/// <summary>
- /// Binds an implementaion to a named parameter.
+ /// Binds an implementation to a named parameter.
/// </summary>
/// <typeparam name="U"></typeparam>
/// <typeparam name="V"></typeparam>
@@ -200,7 +200,7 @@ namespace Org.Apache.REEF.Tang.Implementations.Configuration
//public <T> void bindSetEntry(Class<? extends Name<Set<T>>> iface, Class<? extends T> impl) throws BindException;
/// <summary>
- /// Binds an implementaion of T to a named parameter of ISet of T.
+ /// Binds an implementation of T to a named parameter of ISet of T.
/// </summary>
/// <typeparam name="U"></typeparam>
/// <typeparam name="V"></typeparam>
@@ -341,7 +341,7 @@ namespace Org.Apache.REEF.Tang.Implementations.Configuration
//public <T> void bindSetEntry(Class<? extends Name<Set<T>>> iface, Class<? extends T> impl) throws BindException;
/// <summary>
- /// Binds an implementaion to a named parameter of ISset entry.
+ /// Binds an implementation to a named parameter of ISet entry.
/// </summary>
/// <param name="iface">The iface.</param>
/// <param name="impl">The impl.</param>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectorImpl.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectorImpl.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectorImpl.cs
index 3956762..67e22b1 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectorImpl.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/InjectorImpl.cs
@@ -112,7 +112,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
//C# - InjectionFuture<object> ret = new InjectionFutureImpl<object>(this, classHierarchy.ClassForName(fut.GetNode().GetFullName()));
//We cannot simply create an object from generic with object as <T>
//typeof(InjectionFutureImpl<>).MakeGenericType(t) will get the InjectionFutureImpl generic Type with <T> as t
- //for ClassNode, t is the Type of the class, for NamedParamterNode, t is the Type of the argument
+ //for ClassNode, t is the Type of the class, for NamedParameterNode, t is the Type of the argument
//we then use reflection to invoke the constructor
//To retain generic argument information??
Type injectionFuture = typeof (InjectionFutureImpl<>).MakeGenericType(t);
@@ -843,7 +843,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
return p;
}
Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(new InjectionException("Fail to get injection plan" + n), LOGGER);
- return null;//this line shouild be not reached as Throw throws exception
+ return null;//this line should be not reached as Throw throws exception
}
public bool IsInjectable(string name)
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/Subplan.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/Subplan.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/Subplan.cs
index 8f6976d..6d2ea30 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/Subplan.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/InjectionPlan/Subplan.cs
@@ -32,7 +32,7 @@ namespace Org.Apache.REEF.Tang.Implementations.InjectionPlan
{
private static readonly Logger LOGGER = Logger.GetLogger(typeof(Subplan));
- readonly InjectionPlan[] alternatives; //all implementatios on the same interface
+ readonly InjectionPlan[] alternatives; //all implementations on the same interface
readonly int numAlternatives;
readonly int selectedIndex; //the implementation that is bound
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Tang/Implementations/Tang/TangImpl.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Implementations/Tang/TangImpl.cs b/lang/cs/Org.Apache.REEF.Tang/Implementations/Tang/TangImpl.cs
index 2d0a282..6619bdf 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Implementations/Tang/TangImpl.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Implementations/Tang/TangImpl.cs
@@ -152,7 +152,7 @@ namespace Org.Apache.REEF.Tang.Implementations.Tang
{
Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Caught(e, Level.Error, LOGGER);
Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(new IllegalStateException(
- "Caught unexpeceted bind exception! Implementation bug.", e), LOGGER);
+ "Caught unexpected bind exception! Implementation bug.", e), LOGGER);
return null;
}
}
@@ -167,7 +167,7 @@ namespace Org.Apache.REEF.Tang.Implementations.Tang
{
Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Caught(e, Level.Error, LOGGER);
Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(new IllegalStateException(
- "Caught unexpeceted bind exception! Implementation bug.", e), LOGGER);
+ "Caught unexpected bind exception! Implementation bug.", e), LOGGER);
return null;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Tang/Interface/IClassHierarchySerializer.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Interface/IClassHierarchySerializer.cs b/lang/cs/Org.Apache.REEF.Tang/Interface/IClassHierarchySerializer.cs
index da554e4..5cf72e0 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Interface/IClassHierarchySerializer.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Interface/IClassHierarchySerializer.cs
@@ -40,42 +40,42 @@ namespace Org.Apache.REEF.Tang.Interface
void ToTextFile(IClassHierarchy c, string fileName);
/// <summary>
- /// erialize a ClassHierarchy into a Jason string
+ /// Serialize a ClassHierarchy into a Jason string
/// </summary>
/// <param name="c"></param>
/// <returns></returns>
string ToString(IClassHierarchy c);
/// <summary>
- /// erialize a ClassHierarchy into a byte array
+ /// Serialize a ClassHierarchy into a byte array
/// </summary>
/// <param name="c"></param>
/// <returns></returns>
byte[] ToByteArray(IClassHierarchy c);
/// <summary>
- /// Deserailize a ClassHierarchy from a file
+ /// Deserialize a ClassHierarchy from a file
/// </summary>
/// <param name="fileName"></param>
/// <returns></returns>
IClassHierarchy FromFile(string fileName);
/// <summary>
- /// Deserailize a ClassHierarchy from a text file
+ /// Deserialize a ClassHierarchy from a text file
/// </summary>
/// <param name="fileName"></param>
/// <returns></returns>
IClassHierarchy FromTextFile(string fileName);
/// <summary>
- /// Deserailize a ClassHierarchy from a byte array
+ /// Deserialize a ClassHierarchy from a byte array
/// </summary>
/// <param name="bytes"></param>
/// <returns></returns>
IClassHierarchy FromByteArray(byte[] bytes);
/// <summary>
- /// Deserailize a ClassHierarchy from a Jason string
+ /// Deserialize a ClassHierarchy from a Jason string
/// </summary>
/// <param name="jsonString"></param>
/// <returns></returns>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Tang/Util/ReflectionUtilities.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Util/ReflectionUtilities.cs b/lang/cs/Org.Apache.REEF.Tang/Util/ReflectionUtilities.cs
index 569a564..48afeed 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Util/ReflectionUtilities.cs
+++ b/lang/cs/Org.Apache.REEF.Tang/Util/ReflectionUtilities.cs
@@ -29,6 +29,7 @@ using Org.Apache.REEF.Utilities.Logging;
namespace Org.Apache.REEF.Tang.Util
{
+ // TODO[REEF-842] Act on the obsoletes
public class ReflectionUtilities
{
private static readonly Logger LOGGER = Logger.GetLogger(typeof(ReflectionUtilities));
@@ -79,7 +80,7 @@ namespace Org.Apache.REEF.Tang.Util
}
//The following lines should be not reached by C# syntax definition. However, it happens for some generic type such as AbstractObserver<T>
- //It results in name as null. When null name in the class node gets deserialzed, as name is required filed in class hierarchy proto buffer schame,
+ //It results in name as null. When null name in the class node gets deserialized, as name is required filed in class hierarchy proto buffer schema,
//it causes exception during deserialization. The code below is to use first portion of AssemblyQualifiedName for the name of the node node in case type.name is null.
string[] parts = GetAssemblyQualifiedName(name).Split(',');
return parts[0];
@@ -300,7 +301,7 @@ namespace Org.Apache.REEF.Tang.Util
/// <summary>
/// Ensures the type of the interface. For generic types, full name could be null. In this case, we need to
- /// get GetGenericTypeDefinition for the type so that to rerain all teh type information
+ /// get GetGenericTypeDefinition for the type so that to retain all teh type information
/// </summary>
/// <param name="interf">The interf.</param>
/// <returns></returns>
@@ -501,11 +502,17 @@ namespace Org.Apache.REEF.Tang.Util
return type.GetInterfaces().Except(type.BaseType.GetInterfaces());
}
- // Here is a more elaborate hack to test for annonymous type:
+ // Here is a more elaborate hack to test for anonymous type:
// http://stackoverflow.com/questions/2483023/how-to-test-if-a-type-is-anonymous
// compiler generated classes are always recreatable and need not additional references to check for.
+ [Obsolete("Deprecated in 0.14, please use IsAnonymousType instead.")]
public static bool IsAnnonymousType(Type type)
{
+ return IsAnonymousType(type);
+ }
+
+ public static bool IsAnonymousType(Type type)
+ {
if (type != null)
{
// HACK: The only way to detect anonymous types right now.
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/HelloSimpleEventHandlers.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/HelloSimpleEventHandlers.cs b/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/HelloSimpleEventHandlers.cs
index b5e5e06..0fa9794 100644
--- a/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/HelloSimpleEventHandlers.cs
+++ b/lang/cs/Org.Apache.REEF.Tests/Functional/Bridge/HelloSimpleEventHandlers.cs
@@ -128,7 +128,7 @@ namespace Org.Apache.REEF.Tests.Functional.Bridge
public void OnNext(IDriverStarted driverStarted)
{
- using (Logger.LogFunction("HelloSimpleEventHandlers::evalutorRequestor received"))
+ using (Logger.LogFunction("HelloSimpleEventHandlers::evaluatorRequestor received"))
{
int evaluatorsNumber = _numberOfEvaluators;
int memory = 1024 * 3;
@@ -178,7 +178,7 @@ namespace Org.Apache.REEF.Tests.Functional.Bridge
Logger.Log(Level.Info, "Received CompletedTask: {0}, task id: {1}.", value.Id, _taskContext.CurrentTaskId());
var messageStr = value.Message == null || value.Message.Length == 0 ?
- string.Empty : ByteUtilities.ByteArrarysToString(value.Message);
+ string.Empty : ByteUtilities.ByteArraysToString(value.Message);
Logger.Log(Level.Verbose, "Message received from CompletedTask {0} is: [{1}]", value.Id, messageStr);
_taskContext.UpdateTaskStatus(value.Id, TaskStatus.Completed);
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Tests/Functional/ML/KMeans/TestKMeans.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Functional/ML/KMeans/TestKMeans.cs b/lang/cs/Org.Apache.REEF.Tests/Functional/ML/KMeans/TestKMeans.cs
index a088c3c..9c3d043 100644
--- a/lang/cs/Org.Apache.REEF.Tests/Functional/ML/KMeans/TestKMeans.cs
+++ b/lang/cs/Org.Apache.REEF.Tests/Functional/ML/KMeans/TestKMeans.cs
@@ -126,7 +126,7 @@ namespace Org.Apache.REEF.Tests.Functional.ML.KMeans
[Timeout(180 * 1000)]
public void TestKMeansOnLocalRuntimeWithGroupCommunications()
{
- IsOnLocalRuntiime = true;
+ IsOnLocalRuntime = true;
string testFolder = DefaultRuntimeFolder + TestNumber++;
CleanUp(testFolder);
TestRun(DriverConfiguration(), typeof(KMeansDriverHandlers), Partitions + 1, "KMeansDriverHandlers", "local", testFolder);
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/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
index c809b2d..fdeffe6 100644
--- a/lang/cs/Org.Apache.REEF.Tests/Functional/Messaging/MessageDriver.cs
+++ b/lang/cs/Org.Apache.REEF.Tests/Functional/Messaging/MessageDriver.cs
@@ -42,7 +42,7 @@ namespace Org.Apache.REEF.Tests.Functional.Messaging
IObserver<IRunningTask>,
IObserver<IDriverStarted>
{
- public const int NumerOfEvaluator = 1;
+ public const int NumberOfEvaluator = 1;
public const string Message = "MESSAGE::DRIVER";
@@ -74,7 +74,7 @@ namespace Org.Apache.REEF.Tests.Functional.Messaging
public void OnNext(ITaskMessage taskMessage)
{
- string msgReceived = ByteUtilities.ByteArrarysToString(taskMessage.Message);
+ string msgReceived = ByteUtilities.ByteArraysToString(taskMessage.Message);
LOGGER.Log(Level.Info, string.Format(CultureInfo.InvariantCulture, "CLR TaskMessagingTaskMessageHandler received following message from Task: {0}, Message: {1}.", taskMessage.TaskId, msgReceived));
@@ -94,7 +94,7 @@ namespace Org.Apache.REEF.Tests.Functional.Messaging
{
var request =
_evaluatorRequestor.NewBuilder()
- .SetNumber(NumerOfEvaluator)
+ .SetNumber(NumberOfEvaluator)
.SetMegabytes(512)
.SetCores(2)
.SetRackName("WonderlandRack")
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/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
index 885319a..c131fec 100644
--- a/lang/cs/Org.Apache.REEF.Tests/Functional/Messaging/MessageTask.cs
+++ b/lang/cs/Org.Apache.REEF.Tests/Functional/Messaging/MessageTask.cs
@@ -72,7 +72,7 @@ namespace Org.Apache.REEF.Tests.Functional.Messaging
private void DriverMessage(string message)
{
- LOGGER.Log(Level.Info, "Receieved DriverMessage in TaskMsg: " + message);
+ LOGGER.Log(Level.Info, "Received DriverMessage in TaskMsg: " + message);
if (!message.Equals(MessageDriver.Message))
{
Exceptions.Throw(new Exception("Unexpected driver message: " + message), "Unexpected driver message received: " + message, LOGGER);
@@ -92,10 +92,10 @@ namespace Org.Apache.REEF.Tests.Functional.Messaging
public void Handle(IDriverMessage value)
{
string message = string.Empty;
- LOGGER.Log(Level.Verbose, "Receieved a message from driver, handling it with MessagingDriverMessageHandler");
+ LOGGER.Log(Level.Verbose, "Received a message from driver, handling it with MessagingDriverMessageHandler");
if (value.Message.IsPresent())
{
- message = ByteUtilities.ByteArrarysToString(value.Message.Value);
+ message = ByteUtilities.ByteArraysToString(value.Message.Value);
}
_parentTask.DriverMessage(message);
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/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
index dccf49e..eebb488 100644
--- a/lang/cs/Org.Apache.REEF.Tests/Functional/ReefFunctionalTest.cs
+++ b/lang/cs/Org.Apache.REEF.Tests/Functional/ReefFunctionalTest.cs
@@ -73,7 +73,7 @@ namespace Org.Apache.REEF.Tests.Functional
set { _testSuccess = value; }
}
- protected bool IsOnLocalRuntiime
+ protected bool IsOnLocalRuntime
{
get { return _onLocalRuntime; }
set { _onLocalRuntime = value; }
@@ -227,11 +227,11 @@ namespace Org.Apache.REEF.Tests.Functional
/// <exception cref="Exception">If the environment variables aren't set.</exception>
private static string GetStorageConnectionString()
{
- var accountName = GetEnvironmentVariabe(StorageAccountNameEnvironmentVariable,
+ var accountName = GetEnvironmentVariable(StorageAccountNameEnvironmentVariable,
"Please set " + StorageAccountNameEnvironmentVariable +
" to the storage account name to be used for the tests");
- var accountKey = GetEnvironmentVariabe(StorageAccountKeyEnvironmentVariable,
+ var accountKey = GetEnvironmentVariable(StorageAccountKeyEnvironmentVariable,
"Please set " + StorageAccountKeyEnvironmentVariable +
" to the key of the storage account to be used for the tests");
@@ -249,7 +249,7 @@ namespace Org.Apache.REEF.Tests.Functional
/// If the environment variables is not set. The message is taken from
/// errorMessageIfNotAvailable
/// </exception>
- private static string GetEnvironmentVariabe(string variableName, string errorMessageIfNotAvailable)
+ private static string GetEnvironmentVariable(string variableName, string errorMessageIfNotAvailable)
{
var result = Environment.GetEnvironmentVariable(variableName);
if (string.IsNullOrWhiteSpace(result))
@@ -259,13 +259,13 @@ namespace Org.Apache.REEF.Tests.Functional
return result;
}
- protected void TestRun(IConfiguration driverCondig, Type globalAssemblyType, int numberOfEvaluator, string jobIdentifier = "myDriver", string runOnYarn = "local", string runtimeFolder = DefaultRuntimeFolder)
+ protected void TestRun(IConfiguration driverConfig, Type globalAssemblyType, int numberOfEvaluator, string jobIdentifier = "myDriver", string runOnYarn = "local", string runtimeFolder = DefaultRuntimeFolder)
{
IInjector injector = TangFactory.GetTang().NewInjector(GetRuntimeConfiguration(runOnYarn, numberOfEvaluator, runtimeFolder));
var reefClient = injector.GetInstance<IREEFClient>();
var jobSubmissionBuilderFactory = injector.GetInstance<JobSubmissionBuilderFactory>();
var jobSubmission = jobSubmissionBuilderFactory.GetJobSubmissionBuilder()
- .AddDriverConfiguration(driverCondig)
+ .AddDriverConfiguration(driverConfig)
.AddGlobalAssemblyForType(globalAssemblyType)
.SetJobIdentifier(jobIdentifier)
.Build();
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Utilities/ByteUtilities.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Utilities/ByteUtilities.cs b/lang/cs/Org.Apache.REEF.Utilities/ByteUtilities.cs
index e7c71f4..18937b8 100644
--- a/lang/cs/Org.Apache.REEF.Utilities/ByteUtilities.cs
+++ b/lang/cs/Org.Apache.REEF.Utilities/ByteUtilities.cs
@@ -22,6 +22,7 @@ using System.Text;
namespace Org.Apache.REEF.Utilities
{
+ // TODO[REEF-842] Act on the obsoletes
public class ByteUtilities
{
public static byte[] StringToByteArrays(string s)
@@ -29,8 +30,14 @@ namespace Org.Apache.REEF.Utilities
return Encoding.UTF8.GetBytes(s);
}
+ [Obsolete("Deprecated in 0.14, please use ByteArraysToString instead.")]
public static string ByteArrarysToString(byte[] b)
{
+ return ByteArraysToString(b);
+ }
+
+ public static string ByteArraysToString(byte[] b)
+ {
return Encoding.UTF8.GetString(b);
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Utilities/Diagnostics/Exceptions.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Utilities/Diagnostics/Exceptions.cs b/lang/cs/Org.Apache.REEF.Utilities/Diagnostics/Exceptions.cs
index e957e83..bb1a56a 100644
--- a/lang/cs/Org.Apache.REEF.Utilities/Diagnostics/Exceptions.cs
+++ b/lang/cs/Org.Apache.REEF.Utilities/Diagnostics/Exceptions.cs
@@ -120,7 +120,7 @@ namespace Org.Apache.REEF.Utilities.Diagnostics
/// </example>
/// <param name="exception">The exception being caught.</param>
/// <param name="level">The log level.</param>
- /// <param name="message">The additional messag to log.</param>
+ /// <param name="message">The additional message to log.</param>
/// <param name="logger">The Logger from the caller class.</param>
public static void Caught(Exception exception, Level level, string message, Logger logger)
{
@@ -161,7 +161,7 @@ namespace Org.Apache.REEF.Utilities.Diagnostics
/// </summary>
/// <remarks>
/// Catch statements which catch all exceptions must call this method immediately and rethrow
- /// wihtout further processing if the method returns true.
+ /// without further processing if the method returns true.
/// </remarks>
/// <example>
/// try
@@ -188,8 +188,8 @@ namespace Org.Apache.REEF.Utilities.Diagnostics
/// <summary>
/// Gets an exception message that includes the messages of the inner exceptions..
/// </summary>
- /// <param name="e">The excption.</param>
- /// <returns>The meessage</returns>
+ /// <param name="e">The exception.</param>
+ /// <returns>The message</returns>
public static string GetFullMessage(Exception e)
{
var fullMessage = new StringBuilder();
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Utilities/Logging/Logger.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Utilities/Logging/Logger.cs b/lang/cs/Org.Apache.REEF.Utilities/Logging/Logger.cs
index c011718..5d9fc67 100644
--- a/lang/cs/Org.Apache.REEF.Utilities/Logging/Logger.cs
+++ b/lang/cs/Org.Apache.REEF.Utilities/Logging/Logger.cs
@@ -24,6 +24,7 @@ using System.Globalization;
namespace Org.Apache.REEF.Utilities.Logging
{
+ // TODO[REEF-842] Act on the obsoletes
public class Logger
{
private static readonly string[] LogLevel = new string[]
@@ -107,8 +108,14 @@ namespace Org.Apache.REEF.Utilities.Logging
_customLevel = customLevel;
}
+ [Obsolete("Deprecated in 0.14, please use AddTraceListener instead.")]
public static void AddTraceListner(TraceListener listener)
{
+ AddTraceListener(listener);
+ }
+
+ public static void AddTraceListener(TraceListener listener)
+ {
TraceListeners.Add(listener);
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Wake.Tests/ClockTest.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake.Tests/ClockTest.cs b/lang/cs/Org.Apache.REEF.Wake.Tests/ClockTest.cs
index 1e97c1b..a4e4f0e 100644
--- a/lang/cs/Org.Apache.REEF.Wake.Tests/ClockTest.cs
+++ b/lang/cs/Org.Apache.REEF.Wake.Tests/ClockTest.cs
@@ -86,7 +86,7 @@ namespace Org.Apache.REEF.Wake.Tests
}
[TestMethod]
- public void TestSimulatenousAlarms()
+ public void TestSimultaneousAlarms()
{
using (RuntimeClock clock = BuildClock())
{
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Wake/Examples/P2p/Pull2Push.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Examples/P2p/Pull2Push.cs b/lang/cs/Org.Apache.REEF.Wake/Examples/P2p/Pull2Push.cs
index 020921f..28f182c 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Examples/P2p/Pull2Push.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/Examples/P2p/Pull2Push.cs
@@ -87,7 +87,7 @@ namespace Org.Apache.REEF.Wake.Examples.P2p
else
{
// The message source has returned null as the next message. We drop the message source in that case.
- LOGGER.Log(Level.Info, "Droping message source {0} from the queue " + nextSource.ToString());
+ LOGGER.Log(Level.Info, "Dropping message source {0} from the queue " + nextSource.ToString());
}
}
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/MultiCodec.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/MultiCodec.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/MultiCodec.cs
index 9d43170..ef8280b 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/MultiCodec.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/MultiCodec.cs
@@ -73,7 +73,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl
}
/// <summary>
- /// Decodes byte array into the appripriate object type.
+ /// Decodes byte array into the appropriate object type.
/// </summary>
/// <param name="data">Data to be decoded</param>
public T Decode(byte[] data)
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamingTransportServer.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamingTransportServer.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamingTransportServer.cs
index 3f05c17..58ab094 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamingTransportServer.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/StreamingTransportServer.cs
@@ -47,10 +47,10 @@ namespace Org.Apache.REEF.Wake.Remote.Impl
/// <summary>
/// Constructs a TransportServer to listen for remote events.
- /// Listens on the specified remote endpoint. When it recieves a remote
- /// event, it will envoke the specified remote handler.
+ /// Listens on the specified remote endpoint. When it receives a remote
+ /// event, it will invoke the specified remote handler.
/// </summary>
- /// <param name="address">Endpoint addres to listen on</param>
+ /// <param name="address">Endpoint address to listen on</param>
/// <param name="remoteHandler">The handler to invoke when receiving incoming
/// remote messages</param>
/// <param name="tcpPortProvider">Find port numbers if listenport is 0</param>
@@ -183,7 +183,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl
}
/// <summary>
- /// Recieves event from connected TcpClient and invokes handler on the event.
+ /// Receives event from connected TcpClient and invokes handler on the event.
/// </summary>
/// <param name="client">The connected client</param>
private async Task ProcessClient(TcpClient client)
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/TransportServer.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/TransportServer.cs b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/TransportServer.cs
index 8cd350e..3d29288 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/TransportServer.cs
+++ b/lang/cs/Org.Apache.REEF.Wake/Remote/Impl/TransportServer.cs
@@ -45,8 +45,8 @@ namespace Org.Apache.REEF.Wake.Remote.Impl
/// <summary>
/// Constructs a TransportServer to listen for remote events.
- /// Listens on the specified remote endpoint. When it recieves a remote
- /// event, it will envoke the specified remote handler.
+ /// Listens on the specified remote endpoint. When it receives a remote
+ /// event, it will invoke the specified remote handler.
/// </summary>
/// <param name="localEndpoint">Endpoint to listen on</param>
/// <param name="remoteHandler">The handler to invoke when receiving incoming
@@ -192,7 +192,7 @@ namespace Org.Apache.REEF.Wake.Remote.Impl
}
/// <summary>
- /// Recieves event from connected TcpClient and invokes handler on the event.
+ /// Receives event from connected TcpClient and invokes handler on the event.
/// </summary>
/// <param name="client">The connected client</param>
private async Task ProcessClient(TcpClient client)
[2/2] incubator-reef git commit: [REEF-839] Fix typos in REEF.NET
Posted by ma...@apache.org.
[REEF-839] Fix typos in REEF.NET
This fixes many typos in C# files.
JIRA:
[REEF-839](https://issues.apache.org/jira/browse/REEF-839)
Pull Request:
This closes #561
Project: http://git-wip-us.apache.org/repos/asf/incubator-reef/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-reef/commit/8b7189bd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-reef/tree/8b7189bd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-reef/diff/8b7189bd
Branch: refs/heads/master
Commit: 8b7189bd764cea5421d4810fd5b024b935e3e67c
Parents: e9a17d5
Author: Dongjoon Hyun <do...@apache.org>
Authored: Tue Oct 13 09:49:41 2015 +0900
Committer: Mariia Mykhailova <ma...@apache.org>
Committed: Wed Oct 14 11:56:22 2015 -0700
----------------------------------------------------------------------
.../TestHttpSerialization.cs | 18 ++--
.../Avro/AvroHttpSerializer.cs | 25 ++++--
.../Avro/AvroJsonSerializer.cs | 2 +-
.../Protobuf/ReefProtocol/Serializer.cs | 2 +-
.../Evaluator/ReefMessageProtoObserver.cs | 2 +-
.../Runtime/Evaluator/Task/DriverMessageImpl.cs | 2 +-
.../Runtime/Evaluator/Task/TaskStatus.cs | 2 +-
.../Evaluator/Utils/EvaluatorConfigurations.cs | 2 +-
.../Bridge/ClrHandlerHelper.cs | 4 +-
.../Bridge/DriverBridge.cs | 4 +-
.../Bridge/HttpServerHandler.cs | 2 +-
lang/cs/Org.Apache.REEF.Driver/Constants.cs | 9 +-
.../DefaultClientCloseWithMessageHandler.cs | 2 +-
.../Defaults/DefaultClientMessageHandler.cs | 2 +-
.../Defaults/DefaultContextMessageHandler.cs | 4 +-
.../DefaultEvaluatorRequestorHandler.cs | 2 +-
.../Defaults/DefaultHttpHandler.cs | 2 +-
.../DriverConfigGenerator.cs | 14 +--
.../DriverConfiguration.cs | 6 +-
.../DriverConfigurationSettings.cs | 8 +-
.../DriverSubmissionSettings.cs | 7 ++
.../EvaluatorConfigurationsTests.cs | 2 +-
.../EvaluatorTests.cs | 4 +-
lang/cs/Org.Apache.REEF.Evaluator/Evaluator.cs | 16 ++--
.../AllHandlers.cs | 4 +-
.../HelloFailedTaskHandler.cs | 2 +-
.../HelloHttpHandler.cs | 7 +-
.../HelloTaskCompletedHandler.cs | 2 +-
.../DriverRestart/HelloRestartTask.cs | 2 +-
.../MachineLearning/KMeans/Centroids.cs | 2 +-
.../MachineLearning/KMeans/ProcessedResults.cs | 2 +-
.../KMeans/codecs/ProcessedResultsCodec.cs | 4 +-
.../Tasks/HelloTask/HelloTask.cs | 2 +-
.../HadoopFileSystemConfigurationProvider.cs | 2 +-
.../BroadcastAndReduceClient.cs | 4 +-
.../PipelinedBroadcastReduceDriver.cs | 2 +-
.../GroupCommunicationTests.cs | 30 +++----
.../Group/Config/CodecConfiguration.cs | 2 +-
.../Group/Driver/ICommunicationGroupDriver.cs | 4 +-
.../Group/Operators/IOperatorSpec.cs | 7 +-
.../Operators/Impl/BroadcastOperatorSpec.cs | 15 +++-
.../Group/Operators/Impl/ReduceOperatorSpec.cs | 14 ++-
.../Group/Operators/Impl/ScatterOperatorSpec.cs | 16 +++-
.../Task/ICommunicationGroupClientInternal.cs | 2 +-
.../Group/Task/Impl/CommunicationGroupClient.cs | 2 +-
.../Group/Topology/FlatTopology.cs | 2 +-
.../Group/Topology/TreeTopology.cs | 4 +-
.../Naming/NameClient.cs | 2 +-
.../Naming/NameLookupClient.cs | 2 +-
.../Naming/NameRegisterClient.cs | 2 +-
.../ClassHierarchy/TestAvroSerialization.cs | 40 ++++-----
.../Configuration/TestConfiguration.cs | 16 ++--
.../Format/TestConfigurationModule.cs | 2 +-
.../ScenarioTest/HttpHandlerConfiguration.cs | 2 +-
.../ScenarioTest/JettyHandler.cs | 6 +-
.../ScenarioTest/TestDefaultConstructor.cs | 2 +-
.../ScenarioTest/TestHttpService.cs | 6 +-
.../ScenarioTest/TestRuntimeClock.cs | 6 +-
.../SmokeTest/ObjectTreeTest.cs | 2 +-
.../SmokeTest/RootImplementation.cs | 2 +-
.../SmokeTest/TestConfigurationModuleBuilder.cs | 2 +-
.../Tang/TestDefaultImpementaion.cs | 4 +-
.../Formats/AvroConfigurationSerializer.cs | 27 +++---
.../Formats/ConfigurationFile.cs | 90 ++------------------
.../Formats/IConfigurationSerializer.cs | 2 +-
.../AvroClassHierarchySerializer.cs | 18 ++--
.../ClassHierarchy/ClassHierarchyImpl.cs | 2 +-
.../Configuration/CsConfigurationBuilderImpl.cs | 8 +-
.../InjectionPlan/InjectorImpl.cs | 4 +-
.../Implementations/InjectionPlan/Subplan.cs | 2 +-
.../Implementations/Tang/TangImpl.cs | 4 +-
.../Interface/IClassHierarchySerializer.cs | 12 +--
.../Util/ReflectionUtilities.cs | 13 ++-
.../Bridge/HelloSimpleEventHandlers.cs | 4 +-
.../Functional/ML/KMeans/TestKMeans.cs | 2 +-
.../Functional/Messaging/MessageDriver.cs | 6 +-
.../Functional/Messaging/MessageTask.cs | 6 +-
.../Functional/ReefFunctionalTest.cs | 12 +--
.../Org.Apache.REEF.Utilities/ByteUtilities.cs | 7 ++
.../Diagnostics/Exceptions.cs | 8 +-
.../Org.Apache.REEF.Utilities/Logging/Logger.cs | 7 ++
lang/cs/Org.Apache.REEF.Wake.Tests/ClockTest.cs | 2 +-
.../Examples/P2p/Pull2Push.cs | 2 +-
.../Remote/Impl/MultiCodec.cs | 2 +-
.../Remote/Impl/StreamingTransportServer.cs | 8 +-
.../Remote/Impl/TransportServer.cs | 6 +-
86 files changed, 319 insertions(+), 307 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Common.Tests/TestHttpSerialization.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Common.Tests/TestHttpSerialization.cs b/lang/cs/Org.Apache.REEF.Common.Tests/TestHttpSerialization.cs
index de2cffd..10a6d8c 100644
--- a/lang/cs/Org.Apache.REEF.Common.Tests/TestHttpSerialization.cs
+++ b/lang/cs/Org.Apache.REEF.Common.Tests/TestHttpSerialization.cs
@@ -39,14 +39,14 @@ namespace Org.Apache.REEF.Common.Tests
[TestMethod]
public void TestHttpRequestSerializationJasonRoundTrip()
{
- AvroHttpRequest r = CreatAvorHttpRequest();
+ AvroHttpRequest r = CreateAvroHttpRequest();
string str = AvroHttpSerializer.ToJson(r);
byte[] bytes = ByteUtilities.StringToByteArrays(str);
- var r1 = AvroHttpSerializer.FromBytesWithJoson(bytes);
+ var r1 = AvroHttpSerializer.FromBytesWithJson(bytes);
- var ri = ByteUtilities.ByteArrarysToString(r.InputStream);
- var ri1 = ByteUtilities.ByteArrarysToString(r1.InputStream);
+ var ri = ByteUtilities.ByteArraysToString(r.InputStream);
+ var ri1 = ByteUtilities.ByteArraysToString(r1.InputStream);
Assert.AreEqual(ri, ri1);
Assert.AreEqual(r.QueryString, r1.QueryString);
}
@@ -57,22 +57,22 @@ namespace Org.Apache.REEF.Common.Tests
[TestMethod]
public void TestHttpRequestSerializationBytesRoundTrip()
{
- AvroHttpRequest r = CreatAvorHttpRequest();
+ AvroHttpRequest r = CreateAvroHttpRequest();
var b = AvroHttpSerializer.ToBytes(r);
var r1 = AvroHttpSerializer.FromBytes(b);
- var ri = ByteUtilities.ByteArrarysToString(r.InputStream);
- var ri1 = ByteUtilities.ByteArrarysToString(r1.InputStream);
+ var ri = ByteUtilities.ByteArraysToString(r.InputStream);
+ var ri1 = ByteUtilities.ByteArraysToString(r1.InputStream);
Assert.AreEqual(ri, ri1);
Assert.AreEqual(r.QueryString, r1.QueryString);
}
/// <summary>
- /// Creats an Avor HTTP request for unit tests.
+ /// Creates an Avro HTTP request for unit tests.
/// </summary>
/// <returns>AvroHttpRequest.</returns>
- private AvroHttpRequest CreatAvorHttpRequest()
+ private AvroHttpRequest CreateAvroHttpRequest()
{
AvroHttpRequest r = new AvroHttpRequest();
r.Header = new List<HeaderEntry>();
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Common/Avro/AvroHttpSerializer.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Common/Avro/AvroHttpSerializer.cs b/lang/cs/Org.Apache.REEF.Common/Avro/AvroHttpSerializer.cs
index 6b936f7..24d9628 100644
--- a/lang/cs/Org.Apache.REEF.Common/Avro/AvroHttpSerializer.cs
+++ b/lang/cs/Org.Apache.REEF.Common/Avro/AvroHttpSerializer.cs
@@ -17,6 +17,7 @@
* under the License.
*/
+using System;
using System.IO;
using Microsoft.Hadoop.Avro;
using Newtonsoft.Json;
@@ -27,6 +28,7 @@ namespace Org.Apache.REEF.Common.Avro
/// <summary>
/// Class AvroHttpSerializer. Provides methods to serialize and deserialize HttpRequest
/// </summary>
+ // TODO[REEF-842] Act on the obsoletes
public class AvroHttpSerializer
{
public static AvroHttpRequest FromBytes(byte[] serializedBytes)
@@ -39,24 +41,35 @@ namespace Org.Apache.REEF.Common.Avro
}
/// <summary>
- /// Conver bytes which contains Json string into AvroHttpRequest object
+ /// Convert bytes which contains Json string into AvroHttpRequest object
/// </summary>
/// <param name="serializedBytes">The serialized bytes.</param>
/// <returns>AvroHttpRequest.</returns>
+ [Obsolete("Deprecated in 0.14, please use FromBytesWithJson instead.")]
public static AvroHttpRequest FromBytesWithJoson(byte[] serializedBytes)
{
- string s = ByteUtilities.ByteArrarysToString(serializedBytes);
+ return FromBytesWithJson(serializedBytes);
+ }
+
+ /// <summary>
+ /// Convert bytes which contains Json string into AvroHttpRequest object
+ /// </summary>
+ /// <param name="serializedBytes">The serialized bytes.</param>
+ /// <returns>AvroHttpRequest.</returns>
+ public static AvroHttpRequest FromBytesWithJson(byte[] serializedBytes)
+ {
+ string s = ByteUtilities.ByteArraysToString(serializedBytes);
return FromJson(s);
}
/// <summary>
/// Convert from Json string into AvroHttpRequest object
/// </summary>
- /// <param name="josonString">The joson string.</param>
+ /// <param name="jsonString">The json string.</param>
/// <returns>AvroHttpRequest.</returns>
- public static AvroHttpRequest FromJson(string josonString)
+ public static AvroHttpRequest FromJson(string jsonString)
{
- return JsonConvert.DeserializeObject<AvroHttpRequest>(josonString);
+ return JsonConvert.DeserializeObject<AvroHttpRequest>(jsonString);
}
/// <summary>
@@ -110,4 +123,4 @@ namespace Org.Apache.REEF.Common.Avro
}
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Common/Avro/AvroJsonSerializer.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Common/Avro/AvroJsonSerializer.cs b/lang/cs/Org.Apache.REEF.Common/Avro/AvroJsonSerializer.cs
index 8954fe9..4a86177 100644
--- a/lang/cs/Org.Apache.REEF.Common/Avro/AvroJsonSerializer.cs
+++ b/lang/cs/Org.Apache.REEF.Common/Avro/AvroJsonSerializer.cs
@@ -40,7 +40,7 @@ namespace Org.Apache.REEF.Common.Avro
public static T FromBytes(byte[] bytes)
{
- return FromString(ByteUtilities.ByteArrarysToString(bytes));
+ return FromString(ByteUtilities.ByteArraysToString(bytes));
}
public static byte[] ToBytes(T obj)
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Common/Protobuf/ReefProtocol/Serializer.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Common/Protobuf/ReefProtocol/Serializer.cs b/lang/cs/Org.Apache.REEF.Common/Protobuf/ReefProtocol/Serializer.cs
index 093d0d3..152fe5c 100644
--- a/lang/cs/Org.Apache.REEF.Common/Protobuf/ReefProtocol/Serializer.cs
+++ b/lang/cs/Org.Apache.REEF.Common/Protobuf/ReefProtocol/Serializer.cs
@@ -107,7 +107,7 @@ namespace Org.Apache.REEF.Common.Protobuf.ReefProtocol
{
foreach (TaskStatusProto.TaskMessageProto taskMessageProto in task_status.task_message)
{
- taskStatusMessage += ByteUtilities.ByteArrarysToString(taskMessageProto.message);
+ taskStatusMessage += ByteUtilities.ByteArraysToString(taskMessageProto.message);
}
}
return string.Format(CultureInfo.InvariantCulture, "EvaluatorHeartbeatProto: task_id=[{0}], task_status=[{1}], task_message=[{2}], evaluator_status=[{3}], context_status=[{4}], timestamp=[{5}], recoveryFlag =[{6}]",
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/ReefMessageProtoObserver.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/ReefMessageProtoObserver.cs b/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/ReefMessageProtoObserver.cs
index d1a9f8d..66e925c 100644
--- a/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/ReefMessageProtoObserver.cs
+++ b/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/ReefMessageProtoObserver.cs
@@ -65,7 +65,7 @@ namespace Org.Apache.REEF.Common.Runtime.Evaluator
}
if (remoteEvent.evaluatorControl.context_control.task_message != null)
{
- task_message = ByteUtilities.ByteArrarysToString(remoteEvent.evaluatorControl.context_control.task_message);
+ task_message = ByteUtilities.ByteArraysToString(remoteEvent.evaluatorControl.context_control.task_message);
}
if (!(string.IsNullOrEmpty(context_message) && string.IsNullOrEmpty(task_message)))
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Task/DriverMessageImpl.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Task/DriverMessageImpl.cs b/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Task/DriverMessageImpl.cs
index d01d52a..a2377de 100644
--- a/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Task/DriverMessageImpl.cs
+++ b/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Task/DriverMessageImpl.cs
@@ -46,7 +46,7 @@ namespace Org.Apache.REEF.Common.Runtime.Evaluator.Task
public override string ToString()
{
- return "DriverMessage [value=" + ByteUtilities.ByteArrarysToString(_value.Value) + "]";
+ return "DriverMessage [value=" + ByteUtilities.ByteArraysToString(_value.Value) + "]";
}
}
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Task/TaskStatus.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Task/TaskStatus.cs b/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Task/TaskStatus.cs
index bdf9af8..5b1c4dc 100644
--- a/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Task/TaskStatus.cs
+++ b/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Task/TaskStatus.cs
@@ -274,7 +274,7 @@ namespace Org.Apache.REEF.Common.Runtime.Evaluator.Task
{
if (_result.IsPresent() && _lastException.IsPresent())
{
- LOGGER.Log(Level.Warning, "Both task result and exception are present, the expcetion will take over. Thrown away result:" + ByteUtilities.ByteArrarysToString(_result.Value));
+ LOGGER.Log(Level.Warning, "Both task result and exception are present, the expcetion will take over. Thrown away result:" + ByteUtilities.ByteArraysToString(_result.Value));
State = TaskState.Failed;
_result = Optional<byte[]>.Empty();
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Utils/EvaluatorConfigurations.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Utils/EvaluatorConfigurations.cs b/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Utils/EvaluatorConfigurations.cs
index a54a508..1711475 100644
--- a/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Utils/EvaluatorConfigurations.cs
+++ b/lang/cs/Org.Apache.REEF.Common/Runtime/Evaluator/Utils/EvaluatorConfigurations.cs
@@ -64,7 +64,7 @@ namespace Org.Apache.REEF.Common.Runtime.Evaluator.Utils
}
_configFile = configFile;
AvroConfigurationSerializer serializer = new AvroConfigurationSerializer();
- _avroConfiguration = serializer.AvroDeseriaizeFromFile(_configFile);
+ _avroConfiguration = serializer.AvroDeserializeFromFile(_configFile);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Driver/Bridge/ClrHandlerHelper.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Bridge/ClrHandlerHelper.cs b/lang/cs/Org.Apache.REEF.Driver/Bridge/ClrHandlerHelper.cs
index a13a445..7b07ce0 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Bridge/ClrHandlerHelper.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/Bridge/ClrHandlerHelper.cs
@@ -107,9 +107,9 @@ namespace Org.Apache.REEF.Driver.Bridge
using (LOGGER.LogFunction("ClrHandlerHelper::GenerateClassHierarchy"))
{
IClassHierarchy ns = TangFactory.GetTang().GetClassHierarchy(clrDlls.ToArray());
- ProtocolBufferClassHierarchy.Serialize(Constants.ClassHierarachyBin, ns);
+ ProtocolBufferClassHierarchy.Serialize(Constants.ClassHierarchyBin, ns);
- LOGGER.Log(Level.Info, string.Format(CultureInfo.InvariantCulture, "Class hierarchy written to [{0}].", Path.Combine(Directory.GetCurrentDirectory(), Constants.ClassHierarachyBin)));
+ LOGGER.Log(Level.Info, string.Format(CultureInfo.InvariantCulture, "Class hierarchy written to [{0}].", Path.Combine(Directory.GetCurrentDirectory(), Constants.ClassHierarchyBin)));
}
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Driver/Bridge/DriverBridge.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Bridge/DriverBridge.cs b/lang/cs/Org.Apache.REEF.Driver/Bridge/DriverBridge.cs
index ef71c79..6e02bff 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Bridge/DriverBridge.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/Bridge/DriverBridge.cs
@@ -146,7 +146,7 @@ namespace Org.Apache.REEF.Driver.Bridge
{
foreach (TraceListener listener in traceListeners)
{
- Logger.AddTraceListner(listener);
+ Logger.AddTraceListener(listener);
}
_logger = Logger.GetLogger(typeof(DriverBridge));
_logger.Log(Level.Info, "Constructing DriverBridge");
@@ -243,7 +243,7 @@ namespace Org.Apache.REEF.Driver.Bridge
foreach (var handler in _runningTaskHandlers)
{
_runningTaskSubscriber.Subscribe(handler);
- _logger.Log(Level.Verbose, "subscribed to IRunningask handler: " + handler);
+ _logger.Log(Level.Verbose, "subscribed to IRunningTask handler: " + handler);
}
handlers[Constants.Handlers[Constants.RunningTaskHandler]] = ClrHandlerHelper.CreateHandler(_runningTaskSubscriber);
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Driver/Bridge/HttpServerHandler.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Bridge/HttpServerHandler.cs b/lang/cs/Org.Apache.REEF.Driver/Bridge/HttpServerHandler.cs
index c3b6cae..c757001 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Bridge/HttpServerHandler.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/Bridge/HttpServerHandler.cs
@@ -85,7 +85,7 @@ namespace Org.Apache.REEF.Driver.Bridge
{
LOGGER.Log(Level.Info, "HttpHandler OnNext, handling http request.");
byte[] byteData = httpMessage.GetQueryReuestData();
- AvroHttpRequest avroHttpRequest = AvroHttpSerializer.FromBytesWithJoson(byteData);
+ AvroHttpRequest avroHttpRequest = AvroHttpSerializer.FromBytesWithJson(byteData);
LOGGER.Log(Level.Info, string.Format(CultureInfo.CurrentCulture, "HttpHandler OnNext, requestData:", avroHttpRequest));
string spec = GetSpecification(avroHttpRequest.PathInfo);
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Driver/Constants.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Constants.cs b/lang/cs/Org.Apache.REEF.Driver/Constants.cs
index e00f5f0..ef8b87d 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Constants.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/Constants.cs
@@ -22,6 +22,7 @@ using System.Collections.Generic;
namespace Org.Apache.REEF.Driver
{
+ // TODO[REEF-842] Act on the obsoletes
public class Constants
{
/// <summary>
@@ -32,10 +33,16 @@ namespace Org.Apache.REEF.Driver
/// <summary>
/// The class hierarchy file from .NET.
/// </summary>
+ [Obsolete("Deprecated in 0.14, please use ClassHierarchyBin instead.")]
public const string ClassHierarachyBin = "clrClassHierarchy.bin";
/// <summary>
- /// The file containing user supplied libaries.
+ /// The class hierarchy file from .NET.
+ /// </summary>
+ public const string ClassHierarchyBin = "clrClassHierarchy.bin";
+
+ /// <summary>
+ /// The file containing user supplied libraries.
/// </summary>
public const string GlobalUserSuppliedJavaLibraries = "userSuppliedGlobalLibraries.txt";
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultClientCloseWithMessageHandler.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultClientCloseWithMessageHandler.cs b/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultClientCloseWithMessageHandler.cs
index ddf0a3a..101a037 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultClientCloseWithMessageHandler.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultClientCloseWithMessageHandler.cs
@@ -37,7 +37,7 @@ namespace Org.Apache.REEF.Driver.Defaults
public void OnNext(byte[] value)
{
- Exceptions.Throw(new InvalidOperationException("No handler bound for client Close With Message event:" + ByteUtilities.ByteArrarysToString(value)),
+ Exceptions.Throw(new InvalidOperationException("No handler bound for client Close With Message event:" + ByteUtilities.ByteArraysToString(value)),
Logger.GetLogger(typeof(DefaultClientCloseWithMessageHandler)));
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultClientMessageHandler.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultClientMessageHandler.cs b/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultClientMessageHandler.cs
index da9ef89..d10c917 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultClientMessageHandler.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultClientMessageHandler.cs
@@ -38,7 +38,7 @@ namespace Org.Apache.REEF.Driver.Defaults
public void OnNext(byte[] value)
{
- LOGGER.Log(Level.Info, "Received message: " + ByteUtilities.ByteArrarysToString(value));
+ LOGGER.Log(Level.Info, "Received message: " + ByteUtilities.ByteArraysToString(value));
}
public void OnError(Exception error)
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultContextMessageHandler.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultContextMessageHandler.cs b/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultContextMessageHandler.cs
index 5e20da9..caecf38 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultContextMessageHandler.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultContextMessageHandler.cs
@@ -26,7 +26,7 @@ using Org.Apache.REEF.Utilities.Logging;
namespace Org.Apache.REEF.Driver.Defaults
{
/// <summary>
- /// efault event handler for ContextMessage: Logging it.
+ /// Default event handler for ContextMessage: Logging it.
/// </summary>
public class DefaultContextMessageHandler : IObserver<IContextMessage>
{
@@ -39,7 +39,7 @@ namespace Org.Apache.REEF.Driver.Defaults
public void OnNext(IContextMessage value)
{
- LOGGER.Log(Level.Info, "Received ContextMessage: " + ByteUtilities.ByteArrarysToString(value.Message));
+ LOGGER.Log(Level.Info, "Received ContextMessage: " + ByteUtilities.ByteArraysToString(value.Message));
}
public void OnError(Exception error)
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultEvaluatorRequestorHandler.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultEvaluatorRequestorHandler.cs b/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultEvaluatorRequestorHandler.cs
index 0617e29..a59b8bf 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultEvaluatorRequestorHandler.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultEvaluatorRequestorHandler.cs
@@ -39,7 +39,7 @@ namespace Org.Apache.REEF.Driver.Defaults
public void OnNext(IEvaluatorRequestor value)
{
- LOGGER.Log(Level.Info, "Default evaluator requstor: requesting 1 evaluator with 512 MB");
+ LOGGER.Log(Level.Info, "Default evaluator requestor: requesting 1 evaluator with 512 MB");
int evaluatorsNumber = 1;
int memory = 512;
string rack = "WonderlandRack";
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultHttpHandler.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultHttpHandler.cs b/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultHttpHandler.cs
index bcba2a7..37653b1 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultHttpHandler.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/Defaults/DefaultHttpHandler.cs
@@ -39,7 +39,7 @@ namespace Org.Apache.REEF.Driver.Defaults
return "Ping";
}
- public void OnHttpRequest(ReefHttpRequest requet, ReefHttpResponse response)
+ public void OnHttpRequest(ReefHttpRequest request, ReefHttpResponse response)
{
LOGGER.Log(Level.Info, "OnHttpRequest in DefaultHttpHandler is called.");
response.Status = HttpStatusCode.OK;
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Driver/DriverConfigGenerator.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/DriverConfigGenerator.cs b/lang/cs/Org.Apache.REEF.Driver/DriverConfigGenerator.cs
index c0e1691..89bb34f 100644
--- a/lang/cs/Org.Apache.REEF.Driver/DriverConfigGenerator.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/DriverConfigGenerator.cs
@@ -71,16 +71,16 @@ namespace Org.Apache.REEF.Driver
AvroConfigurationSerializer serializer = new AvroConfigurationSerializer();
- IClassHierarchy drvierClassHierarchy = ProtocolBufferClassHierarchy.DeSerialize(DriverChFile);
+ IClassHierarchy driverClassHierarchy = ProtocolBufferClassHierarchy.DeSerialize(DriverChFile);
- AvroConfiguration jobDriverAvroconfiguration = serializer.AvroDeseriaizeFromFile(JobDriverConfigFile);
- IConfiguration jobDriverConfiguration = serializer.FromAvro(jobDriverAvroconfiguration, drvierClassHierarchy);
+ AvroConfiguration jobDriverAvroconfiguration = serializer.AvroDeserializeFromFile(JobDriverConfigFile);
+ IConfiguration jobDriverConfiguration = serializer.FromAvro(jobDriverAvroconfiguration, driverClassHierarchy);
- AvroConfiguration httpAvroconfiguration = serializer.AvroDeseriaizeFromFile(HttpServerConfigFile);
- IConfiguration httpConfiguration = serializer.FromAvro(httpAvroconfiguration, drvierClassHierarchy);
+ AvroConfiguration httpAvroconfiguration = serializer.AvroDeserializeFromFile(HttpServerConfigFile);
+ IConfiguration httpConfiguration = serializer.FromAvro(httpAvroconfiguration, driverClassHierarchy);
- AvroConfiguration nameAvroconfiguration = serializer.AvroDeseriaizeFromFile(NameServerConfigFile);
- IConfiguration nameConfiguration = serializer.FromAvro(nameAvroconfiguration, drvierClassHierarchy);
+ AvroConfiguration nameAvroconfiguration = serializer.AvroDeserializeFromFile(NameServerConfigFile);
+ IConfiguration nameConfiguration = serializer.FromAvro(nameAvroconfiguration, driverClassHierarchy);
IConfiguration merged;
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Driver/DriverConfiguration.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/DriverConfiguration.cs b/lang/cs/Org.Apache.REEF.Driver/DriverConfiguration.cs
index c99036e..821517e 100644
--- a/lang/cs/Org.Apache.REEF.Driver/DriverConfiguration.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/DriverConfiguration.cs
@@ -153,17 +153,17 @@ namespace Org.Apache.REEF.Driver
new OptionalImpl<IObserver<IFailedEvaluator>>();
/// <summary>
- /// Additional set of string arguments that can be pssed to handlers through client
+ /// Additional set of string arguments that can be passed to handlers through client
/// </summary>
public static readonly OptionalParameter<string> CommandLineArguments = new OptionalParameter<string>();
/// <summary>
- /// The trace level of the TraceListner
+ /// The trace level of the TraceListener
/// </summary>
public static readonly OptionalParameter<string> CustomTraceLevel = new OptionalParameter<string>();
/// <summary>
- /// Additional set of trace listners provided by client
+ /// Additional set of trace listeners provided by client
/// </summary>
public static readonly OptionalParameter<TraceListener> CustomTraceListeners =
new OptionalParameter<TraceListener>();
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Driver/DriverConfigurationSettings.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/DriverConfigurationSettings.cs b/lang/cs/Org.Apache.REEF.Driver/DriverConfigurationSettings.cs
index 85cfacf..68c10f6 100644
--- a/lang/cs/Org.Apache.REEF.Driver/DriverConfigurationSettings.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/DriverConfigurationSettings.cs
@@ -29,10 +29,10 @@ namespace Org.Apache.REEF.Driver
// default to _defaultSubmissionDirectory if not provided
private string _submissionDirectory = "reefTmp/job_" + DateTime.Now.Millisecond;
- // deault to 512MB if no value is provided
+ // default to 512MB if no value is provided
private int _driverMemory = 512;
- // folder path that constains clr dlls used by reef
+ // folder path that contains clr dlls used by reef
private string _clrFolder = ".";
// folder that contains jar File provided Byte REEF
@@ -58,7 +58,7 @@ namespace Org.Apache.REEF.Driver
{
if (value < 0)
{
- throw new ArgumentException("driver memory cannot be negatvie value.");
+ throw new ArgumentException("driver memory cannot be negative value.");
}
_driverMemory = value;
}
@@ -99,7 +99,7 @@ namespace Org.Apache.REEF.Driver
/// <summary>
/// Driver job submission directory in (H)DFS where jar file shall be uploaded, default to a tmp directory with GUID name
- /// If set by CLR user, the user must guarantee the uniquness of the directory across multiple jobs
+ /// If set by CLR user, the user must guarantee the uniqueness of the directory across multiple jobs
/// </summary>
public string SubmissionDirectory
{
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Driver/DriverSubmissionSettings.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/DriverSubmissionSettings.cs b/lang/cs/Org.Apache.REEF.Driver/DriverSubmissionSettings.cs
index 15cb8ca..430464d 100644
--- a/lang/cs/Org.Apache.REEF.Driver/DriverSubmissionSettings.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/DriverSubmissionSettings.cs
@@ -23,6 +23,7 @@ using Org.Apache.REEF.Utilities.Logging;
namespace Org.Apache.REEF.Driver
{
// TODO: merge with EvaluatorConfigurations class
+ // TODO[REEF-842] Act on the obsoletes
public class DriverSubmissionSettings
{
// default to "ReefDevClrBridge"
@@ -171,8 +172,14 @@ namespace Org.Apache.REEF.Driver
}
}
+ [Obsolete("Deprecated in 0.14, please use ToCommandLineArguments instead.")]
public string ToComamndLineArguments()
{
+ return ToCommandLineArguments();
+ }
+
+ public string ToCommandLineArguments()
+ {
return
(RunOnYarn ? " -local false" : string.Empty) +
(!Submit ? " -submit false" : string.Empty) +
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Evaluator.Tests/EvaluatorConfigurationsTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Evaluator.Tests/EvaluatorConfigurationsTests.cs b/lang/cs/Org.Apache.REEF.Evaluator.Tests/EvaluatorConfigurationsTests.cs
index 6c9385a..aa9864c 100644
--- a/lang/cs/Org.Apache.REEF.Evaluator.Tests/EvaluatorConfigurationsTests.cs
+++ b/lang/cs/Org.Apache.REEF.Evaluator.Tests/EvaluatorConfigurationsTests.cs
@@ -61,7 +61,7 @@ namespace Org.Apache.REEF.Evaluator.Tests
public void TestEvaluatorConfigurationFile()
{
AvroConfigurationSerializer serializer = new AvroConfigurationSerializer();
- var avroConfiguration = serializer.AvroDeseriaizeFromFile("evaluator.conf");
+ var avroConfiguration = serializer.AvroDeserializeFromFile("evaluator.conf");
Assert.IsNotNull(avroConfiguration);
Assert.AreEqual(avroConfiguration.language, AvroConfigurationSerializer.Java);
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Evaluator.Tests/EvaluatorTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Evaluator.Tests/EvaluatorTests.cs b/lang/cs/Org.Apache.REEF.Evaluator.Tests/EvaluatorTests.cs
index 8779d8b..32fc095 100644
--- a/lang/cs/Org.Apache.REEF.Evaluator.Tests/EvaluatorTests.cs
+++ b/lang/cs/Org.Apache.REEF.Evaluator.Tests/EvaluatorTests.cs
@@ -48,7 +48,7 @@ namespace Org.Apache.REEF.Evaluator.Tests
Assert.IsNotNull(tmp);
AvroConfigurationSerializer serializer = new AvroConfigurationSerializer();
- AvroConfiguration avroConfiguration = serializer.AvroDeseriaizeFromFile("evaluator.conf");
+ AvroConfiguration avroConfiguration = serializer.AvroDeserializeFromFile("evaluator.conf");
Assert.IsNotNull(avroConfiguration);
ICsConfigurationBuilder cb = TangFactory.GetTang().NewConfigurationBuilder();
@@ -84,7 +84,7 @@ namespace Org.Apache.REEF.Evaluator.Tests
[TestMethod, Priority(0), TestCategory("Unit")]
[Description("Test driver information extracted from Http server")]
- public void CanExtractDriverInformaiton()
+ public void CanExtractDriverInformation()
{
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);
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Evaluator/Evaluator.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Evaluator/Evaluator.cs b/lang/cs/Org.Apache.REEF.Evaluator/Evaluator.cs
index c114e7e..ed51e7d 100644
--- a/lang/cs/Org.Apache.REEF.Evaluator/Evaluator.cs
+++ b/lang/cs/Org.Apache.REEF.Evaluator/Evaluator.cs
@@ -70,7 +70,7 @@ namespace Org.Apache.REEF.Evaluator
DateTime.Now));
Stopwatch timer = new Stopwatch();
InitInjector();
- SetCustomTraceListners(); // _logger is reset by this.
+ SetCustomTraceListeners(); // _logger is reset by this.
timer.Stop();
Console.WriteLine(string.Format(CultureInfo.InvariantCulture,
"EXIT: {0} Evaluator::InitInjector. Duration: [{1}].", DateTime.Now, timer.Elapsed));
@@ -96,7 +96,7 @@ namespace Org.Apache.REEF.Evaluator
Utilities.Diagnostics.Exceptions.Throw(e, _logger);
}
- // evaluator configuraiton file
+ // evaluator configuration file
string evaluatorConfigurationPath = args[0];
// Parse the evaluator configuration.
@@ -213,7 +213,7 @@ namespace Org.Apache.REEF.Evaluator
_heartbeatMaxRetry = maxHeartbeatRetry;
}
_logger.Log(Level.Verbose,
- "Evaluator heatrbeat max retry set to be " + _heartbeatMaxRetry + " times.");
+ "Evaluator heartbeat max retry set to be " + _heartbeatMaxRetry + " times.");
}
@@ -265,10 +265,10 @@ namespace Org.Apache.REEF.Evaluator
/// <returns></returns>
private static RuntimeClock InstantiateClock()
{
- IConfiguration clockConfiguraiton = new ConfigurationModuleBuilder().Build().Build();
+ IConfiguration clockConfiguration = new ConfigurationModuleBuilder().Build().Build();
try
{
- return TangFactory.GetTang().NewInjector(clockConfiguraiton).GetInstance<RuntimeClock>();
+ return TangFactory.GetTang().NewInjector(clockConfiguration).GetInstance<RuntimeClock>();
}
catch (Exception exception)
{
@@ -276,7 +276,7 @@ namespace Org.Apache.REEF.Evaluator
}
}
- private static void SetCustomTraceListners()
+ private static void SetCustomTraceListeners()
{
ISet<TraceListener> customTraceListeners;
try
@@ -286,12 +286,12 @@ namespace Org.Apache.REEF.Evaluator
catch (Exception e)
{
Utilities.Diagnostics.Exceptions.Caught(e, Level.Error, _logger);
- // custom trace listner not set properly, use empty set
+ // custom trace listener not set properly, use empty set
customTraceListeners = new HashSet<TraceListener>();
}
foreach (TraceListener listener in customTraceListeners)
{
- Logger.AddTraceListner(listener);
+ Logger.AddTraceListener(listener);
}
_logger = Logger.GetLogger(typeof(Evaluator));
CustomTraceLevel traceLevel = _injector.GetInstance<CustomTraceLevel>();
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Examples.AllHandlers/AllHandlers.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Examples.AllHandlers/AllHandlers.cs b/lang/cs/Org.Apache.REEF.Examples.AllHandlers/AllHandlers.cs
index 330874c..57d01e4 100644
--- a/lang/cs/Org.Apache.REEF.Examples.AllHandlers/AllHandlers.cs
+++ b/lang/cs/Org.Apache.REEF.Examples.AllHandlers/AllHandlers.cs
@@ -73,13 +73,13 @@ namespace Org.Apache.REEF.Examples.AllHandlers
.Set(DriverConfiguration.OnDriverRestartTaskRunning, GenericType<HelloDriverRestartRunningTaskHandler>.Class)
.Build();
- var driverCondig = TangFactory.GetTang().NewConfigurationBuilder(helloDriverConfiguration)
+ var driverConfig = TangFactory.GetTang().NewConfigurationBuilder(helloDriverConfiguration)
.BindSetEntry<DriverBridgeConfigurationOptions.SetOfAssemblies, string>(typeof(HelloTask).Assembly.GetName().Name)
.BindSetEntry<DriverBridgeConfigurationOptions.SetOfAssemblies, string>(typeof(NameClient).Assembly.GetName().Name)
.Build();
var helloJobSubmission = _jobSubmissionBuilderFactory.GetJobSubmissionBuilder()
- .AddDriverConfiguration(driverCondig)
+ .AddDriverConfiguration(driverConfig)
.AddGlobalAssemblyForType(typeof(HelloDriverStartHandler))
.SetJobIdentifier("HelloDriver")
.Build();
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Examples.AllHandlers/HelloFailedTaskHandler.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Examples.AllHandlers/HelloFailedTaskHandler.cs b/lang/cs/Org.Apache.REEF.Examples.AllHandlers/HelloFailedTaskHandler.cs
index 4b19bea..fc806ff 100644
--- a/lang/cs/Org.Apache.REEF.Examples.AllHandlers/HelloFailedTaskHandler.cs
+++ b/lang/cs/Org.Apache.REEF.Examples.AllHandlers/HelloFailedTaskHandler.cs
@@ -48,7 +48,7 @@ namespace Org.Apache.REEF.Examples.AllHandlers
failedTask.Reason.IsPresent() ? failedTask.Reason.Value : string.Empty,
failedTask.Message,
failedTask.Description.IsPresent() ? failedTask.Description.Value : string.Empty,
- failedTask.Data.IsPresent() ? ByteUtilities.ByteArrarysToString(failedTask.Data.Value) : string.Empty);
+ failedTask.Data.IsPresent() ? ByteUtilities.ByteArraysToString(failedTask.Data.Value) : string.Empty);
Console.WriteLine(errorMessage);
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Examples.AllHandlers/HelloHttpHandler.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Examples.AllHandlers/HelloHttpHandler.cs b/lang/cs/Org.Apache.REEF.Examples.AllHandlers/HelloHttpHandler.cs
index 3c4899c..afb5101 100644
--- a/lang/cs/Org.Apache.REEF.Examples.AllHandlers/HelloHttpHandler.cs
+++ b/lang/cs/Org.Apache.REEF.Examples.AllHandlers/HelloHttpHandler.cs
@@ -46,12 +46,11 @@ namespace Org.Apache.REEF.Examples.AllHandlers
/// <summary>
/// Sample code after receiving http request and send back the http response
/// </summary>
- /// <param name="requet"></param>
+ /// <param name="request"></param>
/// <param name="response"></param>
- public void OnHttpRequest(ReefHttpRequest requet, ReefHttpResponse response)
+ public void OnHttpRequest(ReefHttpRequest request, ReefHttpResponse response)
{
- Logger.Log(Level.Info, string.Format(CultureInfo.CurrentCulture, "HelloHttpHandler OnHttpRequest: URL: {0}, QueryString: {1}, inputStream: {2}.", requet.Url, requet.Querystring, ByteUtilities.ByteArrarysToString(requet.InputStream)));
- response.Status = HttpStatusCode.OK;
+ Logger.Log(Level.Info, string.Format(CultureInfo.CurrentCulture, "HelloHttpHandler OnHttpRequest: URL: {0}, QueryString: {1}, inputStream: {2}.", request.Url, request.Querystring, ByteUtilities.ByteArraysToString(request.InputStream)));response.Status = HttpStatusCode.OK;
response.OutputStream =
ByteUtilities.StringToByteArrays("Byte array returned from HelloHttpHandler in CLR!!!");
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Examples.AllHandlers/HelloTaskCompletedHandler.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Examples.AllHandlers/HelloTaskCompletedHandler.cs b/lang/cs/Org.Apache.REEF.Examples.AllHandlers/HelloTaskCompletedHandler.cs
index aa035b0..5b2e01a 100644
--- a/lang/cs/Org.Apache.REEF.Examples.AllHandlers/HelloTaskCompletedHandler.cs
+++ b/lang/cs/Org.Apache.REEF.Examples.AllHandlers/HelloTaskCompletedHandler.cs
@@ -40,7 +40,7 @@ namespace Org.Apache.REEF.Examples.AllHandlers
/// <param name="completedTask"></param>
public void OnNext(ICompletedTask completedTask)
{
- Console.WriteLine("Received CompletedTask: {0}, with message [{1}].", completedTask.Id, ByteUtilities.ByteArrarysToString(completedTask.Message));
+ Console.WriteLine("Received CompletedTask: {0}, with message [{1}].", completedTask.Id, ByteUtilities.ByteArraysToString(completedTask.Message));
}
public void OnError(Exception error)
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Examples/DriverRestart/HelloRestartTask.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Examples/DriverRestart/HelloRestartTask.cs b/lang/cs/Org.Apache.REEF.Examples/DriverRestart/HelloRestartTask.cs
index 11ed148..3efba7a 100644
--- a/lang/cs/Org.Apache.REEF.Examples/DriverRestart/HelloRestartTask.cs
+++ b/lang/cs/Org.Apache.REEF.Examples/DriverRestart/HelloRestartTask.cs
@@ -56,7 +56,7 @@ namespace Org.Apache.REEF.Examples.DriverRestart
public void Handle(IDriverMessage message)
{
- Logger.Log(Level.Verbose, "Receieved a message from driver. We should exit now...");
+ Logger.Log(Level.Verbose, "Received a message from driver. We should exit now...");
_exit = true;
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Examples/MachineLearning/KMeans/Centroids.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Examples/MachineLearning/KMeans/Centroids.cs b/lang/cs/Org.Apache.REEF.Examples/MachineLearning/KMeans/Centroids.cs
index 0ceb4ed..0d3b4c7 100644
--- a/lang/cs/Org.Apache.REEF.Examples/MachineLearning/KMeans/Centroids.cs
+++ b/lang/cs/Org.Apache.REEF.Examples/MachineLearning/KMeans/Centroids.cs
@@ -38,7 +38,7 @@ namespace Org.Apache.REEF.Examples.MachineLearning.KMeans
/// <returns>the serialized string</returns>
public override string ToString()
{
- return ByteUtilities.ByteArrarysToString(new CentroidsCodec().Encode(this));
+ return ByteUtilities.ByteArraysToString(new CentroidsCodec().Encode(this));
}
}
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Examples/MachineLearning/KMeans/ProcessedResults.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Examples/MachineLearning/KMeans/ProcessedResults.cs b/lang/cs/Org.Apache.REEF.Examples/MachineLearning/KMeans/ProcessedResults.cs
index 3e3394f..1f86c24 100644
--- a/lang/cs/Org.Apache.REEF.Examples/MachineLearning/KMeans/ProcessedResults.cs
+++ b/lang/cs/Org.Apache.REEF.Examples/MachineLearning/KMeans/ProcessedResults.cs
@@ -48,7 +48,7 @@ namespace Org.Apache.REEF.Examples.MachineLearning.KMeans
/// <returns>seralized string</returns>
public override string ToString()
{
- return ByteUtilities.ByteArrarysToString(new ProcessedResultsCodec().Encode(this));
+ return ByteUtilities.ByteArraysToString(new ProcessedResultsCodec().Encode(this));
}
}
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Examples/MachineLearning/KMeans/codecs/ProcessedResultsCodec.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Examples/MachineLearning/KMeans/codecs/ProcessedResultsCodec.cs b/lang/cs/Org.Apache.REEF.Examples/MachineLearning/KMeans/codecs/ProcessedResultsCodec.cs
index 8166030..4a212ee 100644
--- a/lang/cs/Org.Apache.REEF.Examples/MachineLearning/KMeans/codecs/ProcessedResultsCodec.cs
+++ b/lang/cs/Org.Apache.REEF.Examples/MachineLearning/KMeans/codecs/ProcessedResultsCodec.cs
@@ -44,10 +44,10 @@ namespace Org.Apache.REEF.Examples.MachineLearning.KMeans.codecs
public ProcessedResults Decode(byte[] data)
{
- string[] parts = ByteUtilities.ByteArrarysToString(data).Split('+');
+ string[] parts = ByteUtilities.ByteArraysToString(data).Split('+');
if (parts.Count() != 2)
{
- throw new ArgumentException("cannot deserialize from" + ByteUtilities.ByteArrarysToString(data));
+ throw new ArgumentException("cannot deserialize from" + ByteUtilities.ByteArraysToString(data));
}
float loss = float.Parse(parts[0], CultureInfo.InvariantCulture);
List<PartialMean> means = parts[1].Split('@').Select(PartialMean.FromString).ToList();
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Examples/Tasks/HelloTask/HelloTask.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Examples/Tasks/HelloTask/HelloTask.cs b/lang/cs/Org.Apache.REEF.Examples/Tasks/HelloTask/HelloTask.cs
index ccfeb01..12e9e8d 100644
--- a/lang/cs/Org.Apache.REEF.Examples/Tasks/HelloTask/HelloTask.cs
+++ b/lang/cs/Org.Apache.REEF.Examples/Tasks/HelloTask/HelloTask.cs
@@ -115,7 +115,7 @@ namespace Org.Apache.REEF.Examples.Tasks.HelloTask
LOGGER.Log(Level.Verbose, "Receieved a message from driver, handling it with HelloDriverMessageHandler");
if (value.Message.IsPresent())
{
- message = ByteUtilities.ByteArrarysToString(value.Message.Value);
+ message = ByteUtilities.ByteArraysToString(value.Message.Value);
}
_parentTask.HandleDriverMessage(message);
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.IO/FileSystem/Hadoop/HadoopFileSystemConfigurationProvider.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO/FileSystem/Hadoop/HadoopFileSystemConfigurationProvider.cs b/lang/cs/Org.Apache.REEF.IO/FileSystem/Hadoop/HadoopFileSystemConfigurationProvider.cs
index 84111b3..d01469e 100644
--- a/lang/cs/Org.Apache.REEF.IO/FileSystem/Hadoop/HadoopFileSystemConfigurationProvider.cs
+++ b/lang/cs/Org.Apache.REEF.IO/FileSystem/Hadoop/HadoopFileSystemConfigurationProvider.cs
@@ -27,7 +27,7 @@ using Org.Apache.REEF.Tang.Util;
namespace Org.Apache.REEF.IO.FileSystem.Hadoop
{
/// <summary>
- /// This provider provides configuration for HardoopFileSystem
+ /// This provider provides configuration for HadoopFileSystem
/// The client that is going to use HadoopFileSystem in its driver and evaluators should set
/// configuration data through HadoopFileSystemConfiguration module in he client's configuration
/// </summary>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Network.Examples.Client/BroadcastAndReduceClient.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network.Examples.Client/BroadcastAndReduceClient.cs b/lang/cs/Org.Apache.REEF.Network.Examples.Client/BroadcastAndReduceClient.cs
index 1931317..a33fd61 100644
--- a/lang/cs/Org.Apache.REEF.Network.Examples.Client/BroadcastAndReduceClient.cs
+++ b/lang/cs/Org.Apache.REEF.Network.Examples.Client/BroadcastAndReduceClient.cs
@@ -94,13 +94,13 @@ namespace Org.Apache.REEF.Network.Examples.Client
TestRun(merged, typeof(BroadcastReduceDriver), numTasks, "BroadcastReduceDriver", runPlatform);
}
- internal static void TestRun(IConfiguration driverCondig, Type globalAssemblyType, int numberOfEvaluator, string jobIdentifier = "myDriver", string runOnYarn = "local", string runtimeFolder = DefaultRuntimeFolder)
+ internal static void TestRun(IConfiguration driverConfig, Type globalAssemblyType, int numberOfEvaluator, string jobIdentifier = "myDriver", string runOnYarn = "local", string runtimeFolder = DefaultRuntimeFolder)
{
IInjector injector = TangFactory.GetTang().NewInjector(GetRuntimeConfiguration(runOnYarn, numberOfEvaluator, runtimeFolder));
var reefClient = injector.GetInstance<IREEFClient>();
var jobSubmissionBuilderFactory = injector.GetInstance<JobSubmissionBuilderFactory>();
var jobSubmission = jobSubmissionBuilderFactory.GetJobSubmissionBuilder()
- .AddDriverConfiguration(driverCondig)
+ .AddDriverConfiguration(driverConfig)
.AddGlobalAssemblyForType(globalAssemblyType)
.SetJobIdentifier(jobIdentifier)
.Build();
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedBroadcastReduceDriver.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedBroadcastReduceDriver.cs b/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedBroadcastReduceDriver.cs
index 90c0709..6e5ef7b 100644
--- a/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedBroadcastReduceDriver.cs
+++ b/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedBroadcastReduceDriver.cs
@@ -279,7 +279,7 @@ namespace Org.Apache.REEF.Network.Examples.GroupCommunication.PipelineBroadcastR
if (data.Length%sizeof (Int32) != 0)
{
throw new Exception(
- "error inside integer array decoder, byte array length not a multiple of interger size");
+ "error inside integer array decoder, byte array length not a multiple of integer size");
}
var result = new int[data.Length/sizeof (Int32)];
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommunicationTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommunicationTests.cs b/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommunicationTests.cs
index 62a6a3f..653d14a 100644
--- a/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommunicationTests.cs
+++ b/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommunicationTests.cs
@@ -121,13 +121,13 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
broadcastOperatorName,
masterTaskId,
TopologyTypes.Flat,
- GetDefaulDataConverterConfig())
+ GetDefaultDataConverterConfig())
.AddReduce<int>(
reduceOperatorName,
masterTaskId,
TopologyTypes.Flat,
- GetDefaulDataConverterConfig(),
- GetDefaulReduceFuncConfig())
+ GetDefaultDataConverterConfig(),
+ GetDefaultReduceFuncConfig())
.Build();
var commGroups = CommGroupClients(groupName, numTasks, groupCommunicationDriver, commGroup, GetDefaultCodecConfig());
@@ -247,13 +247,13 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
scatterOperatorName,
masterTaskId,
TopologyTypes.Flat,
- GetDefaulDataConverterConfig())
+ GetDefaultDataConverterConfig())
.AddReduce<int>(
reduceOperatorName,
masterTaskId,
TopologyTypes.Flat,
- GetDefaulReduceFuncConfig(),
- GetDefaulDataConverterConfig())
+ GetDefaultReduceFuncConfig(),
+ GetDefaultDataConverterConfig())
.Build();
List<ICommunicationGroupClient> commGroups = CommGroupClients(groupName, numTasks, groupCommDriver, commGroup, GetDefaultCodecConfig());
@@ -415,7 +415,7 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
IGroupCommDriver groupCommDriver = GetInstanceOfGroupCommDriver(driverId, masterTaskId, groupName, fanOut, numTasks);
var commGroup = groupCommDriver.DefaultGroup
- .AddReduce<int>(operatorName, "task0", TopologyTypes.Flat, GetDefaulDataConverterConfig(), GetDefaulReduceFuncConfig())
+ .AddReduce<int>(operatorName, "task0", TopologyTypes.Flat, GetDefaultDataConverterConfig(), GetDefaultReduceFuncConfig())
.Build();
List<ICommunicationGroupClient> commGroups = CommGroupClients(groupName, numTasks, groupCommDriver, commGroup, GetDefaultCodecConfig());
@@ -450,7 +450,7 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
IGroupCommDriver groupCommDriver = GetInstanceOfGroupCommDriver(driverId, masterTaskId, groupName, fanOut, numTasks);
var commGroup = groupCommDriver.DefaultGroup
- .AddReduce<int>(operatorName, "task0", TopologyTypes.Flat,GetDefaulDataConverterConfig(), GetDefaulReduceFuncConfig())
+ .AddReduce<int>(operatorName, "task0", TopologyTypes.Flat, GetDefaultDataConverterConfig(), GetDefaultReduceFuncConfig())
.Build();
List<ICommunicationGroupClient> commGroups = CommGroupClients(groupName, numTasks, groupCommDriver, commGroup, GetDefaultCodecConfig());
@@ -572,7 +572,7 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
IGroupCommDriver groupCommDriver = GetInstanceOfGroupCommDriver(driverId, masterTaskId, groupName, fanOut, numTasks);
var commGroup = groupCommDriver.DefaultGroup
- .AddScatter<int>(operatorName, masterTaskId, TopologyTypes.Flat, GetDefaulDataConverterConfig(), GetDefaulReduceFuncConfig())
+ .AddScatter<int>(operatorName, masterTaskId, TopologyTypes.Flat, GetDefaultDataConverterConfig(), GetDefaultReduceFuncConfig())
.Build();
List<ICommunicationGroupClient> commGroups = CommGroupClients(groupName, numTasks, groupCommDriver, commGroup, GetDefaultCodecConfig());
@@ -622,7 +622,7 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
IGroupCommDriver groupCommDriver = GetInstanceOfGroupCommDriver(driverId, masterTaskId, groupName, fanOut, numTasks);
var commGroup = groupCommDriver.DefaultGroup
- .AddScatter<int>(operatorName, masterTaskId, TopologyTypes.Flat, GetDefaulDataConverterConfig())
+ .AddScatter<int>(operatorName, masterTaskId, TopologyTypes.Flat, GetDefaultDataConverterConfig())
.Build();
List<ICommunicationGroupClient> commGroups = CommGroupClients(groupName, numTasks, groupCommDriver, commGroup, GetDefaultCodecConfig());
@@ -669,7 +669,7 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
IGroupCommDriver groupCommDriver = GetInstanceOfGroupCommDriver(driverId, masterTaskId, groupName, fanOut, numTasks);
var commGroup = groupCommDriver.DefaultGroup
- .AddScatter<int>(operatorName, masterTaskId, TopologyTypes.Flat, GetDefaulDataConverterConfig())
+ .AddScatter<int>(operatorName, masterTaskId, TopologyTypes.Flat, GetDefaultDataConverterConfig())
.Build();
List<ICommunicationGroupClient> commGroups = CommGroupClients(groupName, numTasks, groupCommDriver, commGroup, GetDefaultCodecConfig());
@@ -707,7 +707,7 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
public void TestConfigurationBroadcastSpec()
{
FlatTopology<int> topology = new FlatTopology<int>("Operator", "Operator", "task1", "driverid",
- new BroadcastOperatorSpec("Sender", GetDefaultCodecConfig(), GetDefaulDataConverterConfig()));
+ new BroadcastOperatorSpec("Sender", GetDefaultCodecConfig(), GetDefaultDataConverterConfig()));
topology.AddTask("task1");
var conf = topology.GetTaskConfiguration("task1");
@@ -727,7 +727,7 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
public void TestConfigurationReduceSpec()
{
FlatTopology<int> topology = new FlatTopology<int>("Operator", "Group", "task1", "driverid",
- new ReduceOperatorSpec("task1", Configurations.Merge(GetDefaultCodecConfig(), GetDefaulDataConverterConfig(), GetDefaulReduceFuncConfig())));
+ new ReduceOperatorSpec("task1", Configurations.Merge(GetDefaultCodecConfig(), GetDefaultDataConverterConfig(), GetDefaultReduceFuncConfig())));
topology.AddTask("task1");
var conf2 = topology.GetTaskConfiguration("task1");
@@ -871,14 +871,14 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
.Build();
}
- private static IConfiguration GetDefaulReduceFuncConfig()
+ private static IConfiguration GetDefaultReduceFuncConfig()
{
return ReduceFunctionConfiguration<int>.Conf
.Set(ReduceFunctionConfiguration<int>.ReduceFunction, GenericType<SumFunction>.Class)
.Build();
}
- private static IConfiguration GetDefaulDataConverterConfig()
+ private static IConfiguration GetDefaultDataConverterConfig()
{
return PipelineDataConverterConfiguration<int>.Conf
.Set(PipelineDataConverterConfiguration<int>.DataConverter, GenericType<DefaultPipelineDataConverter<int>>.Class)
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Network/Group/Config/CodecConfiguration.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Config/CodecConfiguration.cs b/lang/cs/Org.Apache.REEF.Network/Group/Config/CodecConfiguration.cs
index 7836c85..de1b9cb 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Config/CodecConfiguration.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Config/CodecConfiguration.cs
@@ -27,7 +27,7 @@ namespace Org.Apache.REEF.Network.Group.Config
public class CodecConfiguration<T> : ConfigurationModuleBuilder
{
/// <summary>
- /// RequiredImpl for Codec. Client needs to set implementation for this paramter
+ /// RequiredImpl for Codec. Client needs to set implementation for this parameter
/// </summary>
public static readonly RequiredImpl<ICodec<T>> Codec = new RequiredImpl<ICodec<T>>();
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Network/Group/Driver/ICommunicationGroupDriver.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Driver/ICommunicationGroupDriver.cs b/lang/cs/Org.Apache.REEF.Network/Group/Driver/ICommunicationGroupDriver.cs
index 240d244..60a7329 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Driver/ICommunicationGroupDriver.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Driver/ICommunicationGroupDriver.cs
@@ -71,7 +71,7 @@ namespace Org.Apache.REEF.Network.Group.Driver
/// </summary>
/// <param name="operatorName">The name of the scatter operator</param>
/// <param name="senderId">The sender id</param>
- /// <param name="topologyType">type of topology used in the operaor</param>
+ /// <param name="topologyType">type of topology used in the operator</param>
/// <returns>The same CommunicationGroupDriver with the added Scatter operator info</returns>
ICommunicationGroupDriver AddScatter(string operatorName, string senderId, TopologyTypes topologyType = TopologyTypes.Flat);
@@ -82,7 +82,7 @@ namespace Org.Apache.REEF.Network.Group.Driver
/// <param name="configurations">The configuration for task</param>
/// <param name="operatorName">The name of the scatter operator</param>
/// <param name="senderId">The sender id</param>
- /// <param name="topologyType">type of topology used in the operaor</param>
+ /// <param name="topologyType">type of topology used in the operator</param>
/// <returns>The same CommunicationGroupDriver with the added Scatter operator info</returns>
ICommunicationGroupDriver AddScatter<T>(string operatorName, string senderId, TopologyTypes topologyType, params IConfiguration[] configurations);
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Network/Group/Operators/IOperatorSpec.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Operators/IOperatorSpec.cs b/lang/cs/Org.Apache.REEF.Network/Group/Operators/IOperatorSpec.cs
index 920873b..cabbea2 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Operators/IOperatorSpec.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Operators/IOperatorSpec.cs
@@ -17,6 +17,7 @@
* under the License.
*/
+using System;
using Org.Apache.REEF.Tang.Interface;
namespace Org.Apache.REEF.Network.Group.Operators
@@ -24,8 +25,12 @@ namespace Org.Apache.REEF.Network.Group.Operators
/// <summary>
/// The specification used to define Broadcast Operators.
/// </summary>
+ // TODO[REEF-842] Act on the obsoletes
public interface IOperatorSpec
{
+ [Obsolete("Deprecated in 0.14, please use Configuration instead.")]
IConfiguration Configiration { get; }
+
+ IConfiguration Configuration { get; }
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/BroadcastOperatorSpec.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/BroadcastOperatorSpec.cs b/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/BroadcastOperatorSpec.cs
index ea62588..c3652c9 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/BroadcastOperatorSpec.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/BroadcastOperatorSpec.cs
@@ -17,6 +17,7 @@
* under the License.
*/
+using System;
using Org.Apache.REEF.Tang.Implementations.Configuration;
using Org.Apache.REEF.Tang.Interface;
@@ -25,6 +26,7 @@ namespace Org.Apache.REEF.Network.Group.Operators.Impl
/// <summary>
/// The specification used to define Broadcast Operators.
/// </summary>
+ /// TODO[REEF-842] Act on the obsoletes
public class BroadcastOperatorSpec : IOperatorSpec
{
/// <summary>
@@ -35,7 +37,7 @@ namespace Org.Apache.REEF.Network.Group.Operators.Impl
public BroadcastOperatorSpec(string senderId, params IConfiguration[] configurations)
{
SenderId = senderId;
- Configiration = Configurations.Merge(configurations);
+ Configuration = Configurations.Merge(configurations);
}
/// <summary>
@@ -46,6 +48,15 @@ namespace Org.Apache.REEF.Network.Group.Operators.Impl
/// <summary>
/// Returns the Configuration for Codec, ReduceFunction and DataConverter
/// </summary>
- public IConfiguration Configiration { get; private set; }
+ [Obsolete("Deprecated in 0.14, please use Configuration instead.")]
+ public IConfiguration Configiration
+ {
+ get { return Configuration; }
+ private set { Configuration = value; }
+ }
+ /// <summary>
+ /// Returns the Configuration for Codec, ReduceFunction and DataConverter
+ /// </summary>
+ public IConfiguration Configuration { get; private set; }
}
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ReduceOperatorSpec.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ReduceOperatorSpec.cs b/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ReduceOperatorSpec.cs
index 016455f..5383b7d 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ReduceOperatorSpec.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ReduceOperatorSpec.cs
@@ -29,6 +29,7 @@ namespace Org.Apache.REEF.Network.Group.Operators.Impl
/// <summary>
/// The specification used to define Reduce Group Communication Operators.
/// </summary>
+ /// TODO[REEF-842] Act on the obsoletes
public class ReduceOperatorSpec : IOperatorSpec
{
/// <summary>
@@ -41,7 +42,7 @@ namespace Org.Apache.REEF.Network.Group.Operators.Impl
params IConfiguration[] configurations)
{
ReceiverId = receiverId;
- Configiration = Configurations.Merge(configurations);
+ Configuration = Configurations.Merge(configurations);
}
/// <summary>
@@ -53,6 +54,15 @@ namespace Org.Apache.REEF.Network.Group.Operators.Impl
/// <summary>
/// Returns the Configuration for Codec, ReduceFunction and DataConverter
/// </summary>
- public IConfiguration Configiration { get; private set; }
+ [Obsolete("Deprecated in 0.14, please use Configuration instead.")]
+ public IConfiguration Configiration {
+ get { return Configuration; }
+ private set { Configuration = value; }
+ }
+
+ /// <summary>
+ /// Returns the Configuration for Codec, ReduceFunction and DataConverter
+ /// </summary>
+ public IConfiguration Configuration { get; private set; }
}
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ScatterOperatorSpec.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ScatterOperatorSpec.cs b/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ScatterOperatorSpec.cs
index 4c74483..f2eb94e 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ScatterOperatorSpec.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ScatterOperatorSpec.cs
@@ -17,6 +17,7 @@
* under the License.
*/
+using System;
using Org.Apache.REEF.Tang.Implementations.Configuration;
using Org.Apache.REEF.Tang.Interface;
@@ -25,6 +26,7 @@ namespace Org.Apache.REEF.Network.Group.Operators.Impl
/// <summary>
/// The specification used to define Scatter Group Communication Operators.
/// </summary>
+ /// TODO[REEF-842] Act on the obsoletes
public class ScatterOperatorSpec : IOperatorSpec
{
/// <summary>
@@ -35,7 +37,7 @@ namespace Org.Apache.REEF.Network.Group.Operators.Impl
public ScatterOperatorSpec(string senderId, params IConfiguration[] configurations)
{
SenderId = senderId;
- Configiration = Configurations.Merge(configurations);
+ Configuration = Configurations.Merge(configurations);
}
/// <summary>
@@ -47,6 +49,16 @@ namespace Org.Apache.REEF.Network.Group.Operators.Impl
/// <summary>
/// Returns the Configuration for Codec, ReduceFunction and DataConverter
/// </summary>
- public IConfiguration Configiration { get; private set; }
+ [Obsolete("Deprecated in 0.14, please use Configuration instead.")]
+ public IConfiguration Configiration
+ {
+ get { return Configuration; }
+ private set { Configuration = value; }
+ }
+
+ /// <summary>
+ /// Returns the Configuration for Codec, ReduceFunction and DataConverter
+ /// </summary>
+ public IConfiguration Configuration { get; private set; }
}
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Network/Group/Task/ICommunicationGroupClientInternal.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Task/ICommunicationGroupClientInternal.cs b/lang/cs/Org.Apache.REEF.Network/Group/Task/ICommunicationGroupClientInternal.cs
index e112254..f2b3681 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Task/ICommunicationGroupClientInternal.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Task/ICommunicationGroupClientInternal.cs
@@ -22,7 +22,7 @@ namespace Org.Apache.REEF.Network.Group.Task
internal interface ICommunicationGroupClientInternal : ICommunicationGroupClient
{
/// <summary>
- /// Call each Operator to easure all the nodes in the topology group has been registered
+ /// Call each Operator to ensure all the nodes in the topology group has been registered
/// </summary>
void WaitingForRegistration();
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/CommunicationGroupClient.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/CommunicationGroupClient.cs b/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/CommunicationGroupClient.cs
index cf3e559..a5fa1da 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/CommunicationGroupClient.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/CommunicationGroupClient.cs
@@ -178,7 +178,7 @@ namespace Org.Apache.REEF.Network.Group.Task.Impl
}
/// <summary>
- /// Call each Operator to easure all the nodes in the topology group has been registered
+ /// Call each Operator to ensure all the nodes in the topology group has been registered
/// </summary>
void ICommunicationGroupClientInternal.WaitingForRegistration()
{
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Network/Group/Topology/FlatTopology.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Topology/FlatTopology.cs b/lang/cs/Org.Apache.REEF.Network/Group/Topology/FlatTopology.cs
index b182a39..d12af8f 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Topology/FlatTopology.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Topology/FlatTopology.cs
@@ -149,7 +149,7 @@ namespace Org.Apache.REEF.Network.Group.Topology
throw new NotSupportedException("Spec type not supported");
}
- return Configurations.Merge(confBuilder.Build(), OperatorSpec.Configiration);
+ return Configurations.Merge(confBuilder.Build(), OperatorSpec.Configuration);
}
private static void SetMessageType(Type operatorType, ICsConfigurationBuilder confBuilder)
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Network/Group/Topology/TreeTopology.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Topology/TreeTopology.cs b/lang/cs/Org.Apache.REEF.Network/Group/Topology/TreeTopology.cs
index 3e76b64..56ab033 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Topology/TreeTopology.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Topology/TreeTopology.cs
@@ -52,7 +52,7 @@ namespace Org.Apache.REEF.Network.Group.Topology
/// <param name="rootId">The root Task identifier</param>
/// <param name="driverId">The driver identifier</param>
/// <param name="operatorSpec">The operator specification</param>
- /// <param name="fanOut">The number of chldren for a tree node</param>
+ /// <param name="fanOut">The number of children for a tree node</param>
public TreeTopology(
string operatorName,
string groupName,
@@ -164,7 +164,7 @@ namespace Org.Apache.REEF.Network.Group.Topology
throw new NotSupportedException("Spec type not supported");
}
- return Configurations.Merge(confBuilder.Build(), OperatorSpec.Configiration);
+ return Configurations.Merge(confBuilder.Build(), OperatorSpec.Configuration);
}
public void AddTask(string taskId)
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Network/Naming/NameClient.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Naming/NameClient.cs b/lang/cs/Org.Apache.REEF.Network/Naming/NameClient.cs
index 27351be..226e145 100644
--- a/lang/cs/Org.Apache.REEF.Network/Naming/NameClient.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Naming/NameClient.cs
@@ -184,7 +184,7 @@ namespace Org.Apache.REEF.Network.Naming
/// Do not use cache
/// </summary>
/// <param name="ids">The list of identifiers to look up</param>
- /// <returns>The list of NameAssignments representing a pair of identifer
+ /// <returns>The list of NameAssignments representing a pair of identifier
/// and mapped IPEndpoint for that identifier. If any of the requested identifiers
/// are not registered with the NameService, their corresponding NameAssignment
/// IPEndpoint value will be null.</returns>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Network/Naming/NameLookupClient.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Naming/NameLookupClient.cs b/lang/cs/Org.Apache.REEF.Network/Naming/NameLookupClient.cs
index 013aec8..211967f 100644
--- a/lang/cs/Org.Apache.REEF.Network/Naming/NameLookupClient.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Naming/NameLookupClient.cs
@@ -60,7 +60,7 @@ namespace Org.Apache.REEF.Network.Naming
/// </summary>
/// <param name="id">The id for the IPEndPoint</param>
/// <param name="token">The cancellation token used for timeout</param>
- /// <returns>The registered IPEndpoint, or null if the identifer has not
+ /// <returns>The registered IPEndpoint, or null if the identifier has not
/// been registered with the NameServer or if the operation times out.</returns>
public IPEndPoint Lookup(string id, CancellationToken token)
{
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/8b7189bd/lang/cs/Org.Apache.REEF.Network/Naming/NameRegisterClient.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Naming/NameRegisterClient.cs b/lang/cs/Org.Apache.REEF.Network/Naming/NameRegisterClient.cs
index 95de43c..e06b587 100644
--- a/lang/cs/Org.Apache.REEF.Network/Naming/NameRegisterClient.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Naming/NameRegisterClient.cs
@@ -58,7 +58,7 @@ namespace Org.Apache.REEF.Network.Naming
/// <summary>
/// Synchronously unregisters the identifier with the NameServer.
/// </summary>
- /// <param name="id">The identifer to unregister</param>
+ /// <param name="id">The identifier to unregister</param>
public void Unregister(string id)
{
_client.Send(new NamingUnregisterRequest(id));