Skip to content

Commit

Permalink
Remove protobuf and http-client dependency from Dataflow runner
Browse files Browse the repository at this point in the history
This closes #3072
  • Loading branch information
lukecwik committed May 11, 2017
2 parents f5ace5c + aee9187 commit ff589c7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
11 changes: 0 additions & 11 deletions runners/google-cloud-dataflow-java/pom.xml
Expand Up @@ -293,12 +293,6 @@
<artifactId>google-http-client-jackson2</artifactId>
</dependency>

<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-protobuf</artifactId>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-dataflow</artifactId>
Expand Down Expand Up @@ -352,11 +346,6 @@
<artifactId>joda-time</artifactId>
</dependency>

<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</dependency>

<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
Expand Down
Expand Up @@ -25,7 +25,6 @@

import com.google.api.services.dataflow.model.SourceMetadata;
import com.google.common.annotations.VisibleForTesting;
import com.google.protobuf.ByteString;
import java.util.ArrayList;
import java.util.List;
import org.apache.beam.runners.dataflow.options.DataflowPipelineOptions;
Expand All @@ -47,20 +46,9 @@
public class CustomSources {
private static final String SERIALIZED_SOURCE = "serialized_source";
@VisibleForTesting static final String SERIALIZED_SOURCE_SPLITS = "serialized_source_splits";
/**
* The current limit on the size of a ReportWorkItemStatus RPC to Google Cloud Dataflow, which
* includes the initial splits, is 20 MB.
*/
public static final long DATAFLOW_SPLIT_RESPONSE_API_SIZE_BYTES = 20 * (1 << 20);

private static final Logger LOG = LoggerFactory.getLogger(CustomSources.class);

private static final ByteString firstSplitKey = ByteString.copyFromUtf8("0000000000000001");

public static boolean isFirstUnboundedSourceSplit(ByteString splitKey) {
return splitKey.equals(firstSplitKey);
}

private static int getDesiredNumUnboundedSourceSplits(DataflowPipelineOptions options) {
int cores = 4; //TODO: decide at runtime?
if (options.getMaxNumWorkers() > 0) {
Expand Down

0 comments on commit ff589c7

Please sign in to comment.