Skip to content

Commit

Permalink
Fork Data Service Libraries to java-fn-execution
Browse files Browse the repository at this point in the history
  • Loading branch information
tgroh committed Nov 7, 2017
1 parent 3df3bcc commit 58e7ea7
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 1 deletion.
Expand Up @@ -27,7 +27,11 @@
*
* <p>Register a target with a {@link FnDataService} to gain a {@link FnDataReceiver} to which you
* may write outgoing data.
*
* @deprecated Runners should depend on the beam-runners-java-fn-execution module for this
* functionality.
*/
@Deprecated
public interface FnDataReceiver<T> extends Closeable {
void accept(T input) throws Exception;
}
Expand Up @@ -27,7 +27,11 @@
* The {@link FnDataService} is able to forward inbound elements to a consumer and is also a
* consumer of outbound elements. Callers can register themselves as consumers for inbound elements
* or can get a handle for a consumer for outbound elements.
*
* @deprecated Runners should depend on the beam-runners-java-fn-execution module for this
* functionality.
*/
@Deprecated
public interface FnDataService {

/**
Expand Down
Expand Up @@ -29,7 +29,13 @@
import org.apache.beam.sdk.util.WindowedValue;
import org.joda.time.Instant;

/** Processes a bundle by sending it to an SDK harness over the Fn API. */
/**
* Processes a bundle by sending it to an SDK harness over the Fn API.
*
* @deprecated Runners should interact with the Control and Data plane directly, rather than through
* a {@link DoFnRunner}. Consider the beam-runners-java-fn-execution artifact instead.
*/
@Deprecated
public class SdkHarnessDoFnRunner<InputT, OutputT> implements DoFnRunner<InputT, OutputT> {

private final SdkHarnessClient sdkHarnessClient;
Expand Down
@@ -0,0 +1,27 @@
/*
* 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.
*/
package org.apache.beam.runners.fnexecution.data;

import java.io.Closeable;

/**
* A receiver of streamed data.
*/
public interface FnDataReceiver<T> extends Closeable {
void accept(T input) throws Exception;
}
@@ -0,0 +1,23 @@
/*
* 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.
*/

/**
* Utilities for a Beam runner to interact with the Fn API {@link
* org.apache.beam.model.fnexecution.v1.BeamFnDataGrpc Data Service} via java abstractions.
*/
package org.apache.beam.runners.fnexecution.data;

0 comments on commit 58e7ea7

Please sign in to comment.