flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [2/7] flink git commit: [hotfix] Remove unused FileDataSourceBase and FileDataSinkBase
Date Mon, 14 Dec 2015 18:48:31 GMT
[hotfix] Remove unused FileDataSourceBase and FileDataSinkBase


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/a8c4c48d
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/a8c4c48d
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/a8c4c48d

Branch: refs/heads/master
Commit: a8c4c48d7ddc2d0fd880535d7c7d24bd4f63c0d8
Parents: bd657e6
Author: Stephan Ewen <sewen@apache.org>
Authored: Sun Dec 13 18:57:26 2015 +0100
Committer: Stephan Ewen <sewen@apache.org>
Committed: Mon Dec 14 17:44:19 2015 +0100

----------------------------------------------------------------------
 .../common/operators/base/FileDataSinkBase.java | 83 --------------------
 .../operators/base/FileDataSourceBase.java      | 81 -------------------
 .../examples/WordCountCompilerTest.java         |  2 -
 3 files changed, 166 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/a8c4c48d/flink-core/src/main/java/org/apache/flink/api/common/operators/base/FileDataSinkBase.java
----------------------------------------------------------------------
diff --git a/flink-core/src/main/java/org/apache/flink/api/common/operators/base/FileDataSinkBase.java
b/flink-core/src/main/java/org/apache/flink/api/common/operators/base/FileDataSinkBase.java
deleted file mode 100644
index 8f5c4e3..0000000
--- a/flink-core/src/main/java/org/apache/flink/api/common/operators/base/FileDataSinkBase.java
+++ /dev/null
@@ -1,83 +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.flink.api.common.operators.base;
-
-import org.apache.flink.api.common.io.FileOutputFormat;
-import org.apache.flink.api.common.operators.GenericDataSinkBase;
-import org.apache.flink.api.common.operators.UnaryOperatorInformation;
-import org.apache.flink.api.common.operators.util.UserCodeWrapper;
-import org.apache.flink.types.Nothing;
-
-/**
- * Operator for nodes which act as data sinks, storing the data they receive in a file instead
of sending it to another
- * contract. The encoding of the data in the file is handled by the {@link org.apache.flink.api.common.io.FileOutputFormat}.
- *
- * @see org.apache.flink.api.common.io.FileOutputFormat
- */
-public class FileDataSinkBase<IN> extends GenericDataSinkBase<IN> {
-
-	protected final String filePath;
-
-	// --------------------------------------------------------------------------------------------
-
-	/**
-	 * Creates a FileDataSink with the provided {@link org.apache.flink.api.common.io.FileOutputFormat}
implementation
-	 * and the given name, writing to the file indicated by the given path.
-	 *
-	 * @param f The {@link org.apache.flink.api.common.io.FileOutputFormat} implementation used
to encode the data.
-	 * @param filePath The path to the file to write the contents to.
-	 * @param name The given name for the sink, used in plans, logs and progress messages.
-	 */
-	public FileDataSinkBase(FileOutputFormat<IN> f, UnaryOperatorInformation<IN, Nothing>
operatorInfo, String filePath, String name) {
-		super(f, operatorInfo, name);
-		this.filePath = filePath;
-		this.parameters.setString(FileOutputFormat.FILE_PARAMETER_KEY, filePath);
-	}
-
-	/**
-	 * Creates a FileDataSink with the provided {@link org.apache.flink.api.common.io.FileOutputFormat}
implementation
-	 * and the given name, writing to the file indicated by the given path.
-	 *
-	 * @param f The {@link org.apache.flink.api.common.io.FileOutputFormat} implementation used
to encode the data.
-	 * @param filePath The path to the file to write the contents to.
-	 * @param name The given name for the sink, used in plans, logs and progress messages.
-	 */
-	public FileDataSinkBase(UserCodeWrapper<FileOutputFormat<IN>> f, UnaryOperatorInformation<IN,
Nothing> operatorInfo, String filePath, String name) {
-		super(f, operatorInfo, name);
-		this.filePath = filePath;
-		this.parameters.setString(FileOutputFormat.FILE_PARAMETER_KEY, filePath);
-	}
-
-	// --------------------------------------------------------------------------------------------
-
-	/**
-	 * Returns the configured file path where the output is written to.
-	 * 
-	 * @return The path to which the output shall be written.
-	 */
-	public String getFilePath() {
-		return this.filePath;
-	}
-	
-
-	@Override
-	public String toString() {
-		return this.filePath;
-	}
-}

