forked from apache/reef
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[REEF-2025] A new module containing the new Java bridge
This Jira introduces a new Java bridge for Drivers implemented in alternative languages. It provides the following artifacts (note: client driver refers to the application driver implemented in an alternative programming language): 1. A generic framework for passing information between the Java driver and the client driver. 2. A gRPC based implementation of the bridge that passes information via protocol buffers over gRPC. 3. Protocol buffer definitions for all information that flows between the Java driver and the client driver. 4. A Java implementation of the driver client that can be used for developing unit tests and serve as a template for implementing a driver client (say in C#). 5. Test cases to fail based unit tests that cover the Java bridge and client. Pull Request: Closes apache#1466
- Loading branch information
Tyson Condie
committed
Jul 9, 2018
1 parent
c4f934f
commit 8832c3c
Showing
186 changed files
with
9,640 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
lang/cs/Org.Apache.REEF.Bridge.Core.Client/Common/Config/ClientConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Licensed to the Apache Software Foundation (ASF) under one | ||
// or more contributor license agreements. See the NOTICE file | ||
// distributed with this work for additional information | ||
// regarding copyright ownership. The ASF licenses this file | ||
// to you under the Apache License, Version 2.0 (the | ||
// "License"); you may not use this file except in compliance | ||
// with the License. You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations | ||
// under the License. | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using Org.Apache.REEF.Bridge.Core.Client.Common.Config.Parameters; | ||
using Org.Apache.REEF.Common.Client; | ||
using Org.Apache.REEF.Tang.Formats; | ||
using Org.Apache.REEF.Tang.Util; | ||
|
||
namespace Org.Apache.REEF.Bridge.Core.Client.Common.Config | ||
{ | ||
public sealed class ClientConfiguration : ConfigurationModuleBuilder | ||
{ | ||
|
||
public static readonly OptionalParameter<IObserver<IRunningJob>> OnRunningJob = new OptionalParameter<IObserver<IRunningJob>>(); | ||
|
||
public static readonly OptionalParameter<IObserver<ISubmittedJob>> OnSubmittedJob = new OptionalParameter<IObserver<ISubmittedJob>>(); | ||
|
||
public static readonly OptionalParameter<IObserver<ICompletedJob>> OnCompletedJob = new OptionalParameter<IObserver<ICompletedJob>>(); | ||
|
||
public static readonly OptionalParameter<IObserver<IFailedJob>> OnFailedJob = new OptionalParameter<IObserver<IFailedJob>>(); | ||
|
||
public static readonly OptionalParameter<IObserver<IJobMessage>> OnJobMessage = new OptionalParameter<IObserver<IJobMessage>>(); | ||
|
||
public static readonly OptionalParameter<IObserver<IFailedRuntime>> OnFailedRuntime = new OptionalParameter<IObserver<IFailedRuntime>>(); | ||
|
||
public static readonly OptionalParameter<IObserver<IWakeError>> OnWakeError = new OptionalParameter<IObserver<IWakeError>>(); | ||
|
||
public static ConfigurationModule ConfigurationModule => new DriverBridgeConfiguration() | ||
.BindNamedParameter(GenericType<RunningJobHandler>.Class, OnRunningJob) | ||
.BindNamedParameter(GenericType<SubmittedJobHandler>.Class, OnSubmittedJob) | ||
.BindNamedParameter(GenericType<CompletedJobHandler>.Class, OnCompletedJob) | ||
.BindNamedParameter(GenericType<FailedJobHandler>.Class, OnFailedJob) | ||
.BindNamedParameter(GenericType<JobMessageHandler>.Class, OnJobMessage) | ||
.BindNamedParameter(GenericType<FailedRuntimeHandler>.Class, OnFailedRuntime) | ||
.BindNamedParameter(GenericType<WakeErrorHandler>.Class, OnWakeError) | ||
.Build(); | ||
|
||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
lang/cs/Org.Apache.REEF.Bridge.Core.Client/Common/Config/Parameters/CompletedJobHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Licensed to the Apache Software Foundation (ASF) under one | ||
// or more contributor license agreements. See the NOTICE file | ||
// distributed with this work for additional information | ||
// regarding copyright ownership. The ASF licenses this file | ||
// to you under the Apache License, Version 2.0 (the | ||
// "License"); you may not use this file except in compliance | ||
// with the License. You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations | ||
// under the License. | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using Org.Apache.REEF.Bridge.Core.Client.Common.Default; | ||
using Org.Apache.REEF.Common.Client; | ||
using Org.Apache.REEF.Tang.Annotations; | ||
|
||
namespace Org.Apache.REEF.Bridge.Core.Client.Common.Config.Parameters | ||
{ | ||
[NamedParameter("completed job handler", defaultClass:typeof(DefaultCompletedJobHandler))] | ||
public sealed class CompletedJobHandler : Name<IObserver<ICompletedJob>> | ||
{ | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
lang/cs/Org.Apache.REEF.Bridge.Core.Client/Common/Config/Parameters/FailedJobHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Licensed to the Apache Software Foundation (ASF) under one | ||
// or more contributor license agreements. See the NOTICE file | ||
// distributed with this work for additional information | ||
// regarding copyright ownership. The ASF licenses this file | ||
// to you under the Apache License, Version 2.0 (the | ||
// "License"); you may not use this file except in compliance | ||
// with the License. You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations | ||
// under the License. | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using Org.Apache.REEF.Bridge.Core.Client.Common.Default; | ||
using Org.Apache.REEF.Common.Client; | ||
using Org.Apache.REEF.Tang.Annotations; | ||
|
||
namespace Org.Apache.REEF.Bridge.Core.Client.Common.Config.Parameters | ||
{ | ||
[NamedParameter("failed job handler", defaultClass:typeof(DefaultFailedJobHandler))] | ||
public sealed class FailedJobHandler : Name<IObserver<IFailedJob>> | ||
{ | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
lang/cs/Org.Apache.REEF.Bridge.Core.Client/Common/Config/Parameters/FailedRuntimeHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Licensed to the Apache Software Foundation (ASF) under one | ||
// or more contributor license agreements. See the NOTICE file | ||
// distributed with this work for additional information | ||
// regarding copyright ownership. The ASF licenses this file | ||
// to you under the Apache License, Version 2.0 (the | ||
// "License"); you may not use this file except in compliance | ||
// with the License. You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations | ||
// under the License. | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using Org.Apache.REEF.Bridge.Core.Client.Common.Default; | ||
using Org.Apache.REEF.Common.Client; | ||
using Org.Apache.REEF.Tang.Annotations; | ||
|
||
namespace Org.Apache.REEF.Bridge.Core.Client.Common.Config.Parameters | ||
{ | ||
[NamedParameter("failed runtime handler", defaultClass:typeof(DefaultFailedRuntimeHandler))] | ||
public sealed class FailedRuntimeHandler : Name<IObserver<IFailedRuntime>> | ||
{ | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
lang/cs/Org.Apache.REEF.Bridge.Core.Client/Common/Config/Parameters/JobMessageHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Licensed to the Apache Software Foundation (ASF) under one | ||
// or more contributor license agreements. See the NOTICE file | ||
// distributed with this work for additional information | ||
// regarding copyright ownership. The ASF licenses this file | ||
// to you under the Apache License, Version 2.0 (the | ||
// "License"); you may not use this file except in compliance | ||
// with the License. You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations | ||
// under the License. | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using Org.Apache.REEF.Bridge.Core.Client.Common.Default; | ||
using Org.Apache.REEF.Common.Client; | ||
using Org.Apache.REEF.Tang.Annotations; | ||
|
||
namespace Org.Apache.REEF.Bridge.Core.Client.Common.Config.Parameters | ||
{ | ||
[NamedParameter("job message handler", defaultClass:typeof(DefaultJobMessageHandler))] | ||
public sealed class JobMessageHandler : Name<IObserver<IJobMessage>> | ||
{ | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
lang/cs/Org.Apache.REEF.Bridge.Core.Client/Common/Config/Parameters/RunningJobHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// 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.Bridge.Core.Client.Common.Default; | ||
using Org.Apache.REEF.Common.Client; | ||
using Org.Apache.REEF.Tang.Annotations; | ||
|
||
namespace Org.Apache.REEF.Bridge.Core.Client.Common.Config.Parameters | ||
{ | ||
[NamedParameter("running job handler", defaultClass:typeof(DefaultRunningJobHandler))] | ||
public sealed class RunningJobHandler : Name<IObserver<IRunningJob>> | ||
{ | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
lang/cs/Org.Apache.REEF.Bridge.Core.Client/Common/Config/Parameters/SubmittedJobHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Licensed to the Apache Software Foundation (ASF) under one | ||
// or more contributor license agreements. See the NOTICE file | ||
// distributed with this work for additional information | ||
// regarding copyright ownership. The ASF licenses this file | ||
// to you under the Apache License, Version 2.0 (the | ||
// "License"); you may not use this file except in compliance | ||
// with the License. You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations | ||
// under the License. | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using Org.Apache.REEF.Bridge.Core.Client.Common.Default; | ||
using Org.Apache.REEF.Common.Client; | ||
using Org.Apache.REEF.Tang.Annotations; | ||
|
||
namespace Org.Apache.REEF.Bridge.Core.Client.Common.Config.Parameters | ||
{ | ||
[NamedParameter("submitted job handler", defaultClass:typeof(DefaultSubmittedJobHandler))] | ||
public sealed class SubmittedJobHandler : Name<IObserver<ISubmittedJob>> | ||
{ | ||
} | ||
} |
Oops, something went wrong.