You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@reef.apache.org by tm...@apache.org on 2015/02/10 21:10:42 UTC
[04/19] incubator-reef git commit: [REEF-136] Harmonize namespaces
and folder names in Org.Apache.REEF projects
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/IHttpMessage.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/IHttpMessage.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/IHttpMessage.cs
deleted file mode 100644
index 155d7ab..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/IHttpMessage.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-namespace Org.Apache.REEF.Driver.Bridge
-{
- public interface IHttpMessage
- {
- string GetRequestString();
-
- void SetQueryResult(string responseString);
-
- byte[] GetQueryReuestData();
-
- void SetQueryResponseData(byte[] responseData);
-
- void SetUriSpecification(string uriSpecification);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/ReefHttpRequest.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/ReefHttpRequest.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/ReefHttpRequest.cs
deleted file mode 100644
index 97c0465..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/ReefHttpRequest.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using System.Globalization;
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- public enum HttpMethod
- {
- Post,
- Put,
- Get,
- Delete
- }
-
- public class ReefHttpRequest
- {
- public HttpMethod Method { get; set; }
-
- public string Url { get; set; }
-
- public string Querystring { get; set; }
-
- public byte[] InputStream { get; set; }
-
- public string PathInfo { get; set; }
-
- public string Tostring()
- {
- return string.Format(CultureInfo.InvariantCulture, "Url: {0}, query string {1}", Url, Querystring);
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/ReefHttpResponse.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/ReefHttpResponse.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/ReefHttpResponse.cs
deleted file mode 100644
index 73b64cc..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/ReefHttpResponse.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using System.Net;
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- public class ReefHttpResponse
- {
- public byte[] OutputStream { get; set; }
-
- public HttpStatusCode Status { get; set; }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IActiveContextClr2Java.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IActiveContextClr2Java.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IActiveContextClr2Java.cs
deleted file mode 100644
index 3a57b0a..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IActiveContextClr2Java.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Org.Apache.REEF.Driver.Evaluator;
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- public interface IActiveContextClr2Java : IClr2Java
- {
- void SubmitTask(string taskConfigStr);
-
- void Close();
-
- string GetId();
-
- string GetEvaluatorId();
-
- IEvaluatorDescriptor GetEvaluatorDescriptor();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IAllocatedEvaluaotrClr2Java.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IAllocatedEvaluaotrClr2Java.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IAllocatedEvaluaotrClr2Java.cs
deleted file mode 100644
index 9bf6c09..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IAllocatedEvaluaotrClr2Java.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Org.Apache.REEF.Driver.Evaluator;
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- public interface IAllocatedEvaluaotrClr2Java : IClr2Java
- {
- void SubmitContextAndTask(string contextConfigStr, string taskConfigStr);
-
- void SubmitContext(string contextConfigStr);
-
- void SubmitContextAndService(string contextConfigStr, string serviceConfigStr);
-
- void SubmitContextAndServiceAndTask(string contextConfigStr, string serviceConfigStr, string taskConfigStr);
-
- void Close();
-
- string GetId();
-
- string GetNameServerInfo();
-
- IEvaluatorDescriptor GetEvaluatorDescriptor();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IClosedContextClr2Java.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IClosedContextClr2Java.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IClosedContextClr2Java.cs
deleted file mode 100644
index 88b1ca2..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IClosedContextClr2Java.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Org.Apache.REEF.Driver.Evaluator;
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- public interface IClosedContextClr2Java : IClr2Java
- {
- string GetId();
-
- string GetEvaluatorId();
-
- IEvaluatorDescriptor GetEvaluatorDescriptor();
-
- IActiveContextClr2Java GetParentContext();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IClr2Java.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IClr2Java.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IClr2Java.cs
deleted file mode 100644
index ec565cd..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IClr2Java.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- public interface IClr2Java
- {
- void OnError(string message);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/ICompletedEvaluatorClr2Java.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/ICompletedEvaluatorClr2Java.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/ICompletedEvaluatorClr2Java.cs
deleted file mode 100644
index a80c2fd..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/ICompletedEvaluatorClr2Java.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- public interface ICompletedEvaluatorClr2Java : IClr2Java
- {
- /// <summary>
- /// evaluator id
- /// </summary>
- /// <returns>id of the completed evaluator</returns>
- string GetId();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/ICompletedTaskClr2Java.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/ICompletedTaskClr2Java.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/ICompletedTaskClr2Java.cs
deleted file mode 100644
index 25024b3..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/ICompletedTaskClr2Java.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- public interface ICompletedTaskClr2Java : IClr2Java
- {
- IActiveContextClr2Java GetActiveContext();
-
- string GetId();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IContextMessageClr2Java.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IContextMessageClr2Java.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IContextMessageClr2Java.cs
deleted file mode 100644
index c98f03e..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IContextMessageClr2Java.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- public interface IContextMessageClr2Java : IClr2Java
- {
- byte[] Get();
-
- string GetId();
-
- string GetMessageSourceId();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IEvaluatorRequestorClr2Java.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IEvaluatorRequestorClr2Java.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IEvaluatorRequestorClr2Java.cs
deleted file mode 100644
index 2ff1198..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IEvaluatorRequestorClr2Java.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Org.Apache.REEF.Driver.Evaluator;
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- public interface IEvaluatorRequestorClr2Java : IClr2Java
- {
- void Submit(IEvaluatorRequest evaluatorRequest);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IFailedContextClr2Java.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IFailedContextClr2Java.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IFailedContextClr2Java.cs
deleted file mode 100644
index db145aa..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IFailedContextClr2Java.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Org.Apache.REEF.Driver.Evaluator;
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- public interface IFailedContextClr2Java : IClr2Java
- {
- string GetId();
-
- string GetEvaluatorId();
-
- string GetParentId();
-
- IEvaluatorDescriptor GetEvaluatorDescriptor();
-
- IActiveContextClr2Java GetParentContext();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IFailedEvaluatorClr2Java.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IFailedEvaluatorClr2Java.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IFailedEvaluatorClr2Java.cs
deleted file mode 100644
index 2199ab3..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IFailedEvaluatorClr2Java.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Org.Apache.REEF.Driver.Bridge;
-
-namespace Org.Apache.REEF.Driver
-{
- public interface IFailedEvaluatorClr2Java
- {
- IEvaluatorRequestorClr2Java GetEvaluatorRequestor();
-
- string GetId();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IFailedTaskClr2Java.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IFailedTaskClr2Java.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IFailedTaskClr2Java.cs
deleted file mode 100644
index eb9c7a7..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IFailedTaskClr2Java.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- public interface IFailedTaskClr2Java : IClr2Java
- {
- IActiveContextClr2Java GetActiveContext();
-
- string GetString();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IHttpServerBridgeClr2Java.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IHttpServerBridgeClr2Java.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IHttpServerBridgeClr2Java.cs
deleted file mode 100644
index 816aa35..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IHttpServerBridgeClr2Java.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- public interface IHttpServerBridgeClr2Java : IClr2Java
- {
- string GetQueryString();
-
- void SetQueryResult(string queryResult);
-
- byte[] GetQueryRequestData();
-
- void SetQueryResponseData(byte[] responseData);
-
- void SetUriSpecification(string uriSpecification);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IRunningTaskClr2Java.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IRunningTaskClr2Java.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IRunningTaskClr2Java.cs
deleted file mode 100644
index 4afbf2a..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/IRunningTaskClr2Java.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- public interface IRunningTaskClr2Java : IClr2Java
- {
- IActiveContextClr2Java GetActiveContext();
-
- string GetId();
-
- void Send(byte[] message);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/ISuspendedTaskClr2Java.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/ISuspendedTaskClr2Java.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/ISuspendedTaskClr2Java.cs
deleted file mode 100644
index 612bc10..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/ISuspendedTaskClr2Java.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- public interface ISuspendedTaskClr2Java : IClr2Java
- {
- /// <summary>
- /// get active context the task is running in
- /// </summary>
- /// <returns>active context</returns>
- IActiveContextClr2Java GetActiveContext();
-
- /// <summary>
- /// get suspsended task id
- /// </summary>
- /// <returns>suspsended task id</returns>
- string GetId();
-
- /// <summary>
- /// get the message
- /// </summary>
- /// <returns>suspended task message</returns>
- byte[] Get();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/ITaskMessageClr2Java.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/ITaskMessageClr2Java.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/ITaskMessageClr2Java.cs
deleted file mode 100644
index 62ba763..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/clr2java/ITaskMessageClr2Java.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- public interface ITaskMessageClr2Java : IClr2Java
- {
- string GetId();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/events/ActiveContext.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/events/ActiveContext.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/events/ActiveContext.cs
deleted file mode 100644
index 9236141..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/events/ActiveContext.cs
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Org.Apache.REEF.Driver.Context;
-using Org.Apache.REEF.Driver.Evaluator;
-using Org.Apache.REEF.Utilities;
-using Org.Apache.REEF.Utilities.Logging;
-using Org.Apache.REEF.Tang.Formats;
-using Org.Apache.REEF.Tang.Interface;
-using System;
-using System.Runtime.Serialization;
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- [DataContract]
- internal class ActiveContext : IActiveContext
- {
- private static readonly Logger LOGGER = Logger.GetLogger(typeof(ActiveContext));
-
- private readonly AvroConfigurationSerializer _serializer;
-
- public ActiveContext(IActiveContextClr2Java clr2Java)
- {
- InstanceId = Guid.NewGuid().ToString("N");
- Clr2Java = clr2Java;
- _serializer = new AvroConfigurationSerializer();
- }
-
- [DataMember]
- public string InstanceId { get; set; }
-
- public string Id
- {
- get
- {
- return Clr2Java.GetId();
- }
-
- set
- {
- }
- }
-
- public string EvaluatorId
- {
- get
- {
- return Clr2Java.GetEvaluatorId();
- }
-
- set
- {
- }
- }
-
- public Optional<string> ParentId { get; set; }
-
- public IEvaluatorDescriptor EvaluatorDescriptor
- {
- get
- {
- return Clr2Java.GetEvaluatorDescriptor();
- }
-
- set
- {
- }
- }
-
- private IActiveContextClr2Java Clr2Java { get; set; }
-
- public void SubmitTask(IConfiguration taskConfiguration)
- {
- LOGGER.Log(Level.Info, "ActiveContext::SubmitTask");
- string task = _serializer.ToString(taskConfiguration);
- LOGGER.Log(Level.Info, "serialized taskConfiguration: " + task);
- Clr2Java.SubmitTask(task);
- }
-
- public void Dispose()
- {
- LOGGER.Log(Level.Info, "ActiveContext::Dispose");
- Clr2Java.Close();
- }
-
- public void SubmitContext(IConfiguration contextConfiguration)
- {
- throw new NotImplementedException();
- }
-
- public void SubmitContextAndService(IConfiguration contextConfiguration, IConfiguration serviceConfiguration)
- {
- throw new NotImplementedException();
- }
-
- public void SendMessage(byte[] message)
- {
- throw new NotImplementedException();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/events/AllocatedEvaluator.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/events/AllocatedEvaluator.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/events/AllocatedEvaluator.cs
deleted file mode 100644
index 10175e3..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/events/AllocatedEvaluator.cs
+++ /dev/null
@@ -1,175 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Org.Apache.REEF.Common.Catalog;
-using Org.Apache.REEF.Common.Evaluator;
-using Org.Apache.REEF.Driver.Evaluator;
-using Org.Apache.REEF.Utilities.Logging;
-using Org.Apache.REEF.Tang.Formats;
-using Org.Apache.REEF.Tang.Interface;
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Net;
-using System.Runtime.Serialization;
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- [DataContract]
- internal class AllocatedEvaluator : IAllocatedEvaluator
- {
- private static readonly Logger LOGGER = Logger.GetLogger(typeof(AllocatedEvaluator));
-
- private readonly AvroConfigurationSerializer _serializer;
-
- private IEvaluatorDescriptor _evaluatorDescriptor;
-
- public AllocatedEvaluator(IAllocatedEvaluaotrClr2Java clr2Java)
- {
- InstanceId = Guid.NewGuid().ToString("N");
- _serializer = new AvroConfigurationSerializer();
- Clr2Java = clr2Java;
- Id = Clr2Java.GetId();
- ProcessNewEvaluator();
-
- NameServerInfo = Clr2Java.GetNameServerInfo();
- }
-
- [DataMember]
- public string InstanceId { get; set; }
-
- public string Id { get; set; }
-
- public string EvaluatorBatchId { get; set; }
-
- public EvaluatorType Type { get; set; }
-
- public string NameServerInfo { get; set; }
-
- [DataMember]
- private IAllocatedEvaluaotrClr2Java Clr2Java { get; set; }
-
- public void SubmitContext(IConfiguration contextConfiguration)
- {
- LOGGER.Log(Level.Info, "AllocatedEvaluator::SubmitContext");
- string context = _serializer.ToString(contextConfiguration);
- LOGGER.Log(Level.Info, "serialized contextConfiguration: " + context);
- Clr2Java.SubmitContext(context);
- }
-
- public void SubmitContextAndTask(IConfiguration contextConfiguration, IConfiguration taskConfiguration)
- {
- LOGGER.Log(Level.Info, "AllocatedEvaluator::SubmitContextAndTask");
-
- string context = _serializer.ToString(contextConfiguration);
- string task = _serializer.ToString(taskConfiguration);
-
- LOGGER.Log(Level.Info, "serialized contextConfiguration: " + context);
- LOGGER.Log(Level.Info, "serialized taskConfiguration: " + task);
-
- Clr2Java.SubmitContextAndTask(context, task);
- }
-
- public void SubmitContextAndService(IConfiguration contextConfiguration, IConfiguration serviceConfiguration)
- {
- LOGGER.Log(Level.Info, "AllocatedEvaluator::SubmitContextAndService");
-
- string context = _serializer.ToString(contextConfiguration);
- string service = _serializer.ToString(serviceConfiguration);
-
- LOGGER.Log(Level.Info, "serialized contextConfiguration: " + context);
- LOGGER.Log(Level.Info, "serialized serviceConfiguration: " + service);
-
- Clr2Java.SubmitContextAndService(context, service);
- }
-
- public void SubmitContextAndServiceAndTask(IConfiguration contextConfiguration, IConfiguration serviceConfiguration, IConfiguration taskConfiguration)
- {
- LOGGER.Log(Level.Info, "AllocatedEvaluator::SubmitContextAndServiceAndTask");
-
- string context = _serializer.ToString(contextConfiguration);
- string service = _serializer.ToString(serviceConfiguration);
- string task = _serializer.ToString(taskConfiguration);
-
- LOGGER.Log(Level.Info, "serialized contextConfiguration: " + context);
- LOGGER.Log(Level.Info, "serialized serviceConfiguration: " + service);
- LOGGER.Log(Level.Info, "serialized taskConfiguration: " + task);
-
- Clr2Java.SubmitContextAndServiceAndTask(context, service, task);
- }
-
- public IEvaluatorDescriptor GetEvaluatorDescriptor()
- {
- return _evaluatorDescriptor;
- }
-
- public void Dispose()
- {
- Clr2Java.Close();
- }
-
- public INodeDescriptor GetNodeDescriptor()
- {
- throw new NotImplementedException();
- }
-
- public void AddFile(string file)
- {
- throw new NotImplementedException();
- }
-
- public void AddLibrary(string file)
- {
- throw new NotImplementedException();
- }
-
- public void AddFileResource(string file)
- {
- throw new NotImplementedException();
- }
-
- private void ProcessNewEvaluator()
- {
- _evaluatorDescriptor = Clr2Java.GetEvaluatorDescriptor();
- lock (EvaluatorRequestor.Evaluators)
- {
- foreach (KeyValuePair<string, IEvaluatorDescriptor> pair in EvaluatorRequestor.Evaluators)
- {
- if (pair.Value.Equals(_evaluatorDescriptor))
- {
- string key = pair.Key;
- EvaluatorRequestor.Evaluators.Remove(key);
- string assignedId = key.Substring(0, key.LastIndexOf('_'));
- string message = string.Format(
- CultureInfo.InvariantCulture,
- "Received evalautor [{0}] of memory {1}MB that matches request of {2}MB with batch id [{3}].",
- Id,
- _evaluatorDescriptor.Memory,
- pair.Value.Memory,
- assignedId);
-
- LOGGER.Log(Level.Verbose, message);
- EvaluatorBatchId = assignedId;
- break;
- }
- }
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/events/ClosedContext.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/events/ClosedContext.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/events/ClosedContext.cs
deleted file mode 100644
index 9ea7d41..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/events/ClosedContext.cs
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Org.Apache.REEF.Driver.Context;
-using Org.Apache.REEF.Driver.Evaluator;
-using Org.Apache.REEF.Utilities;
-using System;
-using System.Runtime.Serialization;
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- public class ClosedContext : IClosedContext
- {
- private string _id;
-
- private string _evaluatorId;
-
- public ClosedContext(IClosedContextClr2Java clr2java)
- {
- InstanceId = Guid.NewGuid().ToString("N");
- _id = clr2java.GetId();
- _evaluatorId = clr2java.GetEvaluatorId();
- }
-
- [DataMember]
- public string InstanceId { get; set; }
-
- public string Id
- {
- get
- {
- return _id;
- }
-
- set
- {
- }
- }
-
- public string EvaluatorId
- {
- get
- {
- return _evaluatorId;
- }
-
- set
- {
- }
- }
-
- public Optional<string> ParentId { get; set; }
-
- public IEvaluatorDescriptor EvaluatorDescriptor
- {
- get
- {
- return ClosedContextClr2JavaClr2Java.GetEvaluatorDescriptor();
- }
-
- set
- {
- }
- }
-
- public IActiveContext ParentContext
- {
- get
- {
- return new ActiveContext(ParentContextClr2Java);
- }
-
- set
- {
- }
- }
-
- private IActiveContextClr2Java ParentContextClr2Java { get; set; }
-
- private IClosedContextClr2Java ClosedContextClr2JavaClr2Java { get; set; }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/events/CompletedEvaluator.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/events/CompletedEvaluator.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/events/CompletedEvaluator.cs
deleted file mode 100644
index 7c8866d..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/events/CompletedEvaluator.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Org.Apache.REEF.Driver.Evaluator;
-using System;
-using System.Runtime.Serialization;
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- [DataContract]
- internal class CompletedEvaluator : ICompletedEvaluator
- {
- private string _instanceId;
-
- public CompletedEvaluator(ICompletedEvaluatorClr2Java clr2Java)
- {
- _instanceId = Guid.NewGuid().ToString("N");
- CompletedEvaluatorClr2Java = clr2Java;
- }
-
- [DataMember]
- public string InstanceId
- {
- get { return _instanceId; }
- set { _instanceId = value; }
- }
-
- [DataMember]
- public string Id
- {
- get
- {
- return CompletedEvaluatorClr2Java.GetId();
- }
-
- set
- {
- }
- }
-
- [DataMember]
- public ICompletedEvaluatorClr2Java CompletedEvaluatorClr2Java { get; set; }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/events/CompletedTask.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/events/CompletedTask.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/events/CompletedTask.cs
deleted file mode 100644
index c9cf19f..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/events/CompletedTask.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Org.Apache.REEF.Driver.Context;
-using Org.Apache.REEF.Driver.Task;
-using Org.Apache.REEF.Utilities.Logging;
-using System;
-using System.Runtime.Serialization;
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- [DataContract]
- internal class CompletedTask : ICompletedTask
- {
- private static readonly Logger LOGGER = Logger.GetLogger(typeof(CompletedTask));
-
- internal CompletedTask(ICompletedTaskClr2Java completedTaskClr2Java)
- {
- InstanceId = Guid.NewGuid().ToString("N");
- CompletedTaskClr2Java = completedTaskClr2Java;
- ActiveContextClr2Java = completedTaskClr2Java.GetActiveContext();
- }
-
- [DataMember]
- public string InstanceId { get; set; }
-
- public byte[] Message { get; set; }
-
- public string Id
- {
- get
- {
- return CompletedTaskClr2Java.GetId();
- }
-
- set
- {
- }
- }
-
- public IActiveContext ActiveContext
- {
- get
- {
- return new ActiveContext(ActiveContextClr2Java);
- }
-
- set
- {
- }
- }
-
- [DataMember]
- private ICompletedTaskClr2Java CompletedTaskClr2Java { get; set; }
-
- [DataMember]
- private IActiveContextClr2Java ActiveContextClr2Java { get; set; }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/events/ContextMessage.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/events/ContextMessage.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/events/ContextMessage.cs
deleted file mode 100644
index 4afbcdc..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/events/ContextMessage.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Org.Apache.REEF.Common.Context;
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- public class ContextMessage : IContextMessage
- {
- private readonly string _messageSourcId;
- private readonly byte[] _bytes;
- private readonly string _id;
-
- public ContextMessage(IContextMessageClr2Java clr2Java)
- {
- _messageSourcId = clr2Java.GetMessageSourceId();
- _bytes = clr2Java.Get();
- _id = clr2Java.GetId();
- }
-
- public string Id
- {
- get { return _id; }
- set { }
- }
-
- public string MessageSourceId
- {
- get { return _messageSourcId; }
- }
-
- public byte[] Message
- {
- get { return _bytes; }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/events/EvaluatorRequstor.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/events/EvaluatorRequstor.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/events/EvaluatorRequstor.cs
deleted file mode 100644
index f63c42a..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/events/EvaluatorRequstor.cs
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Org.Apache.REEF.Common.Catalog;
-using Org.Apache.REEF.Common.Evaluator;
-using Org.Apache.REEF.Driver.Evaluator;
-using Org.Apache.REEF.Utilities.Diagnostics;
-using Org.Apache.REEF.Utilities.Logging;
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Runtime.Serialization;
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- [DataContract]
- internal class EvaluatorRequestor : IEvaluatorRequestor
- {
- private static readonly Logger LOGGER = Logger.GetLogger(typeof(EvaluatorRequestor));
-
- private static Dictionary<string, IEvaluatorDescriptor> _evaluators;
-
- public EvaluatorRequestor(IEvaluatorRequestorClr2Java clr2Java)
- {
- InstanceId = Guid.NewGuid().ToString("N");
- Clr2Java = clr2Java;
- }
-
- public static Dictionary<string, IEvaluatorDescriptor> Evaluators
- {
- get
- {
- if (_evaluators == null)
- {
- _evaluators = new Dictionary<string, IEvaluatorDescriptor>();
- }
- return _evaluators;
- }
- }
-
- public IResourceCatalog ResourceCatalog { get; set; }
-
- [DataMember]
- public string InstanceId { get; set; }
-
- [DataMember]
- private IEvaluatorRequestorClr2Java Clr2Java { get; set; }
-
- public void Submit(IEvaluatorRequest request)
- {
- LOGGER.Log(Level.Info, string.Format(CultureInfo.InvariantCulture, "Submitting request for {0} evaluators and {1} MB memory and {2} core to rack {3}.", request.Number, request.MemoryMegaBytes, request.VirtualCore, request.Rack));
-
- lock (Evaluators)
- {
- for (int i = 0; i < request.Number; i++)
- {
- EvaluatorDescriptorImpl descriptor = new EvaluatorDescriptorImpl(new NodeDescriptorImpl(), EvaluatorType.CLR, request.MemoryMegaBytes, request.VirtualCore);
- descriptor.Rack = request.Rack;
- string key = string.Format(CultureInfo.InvariantCulture, "{0}_{1}", request.EvaluatorBatchId, i);
- try
- {
- _evaluators.Add(key, descriptor);
- }
- catch (ArgumentException e)
- {
- Exceptions.Caught(e, Level.Error, string.Format(CultureInfo.InvariantCulture, "EvaluatorBatchId [{0}] already exists.", key), LOGGER);
- Exceptions.Throw(new InvalidOperationException("Cannot use evaluator id " + key, e), LOGGER);
- }
- }
- }
-
- Clr2Java.Submit(request);
- }
-
- public void Dispose()
- {
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/events/FailedContext.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/events/FailedContext.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/events/FailedContext.cs
deleted file mode 100644
index 9e0dcc2..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/events/FailedContext.cs
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Org.Apache.REEF.Driver.Context;
-using Org.Apache.REEF.Driver.Evaluator;
-using Org.Apache.REEF.Utilities;
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- public class FailedContext : IFailedContext
- {
- private string _id;
-
- private string _evaluatorId;
-
- private string _parentId;
-
- public FailedContext(IFailedContextClr2Java clr2Java)
- {
- _id = clr2Java.GetId();
- _evaluatorId = clr2Java.GetEvaluatorId();
- _parentId = clr2Java.GetParentId();
- FailedContextClr2Java = clr2Java;
- }
-
- public string Id
- {
- get
- {
- return _id;
- }
-
- set
- {
- }
- }
-
- public string EvaluatorId
- {
- get
- {
- return _evaluatorId;
- }
-
- set
- {
- }
- }
-
- public Optional<string> ParentId
- {
- get
- {
- return string.IsNullOrEmpty(_parentId) ?
- Optional<string>.Empty() :
- Optional<string>.Of(_parentId);
- }
-
- set
- {
- }
- }
-
- public IEvaluatorDescriptor EvaluatorDescriptor
- {
- get
- {
- return FailedContextClr2Java.GetEvaluatorDescriptor();
- }
-
- set
- {
- }
- }
-
- public Optional<IActiveContext> ParentContext
- {
- get
- {
- IActiveContextClr2Java context = FailedContextClr2Java.GetParentContext();
- if (context != null)
- {
- return Optional<IActiveContext>.Of(new ActiveContext(context));
- }
- else
- {
- return Optional<IActiveContext>.Empty();
- }
- }
- }
-
- private IFailedContextClr2Java FailedContextClr2Java { get; set; }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/events/FailedEvaluator.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/events/FailedEvaluator.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/events/FailedEvaluator.cs
deleted file mode 100644
index a21c071..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/events/FailedEvaluator.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Org.Apache.REEF.Common.Exceptions;
-using Org.Apache.REEF.Driver.Context;
-using Org.Apache.REEF.Driver.Evaluator;
-using Org.Apache.REEF.Driver.Task;
-using Org.Apache.REEF.Utilities;
-using Org.Apache.REEF.Utilities.Diagnostics;
-using Org.Apache.REEF.Utilities.Logging;
-using System;
-using System.Collections.Generic;
-using System.Runtime.Serialization;
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- [DataContract]
- internal class FailedEvaluator : IFailedEvaluator
- {
- private static readonly Logger LOGGER = Logger.GetLogger(typeof(FailedEvaluator));
-
- public FailedEvaluator(IFailedEvaluatorClr2Java clr2Java)
- {
- InstanceId = Guid.NewGuid().ToString("N");
- FailedEvaluatorClr2Java = clr2Java;
- EvaluatorRequestorClr2Java = FailedEvaluatorClr2Java.GetEvaluatorRequestor();
- Id = FailedEvaluatorClr2Java.GetId();
- }
-
- [DataMember]
- public string InstanceId { get; set; }
-
- public string Id { get; set; }
-
- public EvaluatorException EvaluatorException { get; set; }
-
- public List<FailedContext> FailedContexts { get; set; }
-
- public Optional<IFailedTask> FailedTask { get; set; }
-
- [DataMember]
- private IFailedEvaluatorClr2Java FailedEvaluatorClr2Java { get; set; }
-
- [DataMember]
- private IEvaluatorRequestorClr2Java EvaluatorRequestorClr2Java { get; set; }
-
- public IEvaluatorRequestor GetEvaluatorRequetor()
- {
- if (EvaluatorRequestorClr2Java == null)
- {
- Exceptions.Throw(new InvalidOperationException("EvaluatorRequestorClr2Java not initialized."), LOGGER);
- }
- return new EvaluatorRequestor(EvaluatorRequestorClr2Java);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/events/FailedTask.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/events/FailedTask.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/events/FailedTask.cs
deleted file mode 100644
index 0e0623a..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/events/FailedTask.cs
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Org.Apache.REEF.Driver.Context;
-using Org.Apache.REEF.Driver.Task;
-using Org.Apache.REEF.Utilities;
-using Org.Apache.REEF.Utilities.Diagnostics;
-using Org.Apache.REEF.Utilities.Logging;
-using System;
-using System.Collections.Generic;
-using System.Runtime.Serialization;
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- public class FailedTask : IFailedTask
- {
- private static readonly Logger LOGGER = Logger.GetLogger(typeof(FailedTask));
-
- public FailedTask(IFailedTaskClr2Java failedTaskClr2Java)
- {
- InstanceId = Guid.NewGuid().ToString("N");
- Parse(failedTaskClr2Java);
- FailedTaskClr2Java = failedTaskClr2Java;
- ActiveContextClr2Java = failedTaskClr2Java.GetActiveContext();
- }
-
- public Optional<string> Reason { get; set; }
-
- [DataMember]
- public string InstanceId { get; set; }
-
- public string Id { get; set; }
-
- public string Message { get; set; }
-
- public Optional<string> Description { get; set; }
-
- public Optional<Exception> Cause { get; set; }
-
- public Optional<byte[]> Data { get; set; }
-
- [DataMember]
- private IFailedTaskClr2Java FailedTaskClr2Java { get; set; }
-
- [DataMember]
- private IActiveContextClr2Java ActiveContextClr2Java { get; set; }
-
- /// <summary>
- /// Access the context the task ran (and crashed) on, if it could be recovered.
- /// An ActiveContext is given when the task fails but the context remains alive.
- /// On context failure, the context also fails and is surfaced via the FailedContext event.
- /// Note that receiving an ActiveContext here is no guarantee that the context (and evaluator)
- /// are in a consistent state. Application developers need to investigate the reason available
- /// via getCause() to make that call.
- /// return the context the Task ran on.
- /// </summary>
- public Optional<IActiveContext> GetActiveContext()
- {
- IActiveContext activeContext = new ActiveContext(ActiveContextClr2Java);
- return ActiveContextClr2Java == null ? Optional<IActiveContext>.Empty() : Optional<IActiveContext>.Of(activeContext);
- }
-
- public Exception AsError()
- {
- throw new NotImplementedException();
- }
-
- private void Parse(IFailedTaskClr2Java failedTaskClr2Java)
- {
- string serializedInfo = failedTaskClr2Java.GetString();
- LOGGER.Log(Level.Verbose, "serialized failed task: " + serializedInfo);
- Dictionary<string, string> settings = new Dictionary<string, string>();
- string[] components = serializedInfo.Split(',');
- foreach (string component in components)
- {
- string[] pair = component.Trim().Split('=');
- if (pair == null || pair.Length != 2)
- {
- Exceptions.Throw(new ArgumentException("invalid component to be used as key-value pair:", component), LOGGER);
- }
- settings.Add(pair[0], pair[1]);
- }
-
- string id;
- if (!settings.TryGetValue("Identifier", out id))
- {
- Exceptions.Throw(new ArgumentException("cannot find Identifier entry."), LOGGER);
- }
- Id = id;
-
- string msg;
- if (!settings.TryGetValue("Message", out msg))
- {
- LOGGER.Log(Level.Verbose, "no Message in Failed Task.");
- msg = string.Empty;
- }
- Message = msg;
-
- string description;
- if (!settings.TryGetValue("Description", out description))
- {
- LOGGER.Log(Level.Verbose, "no Description in Failed Task.");
- description = string.Empty;
- }
- Description = string.IsNullOrWhiteSpace(description) ? Optional<string>.Empty() : Optional<string>.Of(description);
-
- string cause;
- if (!settings.TryGetValue("Cause", out cause))
- {
- LOGGER.Log(Level.Verbose, "no Cause in Failed Task.");
- cause = string.Empty;
- }
- Reason = string.IsNullOrWhiteSpace(cause) ? Optional<string>.Empty() : Optional<string>.Of(cause);
-
- string rawData;
- if (!settings.TryGetValue("Data", out rawData))
- {
- LOGGER.Log(Level.Verbose, "no Data in Failed Task.");
- rawData = string.Empty;
- }
- Data = string.IsNullOrWhiteSpace(rawData) ? Optional<byte[]>.Empty() : Optional<byte[]>.Of(ByteUtilities.StringToByteArrays(rawData));
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/events/RunningTask.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/events/RunningTask.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/events/RunningTask.cs
deleted file mode 100644
index 5c9e26c..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/events/RunningTask.cs
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using System;
-using Org.Apache.REEF.Driver.Task;
-using Org.Apache.REEF.Utilities.Logging;
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- public class RunningTask : IRunningTask
- {
- private static readonly Logger LOGGER = Logger.GetLogger(typeof(RunningTask));
- private IRunningTaskClr2Java _runningTaskClr2Java;
- private IActiveContextClr2Java _activeContextClr2Java;
-
- public RunningTask(IRunningTaskClr2Java runningTaskClr2Java)
- {
- using (LOGGER.LogFunction("RunningTask::RunningTask"))
- {
- _runningTaskClr2Java = runningTaskClr2Java;
- _activeContextClr2Java = runningTaskClr2Java.GetActiveContext();
- }
- }
-
- public Context.IActiveContext ActiveContext
- {
- get
- {
- return new ActiveContext(_activeContextClr2Java);
- }
-
- set
- {
- ActiveContext = value;
- }
- }
-
- public string Id
- {
- get
- {
- return _runningTaskClr2Java.GetId();
- }
-
- set
- {
- Id = value;
- }
- }
-
- public void Send(byte[] message)
- {
- _runningTaskClr2Java.Send(message);
- }
-
- public void OnNext(byte[] message)
- {
- throw new NotImplementedException();
- }
-
- public void Suspend(byte[] message)
- {
- throw new NotImplementedException();
- }
-
- public void Suspend()
- {
- throw new NotImplementedException();
- }
-
- public void Dispose(byte[] message)
- {
- throw new NotImplementedException();
- }
-
- public void Dispose()
- {
- throw new NotImplementedException();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/events/SuspendedTask.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/events/SuspendedTask.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/events/SuspendedTask.cs
deleted file mode 100644
index 6c5535b..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/events/SuspendedTask.cs
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Org.Apache.REEF.Driver.Context;
-using System;
-using System.Runtime.Serialization;
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- [DataContract]
- internal class SuspendedTask : ISuspendedTask
- {
- internal SuspendedTask(ISuspendedTaskClr2Java suspendedTaskClr2Java)
- {
- InstanceId = Guid.NewGuid().ToString("N");
- SuspendedTaskClr2Java = suspendedTaskClr2Java;
- ActiveContextClr2Java = suspendedTaskClr2Java.GetActiveContext();
- }
-
- [DataMember]
- public string InstanceId { get; set; }
-
- public byte[] Message
- {
- get
- {
- return SuspendedTaskClr2Java.Get();
- }
-
- set
- {
- }
- }
-
- public string Id
- {
- get
- {
- return SuspendedTaskClr2Java.GetId();
- }
-
- set
- {
- }
- }
-
- public IActiveContext ActiveContext
- {
- get
- {
- return new ActiveContext(ActiveContextClr2Java);
- }
-
- set
- {
- }
- }
-
- [DataMember]
- private ISuspendedTaskClr2Java SuspendedTaskClr2Java { get; set; }
-
- [DataMember]
- private IActiveContextClr2Java ActiveContextClr2Java { get; set; }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/bridge/events/TaskMessage.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/bridge/events/TaskMessage.cs b/lang/cs/Org.Apache.REEF.Driver/bridge/events/TaskMessage.cs
deleted file mode 100644
index 76250c3..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/bridge/events/TaskMessage.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Org.Apache.REEF.Driver.Task;
-using System;
-using System.Runtime.Serialization;
-
-namespace Org.Apache.REEF.Driver.Bridge
-{
- /// <summary>
- /// TaskMessage which wraps ITaskMessageClr2Java
- /// </summary>
- [DataContract]
- internal class TaskMessage : ITaskMessage
- {
- private ITaskMessageClr2Java _taskMessageClr2Java;
- private byte[] _message;
- private string _instanceId;
-
- public TaskMessage(ITaskMessageClr2Java clr2Java, byte[] message)
- {
- _instanceId = Guid.NewGuid().ToString("N");
- _taskMessageClr2Java = clr2Java;
- _message = message;
- }
-
- [DataMember]
- public string InstanceId
- {
- get { return _instanceId; }
- set { _instanceId = value; }
- }
-
- [DataMember]
- public string TaskId
- {
- get { return _taskMessageClr2Java.GetId(); }
- set { }
- }
-
- [DataMember]
- public byte[] Message
- {
- get { return _message; }
- set { _message = value; }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/context/ContextConfiguration.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/context/ContextConfiguration.cs b/lang/cs/Org.Apache.REEF.Driver/context/ContextConfiguration.cs
deleted file mode 100644
index 2fae867..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/context/ContextConfiguration.cs
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Org.Apache.REEF.Common.Context;
-using Org.Apache.REEF.Common.Events;
-using Org.Apache.REEF.Tasks;
-using Org.Apache.REEF.Tasks.Events;
-using Org.Apache.REEF.Tang.Formats;
-using Org.Apache.REEF.Tang.Util;
-using System;
-using System.Diagnostics.CodeAnalysis;
-
-[module: SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1401:FieldsMustBePrivate", Justification = "static field, typical usage in configurations")]
-
-namespace Org.Apache.REEF.Driver.Context
-{
- public class ContextConfiguration : ConfigurationModuleBuilder
- {
- /// <summary>
- /// The identifier of the context.
- /// </summary>
- [SuppressMessage("Microsoft.Security", "CA2104:Do not declare read only mutable reference types", Justification = "not applicable")]
- public static readonly RequiredParameter<string> Identifier = new RequiredParameter<string>();
-
- /// <summary>
- /// for context start. Defaults to logging if not bound.
- /// </summary>
- [SuppressMessage("Microsoft.Security", "CA2104:Do not declare read only mutable reference types", Justification = "not applicable")]
- public static readonly OptionalImpl<IObserver<IContextStart>> OnContextStart = new OptionalImpl<IObserver<IContextStart>>();
-
- /// <summary>
- /// for context stop. Defaults to logging if not bound.
- /// </summary>
- [SuppressMessage("Microsoft.Security", "CA2104:Do not declare read only mutable reference types", Justification = "not applicable")]
- public static readonly OptionalImpl<IObserver<IContextStop>> OnContextStop = new OptionalImpl<IObserver<IContextStop>>();
-
- /// <summary>
- /// to be informed right before a Task enters its call() method.
- /// </summary>
- [SuppressMessage("Microsoft.Security", "CA2104:Do not declare read only mutable reference types", Justification = "not applicable")]
- public static readonly OptionalImpl<IObserver<ITaskStart>> OnTaskStart = new OptionalImpl<IObserver<ITaskStart>>();
-
- /// <summary>
- /// to be informed right after a Task exits its call() method.
- /// </summary>
- [SuppressMessage("Microsoft.Security", "CA2104:Do not declare read only mutable reference types", Justification = "not applicable")]
- public static readonly OptionalImpl<IObserver<ITaskStop>> OnTaskStop = new OptionalImpl<IObserver<ITaskStop>>();
-
- /// <summary>
- /// Source of messages to be called whenever the evaluator is about to make a heartbeat.
- /// </summary>
- [SuppressMessage("Microsoft.Security", "CA2104:Do not declare read only mutable reference types", Justification = "not applicable")]
- public static readonly OptionalImpl<IContextMessageSource> OnSendMessage = new OptionalImpl<IContextMessageSource>();
-
- /// <summary>
- /// Driver has sent the context a message, and this parameter is used to register a handler on the context for processing that message.
- /// </summary>
- [SuppressMessage("Microsoft.Security", "CA2104:Do not declare read only mutable reference types", Justification = "not applicable")]
- public static readonly OptionalImpl<IContextMessageHandler> OnMessage = new OptionalImpl<IContextMessageHandler>();
-
- public static ConfigurationModule ConfigurationModule
- {
- get
- {
- return new ContextConfiguration()
- .BindNamedParameter(GenericType<ContextConfigurationOptions.ContextIdentifier>.Class, Identifier)
- .BindSetEntry(GenericType<ContextConfigurationOptions.StartHandlers>.Class, OnContextStart)
- .BindSetEntry(GenericType<ContextConfigurationOptions.StopHandlers>.Class, OnContextStop)
- .BindSetEntry(GenericType<ContextConfigurationOptions.ContextMessageSources>.Class, OnSendMessage)
- .BindSetEntry(GenericType<ContextConfigurationOptions.ContextMessageHandlers>.Class, OnMessage)
- .BindSetEntry(GenericType<TaskConfigurationOptions.StartHandlers>.Class, OnTaskStart)
- .BindSetEntry(GenericType<TaskConfigurationOptions.StopHandlers>.Class, OnTaskStop)
- .Build();
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/7edb8570/lang/cs/Org.Apache.REEF.Driver/context/ContextConfigurationOptions.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/context/ContextConfigurationOptions.cs b/lang/cs/Org.Apache.REEF.Driver/context/ContextConfigurationOptions.cs
deleted file mode 100644
index 632fdbc..0000000
--- a/lang/cs/Org.Apache.REEF.Driver/context/ContextConfigurationOptions.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Org.Apache.REEF.Common.Context;
-using Org.Apache.REEF.Common.Events;
-using Org.Apache.REEF.Driver.Defaults;
-using Org.Apache.REEF.Tang.Annotations;
-using Org.Apache.REEF.Tang.Formats;
-using System;
-using System.Collections.Generic;
-
-namespace Org.Apache.REEF.Driver.Context
-{
- /// <summary>
- /// Configuration parameters for ContextConfiguration module.
- /// </summary>
- public class ContextConfigurationOptions : ConfigurationModuleBuilder
- {
- [NamedParameter(documentation: "The identifier for the context.")]
- public class ContextIdentifier : Name<string>
- {
- }
-
- [NamedParameter(documentation: "The set of event handlers for the ContextStart event", defaultClasses: new[] { typeof(DefaultContextStartHandler) })]
- public class StartHandlers : Name<ISet<IObserver<IContextStart>>>
- {
- }
-
- [NamedParameter(documentation: "The set of event handlers for the ContextStop event", defaultClasses: new[] { typeof(DefaultContextStopHandler) })]
- public class StopHandlers : Name<ISet<IObserver<IContextStop>>>
- {
- }
-
- [NamedParameter(documentation: "The set of ContextMessageSource implementations called during heartbeats.", defaultClasses: new[] { typeof(DefaultContextMessageSource) })]
- public class ContextMessageSources : Name<ISet<IContextMessageSource>>
- {
- }
-
- [NamedParameter(documentation: "The set of Context message handlers.")]
- public class ContextMessageHandlers : Name<ISet<IContextMessageHandler>>
- {
- }
- }
-}