http://git-wip-us.apache.org/repos/asf/flink/blob/a8c4c48d/flink-core/src/main/java/org/apache/flink/api/common/operators/base/FileDataSourceBase.java
----------------------------------------------------------------------
diff --git a/flink-core/src/main/java/org/apache/flink/api/common/operators/base/FileDataSourceBase.java
b/flink-core/src/main/java/org/apache/flink/api/common/operators/base/FileDataSourceBase.java
deleted file mode 100644
index 907819f..0000000
--- a/flink-core/src/main/java/org/apache/flink/api/common/operators/base/FileDataSourceBase.java
+++ /dev/null
@@ -1,81 +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.flink.api.common.operators.base;
-
-import org.apache.flink.api.common.io.FileInputFormat;
-import org.apache.flink.api.common.operators.GenericDataSourceBase;
-import org.apache.flink.api.common.operators.OperatorInformation;
-
-import com.google.common.base.Preconditions;
-
-/**
- * Operator for input nodes which read data from files.
- */
-public class FileDataSourceBase<OUT> extends GenericDataSourceBase<OUT, FileInputFormat<OUT>>
{
-
-	protected final String filePath;
-
-	// --------------------------------------------------------------------------------------------
-
-	/**
-	 * Creates a new instance for the given file using the given file input format.
-	 *
-	 * @param f The {@link org.apache.flink.api.common.io.FileInputFormat} implementation used
to read the data.
-	 * @param operatorInfo The type information for the output type.
-	 * @param filePath The file location. The file path must be a fully qualified URI, including
the address schema.
-	 * @param name The given name for the Pact, used in plans, logs and progress messages.
-	 */
-	public FileDataSourceBase(FileInputFormat<OUT> f, OperatorInformation<OUT> operatorInfo,
String filePath, String name) {
-		super(f, operatorInfo, name);
-
-		Preconditions.checkNotNull(filePath, "The file path may not be null.");
-
-		this.filePath = filePath;
-		f.setFilePath(filePath);
-	}
-
-	/**
-	 * Creates a new instance for the given file using the given input format. The contract
has the default name.
-	 *
-	 * @param f The {@link org.apache.flink.api.common.io.FileInputFormat} implementation used
to read the data.
-	 * @param operatorInfo The type information for the output type.
-	 * @param filePath The file location. The file path must be a fully qualified URI, including
the address schema.
-	 */
-	public FileDataSourceBase(FileInputFormat<OUT> f, OperatorInformation<OUT> operatorInfo,
String filePath) {
-		this(f, operatorInfo, Preconditions.checkNotNull(filePath, "The file path may not be null."),
"File " + filePath);
-	}
-
-	// --------------------------------------------------------------------------------------------
-
-	/**
-	 * Returns the file path from which the input is read.
-	 * 
-	 * @return The path from which the input shall be read.
-	 */
-	public String getFilePath() {
-		return this.filePath;
-	}
-	
-	// --------------------------------------------------------------------------------------------
-	
-	public String toString() {
-		return this.filePath;
-	}
-}

http://git-wip-us.apache.org/repos/asf/flink/blob/a8c4c48d/flink-tests/src/test/java/org/apache/flink/test/optimizer/examples/WordCountCompilerTest.java
----------------------------------------------------------------------
diff --git a/flink-tests/src/test/java/org/apache/flink/test/optimizer/examples/WordCountCompilerTest.java
b/flink-tests/src/test/java/org/apache/flink/test/optimizer/examples/WordCountCompilerTest.java
index 576717f..ab49282 100644
--- a/flink-tests/src/test/java/org/apache/flink/test/optimizer/examples/WordCountCompilerTest.java
+++ b/flink-tests/src/test/java/org/apache/flink/test/optimizer/examples/WordCountCompilerTest.java
@@ -24,8 +24,6 @@ import org.apache.flink.api.common.ExecutionConfig;
 import org.apache.flink.api.common.Plan;
 import org.apache.flink.api.common.functions.MapFunction;
 import org.apache.flink.api.common.operators.GenericDataSourceBase;
-import org.apache.flink.api.common.operators.Order;
-import org.apache.flink.api.common.operators.base.FileDataSourceBase;
 import org.apache.flink.api.common.operators.util.FieldList;
 import org.apache.flink.api.java.DataSet;
 import org.apache.flink.api.java.ExecutionEnvironment;


Mime
View raw message