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/11/24 20:31:37 UTC
[5/6] incubator-reef git commit: [REEF-979] Enable
StyleCop.CSharp.SpacingRules and fix violations
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU.Examples/PipelinedBroadcastReduce/PipelinedBroadcastAndReduce.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU.Examples/PipelinedBroadcastReduce/PipelinedBroadcastAndReduce.cs b/lang/cs/Org.Apache.REEF.IMRU.Examples/PipelinedBroadcastReduce/PipelinedBroadcastAndReduce.cs
index 8dacca1..515630a 100644
--- a/lang/cs/Org.Apache.REEF.IMRU.Examples/PipelinedBroadcastReduce/PipelinedBroadcastAndReduce.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU.Examples/PipelinedBroadcastReduce/PipelinedBroadcastAndReduce.cs
@@ -49,11 +49,11 @@ namespace Org.Apache.REEF.IMRU.Examples.PipelinedBroadcastReduce
TangFactory.GetTang().NewConfigurationBuilder(IMRUUpdateConfiguration<int[], int[], int[]>.ConfigurationModule
.Set(IMRUUpdateConfiguration<int[], int[], int[]>.UpdateFunction,
GenericType<BroadcastSenderReduceReceiverUpdateFunction>.Class).Build())
- .BindNamedParameter(typeof (BroadcastReduceConfiguration.NumberOfIterations),
+ .BindNamedParameter(typeof(BroadcastReduceConfiguration.NumberOfIterations),
numIterations.ToString(CultureInfo.InvariantCulture))
- .BindNamedParameter(typeof (BroadcastReduceConfiguration.Dimensions),
+ .BindNamedParameter(typeof(BroadcastReduceConfiguration.Dimensions),
dim.ToString(CultureInfo.InvariantCulture))
- .BindNamedParameter(typeof (BroadcastReduceConfiguration.NumWorkers),
+ .BindNamedParameter(typeof(BroadcastReduceConfiguration.NumWorkers),
numberofMappers.ToString(CultureInfo.InvariantCulture))
.Build();
@@ -62,7 +62,7 @@ namespace Org.Apache.REEF.IMRU.Examples.PipelinedBroadcastReduce
.NewConfigurationBuilder(IMRUPipelineDataConverterConfiguration<int[]>.ConfigurationModule
.Set(IMRUPipelineDataConverterConfiguration<int[]>.MapInputPiplelineDataConverter,
GenericType<PipelineIntDataConverter>.Class).Build())
- .BindNamedParameter(typeof (BroadcastReduceConfiguration.ChunkSize),
+ .BindNamedParameter(typeof(BroadcastReduceConfiguration.ChunkSize),
chunkSize.ToString(CultureInfo.InvariantCulture))
.Build();
@@ -71,7 +71,7 @@ namespace Org.Apache.REEF.IMRU.Examples.PipelinedBroadcastReduce
.NewConfigurationBuilder(IMRUPipelineDataConverterConfiguration<int[]>.ConfigurationModule
.Set(IMRUPipelineDataConverterConfiguration<int[]>.MapInputPiplelineDataConverter,
GenericType<PipelineIntDataConverter>.Class).Build())
- .BindNamedParameter(typeof (BroadcastReduceConfiguration.ChunkSize),
+ .BindNamedParameter(typeof(BroadcastReduceConfiguration.ChunkSize),
chunkSize.ToString(CultureInfo.InvariantCulture))
.Build();
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU.Tests/MapInputWithControlMessageTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU.Tests/MapInputWithControlMessageTests.cs b/lang/cs/Org.Apache.REEF.IMRU.Tests/MapInputWithControlMessageTests.cs
index cf7d9e1..29e1259 100644
--- a/lang/cs/Org.Apache.REEF.IMRU.Tests/MapInputWithControlMessageTests.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU.Tests/MapInputWithControlMessageTests.cs
@@ -51,7 +51,7 @@ namespace Org.Apache.REEF.IMRU.Tests
[TestMethod]
public void TestMapInputWithControlMessageCodec()
{
- float[] baseMessage = {0, 1};
+ float[] baseMessage = { 0, 1 };
var config = TangFactory.GetTang().NewConfigurationBuilder()
.BindImplementation(GenericType<IStreamingCodec<float[]>>.Class,
@@ -101,7 +101,7 @@ namespace Org.Apache.REEF.IMRU.Tests
.NewInjector(config)
.GetInstance<MapInputwithControlMessagePipelineDataConverter<int[]>>();
- int[] baseMessage = {1, 2, 3};
+ int[] baseMessage = { 1, 2, 3 };
var chunks1 = dataConverter.PipelineMessage(new MapInputWithControlMessage<int[]>(baseMessage,
MapControlMessage.AnotherRound));
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU.Tests/MapperCountTest.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU.Tests/MapperCountTest.cs b/lang/cs/Org.Apache.REEF.IMRU.Tests/MapperCountTest.cs
index 9599c1d..a676b18 100644
--- a/lang/cs/Org.Apache.REEF.IMRU.Tests/MapperCountTest.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU.Tests/MapperCountTest.cs
@@ -43,8 +43,7 @@ namespace Org.Apache.REEF.IMRU.Tests
.NewInjector(
InProcessIMRUConfiguration.ConfigurationModule
.Set(InProcessIMRUConfiguration.NumberOfMappers, NumberOfMappers.ToString())
- .Build()
- )
+ .Build())
.GetInstance<MapperCount>();
var result = tested.Run(NumberOfMappers, "", TangFactory.GetTang().NewConfigurationBuilder().Build());
Assert.AreEqual(NumberOfMappers, result, "The result of the run should be the number of Mappers.");
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU.Tests/Org.Apache.REEF.IMRU.Tests.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU.Tests/Org.Apache.REEF.IMRU.Tests.csproj b/lang/cs/Org.Apache.REEF.IMRU.Tests/Org.Apache.REEF.IMRU.Tests.csproj
index 64974c8..25c6118 100644
--- a/lang/cs/Org.Apache.REEF.IMRU.Tests/Org.Apache.REEF.IMRU.Tests.csproj
+++ b/lang/cs/Org.Apache.REEF.IMRU.Tests/Org.Apache.REEF.IMRU.Tests.csproj
@@ -96,6 +96,7 @@ under the License.
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+ <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
@@ -104,4 +105,4 @@ under the License.
<Error Condition="!Exists('$(PackagesDir)\xunit.core.2.1.0\build\portable-net45+win8+wp8+wpa81\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesDir)\xunit.core.2.1.0\build\portable-net45+win8+wp8+wpa81\xunit.core.props'))" />
<Error Condition="!Exists('$(PackagesDir)\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesDir)\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props'))" />
</Target>
-</Project>
\ No newline at end of file
+</Project>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/API/IMRUJobDefinitionBuilder.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/API/IMRUJobDefinitionBuilder.cs b/lang/cs/Org.Apache.REEF.IMRU/API/IMRUJobDefinitionBuilder.cs
index c55877a..018a8fd 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/API/IMRUJobDefinitionBuilder.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/API/IMRUJobDefinitionBuilder.cs
@@ -36,7 +36,7 @@ namespace Org.Apache.REEF.IMRU.API
/// <seealso cref="IMRUJobDefinition" />
public sealed class IMRUJobDefinitionBuilder
{
- private static readonly Logger Logger = Logger.GetLogger(typeof (IMRUJobDefinitionBuilder));
+ private static readonly Logger Logger = Logger.GetLogger(typeof(IMRUJobDefinitionBuilder));
private string _jobName;
private int _numberOfMappers;
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/InProcess/IMRURunner.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/InProcess/IMRURunner.cs b/lang/cs/Org.Apache.REEF.IMRU/InProcess/IMRURunner.cs
index a08e3d6..d7ca55d 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/InProcess/IMRURunner.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/InProcess/IMRURunner.cs
@@ -74,8 +74,8 @@ namespace Org.Apache.REEF.IMRU.InProcess
foreach (var mapfunc in _mapfunctions)
{
- //We create a copy by doing coding and decoding since the map task might
- //reuse the fields in next iteration and meanwhile update task might update it.
+ // We create a copy by doing coding and decoding since the map task might
+ // reuse the fields in next iteration and meanwhile update task might update it.
using (MemoryStream mapInputStream = new MemoryStream(), mapOutputStream = new MemoryStream())
{
var mapInputWriter = new StreamDataWriter(mapInputStream);
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/InProcess/InProcessIMRUClient.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/InProcess/InProcessIMRUClient.cs b/lang/cs/Org.Apache.REEF.IMRU/InProcess/InProcessIMRUClient.cs
index 54aa4a1..844c00a 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/InProcess/InProcessIMRUClient.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/InProcess/InProcessIMRUClient.cs
@@ -89,7 +89,7 @@ namespace Org.Apache.REEF.IMRU.InProcess
var injector = TangFactory.GetTang().NewInjector(mergedConfig);
ISet<IPerMapperConfigGenerator> perMapConfigGenerators =
- (ISet<IPerMapperConfigGenerator>) injector.GetNamedInstance(typeof (PerMapConfigGeneratorSet));
+ (ISet<IPerMapperConfigGenerator>)injector.GetNamedInstance(typeof(PerMapConfigGeneratorSet));
injector.BindVolatileInstance(GenericType<MapFunctions<TMapInput, TMapOutput>>.Class,
MakeMapFunctions<TMapInput, TMapOutput>(jobDefinition.MapFunctionConfiguration,
@@ -122,7 +122,7 @@ namespace Org.Apache.REEF.IMRU.InProcess
ISet<IMapFunction<TMapInput, TMapOutput>> mappers = new HashSet<IMapFunction<TMapInput, TMapOutput>>();
int counter = 0;
- foreach(var descriptor in dataset )
+ foreach (var descriptor in dataset)
{
var emptyConfig = TangFactory.GetTang().NewConfigurationBuilder().Build();
IConfiguration perMapConfig = perMapConfigGenerators.Aggregate(emptyConfig,
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Client/REEFIMRUClient.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Client/REEFIMRUClient.cs b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Client/REEFIMRUClient.cs
index adbcea3..6201d89 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Client/REEFIMRUClient.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Client/REEFIMRUClient.cs
@@ -46,7 +46,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Client
/// </summary>
internal sealed class REEFIMRUClient : IIMRUClient
{
- private static readonly Logger Logger = Logger.GetLogger(typeof (REEFIMRUClient));
+ private static readonly Logger Logger = Logger.GetLogger(typeof(REEFIMRUClient));
private readonly IREEFClient _reefClient;
private readonly JobSubmissionBuilderFactory _jobSubmissionBuilderFactory;
@@ -145,7 +145,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Client
// The JobSubmission contains the Driver configuration as well as the files needed on the Driver.
var imruJobSubmission = _jobSubmissionBuilderFactory.GetJobSubmissionBuilder()
.AddDriverConfiguration(imruDriverConfiguration)
- .AddGlobalAssemblyForType(typeof (IMRUDriver<TMapInput, TMapOutput, TResult>))
+ .AddGlobalAssemblyForType(typeof(IMRUDriver<TMapInput, TMapOutput, TResult>))
.SetJobIdentifier(jobDefinition.JobName)
.Build();
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/ConfigurationManager.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/ConfigurationManager.cs b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/ConfigurationManager.cs
index 682ee34..4045fc7 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/ConfigurationManager.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/ConfigurationManager.cs
@@ -124,7 +124,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
{
_resultHandlerConfiguration =
configurationSerializer.FromString(resultHandlerConfiguration);
- Logger.Log(Level.Verbose,"Serialized result handler is " + resultHandlerConfiguration);
+ Logger.Log(Level.Verbose, "Serialized result handler is " + resultHandlerConfiguration);
}
catch (Exception e)
{
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/IMRUDriver.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/IMRUDriver.cs b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/IMRUDriver.cs
index 8fb59b5..9eb91cf 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/IMRUDriver.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/IMRUDriver.cs
@@ -56,7 +56,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
internal sealed class IMRUDriver<TMapInput, TMapOutput, TResult> : IObserver<IDriverStarted>,
IObserver<IAllocatedEvaluator>, IObserver<IActiveContext>, IObserver<ICompletedTask>, IObserver<IFailedEvaluator>
{
- private static readonly Logger Logger = Logger.GetLogger(typeof (IMRUDriver<TMapInput, TMapOutput, TResult>));
+ private static readonly Logger Logger = Logger.GetLogger(typeof(IMRUDriver<TMapInput, TMapOutput, TResult>));
private readonly ConfigurationManager _configurationManager;
private readonly IPartitionedInputDataSet _dataSet;
@@ -83,14 +83,14 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
[Inject]
private IMRUDriver(IPartitionedInputDataSet dataSet,
- [Parameter(typeof (PerMapConfigGeneratorSet))] ISet<IPerMapperConfigGenerator> perMapperConfigs,
+ [Parameter(typeof(PerMapConfigGeneratorSet))] ISet<IPerMapperConfigGenerator> perMapperConfigs,
ConfigurationManager configurationManager,
IEvaluatorRequestor evaluatorRequestor,
- [Parameter(typeof (CoresPerMapper))] int coresPerMapper,
- [Parameter(typeof (CoresForUpdateTask))] int coresForUpdateTask,
- [Parameter(typeof (MemoryPerMapper))] int memoryPerMapper,
- [Parameter(typeof (MemoryForUpdateTask))] int memoryForUpdateTask,
- [Parameter(typeof (AllowedFailedEvaluatorsFraction))] double failedEvaluatorsFraction,
+ [Parameter(typeof(CoresPerMapper))] int coresPerMapper,
+ [Parameter(typeof(CoresForUpdateTask))] int coresForUpdateTask,
+ [Parameter(typeof(MemoryPerMapper))] int memoryPerMapper,
+ [Parameter(typeof(MemoryForUpdateTask))] int memoryForUpdateTask,
+ [Parameter(typeof(AllowedFailedEvaluatorsFraction))] double failedEvaluatorsFraction,
[Parameter(typeof(InvokeGC))] bool invokeGC,
IGroupCommDriver groupCommDriver)
{
@@ -104,7 +104,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
_memoryForUpdateTask = memoryForUpdateTask;
_perMapperConfigs = perMapperConfigs;
_completedTasks = new ConcurrentBag<ICompletedTask>();
- _allowedFailedEvaluators = (int) (failedEvaluatorsFraction*dataSet.Count);
+ _allowedFailedEvaluators = (int)(failedEvaluatorsFraction * dataSet.Count);
_invokeGC = invokeGC;
AddGroupCommunicationOperators();
@@ -130,7 +130,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
public void OnNext(IDriverStarted value)
{
RequestUpdateEvaluator();
- //TODO[REEF-598]: Set a timeout for this request to be satisfied. If it is not within that time, exit the Driver.
+ // TODO[REEF-598]: Set a timeout for this request to be satisfied. If it is not within that time, exit the Driver.
}
/// <summary>
@@ -171,7 +171,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
_configurationManager.UpdateFunctionConfiguration,
_configurationManager.ResultHandlerConfiguration
})
- .BindNamedParameter(typeof (InvokeGC), _invokeGC.ToString())
+ .BindNamedParameter(typeof(InvokeGC), _invokeGC.ToString())
.Build();
try
@@ -180,7 +180,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
.NewInjector(partialTaskConf, _configurationManager.UpdateFunctionCodecsConfiguration)
.GetInstance<IIMRUResultHandler<TResult>>();
}
- catch(InjectionException)
+ catch (InjectionException)
{
partialTaskConf = TangFactory.GetTang().NewConfigurationBuilder(partialTaskConf)
.BindImplementation(GenericType<IIMRUResultHandler<TResult>>.Class,
@@ -227,7 +227,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
_configurationManager.MapFunctionConfiguration,
mapSpecificConfig
})
- .BindNamedParameter(typeof (InvokeGC), _invokeGC.ToString())
+ .BindNamedParameter(typeof(InvokeGC), _invokeGC.ToString())
.Build();
_commGroup.AddTask(taskId);
@@ -274,8 +274,8 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
_serviceAndContextConfigurationProvider.EvaluatorFailed(value.Id);
- //If active context stage is reached for Update Task then assume that failed
- //evaluator belongs to mapper
+ // if active context stage is reached for Update Task then assume that failed
+ // evaluator belongs to mapper
if (_reachedUpdateTaskActiveContext)
{
RequestMapEvaluators(1);
@@ -292,7 +292,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
/// <param name="error">Kind of exception</param>
public void OnError(Exception error)
{
- Logger.Log(Level.Error,"Cannot currently handle the Exception in OnError function");
+ Logger.Log(Level.Error, "Cannot currently handle the Exception in OnError function");
throw new NotImplementedException("Cannot currently handle exception in OneError", error);
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/ServiceAndContextConfigurationProvider.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/ServiceAndContextConfigurationProvider.cs b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/ServiceAndContextConfigurationProvider.cs
index a6ef459..f06b459 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/ServiceAndContextConfigurationProvider.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/Driver/ServiceAndContextConfigurationProvider.cs
@@ -37,9 +37,9 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
/// </summary>
/// <typeparam name="TMapInput"></typeparam>
/// <typeparam name="TMapOutput"></typeparam>
- internal class ServiceAndContextConfigurationProvider<TMapInput,TMapOutput>
+ internal class ServiceAndContextConfigurationProvider<TMapInput, TMapOutput>
{
- private static readonly Logger Logger = Logger.GetLogger(typeof(ServiceAndContextConfigurationProvider<TMapInput,TMapOutput>));
+ private static readonly Logger Logger = Logger.GetLogger(typeof(ServiceAndContextConfigurationProvider<TMapInput, TMapOutput>));
private readonly Dictionary<string, ContextAndServiceConfiguration> _configurationProvider;
private readonly ISet<string> _failedEvaluators;
@@ -104,7 +104,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
Exceptions.Throw(new Exception("No more configuration can be provided"), Logger);
}
- //If some failed id exists return that configuration
+ // if some failed id exists return that configuration
if (_failedEvaluators.Count != 0)
{
string failedEvaluatorId = _failedEvaluators.First();
@@ -125,7 +125,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
Logger);
}
- //Checks whether to put update task configuration or map task configuration
+ // Checks whether to put update task configuration or map task configuration
if (_assignedPartitionDescriptors == 1)
{
_configurationProvider[evaluatorId] = GetUpdateTaskContextAndServiceConfiguration();
@@ -151,8 +151,8 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
StreamingCodecConfiguration<MapInputWithControlMessage<TMapInput>>.Codec,
GenericType<MapInputWithControlMessageCodec<TMapInput>>.Class).Build(),
StreamingCodecConfigurationMinusMessage<TMapOutput>.Conf.Build(),
- _configurationManager.MapInputCodecConfiguration
- ).Build();
+ _configurationManager.MapInputCodecConfiguration)
+ .Build();
var contextConf = _groupCommDriver.GetContextConfiguration();
var serviceConf = Configurations.Merge(_groupCommDriver.GetServiceConfiguration(), codecConfig, partitionDescriptor.GetPartitionConfiguration());
@@ -172,8 +172,8 @@ namespace Org.Apache.REEF.IMRU.OnREEF.Driver
GenericType<MapInputWithControlMessageCodec<TMapInput>>.Class).Build(),
StreamingCodecConfigurationMinusMessage<TMapOutput>.Conf.Build(),
_configurationManager.UpdateFunctionCodecsConfiguration
- }
- ).Build();
+ })
+ .Build();
var serviceConf = Configurations.Merge(_groupCommDriver.GetServiceConfiguration(), codecConfig);
return new ContextAndServiceConfiguration(_groupCommDriver.GetContextConfiguration(), serviceConf);
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/MapTaskHost.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/MapTaskHost.cs b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/MapTaskHost.cs
index 3b2b2df..35c1050 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/MapTaskHost.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/MapTaskHost.cs
@@ -53,7 +53,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.IMRUTasks
private MapTaskHost(
IMapFunction<TMapInput, TMapOutput> mapTask,
IGroupCommClient groupCommunicationsClient,
- [Parameter(typeof (InvokeGC))] bool invokeGC)
+ [Parameter(typeof(InvokeGC))] bool invokeGC)
{
_mapTask = mapTask;
var cg = groupCommunicationsClient.GetCommunicationGroup(IMRUConstants.CommunicationGroupName);
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/UpdateTaskHost.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/UpdateTaskHost.cs b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/UpdateTaskHost.cs
index ceaf8f9..7eddd26 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/UpdateTaskHost.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/UpdateTaskHost.cs
@@ -55,7 +55,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.IMRUTasks
IUpdateFunction<TMapInput, TMapOutput, TResult> updateTask,
IGroupCommClient groupCommunicationsClient,
IIMRUResultHandler<TResult> resultHandler,
- [Parameter(typeof (InvokeGC))] bool invokeGC)
+ [Parameter(typeof(InvokeGC))] bool invokeGC)
{
_updateTask = updateTask;
var cg = groupCommunicationsClient.GetCommunicationGroup(IMRUConstants.CommunicationGroupName);
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/OnREEF/MapInputWithControlMessage/MapControlMessage.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/MapInputWithControlMessage/MapControlMessage.cs b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/MapInputWithControlMessage/MapControlMessage.cs
index e0a6eb1..57e4d5f 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/MapInputWithControlMessage/MapControlMessage.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/MapInputWithControlMessage/MapControlMessage.cs
@@ -22,7 +22,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.MapInputWithControlMessage
/// </summary>
internal enum MapControlMessage
{
- AnotherRound, //Do another round of map function
- Stop //Stop
+ AnotherRound, // Do another round of map function
+ Stop // Stop
}
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/OnREEF/MapInputWithControlMessage/MapInputWithControlMessageCodec.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/MapInputWithControlMessage/MapInputWithControlMessageCodec.cs b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/MapInputWithControlMessage/MapInputWithControlMessageCodec.cs
index 644b487..3a6f384 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/MapInputWithControlMessage/MapInputWithControlMessageCodec.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/MapInputWithControlMessage/MapInputWithControlMessageCodec.cs
@@ -80,11 +80,11 @@ namespace Org.Apache.REEF.IMRU.OnREEF.MapInputWithControlMessage
switch (obj.ControlMessage)
{
case MapControlMessage.AnotherRound:
- writer.Write(new byte[] {0}, 0, 1);
+ writer.Write(new byte[] { 0 }, 0, 1);
_baseCodec.Write(obj.Message, writer);
break;
case MapControlMessage.Stop:
- writer.Write(new byte[] {1}, 0, 1);
+ writer.Write(new byte[] { 1 }, 0, 1);
break;
}
}
@@ -95,8 +95,8 @@ namespace Org.Apache.REEF.IMRU.OnREEF.MapInputWithControlMessage
/// <param name="reader">reader from which to read the message</param>
/// <param name="token">Cancellation token</param>
/// <returns>Read message</returns>
- async Task<MapInputWithControlMessage<TMapInput>> IStreamingCodec<MapInputWithControlMessage<TMapInput>>.
- ReadAsync(IDataReader reader, CancellationToken token)
+ async Task<MapInputWithControlMessage<TMapInput>> IStreamingCodec<MapInputWithControlMessage<TMapInput>>.ReadAsync(
+ IDataReader reader, CancellationToken token)
{
byte[] messageType = new byte[1];
await reader.ReadAsync(messageType, 0, 1, token);
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/OnREEF/ResultHandler/WriteResultHandler.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/ResultHandler/WriteResultHandler.cs b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/ResultHandler/WriteResultHandler.cs
index 0e1162d..e588480 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/ResultHandler/WriteResultHandler.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/ResultHandler/WriteResultHandler.cs
@@ -37,7 +37,7 @@ namespace Org.Apache.REEF.IMRU.OnREEF.ResultHandler
[Unstable("0.14", "This API will change after introducing proper API for output in REEF.IO")]
public class WriteResultHandler<TResult> : IIMRUResultHandler<TResult>
{
- private static readonly Logger Logger = Logger.GetLogger(typeof (WriteResultHandler<>));
+ private static readonly Logger Logger = Logger.GetLogger(typeof(WriteResultHandler<>));
private readonly IStreamingCodec<TResult> _resultCodec;
private readonly IFileSystem _fileSystem;
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IMRU/Org.Apache.REEF.IMRU.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/Org.Apache.REEF.IMRU.csproj b/lang/cs/Org.Apache.REEF.IMRU/Org.Apache.REEF.IMRU.csproj
index 0fc67d9..0b99dcc 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/Org.Apache.REEF.IMRU.csproj
+++ b/lang/cs/Org.Apache.REEF.IMRU/Org.Apache.REEF.IMRU.csproj
@@ -34,6 +34,7 @@ under the License.
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+ <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
@@ -141,4 +142,4 @@ under the License.
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
-</Project>
\ No newline at end of file
+</Project>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO.TestClient/HadoopFileInputPartitionTest.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO.TestClient/HadoopFileInputPartitionTest.cs b/lang/cs/Org.Apache.REEF.IO.TestClient/HadoopFileInputPartitionTest.cs
index 8066d4b..6189562 100644
--- a/lang/cs/Org.Apache.REEF.IO.TestClient/HadoopFileInputPartitionTest.cs
+++ b/lang/cs/Org.Apache.REEF.IO.TestClient/HadoopFileInputPartitionTest.cs
@@ -34,7 +34,7 @@ using Org.Apache.REEF.Utilities.Logging;
namespace Org.Apache.REEF.IO.TestClient
{
- //TODO[JIRA REEF-815]: once move to Nunit, tose test should be moved to Test project
+ // TODO[JIRA REEF-815]: once move to Nunit, tose test should be moved to Test project
internal class HadoopFileInputPartitionTest
{
private static readonly Logger Logger = Logger.GetLogger(typeof(HadoopFileInputPartitionTest));
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO.TestClient/Org.Apache.REEF.IO.TestClient.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO.TestClient/Org.Apache.REEF.IO.TestClient.csproj b/lang/cs/Org.Apache.REEF.IO.TestClient/Org.Apache.REEF.IO.TestClient.csproj
index aa0503f..7e60f30 100644
--- a/lang/cs/Org.Apache.REEF.IO.TestClient/Org.Apache.REEF.IO.TestClient.csproj
+++ b/lang/cs/Org.Apache.REEF.IO.TestClient/Org.Apache.REEF.IO.TestClient.csproj
@@ -95,6 +95,7 @@ under the License.
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
@@ -102,4 +103,4 @@ under the License.
<Target Name="AfterBuild">
</Target>
-->
-</Project>
\ No newline at end of file
+</Project>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO.TestClient/Run.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO.TestClient/Run.cs b/lang/cs/Org.Apache.REEF.IO.TestClient/Run.cs
index 3ed0e2a..d0811f4 100644
--- a/lang/cs/Org.Apache.REEF.IO.TestClient/Run.cs
+++ b/lang/cs/Org.Apache.REEF.IO.TestClient/Run.cs
@@ -22,7 +22,7 @@ using Org.Apache.REEF.Utilities.Logging;
namespace Org.Apache.REEF.IO.TestClient
{
- //TODO[JIRA REEF-815]: once move to Nunit, tose test should be moved to Test project
+ // TODO[JIRA REEF-815]: once move to Nunit, tose test should be moved to Test project
/// <summary>
/// This purpose of this test is to run tests in Yarn envionment
///
@@ -37,7 +37,7 @@ namespace Org.Apache.REEF.IO.TestClient
Assert.IsTrue(result);
}
- //the remote path name can be either full or relative, passing with the second argument
+ // the remote path name can be either full or relative, passing with the second argument
if (args.Length > 1 && args[0].Equals("c"))
{
HadoopFileSystemTest t = new HadoopFileSystemTest();
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO.Tests/Org.Apache.REEF.IO.Tests.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO.Tests/Org.Apache.REEF.IO.Tests.csproj b/lang/cs/Org.Apache.REEF.IO.Tests/Org.Apache.REEF.IO.Tests.csproj
index 048a23b..0ed61a5 100644
--- a/lang/cs/Org.Apache.REEF.IO.Tests/Org.Apache.REEF.IO.Tests.csproj
+++ b/lang/cs/Org.Apache.REEF.IO.Tests/Org.Apache.REEF.IO.Tests.csproj
@@ -109,6 +109,7 @@ under the License.
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+ <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
@@ -117,4 +118,4 @@ under the License.
<Error Condition="!Exists('$(PackagesDir)\xunit.core.2.1.0\build\portable-net45+win8+wp8+wpa81\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesDir)\xunit.core.2.1.0\build\portable-net45+win8+wp8+wpa81\xunit.core.props'))" />
<Error Condition="!Exists('$(PackagesDir)\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesDir)\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props'))" />
</Target>
-</Project>
\ No newline at end of file
+</Project>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO.Tests/TestAzureBlockBlobFileSystemE2E.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO.Tests/TestAzureBlockBlobFileSystemE2E.cs b/lang/cs/Org.Apache.REEF.IO.Tests/TestAzureBlockBlobFileSystemE2E.cs
index 79d7d94..ece4cd6 100644
--- a/lang/cs/Org.Apache.REEF.IO.Tests/TestAzureBlockBlobFileSystemE2E.cs
+++ b/lang/cs/Org.Apache.REEF.IO.Tests/TestAzureBlockBlobFileSystemE2E.cs
@@ -49,7 +49,7 @@ namespace Org.Apache.REEF.IO.Tests
.Set(AzureBlockBlobFileSystemConfiguration.ConnectionString, connectionString)
.Build();
- _fileSystem= TangFactory.GetTang().NewInjector(conf).GetInstance<AzureBlockBlobFileSystem>();
+ _fileSystem = TangFactory.GetTang().NewInjector(conf).GetInstance<AzureBlockBlobFileSystem>();
_container = CloudStorageAccount.Parse(connectionString).CreateCloudBlobClient().GetContainerReference(defaultContainerName);
_container.CreateIfNotExists();
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO.Tests/TestFilePartitionInputDataSet.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO.Tests/TestFilePartitionInputDataSet.cs b/lang/cs/Org.Apache.REEF.IO.Tests/TestFilePartitionInputDataSet.cs
index 2162719..88058a7 100644
--- a/lang/cs/Org.Apache.REEF.IO.Tests/TestFilePartitionInputDataSet.cs
+++ b/lang/cs/Org.Apache.REEF.IO.Tests/TestFilePartitionInputDataSet.cs
@@ -154,7 +154,7 @@ namespace Org.Apache.REEF.IO.Tests
MakeLocalTestFile(sourceFilePath2, new byte[] { 114, 115, 116, 117 });
var c = TangFactory.GetTang().NewConfigurationBuilder()
- .BindImplementation(GenericType<IPartitionedInputDataSet>.Class, GenericType < FileSystemPartitionInputDataSet<IEnumerable<byte>>>.Class)
+ .BindImplementation(GenericType<IPartitionedInputDataSet>.Class, GenericType<FileSystemPartitionInputDataSet<IEnumerable<byte>>>.Class)
.BindStringNamedParam<FileDeSerializerConfigString>(GetByteSerializerConfigString())
.BindSetEntry<FilePathsForInputPartitions, string>(GenericType<FilePathsForInputPartitions>.Class, sourceFilePath1)
.BindSetEntry<FilePathsForInputPartitions, string>(GenericType<FilePathsForInputPartitions>.Class, sourceFilePath2)
@@ -190,7 +190,7 @@ namespace Org.Apache.REEF.IO.Tests
[TestMethod]
public void TestWithRowDeserializer()
{
- MakeLocalTestFile(sourceFilePath1, new byte[] {111, 112, 113});
+ MakeLocalTestFile(sourceFilePath1, new byte[] { 111, 112, 113 });
MakeLocalTestFile(sourceFilePath2, new byte[] { 114, 115 });
var dataSet = TangFactory.GetTang()
@@ -250,7 +250,7 @@ namespace Org.Apache.REEF.IO.Tests
{
var serializerConf = TangFactory.GetTang().NewConfigurationBuilder()
.BindImplementation<IFileDeSerializer<IEnumerable<Row>>, RowSerializer>(
- GenericType <IFileDeSerializer<IEnumerable<Row>>>.Class,
+ GenericType<IFileDeSerializer<IEnumerable<Row>>>.Class,
GenericType<RowSerializer>.Class)
.Build();
return (new AvroConfigurationSerializer()).ToString(serializerConf);
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO.Tests/TestLocalFileSystem.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO.Tests/TestLocalFileSystem.cs b/lang/cs/Org.Apache.REEF.IO.Tests/TestLocalFileSystem.cs
index c8eb6fb..7dcbbe5 100644
--- a/lang/cs/Org.Apache.REEF.IO.Tests/TestLocalFileSystem.cs
+++ b/lang/cs/Org.Apache.REEF.IO.Tests/TestLocalFileSystem.cs
@@ -143,7 +143,7 @@ namespace Org.Apache.REEF.IO.Tests
public void TestGetChildren()
{
var fs = GetFileSystem();
- var directoryUri = new Uri(Path.Combine(Path.GetTempPath(), TempFileName)+"/");
+ var directoryUri = new Uri(Path.Combine(Path.GetTempPath(), TempFileName) + "/");
fs.CreateDirectory(directoryUri);
var fileUri = new Uri(directoryUri, "testfile");
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO.Tests/TestRandomInputDataSet.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO.Tests/TestRandomInputDataSet.cs b/lang/cs/Org.Apache.REEF.IO.Tests/TestRandomInputDataSet.cs
index 998b2ef..26f6483 100644
--- a/lang/cs/Org.Apache.REEF.IO.Tests/TestRandomInputDataSet.cs
+++ b/lang/cs/Org.Apache.REEF.IO.Tests/TestRandomInputDataSet.cs
@@ -50,7 +50,7 @@ namespace Org.Apache.REEF.IO.Tests
/// <summary>
/// The number of bytes we expect each partition's stream to return.
/// </summary>
- private const int ExpectedNumberOfBytesPerPartition = NumberOfDoublesPerPartition*BytesPerDouble;
+ private const int ExpectedNumberOfBytesPerPartition = NumberOfDoublesPerPartition * BytesPerDouble;
/// <summary>
/// Test for the driver side APIs of RandomDataSet.
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureBlockBlobFileSystem.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureBlockBlobFileSystem.cs b/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureBlockBlobFileSystem.cs
index 84845ce..20e75a8 100644
--- a/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureBlockBlobFileSystem.cs
+++ b/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureBlockBlobFileSystem.cs
@@ -124,7 +124,7 @@ namespace Org.Apache.REEF.IO.FileSystem.AzureBlob
/// </summary>
public void DeleteDirectory(Uri directoryUri)
{
- var uriSplit = directoryUri.AbsolutePath.Split(new[] {"/"}, StringSplitOptions.RemoveEmptyEntries);
+ var uriSplit = directoryUri.AbsolutePath.Split(new[] { "/" }, StringSplitOptions.RemoveEmptyEntries);
if (!uriSplit.Any())
{
throw new StorageException(string.Format("URI {0} must contain at least the container.", directoryUri));
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/RetryPolicy/DefaultAzureBlobRetryPolicy.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/RetryPolicy/DefaultAzureBlobRetryPolicy.cs b/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/RetryPolicy/DefaultAzureBlobRetryPolicy.cs
index b6fa604..77943ef 100644
--- a/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/RetryPolicy/DefaultAzureBlobRetryPolicy.cs
+++ b/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/RetryPolicy/DefaultAzureBlobRetryPolicy.cs
@@ -40,7 +40,7 @@ namespace Org.Apache.REEF.IO.FileSystem.AzureBlob.RetryPolicy
public bool ShouldRetry(int currentRetryCount, int statusCode, Exception lastException, out TimeSpan retryInterval,
OperationContext operationContext)
{
- return _retryPolicy.ShouldRetry(currentRetryCount,statusCode, lastException, out retryInterval, operationContext);
+ return _retryPolicy.ShouldRetry(currentRetryCount, statusCode, lastException, out retryInterval, operationContext);
}
}
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO/Org.Apache.REEF.IO.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO/Org.Apache.REEF.IO.csproj b/lang/cs/Org.Apache.REEF.IO/Org.Apache.REEF.IO.csproj
index 90f4f29..a67086c 100644
--- a/lang/cs/Org.Apache.REEF.IO/Org.Apache.REEF.IO.csproj
+++ b/lang/cs/Org.Apache.REEF.IO/Org.Apache.REEF.IO.csproj
@@ -31,6 +31,7 @@ under the License.
<Import Project="$(SolutionDir)\build.props" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+ <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
<ItemGroup>
<Reference Include="Microsoft.Azure.KeyVault.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>$(PackagesDir)\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll</HintPath>
@@ -140,4 +141,4 @@ under the License.
<ItemGroup>
<WCFMetadata Include="Service References\" />
</ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO/PartitionedData/FileSystem/FileSystemInputPartition.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO/PartitionedData/FileSystem/FileSystemInputPartition.cs b/lang/cs/Org.Apache.REEF.IO/PartitionedData/FileSystem/FileSystemInputPartition.cs
index d44968f..3061545 100644
--- a/lang/cs/Org.Apache.REEF.IO/PartitionedData/FileSystem/FileSystemInputPartition.cs
+++ b/lang/cs/Org.Apache.REEF.IO/PartitionedData/FileSystem/FileSystemInputPartition.cs
@@ -43,8 +43,8 @@ namespace Org.Apache.REEF.IO.PartitionedData.FileSystem
private string _localFileFolder;
[Inject]
- private FileSystemInputPartition([Parameter(typeof (PartitionId))] string id,
- [Parameter(typeof (FilePathsInInputPartition))] ISet<string> filePaths,
+ private FileSystemInputPartition([Parameter(typeof(PartitionId))] string id,
+ [Parameter(typeof(FilePathsInInputPartition))] ISet<string> filePaths,
IFileSystem fileSystem,
IFileDeSerializer<T> fileSerializer)
{
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO/PartitionedData/FileSystem/FileSystemPartitionInputDataSet.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO/PartitionedData/FileSystem/FileSystemPartitionInputDataSet.cs b/lang/cs/Org.Apache.REEF.IO/PartitionedData/FileSystem/FileSystemPartitionInputDataSet.cs
index 0abfb9a..1bfc4ac 100644
--- a/lang/cs/Org.Apache.REEF.IO/PartitionedData/FileSystem/FileSystemPartitionInputDataSet.cs
+++ b/lang/cs/Org.Apache.REEF.IO/PartitionedData/FileSystem/FileSystemPartitionInputDataSet.cs
@@ -44,7 +44,7 @@ namespace Org.Apache.REEF.IO.PartitionedData.FileSystem
{
private static readonly Logger Logger = Logger.GetLogger(typeof(FileSystemPartitionInputDataSet<T>));
private readonly Dictionary<string, IPartitionDescriptor> _partitions;
- private readonly int _count ;
+ private readonly int _count;
private const string StringSeparators = ";";
private const string IdPrefix = "FileSystemDataSet-";
private readonly string _id;
@@ -54,8 +54,7 @@ namespace Org.Apache.REEF.IO.PartitionedData.FileSystem
[Parameter(typeof(FilePathsForInputPartitions))] ISet<string> filePaths,
IFileSystem fileSystem,
[Parameter(typeof(FileDeSerializerConfigString))] string fileSerializerConfigString,
- AvroConfigurationSerializer avroConfigurationSerializer
- )
+ AvroConfigurationSerializer avroConfigurationSerializer)
{
_count = filePaths.Count;
_id = FormId(filePaths);
@@ -133,7 +132,7 @@ namespace Org.Apache.REEF.IO.PartitionedData.FileSystem
if (filePaths != null && filePaths.Count > 0)
{
var path = filePaths.First();
- var paths = path.Split(new string[] {"/", "//", "\\"}, StringSplitOptions.None);
+ var paths = path.Split(new string[] { "/", "//", "\\" }, StringSplitOptions.None);
if (paths.Length > 0)
{
id = paths[paths.Length - 1];
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.IO/PartitionedData/Random/RandomInputPartition.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO/PartitionedData/Random/RandomInputPartition.cs b/lang/cs/Org.Apache.REEF.IO/PartitionedData/Random/RandomInputPartition.cs
index 887ac3f..9583529 100644
--- a/lang/cs/Org.Apache.REEF.IO/PartitionedData/Random/RandomInputPartition.cs
+++ b/lang/cs/Org.Apache.REEF.IO/PartitionedData/Random/RandomInputPartition.cs
@@ -38,7 +38,7 @@ namespace Org.Apache.REEF.IO.PartitionedData.Random
[Parameter(typeof(NumberOfDoublesPerPartition))] int numberOfDoubles)
{
_id = id;
- _randomData = new byte[numberOfDoubles*8];
+ _randomData = new byte[numberOfDoubles * 8];
var random = new System.Random();
for (var i = 0; i < numberOfDoubles; ++i)
@@ -48,7 +48,7 @@ namespace Org.Apache.REEF.IO.PartitionedData.Random
Debug.Assert(randomDoubleAsBytes.Length == 8);
for (var j = 0; j < 8; ++j)
{
- var index = i*8 + j;
+ var index = i * 8 + j;
Debug.Assert(index < _randomData.Length);
_randomData[index] = randomDoubleAsBytes[j];
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network.Examples.Client/Org.Apache.REEF.Network.Examples.Client.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network.Examples.Client/Org.Apache.REEF.Network.Examples.Client.csproj b/lang/cs/Org.Apache.REEF.Network.Examples.Client/Org.Apache.REEF.Network.Examples.Client.csproj
index 1f118e2..e30f216 100644
--- a/lang/cs/Org.Apache.REEF.Network.Examples.Client/Org.Apache.REEF.Network.Examples.Client.csproj
+++ b/lang/cs/Org.Apache.REEF.Network.Examples.Client/Org.Apache.REEF.Network.Examples.Client.csproj
@@ -97,6 +97,7 @@ under the License.
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+ <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
<!--begin jar reference-->
<PropertyGroup>
<AfterBuildDependsOn>
@@ -113,4 +114,4 @@ under the License.
<Target Name="AfterBuild">
</Target>
-->
-</Project>
\ No newline at end of file
+</Project>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/BroadcastReduceDriverAndTasks/MasterTask.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/BroadcastReduceDriverAndTasks/MasterTask.cs b/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/BroadcastReduceDriverAndTasks/MasterTask.cs
index 02fc403..3172265 100644
--- a/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/BroadcastReduceDriverAndTasks/MasterTask.cs
+++ b/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/BroadcastReduceDriverAndTasks/MasterTask.cs
@@ -91,8 +91,8 @@ namespace Org.Apache.REEF.Network.Examples.GroupCommunication.BroadcastReduceDri
{
Logger.Log(Level.Info,
string.Format("Average time (milliseconds) taken for broadcast: {0} and reduce: {1}",
- broadcastTime.ElapsedMilliseconds/((double) (i - 1)),
- reduceTime.ElapsedMilliseconds/((double) (i - 1))));
+ broadcastTime.ElapsedMilliseconds / ((double)(i - 1)),
+ reduceTime.ElapsedMilliseconds / ((double)(i - 1))));
}
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/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 6e5ef7b..632425b 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
@@ -269,20 +269,20 @@ namespace Org.Apache.REEF.Network.Examples.GroupCommunication.PipelineBroadcastR
public byte[] Encode(int[] obj)
{
- var result = new byte[sizeof (Int32)*obj.Length];
+ var result = new byte[sizeof(Int32) * obj.Length];
Buffer.BlockCopy(obj, 0, result, 0, result.Length);
return result;
}
public int[] Decode(byte[] data)
{
- if (data.Length%sizeof (Int32) != 0)
+ if (data.Length % sizeof(Int32) != 0)
{
throw new Exception(
"error inside integer array decoder, byte array length not a multiple of integer size");
}
- var result = new int[data.Length/sizeof (Int32)];
+ var result = new int[data.Length / sizeof(Int32)];
Buffer.BlockCopy(data, 0, result, 0, data.Length);
return result;
}
@@ -301,9 +301,9 @@ namespace Org.Apache.REEF.Network.Examples.GroupCommunication.PipelineBroadcastR
public List<PipelineMessage<int[]>> PipelineMessage(int[] message)
{
var messageList = new List<PipelineMessage<int[]>>();
- var totalChunks = message.Length/_chunkSize;
+ var totalChunks = message.Length / _chunkSize;
- if (message.Length%_chunkSize != 0)
+ if (message.Length % _chunkSize != 0)
{
totalChunks++;
}
@@ -312,7 +312,7 @@ namespace Org.Apache.REEF.Network.Examples.GroupCommunication.PipelineBroadcastR
for (var i = 0; i < message.Length; i += _chunkSize)
{
var data = new int[Math.Min(_chunkSize, message.Length - i)];
- Buffer.BlockCopy(message, i*sizeof (int), data, 0, data.Length*sizeof (int));
+ Buffer.BlockCopy(message, i * sizeof(int), data, 0, data.Length * sizeof(int));
messageList.Add(counter == totalChunks - 1
? new PipelineMessage<int[]>(data, true)
@@ -332,8 +332,8 @@ namespace Org.Apache.REEF.Network.Examples.GroupCommunication.PipelineBroadcastR
foreach (var message in pipelineMessage)
{
- Buffer.BlockCopy(message.Data, 0, data, offset, message.Data.Length*sizeof (int));
- offset += message.Data.Length*sizeof (int);
+ Buffer.BlockCopy(message.Data, 0, data, offset, message.Data.Length * sizeof(int));
+ offset += message.Data.Length * sizeof(int);
}
return data;
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedMasterTask.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedMasterTask.cs b/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedMasterTask.cs
index 2259cdb..a4a7780 100644
--- a/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedMasterTask.cs
+++ b/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedMasterTask.cs
@@ -93,9 +93,9 @@ namespace Org.Apache.REEF.Network.Examples.GroupCommunication.PipelineBroadcastR
Logger.Log(Level.Info, "Received sum: {0} on iteration: {1} with array length: {2}", sum[0], i,
sum.Length);
- int expected = TriangleNumber(i)*_numReduceSenders;
+ int expected = TriangleNumber(i) * _numReduceSenders;
- if (sum[0] != TriangleNumber(i)*_numReduceSenders)
+ if (sum[0] != TriangleNumber(i) * _numReduceSenders)
{
throw new Exception("Expected " + expected + " but got " + sum[0]);
}
@@ -104,8 +104,8 @@ namespace Org.Apache.REEF.Network.Examples.GroupCommunication.PipelineBroadcastR
{
Logger.Log(Level.Info,
string.Format("Average time (milliseconds) taken for broadcast: {0} and reduce: {1}",
- broadcastTime.ElapsedMilliseconds/((double) (i - 1)),
- reduceTime.ElapsedMilliseconds/((double) (i - 1))));
+ broadcastTime.ElapsedMilliseconds / ((double)(i - 1)),
+ reduceTime.ElapsedMilliseconds / ((double)(i - 1))));
}
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedSlaveTask.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedSlaveTask.cs b/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedSlaveTask.cs
index 5ec77bb..84cd3ec 100644
--- a/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedSlaveTask.cs
+++ b/lang/cs/Org.Apache.REEF.Network.Examples/GroupCommunication/PipelineBroadcastReduceDriverAndTasks/PipelinedSlaveTask.cs
@@ -96,8 +96,8 @@ namespace Org.Apache.REEF.Network.Examples.GroupCommunication.PipelineBroadcastR
{
Logger.Log(Level.Info,
string.Format("Average time (milliseconds) taken for broadcast: {0} and reduce: {1}",
- broadcastTime.ElapsedMilliseconds/((double) i),
- reduceTime.ElapsedMilliseconds/((double) i)));
+ broadcastTime.ElapsedMilliseconds / ((double)i),
+ reduceTime.ElapsedMilliseconds / ((double)i)));
}
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network.Examples/Org.Apache.REEF.Network.Examples.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network.Examples/Org.Apache.REEF.Network.Examples.csproj b/lang/cs/Org.Apache.REEF.Network.Examples/Org.Apache.REEF.Network.Examples.csproj
index 6914923..f783858 100644
--- a/lang/cs/Org.Apache.REEF.Network.Examples/Org.Apache.REEF.Network.Examples.csproj
+++ b/lang/cs/Org.Apache.REEF.Network.Examples/Org.Apache.REEF.Network.Examples.csproj
@@ -86,6 +86,7 @@ under the License.
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+ <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
@@ -93,4 +94,4 @@ under the License.
<Target Name="AfterBuild">
</Target>
-->
-</Project>
\ No newline at end of file
+</Project>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommuDriverTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommuDriverTests.cs b/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommuDriverTests.cs
index 3c145c7..2f8f352 100644
--- a/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommuDriverTests.cs
+++ b/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommuDriverTests.cs
@@ -48,14 +48,14 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
groupName, fanOut,
numTasks);
- //driver side to prepar for service config
+ // driver side to prepar for service config
var codecConfig = CodecConfiguration<int>.Conf
.Set(CodecConfiguration<int>.Codec, GenericType<IntCodec>.Class)
.Build();
var driverServiceConfig = groupCommunicationDriver.GetServiceConfiguration();
var serviceConfig = Configurations.Merge(driverServiceConfig, codecConfig);
- //wrap it before serializing
+ // wrap it before serializing
var wrappedSeriveConfig = TangFactory.GetTang().NewConfigurationBuilder()
.BindNamedParameter<ServicesConfigurationOptions.ServiceConfigString, string>(
GenericType<ServicesConfigurationOptions.ServiceConfigString>.Class,
@@ -63,7 +63,7 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
.Build();
var serviceConfigString = serializer.ToString(wrappedSeriveConfig);
- //the configuration string is received at Evaluator side
+ // the configuration string is received at Evaluator side
var serviceConfig2 = new ServiceConfiguration(serviceConfigString);
Assert.AreEqual(serializer.ToString(serviceConfig), serializer.ToString(serviceConfig2.TangConfig));
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/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 653d14a..f726402 100644
--- a/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommunicationTests.cs
+++ b/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommunicationTests.cs
@@ -79,10 +79,10 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
var networkServiceInjector1 = BuildNetworkServiceInjector(endpoint, handler1);
var networkServiceInjector2 = BuildNetworkServiceInjector(endpoint, handler2);
- var networkService1 = networkServiceInjector1.GetInstance<
- StreamingNetworkService<GeneralGroupCommunicationMessage>>();
- var networkService2 = networkServiceInjector2.GetInstance<
- StreamingNetworkService<GeneralGroupCommunicationMessage>>();
+ var networkService1 =
+ networkServiceInjector1.GetInstance<StreamingNetworkService<GeneralGroupCommunicationMessage>>();
+ var networkService2 =
+ networkServiceInjector2.GetInstance<StreamingNetworkService<GeneralGroupCommunicationMessage>>();
networkService1.Register(new StringIdentifier("id1"));
networkService2.Register(new StringIdentifier("id2"));
@@ -132,7 +132,7 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
var commGroups = CommGroupClients(groupName, numTasks, groupCommunicationDriver, commGroup, GetDefaultCodecConfig());
- //for master task
+ // for master task
IBroadcastSender<int> broadcastSender = commGroups[0].GetBroadcastSender<int>(broadcastOperatorName);
IReduceReceiver<int> sumReducer = commGroups[0].GetReduceReceiver<int>(reduceOperatorName);
@@ -211,7 +211,7 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
var commGroups = CommGroupClients(groupName, numTasks, groupCommunicationDriver, commGroup, codecConfig);
- //for master task
+ // for master task
IBroadcastSender<int[]> broadcastSender = commGroups[0].GetBroadcastSender<int[]>(broadcastOperatorName);
IReduceReceiver<int[]> sumReducer = commGroups[0].GetReduceReceiver<int[]>(reduceOperatorName);
@@ -280,7 +280,7 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
Assert.IsNotNull(receiver4);
List<int> data = Enumerable.Range(1, 100).ToList();
- List<string> order = new List<string> {"task4", "task3", "task2", "task1"};
+ List<string> order = new List<string> { "task4", "task3", "task2", "task1" };
sender.Send(data, order);
@@ -803,7 +803,7 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
for (int i = 0; i < numTasks; i++)
{
- //get task configuration at driver side
+ // get task configuration at driver side
string taskId = "task" + i;
IConfiguration groupCommTaskConfig = groupCommDriver.GetGroupCommTaskConfiguration(taskId);
IConfiguration mergedConf = Configurations.Merge(groupCommTaskConfig, partialConfigs[i], serviceConfig);
@@ -814,7 +814,7 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
.Build();
IInjector injector = TangFactory.GetTang().NewInjector(conf);
- //simulate injection at evaluator side
+ // simulate injection at evaluator side
IGroupCommClient groupCommClient = injector.GetInstance<IGroupCommClient>();
commGroups.Add(groupCommClient.GetCommunicationGroup(groupName));
}
@@ -825,11 +825,11 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
IPEndPoint nameServerEndpoint, IObserver<NsMessage<GeneralGroupCommunicationMessage>> handler)
{
var config = TangFactory.GetTang().NewConfigurationBuilder()
- .BindNamedParameter(typeof (NamingConfigurationOptions.NameServerAddress),
+ .BindNamedParameter(typeof(NamingConfigurationOptions.NameServerAddress),
nameServerEndpoint.Address.ToString())
- .BindNamedParameter(typeof (NamingConfigurationOptions.NameServerPort),
+ .BindNamedParameter(typeof(NamingConfigurationOptions.NameServerPort),
nameServerEndpoint.Port.ToString())
- .BindNamedParameter(typeof (NetworkServiceOptions.NetworkServicePort),
+ .BindNamedParameter(typeof(NetworkServiceOptions.NetworkServicePort),
(0).ToString(CultureInfo.InvariantCulture))
.BindImplementation(GenericType<INameClient>.Class, GenericType<NameClient>.Class)
.Build();
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommunicationTreeTopologyTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommunicationTreeTopologyTests.cs b/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommunicationTreeTopologyTests.cs
index c194bcb..29b1317 100644
--- a/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommunicationTreeTopologyTests.cs
+++ b/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/GroupCommunicationTreeTopologyTests.cs
@@ -212,7 +212,7 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
var commGroups = GroupCommunicationTests.CommGroupClients(groupName, numTasks, groupCommDriver, commGroup, GetDefaultCodecConfig());
- //for master task
+ // for master task
IBroadcastSender<int> broadcastSender = commGroups[0].GetBroadcastSender<int>(broadcastOperatorName);
IReduceReceiver<int> sumReducer = commGroups[0].GetReduceReceiver<int>(reduceOperatorName);
@@ -553,7 +553,7 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
Assert.AreEqual(1, data3[0]);
Assert.AreEqual(2, data3[1]);
- var data4= receiver4.Receive().ToArray();
+ var data4 = receiver4.Receive().ToArray();
Assert.AreEqual(3, data4[0]);
Assert.AreEqual(4, data4[1]);
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/StreamingCodecTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/StreamingCodecTests.cs b/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/StreamingCodecTests.cs
index 1757c6c..78a3efb 100644
--- a/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/StreamingCodecTests.cs
+++ b/lang/cs/Org.Apache.REEF.Network.Tests/GroupCommunication/StreamingCodecTests.cs
@@ -55,7 +55,7 @@ namespace Org.Apache.REEF.Network.Tests.GroupCommunication
CancellationToken token = new CancellationToken();
int obj = 5;
- int[] intArr = {1, 2};
+ int[] intArr = { 1, 2 };
double[] doubleArr = { 1, 2 };
float[] floatArr = { 1, 2 };
string stringObj = "hello";
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network.Tests/NetworkService/StreamingNetworkServiceTests.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network.Tests/NetworkService/StreamingNetworkServiceTests.cs b/lang/cs/Org.Apache.REEF.Network.Tests/NetworkService/StreamingNetworkServiceTests.cs
index 1e0378e..1a27945 100644
--- a/lang/cs/Org.Apache.REEF.Network.Tests/NetworkService/StreamingNetworkServiceTests.cs
+++ b/lang/cs/Org.Apache.REEF.Network.Tests/NetworkService/StreamingNetworkServiceTests.cs
@@ -190,7 +190,7 @@ namespace Org.Apache.REEF.Network.Tests.NetworkService
StreamingCodecFunctionCache<A> cache = new StreamingCodecFunctionCache<A>(injector);
var readFunc = cache.ReadFunction(typeof(B));
- var writeFunc = cache.WriteFunction(typeof (B));
+ var writeFunc = cache.WriteFunction(typeof(B));
var readAsyncFunc = cache.ReadAsyncFunction(typeof(B));
var writeAsyncFunc = cache.WriteAsyncFunction(typeof(B));
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network.Tests/Org.Apache.REEF.Network.Tests.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network.Tests/Org.Apache.REEF.Network.Tests.csproj b/lang/cs/Org.Apache.REEF.Network.Tests/Org.Apache.REEF.Network.Tests.csproj
index 123a1bf..55ce0a0 100644
--- a/lang/cs/Org.Apache.REEF.Network.Tests/Org.Apache.REEF.Network.Tests.csproj
+++ b/lang/cs/Org.Apache.REEF.Network.Tests/Org.Apache.REEF.Network.Tests.csproj
@@ -109,6 +109,7 @@ under the License.
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+ <Import Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
@@ -123,4 +124,4 @@ under the License.
<Target Name="AfterBuild">
</Target>
-->
-</Project>
\ No newline at end of file
+</Project>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/Group/Config/GroupCommConfigurationOptions.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Config/GroupCommConfigurationOptions.cs b/lang/cs/Org.Apache.REEF.Network/Group/Config/GroupCommConfigurationOptions.cs
index 84c0e85..4fe37d1 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Config/GroupCommConfigurationOptions.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Config/GroupCommConfigurationOptions.cs
@@ -83,7 +83,7 @@ namespace Org.Apache.REEF.Network.Group.Config
{
}
- [NamedParameter("with of the tree in topology", defaultValue:"2")]
+ [NamedParameter("with of the tree in topology", defaultValue: "2")]
public class FanOut : Name<int>
{
}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/Group/Driver/Impl/CommunicationGroupDriver.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Driver/Impl/CommunicationGroupDriver.cs b/lang/cs/Org.Apache.REEF.Network/Group/Driver/Impl/CommunicationGroupDriver.cs
index 001c110..9ebdf84 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Driver/Impl/CommunicationGroupDriver.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Driver/Impl/CommunicationGroupDriver.cs
@@ -40,7 +40,7 @@ namespace Org.Apache.REEF.Network.Group.Driver.Impl
/// </summary>
public sealed class CommunicationGroupDriver : ICommunicationGroupDriver
{
- private static readonly Logger LOGGER = Logger.GetLogger(typeof (CommunicationGroupDriver));
+ private static readonly Logger LOGGER = Logger.GetLogger(typeof(CommunicationGroupDriver));
private readonly string _groupName;
private readonly string _driverId;
@@ -137,7 +137,7 @@ namespace Org.Apache.REEF.Network.Group.Driver.Impl
/// <returns>The same CommunicationGroupDriver with the added Broadcast operator info</returns>
public ICommunicationGroupDriver AddBroadcast(string operatorName, string masterTaskId, TopologyTypes topologyType = TopologyTypes.Flat)
{
- return AddBroadcast<int>( operatorName, masterTaskId, topologyType, GetDefaultConfiguration());
+ return AddBroadcast<int>(operatorName, masterTaskId, topologyType, GetDefaultConfiguration());
}
/// <summary>
@@ -329,14 +329,14 @@ namespace Org.Apache.REEF.Network.Group.Driver.Impl
{
var topology = _topologies[operatorName];
MethodInfo info = topology.GetType().GetMethod("AddTask");
- info.Invoke(topology, new[] {(object) taskId});
+ info.Invoke(topology, new[] { (object)taskId });
}
private IConfiguration GetOperatorConfiguration(string operatorName, string taskId)
{
var topology = _topologies[operatorName];
MethodInfo info = topology.GetType().GetMethod("GetTaskConfiguration");
- return (IConfiguration) info.Invoke(topology, new[] {(object) taskId});
+ return (IConfiguration)info.Invoke(topology, new[] { (object)taskId });
}
private IConfiguration[] GetDefaultConfiguration()
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/Group/Driver/Impl/GroupCommunicationMessageStreamingCodec.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Driver/Impl/GroupCommunicationMessageStreamingCodec.cs b/lang/cs/Org.Apache.REEF.Network/Group/Driver/Impl/GroupCommunicationMessageStreamingCodec.cs
index d619e64..74405b5 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Driver/Impl/GroupCommunicationMessageStreamingCodec.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Driver/Impl/GroupCommunicationMessageStreamingCodec.cs
@@ -186,9 +186,9 @@ namespace Org.Apache.REEF.Network.Group.Driver.Impl
private static Tuple<string, string, string, string, int> GenerateMetaDataDecoding(byte[] obj)
{
int groupCount = BitConverter.ToInt32(obj, 0);
- int operatorCount = BitConverter.ToInt32(obj, sizeof (int));
- int srcCount = BitConverter.ToInt32(obj, 2*sizeof (int));
- int dstCount = BitConverter.ToInt32(obj, 3*sizeof (int));
+ int operatorCount = BitConverter.ToInt32(obj, sizeof(int));
+ int srcCount = BitConverter.ToInt32(obj, 2 * sizeof(int));
+ int dstCount = BitConverter.ToInt32(obj, 3 * sizeof(int));
int offset = 4 * sizeof(int);
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/BroadcastSender.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/BroadcastSender.cs b/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/BroadcastSender.cs
index 0e69808..0d379c9 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/BroadcastSender.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/BroadcastSender.cs
@@ -53,7 +53,7 @@ namespace Org.Apache.REEF.Network.Group.Operators.Impl
/// <param name="dataConverter">The converter used to convert original
/// message to pipelined ones and vice versa.</param>
[Inject]
- private BroadcastSender(
+ private BroadcastSender(
[Parameter(typeof(GroupCommConfigurationOptions.OperatorName))] string operatorName,
[Parameter(typeof(GroupCommConfigurationOptions.CommunicationGroupName))] string groupName,
[Parameter(typeof(GroupCommConfigurationOptions.Initialize))] bool initialize,
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ReduceSender.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ReduceSender.cs b/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ReduceSender.cs
index bc161f1..16f52cc 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ReduceSender.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ReduceSender.cs
@@ -124,7 +124,7 @@ namespace Org.Apache.REEF.Network.Group.Operators.Impl
{
var reducedValueOfChildren = _topology.ReceiveFromChildren(_pipelinedReduceFunc);
- var mergeddData = new List<PipelineMessage<T>> {message};
+ var mergeddData = new List<PipelineMessage<T>> { message };
if (reducedValueOfChildren != null)
{
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ScatterSender.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ScatterSender.cs b/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ScatterSender.cs
index 735d2a9..f88650f 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ScatterSender.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Operators/Impl/ScatterSender.cs
@@ -37,7 +37,7 @@ namespace Org.Apache.REEF.Network.Group.Operators.Impl
{
private const int DefaultVersion = 1;
private readonly IOperatorTopology<T> _topology;
- private readonly bool _initialize ;
+ private readonly bool _initialize;
/// <summary>
/// Creates a new ScatterSender.
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/Group/Pipelining/IPipelineDataConverter.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Pipelining/IPipelineDataConverter.cs b/lang/cs/Org.Apache.REEF.Network/Group/Pipelining/IPipelineDataConverter.cs
index f2dc551..46fc3f3 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Pipelining/IPipelineDataConverter.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Pipelining/IPipelineDataConverter.cs
@@ -30,7 +30,7 @@ namespace Org.Apache.REEF.Network.Group.Pipelining
/// amenable data and vice-versa
/// </summary>
/// <typeparam name="T">The message type</typeparam>
- //[DefaultImplementation(typeof(DefaultPipelineDataConverter<>))]
+ // [DefaultImplementation(typeof(DefaultPipelineDataConverter<>))]
public interface IPipelineDataConverter<T>
{
/// <summary>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/Group/Pipelining/StreamingPipelineMessageCodec.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Pipelining/StreamingPipelineMessageCodec.cs b/lang/cs/Org.Apache.REEF.Network/Group/Pipelining/StreamingPipelineMessageCodec.cs
index 9236e95..d1cd1d0 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Pipelining/StreamingPipelineMessageCodec.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Pipelining/StreamingPipelineMessageCodec.cs
@@ -50,7 +50,7 @@ namespace Org.Apache.REEF.Network.Group.Pipelining
/// Instantiate the class from the reader.
/// </summary>
/// <param name="reader">The reader from which to read</param>
- ///<returns>The Pipeline Message read from the reader</returns>
+ /// <returns>The Pipeline Message read from the reader</returns>
public PipelineMessage<T> Read(IDataReader reader)
{
var message = BaseCodec.Read(reader);
@@ -69,10 +69,10 @@ namespace Org.Apache.REEF.Network.Group.Pipelining
writer.WriteBoolean(obj.IsLast);
}
- /// <summary>
- /// Instantiate the class from the reader.
- /// </summary>
- /// <param name="reader">The reader from which to read</param>
+ /// <summary>
+ /// Instantiate the class from the reader.
+ /// </summary>
+ /// <param name="reader">The reader from which to read</param>
/// <param name="token">Cancellation token</param>
/// <returns>The Pipeline Message read from the reader</returns>
public async Task<PipelineMessage<T>> ReadAsync(IDataReader reader, CancellationToken token)
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/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 a5fa1da..749bb6a 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
@@ -174,7 +174,7 @@ namespace Org.Apache.REEF.Network.Group.Task.Impl
Exceptions.Throw(new ArgumentException("Operator is not added at Driver side:" + operatorName), LOGGER);
}
- return (T) op;
+ return (T)op;
}
/// <summary>
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/OperatorTopology.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/OperatorTopology.cs b/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/OperatorTopology.cs
index 8fe19d6..4ac38c4 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/OperatorTopology.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/OperatorTopology.cs
@@ -363,7 +363,7 @@ namespace Org.Apache.REEF.Network.Group.Task.Impl
/// <summary>
/// Get a set of nodes containing an incoming message and belonging to candidate set of nodes.
/// </summary>
- ///<param name="nodeSetIdentifier">Candidate set of nodes from which data is to be received</param>
+ /// <param name="nodeSetIdentifier">Candidate set of nodes from which data is to be received</param>
/// <returns>A Vector of NodeStruct with incoming data.</returns>
private IEnumerable<NodeStruct<T>> GetNodeWithData(IEnumerable<string> nodeSetIdentifier)
{
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/dd07dc3e/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 56ab033..3948dad 100644
--- a/lang/cs/Org.Apache.REEF.Network/Group/Topology/TreeTopology.cs
+++ b/lang/cs/Org.Apache.REEF.Network/Group/Topology/TreeTopology.cs
@@ -103,13 +103,13 @@ namespace Org.Apache.REEF.Network.Group.Topology
parentId = parent.TaskId;
}
- //add parentid, if no parent, add itself
+ // add parentid, if no parent, add itself
ICsConfigurationBuilder confBuilder = TangFactory.GetTang().NewConfigurationBuilder()
.BindNamedParameter<GroupCommConfigurationOptions.TopologyRootTaskId, string>(
GenericType<GroupCommConfigurationOptions.TopologyRootTaskId>.Class,
parentId);
- //add all its children
+ // add all its children
foreach (TaskNode childNode in selfTaskNode.GetChildren())
{
confBuilder.BindSetEntry<GroupCommConfigurationOptions.TopologyChildTaskIds, string>(