GIRAPH-575: undo new interface
Project: http://git-wip-us.apache.org/repos/asf/giraph/repo Commit: http://git-wip-us.apache.org/repos/asf/giraph/commit/1bed2369 Tree: http://git-wip-us.apache.org/repos/asf/giraph/tree/1bed2369 Diff: http://git-wip-us.apache.org/repos/asf/giraph/diff/1bed2369 Branch: refs/heads/partition-values-575 Commit: 1bed2369dacc77e46fbfa93197abd2f36cbfed64 Parents: 799711e Author: Nitay Joffe <[email protected]> Authored: Tue Mar 19 15:54:52 2013 -0400 Committer: Nitay Joffe <[email protected]> Committed: Wed Mar 20 17:30:39 2013 -0400 ---------------------------------------------------------------------- .../input/vertex/AbstractHiveToVertexEdges.java | 3 - .../input/vertex/AbstractHiveToVertexValue.java | 3 - .../giraph/hive/input/vertex/HiveToRecord.java | 33 --------------- .../hive/input/vertex/HiveToVertexEdges.java | 6 +-- .../giraph/hive/output/HiveVertexWriter.java | 3 +- 5 files changed, 3 insertions(+), 45 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/giraph/blob/1bed2369/giraph-hive/src/main/java/org/apache/giraph/hive/input/vertex/AbstractHiveToVertexEdges.java ---------------------------------------------------------------------- diff --git a/giraph-hive/src/main/java/org/apache/giraph/hive/input/vertex/AbstractHiveToVertexEdges.java b/giraph-hive/src/main/java/org/apache/giraph/hive/input/vertex/AbstractHiveToVertexEdges.java index cb67749..80944ce 100644 --- a/giraph-hive/src/main/java/org/apache/giraph/hive/input/vertex/AbstractHiveToVertexEdges.java +++ b/giraph-hive/src/main/java/org/apache/giraph/hive/input/vertex/AbstractHiveToVertexEdges.java @@ -48,7 +48,4 @@ public abstract class AbstractHiveToVertexEdges<I extends WritableComparable, @Override public HiveTableSchema getTableSchema() { return tableSchema; } - - @Override - public void readingPartition(Map<String, String> partitionValues) { } } http://git-wip-us.apache.org/repos/asf/giraph/blob/1bed2369/giraph-hive/src/main/java/org/apache/giraph/hive/input/vertex/AbstractHiveToVertexValue.java ---------------------------------------------------------------------- diff --git a/giraph-hive/src/main/java/org/apache/giraph/hive/input/vertex/AbstractHiveToVertexValue.java b/giraph-hive/src/main/java/org/apache/giraph/hive/input/vertex/AbstractHiveToVertexValue.java index 7707cd9..9d02336 100644 --- a/giraph-hive/src/main/java/org/apache/giraph/hive/input/vertex/AbstractHiveToVertexValue.java +++ b/giraph-hive/src/main/java/org/apache/giraph/hive/input/vertex/AbstractHiveToVertexValue.java @@ -48,7 +48,4 @@ public abstract class AbstractHiveToVertexValue<I extends WritableComparable, @Override public HiveTableSchema getTableSchema() { return tableSchema; } - - @Override - public void readingPartition(Map<String, String> partitionValues) { } } http://git-wip-us.apache.org/repos/asf/giraph/blob/1bed2369/giraph-hive/src/main/java/org/apache/giraph/hive/input/vertex/HiveToRecord.java ---------------------------------------------------------------------- diff --git a/giraph-hive/src/main/java/org/apache/giraph/hive/input/vertex/HiveToRecord.java b/giraph-hive/src/main/java/org/apache/giraph/hive/input/vertex/HiveToRecord.java deleted file mode 100644 index afcf4ad..0000000 --- a/giraph-hive/src/main/java/org/apache/giraph/hive/input/vertex/HiveToRecord.java +++ /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. - */ - -package org.apache.giraph.hive.input.vertex; - -import java.util.Map; - -/** - * Base interface for HiveTo{X} classes. Holds API common to both. - */ -public interface HiveToRecord { - /** - * Notification that we start reading a split. - * - * @param partitionValues Map of partition data. - */ - void readingPartition(Map<String, String> partitionValues); -} http://git-wip-us.apache.org/repos/asf/giraph/blob/1bed2369/giraph-hive/src/main/java/org/apache/giraph/hive/input/vertex/HiveToVertexEdges.java ---------------------------------------------------------------------- diff --git a/giraph-hive/src/main/java/org/apache/giraph/hive/input/vertex/HiveToVertexEdges.java b/giraph-hive/src/main/java/org/apache/giraph/hive/input/vertex/HiveToVertexEdges.java index 0d303d9..8076a8a 100644 --- a/giraph-hive/src/main/java/org/apache/giraph/hive/input/vertex/HiveToVertexEdges.java +++ b/giraph-hive/src/main/java/org/apache/giraph/hive/input/vertex/HiveToVertexEdges.java @@ -25,7 +25,6 @@ import org.apache.hadoop.io.WritableComparable; import com.facebook.giraph.hive.HiveReadableRecord; import java.util.Collections; -import java.util.Map; /** * Interface for creating edges for a vertex from a Hive record. @@ -36,7 +35,7 @@ import java.util.Map; * @param <E> extends Writable */ public interface HiveToVertexEdges<I extends WritableComparable, - E extends Writable> extends HiveToRecord { + E extends Writable> { /** * Read Vertex's edges from the HiveRecord given. * @@ -62,9 +61,6 @@ public interface HiveToVertexEdges<I extends WritableComparable, public static Empty get() { return INSTANCE; } @Override - public void readingPartition(Map<String, String> partitionValues) { } - - @Override public Iterable getEdges(HiveReadableRecord record) { return Collections.emptyList(); } http://git-wip-us.apache.org/repos/asf/giraph/blob/1bed2369/giraph-hive/src/main/java/org/apache/giraph/hive/output/HiveVertexWriter.java ---------------------------------------------------------------------- diff --git a/giraph-hive/src/main/java/org/apache/giraph/hive/output/HiveVertexWriter.java b/giraph-hive/src/main/java/org/apache/giraph/hive/output/HiveVertexWriter.java index 47d096b..ac02e53 100644 --- a/giraph-hive/src/main/java/org/apache/giraph/hive/output/HiveVertexWriter.java +++ b/giraph-hive/src/main/java/org/apache/giraph/hive/output/HiveVertexWriter.java @@ -35,6 +35,7 @@ import com.facebook.giraph.hive.HiveTableSchemas; import com.facebook.giraph.hive.impl.HiveApiRecord; import java.io.IOException; +import java.util.Collections; /** * Vertex writer using Hive. @@ -124,7 +125,7 @@ public class HiveVertexWriter<I extends WritableComparable, V extends Writable, @Override public void writeVertex(Vertex<I, V, E, ?> vertex) throws IOException, InterruptedException { - HiveRecord record = new HiveApiRecord(tableSchema.numColumns()); + HiveRecord record = new HiveApiRecord(tableSchema.numColumns(), Collections.<String>emptyList()); vertexToHive.fillRecord(vertex, record); hiveRecordWriter.write(NullWritable.get(), record); }
