Updated Branches: refs/heads/master 67142f6b4 -> cad1b053b
CRUNCH-58: Limit the PObject interface to just a getValue method Project: http://git-wip-us.apache.org/repos/asf/incubator-crunch/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-crunch/commit/cad1b053 Tree: http://git-wip-us.apache.org/repos/asf/incubator-crunch/tree/cad1b053 Diff: http://git-wip-us.apache.org/repos/asf/incubator-crunch/diff/cad1b053 Branch: refs/heads/master Commit: cad1b053b390878b8b2e48e5a565077fe9356efc Parents: 2a44d18 Author: Josh Wills <[email protected]> Authored: Thu Sep 13 05:38:32 2012 -0700 Committer: Josh Wills <[email protected]> Committed: Thu Sep 13 05:38:32 2012 -0700 ---------------------------------------------------------------------- .../scala/org/apache/crunch/scrunch/PObject.scala | 19 --------------- .../src/main/java/org/apache/crunch/PObject.java | 19 --------------- .../crunch/materialize/pobject/PObjectImpl.java | 19 --------------- 3 files changed, 0 insertions(+), 57 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/cad1b053/crunch-scrunch/src/main/scala/org/apache/crunch/scrunch/PObject.scala ---------------------------------------------------------------------- diff --git a/crunch-scrunch/src/main/scala/org/apache/crunch/scrunch/PObject.scala b/crunch-scrunch/src/main/scala/org/apache/crunch/scrunch/PObject.scala index 5d3ddb3..d52cb2c 100644 --- a/crunch-scrunch/src/main/scala/org/apache/crunch/scrunch/PObject.scala +++ b/crunch-scrunch/src/main/scala/org/apache/crunch/scrunch/PObject.scala @@ -28,15 +28,6 @@ import org.apache.crunch.Target */ class PObject[T] private (private val native: JPObject[T]) { /** - * Writes the contents of this PObject to the specified Target, using the storage format - * specified by the target. - * - * @param target - * @return This PObject. - */ - def write(target: Target): PObject[T] = PObject(native.write(target)) - - /** * Gets the value associated with this PObject. Calling this method will trigger * whatever computation is necessary to obtain the value and block until that computation * succeeds. @@ -44,16 +35,6 @@ class PObject[T] private (private val native: JPObject[T]) { * @return The value associated with this PObject. */ def value(): T = native.getValue() - - /** - * @return A shorthand name for this PObject. - */ - def name: String = native.getName() - - /** - * @return The Pipeline associated with this PObject. - */ - def pipeline: Pipeline = new Pipeline(native.getPipeline()) } /** http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/cad1b053/crunch/src/main/java/org/apache/crunch/PObject.java ---------------------------------------------------------------------- diff --git a/crunch/src/main/java/org/apache/crunch/PObject.java b/crunch/src/main/java/org/apache/crunch/PObject.java index 2a2c1f3..897a01f 100644 --- a/crunch/src/main/java/org/apache/crunch/PObject.java +++ b/crunch/src/main/java/org/apache/crunch/PObject.java @@ -25,25 +25,6 @@ package org.apache.crunch; * @param <T> The type of value encapsulated by this {@code PObject}. */ public interface PObject<T> { - - /** - * Returns the {@code Pipeline} associated with this {@code PObject} - */ - Pipeline getPipeline(); - - /** - * Write the contents of this {@code PObject} to the given {@code Target}, - * using the storage format specified by the target. - * - * @param target The target to write to - */ - PObject<T> write(Target target); - - /** - * Returns a shorthand name for this PObject. - */ - String getName(); - /** * Gets the value associated with this {@code PObject}. Calling this method will trigger * whatever computation is necessary to obtain the value and block until that computation http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/cad1b053/crunch/src/main/java/org/apache/crunch/materialize/pobject/PObjectImpl.java ---------------------------------------------------------------------- diff --git a/crunch/src/main/java/org/apache/crunch/materialize/pobject/PObjectImpl.java b/crunch/src/main/java/org/apache/crunch/materialize/pobject/PObjectImpl.java index 20e43bc..59c2ba2 100644 --- a/crunch/src/main/java/org/apache/crunch/materialize/pobject/PObjectImpl.java +++ b/crunch/src/main/java/org/apache/crunch/materialize/pobject/PObjectImpl.java @@ -59,25 +59,6 @@ public abstract class PObjectImpl<S, T> implements PObject<T> { /** {@inheritDoc} */ @Override - public final Pipeline getPipeline() { - return collection.getPipeline(); - } - - /** {@inheritDoc} */ - @Override - public final PObject<T> write(Target target) { - collection.write(target); - return this; - } - - /** {@inheritDoc} */ - @Override - public final String getName() { - return collection.getName(); - } - - /** {@inheritDoc} */ - @Override public String toString() { return collection.toString(); }
